Recent Changes - Search:

Homepage

This is the old Camino website, please visit our new page to download the code and get the latest documentation.









UCL MIG Home

UCL CS Home

UCL Home

edit SideBar

Tutorial: data import to Camino

Tutorials.RawDataTutorial History

Hide minor edits - Show changes to markup

July 06, 2010, at 09:26 PM by cookpa -
Changed lines 20-21 from:

Converting DICOM data

to:

Converting DICOM data

Changed line 25 from:

Limitations on image format support in Camino

to:

Limitations on image format support in Camino

July 06, 2010, at 08:22 PM by cookpa -
Changed lines 3-4 from:

Dealing with image data

to:

DWI data - supported image formats

Changed line 22 from:

Camino doesn't have any support for reading scanner data, so we use dcm2nii, which is part of the mricron package by Chris Rorden. This program will give you a 4D nii file that you can feed to image2voxel. If possible, it will also output the b-values and b-vectors associated with the acquisition. You can convert these to a Camino scheme file with fsl2scheme. Note that the units of the b-values will be those used by the scanner, typically s / mm2. Some Camino programs are sensitive to the choice of units (eg datasynth), so the default options may not work with some scheme files. You can avoid this issue by scaling your b-values into s / m2 using fsl2scheme.

to:

Camino doesn't have any support for reading DICOM data, so we use dcm2nii, which is part of the mricron package by Chris Rorden. This program will give you a 4D nii file that you can feed to image2voxel. If possible, it will also output the b-values and b-vectors associated with the acquisition. You can convert these to a Camino scheme file with fsl2scheme. Note that the units of the b-values will be those used by the scanner, typically s / mm2. Some Camino programs are sensitive to the choice of units (eg datasynth), so the default options may not work with some scheme files. You can avoid this issue by scaling your b-values into s / m2 using fsl2scheme.

July 06, 2010, at 08:21 PM by cookpa -
Changed lines 3-29 from:
to:

Dealing with image data

If you have data in Analyze, MetaIO, or NIfTI format, you can convert it directly to voxel order using image2voxel. This takes care of endianness, ordering, datatypes, and so on. For example, you can do

image2voxel -4dimage ScannerOrder.hdr | dtfit - schemefile

Here, image2voxel has read in the ScannerOrder.hdr image, taken care of the conversion to voxel order, and output voxel-order data in float format, the default expected by dtfit. And we don't need to worry about manually calculating the number of voxels and such.

Sometimes we may have or want 3D volumes instead of one 4D image. For example, we might want to coregister all the DWI volumes to correct for motion. You can split them with split4dnii. You can use a series of 3D images with image2voxel by writing a text file listing the 3D images in order. For example, split a 60-component image :

split4dnii -inputfile image.nii -outputroot 3d_

produces 3d_0001.nii through 3d_0060.nii. To use these images with image2voxel, do something like

ls 3d_* > imagelist.txt; image2voxel -imagelist imagelist.txt

Converting DICOM data

Camino doesn't have any support for reading scanner data, so we use dcm2nii, which is part of the mricron package by Chris Rorden. This program will give you a 4D nii file that you can feed to image2voxel. If possible, it will also output the b-values and b-vectors associated with the acquisition. You can convert these to a Camino scheme file with fsl2scheme. Note that the units of the b-values will be those used by the scanner, typically s / mm2. Some Camino programs are sensitive to the choice of units (eg datasynth), so the default options may not work with some scheme files. You can avoid this issue by scaling your b-values into s / m2 using fsl2scheme.

Limitations on image format support in Camino

Camino will read .nii, .hdr, or .mha files, but it will only read the raw data on its original voxel grid, which is assumed to be RAS, ie the data is packed on disk with x increasing left to right, y posterior to anterior, and z inferior to superior. We don't yet have the ability to apply header transformations or reordering of the data.

Changed lines 32-34 from:

