[Camino-users] Bfloat Format
Philip A Cook
cookpa at mail.med.upenn.edu
Mon Apr 28 10:26:40 PDT 2014
Hi,
The streamlines output from track aren't images, they are a list of points in the format documented here
http://cmic.cs.ucl.ac.uk/camino//index.php?n=Main.Fileformats
Each streamline consists of 3 * N + 2 floats, where N is the number of points. So you'd read them with something like
while (! eof) {
N = (int)readFloat()
seedIndex = (int)readFloat()
points = float[N][3]
for (i = 1:N) {
for (c = 1:3) {
points[i][c] = readFloat()
}
}
}
Alternatively, you can convert them into a VTK polydata file with vtkstreamlines, then use any code that reads VTK into Matlab.
See also conmat, cbsmat, tractstats, for postprocessing options that might do what you want without processing the lines themselves in Matlab.
On Apr 28, 2014, at 11:50 AM, "Ferizi, Uran" <uran.ferizi.10 at ucl.ac.uk> wrote:
> Hello Jan.
>
> Below is a Matlab way of reading Bfloat images.
> (I also carbon-copied the correct address for the Camino forum.)
>
> Uran
>
> % e.g. the image consisted of 48 shells of 9 brain slices
> % with image size 64x64.
> fid=fopen('file.Bfloat', 'r', 'b');
> temp = fread(fid, 'float');
> fclose(fid);
> file = reshape(temp1, 48,64,64,9);
>
>
>
>
>
>
>
> From: jan-ruediger.schuere <jan-ruediger.schuere at tu-ilmenau.de>
> Sent: 28 April 2014 4:38 PM
> To: camino
> Subject: Bfloat Format
>
> Dear Camino Supporter-Team
>
> I was doing fibertracking with the software camino.
> As a result i got a file with the format-ending --> .bfloat
>
> Is there any way to convert this .blfloat file into matlab?
>
>
> Thanks and greetings
> Jan
>
>
> _______________________________________________
> Camino-users mailing list
> Camino-users at www.nitrc.org
> http://www.nitrc.org/mailman/listinfo/camino-users
More information about the Camino-users
mailing list