This file is indexed.

/usr/include/IGSTK/igstkReslicerPlaneSpatialObject.h is in libigstk4-dev 4.4.0-6.

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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
/*=========================================================================

  Program:   Image Guided Surgery Software Toolkit
  Module:    $RCSfile: igstkReslicerPlaneSpatialObject.h,v $
  Language:  C++
  Date:      $Date: 2009-06-15 21:35:41 $
  Version:   $Revision: 1.2 $

  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 __igstkReslicerPlaneSpatialObject_h
#define __igstkReslicerPlaneSpatialObject_h

#include "igstkMacros.h"
#include "igstkTransform.h"
#include "igstkSpatialObject.h"
#include "igstkStateMachine.h"


namespace igstk
{

/** \class ReslicerPlaneSpatialObject
 * 
 * \brief This class generates reslicing plane equation.  
 *
 * The computed plane is used by spatial object representation classes such as 
 * igstkImageResliceSpatialObjectRepresentation and 
 * igstkMeshResliceSpatialObjectRepresentation.
 *
 * The class provides three modes of reslicing: Orthogonal, OffOrthogonal and 
 * Oblique. 
 *
 * In orthogonal mode, three types of orientation are defined: Axial, Coronal 
 * and Sagittal. 
 * For this mode, the tool tip spatial object provides the reslicing plane 
 * position and orientation
 * information is extracted from the bounding box provider spatial object.
 *
 * For OffOrthogonal mode, the three types of orientation are OffAxial, 
 * OffSagittal and OffCoronal.
 * The orientation of the reslicing plane is computed from both, the tracker 
 * tool spatial object and
 * the bounding box provider spatial object. The position of the reslice plane 
 * is determined from 
 * the tracker tool tip position.
 *
 * For the oblique mode, both orientation and position information of the 
 * reslicing plane are obtained
 * from the tracker tool.
 *
 *
 * \ingroup SpatialObject
 */

class ReslicerPlaneSpatialObject : public SpatialObject
{

public:

  /** Macro with standard traits declarations. */
  igstkStandardClassTraitsMacro( ReslicerPlaneSpatialObject, SpatialObject )

public:

  /** Typedefs */
  typedef SpatialObject            BoundingBoxProviderSpatialObjectType;
  typedef BoundingBoxProviderSpatialObjectType::ConstPointer
                                   BoundingBoxProviderSpatialObjectConstPointer;

  typedef SpatialObject                               ToolSpatialObjectType;
  typedef ToolSpatialObjectType::Pointer              ToolSpatialObjectPointer;

  typedef igstk::Transform::VectorType                  VectorType;
  typedef igstk::Transform::VersorType                  VersorType;

  igstkLoadedEventMacro( ToolTipPositionEvent, IGSTKEvent, VectorType );
  igstkLoadedEventMacro( ReslicerPlaneNormalEvent, IGSTKEvent, VectorType );
  igstkLoadedEventMacro( ReslicerPlaneCenterEvent, IGSTKEvent, VectorType );

  /** Reslicing modes */
  enum ReslicingMode
    { 
    Orthogonal, 
    OffOrthogonal, 
    Oblique 
    }; 

  /** Orthogonal orientation types */
  enum OrientationType
    { 
    Axial, 
    Sagittal, 
    Coronal, 
    OffAxial,
    OffSagittal,
    OffCoronal,
    PlaneOrientationWithZAxesNormal,
    PlaneOrientationWithXAxesNormal,
    PlaneOrientationWithYAxesNormal
    };

  /** Request the state machine to attempt to set the reslicing mode*/
  void RequestSetReslicingMode( ReslicingMode reslicingMode ); 

  /** Request the state machine to attempt to set orientation type */
  void RequestSetOrientationType( OrientationType orientationType ); 

  /** Actually sets boundingbox provider spatial object*/ 
  void RequestSetBoundingBoxProviderSpatialObject( const
     BoundingBoxProviderSpatialObjectType * boundingBoxProviderSpatialObject ); 

  /** Request the state machine to attempt to set the tool spatial object. A 
   * tool spatial object is actually optional; althought required for the 
   * OffOrthogonal and Oblique reslicing modes.
   **/
  void RequestSetToolSpatialObject( const ToolSpatialObjectType * 
                                                            toolSpatialObject );

  /** Request the state machine to attempt to set reslicing cursor position. */
  void RequestSetCursorPosition( const double *point);

  /** Request get tool position */
  void RequestGetToolPosition();

  /** Request get reslicing plane parameters */
  void RequestGetReslicingPlaneParameters();

  /** Request compute reslicing plane */
  void RequestComputeReslicingPlane(); 

  /** Retrieve current orientation mode*/
  OrientationType GetOrientationType() const;

  /** Retrieve current reslicing mode */
  ReslicingMode GetReslicingMode() const;

  /** Request update tool transform WRT reference spatial object coordinate 
   * system */
  void RequestUpdateToolTransformWRTImageCoordinateSystem();

  /** Get tool transform */
  igstk::Transform GetToolTransform() const;

  /** fixme: put this into events */
  VectorType GetToolPosition() const;

  /** Inquiry if a tool spatial object is set for reslicing */
  bool  IsToolSpatialObjectSet();

  /** Declarations needed for the Logger */
  igstkLoggerMacro();

protected:

  /** Constructor */
  ReslicerPlaneSpatialObject( void );

  /** Destructor */
  ~ReslicerPlaneSpatialObject( void );

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

private:
  ReslicerPlaneSpatialObject(const Self&);   //purposely not implemented
  void operator=(const Self&);   //purposely not implemented

