Slice keeper causes downsampling

Hi all,

if I reduce the amount of slices in an image stack by selecting the slices I want to maintain with the slice keeper, the pixel size of my resulting stack will be altered (from 0.59 to 1.0mum). However, I don’t want this downsampling. If I choose the slice remover instead, to remove the unwanted slices, the pixel size won’t be infleuenced. Any suggestions why this happens? Little Bug? Or did I got something wrong here?

Many thanks
Chris

I looked into the sources (I found online) of the slice remover and a new stack is created without any calibration copy of the old stack, see:

https://imagej.nih.gov/ij/plugins/mbf/

1 Like

The image isn’t actually downsampled, as you can verify by the size of each slice (in pixels) remaining constant. It’s just the image calibration that gets lost because a new stack is created and the metadata aren’t transferred.

I submitted a pull request that fixes this:

Until this gets merged and released, you can work around the issue by manually setting the pixel width, height and depth using Image > Properties….

5 Likes

This is not the version currently shipping with Fiji. The code is here on github:

You can see which file in your installation contains a given menu command using the command finder.

See also:

2 Likes

I didn’t use FIJI for this. I am aware of the command finder but the plugin is not listed in my ImageJ variant.

Oh, I see. In this case, I recommend using http://search.imagej.net/ to search for the command. When searching for “Slice keeper”, it lists http://imagej.net/Stack_Manipulation as first result.

5 Likes

Thanks for the tip. I was not aware of the ImageJ search.

1 Like

I merged the PR. Thank you very much, @imagejan.

Releases coming today or tomorrow, I hope.

Thank you, guys. You are right, calibration data is simply not passed over. Sorry, that I didn’t double check, but anyway thanks to your replies ImageJ is just getting more robust.

Thanks to @ctrueden for fixing this.