GDCM
2.2.0
|
00001 /*========================================================================= 00002 00003 Program: GDCM (Grassroots DICOM). A DICOM library 00004 00005 Copyright (c) 2006-2011 Mathieu Malaterre 00006 All rights reserved. 00007 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 // .NAME vtkGDCMThreadedImageReader - read DICOM files with multiple threads 00015 // .SECTION Description 00016 // vtkGDCMThreadedImageReader is a source object that reads some DICOM files 00017 // This reader is threaded. Meaning that on a multiple core CPU with N cpu, it will 00018 // read approx N times faster than when reading in a single thread. 00019 // 00020 // .SECTION Warning: Advanced users only. Do not use this class in the general case, 00021 // you have to understand how physicaly medium works first (sequencial reading for 00022 // instance) before playing with this class 00023 // 00024 // .SECTION Implementation note: when FileLowerLeft is set to on the image is not flipped 00025 // upside down as VTK would expect, use this option only if you know what you are doing 00026 // 00027 // .SECTION FIXME: need to implement the other mode where FileLowerLeft is set to OFF 00028 // 00029 // .SECTION FIXME: you need to call SetFileName when reading a volume file (multiple slices DICOM) 00030 // since SetFileNames expect each single file to be single slice (see parent class) 00031 // 00032 // .SECTION BUG: you should really consider using vtkGDCMThreadedImageReader2 instead ! 00033 // 00034 // .SECTION See Also 00035 // vtkMedicalImageReader2 vtkMedicalImageProperties vtkGDCMThreadedImageReader2 00036 00037 #ifndef VTKGDCMTHREADEDIMAGEREADER_H 00038 #define VTKGDCMTHREADEDIMAGEREADER_H 00039 00040 #include "vtkGDCMImageReader.h" 00041 00042 class VTK_EXPORT vtkGDCMThreadedImageReader : public vtkGDCMImageReader 00043 { 00044 public: 00045 static vtkGDCMThreadedImageReader *New(); 00046 vtkTypeRevisionMacro(vtkGDCMThreadedImageReader,vtkGDCMImageReader); 00047 virtual void PrintSelf(ostream& os, vtkIndent indent); 00048 00049 // Description: 00050 // Explicitely set the Rescale Intercept (0028,1052) 00051 vtkSetMacro(Shift,double); 00052 00053 // Description: 00054 // Explicitely get/set the Rescale Slope (0028,1053) 00055 vtkSetMacro(Scale,double); 00056 00057 // Description: 00058 // Determine whether or not reader should use value from Shift/Scale 00059 // Default is 1 00060 vtkSetMacro(UseShiftScale,int); 00061 vtkGetMacro(UseShiftScale,int); 00062 vtkBooleanMacro(UseShiftScale,int); 00063 00064 // Within this class this is allowed to set the Number of Overlays from outside 00065 //vtkSetMacro(NumberOfOverlays,int); 00066 00067 protected: 00068 vtkGDCMThreadedImageReader(); 00069 ~vtkGDCMThreadedImageReader(); 00070 00071 #if (VTK_MAJOR_VERSION >= 5) || ( VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 5 ) 00072 int RequestInformation(vtkInformation *request, 00073 vtkInformationVector **inputVector, 00074 vtkInformationVector *outputVector); 00075 int RequestData(vtkInformation *request, 00076 vtkInformationVector **inputVector, 00077 vtkInformationVector *outputVector); 00078 #else /*(VTK_MAJOR_VERSION >= 5) || ( VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 5 )*/ 00079 void ExecuteInformation(); 00080 void ExecuteData(vtkDataObject *out); 00081 #endif /*(VTK_MAJOR_VERSION >= 5) || ( VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 5 )*/ 00082 00083 void ReadFiles(unsigned int nfiles, const char *filenames[]); 00084 void RequestDataCompat(); 00085 00086 private: 00087 vtkGDCMThreadedImageReader(const vtkGDCMThreadedImageReader&); // Not implemented. 00088 void operator=(const vtkGDCMThreadedImageReader&); // Not implemented. 00089 00090 int UseShiftScale; 00091 }; 00092 00093 #endif