ITK  4.9.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& layer );
94 
96  virtual void SetLabelMap( LabelMapType* labelMap );
97  itkGetModifiableObjectMacro(LabelMap, LabelMapType );
99 
101  virtual void Graft( const DataObject* data ) ITK_OVERRIDE;
102 
104  template< typename TLabel >
106 
107 protected:
109  virtual ~LevelSetSparseImage();
110 
114 
116  virtual void InitializeLayers() = 0;
117 
118  virtual void InitializeInternalLabelList() = 0;
119 
120  virtual bool IsInsideDomain( const InputType& inputIndex ) const ITK_OVERRIDE;
121 
123  virtual void Initialize() ITK_OVERRIDE;
124 
126  virtual void CopyInformation( const DataObject* data ) ITK_OVERRIDE;
127 
128 private:
129  LevelSetSparseImage( const Self& ) ITK_DELETE_FUNCTION;
130  void operator = ( const Self& ) ITK_DELETE_FUNCTION;
131 };
132 
133 }
134 
135 #ifndef ITK_MANUAL_INSTANTIATION
136 #include "itkLevelSetSparseImage.hxx"
137 #endif
138 
139 #endif // itkLevelSetSparseImage_h
LayerMapType::const_iterator LayerMapConstIterator
LabelObject< TLabel, VDimension >::Pointer GetAsLabelObject()
std::map< InputType, OutputType, Functor::IndexLexicographicCompare< VDimension > > LayerType
virtual void Initialize() override
Superclass::LevelSetDataType LevelSetDataType
virtual void CopyInformation(const DataObject *data) override
const LayerType & GetLayer(LayerIdType value) const
LabelMapType::RegionType RegionType
virtual void InitializeLayers()=0
LabelObject< LayerIdType, VDimension > LabelObjectType
virtual void SetLabelMap(LabelMapType *labelMap)
static const unsigned int Dimension
SmartPointer< Self > Pointer
void SetLayer(LayerIdType value, const LayerType &layer)
LayerType::iterator LayerIterator
LabelObjectType::Pointer LabelObjectPointer
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
LineType::LengthType LengthType
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
Superclass::GradientType GradientType
The base class for the representation of an labeled binary object in an image.
KWIML_INT_int8_t int8_t
Definition: itkIntTypes.h:82
Superclass::GradientType GradientType
virtual bool IsInsideDomain(const InputType &inputIndex) const override
LayerType::const_iterator LayerConstIterator
Templated n-dimensional image to store labeled objects.
Definition: itkLabelMap.h:70
virtual LayerIdType Status(const InputType &inputIndex) const
Superclass::HessianType HessianType
Superclass::HessianType HessianType
Base class for all data objects in ITK.
virtual void Graft(const DataObject *data) override