This file is indexed.

/usr/include/ITK-4.9/itkWatershedBoundaryResolver.h is in libinsighttoolkit4-dev 4.9.0-4ubuntu1.

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
/*=========================================================================
 *
 *  Copyright Insight Software Consortium
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0.txt
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 *=========================================================================*/
#ifndef itkWatershedBoundaryResolver_h
#define itkWatershedBoundaryResolver_h


#include "itkWatershedSegmenter.h"

namespace itk
{
namespace watershed
{
/** \class BoundaryResolver
 *  This filter implements a piece of the streaming watershed
 *  segmentation algorithm.  It takes in pairs of itk::watershed::Boundary
 *  objects and connects the labeling of pixels across image chunk boundaries.
 *  Read the documentation found in itk::WatershedImageFilter and the other
 *  watershed segmentation component objects for more information.
 *
 * \par A note on terminology in itk watershed segmentation code
 * For streamed segmentation of images in the watershed framework, the
 * documentation refers to the complete data set at the ``image volume.''  The
 * image volume is assumed to be partitioned into pieces referred to as image
 * chunks. Each chunk is processed in sequence through the pipeline.  The
 * ``face'' of an image chunk is an N-1 dimensional boundary region of an N
 * dimensional chunk (the planar faces of a cube, for example).

 * \par Input
 * The input to this filter is a pair of itk::watershed::Boundary pointers
 * (BoundaryA and BoundaryB).
 * The algorithm assumes that these Boundaries come from facing chunks in the
 * image volume.  The faces that align need to be specified in the parameters
 * of the filter.
 *
 * \par Output
 * This filter outputs a table of equivalencies among labels.  See
 * itk::EquivalencyTable for more information.
 * \ingroup WatershedSegmentation
 *
 * \par Parameters
 * The only parameters to set on this filter are the indices of the faces that
 * align in the boundary object inputs.  See itk::Boundary for a description of
 * how boundary faces are indexed.
 * \sa itk::watershed::Boundary
 * \ingroup WatershedSegmentation
 * \ingroup ITKWatersheds
 */
template< typename TPixelType, unsigned int TDimension >
class BoundaryResolver:public ProcessObject
{
public:
  /** Set up smart pointer and object factory definitions.   */
  typedef BoundaryResolver           Self;
  typedef ProcessObject              Superclass;
  typedef SmartPointer< Self >       Pointer;
  typedef SmartPointer< const Self > ConstPointer;
  itkNewMacro(Self);
  itkTypeMacro(WatershedBoundaryResolver, ProcessObject);

  /** Expose the image dimension at run time. */
  itkStaticConstMacro(ImageDimension, unsigned int, TDimension);

  /** Some convenient typedefs.   */
  typedef TPixelType                                   PixelType;
  typedef Boundary< PixelType, TDimension >            BoundaryType;
  typedef EquivalencyTable                             EquivalencyTableType;
  typedef Segmenter< Image< TPixelType, TDimension > > SegmenterType;
  typedef DataObject::Pointer                          DataObjectPointer;

  /** Set/Get the first of two boundaries that are to be resolved.   */
  void SetBoundaryA(BoundaryType *bd)
  { this->ProcessObject::SetNthInput(0, bd); }
  typename BoundaryType::Pointer GetBoundaryA()
  { return static_cast< BoundaryType * >( this->GetInput(0) );  }

  /** Set/Get the second of two boundaries that are to be resolved.  */
  void SetBoundaryB(BoundaryType *bd)
  { this->ProcessObject::SetNthInput(1, bd); }
  typename BoundaryType::Pointer GetBoundaryB()
  { return static_cast< BoundaryType * >( this->GetInput(1) );  }

  /**  Set/Get the face of the boundary object that we are going to
   *  resolve. */
  itkSetMacro(Face, unsigned short);
  itkGetConstMacro(Face, unsigned short);

  /** This method sets/gets the equivalency table used to store equivalencies
   *  among segments that are generated from the boundary resolution
   *  algorithm.  */
  void SetEquivalencyTable(EquivalencyTableType::Pointer a)
  { this->ProcessObject::SetNthOutput( 0, a.GetPointer() ); }
  EquivalencyTableType::Pointer GetEquivalencyTable()
  {
    return static_cast< EquivalencyTableType * >
           ( this->ProcessObject::GetOutput(0) );
  }

  /** Standard non-threaded pipeline method */
  virtual void GenerateData() ITK_OVERRIDE;

  /** Standard itk::ProcessObject subclass method. */
  typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
  using Superclass::MakeOutput;
  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;

protected:
  BoundaryResolver():m_Face(0)
  {
    EquivalencyTable::Pointer eq =
      static_cast< EquivalencyTable * >( this->MakeOutput(0).GetPointer() );

    this->SetNumberOfRequiredOutputs(1);
    this->ProcessObject::SetNthOutput( 0, eq.GetPointer() );
  }

  virtual ~BoundaryResolver() {}
  BoundaryResolver(const Self &) {}
  void operator=(const Self &) {}
  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;

  unsigned short m_Face;
  virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE;
};
} // end namespace watershed
} // end namespace itk

#ifndef ITK_MANUAL_INSTANTIATION
#include "itkWatershedBoundaryResolver.hxx"
#endif

#endif