KWStyle - itkCorrespondingMedialNodeClique.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkCorrespondingMedialNodeClique.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:34 $
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 __itkCorrespondingMedialNodeClique_h
18 #define __itkCorrespondingMedialNodeClique_h
19
20 #include "vnl/vnl_matrix.h"
21 #include "vnl/vnl_vector.h"
22 #include "vnl/vnl_vector_fixed.h"
23 #include "vnl/vnl_matrix_fixed.h"
24 #include "itkFixedArray.h"
25 #include "itkBloxCoreAtomPixel.h"
26
27 #include <list>
28
29 namespace itk
30 {
31
32 /**
33  * \class CorrespondingMedialNodeClique
34  * \brief CorrespondingMedialNodeClique is an item stored
35  * in CorrespondingNodeList. Specifically it is stored in 
36  * corresponding node lists and contain pointers to a
37  * set of medial nodes (cliques).
38  *
39  * */
40
41 template <unsigned int VImageDimension, unsigned int VCliqueSize>
42 class CorrespondingMedialNodeClique
43 {
44 public:
45
46   /** Medial node typedef. */
47   typedef BloxCoreAtomPixel<VImageDimension> ItemType;
48
49   /** A vector of pointers to medial nodes. */
50   std::vector<ItemType*> ItemPointer;
51
52   /** Set the pointer to medial nodes. */
53 LEN   void SetNodePointer(ItemType* itemPointer, unsigned int index) {ItemPointer[index] = itemPointer;}
54
55   /** Coordinate of node in clique in physical space. */
56 LEN   typedef FixedArray<vnl_vector_fixed<double, VImageDimension>, VCliqueSize> CoordinateType; 
57  
58   /** Center mass of node clique in physical space. */
59   typedef vnl_vector_fixed<double, VCliqueSize> CenterOfMassType;
60
61   /** Transform matrix. */
62 LEN   typedef vnl_matrix_fixed<double, VImageDimension+1, VImageDimension+1> TransformMatrixType;  
63
64   /** Set and get the coordinates of the nodes in the clique. */
65 LEN   void SetNodeCoordinates(CoordinateType * coordinates) {m_NodeCoordinates = coordinates;}
66   CoordinateType * GetNodeCoordinates() {return m_NodeCoordinates;}
67
68   /** Set and get the center of mass of the clique. */
69 LEN   void SetCenterOfMass(CenterOfMassType * centerOfMass) {m_CenterOfMass = centerOfMass;}
70   CenterOfMassType * GetCenterOfMass() { return m_CenterOfMass;}
71
72   /** Set and get the transform matrix. */
73 LEN   void SetTransformMatrix(TransformMatrixType* transformMatrix) {m_TransformMatrix = transformMatrix;}
74   TransformMatrixType * GetTransformMatrix() {return m_TransformMatrix;}
75
76   /** Set and get the node index. */
77   void SetNodeIndex(int index, int nodeIndex) {m_NodeIndex[index] = nodeIndex;}
78   int GetNodeIndex(int index) {return m_NodeIndex[index];}
79
80   /** Set and get the correspondence value. */
81   void SetCorrespondenceValue(int index, float correspondenceValue) 
82     {m_CorrespondenceValue[index] = correspondenceValue;}
83   float GetCorrespondenceValue(int index) {return m_CorrespondenceValue[index];}
84
85   CorrespondingMedialNodeClique();
86   ~CorrespondingMedialNodeClique();
87
88 private:
89
90   /** Coordinate of the nodes of the clique. */
91   CoordinateType * m_NodeCoordinates;
92   
93   /** Center of mass of the node clique. */
94   CenterOfMassType * m_CenterOfMass;
95   
96   /** Transform matrix. */
97   TransformMatrixType * m_TransformMatrix;
98   
99   /** Index of medial nodes in this clique. */
100   int m_NodeIndex[VCliqueSize];
101
102   /** Store the correspondence value. */
103   float m_CorrespondenceValue[VCliqueSize];
104
105   /** Average distance between nodes of clique in physical space. */
106   double m_AverageDistance;
107 };
108
109
110 // end namespace itk
111
112 #ifndef ITK_MANUAL_INSTANTIATION
113 #include "itkCorrespondingMedialNodeClique.txx"
114 #endif
115
116 #endif
117

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