ImageJ 1.53a color threshold macro error (HSB stack)

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

ImageJ 1.53a color threshold macro error (HSB stack)

Skibinski, Bertram
Dear all,



I am using ImageJ 1.53a and a macro from the official ImageJ database using the color thresholding in HSB color space (https://imagej.nih.gov/ij/macros/Percent_Green.txt 1) reports an error on “supported conversion” if executed. It has to be noted here, that the macro “Percent_Green.txt” was developed in ImageJ 1.49m. I want to use this macro in my own project as well, that I do not go into detail at this point as it adds no value to the overall discussion.  Details on how to reproduce the error and the respective error report are given below. Could you please help me to successfully execute the task given in the “Percent_Green.txt” macro in ImageJ 1.53a?



You can reproduce the error by executing the macro from “Percent_Green.txt” (see link above) using the following TIF file: https://upload.wikimedia.org/wikipedia/commons/9/93/White_House_lawn_(1).tif



The error report is as follows:

----

Name * Value

Memory * 297MB of 3072MB (9%)

nImages() 1

getTitle() “White_House_lawn_(1).tiff”

min array[3]

max array[3]

filter array[3]

a “White_House_lawn_(1).tiff”



Error: Supported Conversions:



8-bit -> 16-bit*

8-bit -> 32-bit*

8-bit -> RGB Color*

16-bit -> 8-bit*

16-bit -> 32-bit*

16-bit -> RGB Color*

32-bit -> 8-bit*

32-bit -> 16-bit

32-bit -> RGB Color*

8-bit Color -> 8-bit (grayscale)*

8-bit Color -> RGB Color

RGB -> 8-bit (grayscale)*

RGB -> 8-bit Color*

RGB -> RGB Stack*

RGB -> HSB Stack*

RGB -> Lab Stack

RGB Stack -> RGB Color

HSB Stack -> RGB Color



works with stacks

in line 31:

  run ( "HSB Stack" <)> ;





Best regards,  Bertram

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

Re: ImageJ 1.53a color threshold macro error (HSB stack)

Herbie
Good day Bertram,

no problems here. The result obtained from the sample image is sound.

I run 1.53b35 daily build of ImageJ.

Regards

Herbie

::::::::::::::::::::::::::::::::::::::::::::::::
Am 28.05.20 um 19:06 schrieb Skibinski, Bertram:

> Dear all,
>
>
>
> I am using ImageJ 1.53a and a macro from the official ImageJ database using the color thresholding in HSB color space (https://imagej.nih.gov/ij/macros/Percent_Green.txt 1) reports an error on “supported conversion” if executed. It has to be noted here, that the macro “Percent_Green.txt” was developed in ImageJ 1.49m. I want to use this macro in my own project as well, that I do not go into detail at this point as it adds no value to the overall discussion.  Details on how to reproduce the error and the respective error report are given below. Could you please help me to successfully execute the task given in the “Percent_Green.txt” macro in ImageJ 1.53a?
>
>
>
> You can reproduce the error by executing the macro from “Percent_Green.txt” (see link above) using the following TIF file: https://upload.wikimedia.org/wikipedia/commons/9/93/White_House_lawn_(1).tif
>
>
>
> The error report is as follows:
>
> ----
>
> Name * Value
>
> Memory * 297MB of 3072MB (9%)
>
> nImages() 1
>
> getTitle() “White_House_lawn_(1).tiff”
>
> min array[3]
>
> max array[3]
>
> filter array[3]
>
> a “White_House_lawn_(1).tiff”
>
>
>
> Error: Supported Conversions:
>
>
>
> 8-bit -> 16-bit*
>
> 8-bit -> 32-bit*
>
> 8-bit -> RGB Color*
>
> 16-bit -> 8-bit*
>
> 16-bit -> 32-bit*
>
> 16-bit -> RGB Color*
>
> 32-bit -> 8-bit*
>
> 32-bit -> 16-bit
>
> 32-bit -> RGB Color*
>
> 8-bit Color -> 8-bit (grayscale)*
>
> 8-bit Color -> RGB Color
>
> RGB -> 8-bit (grayscale)*
>
> RGB -> 8-bit Color*
>
> RGB -> RGB Stack*
>
> RGB -> HSB Stack*
>
> RGB -> Lab Stack
>
> RGB Stack -> RGB Color
>
> HSB Stack -> RGB Color
>
>
>
> works with stacks
>
> in line 31:
>
>    run ( "HSB Stack" <)> ;
>
>
>
>
>
> Best regards,  Bertram
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Re: ImageJ 1.53a color threshold macro error (HSB stack)

Gabriel Landini
In reply to this post by Skibinski, Bertram
Hi
The macro does not generate any error here either with 1.53b31
I cannot tell if that macro works or not, but I am sure the second line in
that macro is unnecessary:
run("Color Threshold...");
Just comment it out, it does nothing.
You do not need it because the macro contains all the autogenerated code from
the colour thresholder.

The error you mention would probably happen if you try to run the macro with a
non-colour image. So make sure that you click on the right colour image before
running it.

If you have only one rgb image open and you still get the error, try adding:

wait(100);

before AND after the line:

run("HSB Stack");

If that works, then try deleting one of them and try again. I wonder if there
is something like a race condition in the conversion to the HSB stack.  That
delay might be able to avoid it. I have seen a similar kind of problem before.

Cheers

Gabriel

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