Posted by
Cammer, Michael on
Feb 26, 2017; 3:23pm
URL: http://imagej.273.s1.nabble.com/problem-with-conversion-to-RGB-IJ-1-51k18-java-1-6-0-20-tp5018189p5018199.html
Thank you!!!
_________________________________________
Michael Cammer, Optical Microscopy Specialist
http://ocs.med.nyu.edu/microscopyhttp://microscopynotes.com/Cell: (914) 309-3270
________________________________________
From: Wayne Rasband [
[hidden email]]
Sent: Saturday, February 25, 2017 8:03 PM
To:
[hidden email]
Subject: Re: problem with conversion to RGB - IJ 1.51k18 java 1.6.0_20
> On Feb 24, 2017, at 4:26 PM, Cammer, Michael <
[hidden email]> wrote:
>
> We are having a problem converting hyperstacks to RGB in a macro. Approximately one out of five times we run the macro, it does not work. We tried adding a wait(200) step, but don't know if this really helps or not.
Hi Michael,
The latest ImageJ daily build (1.51k21) fixes a bug in the 3D Project… command that was causing your macro to fail. The 200 ms wait is not needed.
-wayne
> The error is that ImageJ cannot find image with id2.
>
> [cid:image001.png@01D28EBA.CC7A15E0]
>
> Any help appreciated. The problem is with the second macro. Included the first macro to show what types of files we are using (2 or 3 channel Z series confocal).
>
> macro "Set up images [q]" {
> //run("Channels Tool...");
> Stack.setDisplayMode("composite");
> //run("Brightness/Contrast...");
> Stack.getDimensions(width, height, channels, slices, frames) ;
> for (n=1; n<=channels; n++) {
> Stack.setChannel(n);
> setMinAndMax(0, 65535);
> }
> Stack.setSlice(floor(slices / 3)) ;
> }
>
> /* Draw a box around an area to be 3D projected.
> Run this macro.
> */
> macro "Do 3D projections [F2]" {
> run("Duplicate...", "duplicate");
> id1 = getImageID();
> // change to get scale for each sample if Z different than 0.3 um
> run("3D Project...", "projection=[Brightest Point] axis=X-Axis slice=0.30 initial=0 total=360 rotation=10 lower=1 upper=255 opacity=0 surface=50 interior=25 interpolate");
> //run("RGB Color", "frames"); // buggy
> wait(200); // appears the projection command needs this to hand off the image properly
> id2 = getImageID();
> run("RGB Color", "frames keep");
> selectImage(id1); close(); selectImage(id2); close();
> }
>
>
>
>
>
>
>
>
> =*===========================================================*=
> Michael Cammer, DART Microscopy Laboratory, NYU Langone Medical Center
> Cell: 914-309-3270 Office: Skirball 2nd Floor main office, back right
>
http://ocs.med.nyu.edu/microscopy &
https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.com_&d=DQIFaQ&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_05LztNstAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=zMi2MImiqqSoL2uyrKtI4I5bqy1bpH_THjn82Cx3bKY&s=JmZUD6MpOIBQIL0gfrGQIvQToAvee28w5IMwhZQLfDM&e=>
>
> ------------------------------------------------------------
> This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
> =================================
>
> --
> ImageJ mailing list:
https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DQIFaQ&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_05LztNstAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=zMi2MImiqqSoL2uyrKtI4I5bqy1bpH_THjn82Cx3bKY&s=vwitU8jEBmNJsGawiJDAM0Y5_eW3THHPk8aCgVG_sb0&e=--
ImageJ mailing list:
https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DQIFaQ&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_05LztNstAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=zMi2MImiqqSoL2uyrKtI4I5bqy1bpH_THjn82Cx3bKY&s=vwitU8jEBmNJsGawiJDAM0Y5_eW3THHPk8aCgVG_sb0&e=------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html