![]() |
Shapeworks Studio
2.1
Shape analysis software suite
|
Process an input segmentation to produce an automatically cropped version with holes filled and center-of-mass at the origin. More...
#include <itkPSMTrimLabelMapImageFilter.h>
Public Types | |
typedef PSMTrimLabelMapImageFilter | Self |
typedef ImageToImageFilter< TImage, TImage > | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef TImage | ImageType |
typedef ImageType::PixelType | PixelType |
typedef ImageType::PointType | PointType |
typedef ImageType::RegionType | RegionType |
typedef RegionType::SizeType | SizeType |
typedef RegionType::IndexType | IndexType |
Public Member Functions | |
itkNewMacro (Self) | |
itkTypeMacro (PSMTrimLabelMapImageFilter, ImageToImageFilter) | |
itkStaticConstMacro (Dimension, unsigned int, TImage::ImageDimension) | |
void | GenerateData () |
itkSetMacro (ForegroundValue, PixelType) | |
itkGetMacro (ForegroundValue, PixelType) | |
itkSetMacro (BackgroundValue, PixelType) | |
itkGetMacro (BackgroundValue, PixelType) | |
const RegionType & | GetBoundingBox () const |
Protected Member Functions | |
void | PrintSelf (std::ostream &os, Indent indent) const |
void | IsolateLargestComponent (ImageType *) const |
void | FillHoles (ImageType *) const |
void | Center (ImageType *) const |
void | Crop (ImageType *) |
virtual void | GenerateOutputInformation () |
virtual void | GenerateInputRequestedRegion () |
Process an input segmentation to produce an automatically cropped version with holes filled and center-of-mass at the origin.
This filter may be used to turn a label map (segmentation) image into a cropped version with its center-of-mass at the origin. This filter is intended to be used as part of a preprocessing pipeline to prepare segmentations for use with any of the Particle Shape Modeling filters (e.g. PSMEntropyModelFilter).
The filter processes the input image as follows:
1) The largest connected component for the specified foreground component is identified and isolated. All other pixels in the image are set to the background value (default zero).
2) Holes are filled in the segmentation resulting from Step 1.
3) The center of mass of the foreground object is computed and the center of the image is transformed to that location.
NOTE: This filter assumes that the upper-left-hand corner of the image is NOT part of the foreground.
WHAT ARE THE PARAMETERS?
This filter is templated over the input image type. It produces an output image of the same type.
Definition at line 61 of file itkPSMTrimLabelMapImageFilter.h.
typedef TImage itk::PSMTrimLabelMapImageFilter< TImage >::ImageType |
Image-type-related typedefs
Definition at line 72 of file itkPSMTrimLabelMapImageFilter.h.
typedef PSMTrimLabelMapImageFilter itk::PSMTrimLabelMapImageFilter< TImage >::Self |
Standard class typedefs.
Definition at line 66 of file itkPSMTrimLabelMapImageFilter.h.
|
protected |
Translates the center-of-mass to the center of the image. Also modifies the image information.
Definition at line 219 of file itkPSMTrimLabelMapImageFilter.hxx.
|
protected |
Crops the image to the smallest possible bounding box that contains the image. This method alters the output of the image.
Definition at line 317 of file itkPSMTrimLabelMapImageFilter.hxx.
|
protected |
Fills holes in the foreground segmentation.
Definition at line 186 of file itkPSMTrimLabelMapImageFilter.hxx.
void itk::PSMTrimLabelMapImageFilter< TImage >::GenerateData | ( | ) |
Do the work of batch-processing the input images.
Definition at line 91 of file itkPSMTrimLabelMapImageFilter.hxx.
|
protectedvirtual |
This filter must provide an implementation for GenerateInputRequestedRegion() in order to inform the pipeline execution model.
Definition at line 62 of file itkPSMTrimLabelMapImageFilter.hxx.
|
protectedvirtual |
This filter must provide an implementation for GenerateOutputInformation() in order to inform the pipeline execution model. The original documentation of this method is below.
Definition at line 82 of file itkPSMTrimLabelMapImageFilter.hxx.
|
inline |
Returns the bounding box of the centered and cropped foreground label map. Only valid AFTER the filter has been run.
Definition at line 107 of file itkPSMTrimLabelMapImageFilter.h.
|
protected |
Isolates the largest connected component in an image. Pixels in this component are set to the foreground value and pixels in other components are set to the background value.
Definition at line 137 of file itkPSMTrimLabelMapImageFilter.hxx.
itk::PSMTrimLabelMapImageFilter< TImage >::itkNewMacro | ( | Self | ) |
Method for creation through the object factory.
itk::PSMTrimLabelMapImageFilter< TImage >::itkSetMacro | ( | ForegroundValue | , |
PixelType | |||
) |
Set/Get the foreground value. This is the label of interest in the input images. All other values in the input images will be considered background and relabeled to the background value in the output. You MUST set this value. Default value is 1.
itk::PSMTrimLabelMapImageFilter< TImage >::itkSetMacro | ( | BackgroundValue | , |
PixelType | |||
) |
Get/Set the background value. This is the value to which all non-foreground values will be changed in the output. The default value is zero.
itk::PSMTrimLabelMapImageFilter< TImage >::itkStaticConstMacro | ( | Dimension | , |
unsigned | int, | ||
TImage::ImageDimension | |||
) |
Dimensionality of the domain of the particle system.
itk::PSMTrimLabelMapImageFilter< TImage >::itkTypeMacro | ( | PSMTrimLabelMapImageFilter< TImage > | , |
ImageToImageFilter | |||
) |
Run-time type information (and related methods).