Commit 3cebc60d authored by finetjul's avatar finetjul
Browse files

ENH: Redesign Volume Rendering module to support additional mappers

To add a volume rendering:
 create a new vtkMRMLVolumeRenderingDisplayNode
 create a new vtkMRMLVolumeRenderingDisplayableManager
 register your display node into vtkSlicerVolumeRenderingLogic
 register your optional widget into qSlicerVolumeRenderingModuleWidget

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20474 3bd1e089-480b-0410-8dfb-8563597acbee
parent 0bb4ddf7
......@@ -7,9 +7,10 @@ string(TOUPPER ${MODULE_NAME} MODULE_NAME_UPPER)
#-----------------------------------------------------------------------------
add_subdirectory(MRML)
add_subdirectory(Widgets)
add_subdirectory(VolumeRenderingReplacements)
add_subdirectory(Logic)
add_subdirectory(MRMLDisplayableManager)
add_subdirectory(Widgets)
#-----------------------------------------------------------------------------
set(MODULE_EXPORT_DIRECTIVE "Q_SLICER_QTMODULES_${MODULE_NAME_UPPER}_EXPORT")
......@@ -18,64 +19,41 @@ set(MODULE_EXPORT_DIRECTIVE "Q_SLICER_QTMODULES_${MODULE_NAME_UPPER}_EXPORT")
set(MODULE_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/MRML
${CMAKE_CURRENT_BINARY_DIR}/MRML
${CMAKE_CURRENT_SOURCE_DIR}/MRMLDisplayableManager
${CMAKE_CURRENT_BINARY_DIR}/MRMLDisplayableManager
${CMAKE_CURRENT_SOURCE_DIR}/Logic
${CMAKE_CURRENT_BINARY_DIR}/Logic
${CMAKE_CURRENT_SOURCE_DIR}/VolumeRenderingReplacements
${CMAKE_CURRENT_BINARY_DIR}/VolumeRenderingReplacements
${CMAKE_CURRENT_SOURCE_DIR}/Widgets
${CMAKE_CURRENT_BINARY_DIR}/Widgets
${qSlicerAnnotationsModuleWidgets_SOURCE_DIR}
${qSlicerAnnotationsModuleWidgets_BINARY_DIR}
)
set(qt_module_displayable_manager_SRCS
MRMLDisplayableManager/vtkMRMLVolumeRenderingDisplayableManager.cxx
MRMLDisplayableManager/vtkMRMLVolumeRenderingDisplayableManager.h
)
set(VTK_USE_INSTANTIATOR_NEW 1)
VTK_MAKE_INSTANTIATOR3("${MODULE_NAME}Instantiator"
qt_module_displayable_manager_instantiator_SRCS
"${qt_module_displayable_manager_SRCS}"
"${MODULE_EXPORT_DIRECTIVE}"
${CMAKE_CURRENT_BINARY_DIR}
"qSlicer${MODULE_NAME}ModuleExport.h"
)
set(MODULE_SRCS
${qt_module_displayable_manager_SRCS}
${qt_module_displayable_manager_instantiator_SRCS}
qSlicerVolumeRenderingIO.cxx
qSlicerVolumeRenderingIO.h
qSlicerVolumeRenderingSettingsPanel.cxx
qSlicerVolumeRenderingSettingsPanel.h
qSlicerVolumeRenderingModule.cxx
qSlicerVolumeRenderingModule.h
qSlicerVolumeRenderingModuleWidget.cxx
qSlicerVolumeRenderingModuleWidget.h
qSlicerVolumeRenderingSettingsPanel.cxx
qSlicerVolumeRenderingSettingsPanel.h
)
set(MODULE_MOC_SRCS
qSlicerVolumeRenderingIO.h
qSlicerVolumeRenderingSettingsPanel.h
qSlicerVolumeRenderingModule.h
qSlicerVolumeRenderingModuleWidget.h
qSlicerVolumeRenderingSettingsPanel.h
)
set(MODULE_UI_SRCS
Resources/UI/qSlicerVolumeRenderingSettingsPanel.ui
Resources/UI/qSlicerVolumeRenderingModule.ui
)
set(MODULE_TARGET_LIBRARIES
vtkSlicerVolumeRenderingModuleLogic
vtkSlicerVolumeRenderingModuleMRML
VolumeRenderingReplacements
vtkSlicer${MODULE_NAME}ModuleLogic
vtkSlicer${MODULE_NAME}ModuleMRML
vtkSlicer${MODULE_NAME}ModuleMRMLDisplayableManager
qSlicer${MODULE_NAME}ModuleWidgets
vtkSlicerAnnotationsModuleMRML
qSlicerAnnotationsModuleWidgets
qSlicerVolumeRenderingModuleWidgets
)
set(MODULE_RESOURCES
......
......@@ -46,7 +46,7 @@ bool testDefaultRenderingMethod()
vtkMRMLVolumeRenderingDisplayNode* displayNode =
logic->CreateVolumeRenderingDisplayNode();
if (logic->GetDefaultRenderingMethod() != vtkMRMLVolumeRenderingDisplayNode::None ||
if (logic->GetDefaultRenderingMethod() != 0 ||
displayNode != 0)
{
std::cerr << "vtkSlicerVolumeRenderingLogic::CreateVolumeRenderingDisplayNode():"
......@@ -60,25 +60,25 @@ bool testDefaultRenderingMethod()
logic->SetMRMLScene(scene.GetPointer());
displayNode = logic->CreateVolumeRenderingDisplayNode();
if (displayNode == 0 ||
displayNode->GetCurrentVolumeMapper() != vtkMRMLVolumeRenderingDisplayNode::VTKCPURayCast)
displayNode->IsA("vtkMRMLCPURayCastVolumeRenderingDisplayNode"))
{
std::cerr << "vtkSlicerVolumeRenderingLogic::CreateVolumeRenderingDisplayNode():"
<< __LINE__ << " failed:" << std::endl
<< displayNode << " "
<< (displayNode ? displayNode->GetCurrentVolumeMapper() : -2) << " "
<< (displayNode ? displayNode->GetClassName() : "none") << " "
<< std::endl;
return false;
}
logic->SetDefaultRenderingMethod(vtkMRMLVolumeRenderingDisplayNode::VTKGPURayCast);
logic->SetDefaultRenderingMethod("vtkMRMLGPURayCastVolumeRenderingDisplayNode");
displayNode = logic->CreateVolumeRenderingDisplayNode();
if (displayNode == 0 ||
displayNode->GetCurrentVolumeMapper() != vtkMRMLVolumeRenderingDisplayNode::VTKGPURayCast)
displayNode->IsA("vtkMRMLGPURayCastVolumeRenderingDisplayNode"))
{
std::cerr << "vtkSlicerVolumeRenderingLogic::CreateVolumeRenderingDisplayNode():"
<< __LINE__ << " failed:" << std::endl
<< displayNode << " "
<< (displayNode ? displayNode->GetCurrentVolumeMapper() : -2) << " "
<< (displayNode ? displayNode->GetClassName() : "none") << " "
<< std::endl;
return false;
}
......
......@@ -13,10 +13,16 @@
=========================================================================auto=*/
// Volume Rendering includes
#include "vtkMRMLNCIRayCastVolumeRenderingDisplayNode.h"
#include "vtkMRMLSliceLogic.h"
#include "vtkMRMLVolumeRenderingDisplayNode.h"
#include "vtkMRMLVolumeRenderingScenarioNode.h"
#include "vtkMRMLSliceLogic.h"
#include "vtkSlicerVolumeRenderingLogic.h"
#include "vtkMRMLCPURayCastVolumeRenderingDisplayNode.h"
#include "vtkMRMLNCIRayCastVolumeRenderingDisplayNode.h"
#include "vtkMRMLNCIMultiVolumeRayCastVolumeRenderingDisplayNode.h"
#include "vtkMRMLGPUTextureMappingVolumeRenderingDisplayNode.h"
#include "vtkMRMLGPURayCastVolumeRenderingDisplayNode.h"
// Annotations includes
#include <vtkMRMLAnnotationROINode.h>
......@@ -81,14 +87,29 @@ vtkStandardNewMacro(vtkSlicerVolumeRenderingLogic);
//----------------------------------------------------------------------------
vtkSlicerVolumeRenderingLogic::vtkSlicerVolumeRenderingLogic()
{
this->DefaultRenderingMethod = vtkMRMLVolumeRenderingDisplayNode::None;
this->DefaultRenderingMethod = NULL;
this->UseLinearRamp = true;
this->PresetsScene = 0;
this->RegisterRenderingMethod("VTK CPU Ray Casting",
"vtkMRMLCPURayCastVolumeRenderingDisplayNode");
this->RegisterRenderingMethod("VTK GPU Ray Casting",
"vtkMRMLGPURayCastVolumeRenderingDisplayNode");
this->RegisterRenderingMethod("VTK OpenGL 3D Texture Mapping",
"vtkMRMLGPUTextureMappingVolumeRenderingDisplayNode");
this->RegisterRenderingMethod("NCI GPU Ray Casting",
"vtkMRMLNCIRayCastVolumeRenderingDisplayNode");
//this->RegisterRenderingMethod("NCI GPU MultiVolume Ray Casting",
// "vtkMRMLNCIMultiVolumeRayCastVolumeRenderingDisplayNode");
}
//----------------------------------------------------------------------------
vtkSlicerVolumeRenderingLogic::~vtkSlicerVolumeRenderingLogic()
{
if (this->DefaultRenderingMethod)
{
delete [] this->DefaultRenderingMethod;
}
if (this->PresetsScene)
{
this->PresetsScene->Delete();
......@@ -123,6 +144,35 @@ void vtkSlicerVolumeRenderingLogic::RegisterNodes()
vtkNew<vtkMRMLVolumeRenderingDisplayNode> vrpNode;
this->GetMRMLScene()->RegisterNodeClass( vrpNode.GetPointer() );
vtkNew<vtkMRMLCPURayCastVolumeRenderingDisplayNode> cpuVRNode;
this->GetMRMLScene()->RegisterNodeClass( cpuVRNode.GetPointer() );
vtkNew<vtkMRMLNCIRayCastVolumeRenderingDisplayNode> nciNode;
this->GetMRMLScene()->RegisterNodeClass( nciNode.GetPointer() );
vtkNew<vtkMRMLNCIMultiVolumeRayCastVolumeRenderingDisplayNode> nciMVNode;
this->GetMRMLScene()->RegisterNodeClass( nciMVNode.GetPointer() );
vtkNew<vtkMRMLGPUTextureMappingVolumeRenderingDisplayNode> tmNode;
this->GetMRMLScene()->RegisterNodeClass( tmNode.GetPointer() );
vtkNew<vtkMRMLGPURayCastVolumeRenderingDisplayNode> gpuNode;
this->GetMRMLScene()->RegisterNodeClass( gpuNode.GetPointer() );
}
//----------------------------------------------------------------------------
void vtkSlicerVolumeRenderingLogic
::RegisterRenderingMethod(const char* methodName, const char* displayNodeClassName)
{
this->RenderingMethods[methodName] = displayNodeClassName;
this->Modified();
}
//----------------------------------------------------------------------------
std::map<std::string, std::string> vtkSlicerVolumeRenderingLogic
::GetRenderingMethods()
{
return this->RenderingMethods;
}
//----------------------------------------------------------------------------
......@@ -567,9 +617,13 @@ void vtkSlicerVolumeRenderingLogic
this->SetThresholdToVolumeProp(
scalarRange, threshold, prop,
this->UseLinearRamp, ignoreVolumeDisplayNodeThreshold);
// NCI raycast mapper applies a second threshold in addition to the opacity
// transfer function
vspNode->SetDepthPeelingThreshold(scalarRange[0]);
if (vtkMRMLNCIRayCastVolumeRenderingDisplayNode::SafeDownCast(vspNode))
{
// NCI raycast mapper applies a second threshold in addition to the opacity
// transfer function
vtkMRMLNCIRayCastVolumeRenderingDisplayNode::SafeDownCast(vspNode)
->SetDepthPeelingThreshold(scalarRange[0]);
}
this->SetWindowLevelToVolumeProp(
scalarRange, windowLevel, lut, prop);
vspNode->EndModify(disabledModify);
......@@ -631,7 +685,8 @@ void vtkSlicerVolumeRenderingLogic::FitROIToVolume(vtkMRMLVolumeRenderingDisplay
}
//----------------------------------------------------------------------------
vtkMRMLVolumeRenderingDisplayNode* vtkSlicerVolumeRenderingLogic::CreateVolumeRenderingDisplayNode()
vtkMRMLVolumeRenderingDisplayNode* vtkSlicerVolumeRenderingLogic
::CreateVolumeRenderingDisplayNode(const char* renderingClassName)
{
vtkMRMLVolumeRenderingDisplayNode *node = NULL;
......@@ -639,10 +694,25 @@ vtkMRMLVolumeRenderingDisplayNode* vtkSlicerVolumeRenderingLogic::CreateVolumeRe
{
return node;
}
node = vtkMRMLVolumeRenderingDisplayNode::New();
node->SetCurrentVolumeMapper(
this->DefaultRenderingMethod != vtkMRMLVolumeRenderingDisplayNode::None ?
this->DefaultRenderingMethod : vtkMRMLVolumeRenderingDisplayNode::VTKCPURayCast);
bool volumeRenderingUniqueName = true;
if (renderingClassName == 0 || strlen(renderingClassName)==0)
{
renderingClassName = this->DefaultRenderingMethod;
}
else
{
volumeRenderingUniqueName = false;
}
if (renderingClassName == 0 || strlen(renderingClassName)==0)
{
renderingClassName = "vtkMRMLCPURayCastVolumeRenderingDisplayNode";
}
node = vtkMRMLVolumeRenderingDisplayNode::SafeDownCast(
this->GetMRMLScene()->CreateNodeByClass(renderingClassName));
if (volumeRenderingUniqueName)
{
node->SetName(this->GetMRMLScene()->GenerateUniqueName("VolumeRendering").c_str());
}
this->GetMRMLScene()->AddNode(node);
node->Delete();
......
......@@ -41,6 +41,7 @@ class vtkScalarsToColors;
class vtkVolumeProperty;
// STD includes
#include <map>
#include <vector>
class vtkStringArray;
......@@ -64,12 +65,20 @@ public:
vtkTypeRevisionMacro(vtkSlicerVolumeRenderingLogic,vtkSlicerModuleLogic);
void PrintSelf(ostream& os, vtkIndent indent);
/// Inform the logic and observers that a rendering method (class deriving
/// from vtkMRMLVolumeRenderingDisplayNode) is available.
/// The event ModifiedEvent gets fired.
/// \sa GetRenderingMethods
void RegisterRenderingMethod(const char* methodName,
const char* displayNodeClassName);
/// \sa RegisterRenderingMethod
std::map<std::string, std::string> GetRenderingMethods();
/// The default rendering method is set to display nodes created in
/// CreateVolumeRenderingDisplayNode(). If no rendering method is given
/// the VTKCPURayCast is set.
/// \sa CreateVolumeRenderingDisplayNode()
vtkSetMacro(DefaultRenderingMethod, int);
vtkGetMacro(DefaultRenderingMethod, int);
vtkSetStringMacro(DefaultRenderingMethod);
vtkGetStringMacro(DefaultRenderingMethod);
/// Use a linear ramp (true) or a sharp ramp (false) when copying the volume
/// display node threshold values into the volume rendering display node.
......@@ -78,11 +87,15 @@ public:
vtkGetMacro(UseLinearRamp, bool);
/// Create and add into the scene a volume rendering display node.
/// The new node is initialized with default properties such as
/// CurrentVolumeMapper.
/// Return the created node or 0 if there is no scene.
/// The create node is of type renderingType if not null,
/// DefaultRenderingMethod if not null or
/// vtkMRMLCPURayCastVolumeRenderingDisplayNode in that order.
/// Return the created node or 0 if there is no scene or the class name
/// doesn't exist.
/// If renderingClassName is 0, the returned node has a name generated
/// using "VolumeRendering" as base name.
/// \sa setDefaultRenderingMethod()
vtkMRMLVolumeRenderingDisplayNode* CreateVolumeRenderingDisplayNode();
vtkMRMLVolumeRenderingDisplayNode* CreateVolumeRenderingDisplayNode(const char* renderingClassName = 0);
void AddVolumeRenderingDisplayNode(vtkMRMLVolumeRenderingDisplayNode* node);
void RemoveVolumeRenderingDisplayNode(vtkMRMLVolumeRenderingDisplayNode* node);
......@@ -229,7 +242,8 @@ protected:
// Update from
void UpdateVolumeRenderingDisplayNode(vtkMRMLVolumeRenderingDisplayNode* node);
int DefaultRenderingMethod;
std::map<std::string, std::string> RenderingMethods;
char* DefaultRenderingMethod;
bool UseLinearRamp;
typedef std::vector<vtkMRMLNode*> DisplayNodesType;
......@@ -237,8 +251,8 @@ protected:
bool LoadPresets(vtkMRMLScene* scene);
vtkMRMLScene* PresetsScene;
private:
private:
vtkSlicerVolumeRenderingLogic(const vtkSlicerVolumeRenderingLogic&); // Not implemented
void operator=(const vtkSlicerVolumeRenderingLogic&); // Not implemented
};
......@@ -254,4 +268,3 @@ void vtkSlicerVolumeRenderingLogic
}
#endif
......@@ -8,6 +8,16 @@ set(${KIT}_INCLUDE_DIRECTORIES
)
set(${KIT}_SRCS
vtkMRMLCPURayCastVolumeRenderingDisplayNode.cxx
vtkMRMLCPURayCastVolumeRenderingDisplayNode.h
vtkMRMLGPURayCastVolumeRenderingDisplayNode.cxx
vtkMRMLGPURayCastVolumeRenderingDisplayNode.h
vtkMRMLGPUTextureMappingVolumeRenderingDisplayNode.cxx
vtkMRMLGPUTextureMappingVolumeRenderingDisplayNode.h
vtkMRMLNCIMultiVolumeRayCastVolumeRenderingDisplayNode.cxx
vtkMRMLNCIMultiVolumeRayCastVolumeRenderingDisplayNode.h
vtkMRMLNCIRayCastVolumeRenderingDisplayNode.cxx
vtkMRMLNCIRayCastVolumeRenderingDisplayNode.h
vtkMRMLVolumePropertyNode.cxx
vtkMRMLVolumePropertyNode.h
vtkMRMLVolumePropertyStorageNode.cxx
......
/*==============================================================================
Program: 3D Slicer
Copyright (c) Kitware Inc.
See COPYRIGHT.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file was originally developed by Julien Finet, Kitware Inc.
and was partially funded by NIH grant 3P41RR013218-12S1
==============================================================================*/
// MRML includes
#include "vtkMRMLCPURayCastVolumeRenderingDisplayNode.h"
// VTK includes
#include <vtkObjectFactory.h>
// STL includes
#include <sstream>
//----------------------------------------------------------------------------
vtkMRMLNodeNewMacro(vtkMRMLCPURayCastVolumeRenderingDisplayNode);
//----------------------------------------------------------------------------
vtkMRMLCPURayCastVolumeRenderingDisplayNode::vtkMRMLCPURayCastVolumeRenderingDisplayNode()
{
this->RaycastTechnique = vtkMRMLCPURayCastVolumeRenderingDisplayNode::Composite;
}
//----------------------------------------------------------------------------
vtkMRMLCPURayCastVolumeRenderingDisplayNode::~vtkMRMLCPURayCastVolumeRenderingDisplayNode()
{
}
//----------------------------------------------------------------------------
void vtkMRMLCPURayCastVolumeRenderingDisplayNode::ReadXMLAttributes(const char** atts)
{
this->Superclass::ReadXMLAttributes(atts);
const char* attName;
const char* attValue;
while (*atts != NULL)
{
attName = *(atts++);
attValue = *(atts++);
if (!strcmp(attName,"raycastTechnique"))
{
std::stringstream ss;
ss << attValue;
ss >> this->RaycastTechnique;
continue;
}
}
}
//----------------------------------------------------------------------------
void vtkMRMLCPURayCastVolumeRenderingDisplayNode::WriteXML(ostream& of, int nIndent)
{
this->Superclass::WriteXML(of, nIndent);
vtkIndent indent(nIndent);
of << indent << " raycastTechnique=\"" << this->RaycastTechnique << "\"";
}
//----------------------------------------------------------------------------
void vtkMRMLCPURayCastVolumeRenderingDisplayNode::Copy(vtkMRMLNode *anode)
{
int wasModifying = this->StartModify();
this->Superclass::Copy(anode);
vtkMRMLCPURayCastVolumeRenderingDisplayNode *node = vtkMRMLCPURayCastVolumeRenderingDisplayNode::SafeDownCast(anode);
this->SetRaycastTechnique(node->GetRaycastTechnique());
this->EndModify(wasModifying);
}
//----------------------------------------------------------------------------
void vtkMRMLCPURayCastVolumeRenderingDisplayNode::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << "RaycastTechnique: " << this->RaycastTechnique << "\n";
}
/*==============================================================================
Program: 3D Slicer
Copyright (c) Kitware Inc.
See COPYRIGHT.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file was originally developed by Julien Finet, Kitware Inc.
and was partially funded by NIH grant 3P41RR013218-12S1
==============================================================================*/
#ifndef __vtkMRMLCPURayCastVolumeRenderingDisplayNode_h
#define __vtkMRMLCPURayCastVolumeRenderingDisplayNode_h
// Volume Rendering includes
#include "vtkMRMLVolumeRenderingDisplayNode.h"
/// \ingroup Slicer_QtModules_VolumeRendering
/// \name vtkMRMLCPURayCastCPURayCastVolumeRenderingDisplayNode
/// \brief MRML node for storing information for CPU Raycast Volume Rendering
class VTK_SLICER_VOLUMERENDERING_MODULE_MRML_EXPORT vtkMRMLCPURayCastVolumeRenderingDisplayNode
: public vtkMRMLVolumeRenderingDisplayNode
{
public:
static vtkMRMLCPURayCastVolumeRenderingDisplayNode *New();
vtkTypeMacro(vtkMRMLCPURayCastVolumeRenderingDisplayNode,vtkMRMLVolumeRenderingDisplayNode);
virtual void PrintSelf(ostream& os, vtkIndent indent);
virtual vtkMRMLNode* CreateNodeInstance();
// Description:
// Set node attributes
virtual void ReadXMLAttributes( const char** atts);
// Description:
// Write this node's information to a MRML file in XML format.
virtual void WriteXML(ostream& of, int indent);
// Description:
// Copy the node's attributes to this object
virtual void Copy(vtkMRMLNode *node);
// Description:
// Get node XML tag name (like Volume, Model)
virtual const char* GetNodeTagName() {return "CPURayCastVolumeRendering";};
vtkGetMacro (RaycastTechnique, int);
vtkSetMacro (RaycastTechnique, int);
protected:
vtkMRMLCPURayCastVolumeRenderingDisplayNode();
~vtkMRMLCPURayCastVolumeRenderingDisplayNode();
vtkMRMLCPURayCastVolumeRenderingDisplayNode(const vtkMRMLCPURayCastVolumeRenderingDisplayNode&);
void operator=(const vtkMRMLCPURayCastVolumeRenderingDisplayNode&);
/* techniques in GPU ray cast
* 0: composite with directional lighting (default)
* 1: composite with fake lighting (edge coloring, faster)
* 2: MIP
* 3: MINIP
* 4: Gradient Magnitude Opacity Modulation
* 5: Illustrative Context Preserving Exploration
* */
int RaycastTechnique;
};
#endif
/*==============================================================================
Program: 3D Slicer
Copyright (c) Kitware Inc.
See COPYRIGHT.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file was originally developed by Julien Finet, Kitware Inc.
and was partially funded by NIH grant 3P41RR013218-12S1
==============================================================================*/
// MRML includes
#include "vtkMRMLGPURayCastVolumeRenderingDisplayNode.h"
// VTK includes
#include <vtkObjectFactory.h>
// STL includes
#include <sstream>
//----------------------------------------------------------------------------
vtkMRMLNodeNewMacro(vtkMRMLGPURayCastVolumeRenderingDisplayNode);
//----------------------------------------------------------------------------
vtkMRMLGPURayCastVolumeRenderingDisplayNode::vtkMRMLGPURayCastVolumeRenderingDisplayNode()
{
this->RaycastTechnique = vtkMRMLGPURayCastVolumeRenderingDisplayNode::Composite;
}
//----------------------------------------------------------------------------
vtkMRMLGPURayCastVolumeRenderingDisplayNode::~vtkMRMLGPURayCastVolumeRenderingDisplayNode()
{
}
//----------------------------------------------------------------------------
void vtkMRMLGPURayCastVolumeRenderingDisplayNode::ReadXMLAttributes(const char** atts)
{
this->Superclass::ReadXMLAttributes(atts);
const char* attName;
const char* attValue;
while (*atts != NULL)
{
attName = *(atts++);
attValue = *(atts++);
if (!strcmp(attName,"raycastTechnique"))
{
std::stringstream ss;