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

itkTubeSpatialObject.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTubeSpatialObject.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/02/10 16:00:09 $
00007   Version:   $Revision: 1.22 $
00008 
00009   Copyright (c) 2002 Insight 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 
00018 #ifndef __itkTubeSpatialObject_h
00019 #define __itkTubeSpatialObject_h
00020 
00021 #include <list>
00022 
00023 #include "itkSpatialObject.h"
00024 #include "itkTubeSpatialObjectPoint.h"
00025 
00026 namespace itk 
00027 {
00028 
00041 template < unsigned int TDimension = 3 >
00042 class TubeSpatialObject 
00043 :public SpatialObject< TDimension >
00044 {
00045 
00046 public:
00047 
00048   typedef TubeSpatialObject                            Self;
00049   typedef SpatialObject< TDimension >                  Superclass;
00050   typedef SmartPointer < Self >                        Pointer;
00051   typedef SmartPointer < const Self >                  ConstPointer;
00052   typedef double                                       ScalarType;
00053   typedef itk::TubeSpatialObjectPoint< TDimension >    TubePointType;
00054   typedef std::list < TubePointType >                  PointListType;
00055   typedef PointListType *                              PointListPointer;
00056   typedef typename Superclass::PointType               PointType;
00057   typedef VectorContainer<unsigned long,PointType>     PointContainerType;
00058   typedef SmartPointer<PointContainerType>             PointContainerPointer;
00059   typedef typename Superclass::VectorType              VectorType;
00060 
00062   itkNewMacro( Self );
00063 
00065   itkTypeMacro( Self, Superclass );
00066     
00068   PointListType & GetPoints( void );
00069 
00071   const PointListType & GetPoints( void ) const;
00072 
00074   //void SetPoints( PointListPointer newPoints );
00075   void SetPoints( PointListType & newPoints );
00076 
00078   void Clear(void);
00079 
00081   bool CalcTangent( void );
00082 
00084   bool CalcNormal( void );
00085 
00088   bool IsEvaluableAt( const PointType & point,
00089                       unsigned int depth=0, char * name=NULL) const;
00090 
00095   bool ValueAt( const PointType & point, double & value,
00096                 unsigned int depth=0, char * name=NULL) const;
00097 
00099   bool IsInside( const PointType & point,
00100                  unsigned int depth=0, char * name=NULL) const;
00101 
00103   bool ComputeBoundingBox( unsigned int depth=0, char * name=NULL);
00104 
00107   itkSetMacro(ParentPoint,int);
00108   itkGetMacro(ParentPoint,int);
00109 
00110 protected:
00111 
00112   PointListType     m_Points;
00113   int               m_ParentPoint;
00114 
00115   TubeSpatialObject();
00116   virtual ~TubeSpatialObject();
00117 
00119   virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00120 };
00121 
00122 } // end namespace itk
00123 
00124 #ifndef ITK_MANUAL_INSTANTIATION 
00125   #include "itkTubeSpatialObject.txx" 
00126 #endif 
00127 
00128 #endif // __itkTubeSpatialObject_h

Generated at Fri May 21 01:15:26 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000