00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkSpatialObjectToPointSetFilter_h
00018 #define __itkSpatialObjectToPointSetFilter_h
00019
00020 #include "itkPointSet.h"
00021 #include "itkMeshSource.h"
00022 #include "itkPointBasedSpatialObject.h"
00023
00024 namespace itk
00025 {
00026
00032 template <class TInputSpatialObject, class TOutputPointSet>
00033 class ITK_EXPORT SpatialObjectToPointSetFilter : public MeshSource<TOutputPointSet>
00034 {
00035 public:
00037 typedef SpatialObjectToPointSetFilter Self;
00038 typedef MeshSource<TOutputPointSet> Superclass;
00039 typedef SmartPointer<Self> Pointer;
00040 typedef SmartPointer<const Self> ConstPointer;
00041 typedef TOutputPointSet OutputPointSetType;
00042 typedef typename OutputPointSetType::Pointer OutputPointSetPointer;
00043
00045 typedef DataObject::Pointer DataObjectPointer;
00046
00048 itkNewMacro(Self);
00049
00051 itkTypeMacro(SpatialObjectToPointSetFilter,ProcessObject);
00052
00054 typedef TInputSpatialObject InputSpatialObjectType;
00055 typedef typename InputSpatialObjectType::Pointer InputSpatialObjectPointer;
00056 typedef typename InputSpatialObjectType::ConstPointer InputSpatialObjectConstPointer;
00057 typedef typename TInputSpatialObject::ChildrenListType ChildrenListType;
00058
00059
00061 itkStaticConstMacro(ObjectDimension, unsigned int,
00062 InputSpatialObjectType::ObjectDimension);
00063
00064 typedef itk::SpatialObjectPoint<itkGetStaticConstMacro(ObjectDimension)> PointType;
00065 typedef itk::PointBasedSpatialObject<itkGetStaticConstMacro(ObjectDimension)> PointBasedSpatialObjectType;
00066
00068 virtual void SetInput( const InputSpatialObjectType *object);
00069 virtual void SetInput( unsigned int, const InputSpatialObjectType * object);
00070 const InputSpatialObjectType * GetInput(void);
00071 const InputSpatialObjectType * GetInput(unsigned int idx);
00073
00078 itkSetMacro(ChildrenDepth, unsigned int);
00079 itkGetMacro(ChildrenDepth, unsigned int);
00081
00082
00083
00084
00085 itkSetMacro(SamplingFactor, unsigned int);
00086 itkGetMacro(SamplingFactor, unsigned int);
00087
00088 protected:
00089 SpatialObjectToPointSetFilter();
00090 ~SpatialObjectToPointSetFilter();
00091
00092 virtual void GenerateOutputInformation(){};
00093 virtual void GenerateData();
00094
00095 unsigned int m_ChildrenDepth;
00096
00097 virtual void PrintSelf(std::ostream& os, Indent indent) const;
00098
00099 private:
00100 SpatialObjectToPointSetFilter(const Self&);
00101 void operator=(const Self&);
00102
00103 unsigned int m_SamplingFactor;
00104
00105
00106 };
00107
00108 }
00109
00110 #ifndef ITK_MANUAL_INSTANTIATION
00111 #include "itkSpatialObjectToPointSetFilter.txx"
00112 #endif
00113
00114 #endif
00115