18 #ifndef __itkAreaOpeningImageFilter_h
19 #define __itkAreaOpeningImageFilter_h
59 template<
class TInputImage,
class TOutputImage,
class TAttribute =
typename TInputImage::SpacingType::ValueType >
62 std::greater< typename TInputImage::PixelType > >
68 std::greater< typename TInputImage::PixelType > >
84 typedef typename TInputImage::SizeType
SizeType;
87 itkStaticConstMacro(ImageDimension,
unsigned int,
88 TOutputImage::ImageDimension);
100 itkSetMacro(UseImageSpacing,
bool);
101 itkGetConstReferenceMacro(UseImageSpacing,
bool);
102 itkBooleanMacro(UseImageSpacing);
106 m_UseImageSpacing =
true;
114 this->m_AttributeValuePerPixel = 1;
115 if ( m_UseImageSpacing )
119 for (
unsigned i = 0; i < ImageDimension; i++ )
121 psize *= this->GetInput()->GetSpacing()[i];
123 this->m_AttributeValuePerPixel =
static_cast< AttributeType >( psize );
128 Superclass::GenerateData();
131 void PrintSelf(std::ostream & os,
Indent indent)
const
133 Superclass::PrintSelf(os, indent);
134 os << indent <<
"UseImageSpacing: " << m_UseImageSpacing << std::endl;
140 void operator=(
const Self &);