19 #ifndef itkCastSpatialObjectFilter_h
20 #define itkCastSpatialObjectFilter_h
53 template <
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());
88 typename OutObjectType::Pointer sObj = OutObjectType::New();
90 outputList->push_back(sObj);
93 auto it = inputList->begin();
94 while (it != inputList->end())
96 obj = dynamic_cast<OutObjectType *>(it->GetPointer());
99 typename OutObjectType::Pointer sObj = OutObjectType::New();
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>>();
228 PrintSelf(std::ostream & os,
Indent indent)
const override;
238 #ifndef ITK_MANUAL_INSTANTIATION
239 # include "itkCastSpatialObjectFilter.hxx"
242 #endif // End !defined( itkCastSpatialObjectFilter_h )