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 ) );
97 virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject );
99 template<
class TAttributeAccessor >
100 void TemplatedThreadedProcessLabelObject(
const TAttributeAccessor & accessor,
bool physical,
LabelObjectType * labelObject )
102 typedef typename TAttributeAccessor::AttributeValueType AttributeValueType;
103 AttributeValueType position = accessor( labelObject );
108 typedef double CoordinateType;
111 for(
int i=0; i<ImageDimension; i++ )
119 this->GetOutput()->TransformPhysicalPointToIndex( point, idx );
124 for(
int i=0; i<ImageDimension; i++ )
130 labelObject->Clear();
132 labelObject->AddIndex( idx );
135 void PrintSelf(std::ostream& os,
Indent indent)
const;
141 void operator=(
const Self&);
147 #ifndef ITK_MANUAL_INSTANTIATION
148 #include "itkShapePositionLabelMapFilter.hxx"