Raw data can be manipulated in various ways. You may wish to change the ordering of data, the endianness, or the data type. If you have image data (eg Analyze, NIfTI), many of these tasks can be done for you, see the section on image2voxel below.

to:

Raw data can be manipulated in various ways. You may need to change the ordering of data, the endianness, or the data type.

Deleted lines 57-83:

Dealing with image data

If you have data in Analyze, MetaIO, or NIfTI format, you can convert it directly to voxel order using image2voxel. This takes care of endianness, ordering, datatypes, and so on. For example, you can do

image2voxel -4dimage ScannerOrder.hdr | dtfit - schemefile

Here, image2voxel has read in the ScannerOrder.hdr image, taken care of the conversion to voxel order, and output voxel-order data in float format, the default expected by dtfit. And we don't need to worry about manually calculating the number of voxels and such.

Sometimes we may have or want 3D volumes instead of one 4D image. For example, we might want to coregister all the DWI volumes to correct for motion. You can split them with split4dnii. You can use a series of 3D images with image2voxel by writing a text file listing the 3D images in order. For example, split a 60-component image :

split4dnii -inputfile image.nii -outputroot 3d_

produces 3d_0001.nii through 3d_0060.nii. To use these images with image2voxel, do something like

ls 3d_* > imagelist.txt; image2voxel -imagelist imagelist.txt

Converting DICOM data

Camino doesn't have any support for reading scanner data, so we use dcm2nii, which is part of the mricron package by Chris Rorden. This program will give you a 4D nii file that you can feed to image2voxel. If possible, it will also output the b-values and b-vectors associated with the acquisition. You can convert these to a Camino scheme file with fsl2scheme. Note that the units of the b-values will be those used by the scanner, typically s / mm2. Some Camino programs are sensitive to the choice of units (eg datasynth), so the default options may not work with some scheme files. You can avoid this issue by scaling your b-values into s / m2 using fsl2scheme.

Limitations on image format support in Camino

Camino will read .nii, .hdr, or .mha files, but it will only read the raw data on its original voxel grid, which is assumed to be RAS, ie the data is packed on disk with x increasing left to right, y posterior to anterior, and z inferior to superior. We don't yet have the ability to apply header transformations or reordering of the data.

July 06, 2010, at 05:35 PM by 165.123.243.168 -
Changed lines 20-22 from:

By default, DWI data is expected to be float - big-endian, 32-bit decimals. Programs such as scanner2voxel and modelfit expect float data by default. If you pass raw DWI data explicitly (eg, giving DWI data to track) it is also assumed to be float.

Processed raw image data is assumed to be double - big-endian, 64-bit decimals. Programs such as fa or dteig expect double data. You can change the input and output data types for most programs with -inputdatatype and -outputdatatype. These flags don't apply to non-image objects, such as fiber tracts. Some programs read images with headers (eg image2voxel), these do not need the -inputdatatype flag.

to:

By default, DWI data is expected to be float - big-endian, 32-bit decimals. Programs such as scanner2voxel and modelfit expect float data by default. If you pass raw DWI data explicitly (eg, giving DWI data to track) it is also assumed to be float.

Processed raw image data is assumed to be double - big-endian, 64-bit decimals. Programs such as fa or dteig expect double data. You can change the input and output data types for most programs with -inputdatatype and -outputdatatype. These flags don't apply to non-image objects, such as fiber tracts. Some programs read images with headers (eg image2voxel), these do not need the -inputdatatype flag.

July 06, 2010, at 05:33 PM by 165.123.243.168 -
Changed line 18 from:

Data type

to:

Data type

July 06, 2010, at 05:19 PM by 165.123.243.168 -
Added line 3:
Added line 8:
Changed lines 11-12 from:

Probably the most common task is to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default. You can change this behaviour with -inputdatatype and -outputdatatype options. For example:

to:

Probably the most common task is to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default (see below). You can change this behaviour with -inputdatatype and -outputdatatype options. For example:

Added lines 17-24:

