Posted by
Karel Jansseune-2 on
Aug 27, 2009; 8:03am
URL: http://imagej.273.s1.nabble.com/Different-results-with-duplicate-or-re-open-the-image-tp3691380p3691382.html
This is (a part) of my macro
The whole macro involves some input boxes and some control structures.
but they are of no real importance here.
So the idea is that an image is openened, duplicated.
the duplicate is used to create a mask (with makeRGB, this is a macro for
colour thresholding)
Than the mask is added to the original and the resulting image is used
again in MakeHSB to detect plant parts.
than I analyse particles to detect the area and the diameter of the plants.
In the first version I used open(inputpath) again in stead of duplicate.
After changing this to duplicate in the macro I notice a difference
between the results after analysis.
.
.
.
open(inputPath);
ID = getTitle();
run("Duplicate...", "title=double");
run("Set Measurements...", "area centroid circularity feret's
redirect=None decimal=4");
run("Set Scale...", "distance="+pixels+" known="+length+" pixel=1 unit=mm
global");
selectWindow("double");
MakeRGB();
imageCalculator("AND", ID ,"mask");
selectWindow("mask");
close();
MakeHSB();
run("Invert");
run("Analyze Particles...", "size="+Size2+"-infinity circularity=0.00-1.00
show=Nothing clear include add");
roiManager("Measure");
.
.
.
On Thu, 27 Aug 2009 08:35:15 +0100, Gabriel Landini <
[hidden email]>
wrote:
>On Thursday 27 August 2009, Karel Jansseune wrote:
>> I browsed through the macro, but this is not the case.
>> At the moment of duplication, nothing is selected.
>>
>> I'm currently trying to find out what exactely happens, but so far I
can't
>> really find any reason why the two would give different results
>
>Perhaps the wrong image is selected by default during the macro execution.
>Post the macro to the list for us to see, otherwise it is impossible to
know
>what is going on.
>
>G.