Posted by
Rohitesh Gupta on
May 10, 2019; 4:29pm
URL: http://imagej.273.s1.nabble.com/Java-code-for-redirecting-to-original-image-under-set-measurements-tp5022167p5022171.html
Thanks for the help. I will try this in the code.
I am new to JAVA and so really don't understand the language that much. May be I will give it a shot and see if anything works out. Is there a way to check line by line execution of the code ?
-----Original Message-----
From: ImageJ Interest Group <
[hidden email]> On Behalf Of Ziqiang Huang
Sent: Friday, May 10, 2019 10:22 AM
To:
[hidden email]
Subject: Re: Java code for redirecting to original image under set measurements
Non-UNMC email
I am not sure what you mean by “better”, but another way to check this is through images api:
https://urldefense.proofpoint.com/v2/url?u=https-3A__imagej.nih.gov_ij_developer_api_ij_plugin_filter_Analyzer.html-23setRedirectImage-2Dij.ImagePlus-2D&d=DwIFaQ&c=ZukO2fIan9e5E9v43wuy1w&r=34-TUupgH50lxe-gJRTc3Sa1yQ018sXW8kPlA42xqaE&m=s4-K_YIBKy5ajj6hpKezL1TMVodX05GulI7mDKOdfWs&s=abT0ilzi2ANzQ3TgATb5Bz2ns7KcZooONqFYT1QS8Wc&e= - setRedirectImage
public static void setRedirectImage(ImagePlus <
https://urldefense.proofpoint.com/v2/url?u=https-3A__imagej.nih.gov_ij_developer_api_ij_ImagePlus.html&d=DwIFaQ&c=ZukO2fIan9e5E9v43wuy1w&r=34-TUupgH50lxe-gJRTc3Sa1yQ018sXW8kPlA42xqaE&m=s4-K_YIBKy5ajj6hpKezL1TMVodX05GulI7mDKOdfWs&s=OFUw0G37CA89nLmJRpWTM0FJZJKOO_1f4Upbm1GgI-Q&e=> imp)
Set the "Redirect To" image. Pass 'null' as the argument to disable
redirected sampling.
It’s quite clear and simple to use this function. Just assign the ImagePlus instance of your original image as the input. Give it a try.
On a side note:
You didn’t share your code, and at least to me your description of the problem was not clear. Therefore, help or suggestion can be limited. It’s also not clear to me whether you want to create a plugin, a script, or a macro. On one part you said you trying to make a plugin, and on another part it seems like a macro. You didn’t mention which language you set the macro recorder to, plus what code generated either. Purely guessing from the context, a macro (in imagej macro language) should be sufficient to fulfill what you want to achieve. Then you don’t even need to worry about the java code .
Good luck.
On Fri, 10 May 2019 at 15:35, Rohitesh Gupta <
[hidden email]>
wrote:
> Thanks for your email. But, is there a better way to do this ? Any
> more suggestions.
>
> --
> ImageJ mailing list:
>
https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_> list.html&d=DwIFaQ&c=ZukO2fIan9e5E9v43wuy1w&r=34-TUupgH50lxe-gJRTc3Sa1
> yQ018sXW8kPlA42xqaE&m=s4-K_YIBKy5ajj6hpKezL1TMVodX05GulI7mDKOdfWs&s=8f
> -LNu04E1doNDPq37tEQ52ZoNx5mU72k2_aCv-Ah2M&e=
>
--
Ziqiang Huang
Bioimage Analyst of Light Microscopy Facility CRUK Cambridge Institute Li Ka Shing Centre Robinson Way Cambridge, UK
CB2 0RE
01223-769538
email:
[hidden email] <
[hidden email]>
--
ImageJ mailing list:
https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIFaQ&c=ZukO2fIan9e5E9v43wuy1w&r=34-TUupgH50lxe-gJRTc3Sa1yQ018sXW8kPlA42xqaE&m=s4-K_YIBKy5ajj6hpKezL1TMVodX05GulI7mDKOdfWs&s=8f-LNu04E1doNDPq37tEQ52ZoNx5mU72k2_aCv-Ah2M&e=The information in this e-mail may be privileged and confidential, intended only for the use of the addressee(s) above. Any unauthorized use or disclosure of this information is prohibited. If you have received this e-mail by mistake, please delete it and immediately contact the sender.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html