18 #ifndef itkShapePositionLabelMapFilter_h
19 #define itkShapePositionLabelMapFilter_h
37 template<
typename TImage>
61 static constexpr
unsigned int ImageDimension = TImage::ImageDimension;
70 #ifdef ITK_USE_CONCEPT_CHECKING
89 this->SetAttribute( LabelObjectType::GetAttributeFromName( s ) );
97 void ThreadedProcessLabelObject( LabelObjectType * labelObject )
override;
99 template<
typename TAttributeAccessor >
102 using AttributeValueType =
typename TAttributeAccessor::AttributeValueType;
103 AttributeValueType position = accessor( labelObject );
108 using CoordinateType = double;
111 for(
unsigned int i=0; i<ImageDimension; i++ )
119 this->GetOutput()->TransformPhysicalPointToIndex( point, idx );
124 for(
unsigned int i=0; i<ImageDimension; i++ )
130 labelObject->Clear();
132 labelObject->AddIndex( idx );
135 void PrintSelf(std::ostream& os,
Indent indent)
const override;
142 #ifndef ITK_MANUAL_INSTANTIATION
143 #include "itkShapePositionLabelMapFilter.hxx"
void SetAttribute(const std::string &s)
typename LabelObjectType::AttributeType AttributeType
Light weight base class for most itk classes.
void TemplatedThreadedProcessLabelObject(const TAttributeAccessor &accessor, bool physical, LabelObjectType *labelObject)
AttributeType m_Attribute
typename ImageType::PixelType PixelType
typename ImageType::ConstPointer ImageConstPointer
typename ImageType::Pointer ImagePointer
typename ImageType::LabelObjectType LabelObjectType
ImageBaseType::IndexType IndexType
Mark a single pixel in the label object which correspond to a position given by an attribute...
Base class for filters that takes an image as input and overwrites that image as the output...
signed long IndexValueType
typename ImageType::IndexType IndexType
Control indentation during Print() invocation.
A templated class holding a geometric point in n-Dimensional space.
signed long OffsetValueType