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 
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 =========================================================================*/
64 #ifndef vtkMNITransformWriter_h
65 #define vtkMNITransformWriter_h
66 
67 #include "vtkIOMINCModule.h" // For export macro
68 #include "vtkAlgorithm.h"
69 
73 class vtkGridTransform;
74 class vtkCollection;
75 
76 class VTKIOMINC_EXPORT vtkMNITransformWriter : public vtkAlgorithm
77 {
78 public:
80 
81  static vtkMNITransformWriter *New();
82  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
83 
85 
88  vtkSetStringMacro(FileName);
89  vtkGetStringMacro(FileName);
91 
95  virtual const char* GetFileExtensions() {
96  return ".xfm"; }
97 
101  virtual const char* GetDescriptiveName() {
102  return "MNI Transform"; }
103 
105 
108  virtual void SetTransform(vtkAbstractTransform *transform);
110  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:
140  ~vtkMNITransformWriter() VTK_OVERRIDE;
141 
142  char *FileName;
144  vtkCollection *Transforms;
145  char *Comments;
146 
147  int WriteLinearTransform(ostream &outfile,
148  vtkHomogeneousTransform *transform);
149  int WriteThinPlateSplineTransform(ostream &outfile,
150  vtkThinPlateSplineTransform *transform);
151  int WriteGridTransform(ostream &outfile,
152  vtkGridTransform *transform);
153 
154  virtual int WriteTransform(ostream &outfile,
155  vtkAbstractTransform *transform);
156 
157  virtual int WriteFile();
158 
159  int ProcessRequest(vtkInformation* request,
160  vtkInformationVector** inInfo,
161  vtkInformationVector* outInfo) VTK_OVERRIDE;
162 
163 private:
164  vtkMNITransformWriter(const vtkMNITransformWriter&) VTK_DELETE_FUNCTION;
165  void operator=(const vtkMNITransformWriter&) VTK_DELETE_FUNCTION;
166 
167 };
168 
169 #endif
A writer for MNI transformation files.
Store vtkAlgorithm input/output information.
superclass for homogeneous transformations
a nonlinear warp transformation
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
a simple class to control print indentation
Definition: vtkIndent.h:33
superclass for all geometric transformations
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
virtual const char * GetFileExtensions()
Get the entension for this file format.
virtual const char * GetDescriptiveName()
Get the name of this file format.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:48
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
a nonlinear warp transformation
virtual vtkAbstractTransform * GetTransform()
Set the transform.
Transform
Definition: ADIOSDefs.h:39