StackViewer.hx is an Amira script that allows you to quickly review many 3D stacks e.g. in Amiramesh or NRRD format. It can also show a template brain for comparison. It is a little simpler than the ResultViewer.hx script which is targeted specifically at reviewing and making affine registrations.

The easiest way to set up a StackViewer.hx session is using https://github.com/jefferis/nat.amira. Here is an example for comparing the JFRC2 bridged versions of the VT image data (available on flystore1) against the

# install if required
if (!require("devtools")) install.packages("devtools")
devtools::install_github("jefferis/nat.amira")
 
# ... then use
library(nat.amira)
open_stack_viewer("/Volumes/GREGSSD2/flystore1/jefferis/projects/VT/reg/reformatted.bridge", template = "JFRC2")
library(elmr)
mercury=fetchn_fafb('name:Mercury', reference = JFRC2, mirror = F)
# this is mercury right
open_amira(mercury[[2]])

Instead of opening one neuron, you can also open several.

nl=fetchn_fafb('annotation:^my_nice_neurons$', reference = JFRC2, mirror = F)
nl[,'shortname']=c("some","easy","names")
open_amira(nl,subdir=shortname)

Neurons that come from FAFB can have a lot of points, and be slow to draw in Amira. You can get round this by resampling to lower resolution.

e.g.

# 1 micron stepsize
nl.resampled=nlapply(nl, resample, 1)
open_amira(nl.resampled, subdir=shortname)

Amira should open a 'masterObject.scro' blue script object. You need to hit 'LoadAll' to load in the neurons. You can then check and uncheck the check boxes to switch between neurons. You can also change the colours of the active neurons using the sliders. You can also set colours programmatically via the TCL console (or using a script).

For example if you have some PNs loaded named by glomerulus you could set colours like this:

# Amira Script
# redish
DA1 setrgb 1 .14 0 
# cream
DA3 setrgb .8 1 .4
# turquoise
DC1 setrgb .6 1 .8
# dgreen
DC2 setrgb 0 .4 0

Log In