New Developer Features in GIMIAS 1 5

From user's Wiki!
Jump to: navigation, search

Contents

GIMIAS-1.5.a1 (22th March 2012)

Error recovery

When GIMIAS starts, sometimes it crashes because there's an error in the config.xml file or a plugin crashes when loading it. To fix this issue, GIMIAS will log the status of the Kernel when starting and next time it's started will show an error message to the user and will allow to configure it again.

ErrorLoadingPlugins.png ErrorLoadingConfig.png

Custom Application Wizard

Added custom application wizard that will guide you to configure the execution of external applications.

To execute an external application, XML description used by ModuleDescription is being used, adding some specific tags, like the executable file name. A new dialog allow to modify the general description, the parameters and the inputs/outputs of the executable. All these information will be stored in a single XML file. All XML files will be stored in the Application home path, in the folder "Descriptions".

When the XML is read, a ModuleDescription instance is created. The user can choose it as a processing tool and execute it. During the execution, a specific data transfer (DynDataTransferExternalApp) and Module execution class will be called (dynModuleExecutionExternalApp).

For execution of external applications, these tags have been added to the XML description:

  • executable: specify the executable file path
  • working directory: specify the working directory where to execute the application. In Windows, some executables need specific DLLs
  • format: for each parameter, this tag specify the format of the argument. For example "--grid 14". It's possible to use these variables that will be replaced by the real value during execution:
    • $(name): name of the parameter
    • $(value): value of the parameter

Wizard

In order to configure a new external application, you should open the Custom Application Manager that is located in the menu Edit->Custom App Manager.

Custom application wizard

In this window you can manage new external applications: create, edit, delete, or import.

Here you can watch an example video on how to use this feature, here:

Custom application Warp

When editing a custom application, you will see this window:

Custom application wizard

It allows you to configure the general description of the executable, the parameters and the inputs/outputs.

The executable will appear in the Plugin selector, in the menu Edit->Preferences.

Custom application plugin selector

You can load the plugin and use it as a standard command line plugin, with automatic GUI generation. For example, for the external application warp.exe, this is the GUI:

Custom application Warp

To execute the application, you can configure the inputs/outputs and then press Apply. You can also expose the application using WebServices_Plugin

Release numbers

Changed release numbers of the GIMIAS components: Core, plugins and ThirdParty. These version numbers are used by Automatic Updates to check if a new version is available. The new version syntax is: <major>.<minor>.<development stage>.<release>

  • Major number is increased when there are significant jumps in functionality
  • Minor number is incremented when only minor features or significant fixes have been added
  • Development stage can be:
    • a: alpha (status). API and ABI can change. This version has not been tested. Only contains features that should be tested by some users. The developers can add more features.
    • b: beta (status). The alpha phase usually ends with a feature freeze, indicating that no more features will be added to the software. At this time, the software is said to be a feature complete. Software in the beta phase will generally have many more bugs in it than completed software, as well as speed/performance issues. The focus of beta testing is reducing impacts to users, often incorporating usability testing.
    • rc: release candidate. A release candidate (RC) is a beta version with potential to be a final product, which is ready to release unless significant bugs emerge.
    • r: (final) release. A release is called code complete when the development team agrees that no entirely new source code will be added to this release.
  • Revision number is incremented when changes are made on a development stage

The important characteristic of this approach is that the first version of a given level (beta, RC, production) must be identical to the last version of the release below it (1.5.a5 == 1.5.b1).

Examples: 1.5.a1, 1.5.a2, ... , 1.5.b1, 1.5.b2, ... 1.5.rc1, 1.5.rc2, ... 1.5.r1, 1.5.r2

You can read more here: http://en.wikipedia.org/wiki/Software_versioning

GIMIAS-1.5.a2 (12th of April 2012)

stereoscopic 3D

Added option to visualize images using stereoscopic 3D.

Stereoscopic visualization

GIMIAS-1.5-a3 (1st May 2012)

GIMIAS-1.5-a4 (2nd May 2012)

ENH #0297: Allow reading/writing data using SFTP protocol

cURL library is being used for transferring data using several protocols. cURL supports DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. Curl library has been integrated in GIMIAS and allows reading/writing remote data files. The introduced URL will be passed directly to Curl library.

Examples of URLs are:

