ImageJ
Login
Register
Search
everywhere
only in this topic
Advanced Search
how to open raw image with a variable for the width parameter
‹
Previous Topic
Next Topic
›
Classic
List
Threaded
♦
♦
Locked
3 messages
Options
Loading...
Subscribe via email
Move topic
Pin topic
Unpin topic
Lock topic
Unlock topic
Delete this topic
Delete this topic
Change title and meta tags
Embed post
Permalink
jvander
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
More
Loading...
Reply to author
Edit post
Move post
Delete this post
Delete this post and replies
Change post date
Print post
Permalink
Raw mail
Sep 30, 2015; 2:48pm
how to open raw image with a variable for the width parameter
32 posts
I am writing a plug in (not a Macro) that uses IJ.run to open raw images. It works for fixed numeric parameters, but fails when I try to use variables for the parameters.
This works:
_______
IJ.run("Raw...", "open=temp.raw image=8-bit width=128 height=128 offset=0 number=1 gap=0 white");
_______
This does not work
_______
int a2=128;
IJ.run("Raw...", "open=temp.raw image=8-bit width=a2 height=a2 offset=0 number=1 gap=0 white");
________
The error message is
Numeric value expected in run() function
Dialog box title: "Import>Raw..."
Key:"width:"
Value or variable name: "a2"
Please advise as to how I might be able to open a raw image with a variable for the width and height
thanks in advance
Joe v.
Peter Mc
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
More
Loading...
Reply to author
Edit post
Move post
Delete this post
Delete this post and replies
Change post date
Print post
Permalink
Raw mail
Sep 30, 2015; 3:18pm
Re: how to open raw image with a variable for the width parameter
27 posts
try
int a2=128;
IJ.run("Raw...", "open=temp.raw image=8-bit width="+a2+" height="+a2+" offset=0 number=1 gap=0 white");
Research engineer
HGGM. Madrid.
jvander
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
More
Loading...
Reply to author
Edit post
Move post
Delete this post
Delete this post and replies
Change post date
Print post
Permalink
Raw mail
Sep 30, 2015; 3:49pm
Re: how to open raw image with a variable for the width parameter
32 posts
Thanks!
The "+a2+" solved the problem.
Joe v.
Free forum by Nabble
Disable Popup Ads
|
Edit this page