vtkGDCMThreadedImageReader.h

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

Generated on Sun Mar 7 03:17:21 2010 for GDCM by doxygen 1.6.3
SourceForge.net Logo