For protocols that require authentication:

  • FTP with relative path: ftp://<user>:<password>@193.145.50.28:21/Temp/volumeCropped.vtk
  • FTP with absolute path: ftp://<user>:<password>@193.145.50.28:21//projects/msv/Temp/volumeCropped.vtk
  • SFTP with relative path: sftp://<user>:<password>@frs.sourceforge.net:22/~/SampleData/volumeCropped.vtk
  • SFTP with absolute path: sftp://<user>:<password>@frs.sourceforge.net:22/home/pfs/project/g/gi/gimias/SampleData/volumeCropped.vtk

Ring Cut

An improvement has been added in GIMIAS 1.5, in the last version of ring cut the cut is done on a plane perpendicular to the vessel direction, now It is possible to define two points, thus user can make oblicuous cuts.

With this ring cut tool the user can defiene a cut as usual, with one point, or define two points on the mesh to control the cutting angle with respect the blood vessel direction.

User selects New Cut as usual and selects first cutting point with "shift+leftclick", then the cut can be done or selects a second cutting point, again with "shift+leftclick".

Ring Cut Options
Oblique Cut Perpedicular Cut
RingCutObliqueCut.png
RingCutPerpedicularCut.png

DICOM Time tag

You can now specify a regular expression to extract part of the DICOM time tag, see DICOM Plugin#Improved_Time_tag_configuration for details.

ENH #0301: Too much widgets at the same time

The Toolbox widget contains the set of common used tools, like processing toolbox, selection toolbox, visual properties or data information. A notebook control with an icon for each tool allows to easily identify each tool and compacts the space used for tools.

Toolbox widget

For developers

To include a new tool, you need to add the property Toolbox to the WindowConfig, when registering the factory of you widget:

gIface->RegisterFactory(
	VisualProperties::Factory::NewBase( ),
	WindowConfig( ).VerticalLayout().Category( "Visualization" ).Toolbox( )
	.Id( wxID_VisualProperties ).Caption( "VisualProperties" ) );

The Toolbox widget will automatically add and remove an instance of your widget to the notebook, when the factory is registered/unregistered.

To configure the icon you need to call the function SetBitmap() in the constructor of your widget, passing a bitmap in XPM format.

SetBitmap( processingtools_xpm );

To retrieve a widget instance from the toolbox, you can directly call GetPluginTab::GetWidget( ). The function will search recursively the widget over all widgets that are child of the plugin tab, using the function BaseWindow::GetChildWindow( ).

SelectionToolboxWidget* selectionToolboxWidget;
GetPluginTab()->GetWidget( wxID_SelectionToolboxWidget, selectionToolboxWidget );

GIMIAS-1.5.r1 (29th August 2012)

Propagate data

Propagate data filter allows to propagate a time step over time. In this snapshot you can see a mask image created on a single time step. When the Propagate button is pressed, the mask image is propagated to 5 time steps on the right of the current time step.

Propagate data

DICOM Browser

DICOM Browser functionality allows browsing DICOM entries, DICOM entry sequences and management of DICOM time series

Browse DICOM tags

Browse tags shows all tags in a tree view. When a tag is a sequence, all child items will be appended to the parent item.

In order to facilitate the DICOM tags browsing, the "Browse Tags" window allows to show only the tags that have changed from the previous DICOM slice. This feature can be used to identify the time tag of your DICOM dataset, selecting a DICOM slice from one timepoint, selecting the next slice from another timepoint and check the tags that are changing its value.

Browse tags

DICOM time series (3D+T)

DICOM data sets from different manufacturers have been tested with GIMIAS:

  • GE Medical Systems: CT and MR modalities
  • Philips Medical Systems: CINE MR, PERFUSION MR and US modalities
  • Siemens: CT and MR modalities from the machines Sensation 64, Symphony, TrioTim and Somatom
  • Toshiba: CT modality

Configure your DICOM time tag

You can configure your DICOM time tag that will be used to group the DICOM slices in time points. Using the file DICOMTags.xml that you will find in the resource folder, you can add your own configuration for you own file:

    <tag name="ge_mr" type="class blSmartPointer<class blTagMap>">Unsupported value type
        <tagmap size="4">
            <tag name="condition0" type="std::string">0008,0060:MR</tag>
            <tag name="condition1" type="std::string">0008,0070:ge medical systems</tag>
            <tag name="time_tag" type="std::string">0018,1060:Trigger Time</tag>
            <tag name="in_file" type="bool">1</tag>
        </tagmap>
    </tag>

