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 
104  vtkGetMacro(PlanarRGB, bool);
105  vtkSetMacro(PlanarRGB, bool);
106  vtkBooleanMacro(PlanarRGB, bool);
108 
110 
113  vtkSetMacro(QFac, double);
114  vtkGetMacro(QFac, double);
116 
118 
123  void SetQFormMatrix(vtkMatrix4x4 *);
124  vtkMatrix4x4 *GetQFormMatrix() { return this->QFormMatrix; }
126 
128 
133  void SetSFormMatrix(vtkMatrix4x4 *);
134  vtkMatrix4x4 *GetSFormMatrix() { return this->SFormMatrix; }
136 
138 
143  void SetNIFTIHeader(vtkNIFTIImageHeader *hdr);
144  vtkNIFTIImageHeader *GetNIFTIHeader();
146 
147 protected:
150 
152  int GenerateHeader(vtkInformation *info, bool singleFile);
153 
155 
156  virtual int RequestData(vtkInformation *request,
157  vtkInformationVector** inputVector,
158  vtkInformationVector* outputVector);
160 
162 
166  static char *ReplaceExtension(
167  const char *fname, const char *ext1, const char *ext2);
169 
171 
173  double TimeSpacing;
175 
177 
179  double RescaleSlope;
181 
184  double QFac;
185 
187 
191 
193  char *Description;
194 
196 
201 
203  bool PlanarRGB;
204 
205 private:
206  vtkNIFTIImageWriter(const vtkNIFTIImageWriter&); // Not implemented.
207  void operator=(const vtkNIFTIImageWriter&); // Not implemented.
208 };
209 
210 #endif // vtkNIFTIImageWriter_h
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:38
Store vtkAlgorithm input/output information.
vtkNIFTIImageHeader * NIFTIHeader
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.
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()