18#ifndef itkRelabelComponentImageFilter_h
19#define itkRelabelComponentImageFilter_h
81template <
typename TInputImage,
typename TOutputImage>
96 using typename Superclass::InputImagePointer;
106 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
107 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
157 itkGetConstReferenceMacro(NumberOfObjectsToPrint,
SizeValueType);
177 itkSetMacro(SortByObjectSize,
bool);
178 itkGetConstMacro(SortByObjectSize,
bool);
179 itkBooleanMacro(SortByObjectSize);
188 GetSizeOfObjectsInPixels()
const
192 return this->m_SizeOfObjectsInPixels;
201 GetSizeOfObjectsInPhysicalUnits()
const
205 return this->m_SizeOfObjectsInPhysicalUnits;
212 GetSizeOfObjectInPixels(
LabelType obj)
const
214 if (obj > 0 &&
static_cast<SizeValueType>(obj) <= m_NumberOfObjects)
216 return m_SizeOfObjectsInPixels[obj - 1];
229 GetSizeOfObjectInPhysicalUnits(
LabelType obj)
const
231 if (obj > 0 &&
static_cast<SizeValueType>(obj) <= m_NumberOfObjects)
233 return m_SizeOfObjectsInPhysicalUnits[obj - 1];
242#ifdef ITK_USE_CONCEPT_CHECKING
260 GenerateData()
override;
263 ParallelComputeLabels(
const RegionType & inputRegionForThread);
269 GenerateInputRequestedRegion()
override;
273 PrintSelf(std::ostream & os,
Indent indent)
const override;
292 bool m_SortByObjectSize{
true };
294 std::mutex m_Mutex{};
296 using MapType = std::map<LabelType, RelabelComponentObjectType>;
300 ObjectSizeInPhysicalUnitsContainerType m_SizeOfObjectsInPhysicalUnits{};
304#ifndef ITK_MANUAL_INSTANTIATION
305# include "itkRelabelComponentImageFilter.hxx"
Base class for all process objects that output image data.
TOutputImage OutputImageType
TInputImage InputImageType
Base class for filters that take an image as input and overwrite that image as the output.
Control indentation during Print() invocation.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Relabel the components in an image such that consecutive labels are used.
std::vector< float > ObjectSizeInPhysicalUnitsContainerType
std::map< LabelType, RelabelComponentObjectType > MapType
typename TInputImage::SizeType SizeType
typename TOutputImage::RegionType RegionType
typename TOutputImage::InternalPixelType OutputInternalPixelType
typename TOutputImage::PixelType OutputPixelType
std::vector< ObjectSizeType > ObjectSizeInPixelsContainerType
typename TInputImage::IndexType IndexType
typename TInputImage::InternalPixelType InputInternalPixelType
typename TInputImage::PixelType InputPixelType
SizeValueType ObjectSizeType
#define itkConceptMacro(name, concept)
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
ObjectSizeType m_SizeInPixels