Data type

By default, DWI data is expected to be float - big-endian, 32-bit decimals. Programs such as scanner2voxel and modelfit expect float data by default. If you pass raw DWI data explicitly (eg, giving DWI data to track) it is also assumed to be float.

Processed raw image data is assumed to be double - big-endian, 64-bit decimals. Programs such as fa or dteig expect double data. You can change the input and output data types for most programs with -inputdatatype and -outputdatatype. These flags don't apply to non-image objects, such as fiber tracts. Some programs read images with headers (eg image2voxel), these do not need the -inputdatatype flag.

Added line 55:
April 27, 2010, at 11:27 PM by cookpa -
Changed line 13 from:

Where -components specifies the number of volumes in the 4D input and -voxels specifies the number of voxels (ie, X×Y×Z, where X, Y, Z are the dimensions of the image).

to:

where -components specifies the number of volumes in the 4D input and -voxels specifies the number of voxels (ie, X×Y×Z, where X, Y, Z are the dimensions of the image).

April 27, 2010, at 11:25 PM by cookpa -
Changed line 13 from:

Where -components specifies the number of volumes in the 4D input and -voxels specifies the number of voxels (ie, X×Y ×Z, where X, Y, Z are the dimensions of the image).

to:

Where -components specifies the number of volumes in the 4D input and -voxels specifies the number of voxels (ie, X×Y×Z, where X, Y, Z are the dimensions of the image).

April 27, 2010, at 11:25 PM by cookpa -
Changed line 13 from:

Where -components specifies the number of volumes in the 4D input and -voxels specifies the number of voxels (ie, X ×Y ×Z, where X, Y, Z are the dimensions of the image).

to:

Where -components specifies the number of volumes in the 4D input and -voxels specifies the number of voxels (ie, X×Y ×Z, where X, Y, Z are the dimensions of the image).

April 27, 2010, at 11:24 PM by cookpa -
Changed line 13 from:

Where -components specifies the number of volumes in the 4D input and -voxels specifies the number of voxels (ie, X&<times>;Y&<times>;Z, where X, Y, Z are the dimensions of the image).

to:

Where -components specifies the number of volumes in the 4D input and -voxels specifies the number of voxels (ie, X ×Y ×Z, where X, Y, Z are the dimensions of the image).

April 27, 2010, at 11:23 PM by cookpa -
Changed line 13 from:

Where -components specifies the number of volumes in the 4D input and -voxels specifies the number of voxels (ie, X&<times>Y&<times>Z, where X, Y, Z are the dimensions of the image).

to:

Where -components specifies the number of volumes in the 4D input and -voxels specifies the number of voxels (ie, X&<times>;Y&<times>;Z, where X, Y, Z are the dimensions of the image).

April 27, 2010, at 11:23 PM by cookpa -
Added lines 12-13:

Where -components specifies the number of volumes in the 4D input and -voxels specifies the number of voxels (ie, X&<times>Y&<times>Z, where X, Y, Z are the dimensions of the image).

April 27, 2010, at 11:18 PM by cookpa -
Changed line 42 from:

Camino doesn't have any support for reading scanner data, so we use dcm2nii, which is part of the mricron package by Chris Rorden. This program will give you a 4D nii file that you can feed to image2voxel. If possible, it will also output the b-values and b-vectors associated with the acquisition. You can convert these to a Camino scheme file with fsl2scheme. Note that the units of the b-values will be those used by the scanner, typically s / mm^2^. Some Camino programs are sensitive to the choice of units (eg datasynth), so the default options may not work with some scheme files. You can avoid this issue by scaling your b-values into s / m^2^ using fsl2scheme.

to:

