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 for Programming
 Forum for Origin C
 Update of image representation of matrix
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Frank_H

Germany
Posts

Posted - 07/05/2005 :  11:49:26 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5 SR5
Operating System: XP

Hi!

I just wrote some functions to do some gaussian smooth on my data matrices. To judge the effect I put them into image view mode. But I found, that the image view is not updated, allthough the data is changed. I could force an update by changing the internal data type between double and float. But I am looking for a more direct way of forcing the update.

Regards,
Frank

cpyang

USA
1406 Posts

Posted - 07/05/2005 :  6:44:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I would need to see your code to know why the image is not updating.

You can set the Z range by LabTalk to force the image to update. Internally, the Z range is taken from the data, but if you know the Z range, you can set it yourself, and thus the image will definitely redraw, as shown below,

 

void setz(int nr1 = 2, int nc1 = 3, int nr2 = 10, int nc2 = 14, double dZ = 2)
{
MatrixLayer ml = Project.ActiveLayer();

if(ml==NULL)
{
out_str("Must have matrix as active window");
return;
}

Matrix mat(ml);

for(int nr = nr1; nr < nr2; nr++)
{
for(int nc = nc1; nc < nc2; nc++)
mat[nr][nc] = dZ;
}
double zmin = mat.GetMin();
double zmax = mat.GetMax();

mat.SetZRange(zmin, zmax);
}





CP


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