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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Update of image representation of matrix

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Frank_H Posted - 07/05/2005 : 11:49:26 AM
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
1   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 07/05/2005 : 6:44:44 PM
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



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000