QuB World 3D Tutorial

- QuB tutorials -
World3D
April 2015
© The MLab
1
World3D: Content
Content:
•
•
•
•
•
•
•
•
•
•
•
Start QuB
Load Project
Run Scriptlets to build World3D objects
Navigate the World3D
Load a World3D
Setting up the camera
LiveView
Reposition LiveView and Pipettes
Control the positioning motors
Acquire images
Memory issues
2
World3D: Start QuB
When you first run QuB, it may look like this:
Main Menu
Current
Interface
Data Viewport
Histogram Viewport
Model Viewport
Report Viewport
Available
Interfaces
3
World3D: Load a Project
Load a Project:
- Download the World3D Project example from:
http://milesculabs.biology.missouri.edu/QuB_World3D.html
unzip the project
- This Project loads a customized interface and several scriptlet libraries,
prepared for this tutorial
- Open project from the Main Menu:
Main Menu > Project > Open Project …
Project interfaces are automatically saved. If you would like to revert to the original
interfaces, choose Revert to saved Workspaces:
Main Menu > Project > Revert to saved Workspace
4
World3D: Load a Project
After loading the Project, QuB will look like this:
Scriptlets:
3D Scene Viewer
World3D
Object Tree
All objects
are listed
here
World3D
Interface
is selected
Predefined
World3D Objects
Scriplets Viewport
World3D Viewport
5
World3D: Create 3D objects using KPL
You can create additional objects in the World3D, using the KPL scripting
language:
- Run the “Make 3D World” scriptlet in the Scriptlet Viewport (Mouse-LClick)
- The scriptlet will create a rig equipped for electrophysiology and imaging
Run this Scriptlet
(Mouse-LClick)
6
World3D: Create 3D objects using KPL
After running the scriptlet, you will see new World3D objects :
New 3D objects
created with the
KPL scripting
language
7
World3D: Navigate the World3D scene viewer
You can navigate in the World3D scene viewer with the mouse and
keyboard:
Mouse:
Left button:
Right button:
Scroll wheel:
Keyboard:
Up/Down:
Left/Right:
Shift + U/D:
Ctrl + U/D/L/R:
Rotate World around the center of the selected
object. To select an object, Double-Click on it
Translate the position of the observer relative to
the world
Move the observer closer or farther from the
world (+Ctrl for finer movement)
Same as Mouse scroll wheel
Translate observer left/right
Translate observer up/down
Rotate world around observer
*If you want to reset the position and rotation of the World, right click and
choose “Viewer camera” and then “Reset.”
8
World3D: Navigate the World3D scene viewer
After playing with the mouse, your World3D might look like this:
9
World3D: Scriptlets
A scriptlet contains KPL code that can be run by pressing a button
- Scriptlets are organized in Scriptlet Libraries
Scriptlet
Libraries
10
World3D: Scriptlets
For example, you can turn on the laser by running the “2P Laser Beam
On/Off” scriplet, located in the “Microscopy” scriplet library.
- After doing this, you should see the laser beam
11
World3D: Scriptlets
You can edit or inspect the code in a scriptlet:
- Open the scriptlet editor by Right Clicking on a Scriptlet
- Select “Edit Scriptlet”
12
World3D: Save to / Load from a file
The content and settings of the World3D can be saved/loaded as a file.
- Currently, only the objects under the Virtual category (Images, Contours,
Data, etc.), as shown in the Object Tree, can be saved in a World3D file
- World operations are accessible through the Main menu or through buttons:
World3D buttons
(New/Open/Save)
13
World3D: Load a World3D example
Load a World3D:
- Download the BrainMapExample.zip from:
http://milesculabs.biology.missouri.edu/QuB_World3D.html
unzip the file
- This World3D is a collection of images and data
- Open World3D from the Main Menu (or using the buttons):
Main Menu > World3D > Open World3D …
14
World3D: Load a World3D example
After loading the World3D example, you will see this:
15
World3D: Load a World3D example
Let’s hide the Physical Objects so we can better see the images:
- click the buttons that show/hide the Physical and the LiveView:
Show/hide the
Physical world
Show/hide the
LiveView
16
World3D: Load a World3D example
After hiding Physical and LiveView, you will see this:
World3D content,
in this case just
images and data
17
World3D: Load a World3D example
Navigate with the mouse to better see one of the 2P stacks:
18
World3D: Load a World3D example
To select objects in the World3D:
- Double-Click on an object in the 3D scene viewer selects the object
- A selected object becomes the center of rotation for navigation
- The position and rotation of the selected object is shown here
(Double-Click on selected object name to switch between position
and rotation):
Selected object
Position
Rotation
19
World3D: Load a World3D example
To select objects in the World3D:
- Alternatively, you could also select an object from the Object Tree
- The object does NOT become the center of rotation
Selected
object
20
World3D: Set up the camera
Set up the camera:
- Select the Camera interface
Camera
display
Camera
settings
(click on
caption bars
to expand /
collapse
panels)
Select
Camera
interface
21
World3D: Set up the camera
Set up the camera:
- Rearrange the interface
- Close the Report Viewport and resize the Camera Viewport
Click and
drag to
resize
viewport
22
World3D: Set up the camera
Set up the camera:
- Open the simulated camera
- Right-click on the camera display and select “Open sim camera”
Click to start
continuous camera
acquisition
Check this option to have the image taken by the
camera displayed in the World3D, in the LiveView
Lens area
(Check Lens in the Viewer panel and
change the zoom factor to see the lens
effect)
Sensor cropping area
(check Cropping in the
Acquisition panel to
activate it. Must stop and
restart image acquisition)
23
World3D: LiveView
Set up the LiveView:
- Select the World3D interface
- Show Physical and LiveView
Show/hide the
Physical world
Show/hide the
LiveView
24
World3D: LiveView
Set up LiveView:
- You should now see something like this:
(if you don’t see it, click again on Show/Hide Physical and LiveView buttons)
LiveView
LiveView content
is refreshed as
long as Camera is
running
25
World3D: LiveView
Set up LiveView:
- Now load again the BrainMap example (if you had it closed)
- Turn off (hide) the Physical objects
- Now you see the LiveView in the context of the brain map:
The physical size
of the LiveView
image
26
World3D: LiveView
Reposition the LiveView in the World3D space:
- Select the LiveView, using one of these procedures:
- select LiveView in the Object Tree, or
- double-click on LiveView in the Scene Viewer, or
- click the Viewport button (LiveView is contained in Viewport).
Selecting the
Viewport selects
LiveView, and
vice versa
27
World3D: LiveView
Reposition the LiveView in the World3D space:
- Once LiveView / Viewport is selected, it can be repositioned in the WorldD
space using one of these procedures:
- click the positioning buttons, or
- enter new position coordinates and set them with the Set button
Set position coordinates for
Viewport / LiveView (or Pipettes)
Viewport / LiveView
position coordinates
(or Pipettes)
Positioning buttons to
interactively move the
Viewport / LiveView
(or the Pipettes)
28
World3D: LiveView
Reposition the LiveView in the World3D space:
- Try to move the LiveView Up and to the Right, using the interactive buttons
- Notice that x and y movement keeps the LiveView immobile but moves the
Virtual objects (Images, Data, etc)
29
World3D: Pipettes
Reposition the Pipettes the World3D space:
- The Pipettes can be repositioned using the same procedures as for LiveView
- Show the Physical world, zoom out a bit using the mouse scroll bar, then
click on the right Pipette, and you will see something like this:
Pipette1 selected and ready to be repositioned
Pipette2
Pipette1
30
World3D: Motors
QuB can control the positioning motors associated with the objective,
the pipettes, etc.
- Currently, QuB works with motorized positioners via ScanImage
(https://openwiki.janelia.org/wiki/display/ephus/ScanImage). ScanImage is
also used for image acquisition with a two-photon microscope. The
ScanImage version we tested was slightly modified and can control only the
translation stage and the objective.
- We are working on implementing direct motor control within QuB for
Scientifica positioners. Extension to other brands will be possible, if the
manufacturers provide a communication interface for software control.
- Please check for updates on motor control.
- For now, test QuB without activating the motors. In this case, the liveview
will not follow the objective and vice versa.
31
World3D: Image acquisition
Set up Image acquisition:
- First, turn Physical off
- In the Acquisition panel, select Hi magnification and enter new values for
image size (w = 332.8, h = 332.8)
- Make LiveView the center of rotation
by double-clicking on it
- Set LiveView coordinates as (0, 0, 300) and
press Set
- Navigate in the World3D to get closer to
the LiveView
32
World3D: Image acquisition
Set up Image acquisition:
- You will see something like this:
33
World3D: Image acquisition
You are now ready to acquire images with the simulated camera, using
multiple paradigms:
- Acquire a single image
- Acquire a stack of images, scanning any combination of the x, y, and z axes
- Acquire a stack of images as defined by a volumetric contour
- Acquire a time series of images, at a single position
34
World3D: Image acquisition
Let’s set up acquisition of a z-stack:
- Set Acquisition parameters exactly as shown in the screenshot
- 10 images will be acquired across the z-axis, with 10 micron step
The number of images to be acquired on
each axis
Increment for repositioning the LiveView
on each axis during image acquisition.
Acquire a single image
Acquire a stack of images, as defined by
Image count and Pos increment
Acquire a time series
Acquire a stack of images, as defined by
a volumetric contour
35
World3D: Image acquisition
Press the Stack button and you will see something like this:
Newly acquired stack
36
World3D: Image processing
Let’s change how the stack is displayed:
- First, make sure the stack is selected: double-click on it
- In the Images and LUT panels, set parameters as shown (Brightness and
Contrast are 0 and 1, respectively)
37
World3D: Image processing
Let’s change the color to Green, change the LUT values, and make the
stack transparent:
38
World3D: Memory issues
After this image stack has been created, you might notice that your
World3D scene viewer is no longer very responsive to navigation
- The explanation is that you have now a lot of pixels to display, and the video
card slows down
- If you acquire any more images, you will probably run out of CPU or video
memory, and QuB might even crash
- To prevent this, you can unload some of the existing images, by right-click
and selecting “Close”
- Another possibility is to downsample an image, by right-clicking and
selecting “Downsample Nx”, where N is a factor between 2 and 32
When you close QuB, make sure the Camera is stopped
39