Difference between revisions of "Slicer3:BrainLabModule"

From Slicer Wiki
Jump to: navigation, search
(Created page with 'Back to Slicer ARRA home page = Aim = Medical images often contain a wealth of information, such as anatomy and pathology, not explicitly accessible. …')
 
 
(34 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Projects:ARRASuplements|Back to Slicer ARRA home page]]
+
[[Slicer3:Developers#Quick_Links_to_Slicer3_Projects|Back to '''Slicer Projects Page''']]
 
= Aim =
 
= Aim =
Medical images often contain a wealth of information, such as anatomy and pathology, not explicitly accessible. One way to address this issue is via image annotation and markup. We propose to create a comprehensive framework for annotation and markup within 3D Slicer, enabling users to capture structured information easily. Furthermore, we will develop schemas for saving and recovering this information into and from XNAT, allowing queries of larger data sets of medical scans. This tool will provide clinicians with a relatively simple way to capture information latent in medical scans, and also to select micro-cohorts of medical scans for studying diseases.
+
Brainlab (http://www.brainlab.com) has recently introduced a customized client/server architecture called '''VectorVision Link (VV Link)''' to communicate with external IGT environment. This software API, open but not free, allows other programs to acquire tracking information and images from the BrainLab system. We propose to create a comprehensive workflow to interface 3D Slicer to Brainlab system and to use it for research. Specifically, we create simplified steps for neurosurgeons to use Slicer to perform some research in DTI visualization in OR while Brainlab is used as the primary navigation tool. Here is the scenario:
 +
 
 +
Brainlab system will still run as usual; we won't install any software and hardware on the Brainlab computer and won't affect its FDA status either. Slicer runs on a different computer. These two computers will be connected to each other using a network or router. During surgical procedures, the BrainLab sends real-time tracking data and/or images to Slicer. The tracking information may be used to seed dynamic DTI visualization in Slicer.
  
 
= Research Plan =
 
= Research Plan =
3D Slicer currently provides very basic technology for annotating images. This limits users in their ability to properly capture semantic information contained in images and data sets. We propose to address this issue by expanding Slicer's mark up and annotation capabilities. New features will include:  
+
Our workflow will include the following steps:
* a rich set of geometric objects for improved visual differentiation between annotations
+
#Set up connection between Brainlab and Slicer
* markers for measuring anatomical characteristics, such as the volume of an annotated region, to provide patient specific information difficult to extract from visual inspection
+
#Load a scene (default or user specific) into Slicer
* entry fields beyond free-text, such as graphics and external data, to capture comprehensive information and support for emerging domain specific ontologiesand
+
#Navigate with DTI visualization in Slicer as the surgeon performs tracking with Brainlab
* a full integration of these capabilities with the mrml tree to support Scenesnapshots, load, save both to disk and XNAT.
+
 
 +
This will hopefully help the surgeon efficiently integrate Slicer with Brainlab. We will implement the workflow by developing a Slicer module called '''BrainlabModule'''. This interactive module uses OpenIGTLink (http://www.na-mic.org/Wiki/index.php/OpenIGTLink) for data communication between BrainLab and Slicer, and uses Fiducial, DTMRI and FiducialSeeding modules for DTI visualization. Also, it uses existing Slicer functions to load MRML scenes.
  
We will implement these features by developing two different modules. The first module, called Marker Module, creates different types of markers based on current ITK technology. The user defines the appearance of the marker by specifying its color, size, and shape, such as points and 3D boxes. The user also labels each marker with tags and specifies its function, such as measuring the volume of a region.
+
The development of BrainlabModule will be completed in two phases. In the first phase, a Brainlab simulator will be created. That is, a sequence of synthetic tracking points (not from BrainLab system) will be streamed to Slicer where fiducial-driven DTI visualization will be performed. In the second phase, a real BrainLab system will be needed to test the entire workflow. Upon completion, both modes (Simulator and Brainlab) will co-exist in the module; the user may choose which mode to execute.  
  
The Annotation Module, the second module, provides the interface for annotating images with these markers. Users place the markers on the image and further specify the semantic information through free text, plots, and references to ontology and internet. The annotations are shown both in 3D and 2D viewers. The module also allows annotating entire scenes by linking annotations across images, as well as within an image. All annotations are stored in a database targeted towards medical imaging, called XNAT. The structure of the database is automatically defined by the tags of the markers. Thus, users can query across large image data sets by looking for specific tag values.  
+
Both modes are accompanied by training materials and documentation to ensure usability.
  
Both modules are accompanied by training materials and documentation to ensure usability.
 
 
=Design of Module=
 
=Design of Module=
* Current [[Media:AMI-GUI-Design.ppt | GUI ]] outline - [[Media:SlicerAM QtAnnotation.png | Screenhot]] in Slicer
+
*[[Slicer3:BrainLabModule:Workflow|Version 1 of workflow (as of 04/02/2010)]]
* Suggested [[Media:AMI_MRMLMarkUpNode.ppt | MRML ]] outline
+
*[[Slicer3:BrainLabModule:ConnectStep|A working version of Connect Step (as of 04/09/2010)]]
  
 
=Key Personnel=
 
=Key Personnel=
60% Kilian Pohl <BR>
+
Haiying Liu<br>
95% Yong Zhang
+
Noby Hata <br>
 
+
Ron Kikinis
=Events=
 
* 12/16/09 - 12/17/09 [[Dec-2009-SlicerAIMBrainstorming | Annotation Brain Storming]]
 
* 01/06/10 [[AHM2010:AnnotationBreakout | Break out session]] at AHM 2010
 
* 01/19/10 Biweekly Annotation Tcon from 4:00 - 5:00 pm EST (next meeting 2/9): Tel: (218) 862-1115 Conference ID: 348265#, [https://www.lotuslive.com/join?schedid=4572317 Desktop Sharing ]
 
  
 
=Progress=
 
=Progress=
* 03/26/10
+
* Week of 04/05/2010
** The property restoration is now implemented properly.
+
** Work '''DONE''':
** Property Modification is re-designed to simplify the operation.
+
*** The user interface (GUI) has been enhanced and implemented for the Connect Step where the network communication between BrainlabModule and a tracking source is going to be set up. Now we have a working version of Connect Step for tracking simulation. After few configurations, simulated tracking data will be streamed to OpenIGTLink module in Slicer once the Connect button is clicked. The data streaming process may be stopped by clicking the Close button.
** Removed bug: ruler/angle disappear after adding fiducials
+
*** Since the connection between BrainlabModule and the tracking source is always on, it's a good idea to have a separate thread to handle the network communication. This will improve the Slicer response to the user interaction. The thread will be stopped by clicking the Close button in the interface.
** Removed BUG: in property dialog, when editing the text, the character is entered from right to left.
+
*** A stream of simulated tracking data points may be generated inside memory or read from a file. The file IO is chosen since in the future tracking data sets of real surgical cases, which are usually saved in a file, may be used for post-surgical re-examination or just demonstration only.
** include lock annotation into option button (use same logic as for new (De)select All button)
+
** To do list:
** For each annotation type provide list outlining which display property can be changed, which cannot , and which one you do not know
+
*** OpenIGTLink module is now configured through its interface. This configuration will be required to be implemented programmatically in the C++ code of BrainlabModule.
** Resolved BUG: When saving a report with a file name that already exists then the following message appears in the command shell "Error: cannot make directory" and directory with files is not updated
+
*** Implementation of Load Step and Navigate Step will be executed next week.
** Resolved BUG: Annotation Properties: (Un)selected color is initially white even though widget in 3D viewer is different
 
** Resolved BUG: Select Color window does not show the correct color
 
** Resolved BUG: Selected and Unselected Color are switched
 
** Define Tooltips for fiducial, angle, ruler,report, save mrml button
 
** In table: Add proper tool tip for visualization and edit button
 
** Resolved BUG: when saving report with out ending html to the file name - icons will not be saved under Linux
 
** Created Test Module for testing miAnnotation logic
 
** In collaboration with  Nicole Aucoin figured out line display bug in 3D Viewer
 
** Use the Kitware slider and colorPicker under Display Property
 
** Fixed BUG: Slicer crashes when creating an annotation while Display properties is open, and when closing the property window and then pressing edit for the new annotation
 
 
 
* 03/19/10
 
** In the property window display properties are shown via collapsed frame by default
 
** List all attributes for text/point/line and implement those that can be modified
 
** Fixed BUG: When pressing the property button warning messages pop up in my command shell
 
** Annotation Properties: For Angle and Ruler Widget also shows now values of AnnotationDisplayNode and AnnotationControlPointsNode
 
** Change design of html report
 
** Implemented text edition and update for ruler and angle widgets.
 
** Changed the default mouse mode icon to MousePick.
 
** Modified Report Dialog to avoid horizontal slider when screen shot is included in the report.
 
** Removed multiple warning messages.
 
** Fixed Bug in Report: empty text fields are displayed without boundaries
 
** Ruler Distance is now displayed just in mm
 
** After talking to BWH changed name of tool from Reporting to miAnnotation
 
* 03/12/10
 
** Created icons for:
 
*** edit conditioning for all annotation types (done),
 
*** mouse mode icons, pause, play, cancel, ok/done, (Un)lock (done)
 
*** new the annotation types poly line, spline with control points, volume information extractor, and sticky note (done)
 
*** Modify fiducial icon just to show one star and change save annotation icon  (done)
 
*** Modify save annotation and save scene icons (done)
 
*** Modify move up/down delete icons (done)
 
** Write 5 page, double column, AMIA paper about Reporting
 
* 03/05/10
 
** Removed Warning Messages when compiling
 
** Fixed Bug: When entering text in property box (under linux) it is entered from right to left instead left to right
 
** Fixed Bug: Annotation Property: funny behavior with selecting set of digits in a numerical value  and typing in a numeric value - only the first digit gets change.
 
** Fixed Bug: Value of Angle node is not update in table
 
** Fixed Bug: Updating the value in the table slows down the operations
 
** Changed the default ruler from 1mm to 500mm.
 
** Angle Widget is added by manually clicking three points on the viewer. The angle value is now shown in the table. The behavior of the angle button is in the "toggle down" state until all three control points are set
 
** When selecting annotation in table, color of annotation in 3D Viewer changes to selected color
 
** Revised "add ruler" button to click-style instead of toggle-style
 
** When creating a new annotation, set this entry to selected and all other table entries to unselected
 
** (De) Select All button: change as discussed with Wendy Plesniak, BWH, to option button with proper logic
 
** Setting color/selected color for individual Ruler and Angle widgets in property dialog
 
** Fixed Bug: hiding/unhiding ruler and angle annotations
 
** Change display property for each annotation individually
 
** Lots of warning messages when compiling code
 
* 02/26/10
 
** Created pop up window showing screen shot
 
** Manual editing of coordinates via "Property Window"
 
** Resolved column width problem in table ([http://wiki.na-mic.org/Wiki/index.php/File:Screenshot-Form.JPG  original problem], [http://wiki.na-mic.org/Wiki/index.php/File:ARRA_SlicerAM_Screenshot_TableV2.png second screen shot problem])
 
** Fixed bug where hide icon changed size in table
 
** Include icons when saving html report in a directory with the same name as the html file
 
** [http://wiki.na-mic.org/Wiki/index.php/File:ARRA_SlicerAM_Screenshot_GUI.png Reorganized GUI] based on feedback from Wendy Plesniak, BWH 
 
** Include screen shots (if any) in the report (see [http://wiki.na-mic.org/Wiki/index.php/File:ARRA_SlicerAM_Screenshot_ReportV1.png an example])
 
** Fixed the following bug: After resizing the 3D Window taking a screen shot only displays the window with the original size (see [http://wiki.na-mic.org/Wiki/index.php/File:ARRA_SlicerAM_Screenshot_Window.png screen shot])
 
** Fixed Bug: Value update of ruler widget is slow
 
** Text defined in property box now shows up in table
 
** Integrated vtkMRMLAnnotationAngleNode with AngleWidget
 
** Added new buttons to create frame based on feedback from BWH
 
* 02/19/10
 
** Implement a general structure for vtkMRMLAnnotation*Node
 
** Work together with Kitware to resolve QT Table layout problem
 
** Allow defining long text annotations for each widget
 
** Improve user interaction through pop up windows when trying to modify an existing annotation
 
** Creating and removing ruler now works correctly
 
** Use correct label format to display measurement values in Annotation Property window
 
** Created a "Save annotation" Window
 
** Fixed changing icon size in table (see original [http://wiki.na-mic.org/Wiki/index.php/File:ARRA_SlicerAM_Screenshot_Table-IconProblem.png screen shot] )
 
** Fixed slicer crashing closing the property window
 
** Renamed and resized columns in Table
 
*02/12/10 removed bugs related to table buttons, linked button to angle widget and ruler widget
 
*02/05/10 implemented "Save Annotation Report" button and "Move up/down" buttons; added extra column in the report table for visibility; modified annotation property dialog; implemented button-click in the table.
 
*01/29/10 implemented functionality for "Annotation Property Modification" button, "Create Report" button, and integrated new icons for buttons.
 
*01/22/10 Set up the source control for the reporting module; implemented functionality for "Select All" button, "Visible" button, and "Delete" button in the GUI; created new icons for buttons
 
*01/15/10 Organized biweekly Tcon
 
*01/08/10 Participated in all week All Hands Meeting in Utah; Expanded QT interface with functionality to set seeds in images; Defined a final MRML Structure for storing annotation. 
 
*01/01/10 Generated a [[Media:SlicerAM QtAnnotation.png | GUI interface]] via QT for the annotation module. [[Projects:ARRA:SlicerAM#Widget_related_action_items | Reviewed ]] all VTK Widgets related to annotation. 
 
*12/25/09 Created [[ 2010_Winter_Project_Week_mComment | project ]] and organized [[ AHM2010:AnnotationBreakout | break out session ]] at AHM meeting. Coordinated efforts with BWH team in preparation of the meeting.  
 
*12/18/09 Held workshop to integrate AMI into 3D Slicer. Hired new person to implement AMI in Slicer. 
 
*12/11/09 [[ Projects:ARRA:SlicerAM_RSNA09Report | Summary ]] of tools demoed at RSNA
 
*12/04/09 Visited RSNA to review annotation tools by GE, Siemens &  Phillips. Connected to caBIG AIM project to see how we can make use of their data scheme
 
*11/29/09 Created GUI for MarkUp module 
 
*11/20/09 Design MRML Structure of Annotation and MarkUp Module
 
*11/13/09 Organize [[Dec-2009-SlicerAIMBrainstorming | Annotation Brain Storming]] Session
 
*11/06/09 Designed User Interface , Meet with Julien Finet and Jean-Christophe Fillion-Robin from Kitware to discuss integration of Qt in 3D Slicer
 
*10/30/09 Participated in Qt-Tcon, Interviewed candidate at Almaden, coordinated efforts with Nicole Aucoin
 
*10/23/09 Organized onsite interview , got in contact with Steve Pieper to discuss next steps, installed Slicer3
 
*10/17/09 Started interviewing postdoc as well as solving several HR issues for hiring personal
 
  
= Feature Request =
+
* Week of 03/29/2010
== KW Widgets ==
+
** Ron, Noby and Haiying met at Ron's office to discuss the specs of the module and time frame for implementation.
* For further detail go [[ Projects:ARRA:SlicerAM:KWWidgets | here ]]
+
** Haiying completed the [[Slicer3:BrainLabModule:Workflow|workflow.]]
  
== QT Related ==
+
= Dependency =
* Submit bugs and feature request via [http://na-mic.org/Mantis/search.php?project_id=1&category=QtGUI&sticky_issues=on&sortby=last_updated&dir=DESC&hide_status_id=90  Mantis]
+
The following modules are required for Brainlab module to work properly:<br>
*  Feature requests that may open discussions can be added [http://wiki.slicer.org/slicerWiki/index.php/Slicer3:Developers:Projects:QtSlicer/OpenDiscussions  here]
+
Fiducial<br>
 +
OpenIGTLink<br>
 +
DTMRI<br>
 +
FiducialSeeding<br>
  
== Yong ==
+
= Tutorials =
* Major
 
** BUG: When changing line color in Display Properties it changes the Text Color
 
*** Yong: it turns out that when setting the color using LineDisplayNode, it also sets the color for DisplayNode. This could be a bug in the node data structures.
 
*** KP: this is not the case check out Line 3053 in vtkSlicermiAnnotationModuleLogic.cxx revision 179
 
** BUG: Line color changes for Rulers when annotation is selected in table and mouse moves over the line in the 3D Window
 
** define functionality for the following buttons:
 
*** mouse mode status icon
 
*** radio button with play and pause, cancel, done
 
** define functionality for the following two buttons:
 
*** sticky note (pop up window)
 
*** info extractor which will be a option button that displays all volume nodes -> you select the node to extract the info from the header => annotation is displayed in pop up window
 
** Save the view with the annotation it was last time modified in the 3D viewer
 
** put options for screen capture into new screen capture pop window 
 
** BUG: Lock does not lock the position of a widget in the 3D Viewer
 
*** Working with Nicole Aucoin to resolve this issue - waiting for VTK 5.6 release
 
** Grid out your buttons  (Create Frame)
 
*** Yong will communicate with Wendy to resolve issue
 
  
* Minor
+
= Feature Request =
** Turn Screen Capture button into option button with options:  Active viewer, All viewer, slicer window - by default last action 
 
** Fiducial button: put label under button (after click on) what to do next such as setting seeds in 3D window
 
** Create a Slicer widget for a multi column list with convenience button that we currently have - have options for making them visible or not 
 
** Combine move up and down button into one option button which shows the last action (up or down) by default
 
** Create window showing volume tab when pressing Adjust Volume Properties
 
** Show current mouse behavior on mouse behavior button - also show menu to change mouse behavior - use [http://qt.nokia.com/doc/4.6/qpushbutton.html#setMenu QPushButton::setMenu() ]
 
** Show options in Change Viewer Layout use [http://qt.nokia.com/doc/4.6/qpushbutton.html#setMenu QPushButton::setMenu() ]
 
** Generate testscript to interactively test various widgets and GUI elements
 
** create local copy of the doxygen file using getbuildtest.tcl --no-slicer-update -doxy
 
 
 
* Not Important
 
** Have text field in table to fill out space also when changing size of window (see current [http://wiki.na-mic.org/Wiki/index.php/File:ARRA_SlicerAM_Screenshot_TableV3.png screen shot] ) 
 
*** Yong: this requires a re-design of the resizeEvent() of the QTableWidget, do we really need to do it?
 
** BUG: When saving a report with a file name without html extension the save window will check for the existence of that file name instead of the file name + .html
 
*** Yong: tried but cannot fix it unless go into the QFileDialog source code, it is recommended to include the extension name when using in Linux.
 
 
 
== Kilian ==
 
* investigate vtkMRMLHierarchicalModelNode for annotations
 
 
 
== Wendy ==
 
* Extend the Save Data Widget API to display one data type and hide save options
 
== Steve ==
 
* Bug: Ruler still visible in 2D window after pressing hide button. This bug has been reported to Mantis http://na-mic.org/Mantis/view.php?id=760
 
* For compiling Slicer3 in windows OS, has to use "SET PYTHON OFF"
 
 
 
== Julien / JC ==
 
* BUG: When pressing save button reporting module is replaced with last module visited before: an email is sent to report the issue to Julien and JC.<BR>
 
Mar 02: Work around : go to File-> Load Scene-> Cancel
 
 
 
== Nicole ==
 
Mar 02: Adding SeedWidget to Reporting Module - Nicole is waiting for the integration of the new Vtk version into Slicer
 
 
 
== Karthik Krishnan ==
 
 
 
 
 
== Resolved ==
 
* BUG Fix: Nothing happens when Property Window is open and you press the edit button for another annotation
 
 
 
= Display Properties of Widgets =
 
* Unavailable / Unknown:
 
** Set text colors for Ruler and Angle Widget
 
** Get/Set glyph scale / point size for point display node
 
** Get/Set text opacity/ambient/diffuse/specular from text display node 
 
** Color of "angle line" cannot be defined 
 
* Available:
 
** Get/Set text colors from display node
 
** Get/Set text scale from display node
 
** Get/Set point colors from point display node
 
** Get/Set point opacity/ambient/diffuse/specular from point display node
 
** Get/Set line colors from line display node
 
** Get/Set line width/opacity/ambient/diffuse/specular from line display node
 
** Get text format for angle and ruler
 

Latest revision as of 03:17, 27 April 2010

Home < Slicer3:BrainLabModule

Back to Slicer Projects Page

Aim

Brainlab (http://www.brainlab.com) has recently introduced a customized client/server architecture called VectorVision Link (VV Link) to communicate with external IGT environment. This software API, open but not free, allows other programs to acquire tracking information and images from the BrainLab system. We propose to create a comprehensive workflow to interface 3D Slicer to Brainlab system and to use it for research. Specifically, we create simplified steps for neurosurgeons to use Slicer to perform some research in DTI visualization in OR while Brainlab is used as the primary navigation tool. Here is the scenario:

Brainlab system will still run as usual; we won't install any software and hardware on the Brainlab computer and won't affect its FDA status either. Slicer runs on a different computer. These two computers will be connected to each other using a network or router. During surgical procedures, the BrainLab sends real-time tracking data and/or images to Slicer. The tracking information may be used to seed dynamic DTI visualization in Slicer.

Research Plan

Our workflow will include the following steps:

  1. Set up connection between Brainlab and Slicer
  2. Load a scene (default or user specific) into Slicer
  3. Navigate with DTI visualization in Slicer as the surgeon performs tracking with Brainlab

This will hopefully help the surgeon efficiently integrate Slicer with Brainlab. We will implement the workflow by developing a Slicer module called BrainlabModule. This interactive module uses OpenIGTLink (http://www.na-mic.org/Wiki/index.php/OpenIGTLink) for data communication between BrainLab and Slicer, and uses Fiducial, DTMRI and FiducialSeeding modules for DTI visualization. Also, it uses existing Slicer functions to load MRML scenes.

The development of BrainlabModule will be completed in two phases. In the first phase, a Brainlab simulator will be created. That is, a sequence of synthetic tracking points (not from BrainLab system) will be streamed to Slicer where fiducial-driven DTI visualization will be performed. In the second phase, a real BrainLab system will be needed to test the entire workflow. Upon completion, both modes (Simulator and Brainlab) will co-exist in the module; the user may choose which mode to execute.

Both modes are accompanied by training materials and documentation to ensure usability.

Design of Module

Key Personnel

Haiying Liu
Noby Hata
Ron Kikinis

Progress

  • Week of 04/05/2010
    • Work DONE:
      • The user interface (GUI) has been enhanced and implemented for the Connect Step where the network communication between BrainlabModule and a tracking source is going to be set up. Now we have a working version of Connect Step for tracking simulation. After few configurations, simulated tracking data will be streamed to OpenIGTLink module in Slicer once the Connect button is clicked. The data streaming process may be stopped by clicking the Close button.
      • Since the connection between BrainlabModule and the tracking source is always on, it's a good idea to have a separate thread to handle the network communication. This will improve the Slicer response to the user interaction. The thread will be stopped by clicking the Close button in the interface.
      • A stream of simulated tracking data points may be generated inside memory or read from a file. The file IO is chosen since in the future tracking data sets of real surgical cases, which are usually saved in a file, may be used for post-surgical re-examination or just demonstration only.
    • To do list:
      • OpenIGTLink module is now configured through its interface. This configuration will be required to be implemented programmatically in the C++ code of BrainlabModule.
      • Implementation of Load Step and Navigate Step will be executed next week.
  • Week of 03/29/2010
    • Ron, Noby and Haiying met at Ron's office to discuss the specs of the module and time frame for implementation.
    • Haiying completed the workflow.

Dependency

The following modules are required for Brainlab module to work properly:
Fiducial
OpenIGTLink
DTMRI
FiducialSeeding

Tutorials

Feature Request