Print

Print


Hi,

It sounds like you need to shift the image to the appropriate origin.
Depending on how your images were converted to nifti, and whether an appropriate origin was set in them originally, the following may work:
  flirt -in imBigFOV -ref functional_data -usesqform -applyxfm
where imBigFOV is the image that you have already generated with the size: 85x85x78 (3x3x3.3mm)
and functional_data is any of your functional images with size: 70x70x34 (3x3x3.3mm)

If this does not do what you want then you will have to shift the image manually.  This can be done by changing the numbers in the fourth column of the flirt matrix (as these are in units of mm and you can add extra translations in x, y and z).  

All the best,
Mark



On 30 Sep 2014, at 14:31, Matthew Webster <[log in to unmask]> wrote:

Hello,
           One option is to open the original and reduced images in two separate instances of fslview and check that the intensities match at the same spatial co-ordinates..

Kind Regards
Matthew

Dear Matthew,

I did try to use that option (fslroi), but I think I did not choose the min values correctly (xmin, ymin,zmin).
How do I know the right values that would not change the final position of the image?

Thank you!
Francesca

2014-09-30 14:56 GMT+02:00 Matthew Webster <[log in to unmask]>:
Hello,
          you can use the fslroi tool to reduce the FOV of an image, without changing it's spatial orientation.

Kind Regards
Matthew


Dear Mark,

Thank you very much for your help. I am very close to solving the problem.
Indeed, the issue was incompatibility of the FOV. My anatomy was scanned in 176x256x256 matrix (1x1x1mm), and my functional data was in 70x70x34 (3x3x3.3mm).
When I defined my desired functional FOV as 85x85x78 (3x3x3.3mm) the brain appeared to be in the right orientation and size when looking at it in fslview. 
My problem now is that I need to turn it back to its original dimensions without changing the orientation. Is there a way I could trim the matrix back to 70x70x34 without changing the location of the brain image? I just want to keep the parameters similar to the original scan, just make the image registered.

Thank you again for the response,
Francesca

2014-09-19 22:41 GMT+02:00 Mark Jenkinson <[log in to unmask]>:
Hi,

I'm not exactly sure what you are describing here.
Do you find that part of the brain is in the image but is it cut-off at the edge of the image?
If so then the problem is probably that the FOV of your highres image is larger than the one you've made with fslcreatehd.  You should ideally use the same FOV (i.e. if the highres had 210mm in X, then 70 x 3 mm voxels is fine, but if it is 240mm then you need 80 voxels if each voxel is 3mm; in Z you currently only have 34 x 3.3 = 112.2 mm, so see if you need more voxels here).

If this does not help then please email us and provide more information about what you are seeing.

All the best,
Mark


On 18 Sep 2014, at 12:39, Francesca Strappini <[log in to unmask]> wrote:

Hi Mark,

Thanks for your reply, I have been really puzzled about this...

I think it is something with the display range! I see some leftover brain in the top. how do I change it?  Does this mean that if I load the files into matlab their data matrix will be aligned with the anatomy?
I need to register several functional runs to the native anatomy and then load them into matlab and run correlations between them (they need to be aligned for that purpose).  

About the FOV, for some of my subjects I do see differences in "zoom" between the anatomy and the functional scans (the anatomy seems smaller).

Best,
Francesca

2014-09-17 20:02 GMT+02:00 Mark Jenkinson <[log in to unmask]>:
Hi,

The command looks OK (except for the last name being .nii.gz_tmp rather than _tmp.nii.gz, but I assume this is a typo in this email).

Are you sure that the image contains zeros and not just that the display range is incorrect?
Alternatively, the FOV of your new image might be too small in z.

All the best,
Mark

On 15 Sep 2014, at 17:38, Francesca Strappini <[log in to unmask]> wrote:

Dear Mark,

Thank you for your suggestion. I have tried running it and when I open the output file in fslview, I see nothing (it uploads the file but there is no brain showing). The command I ran is as follows:

/usr/local/fsl/bin/fslcreatehd 70 70 34 1 3 3 3.3 1 0 0 0 16  <name of output nii>_tmp.nii.gz ; /usr/local/fsl/bin/flirt -in <name of input nii> -applyxfm -init <Feat directory>/reg/example_func2highres.mat -out  <name of output nii> -paddingsize 0.0 -interp trilinear -ref  <name of output nii>.nii.gz_tmp


Can you please tell me what is wrong with this command? or is there another way to view the output?

Thank you very much for all your help.