This file is indexed.

/usr/include/InsightToolkit/Review/itkBruker2DSEQImageIO.h is in libinsighttoolkit3-dev 3.20.1-1.

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

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkBruker2DSEQImageIO.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) Insight Software Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/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.

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

/**
 * \file   The code for this file reader was written based on
 *         Bruker image file sets generated at the Center for NMR Research
 *         at the Penn State Milton S. Hershey Medical Center.
 *
 *      NOTE: Currently this only reads in the "necessary" information,
 *      but eventually it should read the hundreds of Bruker specific
 *      parameters and encapsulate them in the meta dictionary.
 *
 * \author Don C. Bigler
 *         The Pennsylvania State University 2004
 *
 * This implementation was contributed as a paper to the Insight Journal
 * http://insight-journal.org/midas/handle.php?handle=1926/1381
 *
 */

#ifndef __itkBruker2DSEQImageIO_h
#define __itkBruker2DSEQImageIO_h

#ifdef _MSC_VER
#pragma warning ( disable : 4786 )
#endif

#include "itkImageIOBase.h"
#include "itkVectorContainer.h"

namespace itk
{
/** \class Bruker2DSEQImageIO
 * \ingroup IOFilters
 * \author Don C. Bigler
 * \brief Class that defines how to read Bruker file format.
 * Bruker IMAGE FILE FORMAT - The following is a brief description of the Bruker
 * file format taken from:
 *  
 * http://www.mrc-cbu.cam.ac.uk/Imaging/Common/brukerformat.shtml.
 *
 * For the Bruker format, a single scanning session is stored in its own 
 * directory. The directory is named according to the subject name or number, as 
 * typed in by the scanner operator. The directory name usually specifies the 
 * subject name/number and which session this is for that subject. Thus, a 
 * typical directory name would be
 *
 *         010005-m00.5X1
 *
 * where '010005' is the WBIC subject number of the subject, the 00 of 'm00' 
 * means this is the first scanning session that subject number of the session 
 * for that subject, on that day (1). The first two letters specify the day, 
 * since some arbitrary base date - set in the Bruker software.
 *
 * The WBIC number (e.g. 010005) in turn is made up of the year the subject was 
 * first scanned (01 = 2001) and where that subject is in the sequence of new 
 * numbers allocated (5 = 5th subject in the year 2001 who has needed a new 
 * subject number).
 *
 * Within the session directory (e.g 010005-m00.5X1), there are:
 *          1.  a text file, named 'subject'
 *          2.  A subdirectory numbered 1, 2, 3 etc, for each saved run of data 
 *              acquisition in that session
 *
 * Within each of the run directories (e.g. 010005-m00.5X1/5) there are the 
 * following:
 *          1.  an 'imnd' or 'method' text file, containing parameters used in 
 *              setting up and acquiring the data from the scanner
 *          2.  an 'acqp' (ACquisition Parameter) text file, with further details
 *              of the acquisition parameters used for that run
 *          3.  a large 'fid' file, that contains the raw, unreconstructed MR 
 *              Free Induction Decay data
 *          4.  a subdirectory 'pdata' (Processed Data), that contains any 
 *              reconstructions of the data into images
 *          5.  various other files, including the 'pulseprogram' and 'grdprog.r'
 *              gradient programs
 *
 * Within each of the 'pdata' subdirectories (e.g 01001-m00.5X1/5/pdata), there 
 * are numbered subdirectories (1,2,3 etc) for each new reconstruction of the raw
 * data into images. There is usually only one such reconstruction, in 
 * subdirectory '1'.
 *
 * Within each reconstruction directory (e.g 01001-m00.5X1/5/pdata/1), there are:
 *          1.  a '2dseq' file. This is the 3D (structural etc) or 4D (FMRI) 
 *              image file.  It is simply a binary block of data, which could 
 *              simply be renamed as 'myscan.img' to make an acceptable Analyze 
 *              .img file.
 *          2.  a 'reco' text file, containing some details of the 
 *              reconstruction.
 *          3.  a 'meta' text file, which I think contains information for the 
 *              display of the 2dseq file within ParaVision.
 *          4.  a 'd3proc' file, containing image size definition parameters, 
 *              inter alia.
 *
 * The 'reco', 'acqp', 'd3proc', and '2dseq' files are required for this reader.
 * It will look for these files in the directory structure described above.  The 
 * path and filename of the '2dseq' file must be the name of the file to read 
 * (see CanReadFile).  This class supports reading only.
 */
class ITK_EXPORT Bruker2DSEQImageIO : public ImageIOBase
{
public:
  /** Standard class typedefs. */
  typedef Bruker2DSEQImageIO            Self;
  typedef ImageIOBase                   Superclass;
  typedef SmartPointer<Self>            Pointer;

