34 #ifndef vtkScancoCTReader_h
35 #define vtkScancoCTReader_h
37 #include "vtkImageReader2.h"
38 #include "vtkDICOMModule.h"
39 #include "vtkDICOMConfig.h"
52 void PrintSelf(ostream& os, vtkIndent indent) VTK_DICOM_OVERRIDE;
57 return ".isq .rsq .rad .aim" ; }
61 return "SCANCO MicroCT"; }
65 int CanReadFile(
const char* filename) VTK_DICOM_OVERRIDE;
70 const char *GetVersion() {
return this->Version; }
101 vtkGetVector2Macro(DataRange,
double);
148 double GetRescaleIntercept() {
return this->RescaleIntercept; }
163 vtkGetVector3Macro(ScanDimensionsPixels,
int);
166 vtkGetVector3Macro(ScanDimensionsPhysical,
double);
177 int RequestInformation(
178 vtkInformation* request, vtkInformationVector** inputVector,
179 vtkInformationVector* outputVector) VTK_DICOM_OVERRIDE;
183 vtkInformation* request, vtkInformationVector** inputVector,
184 vtkInformationVector* outputVector) VTK_DICOM_OVERRIDE;
187 void InitializeHeader();
190 int ReadISQHeader(std::istream *file,
unsigned long bytesRead);
193 int ReadAIMHeader(std::istream *file,
unsigned long bytesRead);
200 static
int CheckVersion(const
char header[16]);
203 void DecodeDate(const
void *data,
204 int& year,
int& month,
int& day,
205 int& hour,
int& minute,
int& second,
int& millis);
208 static
int DecodeInt(const
void *data);
211 static
float DecodeFloat(const
void *data);
214 static
double StringToDouble(const
char *cp,
char **cpp=
nullptr);
217 static
int StringToInt(const
char *cp,
char **cpp=
nullptr);
220 static
double DecodeDouble(const
void *data);
226 static
void StripString(
char *dest, const
char *source,
size_t l);
230 char PatientName[42];
233 char CreationDate[32];
234 char ModificationDate[32];
235 int ScanDimensionsPixels[3];
236 double ScanDimensionsPhysical[3];
237 double SliceThickness;
238 double SliceIncrement;
239 double StartPosition;
245 int NumberOfProjections;
249 int MeasurementIndex;
251 int ReconstructionAlg;
252 double ReferenceLine;
256 char RescaleUnits[18];
257 char CalibrationData[66];
259 double RescaleIntercept;
267 #ifdef VTK_DICOM_DELETE
Superclass of binary file readers.
Definition: vtkImageReader2.h:53
virtual int CanReadFile(const char *vtkNotUsed(fname))
Definition: vtkImageReader2.h:279
virtual const char * GetFileExtensions()
Definition: vtkImageReader2.h:289
Read SCANCO ISQ and AIM medical image files.
Definition: vtkScancoCTReader.h:45
int GetRescaleType()
Get the rescale type as an integer code.
Definition: vtkScancoCTReader.h:151
int GetScannerID()
Get the scanner ID from the header.
Definition: vtkScancoCTReader.h:77
double GetReferenceLine()
Get the reference line (in millimeters).
Definition: vtkScancoCTReader.h:128
double GetSliceIncrement()
Get the slice increment in millimeters.
Definition: vtkScancoCTReader.h:89
int GetScannerType()
Get the scanner type, as an integer code.
Definition: vtkScancoCTReader.h:116
int GetReconstructionAlg()
Get an integer value that identifies the reconstruction algorithm.
Definition: vtkScancoCTReader.h:131
const char * GetDescriptiveName() VTK_DICOM_OVERRIDE
Return a descriptive name that might be useful in a GUI.
Definition: vtkScancoCTReader.h:60
double GetScanDistance()
Get the scan distance (in millimeters).
Definition: vtkScancoCTReader.h:113
int GetSite()
Get an integer value that identifies the site on the body.
Definition: vtkScancoCTReader.h:125
int GetPatientIndex()
Get the patient index from the header.
Definition: vtkScancoCTReader.h:74
double GetSampleTime()
Get the sample time (in milliseconds).
Definition: vtkScancoCTReader.h:119
const char * GetPatientName()
Get a descriptive name for this scan.
Definition: vtkScancoCTReader.h:134
int GetNumberOfProjections()
Get the number of projections.
Definition: vtkScancoCTReader.h:110
double GetSliceThickness()
Get the slice thickness in millimeters.
Definition: vtkScancoCTReader.h:86
double GetZPosition()
Get the location of the edge of a locator scan.
Definition: vtkScancoCTReader.h:98
static vtkScancoCTReader * New()
Static method for construction.
double GetEndPosition()
Get the position of the final slice in millimeters.
Definition: vtkScancoCTReader.h:95
const char * GetCalibrationData()
Get the calibration data (energy, filtration, etc.)
Definition: vtkScancoCTReader.h:160
void * GetRawHeader()
Get the raw header information (512 bytes) from the file.
Definition: vtkScancoCTReader.h:169
void PrintSelf(ostream &os, vtkIndent indent) VTK_DICOM_OVERRIDE
Print information about this object.
double GetIntensity()
Get the X-ray intensity (in mA).
Definition: vtkScancoCTReader.h:140
int GetMeasurementIndex()
Get the index measurement.
Definition: vtkScancoCTReader.h:122
double GetRescaleSlope()
Get the slope and intercept for rescaling the scalar values.
Definition: vtkScancoCTReader.h:147
double GetMuScaling()
Get the scaling factor from linear attenuation [1/cm] to data values.
Definition: vtkScancoCTReader.h:104
double GetMuWater()
Get the linear attenuation of water, in units of [1/cm].
Definition: vtkScancoCTReader.h:157
const char * GetCreationDate()
Get the creation date as a string.
Definition: vtkScancoCTReader.h:80
const char * GetModificationDate()
Get the date when the data was last modified.
Definition: vtkScancoCTReader.h:83
double GetEnergy()
Get the X-ray energy (in kVp).
Definition: vtkScancoCTReader.h:137
int GetNumberOfSamples()
Get the number of samples.
Definition: vtkScancoCTReader.h:107
const char * GetRescaleUnits()
Get the units of the data after rescaling with slope and intercept.
Definition: vtkScancoCTReader.h:154
double GetStartPosition()
Get the position of the first slice in millimeters.
Definition: vtkScancoCTReader.h:92