Problem about get peaks
liu0haha123 opened this issue · 3 comments
Sorry to bother you again . I have some problems about extract peaks from streamline.
I use the MitkFiberDirectionExtracion.sh . And the command is like this MitkFiberDirectionExtraction.sh -i /path/tracts/CC.trk -o /path/992774/CC --mask /path/tracts/CC.nii.gz .
And the message about the streamline and mask is here
CC.trk
Affine:
[[-1.250000 0.000000 0.000000 90.000000]
[0.000000 1.250000 0.000000 -126.000000]
[0.000000 0.000000 1.250000 -72.000000]
[0.000000 0.000000 0.000000 1.000000]]
dimensions: [145 174 145]
voxel_sizes: [1.25 1.25 1.25]
voxel_order: LAS
streamline_count: 45528
point_count: 1226015
data_per_streamline keys: KeysView(<nibabel.streamlines.tractogram.PerArraySequenceDict object at 0x0000026E59897400>)
data_per_point keys: KeysView(<nibabel.streamlines.tractogram.PerArrayDict object at 0x0000026E598973C8>)
<class 'nibabel.nifti1.Nifti1Image'>
<class 'nibabel.nifti1.Nifti1Image'>
data shape (145, 174, 145)
affine:
[[ -1.25 0. 0. 90. ]
[ 0. 1.25 0. -126. ]
[ 0. 0. 1.25 -72. ]
[ 0. 0. 0. 1. ]]
metadata:
<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'
sizeof_hdr : 348
data_type : b''
db_name : b''
extents : 0
session_error : 0
regular : b'r'
dim_info : 0
dim : [ 3 145 174 145 1 1 1 1]
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.25 1.25 1.25 1. 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'FSL5.0'
aux_file : b''
qform_code : mni
sform_code : mni
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 : [ -1.25 0. 0. 90. ]
srow_y : [ 0. 1.25 0. -126. ]
srow_z : [ 0. 0. 1.25 -72. ]
intent_name : b''
magic : b'n+1'
the link of files I use is here:
https://github.com/liu0haha123/utils/blob/master/CC.nii.gz
https://github.com/liu0haha123/utils/blob/master/CC.trk
https://github.com/liu0haha123/utils/blob/master/nodif_brain_mask.nii.gz
But the values of peaks I get are all 0.Which step I do wrong,or what I miss?
Thanks a lot.
Try the following command
MitkFiberDirectionExtraction.sh -i /path/tracts/CC.trk -o /path/992774/CC --mask /path/tracts/CC.nii.gz -a 10 -t 0.1 -d 1 -n 3 -f .nii.gz
Does it work now?
Try the following command
MitkFiberDirectionExtraction.sh -i /path/tracts/CC.trk -o /path/992774/CC --mask /path/tracts/CC.nii.gz -a 10 -t 0.1 -d 1 -n 3 -f .nii.gz
Does it work now?
It still generate nothing.But I notice that the _inv_affine of the streamline is
[[ -0.8 -0. -0. 72. ]
[ 0. 0.8 0. 100.80000305]
[ 0. 0. 0.8 57.59999847]
[ 0. 0. 0. 1. ]]
and the mask image I see in the mitkdiffusion the inverse is this
Inverse:
0.8 0 0
0 -0.8 0
0 0 -0.8
Maybe that is the reason,How can I fix it? Thank you for reply.
You should probably use an older version of the zenodo dataset: v 1.1.0
MITK interprets trk files in the way it is encoded in the dataset v1.1.0.