IGSTK
/tmp/buildd/igstk-4.4.0/Source/igstkTubeObject.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Image Guided Surgery Software Toolkit
00004   Module:    $RCSfile: igstkTubeObject.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-02-11 01:41:51 $
00007   Version:   $Revision: 1.7 $
00008 
00009   Copyright (c) ISC  Insight Software Consortium.  All rights reserved.
00010   See IGSTKCopyright.txt or http://www.igstk.org/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 __igstkTubeObject_h
00019 #define __igstkTubeObject_h
00020 
00021 #include "igstkMacros.h"
00022 #include "igstkSpatialObject.h"
00023 #include <itkTubeSpatialObject.h>
00024 
00025 namespace igstk
00026 {
00027 
00028 namespace Friends 
00029 {
00030 class TubeReaderToTubeSpatialObject;
00031 }
00032 
00042 class TubeObject 
00043 : public SpatialObject
00044 {
00045 
00046 public:
00047 
00049   igstkStandardClassTraitsMacro( TubeObject, SpatialObject )
00050 
00051 public:
00052 
00054   typedef itk::TubeSpatialObject<3>             TubeSpatialObjectType;
00055   typedef TubeSpatialObjectType::TubePointType  PointType;
00056   typedef TubeSpatialObjectType::PointListType  PointListType;
00057 
00059   void AddPoint(PointType & point);
00060 
00062   unsigned int GetNumberOfPoints(void) const;
00063 
00065   const PointType * GetPoint(unsigned int pointId) const;
00066 
00068   const PointListType GetPoints() const;
00069 
00071   void Clear( void );
00072  
00075   igstkFriendClassMacro( igstk::Friends::TubeReaderToTubeSpatialObject );
00076 
00077 protected:
00078 
00080   TubeObject( void );
00081 
00083   ~TubeObject( void );
00084 
00086   virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const; 
00087 
00088 private:
00089 
00091   void SetTubeSpatialObject( TubeSpatialObjectType * tube );
00092 
00094   TubeSpatialObjectType::Pointer   m_TubeSpatialObject;
00095 
00096 };
00097 
00098 } // end namespace igstk
00099 
00100 #endif // __igstkTubeObject_h