Orfeo Toolbox  4.2
itkSparseImage.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkSparseImage_h
19 #define __itkSparseImage_h
20 
21 #include "itkImage.h"
22 #include "itkSparseFieldLayer.h"
23 #include "itkObjectStore.h"
24 
25 namespace itk
26 {
66 template< typename TNode, unsigned int VImageDimension = 2 >
67 class SparseImage:public Image< TNode *, VImageDimension >
68 {
69 public:
71  typedef SparseImage Self;
76 
78  itkNewMacro(Self);
79 
81  itkTypeMacro(SparseImage, Image);
82 
84  itkStaticConstMacro(ImageDimension, unsigned int,
86 
88  typedef TNode NodeType;
89 
91  typedef typename Superclass::IndexType IndexType;
92 
97 
99 
103 
107  { return NeighborhoodAccessorFunctorType(); }
108 
112  { return NeighborhoodAccessorFunctorType(); }
113 
116  NodeType * AddNode(const IndexType & index)
117  {
118  m_NodeList->PushFront( m_NodeStore->Borrow() );
119  NodeType *node = m_NodeList->Front();
120  node->m_Index = index;
121  this->SetPixel(index, node);
122  return node;
123  }
124 
128  {
129  return m_NodeList;
130  }
131 
134  virtual void Initialize();
135 
136 protected:
137  SparseImage();
139 
140  void PrintSelf(std::ostream & os, Indent indent) const;
141 
142 private:
145 
147 
148  SparseImage(const Self &); //purposely not implemented
149  void operator=(const Self &); //purposely not implemented
150 };
151 } // end namespace itk
152 
153 #ifndef ITK_MANUAL_INSTANTIATION
154 #include "itkSparseImage.hxx"
155 #endif
156 
157 #endif

Generated at Sat Aug 30 2014 15:38:56 for Orfeo Toolbox with doxygen 1.8.3.1