ITK
6.0.0
Insight Toolkit
|
#include <itkObjectByObjectLabelMapFilter.h>
ObjectByObjectLabelMapFilter applies an image pipeline to all the objects of a label map and produce a new label map.
The image pipeline can simply produce a modified object or produce several objects from the single input object. Several options are provided to handle the different cases.
KeepLabel, which defaults to true, makes the filter try to keep as much as possible the labels of the original objects. If an image pipeline produce several objects the label of the input object is assigned to the first output object. The other output objects get another label not present in the input image. When KeepLabel is set to false, all the objects are relabeled in the order of apparition during the filter process.
BinaryInternalOutput can be set to true if the image pipeline produce binary output image. In that case, the objects produced are identified with a connected component algorithm before being reinserted in the output label map. InternalForegroundValue can be set to a specific value which represent the foreground value in the binary image.
PadSize and ConstrainPaddingToImage can be used to extend the size of the image to process passed to the image pipeline. This is useful if the image pipeline is known to be able to enlarge the object. The padding can be constrained to the input label map region by setting ConstrainPaddingToImage to true - this parameter can make a difference for the algorithm with a different behavior on the border of the image. By default, the image is padded by 1 pixel and constrained to the image region.
This implementation was taken from the Insight Journal paper: https://doi.org/10.54294/q6auw4
Definition at line 85 of file itkObjectByObjectLabelMapFilter.h.
Public Types | |
using | ConstPointer = SmartPointer< const Self > |
using | InputFilterType = TInputFilter |
using | InputImageConstPointer = typename InputImageType::ConstPointer |
using | InputImagePixelType = typename InputImageType::PixelType |
using | InputImagePointer = typename InputImageType::Pointer |
using | InputImageRegionType = typename InputImageType::RegionType |
using | InputImageType = TInputImage |
using | InternalIndexType = typename InternalInputImageType::IndexType |
using | InternalInputImageType = TInternalInputImage |
using | InternalInputPixelType = typename InternalInputImageType::PixelType |
using | InternalOffsetType = typename InternalInputImageType::OffsetType |
using | InternalOutputImageType = TInternalOutputImage |
using | InternalOutputPixelType = typename InternalOutputImageType::PixelType |
using | InternalRegionType = typename InternalInputImageType::RegionType |
using | InternalSizeType = typename InternalInputImageType::SizeType |
using | LabelMapType = OutputImageType |
using | LabelObjectType = typename LabelMapType::LabelObjectType |
using | OutputFilterType = TOutputFilter |
using | OutputImageConstPointer = typename OutputImageType::ConstPointer |
using | OutputImagePixelType = typename OutputImageType::PixelType |
using | OutputImagePointer = typename OutputImageType::Pointer |
using | OutputImageRegionType = typename OutputImageType::RegionType |
using | OutputImageType = TOutputImage |
using | Pointer = SmartPointer< Self > |
using | Self = ObjectByObjectLabelMapFilter |
using | SizeType = typename OutputImageType::SizeType |
using | Superclass = LabelMapFilter< TInputImage, TOutputImage > |
Public Types inherited from itk::LabelMapFilter< TInputImage, TInputImage > | |
using | ConstPointer = SmartPointer< const Self > |
using | LabelObjectType = typename InputImageType::LabelObjectType |
using | OutputImageConstPointer = typename OutputImageType::ConstPointer |
using | OutputImagePixelType = typename OutputImageType::PixelType |
using | OutputImagePointer = typename OutputImageType::Pointer |
using | OutputImageRegionType = typename OutputImageType::RegionType |
using | OutputImageType = TInputImage |
using | Pointer = SmartPointer< Self > |
using | Self = LabelMapFilter |
using | Superclass = ImageToImageFilter< TInputImage, TInputImage > |
Public Types inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
using | ConstPointer = SmartPointer< const Self > |
using | InputImageConstPointer = typename InputImageType::ConstPointer |
using | InputImagePixelType = typename InputImageType::PixelType |
using | InputImagePointer = typename InputImageType::Pointer |
using | InputImageRegionType = typename InputImageType::RegionType |
using | InputImageType = TInputImage |
using | Pointer = SmartPointer< Self > |
using | Self = ImageToImageFilter |
using | Superclass = ImageSource< TInputImage > |
Public Types inherited from itk::ImageSource< TInputImage > | |
using | ConstPointer = SmartPointer< const Self > |
using | DataObjectIdentifierType = Superclass::DataObjectIdentifierType |
using | DataObjectPointer = DataObject::Pointer |
using | DataObjectPointerArraySizeType = Superclass::DataObjectPointerArraySizeType |
using | OutputImagePixelType = typename OutputImageType::PixelType |
using | OutputImagePointer = typename OutputImageType::Pointer |
using | OutputImageRegionType = typename OutputImageType::RegionType |
using | OutputImageType = TInputImage |
using | Pointer = SmartPointer< Self > |
using | Self = ImageSource |
using | Superclass = ProcessObject |
Public Types inherited from itk::ProcessObject | |
using | ConstPointer = SmartPointer< const Self > |
using | DataObjectIdentifierType = DataObject::DataObjectIdentifierType |
using | DataObjectPointer = DataObject::Pointer |
using | DataObjectPointerArray = std::vector< DataObjectPointer > |
using | DataObjectPointerArraySizeType = DataObjectPointerArray::size_type |
using | MultiThreaderType = MultiThreaderBase |
using | NameArray = std::vector< DataObjectIdentifierType > |
using | Pointer = SmartPointer< Self > |
using | Self = ProcessObject |
using | Superclass = Object |
Public Types inherited from itk::Object | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = Object |
using | Superclass = LightObject |
Public Types inherited from itk::LightObject | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = LightObject |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::LabelMapFilter< TInputImage, TInputImage > | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
static double | GetGlobalDefaultCoordinateTolerance () |
static double | GetGlobalDefaultDirectionTolerance () |
static void | SetGlobalDefaultCoordinateTolerance (double) |
static void | SetGlobalDefaultDirectionTolerance (double) |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = TOutputImage::ImageDimension |
static constexpr unsigned int | InputImageDimension = TInputImage::ImageDimension |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Static Public Attributes inherited from itk::LabelMapFilter< TInputImage, TInputImage > | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
Static Public Attributes inherited from itk::ImageSource< TInputImage > | |
static constexpr unsigned int | OutputImageDimension |
Private Types | |
using | BI2LMType = itk::BinaryImageToLabelMapFilter< InternalOutputImageType, LabelMapType > |
using | CropType = itk::AutoCropLabelMapFilter< LabelMapType > |
using | LI2LMType = itk::LabelImageToLabelMapFilter< InternalOutputImageType, LabelMapType > |
using | LM2BIType = itk::LabelMapToBinaryImageFilter< LabelMapType, InternalInputImageType > |
using | PadType = itk::PadLabelMapFilter< LabelMapType > |
using | SelectType = itk::LabelSelectionLabelMapFilter< LabelMapType > |
Private Attributes | |
BI2LMType::Pointer | m_BI2LM {} |
bool | m_BinaryInternalOutput {} |
bool | m_ConstrainPaddingToImage {} |
CropType::Pointer | m_Crop {} |
InputFilterType::Pointer | m_InputFilter {} |
InternalOutputPixelType | m_InternalForegroundValue {} |
bool | m_KeepLabels {} |
InputImagePixelType | m_Label {} |
LI2LMType::Pointer | m_LI2LM {} |
LM2BIType::Pointer | m_LM2BI {} |
OutputFilterType::Pointer | m_OutputFilter {} |
PadType::Pointer | m_Pad {} |
SizeType | m_PadSize {} |
SelectType::Pointer | m_Select {} |
Additional Inherited Members | |
Protected Types inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
using | InputToOutputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::OutputImageDimension, Self::InputImageDimension > |
using | OutputToInputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::InputImageDimension, Self::OutputImageDimension > |
Static Protected Member Functions inherited from itk::ImageSource< TInputImage > | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
Static Protected Member Functions inherited from itk::ProcessObject | |
template<typename TSourceObject > | |
static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
static constexpr float | progressFixedToFloat (uint32_t fixed) |
static uint32_t | progressFloatToFixed (float f) |
Protected Attributes inherited from itk::LabelMapFilter< TInputImage, TInputImage > | |
std::mutex | m_LabelObjectContainerLock |
Protected Attributes inherited from itk::ImageSource< TInputImage > | |
bool | m_DynamicMultiThreading |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime {} |
bool | m_Updating {} |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
|
private |
Definition at line 242 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 94 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 230 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InputFilterType = TInputFilter |
Definition at line 111 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InputImageConstPointer = typename InputImageType::ConstPointer |
Definition at line 100 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InputImagePixelType = typename InputImageType::PixelType |
Definition at line 102 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InputImagePointer = typename InputImageType::Pointer |
Definition at line 99 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InputImageRegionType = typename InputImageType::RegionType |
Definition at line 101 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InputImageType = TInputImage |
Some convenient type alias.
Definition at line 97 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InternalIndexType = typename InternalInputImageType::IndexType |
Definition at line 117 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InternalInputImageType = TInternalInputImage |
Definition at line 114 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InternalInputPixelType = typename InternalInputImageType::PixelType |
Definition at line 119 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InternalOffsetType = typename InternalInputImageType::OffsetType |
Definition at line 118 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InternalOutputImageType = TInternalOutputImage |
Definition at line 121 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InternalOutputPixelType = typename InternalOutputImageType::PixelType |
Definition at line 122 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InternalRegionType = typename InternalInputImageType::RegionType |
Definition at line 115 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::InternalSizeType = typename InternalInputImageType::SizeType |
Definition at line 116 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::LabelMapType = OutputImageType |
Definition at line 108 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::LabelObjectType = typename LabelMapType::LabelObjectType |
Definition at line 109 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 239 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 236 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::OutputFilterType = TOutputFilter |
Definition at line 112 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::OutputImageConstPointer = typename OutputImageType::ConstPointer |
Definition at line 104 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::OutputImagePixelType = typename OutputImageType::PixelType |
Definition at line 106 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::OutputImagePointer = typename OutputImageType::Pointer |
Definition at line 103 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::OutputImageRegionType = typename OutputImageType::RegionType |
Definition at line 105 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::OutputImageType = TOutputImage |
Definition at line 98 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 233 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::Pointer = SmartPointer<Self> |
Definition at line 93 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 227 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::Self = ObjectByObjectLabelMapFilter |
Standard class type aliases.
Definition at line 91 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::SizeType = typename OutputImageType::SizeType |
Definition at line 107 of file itkObjectByObjectLabelMapFilter.h.
using itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::Superclass = LabelMapFilter<TInputImage, TOutputImage> |
Definition at line 92 of file itkObjectByObjectLabelMapFilter.h.
|
protected |
|
overrideprotecteddefault |
|
virtual |
Set/Get whether the internal image produced by OutputFilter should be interpreted as a binary image in which the filter have to search for connected components. If set to false, the filter consider the image as a label image. Default is false.
|
virtual |
Padding by PadSize will be constrained to the input image region if ConstrainPaddingToImage is true, and won't be constrained if it is set to false. Default value is true.
|
overrideprotectedvirtual |
This method causes the filter to generate its output.
Reimplemented from itk::ProcessObject.
|
virtual |
Set/Get whether the internal image produced by OutputFilter should be interpreted as a binary image in which the filter have to search for connected components. If set to false, the filter consider the image as a label image. Default is false.
|
virtual |
Padding by PadSize will be constrained to the input image region if ConstrainPaddingToImage is true, and won't be constrained if it is set to false. Default value is true.
|
inline |
Definition at line 138 of file itkObjectByObjectLabelMapFilter.h.
|
inline |
Definition at line 144 of file itkObjectByObjectLabelMapFilter.h.
|
virtual |
The foreground value used internally to represent the object in the image passed to InputFilter, and to read the data produced by OutputFilter, if BinaryInternalOutput is true
|
virtual |
If KeepLabels is set to true, the filter will do its best to reuse the labels of the input objects in the output ones. However, this is possible only if the internal pipeline produce a single object - the other labels will be taken as they come. If KeepLabels is false, no care is made of the input labels, and a new label is produced for all the objects using LabelMap::PushLabelObject().
|
virtual |
The label of the object currently processed by the filter. This is intended to be used with the IterationEvent sent before the processing of each object. It contains a relevant value only during the filter update.
|
virtual |
|
virtual |
|
overridevirtual |
Reimplemented from itk::ProcessObject.
|
virtual |
If PadSize is not zero, the image produce for each object will be padded. The default value is 1 on all the dimensions.
|
virtual |
If KeepLabels is set to true, the filter will do its best to reuse the labels of the input objects in the output ones. However, this is possible only if the internal pipeline produce a single object - the other labels will be taken as they come. If KeepLabels is false, no care is made of the input labels, and a new label is produced for all the objects using LabelMap::PushLabelObject().
|
static |
Standard New method.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::ProcessObject.
|
virtual |
Set/Get whether the internal image produced by OutputFilter should be interpreted as a binary image in which the filter have to search for connected components. If set to false, the filter consider the image as a label image. Default is false.
|
virtual |
Padding by PadSize will be constrained to the input image region if ConstrainPaddingToImage is true, and won't be constrained if it is set to false. Default value is true.
void itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::SetFilter | ( | InputFilterType * | filter | ) |
void itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::SetInputFilter | ( | InputFilterType * | filter | ) |
|
virtual |
The foreground value used internally to represent the object in the image passed to InputFilter, and to read the data produced by OutputFilter, if BinaryInternalOutput is true
|
virtual |
If KeepLabels is set to true, the filter will do its best to reuse the labels of the input objects in the output ones. However, this is possible only if the internal pipeline produce a single object - the other labels will be taken as they come. If KeepLabels is false, no care is made of the input labels, and a new label is produced for all the objects using LabelMap::PushLabelObject().
void itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >::SetOutputFilter | ( | OutputFilterType * | filter | ) |
|
virtual |
If PadSize is not zero, the image produce for each object will be padded. The default value is 1 on all the dimensions.
|
staticconstexpr |
Definition at line 127 of file itkObjectByObjectLabelMapFilter.h.
|
staticconstexpr |
ImageDimension constants
Definition at line 125 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 243 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 221 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 219 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 231 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 245 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 225 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 223 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 249 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 240 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 237 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 246 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 234 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 220 of file itkObjectByObjectLabelMapFilter.h.
|
private |
Definition at line 228 of file itkObjectByObjectLabelMapFilter.h.
|
staticconstexpr |
Definition at line 126 of file itkObjectByObjectLabelMapFilter.h.