This file is indexed.

/usr/include/OTB-5.8/otbMorphologicalPyramidSegmenter.h is in libotb-dev 5.8.0+dfsg-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/*=========================================================================

  Program:   ORFEO Toolbox
  Language:  C++
  Date:      $Date$
  Version:   $Revision$


  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
  See OTBCopyright.txt for details.


     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
#ifndef otbMorphologicalPyramidSegmenter_h
#define otbMorphologicalPyramidSegmenter_h

#include "itkImageToImageFilter.h"

namespace otb
{
namespace MorphologicalPyramid
{
/**
 * \class Segmenter
 * \brief This class performs the segmentation of a detail image extracted from a
 * morphological pyramid analysis.
 *
 * This class performs the segmentation of a detail image extracted from a
 * morphological pyramid analysis.
 *
 * The Segmentation is performed using the ConnectedThresholdImageFilter. The seeds
 * are extracted from the image using the ImageToPointSetFilter. The thresolds are set
 * by using quantiles computed with the HistogramGenerator.
 *
 * \sa MorphologicalPyramidAnalyseFilter
 * \sa MorphologicalPyramidSynthesisFilter
 * \sa ResampleImageFilter
 * \sa LinearInterpolateImageFunction
 * \sa ScaleTransform
 *
 * \ingroup OTBMorphologicalPyramid
 */
template <class TInputImage, class TOutputImage>
class ITK_EXPORT Segmenter
  : public itk::ImageToImageFilter<TInputImage, TOutputImage>
{
public:
  /** Standard typedefs */
  typedef Segmenter                                          Self;
  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
  typedef itk::SmartPointer<Self>                            Pointer;
  typedef itk::SmartPointer<const Self>                      ConstPointer;
  /** Creation through object factory macro */
  itkNewMacro(Self);
  /** Type macro */
  itkTypeMacro(Segmenter, ImageToImageFilter);
  /** Template parameters typedefs */
  typedef TInputImage                           InputImageType;
  typedef typename InputImageType::PixelType    InputPixelType;
  typedef typename InputImageType::Pointer      InputImagePointerType;
  typedef TOutputImage                          OutputImageType;
  typedef typename OutputImageType::Pointer     OutputImagePointerType;
  typedef typename OutputImageType::PixelType   OutputPixelType;
  typedef typename OutputImageType::RegionType  OutputImageRegionType;
  typedef typename OutputImageType::SizeType    SizeType;
  typedef typename OutputImageType::SpacingType SpacingType;

  /** ImageDimension constants */
  itkStaticConstMacro(DetailsImageDimension, unsigned int,
                      TInputImage::ImageDimension);
  itkStaticConstMacro(OriginalImageDimension, unsigned int,
                      TInputImage::ImageDimension);
  itkStaticConstMacro(OutputImageDimension, unsigned int,
                      TOutputImage::ImageDimension);
  /**
   * Set the details image.
   * \param detailsImage The details image from the morphological pyramid
   */
  void SetDetailsImage(const InputImageType * detailsImage);
  /**
   * Get the details image.
   * \return detailsImage The input details image.
   */
  InputImageType * GetDetailsImage(void);
  /**
   * Set the original image.
   * \param originalImage The original image to segment.
   */
  void SetOriginalImage(const InputImageType * originalImage);
  /**
   * Get the original image.
   * \return originalImage The original image to segment.
   */
  InputImageType * GetOriginalImage(void);

  /** Min object size parameter accessor */
  itkSetMacro(MinimumObjectSize, unsigned long);
  itkGetMacro(MinimumObjectSize, unsigned long);
  /** Quantile for seeds extraction */
  itkSetMacro(SeedsQuantile, double);
  itkGetMacro(SeedsQuantile, double);
  /** Quantile for connected thresholding */
  itkSetMacro(ConnectedThresholdQuantile, double);
  itkGetMacro(ConnectedThresholdQuantile, double);
  /** Toogle the darker detail segmentation */
  itkSetMacro(SegmentDarkDetailsBool, bool);
  itkGetMacro(SegmentDarkDetailsBool, bool);
  itkBooleanMacro(SegmentDarkDetailsBool);
  /** Get the number of segmented objects */
  itkGetMacro(NumberOfObjects, OutputPixelType);

protected:
  /** Constructor */
  Segmenter();
  /** Destructor */
  ~Segmenter() ITK_OVERRIDE {}
  /** Main computation method */
  void GenerateData(void) ITK_OVERRIDE;
  /** PrintSelf method */
  void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE;
  /**
   * Configure the input datas.
   */
  void GenerateInputRequestedRegion(void) ITK_OVERRIDE;
  /**
   * Configure the output data.
   */
  using Superclass::EnlargeOutputRequestedRegion;
  void EnlargeOutputRequestedRegion(void);

private:
  Segmenter(const Self &); // purposely not implemented
  void operator =(const Self&); // purposely not implemented
  /** Minimum size for the segmented object */
  unsigned long m_MinimumObjectSize;
  /** Quantile for seeds determination */
  double m_SeedsQuantile;
  /** Quantile to set the connectedThresholdFilter threshold */
  double m_ConnectedThresholdQuantile;
  /** Set to true if the details to segment are darker than background */
  bool m_SegmentDarkDetailsBool;
  /** Number of segmented objects */
  OutputPixelType m_NumberOfObjects;
};
} // End namespace MorphologicalPyramid
} // End namespace otb

#ifndef OTB_MANUAL_INSTANTIATION
#include "otbMorphologicalPyramidSegmenter.txx"
#endif

#endif