I'm getting unpredictable results with the following code.
The original window is a stack of RGB images.
The goal is to have a stack with only the hue information of each slice.
However, the result is individual windows some of which are the correct 8 bit result and some of which are the original RGB image. Then, Stacks>Images to Stack converts them all to RGB instead of returning an error that they are different type.
Montages of two of the resultant stacks are at
http://www.flickr.com/photos/mcammer/7727087422/in/photostreamAlso, I tried setting threads to 1 in options, but this did not solve the problem.
Alternatively, is there a way do do this by hexadecimal logic on the original RGB stack?
Thank you!
macro "segment using HSV"{
original = getImageID;
s = nSlices;
for (i=1; i<=s; i++) {
selectImage(original);
setSlice(i);
run("Duplicate...", "title=HSV"+i);
HSBwindow = getImageID;
run("HSB Stack");
//setSlice(3);
//run("Delete Slice"); // delete Value
//run("Delete Slice"); // delete Saturation
run("Duplicate...", "title=HSB"+i);
Hwindow = getImageID;
selectImage(HSBwindow);
close();
selectImage(Hwindow);
changeValues(0,20,0);
changeValues(50,255,0);
}
}// end
// manually doing run("Images to Stack", "method=[Copy (center)] name=Stack title=HSB use");
_________________________________________
Michael Cammer, Assistant Research Scientist
Skirball Institute of Biomolecular Medicine
Lab: (212) 263-3208 Cell: (914) 309-3270
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html