For each entry, you can define any number of conditions that must be satisfied by the first DICOM file of your dataset. Once all conditions are satisfied, the time tag will be used. The entries are sorted from the major to the minor number of conditions.

To detect the DICOM time tag, you can use the option "Scan Time Tag" in Advanced window and select the tag manually. File:DICOMAdvanced.png

Regular expressions

Added the possibility to provide a regular expression to extract parts of a DICOM time tag value. The regular expressions followsthe ITK (limited) syntax, see [RegularExpression.h] for details. Every modality tag can have an associated regular expression by adding a "%modality%_regex" tag. Some tags are not available at an image level, as for example the Scan Options, in that case, the user needs to specify that the tag needs to be find in the DICOM file with the "%modality%_isinfile" tag. See the following example usage:

<tag name="CT" type="std::string">0018,0022:Scan Options</tag>
<tag name="CT_isinfile" type="bool">1</tag>
<tag name="CT_regex" type="std::string">([0-9]+)</tag>

Another example for truncating an UID to remove its last bit can be:

<tag name="CT" type="std::string">0008,0018:SOP Instance UID</tag>
<tag name="CT_regex" type="std::string">([0-9]+\.)+</tag>

You can also use regular expression for any condition:

<tag name="condition2" type="std::string">0018,1030:.*PERF.*</tag>

Signal view is not updated when processor output changes

The parameter Copy Method for output ports allows to specify the method that will be used for copying data when calling the function UpdateOutput( ):

  • COPY_POINTER: Copy the input pointer to the destination pointer. The memory is allocated by the Processor
  • COPY_DATA: Copy the data from the input pointer to the destination. The memory is allocated by the destination DataEntityImpl class

By default, the used method is COPY_DATA if the DataEntityImpl implements the SetData() function.

Allow to visualize compressed CFD simulation results

When a CGNS simulation results is loaded in GIMIAS, the option "use compression" can be selected to create a single volumetric mesh with the scalar arrays for all time points, instead of creating a volumetric mesh for each time point. This strategy saves memory because the structure of the mesh is the same for all time points.

CGNSOptions.png

The volumetric mesh contains all scalar arrays. However, the time selector allows to select the current array index automatically.

CGNS visualization

Store/Retrieve metadata in NRRD file format

When a data is written into dis using NRRD file format, the metadata of the DataEntity will automatically be converted to itk::MetaDataDictionary class and attached to the image. When reading a NRRD file, the metadata will be restored back to the metadata of the DataEntity.

For example, if your DataEntity has the tag "ED flag" with value 1, the NRRD file will contain the following tag in the header:

ED flag:=1

This feature only works with std::string tags.

Added new CLP data types

You can use the new following types: signal, volmesh and pointset as input or output parameters of your Command Line Plugin. You can read more information in HowToDevelopACommandLinePlugin.

Stop button doesn't work for some operations

An execution can be monitored in the main window, if implemented by the processor that is being executed. This monitoring is shown using a progress bar and a cancel button. When this functionality is not implemented, the cancel button will not be enabled.

3D+T data management

Read/Write NRRD/MHD 3D+T images

You can read/write data using 3D+T formats like NRRD or MHD in a single file. The data can be a 3D scalar image or a 3D vector image of 2 or 3 components.

NRRD File Example:

# Complete NRRD file format specification at:
# http://teem.sourceforge.net/nrrd/format.html
type: short
dimension: 4
space dimension: 4
sizes: 160 144 208 16
space directions: (1.1648000000000001,0,0,0) (0,1.18421,0,0) (0,0,0.75187999999999999,0) (0,0,0,1)
kinds: domain domain domain domain
endian: little
encoding: raw
space origin: (0,0,0,0)

This file formats simplify the use of 3D+T data in CLP. For example, the Pixel Intensity CLP uses the format nrrd to transfer a 3D+T image to process.

Read/Write 3D+T data in CLP

To read/write 3D+T data in a CLP, you can also use two new functions:

  • blITKFileUtils::CheckDataFilenames()
  • blITKFileUtils::GenerateDataFilenames()

You can see an example in Volumetric Mesh Scalar Value CLP and read more information in HowToDevelopACommandLinePlugin#3D_.2B_T_processing.

GIMIAS Installer

Improved installer of GIMIAS with new features and fixed a bug when uninstalling it from the system.

GIMIAS installer

The new installer allows to select the plugins to install, the startup menu folder and shows a license.

