VTK: IO/MINC/vtkMNITagPointWriter.h Source File

| VTK 9.3.1

vtkMNITagPointWriter.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
27 #ifndef vtkMNITagPointWriter_h
28 #define vtkMNITagPointWriter_h
29
30 #include "vtkIOMINCModule.h" // For export macro
31 #include "vtkWriter.h"
32
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkDataSet;
35 class vtkPointSet;
36 class vtkStringArray;
37 class vtkDoubleArray;
38 class vtkIntArray;
39 class vtkPoints;
40
41 class VTKIOMINC_EXPORT vtkMNITagPointWriter : public vtkWriter
42 {
43 public:
44 vtkTypeMacro(vtkMNITagPointWriter, vtkWriter);
45
46 static vtkMNITagPointWriter* New();
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
52 virtual const char* GetFileExtensions() { return ".tag"; }
53
57 virtual const char* GetDescriptiveName() { return "MNI tags"; }
58
60
63 virtual void SetPoints(int port, vtkPoints* points);
64 virtual void SetPoints(vtkPoints* points) { this->SetPoints(0, points); }
65 virtual vtkPoints* GetPoints(int port);
66 virtual vtkPoints* GetPoints() { return this->GetPoints(0); }
68
70
74 virtual void SetLabelText(vtkStringArray* a);
75 vtkGetObjectMacro(LabelText, vtkStringArray);
77
79
83 virtual void SetWeights(vtkDoubleArray* a);
84 vtkGetObjectMacro(Weights, vtkDoubleArray);
86
88
92 virtual void SetStructureIds(vtkIntArray* a);
93 vtkGetObjectMacro(StructureIds, vtkIntArray);
95
97
101 virtual void SetPatientIds(vtkIntArray* a);
102 vtkGetObjectMacro(PatientIds, vtkIntArray);
104
106
109 vtkSetStringMacro(Comments);
110 vtkGetStringMacro(Comments);
112
116 int Write() override;
117
121 vtkMTimeType GetMTime() override;
122
124
127 vtkSetFilePathMacro(FileName);
128 vtkGetFilePathMacro(FileName);
130
131 protected:
132 vtkMNITagPointWriter();
133 ~vtkMNITagPointWriter() override;
134
135 vtkPoints* Points[2];
136 vtkStringArray* LabelText;
137 vtkDoubleArray* Weights;
138 vtkIntArray* StructureIds;
139 vtkIntArray* PatientIds;
140 char* Comments;
141
142 void WriteData() override {}
143 virtual void WriteData(vtkPointSet* inputs[2]);
144
145 int FillInputPortInformation(int port, vtkInformation* info) override;
146
147 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
148
149 char* FileName;
150
151 int FileType;
152
153 ostream* OpenFile();
154 void CloseFile(ostream* fp);
155
156 private:
157 vtkMNITagPointWriter(const vtkMNITagPointWriter&) = delete;
158 void operator=(const vtkMNITagPointWriter&) = delete;
159 };
160
161 VTK_ABI_NAMESPACE_END
162 #endif
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:40
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:44
vtkMNITagPointWriter
A writer for MNI tag point files.
Definition: vtkMNITagPointWriter.h:42
vtkMNITagPointWriter::FileType
int FileType
Definition: vtkMNITagPointWriter.h:151
vtkMNITagPointWriter::GetPoints
virtual vtkPoints * GetPoints()
Set the points (unless you set them as inputs).
Definition: vtkMNITagPointWriter.h:66
vtkMNITagPointWriter::Write
int Write() override
Write the file.
vtkMNITagPointWriter::SetWeights
virtual void SetWeights(vtkDoubleArray *a)
Set the weights (unless the input PointData has an array called Weights).
vtkMNITagPointWriter::SetLabelText
virtual void SetLabelText(vtkStringArray *a)
Set the labels (unless the input PointData has an array called LabelText).
vtkMNITagPointWriter::WriteData
void WriteData() override
Definition: vtkMNITagPointWriter.h:142
vtkMNITagPointWriter::vtkSetFilePathMacro
vtkSetFilePathMacro(FileName)
Specify file name of vtk polygon data file to write.
vtkMNITagPointWriter::vtkMNITagPointWriter
vtkMNITagPointWriter()
vtkMNITagPointWriter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkMNITagPointWriter::CloseFile
void CloseFile(ostream *fp)
vtkMNITagPointWriter::New
static vtkMNITagPointWriter * New()
vtkMNITagPointWriter::WriteData
virtual void WriteData(vtkPointSet *inputs[2])
vtkMNITagPointWriter::Comments
char * Comments
Definition: vtkMNITagPointWriter.h:140
vtkMNITagPointWriter::StructureIds
vtkIntArray * StructureIds
Definition: vtkMNITagPointWriter.h:138
vtkMNITagPointWriter::SetPoints
virtual void SetPoints(vtkPoints *points)
Set the points (unless you set them as inputs).
Definition: vtkMNITagPointWriter.h:64
vtkMNITagPointWriter::SetStructureIds
virtual void SetStructureIds(vtkIntArray *a)
Set the structure ids (unless the input PointData has an array called StructureIds).
vtkMNITagPointWriter::OpenFile
ostream * OpenFile()
vtkMNITagPointWriter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkMNITagPointWriter::Weights
vtkDoubleArray * Weights
Definition: vtkMNITagPointWriter.h:137
vtkMNITagPointWriter::LabelText
vtkStringArray * LabelText
Definition: vtkMNITagPointWriter.h:136
vtkMNITagPointWriter::SetPoints
virtual void SetPoints(int port, vtkPoints *points)
Set the points (unless you set them as inputs).
vtkMNITagPointWriter::GetPoints
virtual vtkPoints * GetPoints(int port)
Set the points (unless you set them as inputs).
vtkMNITagPointWriter::SetPatientIds
virtual void SetPatientIds(vtkIntArray *a)
Set the structure ids (unless the input PointData has an array called PatientIds).
vtkMNITagPointWriter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMNITagPointWriter::GetDescriptiveName
virtual const char * GetDescriptiveName()
Get the name of this file format.
Definition: vtkMNITagPointWriter.h:57
vtkMNITagPointWriter::GetFileExtensions
virtual const char * GetFileExtensions()
Get the extension for this file format.
Definition: vtkMNITagPointWriter.h:52
vtkMNITagPointWriter::GetMTime
vtkMTimeType GetMTime() override
Get the MTime.
vtkMNITagPointWriter::vtkGetFilePathMacro
vtkGetFilePathMacro(FileName)
Specify file name of vtk polygon data file to write.
vtkMNITagPointWriter::FileName
char * FileName
Definition: vtkMNITagPointWriter.h:149
vtkMNITagPointWriter::~vtkMNITagPointWriter
~vtkMNITagPointWriter() override
vtkMNITagPointWriter::PatientIds
vtkIntArray * PatientIds
Definition: vtkMNITagPointWriter.h:139
vtkPointSet
concrete class for storing a set of points
Definition: vtkPointSet.h:68
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:41
vtkWriter
abstract class to write data to file(s)
Definition: vtkWriter.h:35
vtkX3D::points
@ points
Definition: vtkX3D.h:446
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
vtkWriter.h