Problem with scaling stacks

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with scaling stacks

Paletzki, Ron (NIH/NIMH) [C]
I have been trying to scale a stack of images and have been getting some weird results and I wonder if this is a known bug or some other problem.  I have a stack of size 1086x 782y 1242z pixels  32-bit gray (same results for 16bit and 8bit images).  When I use the scale function from the menu “Image:Scale…"  in the dialog box I set the x y and z scaling to the same value and then the dialog box shows the correct expected changes in X Y and Z scale.  But when it actually performs the scale the Z axis is incorrect for scale values from 0.4 to 0.1, but works correctly for values from  0.9 to 0.5.  The X and Y are always correct.  

For example:
scale 0.1 I get 125 slices when I should get 124,
scale 0.2 I get 249 slices when I should get 248
scale 0.3 I get 414 slices when I should get 372
scale 0.4 I get 621 slices when I should get 496

I’m running Fiji / ImageJ version 2.0.0-rc-43/1.51g build 49b667f9aa on a Mac OS 10.8.5
The Scale dialog box is set to Interpolation:None, Average Downsizing, Process entire stack and Create new window.

Thanks for any help.
Ron

 
Ronald Paletzki, PhD
Biologist/Contractor
LSN/NIMH/NIH
Bldg49/ Rm 5C36
Bethesda, MD
301-443-0711




--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Problem with scaling stacks

ved sharma
Hi Ron,

I reproduced your results on a Windows 7 machine, running ImageJ 1.51a1

It seems to me that this problem has to do with the interpolation option. If you choose Bilinear or Bicubic, then I am getting the correct number of Z frames.

Ved
___________________________________
Ved Sharma, PhD
Department of Anatomy and Structural Biology
Albert Einstein College of Medicine
Bronx, New York

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Problem with scaling stacks

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by Paletzki, Ron (NIH/NIMH) [C]
> On Oct 14, 2016, at 2:56 PM, Paletzki, Ron (NIH/NIMH) [C] <[hidden email]> wrote:
>
> I have been trying to scale a stack of images and have been getting some weird results and I wonder if this is a known bug or some other problem.  I have a stack of size 1086x 782y 1242z pixels  32-bit gray (same results for 16bit and 8bit images).  When I use the scale function from the menu “Image:Scale…"  in the dialog box I set the x y and z scaling to the same value and then the dialog box shows the correct expected changes in X Y and Z scale.  But when it actually performs the scale the Z axis is incorrect for scale values from 0.4 to 0.1, but works correctly for values from  0.9 to 0.5.  The X and Y are always correct.  
>
> For example:
> scale 0.1 I get 125 slices when I should get 124,
> scale 0.2 I get 249 slices when I should get 248
> scale 0.3 I get 414 slices when I should get 372
> scale 0.4 I get 621 slices when I should get 496
>
> I’m running Fiji / ImageJ version 2.0.0-rc-43/1.51g build 49b667f9aa on a Mac OS 10.8.5
> The Scale dialog box is set to Interpolation:None, Average Downsizing, Process entire stack and Create new window.

The latest daily build (1.51h8) fixes a bug that caused the Image>Scale and Image>Adjust>Size commands to not work as expected with z scale factors less than 0.5 when Interpolation was set to None.

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html