Camino doesn't have any support for reading scanner data, so we use dcm2nii, which is part of the mricron package by Chris Rorden. This program will give you a 4D nii file that you can feed to image2voxel. If possible, it will also output the b-values and b-vectors associated with the acquisition. You can convert these to a Camino scheme file with fsl2scheme. Note that the units of the b-values will be those used by the scanner, typically s / mm2. Some Camino programs are sensitive to the choice of units (eg datasynth), so the default options may not work with some scheme files. You can avoid this issue by scaling your b-values into s / m2 using fsl2scheme.

April 27, 2010, at 11:17 PM by cookpa -
Changed line 23 from:

Dealing with image data.

to:

Dealing with image data

April 27, 2010, at 10:05 PM by cookpa -
Changed line 9 from:

Probably the most common task is to to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default. You can change this behaviour with -inputdatatype and -outputdatatype options. For example:

to:

Probably the most common task is to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default. You can change this behaviour with -inputdatatype and -outputdatatype options. For example:

April 27, 2010, at 10:05 PM by cookpa -
Changed line 9 from:

Probably the most common task you'll need to do is to to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default. You can change this behaviour with -inputdatatype and -outputdatatype options. For example:

to:

Probably the most common task is to to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default. You can change this behaviour with -inputdatatype and -outputdatatype options. For example:

April 27, 2010, at 10:04 PM by cookpa -
Changed line 51 from:

If you have NIfTI tensor data, you can convert it with @@niftidt2camino:

to:

If you have NIfTI tensor data, you can convert it with niftidt2camino:

April 27, 2010, at 10:04 PM by cookpa -
Changed lines 9-10 from:

Probably the most common task you'll need to do is to to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel? and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default. You can change this behaviour with -inputdatatype and -outputdatatype options. For example:

to:

Probably the most common task you'll need to do is to to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default. You can change this behaviour with -inputdatatype and -outputdatatype options. For example:

Changed line 25 from:

If you have data in Analyze, MetaIO, or NIfTI format, you can convert it directly to voxel order using image2voxel?. This takes care of endianness, ordering, datatypes, and so on. For example, you can do

to:

If you have data in Analyze, MetaIO, or NIfTI format, you can convert it directly to voxel order using image2voxel. This takes care of endianness, ordering, datatypes, and so on. For example, you can do

