VTK
9.2.6
IO
MINC
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
17
Copyright (c) 2006 Atamai, Inc.
18
19
Use, modification and redistribution of the software, in source or
20
binary forms, are permitted provided that the following terms and
21
conditions are met:
22
23
1) 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
28
2) 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
33
3) 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
36
THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS"
37
WITHOUT EXPRESSED OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,
38
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39
PURPOSE. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR OTHER PARTY WHO MAY
40
MODIFY AND/OR REDISTRIBUTE THE SOFTWARE UNDER THE TERMS OF THIS LICENSE
41
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES
42
(INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA OR DATA BECOMING INACCURATE
43
OR LOSS OF PROFIT OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF
44
THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE
45
POSSIBILITY OF SUCH DAMAGES.
46
47
=========================================================================*/
66
67
#ifndef vtkMNITransformWriter_h
68
#define vtkMNITransformWriter_h
69
70
#include "
vtkAlgorithm.h
"
71
#include "vtkIOMINCModule.h"
// For export macro
72
73
class
vtkAbstractTransform
;
74
class
vtkHomogeneousTransform
;
75
class
vtkThinPlateSplineTransform
;
76
class
vtkGridTransform
;
77
class
vtkCollection
;
78
79
class
VTKIOMINC_EXPORT
vtkMNITransformWriter
:
public
vtkAlgorithm
80
{
81
public
:
82
vtkTypeMacro(
vtkMNITransformWriter
,
vtkAlgorithm
);
83
84
static
vtkMNITransformWriter
*
New
();
85
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
86
88
91
vtkSetFilePathMacro
(
FileName
);
92
vtkGetFilePathMacro
(
FileName
);
94
98
virtual
const
char
*
GetFileExtensions
() {
return
".xfm"
; }
99
103
virtual
const
char
*
GetDescriptiveName
() {
return
"MNI Transform"
; }
104
106
109
virtual
void
SetTransform
(
vtkAbstractTransform
* transform);
110
virtual
vtkAbstractTransform
*
GetTransform
() {
return
this->
Transform
; }
112
118
virtual
void
AddTransform
(
vtkAbstractTransform
* transform);
119
123
virtual
int
GetNumberOfTransforms
();
124
126
129
vtkSetStringMacro(
Comments
);
130
vtkGetStringMacro(
Comments
);
132
136
virtual
void
Write
();
137
138
protected
:
139
vtkMNITransformWriter
();
140
~vtkMNITransformWriter
()
override
;
141
142
char
*
FileName
;
143
vtkAbstractTransform
*
Transform
;
144
vtkCollection
*
Transforms
;
145
char
*
Comments
;
146
147
int
WriteLinearTransform
(ostream& outfile,
vtkHomogeneousTransform
* transform);
148
int
WriteThinPlateSplineTransform
(ostream& outfile,
vtkThinPlateSplineTransform
* transform);
149
int
WriteGridTransform
(ostream& outfile,
vtkGridTransform
* transform);
150
151
virtual
int
WriteTransform
(ostream& outfile,
vtkAbstractTransform
* transform);
152
153
virtual
int
WriteFile
();
154
155
vtkTypeBool
ProcessRequest
(
156
vtkInformation
* request,
vtkInformationVector
** inInfo,
vtkInformationVector
* outInfo)
override
;
157
158
private
:
159
vtkMNITransformWriter
(
const
vtkMNITransformWriter
&) =
delete
;
160
void
operator=(
const
vtkMNITransformWriter
&) =
delete
;
161
};
162
163
#endif
vtkAbstractTransform
superclass for all geometric transformations
Definition
vtkAbstractTransform.h:52
vtkAlgorithm::vtkAlgorithm
vtkAlgorithm()
vtkCollection
create and manipulate ordered lists of objects
Definition
vtkCollection.h:56
vtkGridTransform
a nonlinear warp transformation
Definition
vtkGridTransform.h:46
vtkHomogeneousTransform
superclass for homogeneous transformations
Definition
vtkHomogeneousTransform.h:35
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:40
vtkInformationVector
Store zero or more vtkInformation instances.
Definition
vtkInformationVector.h:42
vtkInformation
Store vtkAlgorithm input/output information.
Definition
vtkInformation.h:74
vtkMNITransformWriter::vtkSetFilePathMacro
vtkSetFilePathMacro(FileName)
Set the file name.
vtkMNITransformWriter::WriteFile
virtual int WriteFile()
vtkMNITransformWriter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMNITransformWriter::AddTransform
virtual void AddTransform(vtkAbstractTransform *transform)
Add another transform to the file.
vtkMNITransformWriter::GetDescriptiveName
virtual const char * GetDescriptiveName()
Get the name of this file format.
Definition
vtkMNITransformWriter.h:103
vtkMNITransformWriter::WriteTransform
virtual int WriteTransform(ostream &outfile, vtkAbstractTransform *transform)
vtkMNITransformWriter::Transforms
vtkCollection * Transforms
Definition
vtkMNITransformWriter.h:144
vtkMNITransformWriter::GetNumberOfTransforms
virtual int GetNumberOfTransforms()
Get the number of transforms that will be written.
vtkMNITransformWriter::GetFileExtensions
virtual const char * GetFileExtensions()
Get the extension for this file format.
Definition
vtkMNITransformWriter.h:98
vtkMNITransformWriter::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkMNITransformWriter::Transform
vtkAbstractTransform * Transform
Definition
vtkMNITransformWriter.h:143
vtkMNITransformWriter::FileName
char * FileName
Definition
vtkMNITransformWriter.h:142
vtkMNITransformWriter::vtkMNITransformWriter
vtkMNITransformWriter()
vtkMNITransformWriter::New
static vtkMNITransformWriter * New()
vtkMNITransformWriter::vtkGetFilePathMacro
vtkGetFilePathMacro(FileName)
Set the file name.
vtkMNITransformWriter::WriteGridTransform
int WriteGridTransform(ostream &outfile, vtkGridTransform *transform)
vtkMNITransformWriter::~vtkMNITransformWriter
~vtkMNITransformWriter() override
vtkMNITransformWriter::Write
virtual void Write()
Write the file.
vtkMNITransformWriter::Comments
char * Comments
Definition
vtkMNITransformWriter.h:145
vtkMNITransformWriter::GetTransform
virtual vtkAbstractTransform * GetTransform()
Set the transform.
Definition
vtkMNITransformWriter.h:110
vtkMNITransformWriter::WriteThinPlateSplineTransform
int WriteThinPlateSplineTransform(ostream &outfile, vtkThinPlateSplineTransform *transform)
vtkMNITransformWriter::WriteLinearTransform
int WriteLinearTransform(ostream &outfile, vtkHomogeneousTransform *transform)
vtkMNITransformWriter::SetTransform
virtual void SetTransform(vtkAbstractTransform *transform)
Set the transform.
vtkThinPlateSplineTransform
a nonlinear warp transformation
Definition
vtkThinPlateSplineTransform.h:54
vtkTypeBool
int vtkTypeBool
Definition
vtkABI.h:69
vtkAlgorithm.h
Generated on Fri Jan 24 2025 00:00:00 for VTK by
1.13.2