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 *
131 GetDirection()
const;
139 itkSetMacro(InsideValue, ValueType);
140 itkGetConstMacro(InsideValue, ValueType);
149 itkSetMacro(OutsideValue, ValueType);
150 itkGetConstMacro(OutsideValue, ValueType);
161 SetOrigin(
const double * origin);
164 SetOrigin(
const float * origin);
166 virtual const double *
180 itkSetMacro(ChildrenDepth,
unsigned int);
181 itkGetConstMacro(ChildrenDepth,
unsigned int);
191 itkSetMacro(UseObjectValue,
bool);
192 itkGetConstMacro(UseObjectValue,
bool);
193 itkBooleanMacro(UseObjectValue);
204 GenerateData()
override;
208 double m_Spacing[OutputImageDimension];
209 double m_Origin[OutputImageDimension];
220 PrintSelf(std::ostream & os,
Indent indent)
const override;
226 #ifndef ITK_MANUAL_INSTANTIATION
227 # include "itkSpatialObjectToImageFilter.hxx"