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: 2003/11/27 20:16:28 $
00007   Version:   $Revision: 1.2 $
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   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   /* Set the sampling factor of the object. The resulting pointset will have a size
00084    * inversely proportional to the sampling factor.*/
00085   itkSetMacro(SamplingFactor, unsigned int);
00086   itkGetMacro(SamplingFactor, unsigned int);
00087 
00088 protected:
00089   SpatialObjectToPointSetFilter();
00090   ~SpatialObjectToPointSetFilter();
00091 
00092   virtual void GenerateOutputInformation(){}; // do nothing
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&); //purposely not implemented
00101   void operator=(const Self&); //purposely not implemented
00102 
00103   unsigned int m_SamplingFactor; //default 1
00104 
00105 
00106 };
00107 
00108 } // end namespace itk
00109 
00110 #ifndef ITK_MANUAL_INSTANTIATION
00111 #include "itkSpatialObjectToPointSetFilter.txx"
00112 #endif
00113 
00114 #endif
00115 

Generated at Tue Jul 29 22:35:16 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000