IGSTK
igstkTubeObject.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Image Guided Surgery Software Toolkit
4  Module: $RCSfile: igstkTubeObject.h,v $
5  Language: C++
6  Date: $Date: 2008-02-11 01:41:51 $
7  Version: $Revision: 1.7 $
8 
9  Copyright (c) ISC Insight Software Consortium. All rights reserved.
10  See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef __igstkTubeObject_h
19 #define __igstkTubeObject_h
20 
21 #include "igstkMacros.h"
22 #include "igstkSpatialObject.h"
23 #include <itkTubeSpatialObject.h>
24 
25 namespace igstk
26 {
27 
28 namespace Friends
29 {
30 class TubeReaderToTubeSpatialObject;
31 }
32 
42 class TubeObject
43 : public SpatialObject
44 {
45 
46 public:
47 
50 
51 public:
52 
54  typedef itk::TubeSpatialObject<3> TubeSpatialObjectType;
55  typedef TubeSpatialObjectType::TubePointType PointType;
56  typedef TubeSpatialObjectType::PointListType PointListType;
57 
59  void AddPoint(PointType & point);
60 
62  unsigned int GetNumberOfPoints(void) const;
63 
65  const PointType * GetPoint(unsigned int pointId) const;
66 
68  const PointListType GetPoints() const;
69 
71  void Clear( void );
72 
76 
77 protected:
78 
80  TubeObject( void );
81 
83  ~TubeObject( void );
84 
86  virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const;
87 
88 private:
89 
91  void SetTubeSpatialObject( TubeSpatialObjectType * tube );
92 
94  TubeSpatialObjectType::Pointer m_TubeSpatialObject;
95 
96 };
97 
98 } // end namespace igstk
99 
100 #endif // __igstkTubeObject_h
void Clear(void)
Remove all the points in the list.
~TubeObject(void)
Destructor.
#define igstkFriendClassMacro(type)
Create a Macro for friend class.
Definition: igstkMacros.h:137
unsigned int GetNumberOfPoints(void) const
Return the number of points in the tube.
itk::TubeSpatialObject< 3 > TubeSpatialObjectType
Macro with standard traits declarations.
Geometrical abstraction of physical objects present in the surgical scene.
const PointListType GetPoints() const
Return the internal list of points.
#define igstkStandardClassTraitsMacro(classname, superclassname)
Convenience macro for traits of a non-templated class.
Definition: igstkMacros.h:275
defines standard system-wide macros, constants, and other common parameters in the IGSTK Library...
This class represents a Tube object.
This class is intended to make the connection between the TubeReader and its output, the TubeSpatialObject.
TubeSpatialObjectType::TubePointType PointType
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Print object information.
TubeSpatialObjectType::PointListType PointListType
const PointType * GetPoint(unsigned int pointId) const
Return a given point.
TubeObject(void)
The TubeReaderToTubeSpatialObject class is declared as a friend in order to be able to set the input ...
void AddPoint(PointType &point)
Add a point to the tube.