VTK
vtkMNITransformWriter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMNITransformWriter.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=========================================================================*/
15/*=========================================================================
16
17Copyright (c) 2006 Atamai, Inc.
18
19Use, modification and redistribution of the software, in source or
20binary forms, are permitted provided that the following terms and
21conditions are met:
22
231) Redistribution of the source code, in verbatim or modified
24 form, must retain the above copyright notice, this license,
25 the following disclaimer, and any notices that refer to this
26 license and/or the following disclaimer.
27
282) Redistribution in binary form must include the above copyright
29 notice, a copy of this license and the following disclaimer
30 in the documentation or with other materials provided with the
31 distribution.
32
333) Modified copies of the source code must be clearly marked as such,
34 and must not be misrepresented as verbatim copies of the source code.
35
36THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS"
37WITHOUT EXPRESSED OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,
38THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39PURPOSE. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR OTHER PARTY WHO MAY
40MODIFY AND/OR REDISTRIBUTE THE SOFTWARE UNDER THE TERMS OF THIS LICENSE
41BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES
42(INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA OR DATA BECOMING INACCURATE
43OR LOSS OF PROFIT OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF
44THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE
45POSSIBILITY OF SUCH DAMAGES.
46
47=========================================================================*/
67#ifndef vtkMNITransformWriter_h
68#define vtkMNITransformWriter_h
69
70#include "vtkIOMINCModule.h" // For export macro
71#include "vtkAlgorithm.h"
72
77class vtkCollection;
78
79class VTKIOMINC_EXPORT vtkMNITransformWriter : public vtkAlgorithm
80{
81public:
83
85 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
86
88
91 vtkSetStringMacro(FileName);
94
98 virtual const char* GetFileExtensions() {
99 return ".xfm"; }
100
104 virtual const char* GetDescriptiveName() {
105 return "MNI Transform"; }
106
108
111 virtual void SetTransform(vtkAbstractTransform *transform);
113 return this->Transform; };
115
121 virtual void AddTransform(vtkAbstractTransform *transform);
122
127
129
132 vtkSetStringMacro(Comments);
135
139 virtual void Write();
140
141protected:
144
145 char *FileName;
148 char *Comments;
149
150 int WriteLinearTransform(ostream &outfile,
151 vtkHomogeneousTransform *transform);
152 int WriteThinPlateSplineTransform(ostream &outfile,
153 vtkThinPlateSplineTransform *transform);
154 int WriteGridTransform(ostream &outfile,
155 vtkGridTransform *transform);
156
157 virtual int WriteTransform(ostream &outfile,
158 vtkAbstractTransform *transform);
159
160 virtual int WriteFile();
161
162 virtual int ProcessRequest(vtkInformation* request,
163 vtkInformationVector** inInfo,
164 vtkInformationVector* outInfo);
165
166private:
167 vtkMNITransformWriter(const vtkMNITransformWriter&) VTK_DELETE_FUNCTION;
168 void operator=(const vtkMNITransformWriter&) VTK_DELETE_FUNCTION;
169
170};
171
172#endif
superclass for all geometric transformations
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
a nonlinear warp transformation
superclass for homogeneous transformations
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
A writer for MNI transformation files.
virtual int WriteFile()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void AddTransform(vtkAbstractTransform *transform)
Add another transform to the file.
virtual const char * GetDescriptiveName()
Get the name of this file format.
virtual int WriteTransform(ostream &outfile, vtkAbstractTransform *transform)
virtual int GetNumberOfTransforms()
Get the number of transforms that will be written.
virtual const char * GetFileExtensions()
Get the entension for this file format.
vtkAbstractTransform * Transform
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
static vtkMNITransformWriter * New()
int WriteGridTransform(ostream &outfile, vtkGridTransform *transform)
virtual void Write()
Write the file.
virtual vtkAbstractTransform * GetTransform()
int WriteThinPlateSplineTransform(ostream &outfile, vtkThinPlateSplineTransform *transform)
int WriteLinearTransform(ostream &outfile, vtkHomogeneousTransform *transform)
virtual void SetTransform(vtkAbstractTransform *transform)
Set the transform.
a nonlinear warp transformation
Transform
Definition: ADIOSDefs.h:40
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.