ITK  5.3.0
Insight Toolkit
itkScalarChanAndVeseLevelSetFunction.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 #ifndef itkScalarChanAndVeseLevelSetFunction_h
19 #define itkScalarChanAndVeseLevelSetFunction_h
20 
24 
25 namespace itk
26 {
75 template <typename TInputImage,
76  typename TFeatureImage,
77  typename TSharedData = ConstrainedRegionBasedLevelSetFunctionSharedData<
78  TInputImage,
79  TFeatureImage,
80  ScalarChanAndVeseLevelSetFunctionData<TInputImage, TFeatureImage>>>
81 class ITK_TEMPLATE_EXPORT ScalarChanAndVeseLevelSetFunction
82  : public ScalarRegionBasedLevelSetFunction<TInputImage, TFeatureImage, TSharedData>
83 {
84 public:
85  ITK_DISALLOW_COPY_AND_MOVE(ScalarChanAndVeseLevelSetFunction);
86 
91 
93  itkNewMacro(Self);
94 
96  itkTypeMacro(ScalarChanAndVeseLevelSetFunction, ScalarLevelSetFunction);
97 
98  static constexpr unsigned int ImageDimension = TFeatureImage::ImageDimension;
99 
100  using InputImageType = TInputImage;
101  using typename Superclass::InputImageConstPointer;
102  using typename Superclass::InputImagePointer;
103  using typename Superclass::InputPixelType;
104  using typename Superclass::InputIndexType;
105  using typename Superclass::InputIndexValueType;
106  using typename Superclass::InputSizeType;
107  using typename Superclass::InputSizeValueType;
108  using typename Superclass::InputRegionType;
109  using typename Superclass::InputPointType;
110 
111  using FeatureImageType = TFeatureImage;
112  using FeatureImageConstPointer = typename FeatureImageType::ConstPointer;
113  using typename Superclass::FeaturePixelType;
114  using typename Superclass::FeatureIndexType;
115  using typename Superclass::FeatureOffsetType;
116 
117  using typename Superclass::ScalarValueType;
118  using typename Superclass::NeighborhoodType;
119  using typename Superclass::FloatOffsetType;
120  using typename Superclass::RadiusType;
121  using typename Superclass::TimeStepType;
122  using typename Superclass::GlobalDataStruct;
123  using typename Superclass::PixelType;
124  using typename Superclass::VectorType;
125 
126  using typename Superclass::SharedDataType;
127  using typename Superclass::SharedDataPointer;
128 
129  using typename Superclass::ImageIteratorType;
130  using typename Superclass::ConstImageIteratorType;
133 
134  using typename Superclass::ListPixelType;
135  using typename Superclass::ListPixelConstIterator;
136  using typename Superclass::ListPixelIterator;
137  using typename Superclass::ListImageType;
138 
139 protected:
141  : Superclass()
142  {}
143  ~ScalarChanAndVeseLevelSetFunction() override = default;
144 
145  void
146  ComputeParameters() override;
147 
148  void
149  UpdateSharedDataParameters() override;
150 
151  ScalarValueType
152  ComputeInternalTerm(const FeaturePixelType & iValue, const FeatureIndexType & iIdx) override;
153 
154  ScalarValueType
155  ComputeExternalTerm(const FeaturePixelType & iValue, const FeatureIndexType & iIdx) override;
156 
157  void
158  UpdateSharedDataInsideParameters(const unsigned int & iId,
159  const FeaturePixelType & iVal,
160  const ScalarValueType & iChange) override;
161 
162  void
163  UpdateSharedDataOutsideParameters(const unsigned int & iId,
164  const FeaturePixelType & iVal,
165  const ScalarValueType & iChange) override;
166 };
167 } // namespace itk
168 
169 #ifndef ITK_MANUAL_INSTANTIATION
170 # include "itkScalarChanAndVeseLevelSetFunction.hxx"
171 #endif
172 
173 #endif
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputIndexType
typename InputImageType::IndexType InputIndexType
Definition: itkRegionBasedLevelSetFunction.h:130
itk::FiniteDifferenceFunction< TInputImage >::RadiusType
typename ConstNeighborhoodIterator< TInputImage >::RadiusType RadiusType
Definition: itkFiniteDifferenceFunction.h:97
itk::ImageRegionConstIteratorWithIndex
A multi-dimensional iterator templated over image type that walks an image region and is specialized ...
Definition: itkImageRegionConstIteratorWithIndex.h:130
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputSizeValueType
typename InputImageType::SizeValueType InputSizeValueType
Definition: itkRegionBasedLevelSetFunction.h:133
itkConstrainedRegionBasedLevelSetFunctionSharedData.h
itk::GTest::TypedefsAndConstructors::Dimension2::VectorType
ImageBaseType::SpacingType VectorType
Definition: itkGTestTypedefsAndConstructors.h:53
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputPointType
typename InputImageType::PointType InputPointType
Definition: itkRegionBasedLevelSetFunction.h:135
itk::Vector
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
itk::ScalarRegionBasedLevelSetFunction::ListPixelIterator
typename ListPixelType::iterator ListPixelIterator
Definition: itkScalarRegionBasedLevelSetFunction.h:120
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputSizeType
typename InputImageType::SizeType InputSizeType
Definition: itkRegionBasedLevelSetFunction.h:132
itk::SmartPointer< Self >
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SharedDataType
TSharedData SharedDataType
Definition: itkRegionBasedLevelSetFunction.h:144
itk::ScalarChanAndVeseLevelSetFunction::FeatureImageType
TFeatureImage FeatureImageType
Definition: itkScalarChanAndVeseLevelSetFunction.h:111
itk::ScalarChanAndVeseLevelSetFunction::FeatureImageConstPointer
typename FeatureImageType::ConstPointer FeatureImageConstPointer
Definition: itkScalarChanAndVeseLevelSetFunction.h:112
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::FeatureOffsetType
typename FeatureImageType::OffsetType FeatureOffsetType
Definition: itkRegionBasedLevelSetFunction.h:142
itk::ScalarRegionBasedLevelSetFunction
LevelSet function that computes a speed image based on regional integrals.
Definition: itkScalarRegionBasedLevelSetFunction.h:66
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::FeaturePixelType
typename FeatureImageType::PixelType FeaturePixelType
Definition: itkRegionBasedLevelSetFunction.h:139
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputPixelType
typename InputImageType::PixelType InputPixelType
Definition: itkRegionBasedLevelSetFunction.h:129
itk::FiniteDifferenceFunction< TInputImage >::PixelType
typename ImageType::PixelType PixelType
Definition: itkFiniteDifferenceFunction.h:83
itk::ScalarChanAndVeseLevelSetFunction::ScalarChanAndVeseLevelSetFunction
ScalarChanAndVeseLevelSetFunction()
Definition: itkScalarChanAndVeseLevelSetFunction.h:140
itk::ScalarRegionBasedLevelSetFunction::ListPixelType
std::list< unsigned int > ListPixelType
Definition: itkScalarRegionBasedLevelSetFunction.h:118
itk::ImageRegionIteratorWithIndex
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
Definition: itkImageRegionIteratorWithIndex.h:73
itk::ScalarChanAndVeseLevelSetFunction
LevelSet function that computes a speed image based on regional integrals of probabilities.
Definition: itkScalarChanAndVeseLevelSetFunction.h:81
itkScalarChanAndVeseLevelSetFunctionData.h
itk::ScalarChanAndVeseLevelSetFunction::InputImageType
TInputImage InputImageType
Definition: itkScalarChanAndVeseLevelSetFunction.h:100
itk::ScalarRegionBasedLevelSetFunction::ListPixelConstIterator
typename ListPixelType::const_iterator ListPixelConstIterator
Definition: itkScalarRegionBasedLevelSetFunction.h:119
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ConstNeighborhoodIterator
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Definition: itkConstNeighborhoodIterator.h:51
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkRegionBasedLevelSetFunction.h:127
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::FeatureIndexType
typename FeatureImageType::IndexType FeatureIndexType
Definition: itkRegionBasedLevelSetFunction.h:140
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputIndexValueType
typename InputImageType::IndexValueType InputIndexValueType
Definition: itkRegionBasedLevelSetFunction.h:131
itk::ImageRegionConstIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
Definition: itkImageRegionConstIterator.h:109
itkScalarRegionBasedLevelSetFunction.h
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ScalarValueType
PixelType ScalarValueType
Definition: itkRegionBasedLevelSetFunction.h:89
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SharedDataPointer
typename SharedDataType::Pointer SharedDataPointer
Definition: itkRegionBasedLevelSetFunction.h:145
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkRegionBasedLevelSetFunction.h:128
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputRegionType
typename InputImageType::RegionType InputRegionType
Definition: itkRegionBasedLevelSetFunction.h:134
itk::FiniteDifferenceFunction< TInputImage >::TimeStepType
double TimeStepType
Definition: itkFiniteDifferenceFunction.h:90