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
 LabTalk Forum
 converting matrix image to 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
tinkusch Posted - 01/05/2005 : 06:47:04 AM
Origin Version: (v7.5870) Test Version
Operating System: XP

Hi,
after import of a *.tif picture into a matrix, the command
matrix -in;
should then convert the matrix image into data.

This works fine in v7.0, the internal data type changes automatically from char to short and the numerical values are accessible.

The command fails in the above test version, the data type remains char() and the numerical values of the matrix cells are not accessible by other routines.

Why is this so and is there a workaround?

Thanks

Stefan


Edited by - tinkusch on 01/05/2005 07:48:45 AM
2   L A T E S T    R E P L I E S    (Newest First)
tinkusch Posted - 01/06/2005 : 03:48:24 AM
Hi,
I have sent an example tiff image to tech support.
As I could not reproduce the problem with other tiff images I now belive, it is a problem of the tiff images created by the HP-scanner software I used.

In Origin7.5 I was able to solve the problem with this function:
void SetMatToShort()
{
MatrixLayer mm("Matrix1");
mm.SetInternalData(FSI_USHORT);
}


bye
Stefan

eparent Posted - 01/05/2005 : 11:10:23 AM
I am unable to reproduce the problem.
The following steps were used:
- Run Origin 7.5870
- Create new matrix. Data type defaults to double(8).
- Import TIFF image. Data type changed to short(2) unsigned.
- Execute "matrix -in". Data type still short(2) unsigned.
- Execute "cell(1,1)=". Value appears.

The above steps were tested using 4 different TIFF images. An 8-bit gray, 16-bit gray, 8-bit color, and 24-bit color. The 2 gray scale images gave the results described above.
The 24-bit color image caused the matrix data type to change to "int(4) unsigned" after import and changed to "short(2) unsigned" after executing "matrix -in".
The 8-bit color image caused the matrix data type to change to "char(1) unsigned" after import and did not change after executing "matrix -in".
In all 4 cases I was able to access the data.

Can you please send your TIFF image to tech support so I may test with your image?


Edited by - eparent on 01/05/2005 11:22:59 AM

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