This file is indexed.

/usr/include/IGSTK/igstkTransform.h is in libigstk4-dev 4.4.0-2build2.

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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
/*=========================================================================

  Program:   Image Guided Surgery Software Toolkit
  Module:    $RCSfile: igstkTransform.h,v $
  Language:  C++
  Date:      $Date: 2009-01-30 18:24:31 $
  Version:   $Revision: 1.25 $

  Copyright (c) ISC  Insight Software Consortium.  All rights reserved.
  See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm 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 __igstkTransform_h
#define __igstkTransform_h

#include "igstkTransformBase.h"

#include "itkVector.h"
#include "itkVersor.h"

#include "vtkMatrix4x4.h"

#include "igstkTimeStamp.h"
#include "igstkMacros.h"

namespace igstk 
{
 
/** \class Transform 
 *  \brief A class representing a 3D Rigid transform
 * 
 * This class represents relative positions and orientations in 3D space. It is
 * intended to be used for positioning objects in the scene and as a
 * communication vehicle between trackers and spatial objects. The class
 * contains a TimeStamp defining the validity period for the information in the
 * transform. 
 * 
 * This class can be used for storing Translation and Rotation simultaneously,
 * or only Translation, or only Rotation. When only Translation or only
 * Rotation are used, the other component of the transform is set to an
 * identity. If the user intends to use both rotations and translation, she
 * must invoke the SetTranslationAndRotation() method.
 * 
 * All the set methods require an argument that defines the number of
 * milliseconds for which the stored information is considered to be valid.
 * The validity period will be counted from the moment the Set method was
 * invoked.
 *
 * \sa TimeStamp
 *
 * */
  class Transform : public TransformBase
{
public:

  typedef ::itk::Vector<double, 3>    VectorType;
  typedef ::itk::Point<double, 3>     PointType;
  typedef ::itk::Versor<double>       VersorType;
  
public:

  /** Constructor and destructor */
  Transform();
  Transform( const Transform & t );
  virtual ~Transform();

  /** Transform composition method */
  static Transform TransformCompose( Transform leftTransform, 
                                     Transform rightTransform );

  /** Assign the values of one transform to another */
  const Transform & operator=( const Transform & inputTransform );

  /** Set Translation and Rotation simultaneously. This values will override
   * any previously set rotation and translation. The information will be
   * considered valid from the time of invokation of the method until that time
   * plus the millisecondsToExpiration value. */
  void SetTranslationAndRotation(
          const  VectorType & translation,
          const  VersorType & rotation,
          TransformBase::ErrorType errorValue,
          TimeStamp::TimePeriodType millisecondsToExpiration );


  /** Set only Rotation. This method should be used when the transform
   * represents only a rotation. Internally the translational part of the
   * transform will be set to zero. The assigned rotation will override any
   * previously set rotation and will set to zero any previous translation.
   * The information will be considered valid from the time of invokation of
   * the method until that time plus the millisecondsToExpiration value. */
  void SetRotation( 
          const  VersorType & rotation,
                 ErrorType errorValue,
          TimePeriodType millisecondsToExpiration );

  /** Set only Translation. This method should be used when the transform
   * represents only a translation. Internally the rotational part of the
   * transform will be set to zero. The assigned translation will override any
   * previously set translation and will set to zero any previous rotation.
   * The information will be considered valid from the time of invokation of
   * the method until that time plus the millisecondsToExpiration value. */
  void SetTranslation( 
          const  VectorType & translation,
                 ErrorType errorValue,
          TimePeriodType millisecondsToExpiration );

  /** Returns the translational component. Users MUST check the validity time
   * of the transform before attempting to use this returned value. The content
   * of the transform may have expired. */
  igstkGetMacro( Translation, VectorType );
 
 
  /** Returns the rotational component. Users MUST check the validity time
   * of the transform before attempting to use this returned value. The content
   * of the transform may have expired. */
  igstkGetMacro( Rotation, VersorType ); 
 

  /** Export the content of the transformation in the format of a vtkMatrix4x4.
   * Users must allocate the matrix first and then pass it by reference to this
   * method.  The current method will simply fill in the transform using the
   * current information of translation and rotation.
   */
  void ExportTransform( vtkMatrix4x4 & matrix ) const;

  /** Set the content of the transformation from a vtkMatrix4x4.
   */
  void ImportTransform( vtkMatrix4x4 & matrix );

  /** Compare two transforms for equivalence, in the 
   *  sense that these are the same objects in memory.
   */
  bool operator==( const Transform & inputTransform );
  bool operator!=( const Transform & inputTransform );

  /** Compare two transforms for equivalence. */
  bool IsNumericallyEquivalent( 
    const Transform& inputTransform, double tol = vnl_math::eps ) const;

  /** Evaluate if the Transform is an Identity upto a given tolerance */
  bool IsIdentity( double tol = vnl_math::eps ) const;

  /** Resets the Transform to an Identity Transform */
  void SetToIdentity( TimePeriodType validityPeriodInMilliseconds );

  /** Method for printing the member variables of this class to an ostream */
  void Print( std::ostream& os, itk::Indent indent ) const;

  /** Returns the Inverse Transform of the current one */
  Transform GetInverse() const;


protected:

  void PrintHeader( std::ostream& os, itk::Indent indent ) const;

  void PrintTrailer( std::ostream& itkNotUsed(os), 
                     itk::Indent itkNotUsed(indent) ) const;

  /** Print the object information in a stream. */
  virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const; 

private:

  VectorType      m_Translation;
  VersorType      m_Rotation;

};

std::ostream& operator<<( std::ostream& os, const igstk::Transform& o );
}

#endif