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 =========================================================================*/
66 #ifndef __vtkMNITransformWriter_h
67 #define __vtkMNITransformWriter_h
68 
69 #include "vtkAlgorithm.h"
70 
74 class vtkGridTransform;
75 class vtkCollection;
76 
78 {
79 public:
81 
82  static vtkMNITransformWriter *New();
83  virtual void PrintSelf(ostream& os, vtkIndent indent);
84 
86 
87  vtkSetStringMacro(FileName);
88  vtkGetStringMacro(FileName);
90 
92 
93  virtual const char* GetFileExtensions() {
94  return ".xfm"; }
96 
98 
99  virtual const char* GetDescriptiveName() {
100  return "MNI Transform"; }
102 
104 
105  virtual void SetTransform(vtkAbstractTransform *transform);
107  return this->Transform; };
109 
112  virtual void AddTransform(vtkAbstractTransform *transform);
113 
115  virtual int GetNumberOfTransforms();
116 
118 
119  vtkSetStringMacro(Comments);
120  vtkGetStringMacro(Comments);
122 
124  virtual void Write();
125 
126 protected:
129 
130  char *FileName;
133  char *Comments;
134 
135  int WriteLinearTransform(ostream &outfile,
136  vtkHomogeneousTransform *transform);
137  int WriteThinPlateSplineTransform(ostream &outfile,
138  vtkThinPlateSplineTransform *transform);
139  int WriteGridTransform(ostream &outfile,
140  vtkGridTransform *transform);
141 
142  virtual int WriteTransform(ostream &outfile,
143  vtkAbstractTransform *transform);
144 
145  virtual int WriteFile();
146 
147  virtual int ProcessRequest(vtkInformation* request,
148  vtkInformationVector** inInfo,
149  vtkInformationVector* outInfo);
150 
151 private:
152  vtkMNITransformWriter(const vtkMNITransformWriter&); // Not implemented
153  void operator=(const vtkMNITransformWriter&); // Not implemented
154 
155 };
156 
157 #endif
A writer for MNI transformation files.
Store vtkAlgorithm input/output information.
superclass for homogeneous transformations
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
a nonlinear warp transformation
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:59
a simple class to control print indentation
Definition: vtkIndent.h:37
vtkAbstractTransform * Transform
superclass for all geometric transformations
virtual const char * GetFileExtensions()
virtual const char * GetDescriptiveName()
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
#define VTK_HYBRID_EXPORT
a nonlinear warp transformation
virtual vtkAbstractTransform * GetTransform()
void PrintSelf(ostream &os, vtkIndent indent)