18 #ifndef itkSpatialObjectToImageFilter_h
19 #define itkSpatialObjectToImageFilter_h
40 template <
typename TInputSpatialObject,
typename TOutputImage>
56 using ValueType =
typename OutputImageType::ValueType;
76 static constexpr
unsigned int ObjectDimension = InputSpatialObjectType::ObjectDimension;
78 static constexpr
unsigned int OutputImageDimension = TOutputImage::ImageDimension;
81 using Superclass::SetInput;
92 GetInput(
unsigned int idx);
96 template <
class TReferenceImage>
100 this->SetOrigin(refImage->GetOrigin());
101 this->SetSpacing(refImage->GetSpacing());
102 this->SetDirection(refImage->GetDirection());
103 this->SetSize(refImage->GetLargestPossibleRegion().GetSize());
112 SetSpacing(
const SpacingType & spacing);
115 SetSpacing(
const double * spacing);
118 SetSpacing(
const float * spacing);
120 virtual const double *
129 GetDirection()
const;
137 itkSetMacro(InsideValue, ValueType);
138 itkGetConstMacro(InsideValue, ValueType);
147 itkSetMacro(OutsideValue, ValueType);
148 itkGetConstMacro(OutsideValue, ValueType);
159 SetOrigin(
const double * origin);
162 SetOrigin(
const float * origin);
164 virtual const double *
171 itkSetMacro(ChildrenDepth,
unsigned int);
172 itkGetConstMacro(ChildrenDepth,
unsigned int);
182 itkSetMacro(UseObjectValue,
bool);
183 itkGetConstMacro(UseObjectValue,
bool);
184 itkBooleanMacro(UseObjectValue);
195 GenerateData()
override;
198 double m_Spacing[OutputImageDimension];
199 double m_Origin[OutputImageDimension];
210 PrintSelf(std::ostream & os,
Indent indent)
const override;
216 #ifndef ITK_MANUAL_INSTANTIATION
217 # include "itkSpatialObjectToImageFilter.hxx"