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

itkSphereMeshSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSphereMeshSource.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-01-27 19:30:16 $
00007   Version:   $Revision: 1.17 $
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 __itkSphereMeshSource_h
00018 #define __itkSphereMeshSource_h
00019 
00020 #include "vnl/vnl_matrix_fixed.h"
00021 #include "itkMesh.h"
00022 #include "itkMeshSource.h"
00023 #include "itkVector.h"
00024 #include "itkTriangleCell.h"
00025 #include "itkDefaultStaticMeshTraits.h"
00026 
00027 namespace itk
00028 {
00029 
00039 template <class TOutputMesh>
00040 class ITK_EXPORT SphereMeshSource : public MeshSource<TOutputMesh>
00041 {
00042 public:
00044   typedef SphereMeshSource          Self;
00045   typedef MeshSource<TOutputMesh>   Superclass;
00046   typedef SmartPointer<Self>        Pointer;
00047   typedef SmartPointer<const Self>  ConstPointer;
00048 
00050   itkNewMacro(Self);  
00051 
00053   itkTypeMacro(SphereMeshSource, MeshSource);
00054 
00056   typedef TOutputMesh                           OutputMeshType;
00057   typedef typename OutputMeshType::MeshTraits   OMeshTraits;
00058   typedef typename OutputMeshType::PointType    OPointType;
00059   typedef typename OMeshTraits::PixelType       OPixelType;  
00060 
00062   typedef typename OutputMeshType::Pointer                OutputMeshPointer;
00063   typedef typename OutputMeshType::CellTraits             CellTraits;
00064   typedef typename OutputMeshType::PointsContainerPointer PointsContainerPointer;
00065   typedef typename OutputMeshType::PointsContainer        PointsContainer;
00066 
00069   typedef CellInterface<OPixelType, CellTraits>   CellInterfaceType;
00070   typedef TriangleCell<CellInterfaceType>         TriCellType;
00071   typedef typename TriCellType::SelfAutoPointer   TriCellAutoPointer;
00072   typedef typename TriCellType::CellAutoPointer   CellAutoPointer;
00073 
00076   itkSetMacro(ResolutionX, unsigned int);
00077   itkSetMacro(ResolutionY, unsigned int);
00079 
00080   itkSetMacro(Center, OPointType);
00081   itkSetMacro(Scale,  OPointType);
00082 
00083   itkSetMacro(Squareness1, double);
00084   itkSetMacro(Squareness2, double);
00085 
00086 protected:
00087   SphereMeshSource();
00088   ~SphereMeshSource() {}
00089   void PrintSelf(std::ostream& os, Indent indent) const;
00090 
00091   void GenerateData();
00092 
00094   OPointType m_Center; 
00095 
00097   unsigned int m_ResolutionX;
00098   unsigned int m_ResolutionY;
00099 
00101   OPointType m_Scale;
00102 
00104   double m_Squareness1;
00105   double m_Squareness2;
00106 
00107 private:
00108   SphereMeshSource(const Self&); //purposely not implemented
00109   void operator=(const Self&); //purposely not implemented
00110 };
00111 
00112 } // end namespace itk
00113 #ifndef ITK_MANUAL_INSTANTIATION
00114 #include "itkSphereMeshSource.txx"
00115 #endif
00116 #endif
00117 

Generated at Thu May 28 11:42:57 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000