ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkLevelSetSparseImage.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 
19 #ifndef __itkLevelSetSparseImage_h
20 #define __itkLevelSetSparseImage_h
21 
23 #include "itkObjectFactory.h"
24 
25 #include "itkLabelObject.h"
26 #include "itkLabelMap.h"
27 
28 namespace itk
29 {
39 template< typename TOutput, unsigned int VDimension >
41  public DiscreteLevelSetImage< TOutput, VDimension >
42 {
43 public:
48 
51 
52  itkStaticConstMacro ( Dimension, unsigned int, Superclass::Dimension );
53 
54  typedef typename Superclass::InputType InputType;
60 
62  typedef std::list< LayerIdType > LayerIdListType;
63 
68 
72 
73  typedef std::map< InputType, OutputType,
76  typedef typename LayerType::iterator LayerIterator;
77  typedef typename LayerType::const_iterator LayerConstIterator;
78 
79  typedef std::map< LayerIdType, LayerType > LayerMapType;
80  typedef typename LayerMapType::iterator LayerMapIterator;
81  typedef typename LayerMapType::const_iterator LayerMapConstIterator;
82 
84  virtual LayerIdType Status( const InputType& iP ) const;
85 
87  const LayerType& GetLayer( LayerIdType iVal ) const;
88 
91 
93  void SetLayer( LayerIdType iVal, const LayerType& iLayer );
94 
96  virtual void SetLabelMap( LabelMapType* iLabelMap );
97  itkGetObjectMacro( LabelMap, LabelMapType );
99 
101  virtual void Graft( const DataObject* data );
102 
104  template< class TLabel >
106 
107 protected:
109 
110  virtual ~LevelSetSparseImage();
111 
115 
117  virtual void InitializeLayers() = 0;
118 
119  virtual void InitializeInternalLabelList() = 0;
120 
121  virtual bool IsInsideDomain( const InputType& iP ) const;
122 
124  virtual void Initialize();
125 
127  virtual void CopyInformation( const DataObject* data );
128 
129 private:
130 
131  LevelSetSparseImage( const Self& ); // purposely not implemented
132  void operator = ( const Self& ); // purposely not implemented
133  };
134 }
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkLevelSetSparseImage.hxx"
138 #endif
139 
140 #endif // __itkLevelSetSparseImage_h
141