Difference between revisions of "Walkthrough on creation of 3d scenes"
(Created page with "This walkthrough shows how to create graphic depictions of tomogram contents. Those include: * Slices of tomgrams * Objects loca * Geometrical objects (as membranes represent...") |
|||
Line 1: | Line 1: | ||
This walkthrough shows how to create graphic depictions of tomogram contents. Those include: | This walkthrough shows how to create graphic depictions of tomogram contents. Those include: | ||
− | * Slices of | + | * Slices of tomograms |
* Objects loca | * Objects loca | ||
* Geometrical objects (as membranes represented by triangulations) | * Geometrical objects (as membranes represented by triangulations) | ||
Line 17: | Line 17: | ||
<br /> This requires a ''model'' object. | <br /> This requires a ''model'' object. | ||
+ | === From the ''Dynamo'' web === | ||
− | + | The tomogram can get fetched through: | |
+ | <tt>wget https://wiki.dynamo.biozentrum.unibas.ch/w/doc/data/fhv/crop.rec </tt> | ||
+ | in a linux shell, or | ||
− | + | <tt>curl -O https://wiki.dynamo.biozentrum.unibas.ch/w/doc/data/fhv/crop.rec </tt> | |
+ | under MacOS. | ||
− | The | + | The table, template and membrane model can be fetched similarly with names |
+ | <nowiki>https://wiki.dynamo.biozentrum.unibas.ch/w/doc/data/fhv/alignmentLocalRefinement.tbl | ||
+ | https://wiki.dynamo.biozentrum.unibas.ch/w/doc/data/fhv/averagedLocalRefinement.em | ||
+ | https://wiki.dynamo.biozentrum.unibas.ch/w/doc/data/fhv/membraneModel.omd</nowiki> | ||
− | |||
=== From your previos work === | === From your previos work === | ||
− | Assuming you have done the [[advanced starters guide| tutorial on the FHV]] data set, you can use the elements that you have already computed. Just extract them from the best project that you completed. Do not use a subboxing project: we want to get a template for the full crown, | + | Assuming you have done the [[advanced starters guide| tutorial on the FHV]] data set, you can use the elements that you have already computed. Just extract them from the best project that you completed. Do not use a subboxing project: we want to get a template for the full crown. Examples below are given assuming that your best project was named <tt>localized</tt>, substitute if not. |
==== Table ==== | ==== Table ==== | ||
− | |||
− | + | Recover the last computed refined table in the data base of your project | |
− | + | ||
− | + | <tt>ddb localized:rt -r t</tt> | |
− | + | ||
− | + | and write it to a file | |
− | > | + | |
− | >> | + | <tt>dwrite(t,'alignmentLocalRefinement.tbl') |
− | >> | + | |
− | >> | + | ==== Template ==== |
+ | |||
+ | Fetch the last computed average | ||
+ | |||
+ | <tt>ddb localizedFullAngle:rt -r a</tt> | ||
+ | |||
+ | and write it into disk | ||
+ | |||
+ | <tt> dwrite(t,'averagedLocalRefinement.tbl'); </tt> | ||
+ | |||
+ | ==== Membrane model ==== | ||
+ | If you [[created manually a membrane model]], it should be inside your catalogue | ||
+ | |||
+ | <tt>dwrite(m,'membraneModel.omd');</tt> | ||
+ | |||
+ | |||
+ | == Depicting a slice of a tomogram == | ||
+ | |||
+ | === The slice object === | ||
+ | |||
+ | <tt>s = dpktomo.volume.slices.Slice(); </tt> | ||
+ | |||
+ | Here <tt>s</tt> is just an object that will read data from a tomogram file to be defined. | ||
+ | |||
+ | <nowiki>s.source = 'çrop.rec; | ||
+ | s.center = 'center'; | ||
+ | s.l = [1000,1000]; | ||
+ | s.eulers = 'z'; | ||
+ | s.fetchData();</nowiki> | ||
+ | |||
+ | |||
+ | === The slice depictor object === | ||
+ | |||
+ | <nowiki>f = figure; haxis = gca();hold on; | ||
+ | sz = dpktomo.volume.slices.SliceGraphic(s); | ||
+ | sz.axis.h = haxis; | ||
+ | sz.create(); | ||
+ | % then use h.update(); to | ||
+ | shg; </nowiki> | ||
+ | |||
+ | We can change the angle of view with the rotation icon or programmatically: | ||
+ | <tt>view([-38,60]);</tt> | ||
+ | |||
+ | [[ File:Fhv3dAntialiasing.png |thumb|center| 600px| View of the slice with the viewing perspective ([-38,60]).]] |
Revision as of 09:39, 21 August 2017
This walkthrough shows how to create graphic depictions of tomogram contents. Those include:
- Slices of tomograms
- Objects loca
- Geometrical objects (as membranes represented by triangulations)
Contents
The data set
This walkthrough works with the data set from the advanced starters guide. The goal is to depict:
- One slice of the tomogram in 3D.
This requires a tomogram file.
- The viruses placed an oriented along the directions found during a previous computed average.
This requires a template represe.
- A sketch of the membrane
This requires a model object.
From the Dynamo web
The tomogram can get fetched through:
wget https://wiki.dynamo.biozentrum.unibas.ch/w/doc/data/fhv/crop.rec
in a linux shell, or
curl -O https://wiki.dynamo.biozentrum.unibas.ch/w/doc/data/fhv/crop.rec under MacOS.
The table, template and membrane model can be fetched similarly with names
https://wiki.dynamo.biozentrum.unibas.ch/w/doc/data/fhv/alignmentLocalRefinement.tbl https://wiki.dynamo.biozentrum.unibas.ch/w/doc/data/fhv/averagedLocalRefinement.em https://wiki.dynamo.biozentrum.unibas.ch/w/doc/data/fhv/membraneModel.omd
From your previos work
Assuming you have done the tutorial on the FHV data set, you can use the elements that you have already computed. Just extract them from the best project that you completed. Do not use a subboxing project: we want to get a template for the full crown. Examples below are given assuming that your best project was named localized, substitute if not.
Table
Recover the last computed refined table in the data base of your project
ddb localized:rt -r t
and write it to a file
dwrite(t,'alignmentLocalRefinement.tbl')
Template
Fetch the last computed average
ddb localizedFullAngle:rt -r a
and write it into disk
dwrite(t,'averagedLocalRefinement.tbl');
Membrane model
If you created manually a membrane model, it should be inside your catalogue
dwrite(m,'membraneModel.omd');
Depicting a slice of a tomogram
The slice object
s = dpktomo.volume.slices.Slice();
Here s is just an object that will read data from a tomogram file to be defined.
s.source = 'çrop.rec; s.center = 'center'; s.l = [1000,1000]; s.eulers = 'z'; s.fetchData();
The slice depictor object
f = figure; haxis = gca();hold on; sz = dpktomo.volume.slices.SliceGraphic(s); sz.axis.h = haxis; sz.create(); % then use h.update(); to shg;
We can change the angle of view with the rotation icon or programmatically: view([-38,60]);