Model Menu

Actions that can be applied to the Model layers. The Model layer is one of three main segmentation layers (Model, Selection, Mask) which can be used in combibation with other layer. See more about segmentation layers in the Data layers of Microscopy Image Browser section.

Back to Index --> User Guide --> Menu

 

Contents

 

Convert type

Convert model to a different type; the current type of the model is checked in the menu.

Types of models in MIB

  • 63 materials, [_default_], allows to store Models, Selection and Mask layers in a single memory container, reduces memory requirements and improves performance, but limits the number of materials to 63
  • 255 materials, allows to have up to 255 materials in the model, but requires additional computer memory to keep Selection and Mask layers, which doubles memory requirements
  • 65535 materials, allows to have up to 65535 materials in the model, requres ~1.25 times more memory than models with 255 materials. Please note that when using this mode the look of the segmentation panel will be different. Click here to see a short demonstration
  • 4294967295 materials, allows to have up to 4294967295 materials in the model, requires twice more memory than 65535.
  • Indexed objects->2D objects conn4, detect all 2D objects (connectivity 4) in all materials of the current model and generate a new model, where each object has an unique index
  • Indexed objects->2D objects conn8, detect all 2D objects (connectivity 8) in all materials of the current model and generate a new model, where each object has an unique index
  • Indexed objects->3D objects conn6, detect all 3D objects (connectivity 6) in all materials of the current model and generate a new model, where each object has an unique index
  • Indexed objects->3D objects conn26, detect all 3D objects (connectivity 26) in all materials of the current model and generate a new model, where each object has an unique index

An example of standard model conversion into the model with indexed objects


How to work with models having more than 255 materials

Materials should be named with numbers that represent the index of the current working material. For example, in the image below the current working material for the brush tool is 11555.

Selection of material for work can be done either by the right mouse click over the segmentation table and seletion of the Rename... entry in the menu; or by moving the mouse over the desired object in the Image View panel and press the Ctrl + F shortcut.



New model

Allocate space for a new model. Use this menu entry when you want to start a new model or to delete the existing one. Alternatively it is possible to use the Create button in the Segmentation Panel.

 

Load model

Load model from the disk. By default MIB tries to read the models in the MATLAB format (.model), but it is also possible to specify other formats as well

List of compatible model types

  • .AM, Amira Mesh - as Amira Mesh label field for models saved in Amira format
  • .NRRD, Nearly Raw Raster Data - a data format compatible with 3D slicer.
  • .MRC, Medical Research Council format - a data format compatible with IMOD http://bio3d.colorado.edu/imod. When using this mode, it is possible to provide a list of MRC files, where each object is encoded using its number in a separate MRC-file; after that MIB will assemble and merge all these individual objects together into a single model.
  • .PNG, PNG format - save models as 2D slices using Portable Network Graphic format
  • .TIF, TIF format - save models as 2D slices or 3D volumes using Tag Image File format

Note! almost any standard image format can be loaded as a model, please choose All files (.) filter in the Open model dialog.


Alternatively it is possible to use the Load button in the Segmentation Panel.

 

Import model from MATLAB

Imports model from the main MATLAB workspace. Please provide a variable name from the main MATLAB workspace with the model. The variable could be either a matrix with dimensions similar to those of the loaded dataset [1:height, 1:width, 1:no-slices] of the uint8 class or a structure with fields specified below.

Fields of MIB model structure

  • .model - the field model is a matrix with dimensions similar to those of the loaded dataset [1:height, 1:width, 1:depth, 1:time] of the uint8 class
  • .modelMaterialNames - [_optional_] the field materials a cell array with names of the materials used in the model
  • .modelMaterialColors - [_optional_] a matrix with colors (0-1) for the materials of the model, [1:materialIndex, Red Green Blue]
  • .labelText - [_optional_] a cell array containing labels for the annotations
  • .labelPosition - [_optional_] a matrix containing positions for the annotations [1:annotationIndex, x y z]


 

Export model to...

Exports model from MIB to other programs.

