KWStyle - itkBloxCoreAtomImage.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkBloxCoreAtomImage.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 __itkBloxCoreAtomImage_h
18 #define __itkBloxCoreAtomImage_h
19
20 #include "vnl/vnl_vector_fixed.h"
21 #include "vnl/vnl_vector.h"
22 #include "itkPoint.h"
23 #include "itkVector.h"
24 #include "itkCovariantVector.h"
25 #include "itkBloxBoundaryPointItem.h"
26 #include "itkBloxBoundaryPointPixel.h"
27 #include "itkBloxBoundaryPointImage.h"
28 #include "itkBloxCoreAtomItem.h"
29 #include "itkBloxCoreAtomPixel.h"
30 #include "itkBloxImage.h"
31
32 namespace itk
33 {
34
35 /** \class BloxCoreAtomImage
36  * \brief N-dimensional image class which handles BloxCoreAtomItems
37  *
38  * A BloxCoreAtomImage stores and processes BloxCoreAtomItem's (in BloxPixel
39  * linked lists). The primary task of BloxCoreAtomImage is finding core atoms
40  * and storing them in the correct blox location.
41  * \ingroup ImageObjects
42  */
43 template <unsigned int dim>
44 class ITK_EXPORT BloxCoreAtomImage :
45 IND **public BloxImage<BloxCoreAtomPixel<dim>, dim>
46 {
47 public:
48   /** Standard class typedefs. */
49   typedef BloxCoreAtomImage  Self;
50
51   /** Dimension of the image.  This constant is used by functions that are
52    * templated over image type (as opposed to being templated over pixel
53    * type and dimension) when they need compile time access to the dimension
54    * of the image. */
55   itkStaticConstMacro(NDimensions, unsigned int, dim);
56
57   typedef BloxImage<BloxCoreAtomPixel<dim>, dim>  Superclass;
58 TDA   typedef SmartPointer<Self>  Pointer;
59 TDA   typedef SmartPointer<const Self>  ConstPointer;
60 TDA   typedef WeakPointer<const Self>  ConstWeakPointer;
61   
62   /** Method for creation through the object factory. */
63   itkNewMacro(Self);
64
65   /** Run-time type information (and related methods). */
66   itkTypeMacro(BloxCoreAtomImage, BloxImage);
67
68   /** The type of boundary point item we process * */
69   typedef BloxBoundaryPointItem<dim> BPItemType;
70
71   /** Pixel typedef support. Used to declare pixel type in filters
72    * or other operations. */
73   typedef BloxCoreAtomPixel<dim > PixelType;
74
75   /** Internal Pixel representation. Used to maintain a uniform API
76    * with Image Adaptors and allow to keep a particular internal
77    * representation of data while showing a different external 
78    * representation. */
79   typedef PixelType InternalPixelType;
80
81   /** Accessor type that convert data between internal and external
82    * representations. */
83   typedef DefaultPixelAccessor< PixelType > AccessorType;
84
85   /** The type of Point used to convert between physical and blox space */
86   typedef Point<double, dim> PositionType;
87
88   /** The vector between two points */
89   typedef typename PositionType::VectorType VectorType;
90
91   /** How we represent gradients. */
92   typedef CovariantVector<double, dim> GradientType;
93
94   /** get macro for m_MedialNodeCount. */
95   itkGetMacro(MedialNodeCount, int);
96
97   typedef std::vector<PixelType*> NodePointerListType;
98 TDA   typedef std::vector<PixelType*> * NodePointerListPointer;
99
100   /** get macro for m_NodePointerList. */
101   itkGetMacro(NodePointerList, NodePointerListPointer);
102
103   /** Convenient typedefs obtained from Superclass.
104    * Note: Unlike "normal" images BloxCoreAtomImages support neither Scalar nor
105    * Vector calls!!! Scalar and vector traits are not defined and do not
106    * make sense for linked lists (at the present time). */
107   typedef typename Superclass::PixelContainer PixelContainer;
108 TDA   typedef typename Superclass::SizeType SizeType;
109 TDA   typedef typename Superclass::IndexType IndexType;
110 TDA   typedef typename IndexType::IndexValueType IndexValueType;
111 TDA   typedef typename Superclass::OffsetType OffsetType;
112 TDA   typedef typename Superclass::RegionType RegionType;
113   
114   /** A pointer to the pixel container. */
115   typedef typename PixelContainer::Pointer PixelContainerPointer;
116
117   /** Do eigenanalysis on all pixels in the image. */
118   void DoEigenanalysis();
119
120   /** Core atom voting routine. */
121   void DoCoreAtomVoting();
122
123
124 IND *// ImageRegionIterator<Self> ReturnIterator();
125
126
127 protected:
128   BloxCoreAtomImage();
129   virtual ~BloxCoreAtomImage();
130   void PrintSelf(std::ostream& os, Indent indent) const;
131
132 private:
133   BloxCoreAtomImage(const Self&); //purposely not implemented
134   void operator=(const Self&); //purposely not implemented
135
136   /** The number of medial nodes found. */
137   int m_MedialNodeCount;
138
139   /** List of pointers to all the medial nodes. */
140   NodePointerListPointer m_NodePointerList;
141
142 };
143
144 // end namespace itk
145
146 #ifndef ITK_MANUAL_INSTANTIATION
147 #include "itkBloxCoreAtomImage.txx"
148 #endif
149
150 #endif
151

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