Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 19 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# CrossSegmentationExplorer

Extension containing a 3D Slicer module (Segmentation Verification) for verifying the result of AI segmentation. The extension consists of two components:
1. **Segmentation Verification** – Allows quick and intuitive review of individual segments (masks or labels) within a single segmentation.
2. **Segmentation Comparison** – Enables the comparison of multiple segmentations or segmentation models by initializing 2D and 3D views and supporting component-wise analysis.
Cross Segmentation Explorer is a 3D Slicer extension for the visual inspection and comparison of multiple segmentations on the same volume. The extension is designed for CT volumes and segmentations in DICOM SEG format.

![image](https://raw.githubusercontent.com/cpinter/SlicerSegmentationVerification/main/SegmentationVerification.png)

For reference, the related [Slicer Project Week #41 project page](https://github.com/NA-MIC/ProjectWeek/blob/master/PW41_2024_MIT/Projects/SegmentationVerificationModuleForFinalizingMultiLabelAiSegmentations/README.md)

## How to use

Expand All @@ -18,35 +13,24 @@ For reference, the related [Slicer Project Week #41 project page](https://github
- You can also download it using `SlicerIDCBrowser` by pasting the UID into the study field (see [forum topic](https://discourse.slicer.org/t/sliceridcbrowser-extension-released/32279/2))
- Or the [IDC portal on the web](https://portal.imaging.datacommons.cancer.gov/explore/)
- Load the downloaded data as DICOM (you will need the DCMQI extension but you have it if you already installed the IDCBrowser)
2. Open the Segmentation Verification module
2. Open the CrossSegmentationExplorer module

---

### Segmentation Verification
https://github.com/NA-MIC/ProjectWeek/assets/1325980/77379558-be9d-4c17-a1a9-a38f78384d4b

3. Select the new segmentation if it is not already selected
4. Click on any segment to show only that one in the slice views and the 3D view as well

By going through the segments one by one and reviewing them against the anatomical image, you can evaluate the accuracy of the automatic segmentation of that specific segment.

Other options:
- If you check the "Show neighboring segments semi-transparent" checkbox, the neighboring (spatially adjacent) segments will be shown as well
- The "Previous" and "Next" buttons facilitate stepping between the segments
## CrossSegmentationExplorer Module

---
https://github.com/user-attachments/assets/7f8a19b6-a4cc-49d2-b099-acd6008a5ced

### Segmentation Comparison

https://github.com/user-attachments/assets/09beeba5-b8fc-4ca2-9b52-b1d30368fdfb

3. Select the volume you want to review
3. Select the volume you want to review - After selecting the volume, the module lists the amount of associated segmentations and provides the option to load them. Segmentations that are already loaded are detected and not loaded a second time
4. Select one or more segmentations (The dropdown menu displays all loaded segmentations associated with the selected volume) OR select one or more segmentation models to initialize individual 3D views for each selected item
- Segmentation models group one or more segmentations into a single model representation. This is useful when AI-based segmentation methods produce multiple output files.
- Segmentations are automatically assigned to models based on keywords found in their names.
- Models and associated keywords can be created, modified, or deleted by clicking the plus icon next to the segmentation dropdown.This opens a configuration table, where models
- Models and associated keywords can be created, modified, or deleted by clicking the plus icon next to the segmentation dropdown. This opens a configuration table, where models
can be edited or added. Keywords used for matching should be entered as comma-separated values.
![ModelKeywordTable](https://github.com/user-attachments/assets/dc146377-61a0-4fd9-a20a-5900dc90fa42)
![ModelKeywordTable](https://github.com/user-attachments/assets/2cd2b0d4-b198-4de8-b701-b89f93063287)

*Add, delete, or modify segmentation model names and associated keywords in the model configuration pop-up table*

5. OPTIONAL: Modify the Layout:
Expand All @@ -58,21 +42,22 @@ https://github.com/user-attachments/assets/09beeba5-b8fc-4ca2-9b52-b1d30368fdfb
- Additionally, activating the "Instantiate Vertical Layout" checkbox arranges the 2D views in a vertical layout instead of the default horizontal layout.

*Vertical Layout*
![Vertical Layout](https://github.com/user-attachments/assets/098255bd-2593-4f72-8269-192c5aa73b95)
![Vertical Layout](https://github.com/user-attachments/assets/8e605484-964b-4329-a7e1-f36ba84d63d5)
*Horizontal Layout*
![Horizontal Layout](https://github.com/user-attachments/assets/980cc3f2-e469-483d-bfc6-ca936d3a0080)
![Horizontal Layout](https://github.com/user-attachments/assets/eb2d5a5f-5ded-415b-8ae1-6ec926d0b5f1)


---

Below the main controls, two collapsible sections**Options** and **Segment by Segment Comparison**—provide additional functionality to support review and analysis workflows:
Below the main controls, two collapsible sections**Options** and **Segment-wise comparison across models**—provide additional functionality to support review and analysis workflows:

#### Options
Options allows you to adjust how the segmentations in the 2D views are displayed and how views behave:
- *Link Views:* Synchronize camera movements across all active 3D or 2D views.
- *Change Segmentation Representation to Outline:* Switches the segmentation display from filled regions to outlines.

#### Segment by Segment Comparison
The Segment by Segment Comparison panel enables detailed, structure-wise review across multiple segmentations or segmentation models.
#### Segment-wise comparison across models
The Segment-wise comparison across models panel enables detailed, structure-wise review across multiple segmentations or segmentation models.

**Key Features:**
- *Select Segmentation Group:* Choose an anatomical group (e.g., "Ribs") or select "All" to include all available segments. The table will display only the segments that
Expand All @@ -85,8 +70,10 @@ The Segment by Segment Comparison panel enables detailed, structure-wise review
by-side comparison across segmentations or models.
- *Show Neighboring Segments:* When the "Show neighboring segments semi-transparent" option is enabled, spatially adjacent structures are shown in semi-transparent mode.

![Ribs](https://github.com/user-attachments/assets/c4cd2cde-e34f-4d2f-af0c-5bd9c696937c)
*Example of the "Ribs" segmentation group: all segments with names containing keywords like "rib" are automatically grouped and displayed in the views when selected.*
![Ribs](https://github.com/user-attachments/assets/ed991c4a-f05a-43e5-b474-ac36acab640c)

*Structure-wise comparison of a single rib segment with neighboring segments shown semi-transparent. Neighboring structures are computed separately for each segmentation or model, based on the available segmentations. As each segmentation may contain a different set of anatomical structures, neighboring segments can vary. For example, one model might display adjacent ribs, while another includes nearby organs such as the lungs.*
![SemiTransparent](https://github.com/user-attachments/assets/b7ee7c8e-76e1-4d37-bceb-4a77fe51cbc9)

![SemiTransparent](https://github.com/user-attachments/assets/382a7927-0456-4482-8a8c-bf7675e982b0)
*Structure-wise comparison of a single rib segment with neighboring segments shown semi-transparent. Neighboring structures are computed separately for each segmentation or model, based on the available segmentations. As each segmentation may contain a different set of anatomical structures, neighboring segments can vary—for example, one model might display adjacent ribs, while another includes nearby organs such as the lungs.*