Giter Site home page Giter Site logo

paluchlabucl / deformingmesh3d-plugin Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 4.0 1.45 MB

An imagej/fiji plugin for interactive segmentation of 3D surfaces

Home Page: https://franciscrickinstitute.github.io/dm3d-pages/

License: MIT License

Java 97.71% HTML 0.64% JavaScript 0.29% Python 1.36%
3d image-analysis surface triangle-mesh

deformingmesh3d-plugin's Issues

Interactive track adjustment.

Using the T and B keys can be used to track the mesh between frames. By holding down "shift" the mesh in the next frame can be clicked to be selected. "ctrl" will copy the mesh from the current frame to the next frame. "L" will attempt to link automatically to a candidate mesh.

BUG: Selected mesh stays selected when tracks are cleared.

This BUG affects users when they, load new meshes, use the mesh manager, or start new meshes.

The selected track will be removed from the display, but the track will still be selected. Tracking the mesh will cause it to be added, in it's entirety, to the segmentation.

Make ctrl-s save the current meshes.

Add an accelerator to save meshes using ctrl-s. Concerns, selecting a file if one hasn't been selected before. Adding some indication that the file is actually being saved.

Control the furrow plan from the 3D canvas.

The commands to move the furrow, center, and split a mesh all exist and just need to be added to the appropriate controls with hot keys.

f - centers the furrow
f+shift - starts the choose rotation
f+ctrl flips the furrow direction
up moves the furrow forward
down moves the furrow backwards

Mesh scale factor

Hi,

Thank you for this awesome plugin to create 3D cell annotations. I want to use existing nuclei segmentations as mesh initialization. To achieve this I load the label images in Python and convert them to meshes with skimage.measure.marching_cubes. Then I shift the obtained meshes such that the origin corresponds to the image center. However, I have to apply an additional scale factor to the obtained vertices to get the meshes to fit.

In code this is what I am doing for each label-mask:

verts, faces, _, _ = marching_cubes(mask, spacing=spacing)
        
# Shift to origin.
verts[:, 0] -= ( labeling.shape[0] // 2 ) * spacing[0]
verts[:, 1] -= ( labeling.shape[1] // 2 ) * spacing[1]
verts[:, 2] -= ( labeling.shape[2] // 2 ) * spacing[2]
# Scale.
verts *= factor

So far I couldn't figure out how this factor is computed. By trial and error I figured out that the following combinations work:

  • spacing = (0.6, 0.216, 0.216), factor=0.0225
  • spacing = (1.0, 0.25, 0.25), factor=0.0185
  • spacing = (0.5, 0.25, 0.25), factor=0.0195
  • spacing = (1, 1, 1), factor=0.004875

I tested this by loading the mask image (which has the spacing set) and then loading the mesh. Then I checked by eye if the outlines fit. I guess the re-scale factors are good enough that I can't see it anymore by eye. However, I would not bet that the values are 100% correct.

Could you enlighten me what the correct formula would be to obtain this scale factor?

Thank you and have a nice day!

Colors are linked to names.

Colors are linked to the name of a mesh track. That is ok for autogenerated mesh names, but if a mesh name has been set, it should retain that name. It should also be represented in such places as the status pane, and the mesh track manager.

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.