XClose

LMCB - Laboratory for Molecular Cell Biology

Home
Menu

Mesh Plugin

Deforming Mesh Plugin: Interactive 3D Segmentation.

Requirements

Fiji (or imagej)

From within Fiji you can add the update site:

https://sites.imagej.net/Odinsbane/

3D Image stack, with the dimensions correctly set. Currently the plugin only supports one channel.

Getting Started

Once the plugin has been installed in Fiji correctly. Open a 3D image stack, and run the plugin from the plugins menu.

The plugin should start by opening two windows, one window is the control frame, that is described in the interface section.

main controls

The other window is a 3D volume view of the image, that window starts empty and only shows the axis of your image. Click the show volume button to see a volume representation of the image. The contrast can be adjusted by using the +/- buttons.

Labelled cell in 3D

To create a new mesh by click initialize mesh button. A new dialog will open up that allows you to initialize a mesh.

dialog for initializing a mesh

There will be 3 sectioned views of the image, by clicking one of the views, a new sphere will be started. Moving the cursor will determine the radius of the sphere, and clicking again will cause a sphere to be added.

spheres added for creating a new meshthreed view of spheres added

More spheres can be added until the combined shape of the spheres roughly enclose the desired feature. For our example it is a cell undergoing cytokinesis. Once the spheres are finished, click "create mesh"

Initialized Mesh

After the mesh has been initialized, it can be deformed to better outline the shape.

progress of mesh deforming.

A) Shows a freshly initialized mesh, and the volume after a gaussian blur of 3px has been applied. B) The Max Gradient energy has been selected and the image weight parameter has been set to 0.01, then deform button clicked. C) The parameter divisions has been increased from 2 to 3 and remesh has been clicked to create a finer mesh. D)The perpendicular max gradient energy has been selected and the mesh allowed to deform again. This helps reduce the clumping of points at high energy positions.

Now that the mesh represents our image well, we can use it to measure the volume. We have been interested in measuring the volume of both sides of the dividing cell, so there is a tool for defining the furrow plane. Click the tab furrow to create and adjust a furrow.

controls for furrow

To create an initial guess at a furrow, click the set button and the furrow will be placed at the position. The red circle with blue dot can be used to adjust the angle of the furrow. The rectangle with the horizontal lines can be used to move the furrow forward (blue face in 3D view) or backwards (red face in 3D view).

Interface

Mesh Controls & Parameters

main controls and parameters

previous Moves image stack to the previous time frame.

next Moves image stack to the next time frame.

initialize mesh... Open the mesh initialization dialog.

deform Deform the currently select mesh based on the selected energy. Hold down control key to deform all meshes in the current frame.

remesh Creates a new mesh to replace the selected mesh. The new mesh will have a number of triangles based on the divisions parameters.

clear mesh Clears the currently select mesh from the current frame

show volume Shows a volume view of the

external energy Drop down menu to select the image energy that will be used to deform the mesh.

show energy in the volume view, uses values the selected energy provide. Currently either gradient or intensity.

hide volume Hides the volume in the 3D view. This can speed up some actions, such as changing frames.

min. -/+ Changes the display of the 3D image. - dimmer features become opaque. + dimmer features become transparent.

max. -/+ Changes the display of the 3D image. - Pixels appear brighter. + Pixels appear dimmer.

measure volume Opens a text window with the volume measurements for the currently select mesh in all frames.

Furrow Controls

Controls for adjusting furrow

position: The neighboring three text fields contain the x, y and z components of the furrow position. New values can be entered, and they will get applied when the set button is clicked.

direction: The neighboring three text fields contain the x, y and z components of the furrow direction.

jiggle: When a furrow and mesh exists, the position of the furrow explores a local region along the normal to find a position with a smaller furrow radius.

rotate: The direction of the normal is explored to find a smaller furrow radius

curve editor Opens a new window from JFilament.

add editor snake Adds the current snake in JFilament window as a curve, explanation in advanced section

set Sets the position and direction of the furrow to the values entered above.

initialize... Opens an initialization dialog, similar to the dialog used for creating meshes, for positioning the furrow.

X Remove a selected curve.

Active/Deactivate If a curve is selected it will be activated, meaning it can be used as a way to apply an energy to a mesh.

histogram(bottom left) Adjust the threshold in the displayed image.

direction adjuster(bottom middle) Adjust the direction of the furrow.

position adjuster(bottom right) Drag mouse along position adjuster and the furrow will move forward or backwards.

Menu Items

file

-open image Opens an image from file into the plugin.

edit

-undo Reverts the last mesh operation.

-redo Does the last undone operation.

mesh

-save meshes Saves all of the meshes, for all of the frames in a binary format.

-load meshes Restores a previously saved set of meshes.

-export stl Exports the currently selected mesh to an ascii stl file.

-save furrows Saves all of the furrow frames.

-load furrows Loads a previously saved set of furrow planes.

-save curves Saves all of the curves as a JFilament 3D snake file.

-load curves Opens a JFilament 3D snake file to use as curves for deforming meshes.

tools

-create binary image Creates a binary image from the currently selected mesh track.

-create mosaic image Creates a color image, using all of the tracks. Each track uses it's own color.

-measure all volumes Creates a text pane, with volume measurements for each mesh, for each frame.

-javascript console Opens a window to use javascript commands to interact with the program.

help

-about Shows a window with version information.

Advanced

The only advanced technique I will include here is the curve energy. It is useful because the current energies are very local, and the curve energy is long ranged. Consider the following segmentation, I used the gradient energy to get the dimmer regions at the poles, but it doesn't attract to the center of the furrow.

Mesh not quite to center

We can add an arbitrary curve to attract the mesh to, first we have to create a furrow plane where we want to attract the mesh to.

Furrow added

Then we go to the furrow controls and click curve editor button. That will open a JFilament window that can be used to segment the feature we want. In this case, the contractile ring.

JFilament interface for creating curves.

The next step is to click add editor snake and the curve will show up in the list of curves. The position of the curve will be placed on the current position of the furrow plane. Once it has been added to the list, the furrow plane can be moved, the position of the curve is fixed.

Adding and activating a curve.

Select the curve from the list and click activate, the circle next to the curve will turn red to indicate that it is active, this means it can be used.

Go back to the main control panel, enter a value for the curve energy, and click deform.

Curve adjusted mesh

The mesh should deform to attract to the curve, as seen above. A larger curve energy value will pull the mesh closer to the curve.