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

itkSpatialObjectToImageFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkSpatialObjectToImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/12/10 20:04:01 $ 00007 Version: $Revision: 1.8 $ 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 __itkSpatialObjectToImageFilter_h 00018 #define __itkSpatialObjectToImageFilter_h 00019 00020 #include "itkImageSource.h" 00021 #include "itkConceptChecking.h" 00022 00023 namespace itk 00024 { 00025 00034 template <class TInputSpatialObject, class TOutputImage> 00035 class ITK_EXPORT SpatialObjectToImageFilter : public ImageSource<TOutputImage> 00036 { 00037 public: 00039 typedef SpatialObjectToImageFilter Self; 00040 typedef ImageSource<TOutputImage> Superclass; 00041 typedef SmartPointer<Self> Pointer; 00042 typedef SmartPointer<const Self> ConstPointer; 00043 typedef typename TOutputImage::SizeType SizeType; 00044 typedef typename TOutputImage::PointType PointType; 00045 typedef TOutputImage OutputImageType; 00046 typedef typename OutputImageType::Pointer OutputImagePointer; 00047 typedef typename OutputImageType::ValueType ValueType; 00048 typedef typename OutputImageType::SpacingType SpacingType; 00049 00051 itkNewMacro(Self); 00052 00054 itkTypeMacro(SpatialObjectToImageFilter,ImageSource); 00055 00057 typedef typename Superclass::OutputImageRegionType OutputImageRegionType; 00058 00060 typedef TInputSpatialObject InputSpatialObjectType; 00061 typedef typename InputSpatialObjectType::Pointer InputSpatialObjectPointer; 00062 typedef typename InputSpatialObjectType::ConstPointer InputSpatialObjectConstPointer; 00063 typedef typename TInputSpatialObject::ChildrenListType ChildrenListType; 00064 00066 itkStaticConstMacro(ObjectDimension, unsigned int, 00067 InputSpatialObjectType::ObjectDimension); 00068 itkStaticConstMacro(OutputImageDimension, unsigned int, 00069 TOutputImage::ImageDimension); 00070 00072 virtual void SetInput( const InputSpatialObjectType *object); 00073 virtual void SetInput( unsigned int, const InputSpatialObjectType * object); 00074 const InputSpatialObjectType * GetInput(void); 00075 const InputSpatialObjectType * GetInput(unsigned int idx); 00076 00081 virtual void SetSpacing( const SpacingType& spacing); 00082 virtual void SetSpacing( const double spacing[OutputImageDimension] ); 00083 virtual void SetSpacing( const float spacing[OutputImageDimension] ); 00084 virtual const double* GetSpacing() const; 00085 00092 itkSetMacro(InsideValue, ValueType); 00093 itkGetMacro(InsideValue, ValueType); 00094 00101 itkSetMacro(OutsideValue, ValueType); 00102 itkGetMacro(OutsideValue, ValueType); 00103 00108 virtual void SetOrigin( const PointType& origin); 00109 virtual void SetOrigin( const double origin[OutputImageDimension] ); 00110 virtual void SetOrigin( const float origin[OutputImageDimension] ); 00111 virtual const double * GetOrigin() const; 00112 00117 itkSetMacro(ChildrenDepth, unsigned int); 00118 itkGetMacro(ChildrenDepth, unsigned int); 00119 00121 itkSetMacro(Size,SizeType); 00122 itkGetMacro(Size,SizeType); 00123 00124 protected: 00125 SpatialObjectToImageFilter(); 00126 ~SpatialObjectToImageFilter(); 00127 00128 virtual void GenerateOutputInformation(){}; // do nothing 00129 virtual void GenerateData(); 00130 00131 00132 SizeType m_Size; 00133 double m_Spacing[OutputImageDimension]; 00134 double m_Origin[OutputImageDimension]; 00135 unsigned int m_ChildrenDepth; 00136 ValueType m_InsideValue; 00137 ValueType m_OutsideValue; 00138 00139 virtual void PrintSelf(std::ostream& os, Indent indent) const; 00140 00141 private: 00142 SpatialObjectToImageFilter(const Self&); //purposely not implemented 00143 void operator=(const Self&); //purposely not implemented 00144 00145 00146 }; 00147 00148 } // end namespace itk 00149 00150 #ifndef ITK_MANUAL_INSTANTIATION 00151 #include "itkSpatialObjectToImageFilter.txx" 00152 #endif 00153 00154 #endif

Generated at Sun Apr 1 02:45:09 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000