6#ifndef __vtkMRMLVolumePropertyNode_h
7#define __vtkMRMLVolumePropertyNode_h
10#include "vtkSlicerVolumeRenderingModuleMRMLExport.h"
16class vtkColorTransferFunction;
18class vtkPiecewiseFunction;
20class vtkVolumeProperty;
40 void PrintSelf(ostream& os, vtkIndent indent)
override;
67 void SetColor(vtkColorTransferFunction* newColorFunction,
int component = 0);
71 vtkColorTransferFunction*
GetColor(
int component = 0);
178 static int NodesFromString(
const std::string& dataString,
double*& data,
int nodeSize);
void operator=(const vtkMRMLStorableNode &)
A superclass for other storage nodes.
vtkMRMLVolumePropertyNode contains the transfer functions (scalar opacity, color and gradient opacity...
~vtkMRMLVolumePropertyNode() override
@ EffectiveRangeModified
Invoked when.
void SetRGBTransferFunctionAsString(std::string)
void SetGradientOpacity(vtkPiecewiseFunction *newGradientOpacity, int component=0)
static double HigherAndUnique(double value, double &previousValue)
static double NextHigher(double value)
vtkMRMLCopyContentMacro(vtkMRMLVolumePropertyNode)
vtkSmartPointer< vtkIntArray > ObservedEvents
Events observed on the transfer functions.
void SetPropertyInVolumeNode(vtkVolume *volume)
vtkMRMLStorageNode * CreateDefaultStorageNode() override
Create default storage node or nullptr if does not have one.
vtkColorTransferFunction * GetColor(int component=0)
void SetInterpolationType(int)
void SetScalarOpacityAsString(std::string)
void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) override
Reimplemented for internal reasons.
static std::string GetPiecewiseFunctionString(vtkPiecewiseFunction *function)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
static void GetPiecewiseFunctionFromString(const std::string &str, vtkPiecewiseFunction *result)
vtkMRMLVolumePropertyNode()
static int DataFromString(const std::string &dataString, double *&data)
static std::string GetColorTransferFunctionString(vtkColorTransferFunction *function)
void SetGradientOpacityAsString(std::string)
vtkVolumeProperty * VolumeProperty
Main parameters for visualization.
void SetEffectiveRange(double range[2])
void SetEffectiveRange(double min, double max)
Set effective range.
static vtkMRMLVolumePropertyNode * New()
Create a new vtkMRMLVolumePropertyNode.
static int NodesFromString(const std::string &dataString, double *&data, int nodeSize)
void CopyParameterSet(vtkMRMLNode *node)
bool IgnoreVolumePropertyChanges
void SetScalarOpacity(vtkPiecewiseFunction *newScalarOpacity, int component=0)
void SetColor(vtkColorTransferFunction *newColorFunction, int component=0)
vtkPiecewiseFunction * GetGradientOpacity(int component=0)
bool CalculateEffectiveRange()
void ReadXMLAttributes(const char **atts) override
Set node attributes.
int NumberOfIndependentComponents
The number of independent components that will be displayed on the GUI or written to json.
vtkPiecewiseFunction * GetScalarOpacity(int component=0)
void SetSpecularPower(double)
void PrintSelf(ostream &os, vtkIndent indent) override
static std::string DataToString(double *data, int size)
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
static void GetColorTransferFunctionFromString(const std::string &str, vtkColorTransferFunction *result)