EVS/ALISA
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 | + | 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 | + | 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: | ||
− | * | + | * ftkObject - farsight/trunk/SegmentationCommon |
* ftkNuclearSegmentation - farsight/trunk/NuclearSegmentation | * ftkNuclearSegmentation - farsight/trunk/NuclearSegmentation | ||
− | * SegmentationModel, SegmentationView - farsight/trunk/ | + | * SegmentationModel, SegmentationView - farsight/trunk/NuclearSegmentation/NucleusEditor |
− | * | + | * TableWindow, PlotWindow - farsight/trunk/ftkGUI |
=== Nucleus Example === | === Nucleus Example === | ||
− | The actual construction of the Segmentation Model - and setup of the Views is done in | + | 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 | + | * 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 | + | * 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 | + | 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. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
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.