Orfeo Toolbox  3.16
itkSparseImage.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkSparseImage.h,v $
5  Language: C++
6  Date: $Date: 2009-03-03 15:09:32 $
7  Version: $Revision: 1.11 $
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 __itkSparseImage_h
18 #define __itkSparseImage_h
19 
20 #include "itkImage.h"
21 #include "itkSparseFieldLayer.h"
22 #include "itkObjectStore.h"
23 
24 namespace itk {
25 
50 template <class TNode, unsigned int VImageDimension=2>
51 class ITK_EXPORT SparseImage : public Image <TNode*, VImageDimension>
52 {
53 public:
55  typedef SparseImage Self;
60 
62  itkNewMacro(Self);
63 
65  itkTypeMacro(SparseImage, Image);
66 
68  itkStaticConstMacro(ImageDimension, unsigned int,
69  Superclass::ImageDimension);
70 
72  typedef TNode NodeType;
73 
75  typedef typename Superclass::IndexType IndexType;
76 
81 
82  typedef typename Superclass::IOPixelType IOPixelType;
83 
87 
90  NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
92 
95  const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
97 
100  NodeType *AddNode(const IndexType &index)
101  {
102  m_NodeList->PushFront(m_NodeStore->Borrow());
103  NodeType *node = m_NodeList->Front();
104  node->m_Index=index;
105  this->SetPixel(index,node);
106  return node;
107  }
108 
111  NodeListType* GetNodeList()
112  {
113  return m_NodeList;
114  }
115 
118  virtual void Initialize();
119 
120 protected:
121  SparseImage();
123 
124  void PrintSelf(std::ostream& os, Indent indent) const;
125 
126 private:
130 
131  SparseImage(const Self&); //purposely not implemented
132  void operator=(const Self&); //purposely not implemented
133 };
134 
135 }// end namespace itk
136 
137 #ifndef ITK_MANUAL_INSTANTIATION
138 #include "itkSparseImage.txx"
139 #endif
140 
141 #endif

Generated at Sun Feb 3 2013 00:08:09 for Orfeo Toolbox with doxygen 1.8.1.1