18#ifndef itkStatisticsLabelMapFilter_h
19#define itkStatisticsLabelMapFilter_h
40template <
typename TImage,
typename TFeatureImage>
42 :
public ShapeLabelMapFilter<TImage, Image<typename TImage::PixelType, TImage::ImageDimension>>
70 static constexpr unsigned int ImageDimension = TImage::ImageDimension;
78#ifdef ITK_USE_CONCEPT_CHECKING
94 this->SetNthInput(1,
const_cast<TFeatureImage *
>(input));
108 this->SetInput(input);
115 this->SetFeatureImage(input);
124 itkSetMacro(ComputeHistogram,
bool);
125 itkGetConstReferenceMacro(ComputeHistogram,
bool);
126 itkBooleanMacro(ComputeHistogram);
134 itkSetMacro(NumberOfBins,
unsigned int);
135 itkGetConstReferenceMacro(NumberOfBins,
unsigned int);
139 static constexpr unsigned int
142 constexpr size_t bitsShift = std::min(8 *
sizeof(
FeatureImagePixelType), 8 *
sizeof(m_NumberOfBins) - 1);
144 return std::is_integral_v<FeatureImagePixelType> &&
sizeof(
FeatureImagePixelType) <= 2 ? 1u << bitsShift : 128u;
163 unsigned int m_NumberOfBins{ GetDefaultNumberOfBins() };
164 bool m_ComputeHistogram{
true };
168#ifndef ITK_MANUAL_INSTANTIATION
169# include "itkStatisticsLabelMapFilter.hxx"
Base class for all data objects in ITK.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
The valuator class for the ShapeLabelObject.
The valuator class for the StatisticsLabelObject.
FeatureImageType * GetFeatureImage()
typename ImageType::LabelObjectType LabelObjectType
void BeforeThreadedGenerateData() override
static constexpr unsigned int GetDefaultNumberOfBins()
typename FeatureImageType::PixelType FeatureImagePixelType
void SetFeatureImage(const TFeatureImage *input)
typename LabelObjectType::MatrixType MatrixType
~StatisticsLabelMapFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
typename FeatureImageType::Pointer FeatureImagePointer
typename ImageType::ConstPointer ImageConstPointer
void ThreadedProcessLabelObject(LabelObjectType *labelObject) override
typename ImageType::IndexType IndexType
typename ImageType::PixelType PixelType
typename FeatureImageType::ConstPointer FeatureImageConstPointer
StatisticsLabelMapFilter()
void SetInput2(const TFeatureImage *input)
typename ImageType::PointType PointType
void SetInput1(TImage *input)
TFeatureImage FeatureImageType
typename ImageType::Pointer ImagePointer
typename LabelObjectType::VectorType VectorType
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
ImageBaseType::IndexType IndexType
ImageBaseType::PointType PointType
ImageBaseType::SpacingType VectorType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....