Configure rendering properties of your CLP output data

You can configure the rendering properties of your output data. This allows you to change the opacity or to hide or not the input data when the execution of the CLP finishes.

1. Add a new dependency to your CLP to the library baseLibNumericData:

clp.AddProjects( [generateClp, slicer, baseLibNumericData] )

2. Include this files:

#include "itksys/SystemTools.hxx"
#include "blTagMap.h"
#include "blXMLTagMapWriter.h"

2. Create rendering properties

blTagMap::Pointer metadata = blTagMap::New( );
blTagMap::Pointer rendering = blTagMap::New( );
rendering->AddTag( "opacity", float(0.5) );
rendering->AddTag( "hideParent", false );
metadata->AddTag( "Rendering", rendering );

3. Write GMI file

// Write GMI
std::string path = itksys::SystemTools::GetFilenamePath( outputMesh );
std::string filename = itksys::SystemTools::GetFilenameWithoutExtension( outputMesh );
std::string extension = ".gmi";
std::string gmiFilename = path + "/" + filename + extension;
blXMLTagMapWriter::Pointer gmiWriter = blXMLTagMapWriter::New();
gmiWriter->SetFilename( gmiFilename.c_str() );
gmiWriter->SetInput( metadata );
gmiWriter->Update( );


Added several registration CLPs

The following registration CLP have been added to GIMIAS:

You can find more CLP in Users#Command_Line_Plugins.

GIMIAS-1.5.r2 (31th August 2012)

GIMIAS-1.5.r4 (3rd October 2012)


ENH #0381: Add feature for livewire segmentation using a set of control points

This feature uses an interactive live-wire to connect the control points. This tool is useful when the region to segment has high contrast compared to the background. The number of points to delineate the region is lower than using other contour tools.

Video: Contour Segmentation.

Live-wire tool segmentation

ENH #0377: Add feature for spline segmentation using a set of control points

This feature allows creating a mask image using a polygon/spline. The polygon/spline is defined using a set of control points that the user can add/move/remove.

Polygon tool segmentation
Spline tool segmentation

The tool is integrated in the Interactive Segmentation tool. When the user clicks this tool, he can start adding control points. The control points are connected and define the polygon/spline that will be used for creating the mask image. Once satisfied, user press tab key and the mode changes to "modify points". In this mode, the user can add new points in between of the already available. Once satisfied, user can press Space key to paint inner zone.

This tool can be combined with the rest of the interactive segmentation tools. For example, you can use region growing to create an initial region and switch to polygon tool to modify the region using a set of control points. The control points will be automatically created clicking on the image with an already segmented region.

Usage:

  • Space key: paint inner zone
  • Tab key: Change mode: add new points at the end or modify current points
  • Shift + left mouse button: Add a new point
  • Left mouse button over a point: Select a point and move it
  • Left mouse button over a mask image with empty points: Automatically create a set of control points
  • Wheel mouse button: Change slide and keep current polygon

Improvements:

  • One click for control point movement
  • Key to remove all points

GIMIAS-1.5.r5 (in progress)

Added new generic transformation tool

This tool permits to apply a rigid body transformation to both meshes and images (more precisely to surface meshes, volumetric meshes and images). The transformation can be specified manually by filling up an appropriate table or automatically calculated by interacting with a vtkBoxWidget object that can be shown around the data and graphically modified by the user. You can read more in GenericSegmentationPlugin

ENH #0396: Add trial period feature for private plugins

Security plugin add a new page in the preferences. The page shows all GIMIAS plugins and allows configuring the expiration date and creating the signature. Read more...

ENH #0398: Use three points for the ring cut tool

You can use three points to define the ring that will cut a surface mesh.

Three points to define the ring

Upgrade guide from GIMIAS-1.4 to GIMIAS-1.5

Command Panel

Now, the command panel is hidden by default. To show it you need to add this line into your widget collective:

if ( GetPluginTab( ) != NULL )
{
	GetPluginTab( )->ShowWindow( wxID_CommandPanel, true);
}

If you widget is configured as a command panel, it will be added automatically to the processing toolbox. However, when using the widget in the toolbox, the default processor observers will be added automatically. If your widget already has an observer, it can create a conflict.

If your widget has an observer function to an output of the processor, and you want to execute it using the processing toolbox, you need to disable the default processor observers:

GetProcessorOutputObserver( 0 )->SetEnable( false );