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);
182 int GetColumnIndex(vtkAbstractArray* column);
187 std::string GetColumnName(
int columnIndex);
191 int GetNumberOfRows();
195 int GetNumberOfColumns();
199 void SetColumnNullValue(
const std::string& columnName,
const std::string& nullValue);
200 std::string GetColumnNullValue(
const std::string& columnName);
206 void SetColumnLongName(
const std::string& columnName,
const std::string& description);
207 std::string GetColumnLongName(
const std::string& columnName);
211 void SetColumnDescription(
const std::string& columnName,
const std::string& description);
212 std::string GetColumnDescription(
const std::string& columnName);
216 void SetColumnUnitLabel(
const std::string& columnName,
const std::string& unitLabel);
217 std::string GetColumnUnitLabel(
const std::string& columnName);
223 std::string GetColumnProperty(
const std::string& columnName,
const std::string& propertyName);
224 std::string GetColumnProperty(
int columnIndex,
const std::string& propertyName);
229 void GetAllColumnPropertyNames(vtkStringArray* propertyNames);
236 void SetColumnProperty(
const std::string& columnName,
const std::string& propertyName,
const std::string& propertyValue);
237 void SetColumnProperty(
int columnIndex,
const std::string& propertyName,
const std::string& propertyValue);
243 void RemoveColumnProperty(
const std::string& propertyName);
247 void CopyAllColumnProperties(
const std::string& sourceColumnName,
const std::string& targetColumnName);
252 void RemoveAllColumnProperties(
const std::string& columnName);
253 void RemoveAllColumnProperties(
int columnIndex);
257 int GetColumnValueTypeFromSchema(
const std::string& columnName);
261 vtkIdType InsertNextBlankRowWithNullValues(vtkTable* table);
265 int GetColumnType(
const std::string& columnName);
272 bool SetColumnType(
const std::string& columnName,
int typeId);
282 bool SetDefaultColumnType(
const std::string& type,
const std::string& nullValue=
"");
285 static const char* GetDefaultColumnName();
288 static int GetValueTypeFromString(std::string valueTypeStr);
291 static std::string GetValueTypeAsString(
int valueType);
305 std::string GetColumnPropertyInternal(
const std::string& columnName,
const std::string& propertyName);
308 void SetColumnPropertyInternal(
const std::string& columnName,
const std::string& propertyName,
const std::string& propertyValue);
310 vtkIdType GetPropertyRowIndex(
const std::string& columnName);
bool UseColumnNameAsColumnHeader
virtual vtkMRMLStorageNode * CreateDefaultStorageNode()
bool UseFirstColumnAsRowHeader
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 supercalss 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.
void operator=(const vtkMRMLStorableNode &)