GDCM: vtkGDCMThreadedImageReader.h Source File

GDCM 3.2.10

vtkGDCMThreadedImageReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
14// .NAME vtkGDCMThreadedImageReader - read DICOM files with multiple threads
15// .SECTION Description
16// vtkGDCMThreadedImageReader is a source object that reads some DICOM files
17// This reader is threaded. Meaning that on a multiple core CPU with N cpu, it will
18// read approx N times faster than when reading in a single thread.
19//
20// .SECTION Warning: Advanced users only. Do not use this class in the general case,
21// you have to understand how physically medium works first (sequential reading for
22// instance) before playing with this class
23//
24// .SECTION Implementation note: when FileLowerLeft is set to on the image is not flipped
25// upside down as VTK would expect, use this option only if you know what you are doing
26//
27// .SECTION FIXME: need to implement the other mode where FileLowerLeft is set to OFF
28//
29// .SECTION FIXME: you need to call SetFileName when reading a volume file (multiple slices DICOM)
30// since SetFileNames expect each single file to be single slice (see parent class)
31//
32// .SECTION BUG: you should really consider using vtkGDCMThreadedImageReader2 instead !
33//
34// .SECTION See Also
35// vtkMedicalImageReader2 vtkMedicalImageProperties vtkGDCMThreadedImageReader2
36
37#ifndef VTKGDCMTHREADEDIMAGEREADER_H
38#define VTKGDCMTHREADEDIMAGEREADER_H
39
40#include "vtkgdcmModule.h"
41#include "vtkGDCMImageReader.h"
42#include "vtkVersion.h"
43
44 class VTKGDCM_EXPORT vtkGDCMThreadedImageReader : public vtkGDCMImageReader
45{
46public:
47 static vtkGDCMThreadedImageReader *New();
48 vtkTypeMacro(vtkGDCMThreadedImageReader,vtkGDCMImageReader);
49 virtual void PrintSelf(ostream& os, vtkIndent indent);
50
51 // Description:
52 // Explicitly set the Rescale Intercept (0028,1052)
53 vtkSetMacro(Shift,double);
54
55 // Description:
56 // Explicitly get/set the Rescale Slope (0028,1053)
57 vtkSetMacro(Scale,double);
58
59 // Description:
60 // Determine whether or not reader should use value from Shift/Scale
61 // Default is 1
62 vtkSetMacro(UseShiftScale,int);
63 vtkGetMacro(UseShiftScale,int);
64 vtkBooleanMacro(UseShiftScale,int);
65
66 // Within this class this is allowed to set the Number of Overlays from outside
67 //vtkSetMacro(NumberOfOverlays,int);
68
69protected:
70 vtkGDCMThreadedImageReader();
71 ~vtkGDCMThreadedImageReader();
72
73#if (VTK_MAJOR_VERSION >= 5) || ( VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 5 )
74 int RequestInformation(vtkInformation *request,
75 vtkInformationVector **inputVector,
76 vtkInformationVector *outputVector);
77 int RequestData(vtkInformation *request,
78 vtkInformationVector **inputVector,
79 vtkInformationVector *outputVector);
80#else /*(VTK_MAJOR_VERSION >= 5) || ( VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 5 )*/
81 void ExecuteInformation();
82 void ExecuteData(vtkDataObject *out);
83#endif /*(VTK_MAJOR_VERSION >= 5) || ( VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 5 )*/
84
85 void ReadFiles(unsigned int nfiles, const char *filenames[]);
86 void RequestDataCompat();
87
88private:
89 vtkGDCMThreadedImageReader(const vtkGDCMThreadedImageReader&); // Not implemented.
90 void operator=(const vtkGDCMThreadedImageReader&); // Not implemented.
91
92 int UseShiftScale;
93};
94
95#endif
vtkGDCMImageReader::Shift
double Shift
Definition vtkGDCMImageReader.h:299
vtkGDCMImageReader::vtkGDCMImageReader
vtkGDCMImageReader()
vtkGDCMImageReader::Scale
double Scale
Definition vtkGDCMImageReader.h:300
vtkGDCMThreadedImageReader::RequestDataCompat
void RequestDataCompat()
vtkGDCMThreadedImageReader::ReadFiles
void ReadFiles(unsigned int nfiles, const char *filenames[])
vtkGDCMThreadedImageReader::vtkSetMacro
vtkSetMacro(UseShiftScale, int)
vtkGDCMThreadedImageReader::vtkBooleanMacro
vtkBooleanMacro(UseShiftScale, int)
vtkGDCMThreadedImageReader::ExecuteData
void ExecuteData(vtkDataObject *out)
vtkGDCMThreadedImageReader::~vtkGDCMThreadedImageReader
~vtkGDCMThreadedImageReader()
vtkGDCMThreadedImageReader::vtkTypeMacro
vtkTypeMacro(vtkGDCMThreadedImageReader, vtkGDCMImageReader)
vtkGDCMThreadedImageReader::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkGDCMThreadedImageReader::vtkSetMacro
vtkSetMacro(Scale, double)
vtkGDCMThreadedImageReader::vtkGDCMThreadedImageReader
vtkGDCMThreadedImageReader()
vtkGDCMThreadedImageReader::New
static vtkGDCMThreadedImageReader * New()
vtkGDCMThreadedImageReader::vtkSetMacro
vtkSetMacro(Shift, double)
vtkGDCMThreadedImageReader::vtkGetMacro
vtkGetMacro(UseShiftScale, int)
vtkGDCMThreadedImageReader::ExecuteInformation
void ExecuteInformation()
vtkGDCMImageReader.h