ITK  5.3.0
Insight Toolkit
itkLevelSetEquationChanAndVeseExternalTerm.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 itkLevelSetEquationChanAndVeseExternalTerm_h
20 #define itkLevelSetEquationChanAndVeseExternalTerm_h
21 
23 #include "itkNumericTraits.h"
24 
25 namespace itk
26 {
48 template <typename TInput, // Input image or mesh
49  typename TLevelSetContainer>
50 class ITK_TEMPLATE_EXPORT LevelSetEquationChanAndVeseExternalTerm
51  : public LevelSetEquationChanAndVeseInternalTerm<TInput, TLevelSetContainer>
52 {
53 public:
54  ITK_DISALLOW_COPY_AND_MOVE(LevelSetEquationChanAndVeseExternalTerm);
56 
61 
63  itkNewMacro(Self);
64 
67 
68  using typename Superclass::InputImageType;
69  using typename Superclass::InputImagePointer;
70  using typename Superclass::InputPixelType;
71  using typename Superclass::InputPixelRealType;
72 
73  using typename Superclass::LevelSetContainerType;
74  using typename Superclass::LevelSetContainerPointer;
75  using typename Superclass::LevelSetType;
76  using typename Superclass::LevelSetPointer;
77  using typename Superclass::LevelSetOutputPixelType;
78  using typename Superclass::LevelSetOutputRealType;
79  using typename Superclass::LevelSetInputIndexType;
80  using typename Superclass::LevelSetGradientType;
81  using typename Superclass::LevelSetHessianType;
82  using typename Superclass::LevelSetIdentifierType;
83 
84  using typename Superclass::DomainMapImageFilterType;
85  using typename Superclass::CacheImageType;
86 
87  using DomainIteratorType = typename DomainMapImageFilterType::DomainMapType::const_iterator;
88 
89  using IdListType = typename LevelSetContainerType::IdListType;
90  using IdListIterator = typename LevelSetContainerType::IdListIterator;
91  using IdListConstIterator = typename LevelSetContainerType::IdListConstIterator;
92 
93  using typename Superclass::HeavisideType;
94  using typename Superclass::HeavisideConstPointer;
95 
97  void
98  ComputeProduct(const LevelSetInputIndexType & iP, LevelSetOutputRealType & prod) override;
99 
102  void
103  ComputeProductTerm(const LevelSetInputIndexType & iP, LevelSetOutputRealType & prod) override;
104 
106  void
107  UpdatePixel(const LevelSetInputIndexType & iP,
108  const LevelSetOutputRealType & oldValue,
109  const LevelSetOutputRealType & newValue) override;
110 
111 protected:
113  ~LevelSetEquationChanAndVeseExternalTerm() override = default;
114 
115 private:
116  DomainMapImageFilterType * m_DomainMapImageFilter;
117  CacheImageType * m_CacheImage;
118 };
119 
120 } // namespace itk
121 #ifndef ITK_MANUAL_INSTANTIATION
122 # include "itkLevelSetEquationChanAndVeseExternalTerm.hxx"
123 #endif
124 
125 #endif
itk::LevelSetEquationChanAndVeseExternalTerm::m_DomainMapImageFilter
DomainMapImageFilterType * m_DomainMapImageFilter
Definition: itkLevelSetEquationChanAndVeseExternalTerm.h:116
itk::LevelSetEquationChanAndVeseExternalTerm::DomainIteratorType
typename DomainMapImageFilterType::DomainMapType::const_iterator DomainIteratorType
Definition: itkLevelSetEquationChanAndVeseExternalTerm.h:87
itk::SmartPointer< Self >
itk::LevelSetEquationChanAndVeseExternalTerm::IdListType
typename LevelSetContainerType::IdListType IdListType
Definition: itkLevelSetEquationChanAndVeseExternalTerm.h:89
itk::LevelSetEquationChanAndVeseExternalTerm::IdListIterator
typename LevelSetContainerType::IdListIterator IdListIterator
Definition: itkLevelSetEquationChanAndVeseExternalTerm.h:90
itk::LevelSetEquationChanAndVeseExternalTerm
Class to represent the external energy Chan And Vese term.
Definition: itkLevelSetEquationChanAndVeseExternalTerm.h:50
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::LevelSetEquationTermBase< TInput, TLevelSetContainer >::LevelSetInputIndexType
typename LevelSetContainerType::InputIndexType LevelSetInputIndexType
Definition: itkLevelSetEquationTermBase.h:76
itk::LevelSetEquationChanAndVeseExternalTerm::m_CacheImage
CacheImageType * m_CacheImage
Definition: itkLevelSetEquationChanAndVeseExternalTerm.h:117
itkLevelSetEquationChanAndVeseInternalTerm.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkNumericTraits.h
itk::LevelSetEquationChanAndVeseInternalTerm
Class to represent the internal energy Chan And Vese term.
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:48
itk::LevelSetEquationChanAndVeseExternalTerm::IdListConstIterator
typename LevelSetContainerType::IdListConstIterator IdListConstIterator
Definition: itkLevelSetEquationChanAndVeseExternalTerm.h:91
itk::LevelSetEquationTermBase< TInput, TLevelSetContainer >::LevelSetOutputRealType
typename LevelSetContainerType::OutputRealType LevelSetOutputRealType
Definition: itkLevelSetEquationTermBase.h:75