Canvas

Canvas is software to acquire and visualize spatially organized video and image volumes acquired with a scanning microscope.

This is most useful when performing repeated time-lapse imaging as it allows disjoint images to be acquired and then easily and rapidly returned to on subsequent imaging sessions across timescale of minutes, days, and months.

Features

Example 1. Screen shot of a canvas during an in vivo experiment. Gray images are a mosaic of video images of surface vasculature visualized through a cranial window. Green images are maximal intensity z-projections of in vivo two photon volumes (6 in total). All images are linked, clicking on one will bring up the full image volume.

Example 2. The gray images are an automatically created mosaic of surface vasculature images from a video camera looking down into a cranial window. The green squares are the position of image stacks acquired with a scanning microscope. The Canvas software seamlessly integrates with Map Manager providing point and click navigation, browsing, and annotations of all image stacks.

Example 3. This is an example of a Canvas acquired during two-photon imaging and electrophysiology in a cerebellar slice. The first image is an overview of the canvas and the second is a zoomed in view of the recording and imaging areas.

Hardware and Software Requirements

Canvas Panel

X/Y/Z. Gives the current position of the motor.

Read Position. Reads the current motor position.

Zero X/Y and Zero Z. Zero the current position in the Canvas software. This does not move the onjective but is useful to be able to read absolute distances moved.

Arrow Buttons. Move the motor the specified distance. All units are in um. The four arrows in the left pane move within the image plane (left, right, front, back). The two arrows in the right plane move in depth/z (up and down).

X, Y, and Z Step (um). Set the distance (in um) taken when each of the arrow buttons are used to move the motor.

Set Path. Set the save path of the current canvas. This can automatically be set in a scripted user file.

Initialize Session. Initialize a new session with specified ‘Session ID’. Each new session will have its own canvas and save folder.

HDD. Show the hard-disk-drive folder for the current session.

Display Canvas. Display the current canvas. The current canvas is created when a session is initialized with ‘Initialize Session’.

Finalize and clear canvas. Used at the end of an imaging session to close the current canvas.

Canvas Motor Controls

Options Panel

Video Group.

Specifies the size of a video image in both pixels and um.

Refresh 2P Squares Group.

Display This Channel. The default color channel to display in the canvas.

Auto Save Canvas and Notebook. The canvas and notebook will be saved each time ‘Import From scope’ button is pressed.

Serial Port (mp285) group.

Options to control the serial port for communication with a Sutter MP285 motor controller.

TCP/IP (bruker) group

Options to control communication with the Bruker Prairie view software.

Objective Group.

Each row is a different objective with:

Acquiring video

If the video camera on your scope has an analog signal, there are very inexpensive video to usb converters. We regularly use EasyCap DC60 converters ($10-$20). Converters like this take an analog video signal, convert it to USB and then single frames or video is captured within Igor Pro using their free driver.

High end USB2/3 cameras will generally work but the size of the frame acquired by Igor may be smaller than the sensor. To circumvent this, we have a video viewer/capture script written in Matlab that saves full FOV images from a usb camera that is then automatically loaded into Igor.

Controlling the objective

The position of the objective is read and the objective can be moved from within the canvas.

Sutter mp285

Both ScanImage and Igor need to read the position and move the motorized objective. This is done by communicating with one physical serial-port, a COM port. Microsoft Windows only allows one program to communicate with each physical serial-port but we need both Matlab and Igor to communicate with the same COM port. Thus, we use third-party software to split the physical COM port into two virtual ports, one for Matlab and one for Igor.

There are a few different programs to create virtual COM ports from one physical COM port.

Prairie View

The Canvas software communicates with Prairie View over a TCP/IP (localhost) connection using Igor's SOCKIT library.

Installation

Canvas is designed to work on any scope that has a computer controlled objective or stage. It has been tested using x/y/z objective motors using a Sutter mp285 controller and a Bruker Scope using Prairie View software.

mp285 motor controller

Bruker motor controller

For Bruker Prairie View, we need the Igor SOCKIT extension. - Download SOCKIT - Uncompress and install SOCKIT XOP into Igor Pro 6 - Once this is done, motor position will be read and motor will be moved using a localhost TCP/IP protocol

Running canvas

The canvas is automatically saved as new video and scope images are created and imported.

Off line analysis

Default User File

#mp285 configuration file
#Robert Cudmore
#create Dec 31, 2013


#prairie specific
root:MapManager3:options:mp285:prairiePath="f:\cudmore\data"

#mp285 specific
root:MapManager3:options:mp285:gSavePath="f:cudmore:data:"
root:MapManager3:options:mp285:gUserSerialMotor=0
root:MapManager3:options:mp285:gFlipVideoHorizontal=0
root:MapManager3:options:mp285:prairieSleepTime_ms=200
#root:bObjective:gSelObjStr="p20x"


#session db path
root:MapManager3:options:stackdb:gSessionDir="f:cudmore:data:"

root:bStack:gYearAndMonthFolders=0

#canvas
#allow video selections
root:Canvas:gAllowVideoSel = 0

#in canvas each stack square gets a number (if == 0 then # is object index in the canvas)
root:Canvas:gScanImageIndexForName = 1

#display motor control bar by default
root:Canvas:gShowMotorByDefault = 1

#right click a canvas and select 'set window width'
root:Canvas:gWindowWidth = 474.75

#right click a stack and select 'set window size'
root:Scale:width = 767.5

#20170403 need to fix this
root:bObjective:gSelObjStr="p20x2"

#20171116, this specidies video sensor pixels (not 2p pixels)
root:MapManager3:options:mp285:pixelsPerLine=1920
root:MapManager3:options:mp285:linesPerFrame=1200

root:MapManager3:options:mp285:gCaptureVideoFromMatlab=1
root:MapManager3:options:mp285:gRaspberryIP="http://10.16.81.61:5010"

Known Bugs