Dear Ruopeng,
thank you for the feedback. Yes, the behavior is exacly like you described. I suspected that this has something to do with resampling but I was not sure.
The stripes were result of nearest-neighbor interpolation.
Antonin
Hi Antonin,
When you load two images like that, the second image will be resampled, using nearest neighbor method by default. And when you save, it will be resampled back to its original space. So there will be shifted voxels depending how oblique it is to the first image. So I think what you observe makes sense. That is also why you should always edit volumes in their local space. I didn't find any screenshots in your last email but my guess is the oblique strip is due to nearest neighbor resampling. You can choose "-trilinear" or "-cubic" in the command line when you load the images. Best,
Ruopeng
On 04/13/2017 12:28 PM, Antonin Skoch wrote:
Dear experts,
I encountered following issue with freeview:
When two images with mutually different geometry are simultaneously loaded and one of them is saved (via save as), its pixel values get somewhat corrupted. There are strips in image with modified pixel values. It seems to affect only the latter image in the pair. Example (001.mgz and brainmask.mgz have different geometry):
freeview brainmask.mgz orig/001.mgz
Then I saved 001.mgz as 001_2.mgz (using "save as") and loaded 001_2.mgz to freeview. The attached screenshots show original 001.mgz and 001_2.mgz with corrupted pixels. Note new oblique strips. This is not only display issue. The mri_diff 001.mgz 001_2.mgz outputs:
diffcount 287447
Volumes differ in pixel data
maxdiff 966.00000000 at 171 255 30 0
I am using recent development version of freesurfer from 04/2017.
Regards,
Antonin Skoch