GDCM 2.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

vtkGDCMPolyDataWriter.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 vtkGDCMPolyDataWriter - writer DICOM PolyData files (Contour Data...)
15 // .SECTION Description
16 // For now only support RTSTRUCT (RT Structure Set Storage)
17 // .SECTION TODO
18 // Need to do the same job for DVH Sequence/DVH Data...
19 // .SECTION Warning
20 //
21 // .SECTION See Also
22 // vtkGDCMImageReader vtkGDCMPolyDataReader vtkRTStructSetProperties
23
24
25 #ifndef VTKGDCMPOLYDATAWRITER_H
26 #define VTKGDCMPOLYDATAWRITER_H
27
28 #include "vtkPolyDataWriter.h"
29 #include "vtkStringArray.h"
30 #include "vtkStdString.h"
31
32
33 class vtkMedicalImageProperties;
34 class vtkRTStructSetProperties;
35 //BTX
36 namespace gdcm { class File; }
37 //ETX
38 class VTK_EXPORT vtkGDCMPolyDataWriter : public vtkPolyDataWriter
39 {
40 public:
41 static vtkGDCMPolyDataWriter *New();
42 vtkTypeRevisionMacro(vtkGDCMPolyDataWriter,vtkPolyDataWriter);
43 virtual void PrintSelf(ostream& os, vtkIndent indent);
44
45 // Description:
46 // Set/Get the filename of the file to be read
47 // vtkSetStringMacro(FileName);
48 // vtkGetStringMacro(FileName);
49
50 // Description:
51 // Get the medical image properties object
52 // vtkGetObjectMacro(MedicalImageProperties, vtkMedicalImageProperties);
53 virtual void SetMedicalImageProperties(vtkMedicalImageProperties *pd);
54
55 virtual void SetRTStructSetProperties(vtkRTStructSetProperties *pd);
56
57
58 //this function will initialize the contained rtstructset with
59 //the inputs of the writer and the various extra information
60 //necessary for writing a complete rtstructset.
61 //NOTE: inputs must be set BEFORE calling this function!
62 //NOTE: the number of outputs for the appendpolydata MUST MATCH the ROI vectors!
63 void InitializeRTStructSet(vtkStdString inDirectory,
64 vtkStdString inStructLabel, vtkStdString inStructName,
65 vtkStringArray* inROINames,
66 vtkStringArray* inROIAlgorithmName,
67 vtkStringArray* inROIType);
68
69 // make parent class public...
70 void SetNumberOfInputPorts(int n);
71
72 protected:
73 vtkGDCMPolyDataWriter();
74 ~vtkGDCMPolyDataWriter();
75
76 vtkMedicalImageProperties *MedicalImageProperties;
77 vtkRTStructSetProperties *RTStructSetProperties;
78
79 void WriteData();
80 //BTX
81 void WriteRTSTRUCTInfo(gdcm::File &file);
82 void WriteRTSTRUCTData(gdcm::File &file, int num);
83 //ETX
84
85 private:
86 vtkGDCMPolyDataWriter(const vtkGDCMPolyDataWriter&); // Not implemented.
87 void operator=(const vtkGDCMPolyDataWriter&); // Not implemented.
88 };
89
90 #endif