|
Tutorial: data import to CaminoDWI data - supported image formatsIf you have data in Analyze, MetaIO, or NIfTI format, you can convert it directly to voxel order using image2voxel -4dimage ScannerOrder.hdr | dtfit - schemefile
Here, 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 -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 dataCamino 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 Limitations on image format support in CaminoCamino 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. Dealing with raw dataRaw data can be manipulated in various ways. You may need to change the ordering of data, the endianness, or the data type. Ordering dataProbably 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 -voxels 983040 -components 60 -inputfile ScannerOrder.img -inputdatatype short > VoxelOrder.Bfloat
where Data typeBy default, DWI data is expected to be Processed raw image data is assumed to be EndiannessFollowing 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 cat ScannerOrder.img | shredder 0 -2 0 | scanner2voxel -voxels 983040 -components 60 \\ -inputdatatype short > VoxelOrder.Bfloat The NIfTI tensor dataIf you have NIfTI tensor data, you can convert it with 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 |