[Mristudio-users] Fiber Data Reading

David Prakash davidprakash at gmail.com
Thu Mar 10 03:14:25 EST 2011


Dear all

I am trying to read the fiber data file using my own java code.
In the header I am able to get the sFiberFileTag as "FiberDat".

Assuming fiber is stored as follows after the 128 bytes header:
int nFiberLength; // fiber length
unsigned char cReserved;
RGB_TRIPLE rgbFiberColor; // R-G-B, 3 bytes totally
int nSelectFiberStartPoint;
int nSelectFiberEndPoint;
XYZ_TRIPLE xyzFiberCoordinate[nFiberLength]; //x-y-z

Can I say that there are nFiberNr fibers?
For the first fiber data, I tried to read XYZ_TRIPLE data nFiberLength times
but some how get EOF exception half way.

I got a value of 704643132 for nFiberNr.
These are the values for the first fiber:

nFiberLength: 922746880
cReserved: 1
RGB_TRIPLE.r: 221
RGB_TRIPLE.g: 138
RGB_TRIPLE.b: 9
nSelectFiberStartPoint: 0
nSelectFiberEndPoint: 922746880

I got the EOF while reading the 721879 th XYZ_TRIPLE data. Should
there be 922746880 XYZ_TRIPLE data in the first fiber?

Please advice.
--
Regards,
David


More information about the mristudio-users mailing list