EVS/ALISA

From FarsightWiki
Revision as of 15:35, 26 May 2009 by Isaac (Talk | contribs)
Jump to: navigation, search

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.

ALISA2.PNG

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