This file is indexed.

/usr/include/dcmtk/dcmfg/stack.h is in libdcmtk-dev 3.6.1~20160216-4.

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
/*
 *
 *  Copyright (C) 2015, Open Connections GmbH
 *  All rights reserved.  See COPYRIGHT file for details.
 *
 *  This software and supporting documentation are maintained by
 *
 *    OFFIS e.V.
 *    R&D Division Health
 *    Escherweg 2
 *    D-26121 Oldenburg, Germany
 *
 *
 *  Module:  dcmfg
 *
 *  Author:  Michael Onken
 *
 *  Purpose: Class representing a stack in the context of Enhanced DICOM objects
 *
 */

#ifndef FGSTACK_H
#define FGSTACK_H

#include "dcmtk/config/osconfig.h"
#include <dcmtk/ofstd/ofmap.h>
#include "dcmtk/ofstd/ofstring.h"
#include "dcmtk/ofstd/ofvector.h"
#include "dcmtk/dcmfg/fgdefine.h"

/** Class representing a stack in the context of an Enhanced DICOM object.
 *  Therefore the class stores the ID of the stack (Stack ID) and all the frame
 *  numbers being part of that stack, as well as for each frame its position
 *  within the stack.
 */
class DCMTK_DCMFG_EXPORT FGStack
{
public:

  // Make sure the main interface class has easy access to internal members
  friend class FGStackInterface;

  /// Iterator type for iterating over the frames of a stack
  typedef OFMap<Uint32,Uint32>::iterator iterator;

  /// Const terator for iterating over the frames of a stack
  typedef OFMap<Uint32,Uint32>::const_iterator const_iterator;

  /** Constructor, creates stack from Stack ID and assigned frame numbers
   *  @param  stackID The Stack ID of the stack
   *  @param  frameNumbers A map with frame numbers as the keys, and the
   *          position of the frame within the stack as the value for each
   *          frame. First position is 1. There may be frames having the same
   *          positions in the same stack. However, in that case the standard
   *          lists some elements which at least must have the same values, then:
   *          - Dimension Organization UID (0020,9164) to qualify the Stack ID
   *          - Image Position (Patient) (0020,0032)
   *          - Image Orientation (Patient) (0020,0037)
   *          - Rows (0028,0010) * first value of Pixel Spacing (0028,0030) (= field of view in the row direction)
   *          - Columns (0028,0011) * second value of Pixel Spacing (0028,0030) (= field of view in the column direction)
   *          - Slice Thickness (0018,0050)
   *         The values may change over time (last check was DICOM 2014a), so
   *         the latest edition of the standard should be consulted if it is
   *         planned to apply the same in-stack position to different frames.
   */
  FGStack(const OFString& stackID,
          const OFMap<Uint32, Uint32> frameNumbers);

  /** Constructor, create empty stack with given Stack ID (and fill in frames
   *  later)
   *  @param  stackID The Stack ID of the frame
   */
  FGStack(const OFString& stackID);

  /** Virtual destructor, frees memory
   */
  virtual ~FGStack();

  // TODO add sorted iterators using views, for example

  /** Return const iterator to first frame (not sorted after stack position)
   *  @return Const iterator to first frame
   */
  const_iterator begin() const;

  /** Return iterator to first frame (not sorted after stack position)
   *  @return Iterator to first frame
   */
  iterator begin();

  /** Return const iterator pointing behind last frame (not sorted after stack position)
   *  @return Const iterator pointing behind last frame
   */
  const_iterator end() const;

  /** Return iterator pointing behind last frame (not sorted after stack position)
   *  @return Iterator pointing behind last frame
   */
  iterator end();

  /** Add frame to stack and set its in-stack position. Any old position
   *  will be overwritten.
   *  @param  frameNumber The frame number that should be added to the stack
   *  @param  inStackPos  The position in the stack (starting from 1). More than
   *          one frame can have the same position in the stack, however there
   *          are rules (see documentation of constructor and the DICOM
   *          standard)
   */
  virtual OFBool addFrame(const Uint32 frameNumber,
                          const Uint32 inStackPos);

  /** Get Stack ID uniquely identifying this stack
   *  @return The Stack ID
   */
  virtual OFString getStackID() const;

  /** Get the stack position for a given frame
   *  @param  frameNumber The number of the frame
   *  @return The stack position for that frame
   */
  Uint32 getInStackPos(const Uint32 frameNumber) const;

  /** Get list of frames that are set to a specific In-Stack Position
   *  @param  inStackPos In-Stack Position Number to find frames for
   *  @param  resultFrameNumbers The frame numbers assigned to that stack
   *          position
   */
  void getFramesAtStackPos(const Uint32 inStackPos,
                           OFVector<Uint32>& resultFrameNumbers);

private:

  /// The Stack ID of this frame
  OFString m_StackID;

  /// Map with frames, key is the frame number, value is the in-stack position.
  /// More than one frame can have the same in-stack position
  OFMap<Uint32, Uint32> m_FrameNumbers;

  // TODO Maybe add a redundant data structures mapping in-stack positions
  // to frame numbers in order to enable fast access?
};

#endif // STACKREADER_H