Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentations Settings UI #1391

Closed
JamesAPetts opened this issue Jan 24, 2020 · 10 comments
Closed

Segmentations Settings UI #1391

JamesAPetts opened this issue Jan 24, 2020 · 10 comments
Assignees
Labels
IDC:priority Items that the Imaging Data Commons wants to help sponsor

Comments

@JamesAPetts
Copy link
Member

JamesAPetts commented Jan 24, 2020

Ongoing work on the segmentation UI. For this issue we should address global segmentation settings.. This ticket is addressing part of this comment:

It would be nice to have buttons that control segment visibility (overlay, contour, both, opacity), similar to what we have in Slicer (see you already have plans for this in the figma sketch).

The per-segment settings (color/alpha/visibility) part of the request is not in the scope of this issue, and will be implemented later.

This Figma template shows how the UI should look.

  • Add a gear icon to the top right of the segmentation panel.

  • Clicking a Gear icon changes the contents of the side panel to be a settings menu.

  • Render segment outline: Checkbox, default Checked

    • When checked, a horizontal slider appears for Outline Opacity with values 0 - 1.0 increments of 0.05
    • When checked a horizontal slider appears for Outline Width with values 1-5, increment 1 px.
  • Render segment fill: Checkbox, default Checked

    • When checked, a horizontal slider appears for Fill Opacity with values 0 - 1.0, increments of 0.05
  • Render inactive segmentations: Default off

    • When checked a horizontal slider appears for Opacity of inactive segmentations with values 0 - 1.0 increments of 0.05.

Clicking the back button should go back to the segmentation menu. When the segmentation menu is hidden and then reopened, the view should default to the segmentation menu, not the settings menu.

The UI should alter these settings which are consumed by the viewer components: https://github.com/cornerstonejs/cornerstoneTools/blob/master/src/store/modules/segmentationModule/defaultConfiguration.js

@JamesAPetts JamesAPetts added the IDC:priority Items that the Imaging Data Commons wants to help sponsor label Jan 24, 2020
@salimkanoun
Copy link
Contributor

Excellent, excellent, excellent !
Can't wait to work with you on PET/CT segmentation, when OHIF will render fused images.

@stale
Copy link

stale bot commented Feb 14, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale 🥖 label Feb 14, 2020
@stale stale bot removed the Stale 🥖 label Feb 15, 2020
dannyrb added a commit that referenced this issue Mar 13, 2020
* Filter segs and fetch correct metadata.

* Initiate seg loading logic on series load into viewport. Need to write.

* Automatic consumption of SEG functional.

* Pull in master.

* Fix issues after pulling in master.

* Clean up old segmentation handlers.

* WIP

* WIP

* Poppulate viewport with metadata.

* Show hide/segmentation in react-vtkjs-viewport.

* feat: 🎸 View segmentations in vtkjs viewport

* Filter segs and fetch correct metadata.

* Initiate seg loading logic on series load into viewport. Need to write.

* Automatic consumption of SEG functional.

* Pull in master.

* Fix issues after pulling in master.

* Clean up old segmentation handlers.

* WIP

* WIP

* Poppulate viewport with metadata.

* Show hide/segmentation in react-vtkjs-viewport.

* feat: 🎸 View segmentations in vtkjs viewport

* Rebase on master.

* format format format

* add basic extension parts

* Updated yarn lock

* Fetch derived/referenced displaysets in sidepanel

* Add buttons, expose seriesDescription, write notes for Danny.

* Add growcut tool extention. -> Move to a seperate repo.

* Change some text fields.

* expose dialog provider

* hide draggable area

* No pointer events for now; need to revisit

* Don't filter seg from the outset for now

* fiddling about

* fix path to series data

* fix logic to determine next available labelmapindex

* Ability to swtich between labelmaps

* Return a promise so we can make sure our labelmap is loaded before pulling metadata

* Better UI to toggle labelmaps

* Fix accidental untoggle of active labelmap for ui

* Remove brush tool from cornerstone extension

* Add cstools in preInit for seg extension

* Add buttons for seg magic

* Hide the measurements panel for now

* Slightly better seg/scissor icons

* Add eraser

* ability to switch segments

* seg color / switcher

* Fix vtk labelmap cache.

* sidepanel should scroll if there's overflow

* Use a fancier range slider

* Slightly prettier buttons

* Push in progress

* A bit more reactive; handle no-meta

* Update to vtk.js 11.14.0 and react-vtkjs-viewport 0.6.0

* chore: kickstart preview

* Fix conflict issues

* Refactor panel

* Isolate increment functions

* Wip segment table

* Hide selector and add scroll to segmentation

* Increase width of segment description

* Hide not used items

* Add new select for segmentations

* Align ui

* Fix default segmentation

* Fix broken import test

* Get measurements panel back and add spacing to grouped buttons

* Hide brush and selector and refresh when switching segmentations

* Add pointer events back and fix broken tests for measurement table

* Update segment list when switching humbnails

* CR Update: Minor UI adjustments

* CR Update: Set active segment

* Move components to components folder

* Add new settings ui

* Integrate configuration

* Improve styles

* Float numbers

* Improve css

* Refresh settings menu if side panel changed

