selection specify bug ?

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

selection specify bug ?

Thomas Boudier
Hi,

When I want to specify a selection (edit/selection/specify) on a very
small image (10x10) it seems that there is one pixel shift in x and y
when I click on "center". I use latest ImageJ 1.43m.

Thomas

--
   /**********************************************************/
      Thomas Boudier, MCU Université Pierre et Marie Curie,
      IFR 83. Bat B 7ème étage, porte 706D, Jussieu.
      Tel : 01 44 27 20 13  Fax : 01 44 27 22 91
/*******************************************************/
Reply | Threaded
Open this post in threaded view
|

Re: selection specify bug ?

Thomas Boudier
Humm I like to talk to myself ;-)

in ij.plugin.specifyROI drawRoi function :

if (centered) {
                        iX = (int)(xRoi - (width/2));
                        iY = (int)(yRoi - (height/2));
                }

I would replace them by iX=(int)(xRoi -(width-1)/2), same for iY

it will center correctly the Rois for odd widths, for even widths there
will always be a problem.

Thomas


Thomas Boudier a écrit :
> Hi,
>
> When I want to specify a selection (edit/selection/specify) on a very
> small image (10x10) it seems that there is one pixel shift in x and y
> when I click on "center". I use latest ImageJ 1.43m.
>
> Thomas
>

--
   /**********************************************************/
      Thomas Boudier, MCU Université Pierre et Marie Curie,
      IFR 83. Bat B 7ème étage, porte 706D, Jussieu.
      Tel : 01 44 27 20 13  Fax : 01 44 27 22 91
/*******************************************************/