Print

Print


Hi Paul,

Thanks for your reply. Actually, I used fslcpgeom and the sets of commands below:
fslorient -getsform eddy_corrected.nii.gz > sform
fslorient -getqform eddy_corrected.nii.gz > qform
fslorient -setsform `cat sform` hifi_nodif_brain_mask.nii.gz
fslorient -setqform `cat qform` hifi_nodif_brain_mask.nii.gz

but I'm still getting the same exact error!

N4BiasFieldCorrection -d 3 -x ./hifi_nodifu_brain_mask.nii.gz -i ./eddy_corrected.nii.gz -o ./test1.nii.gz -v

Running N4 for 3-dimensional images.

Exception caught:
itk::ExceptionObject (0x2852da0)
Location: "unknown"
File: /data1/lib/build/ANTS/CentOS7/antsbin/ITKv5-install/include/ITK-5.0/itkImageToImageFilter.hxx
Line: 240
Description: itk::ERROR: N4BiasFieldCorrectionImageFilter(0x28444f0): Inputs do not occupy the same physical space!
InputImage Origin: [-9.5968330e+01, 7.5178741e+01, -4.6519180e+01], InputImage_1 Origin: [-9.5723050e+01, 7.0265378e+01, -4.5940466e+01]
        Tolerance: 8.0000000e-06
InputImage Direction: 1.0000000e+00 0.0000000e+00 0.0000000e+00
0.0000000e+00 1.0000000e+00 0.0000000e+00
0.0000000e+00 0.0000000e+00 1.0000000e+00
, InputImage_1 Direction: 9.9634532e-01 8.5416688e-02 -1.9561758e-06
8.2807286e-02 -9.6590231e-01 2.4530730e-01
-2.0951447e-02 2.4441094e-01 9.6944537e-01

        Tolerance: 1.0000000e-06

So, I'm confused what could be the cause of this error.

Thanks,
Mahmoud


On Mon, Sep 3, 2018 at 11:21 AM paul mccarthy <[log in to unmask]> wrote:
Hi Mahmoud,

You can use the fslcpgeom command to copy the geometry information from one image to another.

Cheers,

Paul

On 3 September 2018 at 16:13, / Mahmoud/ <[log in to unmask]> wrote:
Hello all,

I 'm using both FSL and ANTs for processing our DWI data.
I ran into a problem arising from the fact that FSL and ANTs handle the image headers differently. At least that's my guess. I tried to figure it out at the ANTs side but couldn't find a solution.

The problem is that N4Biascorrection (from ANTs) fails when I try to add the mask option to it and what it says is that basically, something in the header of the input file is not matching the mask file: " Description: itk::ERROR: N4BiasFieldCorrectionImageFilter(0x2fdc4f0): Inputs do not occupy the same physical space!"

I compared the headers of the input and mask images and found that other than the number of volumes,  the sto_xyz_matrix and sto_ijk_matrix do not match.

So, how can I match these two headers in the fields that I want?
I tried to do it manually using the fsledithd but that did not work.

Thanks for your help!
Mahmoud

########################################################################

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1



To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1



To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1