18#ifndef itkSpatialObjectToImageFilter_h
19#define itkSpatialObjectToImageFilter_h
40template <
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;
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());
122 virtual const double *
169 virtual const double *
186 itkSetMacro(ChildrenDepth,
unsigned int);
187 itkGetConstMacro(ChildrenDepth,
unsigned int);
197 itkSetMacro(UseObjectValue,
bool);
198 itkGetConstMacro(UseObjectValue,
bool);
199 itkBooleanMacro(UseObjectValue);
214 double m_Spacing[OutputImageDimension]{};
215 double m_Origin[OutputImageDimension]{};
221 unsigned int m_ChildrenDepth{};
226 bool m_UseObjectValue{};
235#ifndef ITK_MANUAL_INSTANTIATION
236# include "itkSpatialObjectToImageFilter.hxx"
Base class for all process objects that output image data.
TOutputImage OutputImageType
typename OutputImageType::Pointer OutputImagePointer
Control indentation during Print() invocation.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for filters that take a SpatialObject as input and produce an image as output....
void GenerateOutputInformation() override
virtual void SetOrigin(const PointType &origin)
typename OutputImageType::DirectionType DirectionType
virtual const PointType & GetOriginPoint() const
void SetReferenceImage(TReferenceImage *refImage)
virtual const double * GetSpacing() const
virtual void SetOrigin(const float *origin)
virtual const SpacingType & GetSpacingVector() const
TInputSpatialObject InputSpatialObjectType
typename OutputImageType::IndexType IndexType
virtual const double * GetOrigin() const
typename TInputSpatialObject::ChildrenListType ChildrenListType
virtual void SetSpacing(const SpacingType &spacing)
virtual void SetOrigin(const double *origin)
virtual void SetInput(unsigned int, const InputSpatialObjectType *object)
~SpatialObjectToImageFilter() override=default
const InputSpatialObjectType * GetInput()
virtual void SetInput(const InputSpatialObjectType *input)
SpatialObjectToImageFilter()
void PrintSelf(std::ostream &os, Indent indent) const override
virtual const DirectionType & GetDirection() const
typename OutputImageType::PointType PointType
virtual void SetSpacing(const double *spacing)
typename OutputImageType::SpacingType SpacingType
typename OutputImageType::ValueType ValueType
void GenerateData() override
virtual void SetSpacing(const float *spacing)
typename InputSpatialObjectType::ConstPointer InputSpatialObjectConstPointer
typename OutputImageType::SizeType SizeType
typename InputSpatialObjectType::Pointer InputSpatialObjectPointer
const InputSpatialObjectType * GetInput(unsigned int idx)
virtual void SetDirection(const DirectionType &dir)
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
ImageBaseType::DirectionType DirectionType
ImageBaseType::IndexType IndexType
ImageBaseType::PointType PointType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Represent a n-dimensional index in a n-dimensional image.
Represent a n-dimensional size (bounds) of a n-dimensional image.