VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
IO
MINC
vtkMNITagPointWriter.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkMNITagPointWriter.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
15
/*=========================================================================
16
17
Copyright (c) 2006 Atamai, Inc.
18
19
Use, modification and redistribution of the software, in source or
20
binary forms, are permitted provided that the following terms and
21
conditions are met:
22
23
1) Redistribution of the source code, in verbatim or modified
24
form, must retain the above copyright notice, this license,
25
the following disclaimer, and any notices that refer to this
26
license and/or the following disclaimer.
27
28
2) Redistribution in binary form must include the above copyright
29
notice, a copy of this license and the following disclaimer
30
in the documentation or with other materials provided with the
31
distribution.
32
33
3) Modified copies of the source code must be clearly marked as such,
34
and must not be misrepresented as verbatim copies of the source code.
35
36
THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS"
37
WITHOUT EXPRESSED OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,
38
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39
PURPOSE. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR OTHER PARTY WHO MAY
40
MODIFY AND/OR REDISTRIBUTE THE SOFTWARE UNDER THE TERMS OF THIS LICENSE
41
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES
42
(INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA OR DATA BECOMING INACCURATE
43
OR LOSS OF PROFIT OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF
44
THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE
45
POSSIBILITY OF SUCH DAMAGES.
46
47
=========================================================================*/
70
#ifndef __vtkMNITagPointWriter_h
71
#define __vtkMNITagPointWriter_h
72
73
#include "vtkIOMINCModule.h"
// For export macro
74
#include "
vtkDataSetWriter.h
"
75
76
class
vtkDataSet
;
77
class
vtkPointSet
;
78
class
vtkStringArray
;
79
class
vtkDoubleArray
;
80
class
vtkIntArray
;
81
class
vtkPoints
;
82
83
class
VTKIOMINC_EXPORT
vtkMNITagPointWriter
:
public
vtkDataSetWriter
84
{
85
public
:
86
vtkTypeMacro(
vtkMNITagPointWriter
,
vtkDataSetWriter
);
87
88
static
vtkMNITagPointWriter
*
New
();
89
virtual
void
PrintSelf
(ostream& os,
vtkIndent
indent);
90
92
93
virtual
const
char
*
GetFileExtensions
() {
94
return
".tag"
; }
96
98
99
virtual
const
char
*
GetDescriptiveName
() {
100
return
"MNI tags"
; }
102
104
105
virtual
void
SetPoints(
int
port
,
vtkPoints
*
points
);
106
virtual
void
SetPoints
(
vtkPoints
*
points
) {
107
this->SetPoints(0, points); }
108
virtual
vtkPoints
*GetPoints(
int
port
);
109
virtual
vtkPoints
*
GetPoints
() {
110
return
this->GetPoints(0); }
112
114
116
virtual
void
SetLabelText(
vtkStringArray
*a);
117
vtkGetObjectMacro(LabelText,
vtkStringArray
);
119
121
123
virtual
void
SetWeights(
vtkDoubleArray
*a);
124
vtkGetObjectMacro(Weights,
vtkDoubleArray
);
126
128
130
virtual
void
SetStructureIds(
vtkIntArray
*a);
131
vtkGetObjectMacro(StructureIds,
vtkIntArray
);
133
135
137
virtual
void
SetPatientIds(
vtkIntArray
*a);
138
vtkGetObjectMacro(PatientIds,
vtkIntArray
);
140
142
143
vtkSetStringMacro(Comments);
144
vtkGetStringMacro
(Comments);
146
148
virtual
int
Write
();
149
151
virtual
unsigned
long
GetMTime
();
152
153
protected
:
154
vtkMNITagPointWriter
();
155
~
vtkMNITagPointWriter
();
156
157
vtkPoints
*Points[2];
158
vtkStringArray
*
LabelText
;
159
vtkDoubleArray
*
Weights
;
160
vtkIntArray
*
StructureIds
;
161
vtkIntArray
*
PatientIds
;
162
char
*
Comments
;
163
164
virtual
void
WriteData
() {};
165
virtual
void
WriteData
(
vtkPointSet
*inputs[2]);
166
167
int
FillInputPortInformation
(
int
port
,
vtkInformation
*
info
);
168
169
int
RequestData
(
vtkInformation
*,
vtkInformationVector
**,
170
vtkInformationVector
*);
171
172
private
:
173
vtkMNITagPointWriter
(
const
vtkMNITagPointWriter
&);
// Not implemented
174
void
operator=(
const
vtkMNITagPointWriter
&);
// Not implemented
175
176
};
177
178
#endif
Generated on Thu May 24 2012 22:22:30 for VTK by
1.8.1