Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLColorTableStorageNode.h
Go to the documentation of this file.
1/*=auto=========================================================================
2
3 Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4
5 See COPYRIGHT.txt
6 or http://www.slicer.org/copyright/copyright.txt for details.
7
8 Program: 3D Slicer
9 Module: $RCSfile: vtkMRMLColorTableStorageNode.h,v $
10 Date: $Date: 2006/03/19 17:12:29 $
11 Version: $Revision: 1.8 $
12
13=========================================================================auto=*/
14
15#ifndef __vtkMRMLColorTableStorageNode_h
16#define __vtkMRMLColorTableStorageNode_h
17
18#include "vtkMRMLStorageNode.h"
19
21
27{
28public:
31 void PrintSelf(ostream& os, vtkIndent indent) override;
32
34
36 const char* GetNodeTagName() override { return "ColorTableStorage"; };
37
39 bool CanReadInReferenceNode(vtkMRMLNode* refNode) override;
40
41protected:
46
49
52
54 int ReadDataInternal(vtkMRMLNode* refNode) override;
55
56 int ReadCtblFile(std::string fullFileName, vtkMRMLColorTableNode* colorNode);
57 int ReadCsvFile(std::string fullFileName, vtkMRMLColorTableNode* colorNode);
58 std::string GetFieldDelimiterCharacters(std::string filename);
59
61 int WriteDataInternal(vtkMRMLNode* refNode) override;
62
63 int WriteCtblFile(std::string fullFileName, vtkMRMLColorTableNode* colorNode);
64 int WriteCsvFile(std::string fullFileName, vtkMRMLColorTableNode* colorNode);
65
68};
69
70#endif
MRML node to represent discrete color information.
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
vtkMRMLColorTableStorageNode(const vtkMRMLColorTableStorageNode &)
int WriteDataInternal(vtkMRMLNode *refNode) override
Write data from a referenced node.
int WriteCsvFile(std::string fullFileName, vtkMRMLColorTableNode *colorNode)
int ReadCtblFile(std::string fullFileName, vtkMRMLColorTableNode *colorNode)
int WriteCtblFile(std::string fullFileName, vtkMRMLColorTableNode *colorNode)
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
bool CanReadInReferenceNode(vtkMRMLNode *refNode) override
Return true if the node can be read in.
int ReadCsvFile(std::string fullFileName, vtkMRMLColorTableNode *colorNode)
std::string GetFieldDelimiterCharacters(std::string filename)
void PrintSelf(ostream &os, vtkIndent indent) override
void operator=(const vtkMRMLColorTableStorageNode &)
void InitializeSupportedWriteFileTypes() override
Initialize all the supported write file types.
void InitializeSupportedReadFileTypes() override
Initialize all the supported read file types.
static vtkMRMLColorTableStorageNode * New()
int MaximumColorID
maximum valid number of colors to read in
~vtkMRMLColorTableStorageNode() override
int ReadDataInternal(vtkMRMLNode *refNode) override
Read data and set it in the referenced node.