ITK  4.6.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& inputIndex ) const;
85 
87  const LayerType& GetLayer( LayerIdType value ) const;
88 
90  LayerType& GetLayer( LayerIdType value );
91 
93  void SetLayer( LayerIdType value, const LayerType& iLayer );
94 
96  virtual void SetLabelMap( LabelMapType* iLabelMap );
97  itkGetModifiableObjectMacro(LabelMap, LabelMapType );
99 
101  virtual void Graft( const DataObject* data );
102 
104  template< typename 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& inputIndex ) 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
LayerMapType::const_iterator LayerMapConstIterator
LabelObject< TLabel, VDimension >::Pointer GetAsLabelObject()
std::map< InputType, OutputType, Functor::IndexLexicographicCompare< VDimension > > LayerType
void operator=(const Self &)
Superclass::LevelSetDataType LevelSetDataType
const LayerType & GetLayer(LayerIdType value) const
LabelMapType::RegionType RegionType
virtual void InitializeLayers()=0
LabelObject< LayerIdType, VDimension > LabelObjectType
static const unsigned int Dimension
SmartPointer< Self > Pointer
LayerType::iterator LayerIterator
LabelObjectType::Pointer LabelObjectPointer
virtual void Initialize()
LabelMapType::Pointer LabelMapPointer
LabelObjectType::LengthType LabelObjectLengthType
Order Index instances lexicographically.
Definition: itkIndex.h:32
Superclass::OutputType OutputType
Base class for the sparse representation of a level-set function on one Image.
static const unsigned int Dimension
Superclass::LevelSetDataType LevelSetDataType
std::map< LayerIdType, LayerType > LayerMapType
std::list< LayerIdType > LayerIdListType
void SetLayer(LayerIdType value, const LayerType &iLayer)
LineType::LengthType LengthType
virtual void CopyInformation(const DataObject *data)
virtual void SetLabelMap(LabelMapType *iLabelMap)
LabelMap< LabelObjectType > LabelMapType
SmartPointer< const Self > ConstPointer
Superclass::OutputRealType OutputRealType
Superclass::OutputRealType OutputRealType
Abstract class for a level-set function on one Image.
DiscreteLevelSetImage< TOutput, VDimension > Superclass
LayerMapType::iterator LayerMapIterator
Superclass::RegionType RegionType
Definition: itkLabelMap.h:121
Superclass::OutputType OutputType
virtual void InitializeInternalLabelList()=0
Superclass::InputType InputType
LabelObjectType::LineType LabelObjectLineType
typedef::itksysFundamentalType_Int8 int8_t
Definition: itkIntTypes.h:82
Superclass::GradientType GradientType
The base class for the representation of an labeled binary object in an image.
Superclass::GradientType GradientType
virtual bool IsInsideDomain(const InputType &inputIndex) const
LayerType::const_iterator LayerConstIterator
Templated n-dimensional image to store labeled objects.
Definition: itkLabelMap.h:70
virtual void Graft(const DataObject *data)
virtual LayerIdType Status(const InputType &inputIndex) const
Superclass::HessianType HessianType
Superclass::HessianType HessianType
Base class for all data objects in ITK.