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);
00072 
00077   itkSetMacro(ChildrenDepth, unsigned int);
00078   itkGetMacro(ChildrenDepth, unsigned int);
00079 
00080 
00081   /* Set the sampling factor of the object. The resulting pointset will have a size
00082    * inversely proportional to the sampling factor.*/
00083   itkSetMacro(SamplingFactor, unsigned int);
00084   itkGetMacro(SamplingFactor, unsigned int);
00085 
00086 protected:
00087   SpatialObjectToPointSetFilter();
00088   ~SpatialObjectToPointSetFilter();
00089 
00090   virtual void GenerateOutputInformation(){}; // do nothing
00091   virtual void GenerateData();
00092 
00093   unsigned int m_ChildrenDepth;
00094 
00095   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00096 
00097 private:
00098   SpatialObjectToPointSetFilter(const Self&); //purposely not implemented
00099   void operator=(const Self&); //purposely not implemented
00100 
00101   unsigned int m_SamplingFactor; //default 1
00102 
00103 
00104 };
00105 
00106 } // end namespace itk
00107 
00108 #ifndef ITK_MANUAL_INSTANTIATION
00109 #include "itkSpatialObjectToPointSetFilter.txx"
00110 #endif
00111 
00112 #endif

Generated at Thu May 25 00:06:05 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000