Watershed outputs differ // Re: Puzzled with Nucleus Counter and the flex-file and its opener

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

Watershed outputs differ // Re: Puzzled with Nucleus Counter and the flex-file and its opener

Md Tamjidul Hoque
Ok, for problem 1, further I found that the output of 'watershed' algorithm
differs for the same image in between two versions of ImageJ (i.e.,
WCIF_ImageJ  and MBF_ImageJ).
Any help? Is there any parameter for the 'watershed' algorithm?


- Tamjid




On Wed, May 19, 2010 at 11:32 AM, Md Tamjidul Hoque <
[hidden email]> wrote:

>  Dear All
>
>         I was extending the  "Nucleus Counter" (under "Plugins > Particle
> Analysis > ...")  for some particular application.
>
>        Problem 1: I do not see "Nucleus Counter" is performing the same
> for same image with same options selected
>                         for version WCIF_ImageJ (
> http://www.uhnresearch.ca/facilities/wcif/imagej/) and version MBF_ImageJ
> (http://www.macbiophotonics.ca/imagej/)
>                         ... why is that?
>                        It seems working as desired with WCIF_ImageJ and
> not with MBF_ImageJ but I am relying on MBF_ImageJ to open .flex file (
> http://www.loci.wisc.edu/bio-formats-format/evotecperkinelmer-opera-flex)
> only.
>                        ... why is that?
>
>       Problem 2: How can I use WCIF_ImageJ to open .flex file? [Can I
> borrow something from MBF_ImageJ into WCIF_ImageJ]
>
>       Problem 3: If a .flex file have many pages - it shows stack size '0'
> (for the following code, but do count correctly if you open differently: By
> ImageJ and then capture the Image window rather than from file ),
>                        whereas if I convert it in tiff and check the tiff
> instead  it shows the number of pages correctly.
>
>                                                         ImagePlus imp = new
> ImagePlus(my_file_names.get(i));
>                                                         ImageStack stack =
> imp.getStack();
>                                                         //imp.show();
>
>      Problem 4:    Even if I block "imp.show();" - flex files are shown on
> the screen but the tiff/tif files are not shown.
>
>
> Any help is much appreciated.
> Thanks
> Tamjid
>
Reply | Threaded
Open this post in threaded view
|

Re: Watershed outputs differ // Re: Puzzled with Nucleus Counter and the flex-file and its opener

Michael Schmid
On 21 May 2010, at 17:38, Tamjid wrote:

> I found that the output of 'watershed' algorithm
> differs for the same image in between two versions of ImageJ (i.e.,
> WCIF_ImageJ  and MBF_ImageJ).
> Any help? Is there any parameter for the 'watershed' algorithm?
>
>
> - Tamjid


Hi Tamjid,

if you are talking about the Image-J built-in commands: have a look  
at the ImageJ versions. The output of Process>Binary>Watershed should  
be unchanged since 1.42o, when a new (more accurate) distance map  
algorithm was implemented. The difference should be minimal, however.
For 'Find Maxima' with output type 'segmented particles', which also  
does watershed segmentation (but not on a distance map), the last  
change that I am aware of was a bug fix in 1.43p.

Michael
Reply | Threaded
Open this post in threaded view
|

Re: Watershed outputs differ // Re: Puzzled with Nucleus Counter and the flex-file and its opener

Md Tamjidul Hoque
Dear Michael

           yes, I am talking about the one in Process>Binary>Watershed and
I am using the version 1.44a for both the versions (MBF_ImageJ and
WCIF_ImageJ).

The difference should have been minimal but it is not.


Here are the sample files to be checked:

(1) Test file before watershed is applied,
http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/Test_before_watershed.tif?attredirects=0&d=1
(2) Output of MBF_ImageJ:
http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/watershed_MBF.tif?attredirects=0&d=1
(3)  output of WCIF_ImageJ:
http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/watershed_WCIF.tif?attredirects=0&d=1


I might be missing something.


Thanks
Tamjid



On Sat, May 22, 2010 at 2:02 AM, Michael Schmid <[hidden email]>wrote:

> On 21 May 2010, at 17:38, Tamjid wrote:
>
>  I found that the output of 'watershed' algorithm
>> differs for the same image in between two versions of ImageJ (i.e.,
>> WCIF_ImageJ  and MBF_ImageJ).
>> Any help? Is there any parameter for the 'watershed' algorithm?
>>
>>
>> - Tamjid
>>
>
>
> Hi Tamjid,
>
> if you are talking about the Image-J built-in commands: have a look at the
> ImageJ versions. The output of Process>Binary>Watershed should be unchanged
> since 1.42o, when a new (more accurate) distance map algorithm was
> implemented. The difference should be minimal, however.
> For 'Find Maxima' with output type 'segmented particles', which also does
> watershed segmentation (but not on a distance map), the last change that I
> am aware of was a bug fix in 1.43p.
>
> Michael
>
Reply | Threaded
Open this post in threaded view
|

Re: Watershed outputs differ // Re: Puzzled with Nucleus Counter and the flex-file and its opener

Johannes-P. Koch
Tamjid,

just invert the image before and after the watershed and you will get the
same result. Black is usually background and not object, thus you have to
clarify what you want to segment.

Johannes



On Sa, 22.05.2010, 05:48, Tamjid wrote:

> Dear Michael
>
>            yes, I am talking about the one in Process>Binary>Watershed and
> I am using the version 1.44a for both the versions (MBF_ImageJ and
> WCIF_ImageJ).
>
> The difference should have been minimal but it is not.
>
>
> Here are the sample files to be checked:
>
> (1) Test file before watershed is applied,
> http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/Test_before_watershed.tif?attredirects=0&d=1
> (2) Output of MBF_ImageJ:
> http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/watershed_MBF.tif?attredirects=0&d=1
> (3)  output of WCIF_ImageJ:
> http://sites.google.com/site/tamjidulhoque/home/resume-of/useful-links/watershed_WCIF.tif?attredirects=0&d=1
>
>
> I might be missing something.
>
>
> Thanks
> Tamjid
>
>
>
> On Sat, May 22, 2010 at 2:02 AM, Michael Schmid
> <[hidden email]>wrote:
>
>> On 21 May 2010, at 17:38, Tamjid wrote:
>>
>>  I found that the output of 'watershed' algorithm
>>> differs for the same image in between two versions of ImageJ (i.e.,
>>> WCIF_ImageJ  and MBF_ImageJ).
>>> Any help? Is there any parameter for the 'watershed' algorithm?
>>>
>>>
>>> - Tamjid
>>>
>>
>>
>> Hi Tamjid,
>>
>> if you are talking about the Image-J built-in commands: have a look at
>> the
>> ImageJ versions. The output of Process>Binary>Watershed should be
>> unchanged
>> since 1.42o, when a new (more accurate) distance map algorithm was
>> implemented. The difference should be minimal, however.
>> For 'Find Maxima' with output type 'segmented particles', which also
>> does
>> watershed segmentation (but not on a distance map), the last change that
>> I
>> am aware of was a bug fix in 1.43p.
>>
>> Michael
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Watershed outputs differ // Re: Puzzled with Nucleus Counter and the flex-file and its opener

Gabriel Landini
In reply to this post by Md Tamjidul Hoque
On Saturday 22 May 2010, you wrote:
>            yes, I am talking about the one in Process>Binary>Watershed and
> I am using the version 1.44a for both the versions (MBF_ImageJ and
> WCIF_ImageJ).
>
> The difference should have been minimal but it is not.
>
Check that in both versions of IJ you have the same setting in the
Process>Binary>Options...

I guess that in the one that looks odd, you had "black blackground" option
ticked.
As Johannes pointed out earlier you are  processing the background as
foreground in one of the images.

Cheers
G
Reply | Threaded
Open this post in threaded view
|

Re: Watershed outputs differ // Re: Puzzled with Nucleus Counter and the flex-file and its opener

Md Tamjidul Hoque
Thanks Gabriel and Johannes. Got the point and it worked.

Now, how can I tick-off the "Black background" from my java
code/application?

With other setting the command I got was: IJ.run(imp, "Options...",
"iterations=1 count=1 edm=Overwrite do=Nothing"); // for ticked-off "Black
background"
where as tick-on was:                                 IJ.run(imp,
"Options...", "iterations=1 count=1 black edm=Overwrite do=Nothing");

I tried with IJ.run(imp, "Options...", ""); to tick-off the "Black
background" assuming rest of the parameters will remain same as I am not
assigning any value to other parameters.

But, it did not work and it prompted for options to be applied with
Ok/Cancel.

However, IJ.run(imp, "Options...", "iterations=1 count=1 edm=Overwrite
do=Nothing"); worked but it was not my intension to change the other
parameters.

So, is there a way to tick-off the "Black background" keeping the current
values of the other parameter intact from the java application?

Thanks
Tamjid





On Sat, May 22, 2010 at 5:55 PM, Gabriel Landini <[hidden email]>wrote:

> On Saturday 22 May 2010, you wrote:
> >            yes, I am talking about the one in Process>Binary>Watershed
> and
> > I am using the version 1.44a for both the versions (MBF_ImageJ and
> > WCIF_ImageJ).
> >
> > The difference should have been minimal but it is not.
> >
> Check that in both versions of IJ you have the same setting in the
> Process>Binary>Options...
>
> I guess that in the one that looks odd, you had "black blackground" option
> ticked.
> As Johannes pointed out earlier you are  processing the background as
> foreground in one of the images.
>
> Cheers
> G
>
Reply | Threaded
Open this post in threaded view
|

Re: Watershed outputs differ // Re: Puzzled with Nucleus Counter and the flex-file and its opener

Rasband, Wayne (NIH/NIMH) [E]
On May 22, 2010, at 10:05 AM, Tamjid wrote:

> Thanks Gabriel and Johannes. Got the point and it worked.
>
> Now, how can I tick-off the "Black background" from my java
> code/application?
>
> With other setting the command I got was: IJ.run(imp, "Options...",
> "iterations=1 count=1 edm=Overwrite do=Nothing"); // for ticked-off
> "Black background"
> where as tick-on was:                                 IJ.run(imp,
> "Options...", "iterations=1 count=1 black edm=Overwrite do=Nothing");
>
> I tried with IJ.run(imp, "Options...", ""); to tick-off the "Black
> background" assuming rest of the parameters will remain same as
> I am not assigning any value to other parameters.
>
> But, it did not work and it prompted for options to be applied with
> Ok/Cancel.
>
> However, IJ.run(imp, "Options...", "iterations=1 count=1 edm=Overwrite
> do=Nothing"); worked but it was not my intension to change the other
> parameters.
>
> So, is there a way to tick-off the "Black background" keeping the
> current values of the other parameter intact from the java application?

In a plugin, use

    Prefs.blackBackground = true;

In a macro, use

    setOption("black background", true);

-wayne


> On Sat, May 22, 2010 at 5:55 PM, Gabriel Landini <[hidden email]>wrote:
>
>> On Saturday 22 May 2010, you wrote:
>>>           yes, I am talking about the one in Process>Binary>Watershed
>> and
>>> I am using the version 1.44a for both the versions (MBF_ImageJ and
>>> WCIF_ImageJ).
>>>
>>> The difference should have been minimal but it is not.
>>>
>> Check that in both versions of IJ you have the same setting in the
>> Process>Binary>Options...
>>
>> I guess that in the one that looks odd, you had "black blackground" option
>> ticked.
>> As Johannes pointed out earlier you are  processing the background as
>> foreground in one of the images.
>>
>> Cheers
>> G
>>
Reply | Threaded
Open this post in threaded view
|

Re: Watershed outputs differ // Re: Puzzled with Nucleus Counter and the flex-file and its opener

Md Tamjidul Hoque
Great Wayne - Thanks
Tamjid

On Sun, May 23, 2010 at 12:29 AM, Rasband, Wayne (NIH/NIMH) [E] <
[hidden email]> wrote:

> On May 22, 2010, at 10:05 AM, Tamjid wrote:
>
> > Thanks Gabriel and Johannes. Got the point and it worked.
> >
> > Now, how can I tick-off the "Black background" from my java
> > code/application?
> >
> > With other setting the command I got was: IJ.run(imp, "Options...",
> > "iterations=1 count=1 edm=Overwrite do=Nothing"); // for ticked-off
> > "Black background"
> > where as tick-on was:                                 IJ.run(imp,
> > "Options...", "iterations=1 count=1 black edm=Overwrite do=Nothing");
> >
> > I tried with IJ.run(imp, "Options...", ""); to tick-off the "Black
> > background" assuming rest of the parameters will remain same as
> > I am not assigning any value to other parameters.
> >
> > But, it did not work and it prompted for options to be applied with
> > Ok/Cancel.
> >
> > However, IJ.run(imp, "Options...", "iterations=1 count=1 edm=Overwrite
> > do=Nothing"); worked but it was not my intension to change the other
> > parameters.
> >
> > So, is there a way to tick-off the "Black background" keeping the
> > current values of the other parameter intact from the java application?
>
> In a plugin, use
>
>    Prefs.blackBackground = true;
>
> In a macro, use
>
>    setOption("black background", true);
>
> -wayne
>
>
> > On Sat, May 22, 2010 at 5:55 PM, Gabriel Landini <[hidden email]
> >wrote:
> >
> >> On Saturday 22 May 2010, you wrote:
> >>>           yes, I am talking about the one in Process>Binary>Watershed
> >> and
> >>> I am using the version 1.44a for both the versions (MBF_ImageJ and
> >>> WCIF_ImageJ).
> >>>
> >>> The difference should have been minimal but it is not.
> >>>
> >> Check that in both versions of IJ you have the same setting in the
> >> Process>Binary>Options...
> >>
> >> I guess that in the one that looks odd, you had "black blackground"
> option
> >> ticked.
> >> As Johannes pointed out earlier you are  processing the background as
> >> foreground in one of the images.
> >>
> >> Cheers
> >> G
> >>
>