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
 Accessing image data

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 - 04/06/2005 : 1:36:10 PM
Hi!

I want to work with image data in OriginC. But one cannot attach a Matrix to an image (on an MatrixLayer), and there is also no image-object as an alternative. How do I access the image data from OriginC without creating the overhead to store image + additional matrix? I need some efficient method to copy image data to or from a matrix or vector.

Regards,
Frank
3   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 04/07/2005 : 9:30:50 PM
quote:

Does it ever happen that there is more than on MatrixObject on a MatrixLayer?



Yes, MatrixPage can have multiple MatrixLayer and each MatrixLayer can have unlimited number of MatrixObject. In Origin7.5, there is no GUI to see these additional objects, but it is possible to create and access them.


CP


Frank_H Posted - 04/07/2005 : 07:43:25 AM
Hi Leo

Thanks! That solves my problem!

I only think that it is a bit inconsistent to have a constructor
Matrix mat(ml);
working for all normal matrices but not for image matrices. Does it ever happen that there is more than on MatrixObject on a MatrixLayer?
Speaking of consistency (just in case an OriginC programmer reads this :-) ) Its a bit irritating, that for MatrixLayer, MatrixObject etc one gets the internal data type by GetInternalData(), while for the matrixbase derived objects its GetInternalDataType().

Cheers,
Frank
Leo_Li Posted - 04/07/2005 : 06:25:40 AM
Hi, Frank:
Once you load your image into a Matrix window, you can acess the image data in Origin C:

// Matrix Layer (Window)
MatrixLayer ml = Project.ActiveLayer();

// Matrix Object associated with the Layer
MatrixObject mo = ml.MatrixObjects(0);

// Matrix Data (image data)
Matrix& mat = mo.GetDataObject();

And you can also retrive the dimension of you image by calling:

int nRows = mo.GetNumRows();
int nCols = mo.GetNumCols();

Leo
OriginLab

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