KWStyle - itkBloxImage.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkBloxImage.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 __itkBloxImage_h
18 #define __itkBloxImage_h
19
20 #include "itkBloxPixel.h"
21 #include "itkImage.h"
22
23 namespace itk
24 {
25
26 /**
27  * \class BloxImage
28  * \brief Templated n-dimensional image class used to store linked lists.
29  *
30  * The itk::BloxImage object is a regular, rectilinear lattice of "blocks" in 
31  * n-dimensional space.  The word "blox" was chosen to bring to mind a set of
32  * "city blocks" in 2D or "building blocks" in 3D.  Being a regular lattice,
33  * itkBloxImage logically derives from itkImage.  In an itkBloxImage, each
34  * pixel represents an isometric space-filling block of geometric space, called
35  * an itkBloxPixel.  Each itk::BloxPixel generally covers many pixels in the
36  * underlying image and is used to store a variable number of image primitives
37  * (such as boundary points) or features (such as medial nodes) gathered within
38 LEN  * that region of geometric space.  To do this, each itkBloxPixel contains a linked list.
39
40 LEN  * The itk::BloxImage object facilitates certain forms of analysis by providing geometric
41  * hashing.  For example, if boundary points are stored in an itk::BloxImage,
42 LEN  * pairs of boundary points that face each other (called "core atoms") can be found
43 LEN  * by searching relatively small regions of geometric space that face each boundary
44 LEN  * point for appropriate mates.  Because an itk::BloxImage is rectilinear in geometric
45 LEN  * space (even though the underlying image may not be) subsequent analysis can be
46  * invariant to rotation and translation.
47
48 LEN  * itk::BloxImage is templated over pixel type; in general, the pixel type should be derived
49 LEN  * from itk::BloxPixel, however this is not enforced and other implementations are
50  * possible.
51  *
52 LEN  * Note that itk::BloxPixel is itself templated over item type (the type of object
53  * stored in the linked list).
54  *
55  * \ingroup ImageObjects
56  *
57  * */
58
59 template <typename TBloxPixelType, unsigned int VImageDimension=3>
60 class ITK_EXPORT BloxImage : public Image<TBloxPixelType, VImageDimension>
61 {
62 public:
63   /** Standard class typedefs. */
64   typedef BloxImage  Self;
65 TDA   typedef Image<TBloxPixelType, VImageDimension>  Superclass;
66 TDA   typedef SmartPointer<Self>  Pointer;
67 TDA   typedef SmartPointer<const Self>  ConstPointer;
68 TDA   typedef WeakPointer<const Self>  ConstWeakPointer;
69   
70   /** Method for creation through the object factory. */
71   itkNewMacro(Self);  
72
73   /** Run-time type information (and related methods). */
74   itkTypeMacro(BloxImage, Image);
75
76   /** Pixel typedef support. Used to declare pixel type in filters
77    * or other operations. */
78   typedef TBloxPixelType PixelType;
79
80   /** Internal Pixel representation. Used to maintain a uniform API
81    * with Image Adaptors and allow to keep a particular internal
82    * representation of data while showing a different external 
83    * representation. */
84   typedef TBloxPixelType InternalPixelType;
85
86   typedef typename Superclass::IOPixelType   IOPixelType;
87
88   /**  Accessor type that convert data between internal and external
89    *  representations. */
90   typedef DefaultPixelAccessor< PixelType > AccessorType;
91
92   /** Dimension of the image.  This enum is used by functions that are
93    * templated over image type (as opposed to being templated over pixel
94    * type and dimension) when they need compile time access to the dimension
95    * of the image. */
96   itkStaticConstMacro(ImageDimension, unsigned int, VImageDimension);
97
98   /** Convenient typedefs obtained from Superclass. */
99   typedef typename Superclass::PixelContainer PixelContainer;
100 TDA   typedef typename Superclass::SizeType SizeType;
101 TDA   typedef typename Superclass::IndexType IndexType;
102 TDA   typedef typename Superclass::OffsetType OffsetType;
103 TDA   typedef typename Superclass::RegionType RegionType;
104   
105   /** A pointer to the pixel container. */
106   typedef typename PixelContainer::Pointer PixelContainerPointer;
107
108   /** Traverse the entire image and empty all linked lists.
109    * This is used in filters prior to generating new data, to
110    * avoid appending the new data onto the old
111    */
112   void EmptyImage();
113
114 protected:
115   BloxImage();
116   virtual ~BloxImage();
117   void PrintSelf(std::ostream& os, Indent indent) const;
118
119 private:
120   BloxImage(const Self&); //purposely not implemented
121   void operator=(const Self&); //purposely not implemented
122
123 };
124
125 // end namespace itk
126
127 #ifndef ITK_MANUAL_INSTANTIATION
128 #include "itkBloxImage.txx"
129 #endif
130
131 #endif
132

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