18 #ifndef itkLabelStatisticsImageFilter_h
19 #define itkLabelStatisticsImageFilter_h
24 #include "itksys/hash_map.hxx"
59 template<
typename TInputImage,
typename TLabelImage >
79 typedef typename TInputImage::SizeType
SizeType;
93 TInputImage::ImageDimension);
136 unsigned int imageDimension = itkGetStaticConstMacro(
ImageDimension);
138 for (
unsigned int i = 0; i < imageDimension * 2; i += 2 )
163 unsigned int imageDimension = itkGetStaticConstMacro(
ImageDimension);
165 for (
unsigned int i = 0; i < imageDimension * 2; i += 2 )
233 typedef itksys::hash_map< LabelPixelType, LabelStatistics >
MapType;
234 typedef typename itksys::hash_map< LabelPixelType, LabelStatistics >::iterator
MapIterator;
235 typedef typename itksys::hash_map< LabelPixelType, LabelStatistics >::const_iterator
MapConstIterator;
242 itkSetMacro(UseHistograms,
bool);
243 itkGetConstMacro(UseHistograms,
bool);
244 itkBooleanMacro(UseHistograms);
256 this->
SetNthInput( 1, const_cast< TLabelImage * >( input ) );
321 #ifdef ITK_USE_CONCEPT_CHECKING
346 outputRegionForThread,
354 void operator=(const
Self &) ITK_DELETE_FUNCTION;
370 #ifndef ITK_MANUAL_INSTANTIATION
371 #include "itkLabelStatisticsImageFilter.hxx"
SimpleFastMutexLock m_Mutex
Critical section locking class that can be allocated on the stack.
itksys::hash_map< LabelPixelType, LabelStatistics >::iterator MapIterator
bool HasLabel(LabelPixelType label) const
RealType GetSigma(LabelPixelType label) const
void BeforeThreadedGenerateData() override
void SetLabelInput(const TLabelImage *input)
Light weight base class for most itk classes.
void AllocateOutputs() override
itksys::hash_map< LabelPixelType, LabelStatistics > MapType
MapSizeType GetNumberOfObjects() const
MapSizeType GetNumberOfLabels() const
virtual const ValidLabelValuesContainerType & GetValidLabelValues() const
std::vector< IndexValueType > BoundingBoxType
TLabelImage::Pointer LabelImagePointer
void PrintSelf(std::ostream &os, Indent indent) const override
NumericTraits< PixelType >::RealType RealType
SmartPointer< Self > Pointer
SimpleDataObjectDecorator< RealType > RealObjectType
TInputImage::SizeType SizeType
TLabelImage::SizeType LabelSizeType
This class stores measurement vectors in the context of n-dimensional histogram.
Given an intensity image and a label map, compute min, max, variance and mean of the pixels associate...
BoundingBoxType GetBoundingBox(LabelPixelType label) const
void AfterThreadedGenerateData() override
RealType GetSum(LabelPixelType label) const
HistogramType::Pointer HistogramPointer
DataObject::Pointer DataObjectPointer
RealType GetMinimum(LabelPixelType label) const
SizeValueType IdentifierType
RealType GetMean(LabelPixelType label) const
HistogramType::SizeType m_NumBins
Statistics stored per label.
TLabelImage::PixelType LabelPixelType
void SetSize(SizeValueType sz)
Decorates any "simple" data type (data types without smart pointers) with a DataObject API...
LabelStatisticsImageFilter()
TLabelImage::RegionType LabelRegionType
Superclass::MeasurementVectorType MeasurementVectorType
MapType m_LabelStatistics
itk::Statistics::Histogram< RealType > HistogramType
static const unsigned int ImageDimension
~LabelStatisticsImageFilter()
TInputImage::IndexType IndexType
LabelStatistics(const LabelStatistics &l)
std::vector< MapType > m_LabelStatisticsPerThread
RealType GetVariance(LabelPixelType label) const
ValidLabelValuesContainerType m_ValidLabelValues
BoundingBoxType m_BoundingBox
std::vector< LabelPixelType > ValidLabelValuesContainerType
unsigned int ThreadIdType
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
itksys::hash_map< LabelPixelType, LabelStatistics >::const_iterator MapConstIterator
HistogramPointer GetHistogram(LabelPixelType label) const
TInputImage::PixelType PixelType
void EnlargeOutputRequestedRegion(DataObject *data) override
TInputImage::Pointer InputImagePointer
SmartPointer< const Self > ConstPointer
void SetHistogramParameters(const int numBins, RealType lowerBound, RealType upperBound)
LabelStatistics & operator=(const LabelStatistics &l)
TInputImage::RegionType RegionType
RegionType GetRegion(LabelPixelType label) const
Base class for filters that take an image as input and produce an image as output.
void ThreadedGenerateData(const RegionType &outputRegionForThread, ThreadIdType threadId) override
LabelStatistics(int size, RealType lowerBound, RealType upperBound)
Control indentation during Print() invocation.
const LabelImageType * GetLabelInput() const
LabelStatisticsImageFilter Self
static T NonpositiveMin()
Define additional traits for native types such as int or float.
virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input)
TLabelImage LabelImageType
#define itkConceptMacro(name, concept)
RealType GetMaximum(LabelPixelType label) const
MapSizeType GetCount(LabelPixelType label) const
HistogramType::Pointer m_Histogram
IdentifierType MapSizeType
Base class for all data objects in ITK.
ImageToImageFilter< TInputImage, TInputImage > Superclass
RealType GetMedian(LabelPixelType label) const
TLabelImage::IndexType LabelIndexType