Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkITKImageSequenceWriter.h
Go to the documentation of this file.
1/*==========================================================================
2
3 Copyright (c) Ebatinca S.L., Las Palmas de Gran Canaria, Spain
4
5 See COPYRIGHT.txt
6 or http://www.slicer.org/copyright/copyright.txt for details.
7
8 Unless required by applicable law or agreed to in writing, software
9 distributed under the License is distributed on an "AS IS" BASIS,
10 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 See the License for the specific language governing permissions and
12 limitations under the License.
13
14 This file was originally developed by Csaba Pinter, Ebatinca, funded
15 by the grant GRT-00000485 of Children's Hospital of Philadelphia, USA.
16
17==========================================================================*/
18
19#ifndef __vtkITKImageSequenceWriter_h
20#define __vtkITKImageSequenceWriter_h
21
22#include "vtkImageAlgorithm.h"
23#include "vtkImageData.h"
24#include "vtkObjectFactory.h"
25#include "vtkMatrix4x4.h"
26
27#include "vtkITK.h"
28#include "vtkITKImageWriter.h"
29#include "itkImageIOBase.h"
30
31class vtkStringArray;
32class AttributeMapType;
33class AxisInfoMapType;
34
35class VTK_ITK_EXPORT vtkITKImageSequenceWriter : public vtkImageAlgorithm
36{
37public:
39 vtkTypeMacro(vtkITKImageSequenceWriter, vtkImageAlgorithm);
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
44 vtkGetMacro(UseCompression, int);
45 vtkSetMacro(UseCompression, int);
46 vtkBooleanMacro(UseCompression, int);
47
50 vtkGetStringMacro(FileName);
51 vtkSetStringMacro(FileName);
52
55 vtkGetStringMacro(ImageIOClassName);
56 vtkSetStringMacro(ImageIOClassName);
57
59 void Write();
60
62 void SetRasToIJKMatrix(vtkMatrix4x4* mat) { RasToIJKMatrix = mat; }
63
66 vtkSetMacro(VoxelVectorType, int);
67 vtkGetMacro(VoxelVectorType, int);
68
70 vtkSetStringMacro(IntentCode);
71 vtkGetStringMacro(IntentCode);
72
74 void SetAttribute(const std::string& name, const std::string& value);
76 AttributeMapType* GetAttributes() const { return this->Attributes; }
77
79 void SetAxisLabel(unsigned int axis, const char* label);
81 AxisInfoMapType* GetAxisLabels() const { return this->AxisLabels; }
82
84 void SetAxisUnit(unsigned int axis, const char* unit);
86 AxisInfoMapType* GetAxisUnits() const { return this->AxisUnits; }
87
88protected:
91
95 int FillInputPortInformation(int port, vtkInformation* info) override;
96
97protected:
98 char* FileName{ nullptr };
99 vtkMatrix4x4* RasToIJKMatrix{ nullptr };
101 char* ImageIOClassName{ nullptr };
103 char* IntentCode{ nullptr };
104
105 AttributeMapType* Attributes;
106 AxisInfoMapType* AxisLabels;
107 AxisInfoMapType* AxisUnits;
108
109private:
111 void operator=(const vtkITKImageSequenceWriter&) = delete;
112};
113
114#endif
void SetAttribute(const std::string &name, const std::string &value)
Method to set an attribute that will be passed into the NRRD file on write.
AttributeMapType * GetAttributes() const
Get the attributes map.
void SetAxisLabel(unsigned int axis, const char *label)
Method to set label for each axis.
void SetRasToIJKMatrix(vtkMatrix4x4 *mat)
Set orientation matrix.
void Write()
The main interface which triggers the writer to start.
void SetAxisUnit(unsigned int axis, const char *unit)
Method to set unit for each axis.
static vtkITKImageSequenceWriter * New()
void PrintSelf(ostream &os, vtkIndent indent) override
~vtkITKImageSequenceWriter() override
AxisInfoMapType * GetAxisLabels() const
Get the axis labels map.
AxisInfoMapType * GetAxisUnits() const
Get the axis units map.
int FillInputPortInformation(int port, vtkInformation *info) override