Back to the main page.

Bug 2192 - should ft_sourceplot in ortho mode produce square pixels (i.e. isotropic image)?

Reported 2013-06-10 10:05:00 +0200
Modified 2014-01-29 13:28:42 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Eelke Spaak
Depends on:
See also:

Eelke Spaak - 2013-06-10 10:05:42 +0200

Something to consider. I think it would be nicer than squished pixels, given that typically the MRI voxels are isotropic. It is very easily achieved by adding after line 750: set(h1,'DataAspectRatio',[1 1 1]); set(h2,'DataAspectRatio',[1 1 1]); set(h3,'DataAspectRatio',[1 1 1]);

Eelke Spaak - 2013-06-26 13:29:21 +0200

note at meeting: sometimes voxels are not isotropic. Use norm of transform matrix rows/columns (ignoring 4th which is offset).

Eelke Spaak - 2013-10-24 14:52:24 +0200

fixed in 8634.

Robert Oostenveld - 2013-11-02 16:01:44 +0100

first of all I don't share your opinion that "typically voxels are isotropic". They are isotropic after ft_reslice, but usually the within-slice and between-slice resolution are just slightly different. I don't consider isotropic to be typical. But that is not the issue. Your change introduces a regression error in test_bug1527. The problem is that you assume data.transform to be available at a place in the code where it is not guaranteed to exist. Your change is at line 716. I think the data does not have a transform, because it is technically not a 3-D "volume" array but a "source" structure with more complex dimord. However, it is possible from the n-D dimord to select something that can be reshaped into a 3-D array that can be plotted with ortho. Could you make a test script with the following cases 1) isotropic volume, nicely aligned with axes 2) non-isotropic volume, nicely aligned with axes 3) isotropic volume, not aligned with axes 4) non-isotropic volume, not aligned with axes 5) isotropic source structure (e.g. with one frequency), not aligned with axes 6) non-isotropic source structure (e.g. with one frequency), not aligned with axes and see whether they all run through?

Eelke Spaak - 2014-01-29 13:17:20 +0100

Marking this as resolved since the mentioned regression is fixed. Creating the mentioned test script does not seem directly related to this particular bug.

Eelke Spaak - 2014-01-29 13:28:42 +0100

changing lots of bugs from resolved to closed.