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

itkLineSpatialObject.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkLineSpatialObject.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/04/07 16:57:25 $
00007   Version:   $Revision: 1.21 $
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 
00018 #ifndef __itkLineSpatialObject_h
00019 #define __itkLineSpatialObject_h
00020 
00021 #include <list>
00022 
00023 #include "itkPointBasedSpatialObject.h"
00024 #include "itkLineSpatialObjectPoint.h"
00025 
00026 namespace itk 
00027 {
00028 
00038 template < unsigned int TDimension = 3 >
00039 class LineSpatialObject 
00040   :public PointBasedSpatialObject<  TDimension >
00041 {
00042 
00043 public:
00044 
00045   typedef LineSpatialObject                           Self;
00046   typedef PointBasedSpatialObject< TDimension >       Superclass;
00047   typedef SmartPointer < Self >                       Pointer;
00048   typedef SmartPointer < const Self >                 ConstPointer;
00049   typedef double                                      ScalarType;
00050   typedef LineSpatialObjectPoint< TDimension >        LinePointType;
00051   typedef std::vector< LinePointType >                PointListType;
00052   typedef typename Superclass::SpatialObjectPointType SpatialObjectPointType;
00053   typedef typename Superclass::PointType              PointType;
00054   typedef typename Superclass::TransformType          TransformType;
00055   typedef typename Superclass::BoundingBoxType        BoundingBoxType;
00056   typedef VectorContainer<unsigned long,PointType>    PointContainerType;
00057   typedef SmartPointer<PointContainerType>            PointContainerPointer;
00058 
00060   itkNewMacro( Self );
00061 
00063   itkTypeMacro( LineSpatialObject, PointBasedSpatialObject );
00064   
00066   PointListType & GetPoints( void );
00067 
00069   void SetPoints( PointListType & newPoints );
00070 
00072   const SpatialObjectPointType* GetPoint(unsigned long id) const {return &(m_Points[id]);}
00073 
00075   SpatialObjectPointType* GetPoint(unsigned long id) {return &(m_Points[id]);}
00076   
00078   unsigned long GetNumberOfPoints(void) const {return m_Points.size();}
00079 
00082   bool IsEvaluableAt( const PointType & point, 
00083                       unsigned int depth=0, char * name=NULL ) const;
00084 
00089   bool ValueAt( const PointType & point, double & value,
00090                 unsigned int depth=0, char * name=NULL ) const;
00091 
00093   bool IsInside( const PointType & point, 
00094                  unsigned int depth, char * name) const;
00095 
00099   virtual bool IsInside( const PointType & point) const;
00100 
00101 
00103   bool ComputeLocalBoundingBox() const;
00104 
00105 protected:
00106 
00107   PointListType   m_Points;
00108 
00109   LineSpatialObject();
00110   virtual ~LineSpatialObject();
00111 
00113   virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00114 };
00115 
00116 } // end namespace itk
00117 
00118 #ifndef ITK_MANUAL_INSTANTIATION 
00119 #include "itkLineSpatialObject.txx" 
00120 #endif 
00121 
00122 #endif // __itkLineSpatialObject_h

Generated at Wed May 24 23:36:23 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000