Back to PLS Help

PLS error - voxel size is not the same after reslice_nii
KamalB
Posted on 04/08/15 13:01:28
Number of posts: 12
KamalB posts:

Hi,

in advance, I apologize if any of these are basic questions, but I've searched both through this forum as through other places, and still have a few concerns I was hoping to share.

I have a dataset consisting of two groups, each with 15 subjects. I used FSL's FEAT to preprocess my fashion in a standard manner. After creating the session profiles for each of my subjects, for 7 of the 30 subjects, an error occurred which suggested the use of reslice_nii for these volumes, which I did so. I then changed the session profiles to change the input datasets to be these resliced volumes where applicable. However, after attempting to run PLS again, an error came up about voxel dimensions not being similar. 

For those FSL preprocessed files that did not require reslicing, their dimensions were those of 3 x 3 x 4 mm [56 60 35 voxels], where as those that were resliced had the dimensions of 3 x 3 x 3 mm [with 5 of the volumes showing similar voxel values, and 2 other ones showing unique values different from the others].

I first wanted to ask that should the fact that I ran all subjects through the same preprocessing measures, but a few required reslicing be of a concern? 

Also, what would the next step be to proceed with PLS? For the resliced volumes with different voxel sizes, would I just need to run pad_nii to match their dimensions to those that did not require reslicing? Or would another resampling method be ok (such as AFNI's 3dresample)? Sorry once again for these questions. Thanks.

Kam

Replies:

Untitled Post

I'm Online
nlobaugh
Posted on 04/08/15 13:16:20
Number of posts: 229
nlobaugh replies:

It sounds like you applied different pipelines/registration/reslice schemes for the two sets of subjects:

For those FSL preprocessed files that did not require reslicing, their dimensions were those of 3 x 3 x 4 mm [56 60 35 voxels], where as those that were resliced had the dimensions of 3 x 3 x 3 mm [with 5 of the volumes showing similar voxel values, and 2 other ones showing unique values different from the others].

If you had the same pipeline, I would have expected the final voxel sizes to be identical, since the target template image should be the same in all cases..

From the "what's new":, Aug 26, 2008:

    4.    "reslice_nii.m" is provided to preprocess the NIfTI
        format image file that containing non-orthogonal or
        oblique affine transform.

Could you have applied a nonlinear transform to some subjects?

 

Nancy

 

 



Untitled Post
KamalB
Posted on 04/08/15 14:47:56
Number of posts: 12
KamalB replies:

quote:

It sounds like you applied different pipelines/registration/reslice schemes for the two sets of subjects:

For those FSL preprocessed files that did not require reslicing, their dimensions were those of 3 x 3 x 4 mm [56 60 35 voxels], where as those that were resliced had the dimensions of 3 x 3 x 3 mm [with 5 of the volumes showing similar voxel values, and 2 other ones showing unique values different from the others].

If you had the same pipeline, I would have expected the final voxel sizes to be identical, since the target template image should be the same in all cases..

From the "what's new":, Aug 26, 2008:

    4.    "reslice_nii.m" is provided to preprocess the NIfTI
        format image file that containing non-orthogonal or
        oblique affine transform.

Could you have applied a nonlinear transform to some subjects?

 

Nancy

 

 

Hi Nancy,

thanks for the reply. Sorry, my wording was incorrect. All 30 subjects had similar voxel dimensions (3 x 3 x 4 mm with voxel sizes of 56 70 35) after being preprocessed through FSL's FEAT. However, after trying to create the session profiles, 7 of those 30 required the use of reslice_nii. It was after applying reslice_nii that the voxel dimensions of these 7 volumes were altered from what they were originially. 

Is it still a conern that even with all 30 volumes having the same dimensions, 7 of these would requiring the use of reslice_nii (does this still imply that the pipeline in some way differed for these 7?). Also, due to reslice_nii altering their dimensions, what would be the best way to get their dimensions to those of the other 23 FEAT preprocessed volumes that did not require reslicing. Thanks again.

Kam



Untitled Post

I'm Online
nlobaugh
Posted on 04/08/15 17:41:06
Number of posts: 229
nlobaugh replies:

Hi.. I still think something happened to those subjects in the preprocessing step.. We use the load_nii.m script to load the images in. It can handle a small subset of possible transformations, and if it detects anything out of the ordinary, it will stop the load and prompt for using reslice_nii.

%  A subset of NIFTI transform is included. For non-orthogonal rotation,
%  shearing etc., please use 'reslice_nii.m' to reslice the NIFTI file.
%  It will not cause negative effect, as long as you remember not to do
%  slice time correction after reslicing the NIFTI file. Output variable
%  nii will be in RAS orientation, i.e. X axis from Left to Right,
%  Y axis from Posterior to Anterior, and Z axis from Inferior to
%  Superior.

You can also check to see if you gave the correct voxel sizes to reslice_nii when you ran it:

 Usage: reslice_nii(old_fn, new_fn, [voxel_size], [verbose], [bg], ...
             [method], [img_idx], [preferredForm]);

%  voxel_size (optional)  - size of a voxel in millimeter along x y z
%        direction for resliced NIfTI file. 'voxel_size' will use
%        the rounded minimum voxel_size in original NIfTI header,
%        if it is default or empty.

 

You will get isotropic voxels if you did not specify the output voxel dimensions....

however, I would first check the FEAT pipeline, as I suspect you do not expect to have shear or other transforms in a small portion of your data ...

cheers

Nancy

 



Untitled Post
KamalB
Posted on 04/09/15 13:55:13
Number of posts: 12
KamalB replies:

Hi Nancy, 

thank you very much for your advice. Apologizes for further questioning, but thanks to your previous post, I corrected my mistake and was able to reslice with the matching dimensions to the other files that did not require reslicing. I was then able to create the session profiles. However, attempting to run PLS led to the error of:

 

Index exceeds matrix dimensions.

 
Error in fmri_pls_analysis>concat_st_datamat (line 1186)
      m(st_info{i}.coords) = m(st_info{i}.coords) + 1;
 
Error in fmri_pls_analysis (line 152)
   [st_datamat, st_coords, st_dims, num_conditions, ...
 
Error in bfm_analysis_ui>ExecutePLS (line 2256)
        fmri_pls_analysis(PLSoptions.profiles, [], ...
 
Error in bfm_analysis_ui (line 118)
           ExecutePLS;
 
Error using waitfor
Error while evaluating uicontrol Callback
 
 
I was able to run PLS fine when using only those files that did not require reslicing. I will need to check for why only a subset was transformed during preprocessing through FSL. However, if I wanted to contine for now with the files I have, for the error above, is this not common after using reslice_nii (as hints at something substantially "off" with the data) or is there something through NIFTI tools that can address this to allow me to run PLS. Thank you again.


Untitled Post

I'm Online
nlobaugh
Posted on 04/09/15 14:09:04
Number of posts: 229
nlobaugh replies:

I was able to run PLS fine when using only those files that did not require reslicing. I will need to check for why only a subset was transformed during preprocessing through FSL.

Those 7 files are likely corrupted - do not attempt to use them - find the problem and fix it in FSL first -

Those new errors suggest the reslice_nii vs non-reslice_nii  images are of different sizes, which cannot be combined in PLS

 

nancy




Login to reply to this topic.

  • Keep in touch

Enter your email above to receive electronic messages from Baycrest, including invitations to programs and events, newsletters, updates and other communications.
You can unsubscribe at any time.
Please refer to our Privacy Policy or contact us for more details.

  • Follow us on social
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube

Contact Us:

3560 Bathurst Street
Toronto, Ontario
Canada M6A 2E1
Phone: (416) 785-2500

Baycrest is an academic health sciences centre fully affiliated with the University of Toronto