VTK
9.2.6
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
IO
MINC
vtkMNITransformReader.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkMNITransformReader.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 vtkMNITransformReader_h
68
#define vtkMNITransformReader_h
69
70
#include "
vtkAlgorithm.h
"
71
#include "vtkIOMINCModule.h"
// For export macro
72
73
class
vtkAbstractTransform
;
74
class
vtkDoubleArray
;
75
class
vtkCollection
;
76
77
class
VTKIOMINC_EXPORT
vtkMNITransformReader
:
public
vtkAlgorithm
78
{
79
public
:
80
vtkTypeMacro(
vtkMNITransformReader
,
vtkAlgorithm
);
81
82
static
vtkMNITransformReader
*
New
();
83
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
84
86
89
vtkSetFilePathMacro
(
FileName
);
90
vtkGetFilePathMacro
(
FileName
);
92
96
virtual
const
char
*
GetFileExtensions
() {
return
".xfm"
; }
97
101
virtual
const
char
*
GetDescriptiveName
() {
return
"MNI Transform"
; }
102
106
virtual
int
CanReadFile
(
VTK_FILEPATH
const
char
* name);
107
111
virtual
int
GetNumberOfTransforms
();
112
116
virtual
vtkAbstractTransform
*
GetNthTransform
(
int
i);
117
123
virtual
vtkAbstractTransform
*
GetTransform
();
124
128
virtual
const
char
*
GetComments
();
129
130
protected
:
131
vtkMNITransformReader
();
132
~vtkMNITransformReader
()
override
;
133
134
char
*
FileName
;
135
vtkAbstractTransform
*
Transform
;
136
vtkCollection
*
Transforms
;
137
int
LineNumber
;
138
char
*
Comments
;
139
140
void
SetTransform
(
vtkAbstractTransform
* transform);
141
142
int
ReadLine
(istream& infile,
char
result[256]);
143
int
ReadLineAfterComments
(istream& infile,
char
result[256]);
144
int
SkipWhitespace
(istream& infile,
char
linetext[256],
char
** cpp);
145
int
ParseLeftHandSide
(istream& infile,
char
linetext[256],
char
** cpp,
char
identifier[256]);
146
int
ParseStringValue
(istream& infile,
char
linetext[256],
char
** cpp,
char
data[256]);
147
int
ParseFloatValues
(istream& infile,
char
linetext[256],
char
** cpp,
vtkDoubleArray
* array);
148
int
ParseInvertFlagValue
(istream& infile,
char
linetext[256],
char
** cpp,
int
* invertFlag);
149
150
int
ReadLinearTransform
(istream& infile,
char
linetext[256],
char
** cp);
151
int
ReadThinPlateSplineTransform
(istream& infile,
char
linetext[256],
char
** cp);
152
int
ReadGridTransform
(istream& infile,
char
linetext[256],
char
** cp);
153
154
virtual
int
ReadNextTransform
(istream& infile,
char
linetext[256]);
155
156
virtual
int
ReadFile
();
157
158
vtkTypeBool
ProcessRequest
(
159
vtkInformation
* request,
vtkInformationVector
** inInfo,
vtkInformationVector
* outInfo)
override
;
160
161
private
:
162
vtkMNITransformReader
(
const
vtkMNITransformReader
&) =
delete
;
163
void
operator=(
const
vtkMNITransformReader
&) =
delete
;
164
};
165
166
#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
vtkDoubleArray
dynamic, self-adjusting array of double
Definition
vtkDoubleArray.h:42
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
vtkMNITransformReader::ReadLinearTransform
int ReadLinearTransform(istream &infile, char linetext[256], char **cp)
vtkMNITransformReader::ReadLine
int ReadLine(istream &infile, char result[256])
vtkMNITransformReader::ParseInvertFlagValue
int ParseInvertFlagValue(istream &infile, char linetext[256], char **cpp, int *invertFlag)
vtkMNITransformReader::ReadLineAfterComments
int ReadLineAfterComments(istream &infile, char result[256])
vtkMNITransformReader::GetFileExtensions
virtual const char * GetFileExtensions()
Get the extension for this file format.
Definition
vtkMNITransformReader.h:96
vtkMNITransformReader::ParseLeftHandSide
int ParseLeftHandSide(istream &infile, char linetext[256], char **cpp, char identifier[256])
vtkMNITransformReader::GetTransform
virtual vtkAbstractTransform * GetTransform()
Get the transform that results from concatenating all of the transforms in the file.
vtkMNITransformReader::vtkSetFilePathMacro
vtkSetFilePathMacro(FileName)
Set the file name.
vtkMNITransformReader::vtkGetFilePathMacro
vtkGetFilePathMacro(FileName)
Set the file name.
vtkMNITransformReader::SetTransform
void SetTransform(vtkAbstractTransform *transform)
vtkMNITransformReader::~vtkMNITransformReader
~vtkMNITransformReader() override
vtkMNITransformReader::vtkMNITransformReader
vtkMNITransformReader()
vtkMNITransformReader::LineNumber
int LineNumber
Definition
vtkMNITransformReader.h:137
vtkMNITransformReader::CanReadFile
virtual int CanReadFile(VTK_FILEPATH const char *name)
Test whether the specified file can be read.
vtkMNITransformReader::ReadFile
virtual int ReadFile()
vtkMNITransformReader::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkMNITransformReader::GetNthTransform
virtual vtkAbstractTransform * GetNthTransform(int i)
Get one of the transforms listed in the file.
vtkMNITransformReader::FileName
char * FileName
Definition
vtkMNITransformReader.h:134
vtkMNITransformReader::Transforms
vtkCollection * Transforms
Definition
vtkMNITransformReader.h:136
vtkMNITransformReader::ReadNextTransform
virtual int ReadNextTransform(istream &infile, char linetext[256])
vtkMNITransformReader::ReadThinPlateSplineTransform
int ReadThinPlateSplineTransform(istream &infile, char linetext[256], char **cp)
vtkMNITransformReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMNITransformReader::ParseFloatValues
int ParseFloatValues(istream &infile, char linetext[256], char **cpp, vtkDoubleArray *array)
vtkMNITransformReader::Transform
vtkAbstractTransform * Transform
Definition
vtkMNITransformReader.h:135
vtkMNITransformReader::GetDescriptiveName
virtual const char * GetDescriptiveName()
Get the name of this file format.
Definition
vtkMNITransformReader.h:101
vtkMNITransformReader::Comments
char * Comments
Definition
vtkMNITransformReader.h:138
vtkMNITransformReader::New
static vtkMNITransformReader * New()
vtkMNITransformReader::GetComments
virtual const char * GetComments()
Get any comments that are included in the file.
vtkMNITransformReader::ReadGridTransform
int ReadGridTransform(istream &infile, char linetext[256], char **cp)
vtkMNITransformReader::GetNumberOfTransforms
virtual int GetNumberOfTransforms()
Get the number of transforms in the file.
vtkMNITransformReader::ParseStringValue
int ParseStringValue(istream &infile, char linetext[256], char **cpp, char data[256])
vtkMNITransformReader::SkipWhitespace
int SkipWhitespace(istream &infile, char linetext[256], char **cpp)
vtkTypeBool
int vtkTypeBool
Definition
vtkABI.h:69
vtkAlgorithm.h
VTK_FILEPATH
#define VTK_FILEPATH
Definition
vtkWrappingHints.h:46
Generated on
for VTK by
1.14.0