List of options to export the models

  • MATLAB, export to the main MATLAB workspace, as a structure (see above). The exported models may be later imported back to MIB using the Import model from Matlab menu entry
  • Imaris as volume, export model to Imaris (if it is available, please see System Requirements section for details


 

Save model

Saves model to a file in the MATLAB format; the file name is not asked

Model filename considerations, when using Save model

  • Default template such as Labels_NAME_OF_THE_DATASET.model
  • the name that was provided from the Save model as... entry
  • the name that was obtained during the Load model action. The models can be saved also using the corresponding Save model button in Toolbar


 

Save model as...

Provide filename and file format and save the model to a file

List of model formats available for saving

  • .AM, Amira Mesh - as Amira Mesh label field in RAW, RAW-ASCII and RLE compressed formats. (Note! the RLE compression is very slow).
  • .MAT, MATLAB format - MATLAB native data format for MIB version 1
  • .MODEL, MATLAB format - [default], MATLAB native data format for MIB version 2
  • .MOD, IMOD format - contours for IMOD
  • .MRC, IMOD format - volume for IMOD
  • .NRRD, Nearly Raw Raster Data - a data format compatible with 3D slicer.
  • .PNG - save models as 2D slices using Portable Network Graphic format
  • .STL, STL format - triangulated mesh for use with visualization programs such as Blender.
  • .TIF, TIF format


 

Render model...

The segmented models can be rendered directly from MIB using one of the following methods:

MIB rendering

Starting from MIB (version 2.5) and MATLAB R2018b the materials can be directly visualized in MIB using hardware accelerated volume rendering engine. The datasets for visuzalization can be downsampled during the export. It is possible to make snapshots and animations.

Limitations:

  • One material at the time
  • Scale bar is not yet available

A brief demonstration is available in the following video:
https://youtu.be/J70V33f7bas


MATLAB isosurface

MIB uses MATLAB engine to generate isosurfaces from the models and visualize those using a modification of the view3d function written by Torsten Vogel.

The following controls are implemented:
Double click to restore the original view
Hit 'z' key over the figure to switch from ROTATION to ZOOM
    In the ZOOM mode
  • press and hold left mouse button to zoom in and out
  • press and hold middle mouse button to move the plot
Hit 'r' key over the figure to switch from ZOOM to ROTATION
    In the ROTATION mode
  • press and hold left mouse button to rotate about screen xy axis
  • press and hold middle mouse button to rotate about screen z axis
A brief demonstration is available in the following videos:
https://youtu.be/svAFGBRfeoI
https://youtu.be/dMeoIZPaDS4?t=16m56s

MATLAB isosurface and export to Imaris

MIB uses MATLAB engine to generate isosurfaces from the models and export the resulting surfaces to Imaris for visualization.

A demonstration is available in the following video:
https://youtu.be/nDpC8b8lqo4


MATLAB volume viewer

MATLAB volume viewer, render the model using MATLAB volume viewer, available only for the MATLAB version of MIB and requires R2017b - R2019b or newer. For the release R2019b, the materials may be displayed together with the volume, but there are not control for lightning, so it is not very convenient.

Demonstration of the visualization of models as Volumes:
https://www.youtube.com/watch?v=J70V33f7bas
Demonstration of the visualization of models as materials together with the image dataset:
https://youtu.be/GM9V1IxNkTI


Fiji volume

MIB can use Fiji 3D viewer for visualization of the model as a volume (click here for details. (requires Fiji to be installed, see here).

A demonstration is available in the following video:
https://youtu.be/DZ1Tj3Fh2HM


Imaris surface

Imaris surface, render the model in Imaris; requires Imaris and ImarisXT to be installed, see here

A demonstration is available in the following video:
Without ImarisXT https://youtu.be/MbK2JcTrZFw
With ImarisXT https://youtu.be/yODGYJUzTr0

The rendered material is specified in the Material list of the Segmentation Panel.



Annotations...

Use this menu to modify the Annotations layer

A brief demonstration is available in the following video:
https://youtu.be/3lARjx9dPi0

Model Statistics...

Get statistics for the selected material of the model. Statistical results may be used to filter the model based on properties of its objects. The statistics dialog can also be reached from the Segmentation Panel ->Materials List->Right mouse click->Get statistics... See more here

Back to Index --> User Guide --> Menu