April 27, 2010, at 10:04 PM by cookpa -
Changed lines 52-55 from:
[@ niftidt2camino -inputfile dt.nii > dt.Bdouble
to:
niftidt2camino -inputfile dt.nii > dt.Bdouble

The NIfTI tensor format contains a bit less information than the Camino format (ie, no exit code or unweighted signal), so these will be blank in the output unless you provide them on the command line. You can convert back to NIfTI format with dt2nii.

April 27, 2010, at 10:01 PM by cookpa -
Changed lines 31-39 from:
to:

Sometimes we may have or want 3D volumes instead of one 4D image. For example, we might want to coregister all the DWI volumes to correct for motion. You can split them with split4dnii. You can use a series of 3D images with image2voxel by writing a text file listing the 3D images in order. For example, split a 60-component image :

split4dnii -inputfile image.nii -outputroot 3d_

produces 3d_0001.nii through 3d_0060.nii. To use these images with image2voxel, do something like

ls 3d_* > imagelist.txt; image2voxel -imagelist imagelist.txt
Changed lines 42-43 from:

Camino doesn't have any support for reading scanner data, so we use dcm2nii, which is part of the mricron package by Chris Rorden. This program will give you a 4D nii file that you can feed to image2voxel. If possible, it will also output the b-values and b-vectors associated with the acquisition.

to:

Camino doesn't have any support for reading scanner data, so we use dcm2nii, which is part of the mricron package by Chris Rorden. This program will give you a 4D nii file that you can feed to image2voxel. If possible, it will also output the b-values and b-vectors associated with the acquisition. You can convert these to a Camino scheme file with fsl2scheme. Note that the units of the b-values will be those used by the scanner, typically s / mm^2^. Some Camino programs are sensitive to the choice of units (eg datasynth), so the default options may not work with some scheme files. You can avoid this issue by scaling your b-values into s / m^2^ using fsl2scheme.

Changed lines 49-52 from:

NIfTI tensor data

to:

NIfTI tensor data

If you have NIfTI tensor data, you can convert it with @@niftidt2camino:

[@ niftidt2camino -inputfile dt.nii > dt.Bdouble
April 27, 2010, at 09:47 PM by cookpa -
Changed line 34 from:

Camino doesn't have any support for reading scanner data, so we use dcm2nii, which is part of the mricron package by Chris Rorden.

to:

Camino doesn't have any support for reading scanner data, so we use dcm2nii, which is part of the mricron package by Chris Rorden. This program will give you a 4D nii file that you can feed to image2voxel. If possible, it will also output the b-values and b-vectors associated with the acquisition.

April 27, 2010, at 09:45 PM by cookpa -
Added line 22:
Deleted line 31:
Added lines 33-34:

Camino doesn't have any support for reading scanner data, so we use dcm2nii, which is part of the mricron package by Chris Rorden.

April 27, 2010, at 09:37 PM by cookpa -
Changed lines 5-6 from:

Raw data can be manipulated in various ways. You may wish to change the ordering of data, the endianness, the data type, or extract a subset of the data set. If you have image data (eg Analyze, NIfTI), many of these tasks can be done for you, see the section on image2voxel below.

to:

Raw data can be manipulated in various ways. You may wish to change the ordering of data, the endianness, or the data type. If you have image data (eg Analyze, NIfTI), many of these tasks can be done for you, see the section on image2voxel below.

Added lines 24-31:

If you have data in Analyze, MetaIO, or NIfTI format, you can convert it directly to voxel order using image2voxel?. This takes care of endianness, ordering, datatypes, and so on. For example, you can do

image2voxel -4dimage ScannerOrder.hdr | dtfit - schemefile

Here, image2voxel has read in the ScannerOrder.hdr image, taken care of the conversion to voxel order, and output voxel-order data in float format, the default expected by dtfit. And we don't need to worry about manually calculating the number of voxels and such.

Changed lines 34-36 from:

NIfTI support in Camino

NIfTI raw data

to:

Limitations on image format support in Camino

Camino will read .nii, .hdr, or .mha files, but it will only read the raw data on its original voxel grid, which is assumed to be RAS, ie the data is packed on disk with x increasing left to right, y posterior to anterior, and z inferior to superior. We don't yet have the ability to apply header transformations or reordering of the data.

April 27, 2010, at 09:29 PM by cookpa -
Changed lines 15-16 from:

Following Java convention, Camino writes raw data in big-endian format. Camino will never write little-endian data except when writing images with headers that indicate endianness (eg, when writing an Analyze header). When reading data, Camino assumes big-endian input unless told otherwise by an image header. Therefore if the file ScannerOrder.img is little-endian, we need to reverse the endianness. Note that although ScannerOrder.img is part of an Analyze image pair, when we use it in the context above, it is just a binary file like any other. Therefore we use shredder:

to:

Following Java convention, Camino writes raw data in big-endian format. Camino will never write little-endian data except when writing images with headers that indicate endianness (eg, when writing an Analyze header). When reading data, Camino assumes big-endian input unless told otherwise by an image header. Therefore if the file ScannerOrder.img is little-endian, we need to reverse the endianness. Note that although ScannerOrder.img is part of an Analyze image pair, when we use it in the context above, it is just a binary file like any other. Therefore we use shredder:

Added line 20:

The shredder command reads periodic chunks of data from binary files. With a negative read size, the endianness is reversed in the output. Note that we don't use any data type commands with shredder because it only deals in bytes. You read them, optionally reverse the order, then output. The short datatype is implicit in the chunk size (2 bytes). If we were reading floats, the chunksize would be 4. In general, you can reverse byte order in a file by doing shredder 0 -size 0, where size is 2 for short, 4 for int or float, 8 for long or double.

April 27, 2010, at 09:23 PM by cookpa -
Changed lines 9-19 from:

Probably the most common task you'll need to do is to to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel? and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default. You can change this behaviour with -inputdatatype and -outputdatatype.

to:

Probably the most common task you'll need to do is to to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel? and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default. You can change this behaviour with -inputdatatype and -outputdatatype options. For example:

scanner2voxel -voxels 983040 -components 60 -inputfile ScannerOrder.img -inputdatatype short > VoxelOrder.Bfloat

Endianness

Following Java convention, Camino writes raw data in big-endian format. Camino will never write little-endian data except when writing images with headers that indicate endianness (eg, when writing an Analyze header). When reading data, Camino assumes big-endian input unless told otherwise by an image header. Therefore if the file ScannerOrder.img is little-endian, we need to reverse the endianness. Note that although ScannerOrder.img is part of an Analyze image pair, when we use it in the context above, it is just a binary file like any other. Therefore we use shredder:

cat ScannerOrder.img | shredder 0 -2 0 | scanner2voxel -voxels 983040 -components 60 \\
            -inputdatatype short > VoxelOrder.Bfloat
April 27, 2010, at 09:13 PM by cookpa -
Changed line 9 from:

Probably the most common task you'll need to do is to to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default. You can change this behaviour with -inputdatatype and -outputdatatype.

to:

Probably the most common task you'll need to do is to to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel? and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default. You can change this behaviour with -inputdatatype and -outputdatatype.

April 27, 2010, at 09:12 PM by cookpa -
Changed lines 5-6 from:

Raw data can be manipulated in various ways. You may wish to change the ordering of data, the endianness, the data type, or extract a subset of the data set.

to:

Raw data can be manipulated in various ways. You may wish to change the ordering of data, the endianness, the data type, or extract a subset of the data set. If you have image data (eg Analyze, NIfTI), many of these tasks can be done for you, see the section on image2voxel below.

Changed lines 9-11 from:

Probably the most common task you'll need to do is to to re-order data from image to voxel order. In image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order.

Image2voxel

to:

Probably the most common task you'll need to do is to to re-order data from image to voxel order. In scanner order or image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order. You can get into and out of scanner order with the scanner2voxel and voxel2scanner commands. Since these commands expect to deal with mostly raw data, they read and write floats by default. You can change this behaviour with -inputdatatype and -outputdatatype.

Dealing with image data.

April 27, 2010, at 09:04 PM by cookpa -
Changed lines 7-13 from:

DICOM data

to:

Ordering data

Probably the most common task you'll need to do is to to re-order data from image to voxel order. In image order, multi-component images are stored as consecutive volumes. This is convenient for visualization, since you can easily render a particular 3D volume. It is inconvenient for parallel processing, as you must read the entire 4D image in order to get the components for a particular processing. Data in voxel order stores all components for a particular voxel together. Thus you can read the image one voxel at a time, or skip ahead to particular voxel, without reading the entire image into memory. Camino does most of its I/O in voxel order.

Image2voxel

Converting DICOM data

April 27, 2010, at 08:32 PM by cookpa -
April 27, 2010, at 06:06 PM by cookpa -
April 27, 2010, at 06:06 PM by cookpa -
April 27, 2010, at 06:06 PM by cookpa -
April 27, 2010, at 06:06 PM by cookpa -
Added lines 4-5:

Raw data can be manipulated in various ways. You may wish to change the ordering of data, the endianness, the data type, or extract a subset of the data set.

April 27, 2010, at 05:42 PM by cookpa -
Changed lines 3-11 from:

Coming soon

to:

Dealing with raw data

DICOM data

NIfTI support in Camino

NIfTI raw data

NIfTI tensor data

April 27, 2010, at 04:25 PM by cookpa -
Added lines 1-3:

(:title Tutorial: data import to Camino:)

Coming soon

Edit - History - Print - Recent Changes - Search
Page last modified on July 06, 2010, at 09:26 PM