18#ifndef itkShapePositionLabelMapFilter_h
19#define itkShapePositionLabelMapFilter_h
38template <
typename TImage>
61 static constexpr unsigned int ImageDimension = TImage::ImageDimension;
69#ifdef ITK_USE_CONCEPT_CHECKING
89 this->SetAttribute(LabelObjectType::GetAttributeFromName(s));
100 template <
typename TAttributeAccessor>
104 using AttributeValueType =
typename TAttributeAccessor::AttributeValueType;
105 AttributeValueType position = accessor(labelObject);
110 using CoordinateType = double;
113 for (
unsigned int i = 0; i < ImageDimension; ++i)
121 idx = this->GetOutput()->TransformPhysicalPointToIndex(
point);
126 for (
unsigned int i = 0; i < ImageDimension; ++i)
132 labelObject->Clear();
134 labelObject->AddIndex(idx);
145#ifndef ITK_MANUAL_INSTANTIATION
146# include "itkShapePositionLabelMapFilter.hxx"
Base class for filters that takes an image as input and overwrites that image as the output.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
A templated class holding a geometric point in n-Dimensional space.
Mark a single pixel in the label object which correspond to a position given by an attribute.
typename ImageType::IndexType IndexType
typename ImageType::LabelObjectType LabelObjectType
typename ImageType::ConstPointer ImageConstPointer
typename ImageType::Pointer ImagePointer
void TemplatedThreadedProcessLabelObject(const TAttributeAccessor &accessor, bool physical, LabelObjectType *labelObject)
~ShapePositionLabelMapFilter() override=default
typename ImageType::PixelType PixelType
void SetAttribute(const std::string &s)
ShapePositionLabelMapFilter()
typename LabelObjectType::AttributeType AttributeType
void PrintSelf(std::ostream &os, Indent indent) const override
void ThreadedProcessLabelObject(LabelObjectType *labelObject) override
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
ImageBaseType::IndexType IndexType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents