VTK  9.3.0
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 
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
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:
98 
99  char* FileName;
102  char* Comments;
103 
104  int WriteLinearTransform(ostream& outfile, vtkHomogeneousTransform* 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
superclass for all geometric transformations
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:52
create and manipulate ordered lists of objects
Definition: vtkCollection.h:45
a nonlinear warp transformation
superclass for homogeneous transformations
a simple class to control print indentation
Definition: vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
A writer for MNI transformation files.
vtkSetFilePathMacro(FileName)
Set the file name.
virtual int WriteFile()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void AddTransform(vtkAbstractTransform *transform)
Add another transform to the file.
static vtkMNITransformWriter * New()
virtual int WriteTransform(ostream &outfile, vtkAbstractTransform *transform)
virtual int GetNumberOfTransforms()
Get the number of transforms that will be written.
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkAbstractTransform * Transform
vtkGetFilePathMacro(FileName)
Set the file name.
int WriteGridTransform(ostream &outfile, vtkGridTransform *transform)
~vtkMNITransformWriter() override
virtual void Write()
Write the file.
virtual const char * GetDescriptiveName()
Get the name of this file format.
virtual const char * GetFileExtensions()
Get the extension for this file format.
int WriteThinPlateSplineTransform(ostream &outfile, vtkThinPlateSplineTransform *transform)
int WriteLinearTransform(ostream &outfile, vtkHomogeneousTransform *transform)
virtual void SetTransform(vtkAbstractTransform *transform)
Set the transform.
virtual vtkAbstractTransform * GetTransform()
Set the transform.
a nonlinear warp transformation
@ Transform
Definition: vtkX3D.h:41
int vtkTypeBool
Definition: vtkABI.h:64