select region of interest

Hi
I have one image and I want to select special part of this image as ROI but when I put for example Redimension/N=(400,300) wave0 , it selected another part.
My image has 600*400 and my aim is selection from (200-300)*(100-200) but it selected from zero of my graph not middle of that.
Any suggestion can be help me.
Thanks

It seems you need something like:

make/N=(600, 400) test = p*q; newimage test
make/O/N=(100, 100) ROI; newimage roi
roi = test[p+200][q+100]
Thanks for your answer.
But they are not working in my code. :(
I want only select the part of my image from my graph.
saeed wrote:
Hi
I have one image and I want to select special part of this image as ROI but when I put for example Redimension/N=(400,300) wave0 , it selected another part.
My image has 600*400 and my aim is selection from (200-300)*(100-200) but it selected from zero of my graph not middle of that.
Thanks

To create a new image from a portion of wave0 you can use:
Duplicate/R=[200,300][100,200] wave0,subImage



A.G.
WaveMetrics, Inc.
Using Duplicate is seems great but it is not work in my situation.
I can select every coordinate but my problem is it selected from corner of my graph not every where which I like.
Is there any another suggestion to help me?

Thanks
saeed wrote:
Using Duplicate is seems great but it is not work in my situation.
I can select every coordinate but my problem is it selected from corner of my graph not every where which I like.

I suggest you look again at the arguments you pass to Duplicate/R. This operation allows you to copy any rectangular portion of the image.

Quote:
Is there any another suggestion to help me?

If Duplicate/R does not work for you then you are simply not describing your problem with sufficient detail. I suggest that you send a simplified form of your experiment to support@wavemetrics.com and explain precisely what you want to accomplish.

A.G.
WaveMetrics, Inc.
Thanks for your suggestion.
It works but I like it is appeare in the same graph(instead of my main graph) but it is not.
I have to write another graph like:

Duplicate/R=[Atomparameters0[5],Atomparameters0[7]][Atomparameters0[6],Atomparameters0[8]] wave0, subimage
Display /N=ROI
AppendImage subimage

This is code for my main graph:

GBLoadWave/O/N=wave/T={16,80}/W=1 "D:DATA:temporalIgor.txt"
Redimension/N=(640,480) wave0
Duplicate wave0
Display /N=MyGraph
AppendImage wave0

I mean I like to switch between both(one time main and the other time ROI)
Thanks in advance.
I'm sure there is something incomplete in this part:
saeed wrote:

Redimension/N=(640,480) wave0
Duplicate wave0
Display /N=MyGraph
AppendImage wave0


you could do it simply if after loading the data into wave0 and using Redimension you execute:
Duplicate/O wave0,wave1
NewImage wave1

When you want to switch the display you execute:
Duplicate/O/R=[some args here] wave0,wave1

After the last Duplicate the display in the graph is automatically updated.

A.G.
I attached my cods, maybe this help me to explain in better way.
In the first code(test) , I did not modify your suggestiob yet because I want to show you exactlly what am I do. In second code(for roi)I use your code.
For example you told I can use Newimage instead of my complicate code but when I use Newimage, I can not kill my graph because it loads from Labview and you see with
DoWindow MyGraph
if(V_flag == 1)
KillWindow MyGraph
I can do that, So first question is :if I want to use Newimage how can I kill my graph?
By the way when I use Duplicate/O/R=[] wave0, wave1 again I have some problem like when I press my button of ROI, it apears in same graph as I want but immediately after loading from Labview, it changes, then second question is how can I fix it, I mean after press botton I want to see only ROI image even it loads.
The last question is I have same problem with Binning part, when I press binning button, It also apears in another greaph and I have to use AppendImage M_PixelatedImage.

Sorry for a lots of question, I am really newbie in Igor.
Thanks a lot for your helping
saeed wrote:

For example you told I can use Newimage instead of my complicate code but when I use Newimage, I can not kill my graph because it loads from Labview and you see with
DoWindow MyGraph


So first question is :if I want to use Newimage how can I kill my graph?


You can use the /N flag also on NewImage, so
NewImage/N=MyGraph wave0    


is equivalent to:

Display /N=MyGraph    
AppendImage wave0
SetAxis/A/R left


If you're unfamiliar with some commands you can right click on them to get a help file - check out the options and flags that go with the command.

saeed wrote:

By the way when I use Duplicate/O/R=[] wave0, wave1 again I have some problem like when I press my button of ROI, it apears in same graph as I want but immediately after loading from Labview, it changes, then second question is how can I fix it, I mean after press botton I want to see only ROI image even it loads.


I think this is because the loading procedure duplicates the loaded file into wave1 which gets overwritten, so if it's displayed you'll see the new values. Make sure you use meaningful names for each steps in your procedures.
Use the Data Browser to see what's going in your experiment, if you don't.