VTK
vtkNIFTIImageWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkNIFTIImageWriter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
35 #ifndef vtkNIFTIImageWriter_h
36 #define vtkNIFTIImageWriter_h
37 
38 #include "vtkIOImageModule.h" // For export macro
39 #include "vtkImageWriter.h"
40 
41 class vtkMatrix4x4;
43 
45 {
46 public:
48 
49  static vtkNIFTIImageWriter *New();
52 
54  virtual void PrintSelf(ostream& os, vtkIndent indent);
55 
57 
61  vtkSetMacro(NIFTIVersion, int);
62  vtkGetMacro(NIFTIVersion, int);
64 
66 
68  vtkSetStringMacro(Description);
69  vtkGetStringMacro(Description);
71 
73 
78  vtkGetMacro(TimeDimension, int);
79  vtkSetMacro(TimeDimension, int);
80  vtkGetMacro(TimeSpacing, double);
81  vtkSetMacro(TimeSpacing, double);
83 
85 
91  vtkSetMacro(RescaleSlope, double);
92  vtkGetMacro(RescaleSlope, double);
93  vtkSetMacro(RescaleIntercept, double);
94  vtkGetMacro(RescaleIntercept, double);
96 
98 
101  vtkSetMacro(QFac, double);
102  vtkGetMacro(QFac, double);
104 
106 
111  void SetQFormMatrix(vtkMatrix4x4 *);
112  vtkMatrix4x4 *GetQFormMatrix() { return this->QFormMatrix; }
114 
116 
121  void SetSFormMatrix(vtkMatrix4x4 *);
122  vtkMatrix4x4 *GetSFormMatrix() { return this->SFormMatrix; }
124 
126 
131  void SetNIFTIHeader(vtkNIFTIImageHeader *hdr);
132  vtkNIFTIImageHeader *GetNIFTIHeader();
134 
135 protected:
138 
140  int GenerateHeader(vtkInformation *info, bool singleFile);
141 
143 
144  virtual int RequestData(vtkInformation *request,
145  vtkInformationVector** inputVector,
146  vtkInformationVector* outputVector);
148 
150 
154  static char *ReplaceExtension(
155  const char *fname, const char *ext1, const char *ext2);
157 
159 
161  double TimeSpacing;
163 
165 
167  double RescaleSlope;
169 
172  double QFac;
173 
175 
179 
181  char *Description;
182 
184 
189 
190 private:
191  vtkNIFTIImageWriter(const vtkNIFTIImageWriter&); // Not implemented.
192  void operator=(const vtkNIFTIImageWriter&); // Not implemented.
193 };
194 
195 #endif // vtkNIFTIImageWriter_h
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:38
Store vtkAlgorithm input/output information.
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
vtkNIFTIImageHeader * NIFTIHeader
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:94
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:632
vtkMatrix4x4 * SFormMatrix
vtkMatrix4x4 * QFormMatrix
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Writes images to files.
#define vtkGetStringMacro(name)
Definition: vtkSetGet.h:120
static vtkImageWriter * New()
vtkNIFTIImageHeader * OwnHeader
void PrintSelf(ostream &os, vtkIndent indent)
vtkMatrix4x4 * GetQFormMatrix()
Write NIfTI-1 and NIfTI-2 medical image files.
Store zero or more vtkInformation instances.
#define VTKIOIMAGE_EXPORT
Store NIfTI header information.
vtkMatrix4x4 * GetSFormMatrix()
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69