I think It is impossible for all cases... but works in some... I have many
image stacks that have sagital coronal and axial acquisitions using the
same sequence and this rule of thumb works..

However even with say an isotropic t1 mprage there are still generally less
slices in z then there are x y voxels... mine are usually 256x256x176

Probably better to remove from a generic module though as there are likely
many cases where that assumption fails
On Mar 3, 2013 8:58 PM, "Satrajit Ghosh" <notifications@github.com> wrote:

> In nipype/interfaces/nibabel/nii_image_info.py:
>
> > +	img_header = img.get_header()['pixdim'][1:4]
> > +	dim_x = img_shape[0]
> > +	dim_y = img_shape[1]
> > +	dim_z = img_shape[2]
> > +	vox_size_x = img_header[0]
> > +        vox_size_y = img_header[1]
> > +        vox_size_z = img_header[2]
> > +	""" I also compute the plane with the highest resolution which in theory should represent the image acquisition plane
> > +	but of course you can always resample the image and break these assumptions
> > +	In theory this will fail to yield a value in the event someone cut/resized/did something atypical  to the acquistion window
> > +	Also, there is no absolute requirement that the inplane is a square matrix, so it may be potentially?
> > +	safer to simply determine whch axis is the smallest and assume that is the in plane resolution
> > +	May consider adding an UNKNOWN and/or more checks for this
> > +	"""
> > +	image_orientation = 'UNK'
> > +	if(    dim_x  == dim_y ): image_orientation = 'axial'
>
> i think this is perhaps impossible to determine without looking at the
> qform/sform code and relating to the coded space. also if you have
> isotropic acquisition, this would fail as well for things like structural
> images.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/nipy/nipype/pull/528/files#r3219295>
> .
>