OTB  9.0.0
Orfeo Toolbox
otbMeanShiftSmoothingImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbMeanShiftSmoothingImageFilter_h
22 #define otbMeanShiftSmoothingImageFilter_h
23 
24 #include "otbImage.h"
25 #include "otbVectorImage.h"
26 #include "itkImageToImageFilter.h"
27 #include "itkImageRegionConstIterator.h"
28 #include "itkImageRegionConstIteratorWithIndex.h"
29 #include <algorithm>
30 
31 
32 namespace otb
33 {
34 namespace Meanshift
35 {
36 
37 template <typename T>
38 inline T simple_pow(T const& v, unsigned int p)
39 {
40  T res = 1;
41  for (unsigned int i = 0; i != p; ++i)
42  {
43  res *= v;
44  }
45  return res;
46 }
47 
57 template <class TInputImage, class TOutputJointImage>
59 {
60 public:
61  typedef double RealType;
62 
64  {
65  }
66 
67  typename TOutputJointImage::PixelType operator()(const typename TInputImage::PixelType& inputPixel, const typename TInputImage::IndexType& index) const
68  {
69  typename TOutputJointImage::PixelType jointPixel(m_ImageDimension + m_NumberOfComponentsPerPixel);
70 
71  for (unsigned int comp = 0; comp < m_ImageDimension; comp++)
72  {
73  jointPixel[comp] = index[comp] + m_GlobalShift[comp];
74  }
75  for (unsigned int comp = 0; comp < m_NumberOfComponentsPerPixel; comp++)
76  {
77  jointPixel[m_ImageDimension + comp] = inputPixel[comp];
78  }
79  return jointPixel;
80  }
81 
82  void Initialize(unsigned int _ImageDimension, unsigned int numberOfComponentsPerPixel_, typename TInputImage::IndexType globalShift_)
83  {
84  m_ImageDimension = _ImageDimension;
85  m_NumberOfComponentsPerPixel = numberOfComponentsPerPixel_;
87  m_GlobalShift = globalShift_;
88  }
89 
90  unsigned int GetOutputSize() const
91  {
92  return m_OutputSize;
93  }
94 
95 private:
96  unsigned int m_ImageDimension;
98  unsigned int m_OutputSize;
99  typename TInputImage::IndexType m_GlobalShift;
100 };
101 
103 {
104 public:
105  typedef double RealType;
106 
107  // KernelUniform() {}
108  // ~KernelUniform() {}
109 
111  {
112  return (x <= 1) ? 1.0 : 0.0;
113  }
114 
115  RealType GetRadius(RealType bandwidth) const
116  {
117  return bandwidth;
118  }
119 };
120 
122 {
123 public:
124  typedef double RealType;
125 
126  // KernelGaussian() {}
127  // ~KernelGaussian() {}
128 
130  {
131  return std::exp(-0.5 * x);
132  }
133 
134  RealType GetRadius(RealType bandwidth) const
135  {
136  return 3.0 * bandwidth;
137  }
138 };
139 
147 template <typename TImage>
148 class FastImageRegionConstIterator : public itk::ImageRegionConstIterator<TImage>
149 {
150 public:
153  typedef itk::ImageRegionConstIterator<TImage> Superclass;
154 
155  typedef typename Superclass::ImageType ImageType;
156  typedef typename Superclass::RegionType RegionType;
157 
158  typedef typename TImage::PixelType PixelType;
159  typedef typename TImage::InternalPixelType InternalPixelType;
160 
161  itkTypeMacro(FastImageRegionConstIterator, ImageRegionConstIterator);
162  ;
163 
165  {
166  }
167  FastImageRegionConstIterator(const ImageType* ptr, const RegionType& region) : Superclass(ptr, region)
168  {
169  m_NumberOfComponentsPerPixel = ptr->GetNumberOfComponentsPerPixel();
170  }
171 
173  {
174  return this->m_Buffer + (this->m_Offset * m_NumberOfComponentsPerPixel);
175  }
176 
177 private:
179 };
180 
181 #if 0 // disable bucket mode
182 
194 template<class TImage>
195 class BucketImage
196 {
197 public:
198  typedef TImage ImageType;
199  typedef typename ImageType::ConstPointer ImageConstPointerType;
200  typedef typename ImageType::PixelType PixelType;
201  typedef typename ImageType::InternalPixelType InternalPixelType;
202  typedef typename ImageType::RegionType RegionType;
203  typedef typename ImageType::IndexType IndexType;
204 
205  typedef double RealType;
206 
207  static const unsigned int ImageDimension = ImageType::ImageDimension;
208 
210  typedef std::vector<typename ImageType::SizeType::SizeValueType> BucketImageSizeType;
211  typedef std::vector<typename ImageType::IndexType::IndexValueType> BucketImageIndexType;
212  //typedef std::vector<long> BucketImageIndexType;
213 
214 
216  typedef const typename ImageType::InternalPixelType * ImageDataPointerType;
217  typedef std::vector<ImageDataPointerType> BucketType;
218  typedef std::vector<BucketType> BucketListType;
219 
220  BucketImage()
221  {
222  }
223 
231  BucketImage(ImageConstPointerType image, const RegionType & region, RealType spatialRadius, RealType rangeRadius,
232  unsigned int spectralCoordinate) :
233  m_Image(image), m_Region(region), m_SpatialRadius(spatialRadius), m_RangeRadius(rangeRadius),
234  m_SpectralCoordinate(spectralCoordinate)
235  {
236 
237  // Find max and min of the used spectral band
238  itk::ImageRegionConstIterator<ImageType> inputIt(m_Image, m_Region);
239  inputIt.GoToBegin();
240  InternalPixelType minValue = inputIt.Get()[spectralCoordinate];
241  InternalPixelType maxValue = minValue;
242  ++inputIt;
243  while (!inputIt.IsAtEnd())
244  {
245  const PixelType &p = inputIt.Get();
246  minValue = std::min(minValue, p[m_SpectralCoordinate]);
247  maxValue = std::max(maxValue, p[m_SpectralCoordinate]);
248  ++inputIt;
249  }
250 
251  m_MinValue = minValue;
252  m_MaxValue = maxValue;
253 
254  // Compute bucket image dimensions. Note: empty buckets are at each border
255  // to simplify image border issues
256  m_DimensionVector.resize(ImageDimension + 1); // NB: pays for a 0-innit
257  for (unsigned int dim = 0; dim < ImageDimension; ++dim)
258  {
259  m_DimensionVector[dim] = m_Region.GetSize()[dim] / m_SpatialRadius + 3;
260  }
261  m_DimensionVector[ImageDimension] = (unsigned int) ((maxValue - minValue) / m_RangeRadius) + 3;
262 
263  unsigned int numBuckets = m_DimensionVector[0];
264  for (unsigned int dim = 1; dim <= ImageDimension; ++dim)
265  numBuckets *= m_DimensionVector[dim];
266 
267  m_BucketList.resize(numBuckets);
268  // Build buckets
269  itk::ImageRegionConstIteratorWithIndex<ImageType> it(m_Image, m_Region);
270  it.GoToBegin();
271  // this iterator is only used to get the pixel data pointer
272  FastImageRegionConstIterator<ImageType> fastIt(m_Image, m_Region);
273  fastIt.GoToBegin();
274 
275  while (!it.IsAtEnd())
276  {
277  const IndexType & index = it.GetIndex();
278  const PixelType & pixel = it.Get();
279 
280  // Find which bucket this pixel belongs to
281  const BucketImageIndexType bucketIndex = GetBucketIndex(pixel, index);
282 
283  unsigned int bucketListIndex = BucketIndexToBucketListIndex(bucketIndex);
284  assert(bucketListIndex < numBuckets);
285  m_BucketList[bucketListIndex].push_back(fastIt.GetPixelPointer());
286  ++it;
287  ++fastIt;
288  }
289 
290  // Prepare neighborhood offset vector
291  // BucketImageIndexType zeroOffsetIndex(ImageDimension+1);
292  std::vector<BucketImageIndexType> neighborsIndexList;
293  neighborsIndexList.reserve(simple_pow(3, ImageDimension + 1));
294  neighborsIndexList.resize(1, BucketImageIndexType(ImageDimension + 1)); // zeroOffsetIndex
295  // neighborsIndexList.push_back(zeroOffsetIndex);
296  for (unsigned dim = 0; dim <= ImageDimension; ++dim)
297  {
298  // take all neighbors already in the list and add their direct neighbor
299  // along the current dim
300  const unsigned int curSize = neighborsIndexList.size();
301  for (unsigned int i = 0; i < curSize; ++i)
302  {
303  BucketImageIndexType index = neighborsIndexList[i];
304  index[dim]--;
305  neighborsIndexList.push_back(index);
306  index[dim] += 2;
307  neighborsIndexList.push_back(index);
308  }
309  }
310  // Convert all neighbors n-dimensional indices to bucket list 1D indices
311  const unsigned int neighborhoodOffsetVectorSize = neighborsIndexList.size();
312  m_NeighborhoodOffsetVector.reserve(neighborhoodOffsetVectorSize);
313  for (unsigned int i = 0; i < neighborhoodOffsetVectorSize; ++i)
314  {
315  const int listIndex = BucketIndexToBucketListIndex(neighborsIndexList[i]);
316  m_NeighborhoodOffsetVector.push_back(listIndex);
317  }
318  }
319 
320  ~BucketImage()
321  {
322  }
323 
325  BucketImageIndexType GetBucketIndex(const PixelType & pixel, const IndexType & index)
326  {
327  BucketImageIndexType bucketIndex(ImageDimension + 1);
328  for (unsigned int dim = 0; dim < ImageDimension; ++dim)
329  {
330  bucketIndex[dim] = (index[dim] - m_Region.GetIndex()[dim]) / m_SpatialRadius + 1;
331  }
332  bucketIndex[ImageDimension] = (pixel[m_SpectralCoordinate] - m_MinValue) / m_RangeRadius + 1;
333  return bucketIndex;
334  }
336 
339  int BucketIndexToBucketListIndex(const BucketImageIndexType & bucketIndex) const
340  {
341  int bucketListIndex = bucketIndex[0];
342  for (unsigned int dim = 1; dim <= ImageDimension; ++dim)
343  {
344  bucketListIndex = bucketListIndex * m_DimensionVector[dim] + bucketIndex[dim];
345  }
346  return bucketListIndex;
347  }
349 
351  std::vector<unsigned int> GetNeighborhoodBucketListIndices(int bucketIndex) const
352  {
353  const unsigned int neighborhoodOffsetVectorSize = m_NeighborhoodOffsetVector.size();
354  std::vector<unsigned int> indices(neighborhoodOffsetVectorSize);
356 
357  for (unsigned int i = 0; i < neighborhoodOffsetVectorSize; ++i)
358  {
359  indices[i] = bucketIndex + m_NeighborhoodOffsetVector[i];
360  }
361  return indices;
362  }
363 
364  /* Returns the list of pixels (actually pointer to pixel data) contained in a bucket */
365  const BucketType & GetBucket(unsigned int index) const
366  {
367  return m_BucketList[index];
368  }
369 
370  unsigned int GetNumberOfNeighborBuckets() const
371  {
372  return m_NeighborhoodOffsetVector.size();
373  }
374 
375 private:
377  ImageConstPointerType m_Image;
378 
380  RegionType m_Region;
381 
383  RealType m_SpatialRadius;
384 
386  RealType m_RangeRadius;
387 
390  unsigned int m_SpectralCoordinate;
391 
393  InternalPixelType m_MinValue;
394  InternalPixelType m_MaxValue;
395 
397  BucketListType m_BucketList;
398 
400  BucketImageSizeType m_DimensionVector;
401 
405  std::vector<int> m_NeighborhoodOffsetVector;
406 };
407 #endif
408 
409 } // end namespace Meanshift
410 
465 template <class TInputImage, class TOutputImage, class TKernel = Meanshift::KernelUniform,
466  class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
467 class ITK_EXPORT MeanShiftSmoothingImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
468 {
469 public:
472  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
473  typedef itk::SmartPointer<Self> Pointer;
474  typedef itk::SmartPointer<const Self> ConstPointer;
475  typedef double RealType;
476 
478  itkTypeMacro(MeanShiftSmoothingImageFilter, ImageToImageFilter);
479  ;
480  itkNewMacro(Self);
481  ;
483 
486  typedef TInputImage InputImageType;
487  typedef typename InputImageType::Pointer InputImagePointerType;
488  typedef typename InputImageType::PixelType InputPixelType;
489  typedef typename InputImageType::IndexType InputIndexType;
490  typedef typename InputImageType::SizeType InputSizeType;
491  typedef typename InputImageType::IndexValueType InputIndexValueType;
492  typedef typename InputImageType::PointType PointType;
493  typedef typename InputImageType::RegionType RegionType;
494  typedef typename InputImageType::SizeType SizeType;
495 
496  typedef TOutputImage OutputImageType;
497  typedef typename OutputImageType::Pointer OutputImagePointerType;
498  typedef typename OutputImageType::PixelType OutputPixelType;
499  typedef typename OutputImageType::RegionType OutputRegionType;
500 
501  typedef TOutputIterationImage OutputIterationImageType;
502 
503  typedef unsigned long LabelType;
505 
509 
510  typedef TKernel KernelType;
511 
512  itkStaticConstMacro(ImageDimension, unsigned int, InputImageType::ImageDimension);
513 
514  typedef itk::VariableLengthVector<RealType> RealVector;
517 
521  itkSetMacro(SpatialBandwidth, RealType);
522  itkGetConstReferenceMacro(SpatialBandwidth, RealType);
524 
528  itkSetMacro(RangeBandwidth, RealType);
529  itkGetConstReferenceMacro(RangeBandwidth, RealType);
531 
535  itkSetMacro(RangeBandwidthRamp, RealType);
536  itkGetConstReferenceMacro(RangeBandwidthRamp, RealType);
538 
540  itkGetConstReferenceMacro(MaxIterationNumber, unsigned int);
541  itkSetMacro(MaxIterationNumber, unsigned int);
543 
547  itkGetConstReferenceMacro(Threshold, double);
548  itkSetMacro(Threshold, double);
550 
555  itkSetMacro(ModeSearch, bool);
556  itkGetConstReferenceMacro(ModeSearch, bool);
558 
559 #if 0
560 
562  itkSetMacro(BucketOptimization, bool);
563  itkGetConstReferenceMacro(BucketOptimization, bool);
564 #endif
565 
566 
569  itkSetMacro(GlobalShift, InputIndexType);
570 
572  const OutputSpatialImageType* GetSpatialOutput() const;
573 
575  const OutputImageType* GetRangeOutput() const;
576 
578  const OutputIterationImageType* GetIterationOutput() const;
579 
581  const OutputLabelImageType* GetLabelOutput() const;
582 
584  OutputSpatialImageType* GetSpatialOutput();
585 
587  OutputImageType* GetRangeOutput();
588 
590  OutputIterationImageType* GetIterationOutput();
591 
593  OutputLabelImageType* GetLabelOutput();
594 
595 protected:
600  void GenerateOutputInformation(void) override;
601 
602  void GenerateInputRequestedRegion() override;
603 
604  void BeforeThreadedGenerateData() override;
605 
616  void ThreadedGenerateData(const OutputRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
617 
618  void AfterThreadedGenerateData() override;
619 
621  void AllocateOutputs() override;
622 
625 
627  ~MeanShiftSmoothingImageFilter() override;
628 
630  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
631 
632  virtual void CalculateMeanShiftVector(const typename RealVectorImageType::Pointer inputImagePtr, const RealVector& jointPixel,
633  const OutputRegionType& outputRegion, const RealVector& bandwidth, RealVector& meanShiftVector);
634 #if 0
635  virtual void CalculateMeanShiftVectorBucket(const RealVector& jointPixel, RealVector& meanShiftVector);
636 #endif
637 
638 private:
639  MeanShiftSmoothingImageFilter(const Self&) = delete;
640  void operator=(const Self&) = delete;
641 
644 
647 
650 
653 
655  double m_Threshold;
656 
658  unsigned int m_MaxIterationNumber;
659 
663 
666 
669 
677 
680 
681 #if 0
682 
683  bool m_BucketOptimization;
684 #endif
685 
687  itk::VariableLengthVector<LabelType> m_NumLabels;
688 
692 
693 #if 0
694  typedef Meanshift::BucketImage<RealVectorImageType> BucketImageType;
695  BucketImageType m_BucketImage;
696 #endif
697 
699 };
700 
701 } // end namespace otb
702 
703 #ifndef OTB_MANUAL_INSTANTIATION
705 #endif
706 
707 #endif
otb::MeanShiftSmoothingImageFilter::m_SpatialBandwidth
RealType m_SpatialBandwidth
Definition: otbMeanShiftSmoothingImageFilter.h:649
otb::Meanshift::SpatialRangeJointDomainTransform::m_GlobalShift
TInputImage::IndexType m_GlobalShift
Definition: otbMeanShiftSmoothingImageFilter.h:99
otb::Meanshift::KernelGaussian::operator()
RealType operator()(RealType x) const
Definition: otbMeanShiftSmoothingImageFilter.h:129
otb::MeanShiftSmoothingImageFilter::OutputRegionType
OutputImageType::RegionType OutputRegionType
Definition: otbMeanShiftSmoothingImageFilter.h:499
otb::MeanShiftSmoothingImageFilter::OutputSpatialImageType
otb::VectorImage< RealType, InputImageType::ImageDimension > OutputSpatialImageType
Definition: otbMeanShiftSmoothingImageFilter.h:506
otb::MeanShiftSmoothingImageFilter::m_JointImage
RealVectorImageType::Pointer m_JointImage
Definition: otbMeanShiftSmoothingImageFilter.h:668
otb::Meanshift::FastImageRegionConstIterator::PixelType
TImage::PixelType PixelType
Definition: otbMeanShiftSmoothingImageFilter.h:158
otb::Meanshift::KernelGaussian::GetRadius
RealType GetRadius(RealType bandwidth) const
Definition: otbMeanShiftSmoothingImageFilter.h:134
otb::MeanShiftSmoothingImageFilter::InputSizeType
InputImageType::SizeType InputSizeType
Definition: otbMeanShiftSmoothingImageFilter.h:490
otbVectorImage.h
otb::MeanShiftSmoothingImageFilter::KernelType
TKernel KernelType
Definition: otbMeanShiftSmoothingImageFilter.h:510
otb::Meanshift::SpatialRangeJointDomainTransform::SpatialRangeJointDomainTransform
SpatialRangeJointDomainTransform()
Definition: otbMeanShiftSmoothingImageFilter.h:63
otb::Meanshift::KernelUniform::GetRadius
RealType GetRadius(RealType bandwidth) const
Definition: otbMeanShiftSmoothingImageFilter.h:115
otb::MeanShiftSmoothingImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbMeanShiftSmoothingImageFilter.h:496
otb::MeanShiftSmoothingImageFilter::m_RangeBandwidth
RealType m_RangeBandwidth
Definition: otbMeanShiftSmoothingImageFilter.h:643
otb::MeanShiftSmoothingImageFilter::m_ThreadIdNumberOfBits
unsigned int m_ThreadIdNumberOfBits
Definition: otbMeanShiftSmoothingImageFilter.h:691
otb::MeanShiftSmoothingImageFilter::m_GlobalShift
InputIndexType m_GlobalShift
Definition: otbMeanShiftSmoothingImageFilter.h:698
otb::VectorImage::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorImage.h:53
otbImage.h
otb::Meanshift::FastImageRegionConstIterator::ImageType
Superclass::ImageType ImageType
Definition: otbMeanShiftSmoothingImageFilter.h:155
otb::MeanShiftSmoothingImageFilter::RealVectorImageType
otb::VectorImage< RealType, InputImageType::ImageDimension > RealVectorImageType
Definition: otbMeanShiftSmoothingImageFilter.h:515
otb::MeanShiftSmoothingImageFilter::m_ModeSearch
bool m_ModeSearch
Definition: otbMeanShiftSmoothingImageFilter.h:679
otb::MeanShiftSmoothingImageFilter::PointType
InputImageType::PointType PointType
Definition: otbMeanShiftSmoothingImageFilter.h:492
otb::MeanShiftSmoothingImageFilter::InputIndexValueType
InputImageType::IndexValueType InputIndexValueType
Definition: otbMeanShiftSmoothingImageFilter.h:491
otb::Meanshift::simple_pow
T simple_pow(T const &v, unsigned int p)
Definition: otbMeanShiftSmoothingImageFilter.h:38
otb::MeanShiftSmoothingImageFilter::OutputPixelType
OutputImageType::PixelType OutputPixelType
Definition: otbMeanShiftSmoothingImageFilter.h:498
otb::MeanShiftSmoothingImageFilter::RealVector
itk::VariableLengthVector< RealType > RealVector
Definition: otbMeanShiftSmoothingImageFilter.h:514
otb::Meanshift::SpatialRangeJointDomainTransform::GetOutputSize
unsigned int GetOutputSize() const
Definition: otbMeanShiftSmoothingImageFilter.h:90
otb::MeanShiftSmoothingImageFilter::m_SpatialRadius
InputSizeType m_SpatialRadius
Definition: otbMeanShiftSmoothingImageFilter.h:652
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Image
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:89
otb::MeanShiftSmoothingImageFilter::InputIndexType
InputImageType::IndexType InputIndexType
Definition: otbMeanShiftSmoothingImageFilter.h:489
otb::Meanshift::FastImageRegionConstIterator::FastImageRegionConstIterator
FastImageRegionConstIterator()
Definition: otbMeanShiftSmoothingImageFilter.h:164
otb::Meanshift::KernelGaussian
Definition: otbMeanShiftSmoothingImageFilter.h:121
otb::MeanShiftSmoothingImageFilter::OutputSpatialPixelType
OutputSpatialImageType::PixelType OutputSpatialPixelType
Definition: otbMeanShiftSmoothingImageFilter.h:508
otb::MeanShiftSmoothingImageFilter::ModeTableImageType
otb::Image< unsigned short, InputImageType::ImageDimension > ModeTableImageType
Definition: otbMeanShiftSmoothingImageFilter.h:516
otb::Meanshift::FastImageRegionConstIterator::Superclass
itk::ImageRegionConstIterator< TImage > Superclass
Definition: otbMeanShiftSmoothingImageFilter.h:153
otb::Meanshift::KernelGaussian::RealType
double RealType
Definition: otbMeanShiftSmoothingImageFilter.h:124
otb::MeanShiftSmoothingImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbMeanShiftSmoothingImageFilter.h:474
otb::MeanShiftSmoothingImageFilter::OutputIterationImageType
TOutputIterationImage OutputIterationImageType
Definition: otbMeanShiftSmoothingImageFilter.h:501
otbMeanShiftSmoothingImageFilter.hxx
otb::MeanShiftSmoothingImageFilter::OutputImagePointerType
OutputImageType::Pointer OutputImagePointerType
Definition: otbMeanShiftSmoothingImageFilter.h:497
otb::Meanshift::SpatialRangeJointDomainTransform::m_NumberOfComponentsPerPixel
unsigned int m_NumberOfComponentsPerPixel
Definition: otbMeanShiftSmoothingImageFilter.h:97
otb::MeanShiftSmoothingImageFilter::Superclass
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: otbMeanShiftSmoothingImageFilter.h:472
otb::MeanShiftSmoothingImageFilter::Self
MeanShiftSmoothingImageFilter Self
Definition: otbMeanShiftSmoothingImageFilter.h:471
otb::Meanshift::SpatialRangeJointDomainTransform::operator()
TOutputJointImage::PixelType operator()(const typename TInputImage::PixelType &inputPixel, const typename TInputImage::IndexType &index) const
Definition: otbMeanShiftSmoothingImageFilter.h:67
otb::Meanshift::FastImageRegionConstIterator::InternalPixelType
TImage::InternalPixelType InternalPixelType
Definition: otbMeanShiftSmoothingImageFilter.h:159
otb::MeanShiftSmoothingImageFilter::SizeType
InputImageType::SizeType SizeType
Definition: otbMeanShiftSmoothingImageFilter.h:494
otb::MeanShiftSmoothingImageFilter::m_MaxIterationNumber
unsigned int m_MaxIterationNumber
Definition: otbMeanShiftSmoothingImageFilter.h:658
otb::MeanShiftSmoothingImageFilter::InputImageType
TInputImage InputImageType
Definition: otbMeanShiftSmoothingImageFilter.h:480
otb::Meanshift::FastImageRegionConstIterator::GetPixelPointer
const InternalPixelType * GetPixelPointer() const
Definition: otbMeanShiftSmoothingImageFilter.h:172
otb::MeanShiftSmoothingImageFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbMeanShiftSmoothingImageFilter.h:488
otb::Meanshift::SpatialRangeJointDomainTransform::m_ImageDimension
unsigned int m_ImageDimension
Definition: otbMeanShiftSmoothingImageFilter.h:96
otb::Meanshift::FastImageRegionConstIterator::FastImageRegionConstIterator
FastImageRegionConstIterator(const ImageType *ptr, const RegionType &region)
Definition: otbMeanShiftSmoothingImageFilter.h:167
otb::MeanShiftSmoothingImageFilter::m_Kernel
KernelType m_Kernel
Definition: otbMeanShiftSmoothingImageFilter.h:662
otb::MeanShiftSmoothingImageFilter::m_Threshold
double m_Threshold
Definition: otbMeanShiftSmoothingImageFilter.h:655
otb::MeanShiftSmoothingImageFilter::m_NumLabels
itk::VariableLengthVector< LabelType > m_NumLabels
Definition: otbMeanShiftSmoothingImageFilter.h:687
otb::MeanShiftSmoothingImageFilter::RegionType
InputImageType::RegionType RegionType
Definition: otbMeanShiftSmoothingImageFilter.h:493
otb::VectorImage::PixelType
Superclass::PixelType PixelType
Definition: otbVectorImage.h:63
otb::Meanshift::FastImageRegionConstIterator::m_NumberOfComponentsPerPixel
unsigned int m_NumberOfComponentsPerPixel
Definition: otbMeanShiftSmoothingImageFilter.h:178
otb::Meanshift::SpatialRangeJointDomainTransform::RealType
double RealType
Definition: otbMeanShiftSmoothingImageFilter.h:61
otb::MeanShiftSmoothingImageFilter::OutputSpatialImagePointerType
OutputSpatialImageType::Pointer OutputSpatialImagePointerType
Definition: otbMeanShiftSmoothingImageFilter.h:507
otb::MeanShiftSmoothingImageFilter
Definition: otbMeanShiftSmoothingImageFilter.h:467
otb::MeanShiftSmoothingImageFilter::LabelType
unsigned long LabelType
Definition: otbMeanShiftSmoothingImageFilter.h:503
otb::Meanshift::KernelUniform::operator()
RealType operator()(RealType x) const
Definition: otbMeanShiftSmoothingImageFilter.h:110
otb::MeanShiftSmoothingImageFilter::m_RangeBandwidthRamp
RealType m_RangeBandwidthRamp
Definition: otbMeanShiftSmoothingImageFilter.h:646
otb::MeanShiftSmoothingImageFilter::InputImagePointerType
InputImageType::Pointer InputImagePointerType
Definition: otbMeanShiftSmoothingImageFilter.h:487
otb::Meanshift::SpatialRangeJointDomainTransform::Initialize
void Initialize(unsigned int _ImageDimension, unsigned int numberOfComponentsPerPixel_, typename TInputImage::IndexType globalShift_)
Definition: otbMeanShiftSmoothingImageFilter.h:82
otb::MeanShiftSmoothingImageFilter::RealType
double RealType
Definition: otbMeanShiftSmoothingImageFilter.h:475
otb::Meanshift::SpatialRangeJointDomainTransform::m_OutputSize
unsigned int m_OutputSize
Definition: otbMeanShiftSmoothingImageFilter.h:98
otb::Meanshift::KernelUniform::RealType
double RealType
Definition: otbMeanShiftSmoothingImageFilter.h:105
otb::Image::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImage.h:97
otb::Meanshift::SpatialRangeJointDomainTransform
Definition: otbMeanShiftSmoothingImageFilter.h:58
otb::Meanshift::FastImageRegionConstIterator::RegionType
Superclass::RegionType RegionType
Definition: otbMeanShiftSmoothingImageFilter.h:156
otb::Meanshift::FastImageRegionConstIterator
Definition: otbMeanShiftSmoothingImageFilter.h:148
otb::MeanShiftSmoothingImageFilter::m_NumberOfComponentsPerPixel
unsigned int m_NumberOfComponentsPerPixel
Definition: otbMeanShiftSmoothingImageFilter.h:665
otb::MeanShiftSmoothingImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbMeanShiftSmoothingImageFilter.h:473
otb::Meanshift::KernelUniform
Definition: otbMeanShiftSmoothingImageFilter.h:102
otb::Meanshift::FastImageRegionConstIterator::Self
FastImageRegionConstIterator< TImage > Self
Definition: otbMeanShiftSmoothingImageFilter.h:152
otb::VectorImage
Creation of an "otb" vector image which contains metadata.
Definition: otbVectorImage.h:45
otb::MeanShiftSmoothingImageFilter::OutputLabelImageType
otb::Image< LabelType, InputImageType::ImageDimension > OutputLabelImageType
Definition: otbMeanShiftSmoothingImageFilter.h:504
otb::MeanShiftSmoothingImageFilter::m_ModeTable
ModeTableImageType::Pointer m_ModeTable
Definition: otbMeanShiftSmoothingImageFilter.h:676