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
 Origin Forum
 Confocal Image Stacks

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
mjmgormley Posted - 06/08/2015 : 3:34:40 PM
I'm working with confocal laser scanning microscope image stacks.

For example, take a region whose physical dimensions are X=200 microns, Y=200 microns, Z= 40 microns.

It is scanned across XY at 1024x1024 pixels, 20 times through the Z plane; each cell containing the intensity (0-255 byte) measured at that point in space.

The result is 20 ASCII matrix files, 1024x1024 (thus X=0.2 um/px, Y=0.2 um/px, Z=2 um/matrix).

I seek the means to build an XYZI table, corresponding to the Cartesian XYZ coordinate of each voxel along with the Intensity (0-255 byte) measured at that point.

I can create a matrix window containing a matrix sheet for each file. I can individually convert each sheet to XYZ (where Z corresponds to "I" above). Now I'm stuck. I need Origin to, for lack of better phrasing, combine the entire matrix object into a single table given the unit conversion between X,Y,Z. Possible?

Thank you so much!

P.S. In case you're wondering, my goal is to apply this to multiple color scans and use Principal Component Analysis to discover patterns.
1   L A T E S T    R E P L I E S    (Newest First)
SeanMao Posted - 06/09/2015 : 02:49:47 AM
Hi,

You can run following LabTalk script to create a XYZI table suppose matrix books are naming as "Z0um", "Z2um", "Z4um",... etc:

doc -e M // Loop through all matrix books
{
	matrix -ps X 0 200; // Set X range from 0 to 200
	matrix -ps Y 0 200; // Set Y range from 0 to 200
	@glob=1;
	string strMat$ = page.longname$;
	strMat$ = strMat.Between("Z","um")$; // Get Z Values from MatrixBook Long Name
	int ZHeight = %(strMat$);
	m2w method:=xyz; // Convert Matrix to XYZ
	wks.addcol(ZHeight); // Add Z column
	csetvalue col:=col(ZHeight) formula:="ZHeight"; // Set Value from Numeric Extracted from Matrix Long Name
}

@glob = 1;
string strPWKB$ = page.name$; // Let Current Workbook as Parent Workbook
string strPWKS$ = wks.name$; // Remember Current Worksheet for Appending Other Sheets

doc -e W // Loop through all Workbooks
{
	string strTempWKB$ = page.name$; // Book Short Name of Current Workbook
	if (strTempWKB$ != strPWKB$) // If not Parent Workbook, Start Appending
	{
		wAppend irng:=([%(strPWKB$)]1!, [%(strTempWKB$)]1!) method:=row ow:=[%(strPWKB$)]1!; // Appending
		win -c %(strTempWKB$); // Delete Appended Worksheets
	}
	else
		continue;
}
dataset sps = {4,1};
dataset sodr = {1,1};
wsort nestcols:=sps order:=sodr; // Sort Appened Worksheets by Z (Height)
colmove rng:=col(4) operation:=left; // Move Z column to be 3rd Column
wks.col1.lname$="X";
wks.col2.lname$="Y";
wks.col3.lname$="Z";
wks.col4.lname$="Intensity";
page.longname$= "XYZI Table";
page.title=1; // Naming


Regards!

Sean

OriginLab Tech. Service

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