EVS/ALISA

From FarsightWiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
=== Overview ===
 
=== Overview ===
The current linkage between views in Farsight (ALISA) that enables the PACE technology is implemented using [http://doc.qtsoftware.com/4.4/model-view-programming.html QT's Model/View Architecture].  The model classes: [http://doc.qtsoftware.com/4.4/qstandarditemmodel.html QStandardItemModel] and [http://doc.qtsoftware.com/4.4/qsitemselectionmodel.html QItemSelectionModel] are enclosed in a SegmentationModel class which also handles event triggers.  In the present implementation this model is taylored for use with nuclei.
+
The current linkage between views in Farsight (ALISA) that enables the PACE technology is implemented using [http://doc.qtsoftware.com/4.4/model-view-programming.html QT's Model/View Architecture].  The two model classes: [http://doc.qtsoftware.com/4.4/qstandarditemmodel.html QStandardItemModel] and [http://doc.qtsoftware.com/4.4/qsitemselectionmodel.html QItemSelectionModel] are all that is required for the views to work.  
  
The Segmentation Model can be created from Segmentation Result.  The Segmentation Result class is an abstract class that handles reading/writing of object data from an XML file.  This class should be extended to create specific methods for each object type - editing, feature calculation, and image data handling.
+
The two types of of views available (scatter plot, and table) can be found in the ftkGUI library.  To see an example of how these views can be used in an editor program, check out the NucleusEditor tool.  Within this library a help class - segmentationModel has been created to enclose the qstandarditemmodel and qitemselectionmodel, handle editing triggers, and keep track of visualization preferences.  This Segmentation Model can be created from Nuclear Segmentation Result.  The NuclearSegmentation class handles reading/writing of object data from an XML file.
  
 
[[Image:ALISA.PNG|thumb|1000px|center]]
 
[[Image:ALISA.PNG|thumb|1000px|center]]
Line 8: Line 8:
 
=== Location of Files ===
 
=== Location of Files ===
 
The relevent classes/files can be found in these locations:
 
The relevent classes/files can be found in these locations:
* ftkSegmentationResult, ftkObject - farsight/trunk/SegmentationCommon
+
* ftkObject - farsight/trunk/SegmentationCommon
 
* ftkNuclearSegmentation - farsight/trunk/NuclearSegmentation
 
* ftkNuclearSegmentation - farsight/trunk/NuclearSegmentation
* SegmentationModel, SegmentationView - farsight/trunk/GUI
+
* SegmentationModel, SegmentationView - farsight/trunk/NuclearSegmentation/NucleusEditor
* example XML - farsight/trunk/NuclearSegmentation
+
* TableWindow, PlotWindow - farsight/trunk/ftkGUI
  
 
=== Nucleus Example ===
 
=== Nucleus Example ===
The actual construction of the Segmentation Model - and setup of the Views is done in ControlBar (found in the GUI directory).
+
The actual construction of the Segmentation Model - and setup of the Views is done in NucleusEditor.
 
Refer to the loadResult method for an example of how this is done. This is the process:<br>
 
Refer to the loadResult method for an example of how this is done. This is the process:<br>
  
Line 20: Line 20:
 
* Here an instance of NuclearSegmentation is created and the object information is loaded from an XML file
 
* Here an instance of NuclearSegmentation is created and the object information is loaded from an XML file
 
2. Create SegmentationModel
 
2. Create SegmentationModel
* The SegmentationModel constructor requires a pointer to a SegmentationResult class (our NuclearSegmentation).  The SegmenationModel class will convert the object feature information into a QStandardItemModel and construct a QItemSelectionModel.
+
* The SegmentationModel constructor requires a pointer to a NuclearSegmentation class.  The SegmenationModel class will convert the object feature information into a QStandardItemModel and construct a QItemSelectionModel.
 
3. Show Table and Scatter Views
 
3. Show Table and Scatter Views
* These require a pointer to the SegmentationModel
+
* These require a pointer to the QItemSelectionModel (which also has a pointer to the QStandardItemModel).
4. Create/Show Segmentation Window
+
4. Create/Show Segmentation Window (in NucleusEditor)
 
* This window is specific to nuclei.
 
* This window is specific to nuclei.
 
* Key press events within this view are connected to Triggers in the SegmentationModel using [http://doc.qtsoftware.com/4.4/signalsandslots.html signals/slots].
 
* Key press events within this view are connected to Triggers in the SegmentationModel using [http://doc.qtsoftware.com/4.4/signalsandslots.html signals/slots].
Line 29: Line 29:
  
 
=== Adding a New Editor ===
 
=== Adding a New Editor ===
In an ideal implementation the segmentation model would already have all of the information that the new editor needs and one would simply need to create a view that kept updated the selections appropriately.  The current implementation is not yet at this stage - and therefore a few modifications and hacks will be required to glue in the new editing views.  Here is a list of some of the modifications that may need to done:
+
In an ideal implementation the segmentation model would already have all of the information that the new editor needs and one would simply need to create a view that kept updating the selections appropriately.  The current implementation is not yet at this stage (and may never be there) - the SegmentationModel is specific to nucleiTherefore, to add in new editors you have two choices - 1. Make you results look like nuclei and use the current tool, 2. Create a new editing GUI that handles the handles the QItemSelectionModel appropriately for proper linking to the scatter plot and table views.
 
+
* Methods in SegmentationResult should be made virtual to allow for editing operations to be accessed through this class for new object types.
+
* SegmentationModel should be modified to only call methods available in SegmentationResult (this will remove its dependency upon knowing the object type that it is representing).  New event triggers will need to be added.
+
* A new SegmentationView will need to be created that handles selections and user events (mouse clicks and key presses) for the new editorThis view should be able to operate on the SegmentationModel class.
+
 
+
In order to incorporate a new editing module into the Farsight we have two simple options: 1. Create a new menu item for the new editor and connect it to a new method to start the editor, 2. Read the top of the XML file to find out what type of result it contains and instantiage the correct SegmentationResult subclass.
+
 
+
To add a new editing tool to the Toolbar menu follow these steps:<br>
+
1. Create a new QAction for starting the module.<br>
+
2. Connect this QAction to an appropriate slot (LoadTraceResult).<br>
+
3. Create the Slot (LoadTraceResult) - it will get the file name, create the model, and setup the views.<br>
+

Revision as of 15:12, 26 May 2009

Contents

Overview

The current linkage between views in Farsight (ALISA) that enables the PACE technology is implemented using QT's Model/View Architecture. The two model classes: QStandardItemModel and QItemSelectionModel are all that is required for the views to work.

The two types of of views available (scatter plot, and table) can be found in the ftkGUI library. To see an example of how these views can be used in an editor program, check out the NucleusEditor tool. Within this library a help class - segmentationModel has been created to enclose the qstandarditemmodel and qitemselectionmodel, handle editing triggers, and keep track of visualization preferences. This Segmentation Model can be created from Nuclear Segmentation Result. The NuclearSegmentation class handles reading/writing of object data from an XML file.

Location of Files

The relevent classes/files can be found in these locations:

  • ftkObject - farsight/trunk/SegmentationCommon
  • ftkNuclearSegmentation - farsight/trunk/NuclearSegmentation
  • SegmentationModel, SegmentationView - farsight/trunk/NuclearSegmentation/NucleusEditor
  • TableWindow, PlotWindow - farsight/trunk/ftkGUI

Nucleus Example

The actual construction of the Segmentation Model - and setup of the Views is done in NucleusEditor. Refer to the loadResult method for an example of how this is done. This is the process:

1. Build NuclearSegmentation

  • Here an instance of NuclearSegmentation is created and the object information is loaded from an XML file

2. Create SegmentationModel

  • The SegmentationModel constructor requires a pointer to a NuclearSegmentation class. The SegmenationModel class will convert the object feature information into a QStandardItemModel and construct a QItemSelectionModel.

3. Show Table and Scatter Views

  • These require a pointer to the QItemSelectionModel (which also has a pointer to the QStandardItemModel).

4. Create/Show Segmentation Window (in NucleusEditor)

  • This window is specific to nuclei.
  • Key press events within this view are connected to Triggers in the SegmentationModel using signals/slots.
  • Requires a pointer to SegmentationModel and the data/label images to work correctly.

Adding a New Editor

In an ideal implementation the segmentation model would already have all of the information that the new editor needs and one would simply need to create a view that kept updating the selections appropriately. The current implementation is not yet at this stage (and may never be there) - the SegmentationModel is specific to nuclei. Therefore, to add in new editors you have two choices - 1. Make you results look like nuclei and use the current tool, 2. Create a new editing GUI that handles the handles the QItemSelectionModel appropriately for proper linking to the scatter plot and table views.

Personal tools