  /** Inputs to the State Machine */  
  igstkDeclareInputMacro( SetBoundingBoxProviderSpatialObject );
  igstkDeclareInputMacro( ValidReslicingMode );
  igstkDeclareInputMacro( InValidReslicingMode );
  igstkDeclareInputMacro( ValidOrientationType );
  igstkDeclareInputMacro( InValidOrientationType );
  igstkDeclareInputMacro( ValidBoundingBoxProviderSpatialObject );
  igstkDeclareInputMacro( InValidBoundingBoxProviderSpatialObject );
  igstkDeclareInputMacro( ValidToolSpatialObject );
  igstkDeclareInputMacro( InValidToolSpatialObject );
  igstkDeclareInputMacro( SetCursorPosition );
  igstkDeclareInputMacro( ValidCursorPosition );
  igstkDeclareInputMacro( InValidCursorPosition );
  igstkDeclareInputMacro( GetToolPosition );
  igstkDeclareInputMacro( GetReslicingPlaneParameters );
  igstkDeclareInputMacro( GetToolTransformWRTImageCoordinateSystem );
  igstkDeclareInputMacro( ToolTransformWRTImageCoordinateSystem );
  igstkDeclareInputMacro( ComputeReslicePlane );
  
  /** States for the State Machine */
  igstkDeclareStateMacro( Initial );
  igstkDeclareStateMacro( ReslicingModeSet );
  igstkDeclareStateMacro( OrientationTypeSet );
  igstkDeclareStateMacro( BoundingBoxProviderSpatialObjectSet );
  igstkDeclareStateMacro( AttemptingToSetCursorPosition );
  igstkDeclareStateMacro( AttemptingToSetBoundingBoxProviderSpatialObject );  
  igstkDeclareStateMacro( AttemptingToGetToolTransformWRTImageCoordinateSystem);

  /** Null operation for State Machine transition */
  void NoProcessing();

  /** Set the orientation type */
  void SetOrientationTypeProcessing( void );

  /** Set the reslcing mode */
  void SetReslicingModeProcessing( void );

 /** Attempts to set bounding box provider spatial object*/ 
  void AttemptSetBoundingBoxProviderSpatialObjectProcessing();

  /** Set Cursor position */
  void AttemptSetCursorPositionProcessing( void );
  void SetCursorPositionProcessing( void );
 
  /** Reslice plance compute methold */
  void ComputeReslicePlaneProcessing();
 
  /** Set the reference spatial object */
  void SetBoundingBoxProviderSpatialObjectProcessing( void );

  /** Set the tool spatial object */
  void SetToolSpatialObjectProcessing( void );

  /** Report invalid reslicing mode */
  void ReportInvalidReslicingModeProcessing( void );

  /** Report invalid orientation type */
  void ReportInvalidOrientationTypeProcessing( void );

  /** Report invalid reference spatial object type */
  void ReportInvalidBoundingBoxProviderSpatialObjectProcessing( void );

  /** Report invalid tool spatial object type */
  void ReportInvalidToolSpatialObjectProcessing( void );

  /** Report invalid Cursor position */
  void ReportInvalidCursorPositionProcessing( void );

  /** Report invalid request */
  void ReportInvalidRequestProcessing( void );

  /** Request get tool transform with respect to reference spatial object 
   * coordinate system */ 
  void RequestGetToolTransformWRTImageCoordinateSystemProcessing( void );

  /** Receive tool transform with respect to reference spatial object 
   * coordinate system */ 
  void ReceiveToolTransformWRTImageCoordinateSystemProcessing( void );

  /** Report tool position */
  void ReportToolPositionProcessing( void );

  /** Report plane */
  void ReportReslicingPlaneParametersProcessing( void );

  /** Methods to compute reslcing plane for the different modes*/
  void ComputeOrthogonalReslicingPlane();
  void ComputeObliqueReslicingPlane();
  void ComputeOffOrthogonalReslicingPlane();

  /** Variables for managing reslicing mode */
  ReslicingMode     m_ReslicingModeToBeSet;
  ReslicingMode     m_ReslicingMode;

  /** Variables for managing orientation type */
  OrientationType     m_OrientationTypeToBeSet;
  OrientationType     m_OrientationType;

  /** Variables for managing bounding box provider spatial object */
  BoundingBoxProviderSpatialObjectConstPointer
                                      m_BoundingBoxProviderSpatialObjectToBeSet;
  BoundingBoxProviderSpatialObjectConstPointer
                                      m_BoundingBoxProviderSpatialObject;

  /** Variables for managing tool spatial object */
  ToolSpatialObjectPointer     m_ToolSpatialObjectToBeSet;
  ToolSpatialObjectPointer     m_ToolSpatialObject;  
  
  /** Plane parameters */
  VectorType                        m_PlaneNormal;
  VectorType                        m_PlaneCenter;

  // Event macro setup to receive the tool spatial object transform
  // with respect to the reference spatial object coordinate system
  igstkLoadedEventTransductionMacro( CoordinateSystemTransformTo, 
                                        ToolTransformWRTImageCoordinateSystem );
  

  // Tool transform with respect to the reference spatial object 
  // coordinate system
  igstk::Transform m_ToolTransformWRTImageCoordinateSystem;

  /** Observer for the bounding box event */
  igstkObserverObjectMacro( BoundingBox, SpatialObject::BoundingBoxEvent,
                                              SpatialObject::BoundingBoxType);

  /** Cursor position member variables */
  double                        m_CursorPositionToBeSet[3];
  double                        m_CursorPosition[3];
  bool                          m_CursorPositionSetFlag;

  VectorType                    m_ToolPosition;

  double                        m_Bounds[6];

  BoundingBoxType::Pointer      m_BoundingBox;
   
  /** flag indicating that a tool spatial object for reslicing is set */
  bool                          m_ToolSpatialObjectSet;

};

} // end namespace igstk

#endif // __igstkReslicerPlaneSpatialObject_h