Open surchs opened 3 years ago
A negative spacing would mean that the image is flipped for that axis, right? I don't think that is happening with the given example. I I don't think we can tell the image trace to flip the image, so we'd have to flip it server-side. This might be easier to look at once we had a go at #43, which is a bit similar in where changes would be needed.
Yeah, I think you are right. I will make an example later with an actual brain image where this is the case!
The
spacing
andorigin
arguments are used to allow the slices to be drawn in "scene space" rather than voxel space. This is a really useful feature. For example when displaying a brain volume, there is typically an affine matrix that translates voxel coordinates into some standard reference space (see e.g. here: https://nipy.org/nibabel/coordinate_systems.html).One use case here would be to have a negative stepsize / spacing. I.e. walking along one volume axis would decrease the corresponding position in the standard / scene space. This is the case for example for some volume organizations of data in the MNI stereotaxic space, where the origin of the coordinate system (0, 0, 0) is by convention in the center of the brain (anterior commissure). Setting negative values for the
origin
works well, but at the moment, a negativespacing
leads to odd behaviour of the slicers (outline traces are flipped outside,cross-linking positions doesn't seem to work correctly). edit: cross-linking positions is working with the sliders but does not work correctly when clicking.This is probably not a high priority feature but could be nice to have.