19#ifndef itkCastSpatialObjectFilter_h
20#define itkCastSpatialObjectFilter_h
53template <
unsigned int ObjectDimension>
76 template <
class OutputSpatialObjectT>
77 std::list<typename OutputSpatialObjectT::Pointer> *
80 typedef OutputSpatialObjectT OutObjectType;
81 typedef std::list<typename OutObjectType::Pointer> OutListType;
83 auto * outputList =
new OutListType;
85 auto * obj =
dynamic_cast<OutObjectType *
>(m_Input.GetPointer());
90 outputList->push_back(sObj);
93 auto it = inputList->begin();
94 while (it != inputList->end())
96 obj =
dynamic_cast<OutObjectType *
>(it->GetPointer());
101 outputList->push_back(sObj);
112 std::list<ArrowPointer> *
115 return this->GetOutput<itk::ArrowSpatialObject<ObjectDimension>>();
119 std::list<BlobPointer> *
122 return this->GetOutput<itk::BlobSpatialObject<ObjectDimension>>();
126 std::list<BoxPointer> *
129 return this->GetOutput<itk::BoxSpatialObject<ObjectDimension>>();
133 std::list<ContourPointer> *
136 return this->GetOutput<itk::ContourSpatialObject<ObjectDimension>>();
140 std::list<EllipsePointer> *
143 return this->GetOutput<itk::EllipseSpatialObject<ObjectDimension>>();
147 std::list<GaussianPointer> *
150 return this->GetOutput<itk::GaussianSpatialObject<ObjectDimension>>();
154 std::list<GroupPointer> *
157 return this->GetOutput<itk::GroupSpatialObject<ObjectDimension>>();
161 std::list<ImageMaskPointer> *
164 return this->GetOutput<itk::ImageMaskSpatialObject<ObjectDimension>>();
168 std::list<ImagePointer> *
171 return this->GetOutput<itk::ImageSpatialObject<ObjectDimension>>();
175 std::list<LandmarkPointer> *
178 return this->GetOutput<itk::LandmarkSpatialObject<ObjectDimension>>();
182 std::list<LinePointer> *
185 return this->GetOutput<itk::LineSpatialObject<ObjectDimension>>();
189 std::list<PointBasedPointer> *
192 return this->GetOutput<itk::PointBasedSpatialObject<ObjectDimension>>();
196 std::list<PolygonPointer> *
199 return this->GetOutput<itk::PolygonSpatialObject<ObjectDimension>>();
203 std::list<SpatialObjectPointer> *
206 return this->GetOutput<itk::SpatialObject<ObjectDimension>>();
210 std::list<SurfacePointer> *
213 return this->GetOutput<itk::SurfaceSpatialObject<ObjectDimension>>();
217 std::list<TubePointer> *
220 return this->GetOutput<itk::TubeSpatialObject<ObjectDimension>>();
238#ifndef ITK_MANUAL_INSTANTIATION
239# include "itkCastSpatialObjectFilter.hxx"
This filter casts one spatialobject to another, when the class hierarchy supports it (e....
typename itk::TubeSpatialObject< ObjectDimension >::Pointer TubePointer
typename itk::EllipseSpatialObject< ObjectDimension >::Pointer EllipsePointer
std::list< GroupPointer > * GetGroups() const
typename itk::SpatialObject< ObjectDimension >::Pointer SpatialObjectPointer
std::list< SpatialObjectPointer > * GetSpatialObjects() const
std::list< ArrowPointer > * GetArrows() const
std::list< LandmarkPointer > * GetLandmarks() const
std::list< GaussianPointer > * GetGaussians() const
typename itk::ImageSpatialObject< ObjectDimension >::Pointer ImagePointer
std::list< typename OutputSpatialObjectT::Pointer > * GetOutput() const
std::list< LinePointer > * GetLines() const
typename itk::ContourSpatialObject< ObjectDimension >::Pointer ContourPointer
typename itk::SurfaceSpatialObject< ObjectDimension >::Pointer SurfacePointer
typename itk::ImageMaskSpatialObject< ObjectDimension >::Pointer ImageMaskPointer
std::list< SurfacePointer > * GetSurfaces() const
typename itk::PolygonSpatialObject< ObjectDimension >::Pointer PolygonPointer
void PrintSelf(std::ostream &os, Indent indent) const override
~CastSpatialObjectFilter() override=default
std::list< PolygonPointer > * GetPolygons() const
std::list< TubePointer > * GetTubes() const
typename itk::BoxSpatialObject< ObjectDimension >::Pointer BoxPointer
std::list< EllipsePointer > * GetEllipses() const
std::list< BoxPointer > * GetBoxes() const
typename itk::LandmarkSpatialObject< ObjectDimension >::Pointer LandmarkPointer
typename itk::LineSpatialObject< ObjectDimension >::Pointer LinePointer
typename itk::GroupSpatialObject< ObjectDimension >::Pointer GroupPointer
typename itk::BlobSpatialObject< ObjectDimension >::Pointer BlobPointer
std::list< ImagePointer > * GetImages() const
std::list< ImageMaskPointer > * GetImageMasks() const
typename itk::GaussianSpatialObject< ObjectDimension >::Pointer GaussianPointer
std::list< ContourPointer > * GetContours() const
typename itk::PointBasedSpatialObject< ObjectDimension >::Pointer PointBasedPointer
CastSpatialObjectFilter()
std::list< BlobPointer > * GetBlobs() const
std::list< PointBasedPointer > * GetPointBased() const
typename itk::ArrowSpatialObject< ObjectDimension >::Pointer ArrowPointer
typename InputSpatialObjectType::ChildrenListType InputChildrenListType
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Base class for most ITK classes.
Implementation of the composite pattern.
std::list< Pointer > ChildrenListType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....