ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkScalarRegionBasedLevelSetFunction.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 #ifndef itkScalarRegionBasedLevelSetFunction_h
19 #define itkScalarRegionBasedLevelSetFunction_h
20 
25 
26 namespace itk
27 {
65 template< typename TInputImage, typename TFeatureImage, typename TSharedData >
66 class ITK_TEMPLATE_EXPORT ScalarRegionBasedLevelSetFunction:
67  public RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >
68 {
69 public:
70  ITK_DISALLOW_COPY_AND_ASSIGN(ScalarRegionBasedLevelSetFunction);
71 
76 
77  // itkNewMacro() is not provided since this is an abstract class.
78 
81 
82  static constexpr unsigned int ImageDimension = TFeatureImage::ImageDimension;
83 
94 
96  using FeatureImageConstPointer = typename FeatureImageType::ConstPointer;
100 
106  using GlobalDataStruct = typename Superclass::GlobalDataStruct;
109 
112 
117 
118  using ListPixelType = std::list< unsigned int >;
119  using ListPixelConstIterator = typename ListPixelType::const_iterator;
120  using ListPixelIterator = typename ListPixelType::iterator;
121  using ListImageType =
123 
128  void UpdatePixel(const unsigned int & idx,
130  InputPixelType & newValue,
131  bool & status);
132 
133 protected:
136 
137  ScalarValueType ComputeOverlapParameters(const FeatureIndexType & featIndex,
138  ScalarValueType & product) override;
139 
140  // update the background and foreground constants for pixel updates
141  // Called only when sparse filters are used to prevent iteration through the
142  // entire image
143  virtual void UpdateSharedDataInsideParameters(const unsigned int & iId,
144  const FeaturePixelType & iVal, const ScalarValueType & iChange) = 0;
145 
146  virtual void UpdateSharedDataOutsideParameters(const unsigned int & iId,
147  const FeaturePixelType & iVal, const ScalarValueType & iChange) = 0;
148 };
149 }
150 
151 #ifndef ITK_MANUAL_INSTANTIATION
152 #include "itkScalarRegionBasedLevelSetFunction.hxx"
153 #endif
154 
155 #endif
Light weight base class for most itk classes.
typename Superclass::NeighborhoodType NeighborhoodType
typename Superclass::GlobalDataStruct GlobalDataStruct
typename Superclass::InputImagePointer InputImagePointer
typename Superclass::FeatureOffsetType FeatureOffsetType
typename Superclass::InputSizeValueType InputSizeValueType
A multi-dimensional iterator templated over image type that walks an image region and is specialized ...
typename Superclass::FeaturePixelType FeaturePixelType
A multi-dimensional iterator templated over image type that walks a region of pixels.
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
LevelSet function that computes a speed image based on regional integrals.
typename ListPixelType::const_iterator ListPixelConstIterator
typename Superclass::InputImageConstPointer InputImageConstPointer
typename Superclass::InputIndexValueType InputIndexValueType
typename Superclass::InputRegionType InputRegionType
typename Superclass::FeatureImageType FeatureImageType
typename FeatureImageType::ConstPointer FeatureImageConstPointer
typename Superclass::SharedDataPointer SharedDataPointer
typename Superclass::FeatureIndexType FeatureIndexType
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
Templated n-dimensional image class.
Definition: itkImage.h:75
LevelSet function that computes a speed image based on regional integrals.