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,
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 SetLabelInput(const TLabelImage *input)
Light weight base class for most itk classes.
itksys::hash_map< LabelPixelType, LabelStatistics > MapType
MapSizeType GetNumberOfObjects() const
MapSizeType GetNumberOfLabels() const
virtual const ValidLabelValuesContainerType & GetValidLabelValues() const
std::vector< IndexValueType > BoundingBoxType
TLabelImage::Pointer LabelImagePointer
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
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...
void operator=(const Self &)
LabelStatisticsImageFilter()
TLabelImage::RegionType LabelRegionType
Superclass::MeasurementVectorType MeasurementVectorType
MapType m_LabelStatistics
itk::Statistics::Histogram< RealType > HistogramType
static const unsigned int ImageDimension
~LabelStatisticsImageFilter()
TInputImage::IndexType IndexType
void EnlargeOutputRequestedRegion(DataObject *data)
LabelStatistics(const LabelStatistics &l)
std::vector< MapType > m_LabelStatisticsPerThread
RealType GetVariance(LabelPixelType label) const
void BeforeThreadedGenerateData()
ValidLabelValuesContainerType m_ValidLabelValues
BoundingBoxType m_BoundingBox
std::vector< LabelPixelType > ValidLabelValuesContainerType
DataObject * GetInput(const DataObjectIdentifierType &key)
itksys::hash_map< LabelPixelType, LabelStatistics >::const_iterator MapConstIterator
HistogramPointer GetHistogram(LabelPixelType label) const
void PrintSelf(std::ostream &os, Indent indent) const
TInputImage::PixelType PixelType
TInputImage::Pointer InputImagePointer
SmartPointer< const Self > ConstPointer
void SetHistogramParameters(const int numBins, RealType lowerBound, RealType upperBound)
LabelStatistics & operator=(const LabelStatistics &l)
TInputImage::RegionType RegionType
void ThreadedGenerateData(const RegionType &outputRegionForThread, ThreadIdType threadId)
RegionType GetRegion(LabelPixelType label) const
Base class for filters that take an image as input and produce an image as output.
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.
void AfterThreadedGenerateData()
ImageToImageFilter< TInputImage, TInputImage > Superclass
RealType GetMedian(LabelPixelType label) const
unsigned int ThreadIdType
TLabelImage::IndexType LabelIndexType