18 #ifndef sitkLabelStatisticsImageFilter_h
19 #define sitkLabelStatisticsImageFilter_h
65 SITK_RETURN_SELF_TYPE_HEADER
SetUseHistograms (
bool UseHistograms ) { this->m_UseHistograms = UseHistograms;
return *
this; }
68 SITK_RETURN_SELF_TYPE_HEADER
UseHistogramsOn() {
return this->SetUseHistograms(
true); }
69 SITK_RETURN_SELF_TYPE_HEADER
UseHistogramsOff() {
return this->SetUseHistograms(
false); }
162 std::vector<unsigned int>
GetRegion(
int64_t label)
const {
return this->m_pfGetRegion(label); };
170 std::vector<int64_t>
GetLabels()
const {
return this->m_Labels; };
173 std::string
GetName()
const {
return std::string (
"LabelStatisticsImageFilter"); }
176 std::string ToString()
const;
180 void Execute (
const Image & image,
const Image & labelImage );
184 void Execute (
const Image & image,
const Image & labelImage,
bool useHistograms );
196 typedef void (Self::*MemberFunctionType)(
const Image * image,
const Image * labelImage );
199 template <
class TImageType1,
class TImageType2>
void DualExecuteInternal (
const Image * image,
const Image * labelImage );
224 nsstd::function<std::vector<int>(
int64_t)> m_pfGetBoundingBox;
226 nsstd::function<std::vector<unsigned int>(
int64_t)> m_pfGetRegion;
#define SITKBasicFilters_EXPORT
nsstd::function< double(int64_t)> m_pfGetMaximum
double GetVariance(int64_t label) const
double GetMean(int64_t label) const
nsstd::function< uint64_t(int64_t)> m_pfGetCount
Self & SetUseHistograms(bool UseHistograms)
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > >::Type BasicPixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
std::vector< int64_t > GetLabels() const
nsstd::auto_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
std::vector< int64_t > m_Labels
double GetSum(int64_t label) const
nsstd::function< double(int64_t)> m_pfGetMean
Self & UseHistogramsOff()
Given an intensity image and a label map, compute min, max, variance and mean of the pixels associate...
nsstd::function< double(int64_t)> m_pfGetMedian
double GetMaximum(int64_t label) const
bool GetUseHistograms() const
nsstd::function< double(int64_t)> m_pfGetVariance
LabelStatisticsImageFilter Self
uint64_t GetCount(int64_t label) const
double GetMinimum(int64_t label) const
std::vector< unsigned int > GetRegion(int64_t label) const
nsstd::function< double(int64_t)> m_pfGetSigma
The Image class for SimpleITK.
nsstd::function< double(int64_t)> m_pfGetSum
double GetSigma(int64_t label) const
double GetMedian(int64_t label) const
itk::ProcessObject * m_Filter
std::string GetName() const
nsstd::function< double(int64_t)> m_pfGetMinimum
std::vector< int > GetBoundingBox(int64_t label) const
The base interface for SimpleITK filters that take one input image.