The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Cluster Tool For Image Plots
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

fook

Posts

Posted - 08/16/2013 :  10:58:11 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.6.0 Pro (64-bit) SR3
Operating System: Win7 64bit

Hello,

I use Origin to analyze reciprocal space maps. I import a large grid as a matrix and plot it as an image plot. It would be very helpful if I could use the cluster tool to identify maxima / peaks on the image, but it is greyed out. Is there another way to find maxima within a certain region on an image?

Hideo Fujii

USA
1582 Posts

Posted - 08/16/2013 :  3:55:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi fook,

Currently, it is neither possible to apply the Cluster gadget to the image, nor to identify the maximum data point visually.

The following work-around does similar task:

1) On the image, crop the area using the Rectangle tool.
2) Run the following tool. It will produce an image plot of that region with a peak marker, as well as the statistics on the Script window.
//////////////////////////////////
  img2m;  //convert to data matrix
  string mat$=%H;
  m2w method:=xyz;  //convert to a worksheet
  string wkb$=%H;
  sum(col(3));  //Get stats
  minr=sum.imin;  //imin for darkest, and imax for brightest
  minx=col(1)[minr];
  miny=col(2)[minr];
  minz=col(3)[minr];
  meanz=sum.mean;
  sdz=sum.sd;
  maxz=sum.max;
  minz=sum.min;
  win -t plot image;  //make an empty image plot
  string gr$=%H;
  layer -i %(mat$);
  layer -a;
  speedmode;
  window -a %(wkb$);
  newsheet;
  col(1)[1]=minx;
  col(2)[1]=miny;
  plotxy iy:=(1,2) plot:=201 ogl:=[gr$]1!1;  //plot a marker in the image plot
  window -a %(gr$);
  range ss=[%(wkb$)]2!2;
  set ss -c 2;  //RED
  set ss -k 2;  //Circle
  set ss -kf 4; //Center Plus
  type -a Z value at point is $(minz) at ( $(minx) , $(miny) );
  type -a Region Statistics: Mean: $(meanz), SD: $(sdz), Max: $(maxz), Min: $(minz);
//////////////////////////////////




Hope this helps.

--Hideo Fujii
OriginLab
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000