18 #ifndef __itkShapePositionLabelMapFilter_h
19 #define __itkShapePositionLabelMapFilter_h
37 template<
class TImage>
59 itkStaticConstMacro(ImageDimension,
unsigned int,
60 TImage::ImageDimension);
69 #ifdef ITK_USE_CONCEPT_CHECKING
87 void SetAttribute(
const std::string & s )
89 this->SetAttribute( LabelObjectType::GetAttributeFromName( s ) );
98 virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject );
100 template<
class TAttributeAccessor >
101 void TemplatedThreadedProcessLabelObject(
const TAttributeAccessor & accessor,
bool physical,
LabelObjectType * labelObject )
103 typedef typename TAttributeAccessor::AttributeValueType AttributeValueType;
104 AttributeValueType position = accessor( labelObject );
109 typedef double CoordinateType;
112 for(
int i=0; i<ImageDimension; i++ )
120 this->GetOutput()->TransformPhysicalPointToIndex( point, idx );
125 for(
int i=0; i<ImageDimension; i++ )
131 labelObject->Clear();
133 labelObject->AddIndex( idx );
136 void PrintSelf(std::ostream& os,
Indent indent)
const;
142 void operator=(
const Self&);
148 #ifndef ITK_MANUAL_INSTANTIATION
149 #include "itkShapePositionLabelMapFilter.hxx"