open-discussion > Error while opening MRIcron drawn lesion files in Tracvis as an ROI
Showing 1-1 of 1 posts
Display:
Results per page:
Aug 24, 2020  09:08 AM | PRABHAKAR AT - Christian Medical College and Hospital
Error while opening MRIcron drawn lesion files in Tracvis as an ROI
We have been working on lesion based studies where we now wish to do structural connectivity analysis using Trackvis and BCBtoolkit. 
We have data sets of 70 - 80 patients with manually drawn lesions using MRIcron. The main problem we discovered was that while we tried using Trackvis, we found that our lesion files could be be loaded as ROI in trackvis.

Though both the image types were NIFTI1, we realised that in MRIcron the data gets saved as data-type - uInt 8 and the form that Trackvis is able to read is data_type float32. Though we wrote python codes to change the data type , we still found that the lesions were not being read.
Another difference in the two file types was that the image affine and dim was different for both the files.
We tried changing the affine and the header info- despite this we were unable to solve the problem.
 we were wondering if there a method for converting the MRIcron drawn lesions files to ROIs that can be opened  in  trackvis 

The  header information of both types of the lesion files below.


Header information from a lesion file drawn manually on Trackvis 
sizeof_hdr : 348
data_type : b''
db_name : b''
extents : 0
session_error : 0
regular : b'r'
dim_info : 0
dim : [ 3 182 218 182 1 0 0 0]
intent_p1 : 0.0
intent_p2 : 0.0
intent_p3 : 0.0
intent_code : none
datatype : float32
bitpix : 32
slice_start : 0
pixdim : [-1. 1. 1. 1. 0. 0. 0. 0.]
vox_offset : 0.0
scl_slope : nan
scl_inter : nan
slice_end : 0
slice_code : unknown
xyzt_units : 10
cal_max : 0.0
cal_min : 0.0
slice_duration : 0.0
toffset : 0.0
glmax : 0
glmin : 0
descrip : b''
aux_file : b''
qform_code : scanner
sform_code : unknown
quatern_b : 0.0
quatern_c : 1.0
quatern_d : 0.0
qoffset_x : 90.0
qoffset_y : -126.0
qoffset_z : -72.0
srow_x : [0. 0. 0. 0.]
srow_y : [0. 0. 0. 0.]
srow_z : [0. 0. 0. 0.]
intent_name : b''
magic : b'n+1'

Details of the image affine
[[ -1. 0. 0. 90.]
[ 0. 1. 0. -126.]
[ 0. 0. 1. -72.]
[ 0. 0. 0. 1.]]

Header information from a lesion file drawn manually on MRIcron
sizeof_hdr : 348
data_type : b'dsr '
db_name : b'/home/john/data/n'
extents : 0
session_error : 0
regular : b'r'
dim_info : 0
dim : [ 3 181 217 181 1 1 1 1]
intent_p1 : 0.0
intent_p2 : 0.0
intent_p3 : 0.0
intent_code : none
datatype : uint8
bitpix : 8
slice_start : 0
pixdim : [1. 1. 1. 1. 0. 0. 0. 0.]
vox_offset : 0.0
scl_slope : nan
scl_inter : nan
slice_end : 0
slice_code : unknown
xyzt_units : 0
cal_max : 0.0
cal_min : 0.0
slice_duration : 0.0
toffset : 0.0
glmax : 255
glmin : 0
descrip : b'spm - algebra'
aux_file : b'none '
qform_code : unknown
sform_code : mni
quatern_b : 1.0
quatern_c : 0.0
quatern_d : 0.0
qoffset_x : 0.0
qoffset_y : 0.0
qoffset_z : 0.0
srow_x : [ 1. 0. 0. -90.]
srow_y : [ 0. 1. 0. -125.]
srow_z : [ 0. 0. 1. -71.]
intent_name : b''
magic : b'n+1'

Details of the Image Affine
[[ 1. 0. 0. -90.]
[ 0. 1. 0. -125.]
[ 0. 0. 1. -71.]
[ 0. 0. 0. 1.]]