18 #ifndef itkSpatialObjectToImageFilter_h
19 #define itkSpatialObjectToImageFilter_h
40 template <
typename TInputSpatialObject,
typename TOutputImage>
57 using ValueType =
typename OutputImageType::ValueType;
68 using typename Superclass::OutputImageRegionType;
77 static constexpr
unsigned int ObjectDimension = InputSpatialObjectType::ObjectDimension;
79 static constexpr
unsigned int OutputImageDimension = TOutputImage::ImageDimension;
82 using Superclass::SetInput;
93 GetInput(
unsigned int idx);
97 template <
class TReferenceImage>
101 this->SetOrigin(refImage->GetOrigin());
102 this->SetSpacing(refImage->GetSpacing());
103 this->SetDirection(refImage->GetDirection());
104 this->SetIndex(refImage->GetLargestPossibleRegion().GetIndex());
105 this->SetSize(refImage->GetLargestPossibleRegion().GetSize());
114 SetSpacing(
const SpacingType & spacing);
117 SetSpacing(
const double * spacing);
120 SetSpacing(
const float * spacing);
122 virtual const double *
125 virtual const SpacingType &
126 GetSpacingVector()
const;
134 GetDirection()
const;
142 itkSetMacro(InsideValue, ValueType);
143 itkGetConstMacro(InsideValue, ValueType);
152 itkSetMacro(OutsideValue, ValueType);
153 itkGetConstMacro(OutsideValue, ValueType);
164 SetOrigin(
const double * origin);
167 SetOrigin(
const float * origin);
169 virtual const double *
173 GetOriginPoint()
const;
186 itkSetMacro(ChildrenDepth,
unsigned int);
187 itkGetConstMacro(ChildrenDepth,
unsigned int);
197 itkSetMacro(UseObjectValue,
bool);
198 itkGetConstMacro(UseObjectValue,
bool);
199 itkBooleanMacro(UseObjectValue);
210 GenerateData()
override;
214 double m_Spacing[OutputImageDimension]{};
215 double m_Origin[OutputImageDimension]{};
221 unsigned int m_ChildrenDepth{};
226 bool m_UseObjectValue{};
229 PrintSelf(std::ostream & os,
Indent indent)
const override;
235 #ifndef ITK_MANUAL_INSTANTIATION
236 # include "itkSpatialObjectToImageFilter.hxx"