Giter VIP home page Giter VIP logo

sliceropenanatomy's People

Contributors

alexypellegrini avatar andy9t7 avatar cpinter avatar jcfr avatar lassoan avatar mauigna06 avatar salehchoueib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sliceropenanatomy's Issues

Hierarchical organization of segments

Add feature to enable hierarchical organization of segments.

Design: vtkSegment::Tags can contain the grouping information: "hierarchy" tag would contain full path of the segment (e.g., "/brain/rhomboencephalon/metencephalon/cerebellum"). Tag name would identify hierarchy; there could be multiple tags that the user can choose from (e.g., spatial, functional, โ€ฆ)

Cross-reference:
https://issues.slicer.org/view.php?id=4402

  • Populate hierarchy tag when imported from model hierarchy
    • Question: where to store information on a branch (name, color, visibility attribute)?
  • Improve subject hierarchy infrastructure to support multi-level virtual branches
  • Show segment hierarchy in the virtual tree

Importing atlases is slow

Reason: table view and segment selector widget make lots of populate calls (set opacities as well)

Solution: Below MRML level, so StartModify/EndModify cannot be used, but a simple flag may be used

Save metadata for exported glTF file

We need to save segment hierarchy and terminology information for segmentations. Probably the best way to do it is to create a .json sidecar file. Format and content of this file is not yet specified.

Load/save one segment at a time

By not allocating the whole segmentation when saving or loading, but instead we stream the data, we can prevent memory overflow when allocating the huge 4D volume.

Model hierarchy within subject hierarchy

In order to label the existing atlases in Slicer properly, we need a way to assign standard terminologies to models in a hierarchy. Instead of fixing the current model hierarchy (which is quite buggy and that's part of the reason SH is not based on the original MRML scene model), we can achieve this within subject hierarchy:

  • Add a new column for color
    • Proposed design: new function in abstract plugin which SH plugins can implement if makes sense to show one color (models, segments, fiducials, ?)
    • Add option to SH tree view to whitelist/blacklist plugins. This will be done with two QLists that, if not empty, will specify which plugins are used for populating the context menu
    • On double-click on color, the terminology selector will pop up, which sets the color and writes the terminology in the proper place (the relevant SH plugins would do this).
    • Add a remove button to terminology selector (in segments it's mandatory but in other nodes it's not)
  • Add opacity SH plugin that has a slider in a sub-menu of the action (similarly to slice spacing in slice view controller)
  • Add color information to folder items, allow them to override branch color

Create SlicerOpenAnatomy extension

  • Use Extension Wizard to create SlicerOpenAnatomy extension
  • Extension has one loadable (C++) module called OpenAnatomyExporter
  • Logic can export all the model nodes in the scene as obj files
  • Write out glTF file for the exported obj files using JsonCPP. See an example here

Export markups planes

It would be nice if planes could be exported as they usually used in surgical planning to mark surgical margins

Create gltf exporter

It would contain models and volumes. Since 3D textures are not supported in gltf yet, we'll first work on models only. Volumes will be saved as nrrd.

Hierarchy information would be stored externally.

  • Ask on VTK mailing list if anybody is working on gltf exporter already. Ask for comment on our choice of gltf toolkit (do they like it, is there any better suggestion). Send the email draft to Csaba and Andras before posting it to the mailing list.
  • Create a VTK-based exporter (similar to OBJ exporter) - add it to https://github.com/PerkLab/SlicerOpenAnatomy/tree/master/OpenAnatomyExporter/Logic folder
  • Add a test that sets up a simple rendering scene and writes it to gltf (similar to VTK\IO\Export\Testing\Cxx\TestOBJExporter.cxx)

Low number of point meshes are not exported with certain reduction factor

The boxes models are not exported with reduction factor = 0.8 because they only have 24 points

Exporting...
Writing BoneReconstructionPlanner...
Writing Segmentation Models...
Model 1/35: Fibula
Model 2/35: decimatedFibula
Model 3/35: Mandible
Model 4/35: decimatedMandible
Writing Mandible reconstruction...
Writing Plane Cuts...
Writing Cut Bones...
Model 5/35: Fibula Segment 0A-0B
Model 6/35: Fibula Segment 1A-1B
Model 7/35: Fibula Segment 2A-2B
Model 8/35: Resected mandible
Writing Mandible2Fibula transforms...
Writing Bone Pieces Transforms...
Writing Transformed Fibula Pieces...
Model 9/35: Transformed Fibula Segment 0A-0B_4
Model 10/35: Transformed Fibula Segment 1A-1B_4
Model 11/35: Transformed Fibula Segment 2A-2B_4
Writing miterBoxes Models...
Model 12/35: miterBox0_A
  Warning: empty model, not exported.
Model 13/35: miterBox0_B
  Warning: empty model, not exported.
Model 14/35: miterBox1_A
  Warning: empty model, not exported.
Model 15/35: miterBox1_B
  Warning: empty model, not exported.
Model 16/35: miterBox2_A
  Warning: empty model, not exported.
Model 17/35: miterBox2_B
  Warning: empty model, not exported.
Writing biggerMiterBoxes Models...
Model 18/35: biggerMiterBox0_A
  Warning: empty model, not exported.
Model 19/35: biggerMiterBox0_B
  Warning: empty model, not exported.
Model 20/35: biggerMiterBox1_A
  Warning: empty model, not exported.
Model 21/35: biggerMiterBox1_B
  Warning: empty model, not exported.
Model 22/35: biggerMiterBox2_A
  Warning: empty model, not exported.
Model 23/35: biggerMiterBox2_B
  Warning: empty model, not exported.
Writing Fibula planes...
Writing Fibula Segments Lengths...
Writing Inverse mandible reconstruction...
Writing Inverse Plane Cuts...
Writing Inverse Append...
Writing Cut Mandible Pieces...
Model 24/35: Mandible Segment 0
Model 25/35: Mandible Segment 1
Model 26/35: Mandible Segment 2
Writing Full Mandibles...
Model 27/35: Mandible 0
Model 28/35: Mandible 1
Model 29/35: Mandible 2
Writing Transformed Mandible Pieces...
Model 30/35: Transformed Mandible Segment 0_4
Model 31/35: Transformed Mandible Segment 1_4
Model 32/35: Transformed Mandible Segment 2_4
Writing Transformed Full Mandible...
Model 33/35: Transformed Mandible 0_4
Model 34/35: Transformed Mandible 1_4
Model 35/35: Transformed Mandible 2_4
Writing Mandibular planes...
Writing file /home/BoneReconstructionPlanner.gltf...
Export successful.

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.