VTK  9.6.20260302
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
26
27#ifndef vtkMNITagPointWriter_h
28#define vtkMNITagPointWriter_h
29
30#include "vtkIOMINCModule.h" // For export macro
31#include "vtkWriter.h"
32
33VTK_ABI_NAMESPACE_BEGIN
34class vtkDataSet;
35class vtkPointSet;
36class vtkStringArray;
37class vtkDoubleArray;
38class vtkIntArray;
39class vtkPoints;
40
41class VTKIOMINC_EXPORT vtkMNITagPointWriter : public vtkWriter
42{
43public:
45
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
122
124
130
131protected:
134
140 char* Comments;
141
142 bool WriteDataAndReturn() override { return false; }
143
144 // VTK_DEPRECATED_IN_9_7_0 remove using
145 using Superclass::WriteData;
146
147 virtual void WriteData(vtkPointSet* inputs[2]);
148
149 int FillInputPortInformation(int port, vtkInformation* info) override;
150
152
153 char* FileName;
154
156
157 ostream* OpenFile();
158 void CloseFile(ostream* fp);
159
160private:
162 void operator=(const vtkMNITagPointWriter&) = delete;
163};
164
165VTK_ABI_NAMESPACE_END
166#endif
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
int Write() override
Write the file.
virtual void SetWeights(vtkDoubleArray *a)
Set the weights (unless the input PointData has an array called Weights).
virtual void SetLabelText(vtkStringArray *a)
Set the labels (unless the input PointData has an array called LabelText).
vtkSetFilePathMacro(FileName)
Specify file name of vtk polygon data file to write.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void CloseFile(ostream *fp)
virtual const char * GetDescriptiveName()
Get the name of this file format.
virtual void WriteData(vtkPointSet *inputs[2])
bool WriteDataAndReturn() override
virtual vtkPoints * GetPoints(int port)
Set the points (unless you set them as inputs).
virtual void SetPoints(vtkPoints *points)
Set the points (unless you set them as inputs).
virtual void SetStructureIds(vtkIntArray *a)
Set the structure ids (unless the input PointData has an array called StructureIds).
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
virtual void SetPoints(int port, vtkPoints *points)
Set the points (unless you set them as inputs).
virtual vtkPoints * GetPoints()
Set the points (unless you set them as inputs).
virtual void SetPatientIds(vtkIntArray *a)
Set the structure ids (unless the input PointData has an array called PatientIds).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMTimeType GetMTime() override
Get the MTime.
vtkGetFilePathMacro(FileName)
Specify file name of vtk polygon data file to write.
static vtkMNITagPointWriter * New()
ostream * OpenFile()
~vtkMNITagPointWriter() override
virtual const char * GetFileExtensions()
Get the extension for this file format.
concrete class for storing a set of points
Definition vtkPointSet.h:98
represent and manipulate 3D points
Definition vtkPoints.h:140
a vtkAbstractArray subclass for strings
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318