18 #ifndef itkLabelOverlapMeasuresImageFilter_h
19 #define itkLabelOverlapMeasuresImageFilter_h
24 #include "itksys/hash_map.hxx"
44 template<
typename TLabelImage>
89 m_SourceComplement = 0;
90 m_TargetComplement = 0;
117 typedef itksys::hash_map<LabelType, LabelSetMeasures>
MapType;
122 itkStaticConstMacro( ImageDimension,
unsigned int,
123 TLabelImage::ImageDimension );
127 { this->SetNthInput( 0, const_cast<LabelImageType *>( image ) ); }
131 { this->SetNthInput( 1, const_cast<LabelImageType *>( image ) ); }
135 {
return this->GetInput( 0 ); }
139 {
return this->GetInput( 1 ); }
143 {
return this->m_LabelSetMeasures; }
148 RealType GetTotalOverlap()
const;
151 RealType GetTargetOverlap( LabelType )
const;
154 RealType GetUnionOverlap()
const;
156 {
return this->GetUnionOverlap(); }
161 RealType GetUnionOverlap( LabelType )
const;
163 {
return this->GetUnionOverlap( label ); }
167 RealType GetMeanOverlap()
const;
169 {
return this->GetMeanOverlap(); }
174 RealType GetMeanOverlap( LabelType )
const;
176 {
return this->GetMeanOverlap( label ); }
180 RealType GetVolumeSimilarity()
const;
183 RealType GetVolumeSimilarity( LabelType )
const;
188 RealType GetFalseNegativeError()
const;
191 RealType GetFalseNegativeError( LabelType )
const;
194 RealType GetFalsePositiveError()
const;
197 RealType GetFalsePositiveError( LabelType )
const;
199 #ifdef ITK_USE_CONCEPT_CHECKING
209 void PrintSelf( std::ostream& os,
Indent indent )
const ITK_OVERRIDE;
216 void AllocateOutputs() ITK_OVERRIDE;
218 void BeforeThreadedGenerateData() ITK_OVERRIDE;
220 void AfterThreadedGenerateData() ITK_OVERRIDE;
223 void ThreadedGenerateData( const RegionType&,
ThreadIdType ) ITK_OVERRIDE;
226 void EnlargeOutputRequestedRegion(
DataObject *data ) ITK_OVERRIDE;
231 std::vector<
MapType> m_LabelSetMeasuresPerThread;
237 #ifndef ITK_MANUAL_INSTANTIATION
238 #include "itkLabelOverlapMeasuresImageFilter.hxx"
const LabelImageType * GetTargetImage(void)
TLabelImage LabelImageType
Light weight base class for most itk classes.
const LabelImageType * GetSourceImage(void)
MapType::const_iterator MapConstIterator
unsigned long m_Intersection
LabelOverlapMeasuresImageFilter Self
RealType GetDiceCoefficient() const
TLabelImage::IndexType IndexType
unsigned long m_TargetComplement
~LabelOverlapMeasuresImageFilter() override
NumericTraits< LabelType >::RealType RealType
TLabelImage::RegionType RegionType
RealType GetJaccardCoefficient(LabelType label) const
MapType GetLabelSetMeasures()
TLabelImage::Pointer LabelImagePointer
TLabelImage::SizeType SizeType
RealType GetDiceCoefficient(LabelType label) const
itksys::hash_map< LabelType, LabelSetMeasures > MapType
RealType GetJaccardCoefficient() const
TLabelImage::ConstPointer LabelImageConstPointer
Computes overlap measures between the set same set of labels of pixels of two images. Background is assumed to be 0.
unsigned int ThreadIdType
void SetTargetImage(const LabelImageType *image)
Base class for filters that take an image as input and produce an image as output.
void SetSourceImage(const LabelImageType *image)
Control indentation during Print() invocation.
SmartPointer< const Self > ConstPointer
ImageBaseType::SizeType SizeType
unsigned long m_SourceComplement
TLabelImage::PixelType LabelType
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.
Metrics stored per label.
SmartPointer< Self > Pointer
ImageToImageFilter< TLabelImage, TLabelImage > Superclass
ImageBaseType::IndexType IndexType
MapType::iterator MapIterator
LabelSetMeasures & operator=(const LabelSetMeasures &l)