Code Monkey home page Code Monkey logo

segmentationreview's Issues

writing of extra file t.seg.nrrd

Hi Anna,

I've been trying out your extension, thanks for this! I'm also interested in streamlining annotations in Slicer, for DICOM files. :)

I noticed that a t.seg.nrrd file is created when I click 'Overwrite Edited Mask'. I see in your code that you save the segmentation node as t.seg.nrrd, read it in, and write it out as nifti. Perhaps you could convert this seg node into a label map and save it directly out as nifti without the intermediate file.

Maybe something like this from the script repo:
Screen Shot 2023-06-09 at 6 46 15 PM

Thanks!

small improvements

A few small issues:

  1. I noticed that the numbering in 'Checked' starts with 0, maybe it could start from 1 which could be better for clinicians?
  2. Perhaps you also want to sort the files so that they can be reviewed in order.
  3. Maybe a timestamp would be better instead of "_upd" appended to the name

Add Segmentation editor tools

End-user suggestion:
Add Smoothing, Islands, Grow from Seeds, and Fill between Slices to the Segmentation editor.
Maybe even all...

mappings file not updating for consecutive directories

The mapping file doesn't update once you change the working directory.

To reproduce:

  1. Have two directories, each with its own mapping.csv, images, and masks.
  2. Select the 1st directory and observe that it works as expected (rate 1 image).
  3. Select the 2nd directory (without closing slicer or reloading the extension). Observe that the counter gets reset, but the extension still uses the mapping.csv from the 1st directory (loading back the 1st image from 1st directory).

Additional information:

  • The new (for the 2nd dir) annotation.csv and log files get created into the new (2nd) directory, suggesting that the self.directory gets updated once we change directories (but perhaps not in the correct order).

My best guess would be either:

  1. due to self.directory, self.mappings, or self.with_mapper_flag not being reset at the onAtlasDirectoryChanged.
  2. or, alternatively, it also might be an issue with the order of the commands involving the function _restore_index. Maybe the unchecked_files get rechecked with the old mapping.csv against the new annotations.csv.

Clean up/reset environment after finishing reviewing each directory

Once the reviewer has already selected the 1st directory to review, if the reviewer changes to another directory (to review another dataset, for example), the subsequent directories will have "stuff" from the previous one.
Examples of "stuff" (that I've noticed so far) are:

  • "Checked" counter doesn't reset, but instead appends to the numbers of the previous dataset(s).
  • Once you open the 2nd directory, the mask and image pulled to the viewer are still from the 1st dataset (next in line). It is only after the reviewer presses "Save and Next" once that the viewer displays an Image from the 2nd dataset.

Reproduce the bug:
1-Load 1st dataset by selecting the directory on the wizard
2-Annotate/review at least one image
3-Load the 2nd dataset (different from the first one) by selecting the directory on the wizard

Ordering the cases based on stats like segmentation volume

Hi all,

Really cool tool!

Is it possible to order the cases by pre-computed stats like segmentation volume size? When going through an extremely large cohort, it would be cool to have the ability to sort them and effectively look at the n-th percentile of smallest and biggest volumes.

Obviously, one could still do that manually by setting up a folder with filtered-out cases and running SegmentationReview as usual.

Multi-label segmentation masks - make the visibility toggle persistent throughout cases

Iโ€™m working with masks that have multiple labels (e.g., 14). I am only interested in a subset of these labels (e.g., 2 out of 14). When I toggle the visibility to focus on these 2 labels for a single case, all 14 labels are shown again when I move on to the next case.

Is it possible to make the toggle settings persistent across different cases?

possibility to edit/review again

A possible use case that you might want to handle:

Say if I have finished annotating/saving/reviewing the files, and later want to go back to edit them again, I currently get a list index out of error.

Screen Shot 2023-06-09 at 6 27 07 PM

Maybe the default could restore to the last annotation so the user can pick up where they left off, but, if all have been completed it could start from the first one again. I guess in this case you'd also need to load the latest segmentation file instead of the one that ends in "mask.nii.gz".

Just a thought :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.