iRoCS Toolbox  1.1.0
Functions
lrootShapeAnalysis.hh File Reference
#include <config.hh>
#include <blitz/array.h>
Include dependency graph for lrootShapeAnalysis.hh:

Go to the source code of this file.

Functions

void centerAndVolume (blitz::Array< int, 3 > const &label, blitz::Array< blitz::TinyVector< double, 3 >, 1 > &center, blitz::Array< double, 1 > &volume, int maxLabel, blitz::TinyVector< double, 3 > const &elSize)
 Compute the volume in um^3 and center of gravity per intensity in the given integer volume. More...
 
void eraseMarkers (blitz::Array< int, 3 > const &L, blitz::Array< bool, 3 > &marker, blitz::Array< bool, 1 > const &flagTooSmall)
 Set the marker flag for each voxel, that is part of a segment that is not marked as too small in the flagTooSmall vector. More...
 
void labelOnBorder (blitz::Array< int, 3 > const &L, blitz::Array< unsigned char, 1 > &validFlag)
 
void volume (blitz::Array< int, 3 > const &label, blitz::Array< double, 1 > &volume, int maxLabel=-1)
 Compute the number of voxels per intensity in the given integer volume. More...
 

Function Documentation

◆ volume()

void volume ( blitz::Array< int, 3 > const &  label,
blitz::Array< double, 1 > &  volume,
int  maxLabel = -1 
)

Compute the number of voxels per intensity in the given integer volume.

Parameters
labelThe volume to compute the component voxel count
volumeThe Array to store the voxel counts to. The number of voxels for intensity i is returned at index i-1. The volume for intensity 0 is not computed.
maxLabelThe maximum label to consider. If -1 is passed the maximum intensity of the label Array is determined and used as maximum.

◆ centerAndVolume()

void centerAndVolume ( blitz::Array< int, 3 > const &  label,
blitz::Array< blitz::TinyVector< double, 3 >, 1 > &  center,
blitz::Array< double, 1 > &  volume,
int  maxLabel,
blitz::TinyVector< double, 3 > const &  elSize 
)

Compute the volume in um^3 and center of gravity per intensity in the given integer volume.

Parameters
labelThe volume to compute the component voxel count
centerThe centers of gravity in um for each intensity level will be returned in this Array. The center of gravity for intensity i is returned at index i-1. The center of gravity for intensity 0 is not computed.
volumeThe Array to store the volumes in um^3 to. The volume for intensity i is returned at index i-1. The volume for intensity 0 is not computed.
maxLabelThe maximum label to consider. If -1 is passed the maximum intensity of the label Array is determined and used as maximum.
elSizeThe voxel extents in micrometers

◆ eraseMarkers()

void eraseMarkers ( blitz::Array< int, 3 > const &  L,
blitz::Array< bool, 3 > &  marker,
blitz::Array< bool, 1 > const &  flagTooSmall 
)

Set the marker flag for each voxel, that is part of a segment that is not marked as too small in the flagTooSmall vector.

Internally it is a parallel implementation of marker = L > 0 && !flagTooSmall(L) where L in the second part must be understood voxelwise.

Parameters
LThe Array containing the segmentation with segments from 1 to n. Zero means background and is automatically marked as invalid.
markerThe output Array containing the valid flag for each voxel of the segmentation Array.
flagTooSmallA vector containing a boolean value of true if the segment with that index is too small and should be masked as invalid.

◆ labelOnBorder()

void labelOnBorder ( blitz::Array< int, 3 > const &  L,
blitz::Array< unsigned char, 1 > &  validFlag 
)