KWStyle - itkBloxCoreAtomItem.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkBloxCoreAtomItem.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:33 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/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 #ifndef __itkBloxCoreAtomItem_h
18 #define __itkBloxCoreAtomItem_h
19
20 #include "vnl/vnl_vector_fixed.h"
21 #include "itkBloxBoundaryPointItem.h"
22 #include "itkBloxItem.h"
23
24 namespace itk
25 {
26
27 /**
28  * \class BloxCoreAtomItem
29  * \brief A core atom object, stored in a BloxPixel
30  *
31  * A core atom is two boundary points whose gradients face each other
32  * They store pointers to the two boundary points and a vnl_vector_fixed
33  * representing the "center" of the core atom (i.e. the midpoint along the
34  * vector between the two boundary points).
35  * \ingroup ImageObjects
36  * */
37
38 template <unsigned int VImageDimension>
39 class ITK_EXPORT BloxCoreAtomItem: public BloxItem
40 {
41 public:
42   /** The point type used to store the position of the CoreAtomItem. */
43   typedef Point<double, VImageDimension> PositionType;
44
45   /** The type of boundary point item we store pointers to. * */
46   typedef BloxBoundaryPointItem<VImageDimension> BPItemType;
47
48   /** Set the position of the first boundary point in physical space. */
49   void SetBoundaryPointA(BPItemType* pointA)
50     { m_BoundaryPointA = pointA; }
51
52   /** Get the position of the first boundary point in physical space. */
53   BPItemType* GetBoundaryPointA()
54     { return m_BoundaryPointA; }
55
56   /** Set the position of the second boundary point in physical space. */
57   void SetBoundaryPointB(BPItemType* pointB)
58     { m_BoundaryPointB = pointB; }
59
60   /** Get the position of the first boundary point in physical space. */
61   BPItemType* GetBoundaryPointB()
62     { return m_BoundaryPointB; }
63
64   /** Set the position of the center of the core atom in physical space. */
65   void SetCenterPosition(PositionType pos)
66     { m_CenterPosition = pos; }
67
68   /** Get the position of the center of the core atom in physical space. */
69   PositionType GetCenterPosition()
70     {return m_CenterPosition; }
71
72   /** Set the diameter of the atom. */
73   void SetDiameter(double diameter)
74     { m_Diameter = diameter; }
75
76   /** Get the diameter. */
77   double GetDiameter()
78     {return m_Diameter; }
79
80   /** Calculate the position of the center of the core atom in physical
81    * space (assumes that the two boundary points are initialized)
82    * Also calculates the core atom's diameter
83    * This function is not often used because center and diameter
84    * are usually initialized via set() functions when the core atom
85    * is created elsewhere. */
86   void CalcCenterAndDiameter();
87   
88   BloxCoreAtomItem();
89   ~BloxCoreAtomItem();
90
91 private:
92   /** The position of the center of the core atom. */
93   PositionType m_CenterPosition;
94
95   /** The diameter of the core atom
96    * This is the magnitude of the vector from boundary points A->B. */
97   double m_Diameter;
98
99   /** The first boundary point that's part of the core atom. */
100   BPItemType* m_BoundaryPointA;
101
102   /** The second boundary point that's part of the core atom. */
103   BPItemType* m_BoundaryPointB;
104
105 };
106
107 // end namespace itk
108
109
110 #ifndef ITK_MANUAL_INSTANTIATION
111 #include "itkBloxCoreAtomItem.txx"
112 #endif
113
114 #endif
115

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:00PM
© Kitware Inc.