* Fix settings rendering logic and remove comments

* Extract components

* Remove not used tools

* Remove non used extension

* Use style variables and remove comments

* Remove non used dep from lock

* Remove tools

* Remove segmentation from toolbar

* Add todo and brushradius from config

* Fix packagejson growcut import

* Remove webpack config already defined in parent

* Update package json description

* Change component name to british english to us

* Improve prop types

* Rename cornerstone label map event

* Scope css

* Extract and add doc to helper

* Update jsdocs for getDerivedDatasets

* Add proptypes and cr updates

* Update tablistitem proptypes

* config is readonly, rollback destructuring

* Remove event for side panel

* Add jsdocs for util

* Extract getimageid to studymetada

* Use ohif log instead of console

* Remove specific style from side panel

* Fix default props for brush radius

* Descructure configuration props from settings component to avoid invalid props

* Update proptypes to be required (settings)

* Update readme

* Remove commandsmodule

* Get configuration module inside the component

* Set selected segment

* Rename extension and use modality to filter

* Fix for failing tests (#1423)

* hello world

* Finish rebase for Igor.

* Re-fix cornerstoneTools version that got messed up in merge.

* Fix reactivity of isDisabled, write implementation for the SEG panel.

* Nuke yarn.lock to stack CST to 4.12.0

* Remove debugger statements.

* fix: bump cornerstone-tools version to address toFixed issue

* test: force tests for MISTER^MR to navigate to study directly

* test: remove eraser tool test

* test: count is off by one

* test: don't save SR state for the time being

* test: disable more tests

Co-authored-by: James A. Petts <jamesapetts@gmail.com>
Co-authored-by: dannyrb <danny.ri.brown@gmail.com>
Co-authored-by: igoroctaviano] <igoroctaviano@users.noreply.github.com>
Co-authored-by: Mirna Silva <mirna.silva@radicalimaging.com>
@fedorov
Copy link
Member

fedorov commented Mar 16, 2020

I see #1392 has been merged, and IDC sandbox is at the latest 3.8.0 release of OHIF Viewer, but it does not work for me.

Here are the issues:

  1. maybe this is expected, but if I open TCIA QIN-HEADNECK collection, I do not see a single study that shows SEG in the Modality column; if I search for SEG in the Modality column, I get 0 studies
  2. if I open a study that includes SR modality (since I expect those should have SEG as well for this specific collection), I do not see any SEG in the left column (which perhaps is expected, although confusing), but if I toggle the "Segmentations" "thingy" in the upper-right corner, the list is empty.

Here's example study: https://idc-sandbox-000.firebaseapp.com/projects/chc-tcia/locations/us-central1/datasets/qin-headneck/dicomStores/qin-headneck/study/1.3.6.1.4.1.14519.5.2.1.2744.7002.780384232736549650569052637489

image

@fedorov
Copy link
Member

fedorov commented Mar 16, 2020

image

@pieper
Copy link
Member

pieper commented Mar 16, 2020

I agree, it's still quite confusing. It partly works (in some cases). Only the segs for the selected series are shown.

If you select the CT (at the bottom of the series list) you can see the seg that is defined on it.

image

And same with the PET.

image

It's cool that they show up in the MPR! (Changing the selected segmentation doesn't seem to update the view though.

image

@fedorov
Copy link
Member

fedorov commented Mar 16, 2020

Hopefully, once ImagingDataCommons/IDC-WebApp#49 is resolved, we would be able to try to use the IDC portal for subsetting the content to be viewed, and it should be easier to test the latest features.

@fedorov
Copy link
Member

fedorov commented Mar 16, 2020

@pieper how can I identify studies that have segmentations? Or this is something that can't be done with the Study List interface at all?

@pieper
Copy link
Member

pieper commented Mar 16, 2020

@pieper how can I identify studies that have segmentations? Or this is something that can't be done with the Study List interface at all?

I don't think you can tell currently.

@fedorov
Copy link
Member

fedorov commented Apr 8, 2020

I was playing with the interface, and I realized there are some hick-ups with displaying segmentations. It is basically not clear whether segmentations are available for a given study. Segmentations list shows as empty, and looks like one needs to load imaging series that has segmentations first before segmentations list is populated. And even after that there seems to be a delay in that list being populated. See screencast here:

https://www.screencast.com/t/g6wzeltT

The URL for that screencast is here: https://idc-sandbox-000.firebaseapp.com/projects/idc-tcia/locations/us-central1/datasets/lidc-idri-seg-sr-dcm/dicomStores/lidc-idri-seg-sr-dcm/study/1.3.6.1.4.1.14519.5.2.1.6279.6001.131383203689189807643685075952&sa=D&ust=1586369794567000&usg=AFQjCNHVY4eaLmveYQCRHA98Hwr7lOXIVA

@pieper this is the LIDC issue we discussed elsewhere.

@fedorov
Copy link
Member

fedorov commented Apr 9, 2020

As discussed with @JamesAPetts today, this will continue in #1458. I will copy the comment above to that issue.

@fedorov fedorov closed this as completed Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDC:priority Items that the Imaging Data Commons wants to help sponsor
Projects
None yet
Development

No branches or pull requests

6 participants