nat
nat copied to clipboard
Improve view specification for plot.neuron
Currently, only the views "XY"
, "YZ"
, "XZ"
and "ZY"
can be specified, and it is not clear what orientation they correspond to. Possible alternatives include:
- Specifying which axis the view should look along and which axis should point to the right of the plot (allowing
Along="Z", ToTheRight="-X"
, etc.). - Named views, perhaps constructed in such a way as to give the direction of the camera and its on-axis rotation with respect to anatomical directions, such as anterior-dorsal for the 'canonical' frontal view, left-ventral for a view from the brain's left with the ventral-most part of the brain at the top of the plot, posterior-right for a view from the 'back' of the brain, with the right-most parts at the top of the plot, etc.
- Specifying the full vectors that correspond to the horizontal and vertical axes, such that the 'canonical' frontal view would be specified as
Hori=c(1,0,0), Vert=c(0,-1,0)
.
1 and 3 require the user to understand that the coordinates correspond to a right-handed basis in which z recedes from the viewer, while 2 does not and is anatomically unambiguous.
While it would be possible to implement a system in which an arbitrary view could be specified, users should probably be pointed to plot3d.neuron
instead...
For "XY", "YZ", "XZ"
compare with e.g. Amira Orthoslice. ZY
has the Z and Y axes switched. YX
and ZX
are also possible but I never wanted them.
plot(Cell07PNs[[1]],PlotAxes = 'XY')
plot(Cell07PNs[[1]],PlotAxes = 'XZ')
plot(Cell07PNs[[1]],PlotAxes = 'YZ')
plot(Cell07PNs[[1]],PlotAxes = 'ZY')
something more explicit might be good, but I think 1 and 3 are a little complicated. 2 does sound interesting, but I wonder if we would need to have anatomical coords set in the input neurons or images.
Incidentally, I don't know if nat
needs to know about anatomical coordinate systems or not (see e.g. http://www.slicer.org/slicerWiki/index.php/Coordinate_systems). We do want to keep it general i.e. not tie it to any particular organism's anatomical conventions.
Just a thought w.r.t. anatomical coordinate systems. It would be nice if we could tag data as belonging to a particular template (e.g. from nat.flybrains).