  /** Method for creation through the object factory. */
  itkNewMacro(Self);

  /** Run-time type information (and related methods). */
  itkTypeMacro(Bruker2DSEQImageIO, Superclass);

  /** Special types used for Bruker meta data. */
  typedef VectorContainer< unsigned int, double > RECOFOVContainerType;
  typedef VectorContainer< unsigned int, int >    RECOTranspositionContainerType;
  typedef VectorContainer< unsigned int, double > ACQEchoTimeContainerType;
  typedef VectorContainer< unsigned int, double > ACQRepetitionTimeContainerType;
  typedef VectorContainer< unsigned int, double > ACQInversionTimeContainerType;
  typedef VectorContainer< unsigned int, double > ACQSliceSepnContainerType;

  /*-------- This part of the interfaces deals with reading data. ----- */

  /** Determine if the file can be read with this ImageIO implementation.
       * \author Don C. Bigler
       * \param FileNameToRead The name of the file to test for reading.
       * \return Returns true if this ImageIO can read the file specified.
       */
  virtual bool CanReadFile(const char* FileNameToRead);

  /** Set the spacing and dimension information for the set filename. */
  virtual void ReadImageInformation();

  /** Reads the data from disk into the memory buffer provided. */
  virtual void Read(void* buffer);

  /*-------- This part of the interfaces deals with writing data. ----- */

  /** Determine if the file can be written with this ImageIO implementation.
       * FileNameToWrite The name of the file to test for writing.
       * \author Don C. Bigler
       * \post This function will always return false (Not implemented).
       * \return Returns true if this ImageIO can write the file specified.
       */
  virtual bool CanWriteFile( const char * itkNotUsed(FileNameToWrite) )
    {
    return false;
    }

  /** Set the spacing and dimension information for the set filename. */
  virtual void WriteImageInformation() 
    { 
    return;
    }

  /** Writes the data to disk from the memory buffer provided. Make sure
       * that the IORegions has been set properly. */
  virtual void Write( const void * itkNotUsed( buffer ) ) 
    { 
    return;
    }


protected:
  Bruker2DSEQImageIO();
  ~Bruker2DSEQImageIO();
  void PrintSelf(std::ostream& os, Indent indent) const;

private:

  Bruker2DSEQImageIO(const Self&); //purposely not implemented
  void operator=(const Self&); //purposely not implemented
  void SwapBytesIfNecessary(void * buffer, unsigned long numberOfPixels);

  ImageIOBase::ByteOrder m_MachineByteOrder;
};

extern const char *const RECO_BYTE_ORDER;
extern const char *const RECO_FOV;
extern const char *const RECO_SIZE;
extern const char *const RECO_WORDTYPE;
extern const char *const RECO_IMAGE_TYPE;
extern const char *const RECO_TRANSPOSITION;
extern const char *const ACQ_DIM;
extern const char *const NI/*IMND_N_SLICES*/;
extern const char *const NR;
extern const char *const ACQ_SLICE_THICK/*IMND_SLICE_THICK*/;
extern const char *const NECHOES/*IMND_N_ECHO_IMAGES*/;
extern const char *const ACQ_SLICE_SEPN/*IMND_SLICE_SEPN*/;
extern const char *const ACQ_SLICE_SEPN_MODE;
extern const char *const ACQ_ECHO_TIME;
extern const char *const ACQ_REPETITION_TIME;
extern const char *const ACQ_INVERSION_TIME;
} // end namespace itk

#endif // __itkBruker2DSEQImageIO_h