18 #ifndef itkRelabelComponentImageFilter_h
19 #define itkRelabelComponentImageFilter_h
81 template <
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);
192 return this->m_SizeOfObjectsInPixels;
200 const ObjectSizeInPhysicalUnitsContainerType &
205 return this->m_SizeOfObjectsInPhysicalUnits;
214 if (obj > 0 && static_cast<SizeValueType>(obj) <= m_NumberOfObjects)
216 return m_SizeOfObjectsInPixels[obj - 1];
228 if (obj > 0 && static_cast<SizeValueType>(obj) <= m_NumberOfObjects)
230 return m_SizeOfObjectsInPhysicalUnits[obj - 1];
236 #ifdef ITK_USE_CONCEPT_CHECKING
254 GenerateData()
override;
257 ParallelComputeLabels(
const RegionType & inputRegionForThread);
263 GenerateInputRequestedRegion()
override;
267 PrintSelf(std::ostream & os,
Indent indent)
const override;
286 bool m_SortByObjectSize{
true };
288 std::mutex m_Mutex{};
290 using MapType = std::map<LabelType, RelabelComponentObjectType>;
298 #ifndef ITK_MANUAL_INSTANTIATION
299 # include "itkRelabelComponentImageFilter.hxx"