double vs float constructors on ROIs

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

double vs float constructors on ROIs

CARL Philippe (LBP)
Dear all,
Playing with different ROI constructors, I saw that:
        - Line has a        double constructor, but no float
        - PolygonRoi has a float[] constructor, but no double[]
        - PointRoi   has a double  constructor, but no float
                   and a float[] constructor, but no double[]
...
Is there a reason for this differences?
Wouldn't it be better to have both double and float constructor for the
different ROIs classes?
My best regards,
Philippe

Philippe CARL
Laboratoire de Bioimagerie et Pathologies
UMR 7021 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
67401 ILLKIRCH
Tel : +33(0)3 68 85 41 84

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

Re: double vs float constructors on ROIs

Wayne Rasband-2
> On May 13, 2019, at 4:26 AM, Philippe CARL <[hidden email]> wrote:
>
> Dear all,
> Playing with different ROI constructors, I saw that:
> - Line has a        double constructor, but no float
> - PolygonRoi has a float[] constructor, but no double[]
> - PointRoi   has a double  constructor, but no float
>                   and a float[] constructor, but no double[]
> ...
> Is there a reason for this differences?
> Wouldn't it be better to have both double and float constructor for the
> different ROIs classes?

Having both float and double constructors and methods was a mistake. It complicates the API and causes the dreaded "Can't unambiguously select between fixed arity signatures” JavaScript error.

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