This file is indexed.

/usr/include/vtk-5.8/vtkMINCImageWriter.h is in libvtk5-dev 5.8.0-5.

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
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkMINCImageWriter.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/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 notice for more information.

=========================================================================*/
/*=========================================================================

Copyright (c) 2006 Atamai, Inc.

Use, modification and redistribution of the software, in source or
binary forms, are permitted provided that the following terms and
conditions are met:

1) Redistribution of the source code, in verbatim or modified
   form, must retain the above copyright notice, this license,
   the following disclaimer, and any notices that refer to this
   license and/or the following disclaimer.

2) Redistribution in binary form must include the above copyright
   notice, a copy of this license and the following disclaimer
   in the documentation or with other materials provided with the
   distribution.

3) Modified copies of the source code must be clearly marked as such,
   and must not be misrepresented as verbatim copies of the source code.

THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS"
WITHOUT EXPRESSED OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR OTHER PARTY WHO MAY
MODIFY AND/OR REDISTRIBUTE THE SOFTWARE UNDER THE TERMS OF THIS LICENSE
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA OR DATA BECOMING INACCURATE
OR LOSS OF PROFIT OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF
THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

=========================================================================*/
// .NAME vtkMINCImageWriter - A writer for MINC files.
// .SECTION Description
// MINC is a NetCDF-based medical image file format that was developed
// at the Montreal Neurological Institute in 1992. 
// The data is written slice-by-slice, and this writer is therefore
// suitable for streaming MINC data that is larger than the memory
// size through VTK.  This writer can also produce files with up to
// 4 dimensions, where the fourth dimension is provided by using
// AddInput() to specify multiple input data sets.  If you want to
// set header information for the file, you must supply a
// vtkMINCImageAttributes 
// .SECTION See Also
// vtkMINCImageReader vtkMINCImageAttributes
// .SECTION Thanks
// Thanks to David Gobbi for writing this class and Atamai Inc. for
// contributing it to VTK.

#ifndef __vtkMINCImageWriter_h
#define __vtkMINCImageWriter_h

#include "vtkImageWriter.h"

class vtkStringArray;
class vtkIdTypeArray;
class vtkDoubleArray;
class vtkMatrix4x4;

// A special class that holds the attributes
class vtkMINCImageAttributes;

class VTK_IO_EXPORT vtkMINCImageWriter : public vtkImageWriter
{
public:
  vtkTypeMacro(vtkMINCImageWriter,vtkImageWriter);

  static vtkMINCImageWriter *New();
  virtual void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Get the entension for this file format. 
  virtual const char* GetFileExtensions() {
    return ".mnc"; }

  // Description:
  // Get the name of this file format.
  virtual const char* GetDescriptiveName() {
    return "MINC"; }

  // Description:
  // Set the file name.
  virtual void SetFileName(const char *name);

  // Description:
  // Write the data.  This will attempt to stream the data
  // slice-by-slice through the pipeline and out to the file,
  // unless the whole extent of the input has already been
  // updated.
  virtual void Write();

  // Description:
  // Set a matrix that describes the orientation of the data.  The
  // three columns of this matrix should give the unit-vector
  // directions for the VTK x, y and z dimensions respectively.  
  // The writer will use this information to determine how to map
  // the VTK dimensions to the canonical MINC dimensions, and if
  // necessary, the writer will re-order one or more dimensions
  // back-to-front to ensure that no MINC dimension ends up with
  // a direction cosines vector whose dot product with the canonical
  // unit vector for that dimension is negative.
  virtual void SetDirectionCosines(vtkMatrix4x4 *matrix);
  vtkGetObjectMacro(DirectionCosines, vtkMatrix4x4);

  // Description:
  // Set the slope and intercept for rescaling the intensities.  The
  // default values are zero, which indicates to the reader that no
  // rescaling is to be performed.
  vtkSetMacro(RescaleSlope, double);
  vtkGetMacro(RescaleSlope, double);
  vtkSetMacro(RescaleIntercept, double);
  vtkGetMacro(RescaleIntercept, double);

  // Description:
  // Set the image attributes, which contain patient information and
  // other useful metadata.
  virtual void SetImageAttributes(vtkMINCImageAttributes *attributes);
  virtual vtkMINCImageAttributes *GetImageAttributes() {
    return this->ImageAttributes; }; 

  // Description:
  // Set whether to validate that all variable attributes that
  // have been set are ones that are listed in the MINC standard.
  vtkSetMacro(StrictValidation, int);
  vtkBooleanMacro(StrictValidation, int);
  vtkGetMacro(StrictValidation, int);

  // Description:
  // Set a string value to append to the history of the file.  This
  // string should describe, briefly, how the file was processed.
  vtkSetStringMacro(HistoryAddition);
  vtkGetStringMacro(HistoryAddition);

protected:
  vtkMINCImageWriter();
  ~vtkMINCImageWriter();  

  int MINCImageType;
  int MINCImageTypeSigned;
  int MINCImageMinMaxDims;
  
  vtkMatrix4x4 *DirectionCosines;
  double RescaleSlope;
  double RescaleIntercept;
  int StrictValidation;
  int DataUpdateExtent[6];

  int FileDataType;
  double FileValidRange[2];
  double InternalRescaleSlope;
  double InternalRescaleIntercept;

  int ComputeValidRangeFromScalarRange;

  vtkStringArray *FileDimensionNames;

  vtkMINCImageAttributes *ImageAttributes;

  int Permutation[3];
  int Flip[3];

  int MismatchedInputs;
  int MINCFileId;

  char *HistoryAddition;

  virtual int OpenNetCDFFile(const char *filename, int& ncid);
  virtual int CloseNetCDFFile(int ncid);

  virtual int IndexFromDimensionName(const char *dimName);
  virtual void ComputePermutationFromOrientation(int permutation[3],
                                                 int flip[3]);
  virtual int CreateMINCDimensions(vtkImageData *input, int timeStep, 
                                   int *dimids);
  virtual int CreateMINCVariables(vtkImageData *input, int timeStep,
                                  int *dimids);
  virtual int WriteMINCFileAttributes(vtkImageData *input, int timeStep);
  virtual int WriteMINCData(vtkImageData *input, int frameNumber);
  virtual void FindRescale(double &rescaleSlope, double &rescaleIntercept);
  virtual void FindMINCValidRange(double range[2]);

  virtual int FillInputPortInformation(int port, vtkInformation *info);

  virtual int RequestInformation(vtkInformation *request,
                                 vtkInformationVector **inputVector,
                                 vtkInformationVector *outputVector);

  virtual int RequestUpdateExtent(vtkInformation *request,
                                  vtkInformationVector **inputVector,
                                  vtkInformationVector *outputVector);

  virtual int RequestData(vtkInformation* request,
                          vtkInformationVector** inputVector,
                          vtkInformationVector* outputVector);

private:
  vtkMINCImageWriter(const vtkMINCImageWriter&); // Not implemented
  void operator=(const vtkMINCImageWriter&);  // Not implemented

};

#endif