Difference between revisions of "New Developer Features in GIMIAS 1 6"

From user's Wiki!
Jump to: navigation, search
(GIMIAS-1.6.r1 (in progress))
(GIMIAS-1.6.r1 (in progress))
Line 7: Line 7:
* Comments:  
* Comments:  
* Changelog ([http://sourceforge.net/apps/mantisbt/gimias/search.php?project_id=1&sticky_issues=off&fixed_in_version=1.6.r1&sortby=last_updated&dir=DESC&hide_status_id=-2 MantisBT]):
* Changelog ([http://sourceforge.net/apps/mantisbt/gimias/search.php?project_id=1&sticky_issues=off&fixed_in_version=1.6.r1&sortby=last_updated&dir=DESC&hide_status_id=-2 MantisBT]):
** [http://sourceforge.net/apps/mantisbt/gimias/view.php?id=448 FIX #0448: Add an option to create a surface mesh in the Interactive Segmentation]
** [http://sourceforge.net/apps/mantisbt/gimias/view.php?id=447 FIX #0447: Input selector control does not select correctly between image and mask image]
** [http://sourceforge.net/apps/mantisbt/gimias/view.php?id=447 FIX #0447: Input selector control does not select correctly between image and mask image]
** [http://sourceforge.net/apps/mantisbt/gimias/view.php?id=446 ENH #0446: Cannot read/write standard CSV files]
** [http://sourceforge.net/apps/mantisbt/gimias/view.php?id=446 ENH #0446: Cannot read/write standard CSV files]

Latest revision as of 04:27, 22 February 2013

GIMIAS-1.6.r1 (in progress)

ENH #0446: Cannot read/write standard CSV files

Standard CSV files use this format:


When reading/writing this files, the information will be stored in a blTagMap with the following structure as a std::string:

  • tag1: (key1) value11;value21;value31
  • tag2: (key2) value12;value22;value32
  • tag2: (key3) value13;value23;value33

Volume Rendering

This section describes the issues 0444, 0443, 0442, 0441 and 0439.

The name of the volume rendering transfer function is not very descriptive and there are a lot of controls. To reduce this complexity, a snapshot has been added for each transfer function and the controls are grouped by its functionality.

Volume rendering

Transfer Function editor allows importing a transfer function from ImageVis3D software as ".1dt" format. This allows to compare the volume rendering applied to the same object. For example, the "hand" sample data set has been used to compare the volume rendering in both applications.

Imported ImageVis3D Transfer Function

Comparing volume rendering of the same dataset and the same transfer function, shows a lower quality compared to ImageVis3D. The UseCompressedTexture flag was set to true in the MITK volume rendering mapper (GPUVolumeMapper3D). Changing it to false, changes the quality to the same level as ImageVis3D. In the figure bellow you can appreciate the difference before and after changing the UseCompressedTexture flag in GIMIAS.

Compare texture GPU volume rendering with/without texture compression in GIMIAS

The maximum quality of the volume rendering is controlled settings the number of texture planes. The Sample Distance slider allows controlling this parameter to adjust the quality of the volume rendering depending on the input dataset. In the figure bellow you can appreciate the difference between a sample distance of 2 and a sample distance of 0.1.

Sample Distance of 0.1
Sample Distance of 2

The Shift slider allows shifting the transfer function to the left or to the right across the intensity levels of the volume image pixels. This feature helps to better adjust the transfer function to the rendered dataset.

Shift Transfer Function to see the skin
Shift Transfer Function to see the bones

The Volume Rendering window looks like this:

Volume Rendering window

An example of Volume Rendering using CARDIX dataset from OSIRIX:

Volume Rendering of CARDIX dataset

ENH #0438: Cannot see all available tools in plugin selector

In the plugin selector, the GIMIAS plugins are shown as items with just the name of the plugin. Is not possible to know what are the available tools in each plugin. For example, in the MeshEditorPlugin, there are a lot of tools for mesh editing. For the end user, is difficult to search a specific tool that is available in the GIMIAS plugins.

In order to facilitate this, all GIMIAS plugins will show the available tools as children items. When clicking on a specific item, the description and the online documentation will be shown at the bottom.

Plugin selector

FIX #0417: GIMIAS takes 20 sec. to start in debug mode

Enabling just the MITK and SceneView plugin, GIMIAS takes 26 seconds to start in Debug mode. It will be interesting to reduce this start-up time for developers that are working on a GIMIAS plugin.

To analyse the start-up, the VS2010 profile tool has been used. Most of the time is taken when initializing OpenGL. In order to reduce this time, one option is to execute the different plugin providers in parallel in a secondary thread and send to the main GUI thread the GUI tasks. Initial tests show that this can reduce the start-up time to 15 seconds (42% of reduction).

The main window will be the responsible to update all the plugin providers. It will delegate the responsibility to the class PluginSelectorWidget. When the providers needs to be updated:

  • Adds an observer to each provider, that is derived from the class BaseProcessor and sends it for background execution
  • Executes the function OnStartLoading( ) to initialize framework before loading plugins
  • The provider will scan the plugins
  • When the plugins are going to be loaded, - this task should be executed by the main GUI thread - it will call the function UpdateOuptut( ) for each plugin
  • The main GUI thread will receive the information about the plugin to load/unload using a blTagMap and call the function LoadPlugin/UnLoadPlugin for the current provider.
  • Executes the function OnStopLoading( ) to initialize framework after loading plugins

The information messages will be sent to the main GUI thread using the UpdateCallback class and the function AddInformationMessage( ).

ENH #0402: Integrate MSV working area with metadata information

MSV working area allows visualization of data objects using tool tips and VTK buttons to navigate. Read more in MSV Plugin.

MSV working area with VTK buttons

ENH #0407: Add preview image for DataEntity

The interface class Core::DataEntityPreview is used for managing a preview image of a DataEntity. A concrete implementation is MITKPreview that uses wxImage to store/load/save the preview.

When a DataEntity is created, it searches the FactoryManager for an implementation of DataEntityPreview interface class and creates an instance.

The preview image is loaded/saved when the DataEntity is loaded/saved.

This class is used in MSV Plugin.

Upgrade guide from GIMIAS-1.5 to GIMIAS-1.6

ENH #0388: Automatically unregister Factory instances when unloading a plugin

Added the function RegisterFactory( ) in wxMitkGraphicalInterface class to register a Factory to FactoryManager. The function will atomatically keep track of the current plugin that is registering the factory and unregister it automatically when unloading the plugin.

There's an example in SSHPlugin that registers the SSHPluginProvider:

   SSHPluginProvider::Factory::New( nodeManager ) );

For a DataEntity reader:

   BaseDataEntityReader::Pointer(VTKImageDataReader::New()) );

For a DataEntity writer:

   BaseDataEntityWriter::Pointer(VTKImageDataWriter::New()) );

For a dynModuleExecutionImpl:

   SSHPluginModuleExecution::Factory::New( nodeManager ) );

Session reader and writer

The session reader/writer uses standard design of Core::IO::DataEntityReader / DataEntityWriter. To read/write a session file you should use the following code:

	Core::IO::DataEntityReader::Pointer reader = Core::IO::DataEntityReader::New( );
	reader->SetFileName( sessionFilepath );
	reader->SetMultithreading( false );
	reader->Update( );

	for ( int i = 0 ; i < reader->GetNumberOfOutputs( ) ; i++ )
		Core::DataEntityHolder::Pointer holder = Core::DataEntityHolder::New( );
		holder->SetSubject( reader->GetOutputDataEntity( i ) );
			GetRenderingTree( ),
			true );