Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLNRRDStorageNode.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: vtkMRMLNRRDStorageNode.h,v $
10  Date: $Date: 2006/03/19 17:12:29 $
11  Version: $Revision: 1.8 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLNRRDStorageNode_h
16 #define __vtkMRMLNRRDStorageNode_h
17 
18 #include "vtkMRMLStorageNode.h"
19 class vtkDoubleArray;
20 class vtkTeemNRRDReader;
21 
26 class VTK_MRML_EXPORT vtkMRMLNRRDStorageNode : public vtkMRMLStorageNode
27 {
28  public:
29  static vtkMRMLNRRDStorageNode *New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
33  vtkMRMLNode* CreateNodeInstance() override;
34 
37  void ReadXMLAttributes( const char** atts) override;
38 
41  void WriteXML(ostream& of, int indent) override;
42 
45  void Copy(vtkMRMLNode *node) override;
46 
49  const char* GetNodeTagName() override {return "NRRDStorage";}
50 
53  vtkGetMacro(CenterImage, int);
54  vtkSetMacro(CenterImage, int);
55 
58  int ParseDiffusionInformation(vtkTeemNRRDReader *reader,vtkDoubleArray *grad,vtkDoubleArray *bvalues);
59 
61  bool CanReadInReferenceNode(vtkMRMLNode *refNode) override;
62 
67  void ConfigureForDataExchange() override;
68 
70  std::string GetCompressionParameterFastest() { return "gzip_fastest"; };
72  std::string GetCompressionParameterNormal() { return "gzip_normal"; };
74  std::string GetCompressionParameterMinimumSize() { return "gzip_minimum_size"; };
75 
76 protected:
78  ~vtkMRMLNRRDStorageNode() override;
80  void operator=(const vtkMRMLNRRDStorageNode&);
81 
83  void InitializeSupportedReadFileTypes() override;
84 
86  void InitializeSupportedWriteFileTypes() override;
87 
89  int ReadDataInternal(vtkMRMLNode *refNode) override;
90 
92  int WriteDataInternal(vtkMRMLNode *refNode) override;
93 
95  int GetGzipCompressionLevelFromCompressionParameter(std::string parameter);
96 
98 };
99 
100 #endif
vtkMRMLNode * CreateNodeInstance() override=0
Create instance of the default node. Like New only virtual.
virtual int ReadDataInternal(vtkMRMLNode *refNode)
virtual void ConfigureForDataExchange()
virtual void InitializeSupportedReadFileTypes()
void operator=(const vtkMRMLStorageNode &)
MRML node for representing a volume storage.
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object
void PrintSelf(ostream &os, vtkIndent indent) override
std::string GetCompressionParameterMinimumSize()
Compression parameter corresponding to maximum compression (slow)
std::string GetCompressionParameterNormal()
Compression parameter corresponding to normal compression.
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
A superclass for other storage nodes.
virtual void InitializeSupportedWriteFileTypes()
Reads Nearly Raw Raster Data files.
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
virtual int WriteDataInternal(vtkMRMLNode *refNode)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
std::string GetCompressionParameterFastest()
Compression parameter corresponding to minimum compression (fast)
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode)=0