Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkSpatialObjectToPointSetFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSpatialObjectToPointSetFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-25 12:28:11 $
00007   Version:   $Revision: 1.4 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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 
00042   typedef TOutputPointSet                      OutputPointSetType;
00043   typedef typename OutputPointSetType::Pointer OutputPointSetPointer;
00044 
00046   typedef DataObject::Pointer DataObjectPointer;
00047 
00049   itkNewMacro(Self);
00050 
00052   itkTypeMacro(SpatialObjectToPointSetFilter,ProcessObject);
00053 
00055   typedef TInputSpatialObject                            InputSpatialObjectType;
00056   typedef typename InputSpatialObjectType::Pointer       InputSpatialObjectPointer;
00057   typedef typename InputSpatialObjectType::ConstPointer  InputSpatialObjectConstPointer;
00058   typedef typename TInputSpatialObject::ChildrenListType ChildrenListType;
00059 
00060 
00062   itkStaticConstMacro(ObjectDimension, unsigned int,
00063                       InputSpatialObjectType::ObjectDimension);
00064 
00065   typedef itk::SpatialObjectPoint<itkGetStaticConstMacro(ObjectDimension)> PointType;
00066   typedef itk::PointBasedSpatialObject<itkGetStaticConstMacro(ObjectDimension)> PointBasedSpatialObjectType;
00067 
00069   virtual void SetInput( const InputSpatialObjectType *object);
00070   virtual void SetInput( unsigned int, const InputSpatialObjectType * object);
00071   const InputSpatialObjectType * GetInput(void);
00072   const InputSpatialObjectType * GetInput(unsigned int idx);
00074 
00079   itkSetMacro(ChildrenDepth, unsigned int);
00080   itkGetConstMacro(ChildrenDepth, unsigned int);
00082 
00083 
00084   /* Set the sampling factor of the object. The resulting pointset will have a size
00085    * inversely proportional to the sampling factor.*/
00086   itkSetMacro(SamplingFactor, unsigned int);
00087   itkGetConstMacro(SamplingFactor, unsigned int);
00088 
00089 protected:
00090   SpatialObjectToPointSetFilter();
00091   ~SpatialObjectToPointSetFilter();
00092 
00093   virtual void GenerateOutputInformation(){}; // do nothing
00094   virtual void GenerateData();
00095 
00096   unsigned int m_ChildrenDepth;
00097 
00098   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00099 
00100 private:
00101   SpatialObjectToPointSetFilter(const Self&); //purposely not implemented
00102   void operator=(const Self&); //purposely not implemented
00103 
00104   unsigned int m_SamplingFactor; //default 1
00105 
00106 
00107 };
00108 
00109 } // end namespace itk
00110 
00111 #ifndef ITK_MANUAL_INSTANTIATION
00112 #include "itkSpatialObjectToPointSetFilter.txx"
00113 #endif
00114 
00115 #endif
00116 

Generated at Tue Sep 15 05:01:55 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000