ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkLevelSetEquationBinaryMaskTerm.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 itkLevelSetEquationBinaryMaskTerm_h
20 #define itkLevelSetEquationBinaryMaskTerm_h
21 
23 
24 namespace itk
25 {
42 template< typename TInput, // Input image or mesh
43  typename TLevelSetContainer >
44 class ITK_TEMPLATE_EXPORT LevelSetEquationBinaryMaskTerm :
45  public LevelSetEquationTermBase< TInput, TLevelSetContainer >
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetEquationBinaryMaskTerm);
49 
53  using Superclass = LevelSetEquationTermBase< TInput,
54  TLevelSetContainer >;
55 
57  itkNewMacro( Self );
58 
60  itkTypeMacro( LevelSetEquationBinaryMaskTerm,
62 
63  using InputImageType = typename Superclass::InputImageType;
64  using InputImagePointer = typename Superclass::InputImagePointer;
65  using InputPixelType = typename Superclass::InputPixelType;
66  using InputPixelRealType = typename Superclass::InputPixelRealType;
67 
68  using LevelSetContainerType = typename Superclass::LevelSetContainerType;
69  using LevelSetContainerPointer = typename Superclass::LevelSetContainerPointer;
70  using LevelSetType = typename Superclass::LevelSetType;
71  using LevelSetPointer = typename Superclass::LevelSetPointer;
72  using LevelSetOutputPixelType = typename Superclass::LevelSetOutputPixelType;
73  using LevelSetOutputRealType = typename Superclass::LevelSetOutputRealType;
74  using LevelSetInputIndexType = typename Superclass::LevelSetInputIndexType;
75  using LevelSetGradientType = typename Superclass::LevelSetGradientType;
76  using LevelSetHessianType = typename Superclass::LevelSetHessianType;
77  using LevelSetIdentifierType = typename Superclass::LevelSetIdentifierType;
78 
79  using HeavisideType = typename Superclass::HeavisideType;
80  using HeavisideConstPointer = typename Superclass::HeavisideConstPointer;
81 
82  using LevelSetDataType = typename Superclass::LevelSetDataType;
83 
84  using DomainMapImageFilterType = typename Superclass::DomainMapImageFilterType;
85  using CacheImageType = typename Superclass::CacheImageType;
86 
87  itkSetObjectMacro( Mask, InputImageType );
88 
90  void Update() override;
91 
93  void InitializeParameters() override;
94 
96  void Initialize( const LevelSetInputIndexType& iP ) override;
97 
99  void UpdatePixel( const LevelSetInputIndexType& iP,
100  const LevelSetOutputRealType & oldValue,
101  const LevelSetOutputRealType & newValue ) override;
102 
103 protected:
105 
106  ~LevelSetEquationBinaryMaskTerm() override = default;
107 
110  LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ) override;
111 
115  const LevelSetDataType& iData ) override;
116 
117 
119 };
120 
121 }
122 #ifndef ITK_MANUAL_INSTANTIATION
123 #include "itkLevelSetEquationBinaryMaskTerm.hxx"
124 #endif
125 
126 #endif
typename Superclass::LevelSetIdentifierType LevelSetIdentifierType
typename Superclass::LevelSetContainerType LevelSetContainerType
Light weight base class for most itk classes.
typename Superclass::LevelSetPointer LevelSetPointer
typename Superclass::InputImageType InputImageType
typename Superclass::DomainMapImageFilterType DomainMapImageFilterType
typename Superclass::LevelSetContainerPointer LevelSetContainerPointer
typename Superclass::InputPixelType InputPixelType
typename Superclass::LevelSetOutputPixelType LevelSetOutputPixelType
typename Superclass::HeavisideConstPointer HeavisideConstPointer
Abstract class to represents a term in the level-set evolution PDE.
typename Superclass::InputPixelRealType InputPixelRealType
typename Superclass::HeavisideType HeavisideType
typename Superclass::InputImagePointer InputImagePointer
typename Superclass::LevelSetType LevelSetType
typename Superclass::LevelSetHessianType LevelSetHessianType
typename Superclass::LevelSetOutputRealType LevelSetOutputRealType
typename Superclass::LevelSetInputIndexType LevelSetInputIndexType
typename Superclass::LevelSetGradientType LevelSetGradientType
typename Superclass::CacheImageType CacheImageType
typename Superclass::LevelSetDataType LevelSetDataType
Class to represent the mask boundary as a negative energy.