VTK  9.3.1
vtkMNITransformWriter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) 2006 Atamai, Inc.
3 // SPDX-License-Identifier: BSD-3-Clause
23 #ifndef vtkMNITransformWriter_h
24 #define vtkMNITransformWriter_h
25 
26 #include "vtkAlgorithm.h"
27 #include "vtkIOMINCModule.h" // For export macro
28 
29 VTK_ABI_NAMESPACE_BEGIN
33 class vtkGridTransform;
34 class vtkCollection;
35 
36 class VTKIOMINC_EXPORT vtkMNITransformWriter : public vtkAlgorithm
37 {
38 public:
40 
41  static vtkMNITransformWriter* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  vtkSetFilePathMacro(FileName);
49  vtkGetFilePathMacro(FileName);
51 
55  virtual const char* GetFileExtensions() { return ".xfm"; }
56 
60  virtual const char* GetDescriptiveName() { return "MNI Transform"; }
61 
63 
66  virtual void SetTransform(vtkAbstractTransform* transform);
67  virtual vtkAbstractTransform* GetTransform() { return this->Transform; }
69 
75  virtual void AddTransform(vtkAbstractTransform* transform);
76 
80  virtual int GetNumberOfTransforms();
81 
83 
86  vtkSetStringMacro(Comments);
87  vtkGetStringMacro(Comments);
89 
93  virtual void Write();
94 
95 protected:
97  ~vtkMNITransformWriter() override;
98 
99  char* FileName;
102  char* Comments;
103 
104  int WriteLinearTransform(ostream& outfile, vtkHomogeneousTransform* transform);
105  int WriteThinPlateSplineTransform(ostream& outfile, vtkThinPlateSplineTransform* transform);
106  int WriteGridTransform(ostream& outfile, vtkGridTransform* transform);
107 
108  virtual int WriteTransform(ostream& outfile, vtkAbstractTransform* transform);
109 
110  virtual int WriteFile();
111 
113  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
114 
115 private:
117  void operator=(const vtkMNITransformWriter&) = delete;
118 };
119 
120 VTK_ABI_NAMESPACE_END
121 #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.
int vtkTypeBool
Definition: vtkABI.h:64
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:51
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkAbstractTransform * Transform
superclass for all geometric transformations
virtual const char * GetFileExtensions()
Get the extension 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:44
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
a nonlinear warp transformation
virtual vtkAbstractTransform * GetTransform()
Set the transform.