23 #ifndef __vtkMRMLTableNode_h 24 #define __vtkMRMLTableNode_h 53 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
63 virtual
void ReadXMLAttributes( const
char** atts) VTK_OVERRIDE;
67 virtual
void WriteXML(ostream& of,
int indent) VTK_OVERRIDE;
75 virtual const
char* GetNodeTagName() VTK_OVERRIDE {
return "Table"; }
79 virtual void ProcessMRMLEvents(vtkObject *caller,
unsigned long event,
void *callData) VTK_OVERRIDE;
84 virtual void SetAndObserveTable(vtkTable*
table);
85 vtkGetObjectMacro(Table, vtkTable);
103 virtual void SetAndObserveSchema(vtkTable* schema);
104 vtkGetObjectMacro(Schema, vtkTable);
108 vtkGetMacro(Locked,
bool);
109 vtkSetMacro(Locked,
bool);
112 vtkGetMacro(UseFirstColumnAsRowHeader,
bool);
113 vtkSetMacro(UseFirstColumnAsRowHeader,
bool);
117 vtkGetMacro(UseColumnNameAsColumnHeader,
bool);
118 vtkSetMacro(UseColumnNameAsColumnHeader,
bool);
132 vtkAbstractArray* AddColumn(vtkAbstractArray* column = 0);
139 bool RenameColumn(
int columnIndex, const
char* newName);
144 bool RemoveColumn(
int columnIndex);
149 bool RemoveAllColumns();
159 bool RemoveRow(
int rowIndex);
164 std::
string GetCellText(
int rowIndex,
int columnIndex);
172 bool SetCellText(
int rowIndex,
int columnIndex, const
char* text);
177 int GetColumnIndex(const
char* columnName);
178 int GetColumnIndex(const
std::
string &columnName);
183 int GetColumnIndex(vtkAbstractArray* column);
188 std::
string GetColumnName(
int columnIndex);
192 int GetNumberOfRows();
196 int GetNumberOfColumns();
200 void SetColumnNullValue(const
std::
string& columnName, const
std::
string& nullValue);
201 std::
string GetColumnNullValue(const
std::
string& columnName);
207 void SetColumnLongName(const
std::
string& columnName, const
std::
string& description);
208 std::
string GetColumnLongName(const
std::
string& columnName);
212 void SetColumnDescription(const
std::
string& columnName, const
std::
string& description);
213 std::
string GetColumnDescription(const
std::
string& columnName);
217 void SetColumnUnitLabel(const
std::
string& columnName, const
std::
string& unitLabel);
218 std::
string GetColumnUnitLabel(const
std::
string& columnName);
224 std::
string GetColumnProperty(const
std::
string& columnName, const
std::
string& propertyName);
225 std::
string GetColumnProperty(
int columnIndex, const
std::
string& propertyName);
230 void GetAllColumnPropertyNames(vtkStringArray* propertyNames);
237 void SetColumnProperty(const
std::
string& columnName, const
std::
string& propertyName, const
std::
string& propertyValue);
238 void SetColumnProperty(
int columnIndex, const
std::
string& propertyName, const
std::
string& propertyValue);
244 void RemoveColumnProperty(const
std::
string& propertyName);
248 void CopyAllColumnProperties(const
std::
string& sourceColumnName, const
std::
string& targetColumnName);
253 void RemoveAllColumnProperties(const
std::
string& columnName);
254 void RemoveAllColumnProperties(
int columnIndex);
258 int GetColumnValueTypeFromSchema(const
std::
string& columnName);
262 vtkIdType InsertNextBlankRowWithNullValues(vtkTable*
table);
266 int GetColumnType(const
std::
string& columnName);
273 bool SetColumnType(const
std::
string& columnName,
int typeId);
283 bool SetDefaultColumnType(const
std::
string& type, const
std::
string& nullValue="");
286 static const
char* GetDefaultColumnName();
289 static
int GetValueTypeFromString(
std::
string valueTypeStr);
292 static
std::
string GetValueTypeAsString(
int valueType);
306 std::
string GetColumnPropertyInternal(const
std::
string& columnName, const
std::
string& propertyName);
309 void SetColumnPropertyInternal(const
std::
string& columnName, const
std::
string& propertyName, const
std::
string& propertyValue);
311 vtkIdType GetPropertyRowIndex(const
std::
string& columnName);
319 bool UseColumnNameAsColumnHeader;
320 bool UseFirstColumnAsRowHeader;
virtual vtkMRMLStorageNode * CreateDefaultStorageNode()
virtual void ProcessMRMLEvents(vtkObject *, unsigned long, void *) VTK_OVERRIDE
alternative method to propagate events generated in Storage nodes
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE=0
MRMLNode methods.
MRML node to represent a 3D surface model.
A superclass for other storage nodes.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
MRML node to represent a table object.
Abstract Superclass for all specific types of MRML nodes.