New Developer Features in GIMIAS 1 3 0

From user's Wiki!
Revision as of 00:40, 26 October 2011 by Xplanes (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Rendering Tags

Added specific tags to DataEntityMetadata related to rendering properties. These properties will be used when adding the DataEntity to a RenderingTree and when saving the data to disk. This information is saved using XML format. The allowed tags are: bool, std::string, float, double, char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long and blTagMap::Pointer.

<?xml version="0" ?>
<tagmap size="10">
    <tag name="Modality" type="int">0</tag>
    <tag name="Name" type="std::string">SæallImageProps</tag>
    <tag name="Patient name" type="std::string"></tag>
    <tag name="Patient sex" type="std::string"></tag>
    <tag name="Patient birth date" type="std::string"></tag>
    <tag name="ED flag" type="std::string"></tag>
    <tag name="ES flag" type="std::string"></tag>
    <tag name="Type" type="int">2</tag>
    <tag name="MultiROILevel" type="class blSmartPointer<class blTagMap>">Unsupported value type
        <tagmap size="0" />
    <tag name="Rendering" type="class blSmartPointer<class blTagMap>">Unsupported value type
        <tagmap size="16">
            <tag name="binary" type="bool">0</tag>
            <tag name="blLookupTablesType" type="int">9</tag>
            <tag name="bounding box" type="bool">0</tag>
            <tag name="dataEntityID" type="int">1</tag>
            <tag name="dataType" type="int">2</tag>
            <tag name="in plane resample extent by geometry" type="bool">0</tag>
            <tag name="layer" type="int">0</tag>
            <tag name="name" type="std::string">1 - 1#SmallImage (Volume image, -)</tag>
            <tag name="opacity" type="float">1.0000</tag>
            <tag name="outline binary" type="bool">0</tag>
            <tag name="outline width" type="float">1.0000</tag>
            <tag name="renderingId" type="int">1</tag>
            <tag name="texture interpolation" type="bool">1</tag>
            <tag name="use color" type="bool">0</tag>
            <tag name="visible" type="bool">1</tag>
            <tag name="volumerendering" type="bool">0</tag>

Multiple Rendering Libraries

GIMIAS Framework now supports multiple rendering libraries. This new release supports CMGUI and MITK at the same time. This allows to use different visualization of DataEntities.

The main change related to this feature is that MITK dependency has been removed from gmCore. A new library has been created called gmCoreLight. gmCore mantains dependency to MITK for backwards compatibility with previous plugin versions.

To implement this feature, two classes related to rendering have been changed: MultiRenderWindow and RenderingTree. These two classes are abstract. For each rendering library you need to create a subclass and implement the interface. MultiRenderWindow has been renamed to RenderWindowBase.

  • RenderWindowBase: This window renders the DataEntities.
  • RenderingTree: Holds all DataEntities rendered in a render window and their specific rendering properties.
RenderingTree and RenderWindowBase UML class diagram

Rendering Data

Each DataEntity holds a list of Rendering data objects. Each time a DataEntity is rendered in a RenderingTree, it tries to create a rendering object for the specific rendering tree. To retrieve the rendering data, you need to pass a new parameter that specifies the typeid of the rendering data.

Combining this feature with EDOM feature, this allows to render a vtkPolyData object in a CMGUI view and in a MITK view. When the vtkPolyData needs to be rendered in a CMGUI view, a new CMGUI region object will be created and added to the rendering list.

Note that if the DataEntity processing data contains a CMGUI region and the user renders it in a CMGUI view, there's no need to create a new rendering data object. The rendering tree will get the processing data directly. However, if the user renders this DataEntity in a MITK rendering tree, a new vtkPolyData will be created using EDOM.

Rendering Properties

The rendering properties of a rendering data object have been generalized. Before, you needed to access to the mitk::RenderingNode and change a property. Now you will call the generic function

SetProperty( Core::DataEntity::Pointer, blTag::Pointer property )

Functionalities moved to MITK Plugin

These functionalities have been moved to MITK Plugin:

  • All the interactors have been moved to MITK Plugin because this interaction depends on MITK.
  • Some specific toolbars
  • All widgets that allow to change visual properties (derived from VisualPropertiesBase)
  • All data information widgets (derived from DataInformationWidgetBase)

The types of window factories have been extended to allow this kind of windows. Now the possible types are these:

  • WIDGET_TYPE_COMMAND_PANEL: Standard command panel widget
  • WIDGET_TYPE_PROCESSING_TOOL: Processing tool. Should be derived from class ProcessingWidget.
  • WIDGET_TYPE_SELECTION_TOOL: Selection tool. Should be derived from class SelectionToolWidget.
  • WIDGET_TYPE_READER_HEADER_WINDOW: Window that will show up when a new file is opened. It uses an extension to check if it needs to be opened. You can see the example SignalReaderWidget.
  • WIDGET_TYPE_RENDER_WINDOW: A render window that can be added to a customizable working area. Should be derived from class RenderWindowBase.
  • WIDGET_TYPE_DATA_INFORMATION: Provides information about data objects, like number of points or dimensions. Should be derived from DataInformationWidgetBase.
  • WIDGET_TYPE_VISUAL_PROPS: Allows to change visual properties (rendering properties). Should be derived from VisualPropertiesBase.
  • WIDGET_TYPE_RENDER_WINDOW_CONFIG: Configuration of a render window. Should be derived from RenderWindowConfigBase.
  • WIDGET_TYPE_PREFERENCES: Preferences window that will appear in the preferences menu option. Should be derived from PreferencesPage.


  • All these windows need to derive from class BaseWindow.
  • You can use the appropiate function of the class WindowConfig to set these window types.


Added a plugin that extends the framework with CMGUI functionalities.

You can read more here CMGUI Plugin


Added MITK plugin. You can read more here MITK Plugin

Upgraded VTK and ITK

VTK has been upgraded from 5.4.2 to 5.6.1 and ITK from 3.16 to 3.20.

Developer’s Upgrade guide from GIMIAS-1.2.0


Created an interface for RenderingTree. This interface is independent of the rendering library and allows to create an implementation for each rendering library. The current implementations are MITK and CMGUI. The function RenderingTree::GetNode( ) has been modified and now it returns a boost::any type:


mitk::DataTreeNode::Pointer node = m_RenderingTree->GetNode( dataEntity );


mitk::DataTreeNode::Pointer node;
Core::CastAnyProcessingData( m_renderingTree->GetNode( dataEntity ), node );

A new function has been added that allows setting and getting rendering properties for each data entity independent of the rendering library. You should use it as much as possible:

void SetProperty( Core::DataEntity::Pointer, blTag::Pointer property );
blTag::Pointer GetProperty( Core::DataEntity::Pointer, const std::string &name);


Removed dependency to MITK from the class Core::DataTreeHelper. Now you need to use Core::DataTreeMITKHelper except for the function PublishOutput( )


Core::DataTreeHelper::SetDefaultActiveScalars( dataEntity );


Core::DataTreeMITKHelper::SetDefaultActiveScalars( dataEntity );

Rendering Data

Added type_info parameter when retrieving the RenderingData. This allows handling multiple rendering data instances.


mitk::BaseData::Pointer renderingData;
Core::CastAnyProcessingData( GetSelectedContourDataEntity()->GetRenderingData(), renderingData );


boost::any anyData = dataEntity->GetRenderingData( typeid( renderingData ) );
Core::CastAnyProcessingData( anyData, renderingData );


Removed namespace mitk for the “mitk::_U” macro. This namespace was deprecated for this class that is not related to MITK.


#include "blMitkUnicode.h"
mitk::_U( "Command Line")


#include "wxUnicode.h"
_U( "Command Line")


Removed GetLandmarkSelectorWidget( ) function.


GetLandmarkSelectorWidget( )


ProcessingWidget::GetSelectionToolWidget< Core::Widgets::LandmarkSelectorWidget>( “Landmark selector” )


Moved gmInteractors to MITKPlugin.


#include "gmInteractorsWin32Header.h"



RenderWindow configuration

Added Metadata to BaseWindow. This allows to change the properties of the render window independently of the current implementation. The current supported tags for MITK render window are:

  • AxisLocked
  • LinkPlanesEnabled
  • AnnotationCubeShown
  • LayoutType
  • SlicesPlanesEnabled
  • CornerAnnotationsShown


GetMultiRenderWindow()->EnableAxis( false );
GetMultiRenderWindow()->SetPlaneRotationLinked( true );
GetMultiRenderWindow()->EnableAnnotatedCube( false );
GetMultiRenderWindow()->SetCurrentLayout( mitk::Default2x2 );


GetMultiRenderWindow()->GetMetadata()->AddTag( "AxisLocked", true );
GetMultiRenderWindow()->GetMetadata()->AddTag( "LinkPlanesEnabled", true );
GetMultiRenderWindow()->GetMetadata()->AddTag( "AnnotationCubeShown", false );
GetMultiRenderWindow()->GetMetadata()->AddTag( "LayoutType", int( mitk::Default2x2 ) );
GetMultiRenderWindow()->GetMetadata()->AddTag( "SlicesPlanesEnabled", true );
GetMultiRenderWindow()->GetMetadata()->AddTag( "CornerAnnotationsShown", false );


gmCore has been split into two libraries in order to maintain compatibility with previous version:

  • gmCoreLight: Doesn’t have dependency to MITK
  • gmCore: has dependency to MITKPlugin and gmCoreLight

If your plugin depends on MITK, you should be sure to check this item in the selected projects of CSnake.

Third parties

You need to clean the Build folder because CMake stores some cached values and paths to the old versions