Difference between revisions of "Dtmslice"

From Dynamo
Jump to navigation Jump to search
Line 54: Line 54:
  
  
[[File:TomosliceToolbar.png|thumb|center|400px| Toolbar options in dtmslice]]
+
[[File:TomosliceToolbar.png|thumb|center|700px| Toolbar options in dtmslice]]
  
 
== Models ==
 
== Models ==

Revision as of 11:28, 24 February 2017

dtmslice or dynamo_tomoslice is the current main tomogram browser inside Dynamo.

A screenshot on dtmslice

The main axis in the figure will show a slice across a volume. The volume is kept in memory. In general, volumes with effective dimensions of 1000k x 1000k x 400 voxels are depicted efficiently by the Matlab renderer, i.e., you can move the depicted slice across the volume reasonably fast. Here effective means that we are are referring to the volume actually stored as a matrix in the memory of the browser. Thus, if you want to visualize a tomogram file with a dimension of 4k x 4k x 1k pixels you probably want to visualize it trough a binned proxy.

Links with a catalogue

When dtmslice has been invoked through a catalogue command, the dtmslice session is linked to this catalogue, and to a particular volume inside the catalogue. This means that the models that are imported, edited and/or saved will be automatically submitted to the folder in the catalogue that is linked to the tomogram currently depicted by tomoslice.

Opening dtmslice

Through the catalogue GUI

In principle, you can just select the row corresponding to your file and then open it with the Selected Volume > Open full volume with tomoslice menu options. For bigger volumes we strongly recommend to first create binned versions. They can then be opened with a secondary click on the row of the tomogram file:

selecting a prebinned version in the dcm GUI

Through the command line

Tomograms can be directly opened with the dtmslice order. When doing so, you should order the opening of prebinned versions.

Thus, while the command

dtmslice tomogram.mrc 

is perfectly valid, the attempt of loading a full tomogram into dtmslice can crash it. We recommend using:

dtmslice tomogram.mrc -pb 2

which will open a prebinned version if available. Otherwise it will create it.

Catalogue links when invoked through the command line

When opening a tomogram through the command line, if you just pass the name of the tomogram file Dynamo does not know in which catalogue you want to operate. Thus, it will put the annotations on the file in a default catalogue. If you already know which catalogue you want to work with, you pass it with the 'c' flag:

dtmslice tomogram.mrc -pb 2 -c myCatalogue

Viewing controls

Activating a viewing control (zoom, rotation or pan) requires that the scene is in scope. A secondary click on the depicted slice ensures that the tomogram scene is selected, and that subsequent keys will indeed activate a viewing option.

Zoom action

Invoked through the press of [-] or [+] . The tomogram scene must be selected. Should turn the arrow cursor into a cross cursor. When the magnifying icons in the toolbar are active, you can use the mouse wheel to zoom in and out of the scene.

The zooming state can be interrupted by pressing [space] or invoking any other viewing control (through [r] or [p]).

Rotation of viewing angle

Invoked through pressing [r]. The cursor should turn into a circling arrow. In this state, moving the mouse while keeping the main button pressed will change the point of view of the scene.

This state can be interrupted by pressing [space] or invoking any other viewing control, through [-] , [+] or [p].

Pan action

[p] activates the panning tool, which allows you to drag the scene. When active, the cursor arrow appears as a hand symbol.


Toolbar options in dtmslice

Models

Models are annotations adapted to different geometries. dynamo_tomoslice works with a model pool of models that are currently on memory. In order to edit or view models that are stored in disk inside a catalogue, the models need to be first brought to the current model pool (i.e. memory). Also, after edition of a model, it needs to be saved back into the catalogue, if the change is meant to be permanent (i.e., stored in disk).

Model management

Models currently in memory (i.e., in the model pool) can be edited. Only the model that is currently active in the window can be edited. To make model active, you can secondary click on any of its elements, and then select the option of making it active.

Creating new models

A new model can be created from scratch with the menu option [Model pool] > [Create new model in pool]. This will create a model of the same class (i.e., vesicle, membrane) as the last model registered in the pool.

Alternatively you can use [Model pool] > [Create new model in pool (select type)] if you need to create a model of a different type.

Importing models from catalogue

Saving models into the catalogue

From the command line, you can always apply the 'saveInCatalogue' method onto your model.

m.saveInCatalogue.

This assumes that your model is already assigned to a volume inside a catalogue.

Editing models

Adding points into a model

The key [c] adds a point to the currently active model.

Adding a center point into a model

The key combination shift+[c] adds a center point into the currently active model, if the model accepts a center property (like is the case for vesicles and surfaces).

Deleting points

The key [delete] will delete the last point inside a model (it can be used repeatedly to delete all points in the model in reversed creation order). To delete other points, secondary click on it and use the delete point option in the menu.

Custom plots

One can use the scene in tomoslice to display any object from the command line. Matlab and Dynamo plotting commands can be directed to any graphic container, as long as one has a handle to the container.

The handle to tomoslice can be read simply by:

h = dpkslicer.getAxes();

Once h is defined, you can plot on it with any regular command.

Models

Models have native methods for depicting different representations: plotPoints, plotBoxes, plotDipoles, plotMesh . The syntax in all of them requires as first argument the handles to the graphic axis.

Thus, if you want to plot inside the current dtmslice session the surface of a vesicle, you just need to create the vesicle:

v = dmodels.vesicle();
v.radius = 30;
v.center = [400,200,120];

and then direct the plotSurface method to the handle h of the graphic scene of tomoslice:

v.plotSurface(h);

However, bear in mind, that the graphic entity that you depicted is treated merely as a graphic object: even if it stems from a model, its presence in the scene has not effect in the model pool.