also -
I'm assisting someone with a dti analysis. the data I have is a martinos centre .hdr .bshort file, acquired at martinos I think, in 2005. I'm having trouble figuring out how to covert this (mainly for use with FSL) I'd like a 4d nifti ultimately (or analyse).
I was thinking of writing code (probably matlab) to read in the data with fread, reslice the matrix, write to nifti.
I'm no expert in nifti headers, certainly not the format below.
by bshort we mean 2 bytes unsigned integer?
could I even use mri_convert to make a 4d nifti from the bshort? or else a 3d nifti I can load simply into matlab and re-arrange?
the header (people's names blanked out, just to be on safe side) of the bshort is below
mainly we simply want
line1: 256 128 2816 1
to become
line1: 256 128 128 22
right?
just getting the data into 3d nifti is fine. 4d a bonus.
obviously the dwi scan parameters need not be in the nifti header, included for completeness
also: to my unexpert eye this looks like a single shot sequence probably, would that be right?
help appreciated
Colin
---
256 128 2816 1 MonkBrain_425mic3Ddti fovx=57.599998 fovy=115.199997 fovz=57.599998 name=xxxxxx id=xxxxx dob= sex=female study name: 34667 macaque brain purpose: xxxxx
Institution=MGH Biospec 47/40 date=21:17:49_10_Sep_2005 Operator=****** Software=PV 3.0.1 Protocol/descr=A*******C/MonkBrain_425mic3Ddti pulse prog=gdDiffSE.ppg SW=29761.9048 Hz acq_rare_factor=1 acq_inter_echo_time=28.000 acq_echo_time=28.000 acq_repetition_time=250 Method is PVM exam=33 series=5 slices=1 coronal, readout=H_F, thickness=57.60 mm separation=57.60 mm offset=0.00 mm TE=28.00 TR=250.00 TI=0.00 NEX=1, acq time 25h1m52s0ms ExcPulse 1.580ms, 3417.7Hz, flip=90.0, 18.4dB, <hermite.exc> RefPulse 1.001ms, 3416.6Hz, flip=180.0, 8.4dB, <hermite.rfc> $GDDIFF_BigDelta=10.400000$GDDIFF_BigDelta=10.400000 $GDDIFF_LittleDelta=6.925000 $GDDIFF_DiffGrad=0.000 0.000 379.787 379.836 379.879 379.690 379.868 379.823 379.730 379.688 379.729 379.716 379.732 379.905 379.867 379.667 379.702 379.809 380.000 379.984 379.734 379.868 $GDDIFF_DiffGradB=0.000 0.000 4004.836 4005.877 4006.782 4002.793 4006.554 4005.596 4003.634 4002.761 4003.606 4003.338 4003.686 4007.327 4006.534 4002.317 4003.058 4005.309 4009.333 4009.005 4003.722 4006.558 $GDDIFF_PathName=/home/a********c $GDDIFF_DiffGradFileName=Jones20B.txt $GDDIFF_DiffGradRead=0.000 0.000 0.979 0.329 -0.396 0.807 0.006 -0.794 0.834 -0.235 0.817 0.009 -0.062 -0.263 -0.413 -0.588 -0.505 -0.773 0.713 0.259 -0.549 -0.396 $GDDIFF_DiffGradPhase=0.000 0.000 0.000 0.922 0.593 -0.502 -0.355 -0.281 -0.313 0.939 0.266 -0.885 -0.795 -0.382 -0.611 0.762 0.084 -0.594 -0.177 -0.094 -0.686 0.618 $GDDIFF_DiffGradSlice=0.000 0.000 0.000 0.000 0.670 -0.231 0.912 0.499 0.405 0.146 0.468 0.418 -0.568 -0.862 0.644 -0.173 -0.834 0.085 -0.647 -0.940 -0.431 -0.648 ImageType=MAGNITUDE_IMAGE
Hi Colin
have you tried mri_convert? We did support bshort as a format (such as it is!), although it hasn't gotten much use for years. Try something like:
mri_convert file.bshort file.nii
cheers Bruce
On Sun, 5 Aug 2012, Colin Reveley wrote:
also - I'm assisting someone with a dti analysis. the data I have is a martinos centre .hdr .bshort file, acquired at martinos I think, in 2005. I'm having trouble figuring out how to covert this (mainly for use with FSL) I'd like a 4d nifti ultimately (or analyse).
I was thinking of writing code (probably matlab) to read in the data with fread, reslice the matrix, write to nifti.
I'm no expert in nifti headers, certainly not the format below.
by bshort we mean 2 bytes unsigned integer?
could I even use mri_convert to make a 4d nifti from the bshort? or else a 3d nifti I can load simply into matlab and re-arrange?
the header (people's names blanked out, just to be on safe side) of the bshort is below
mainly we simply want
line1: 256 128 2816 1
to become
line1: 256 128 128 22
right?
just getting the data into 3d nifti is fine. 4d a bonus.
obviously the dwi scan parameters need not be in the nifti header, included for completeness
also: to my unexpert eye this looks like a single shot sequence probably, would that be right?
help appreciated
Colin
256 128 2816 1 MonkBrain_425mic3Ddti fovx=57.599998 fovy=115.199997 fovz=57.599998 name=xxxxxx id=xxxxx dob= sex=female study name: 34667 macaque brain purpose: xxxxx
Institution=MGH Biospec 47/40 date=21:17:49_10_Sep_2005 Operator=****** Software=PV 3.0.1 Protocol/descr=A*******C/MonkBrain_425mic3Ddti pulse prog=gdDiffSE.ppg SW=29761.9048 Hz acq_rare_factor=1 acq_inter_echo_time=28.000 acq_echo_time=28.000 acq_repetition_time=250 Method is PVM exam=33 series=5 slices=1 coronal, readout=H_F, thickness=57.60 mm separation=57.60 mm offset=0.00 mm TE=28.00 TR=250.00 TI=0.00 NEX=1, acq time 25h1m52s0ms ExcPulse 1.580ms, 3417.7Hz, flip=90.0, 18.4dB, <hermite.exc> RefPulse 1.001ms, 3416.6Hz, flip=180.0, 8.4dB, <hermite.rfc> $GDDIFF_BigDelta=10.400000$GDDIFF_BigDelta=10.400000 $GDDIFF_LittleDelta=6.925000 $GDDIFF_DiffGrad=0.000 0.000 379.787 379.836 379.879 379.690 379.868 379.823 379.730 379.688 379.729 379.716 379.732 379.905 379.867 379.667 379.702 379.809 380.000 379.984 379.734 379.868 $GDDIFF_DiffGradB=0.000 0.000 4004.836 4005.877 4006.782 4002.793 4006.554 4005.596 4003.634 4002.761 4003.606 4003.338 4003.686 4007.327 4006.534 4002.317 4003.058 4005.309 4009.333 4009.005 4003.722 4006.558 $GDDIFF_PathName=/home/a********c $GDDIFF_DiffGradFileName=Jones20B.txt $GDDIFF_DiffGradRead=0.000 0.000 0.979 0.329 -0.396 0.807 0.006 -0.794 0.834 -0.235 0.817 0.009 -0.062 -0.263 -0.413 -0.588 -0.505 -0.773 0.713 0.259 -0.549 -0.396 $GDDIFF_DiffGradPhase=0.000 0.000 0.000 0.922 0.593 -0.502 -0.355 -0.281 -0.313 0.939 0.266 -0.885 -0.795 -0.382 -0.611 0.762 0.084 -0.594 -0.177 -0.094 -0.686 0.618 $GDDIFF_DiffGradSlice=0.000 0.000 0.000 0.000 0.670 -0.231 0.912 0.499 0.405 0.146 0.468 0.418 -0.568 -0.862 0.644 -0.173 -0.834 0.085 -0.647 -0.940 -0.431 -0.648 ImageType=MAGNITUDE_IMAGE
Or try mri_convert file.bhdr file.nii
On 08/06/2012 09:30 AM, Bruce Fischl wrote:
Hi Colin
have you tried mri_convert? We did support bshort as a format (such as it is!), although it hasn't gotten much use for years. Try something like:
mri_convert file.bshort file.nii
cheers Bruce
On Sun, 5 Aug 2012, Colin Reveley wrote:
also - I'm assisting someone with a dti analysis. the data I have is a martinos centre .hdr .bshort file, acquired at martinos I think, in 2005. I'm having trouble figuring out how to covert this (mainly for use with FSL) I'd like a 4d nifti ultimately (or analyse).
I was thinking of writing code (probably matlab) to read in the data with fread, reslice the matrix, write to nifti.
I'm no expert in nifti headers, certainly not the format below.
by bshort we mean 2 bytes unsigned integer?
could I even use mri_convert to make a 4d nifti from the bshort? or else a 3d nifti I can load simply into matlab and re-arrange?
the header (people's names blanked out, just to be on safe side) of the bshort is below
mainly we simply want
line1: 256 128 2816 1
to become
line1: 256 128 128 22
right?
just getting the data into 3d nifti is fine. 4d a bonus.
obviously the dwi scan parameters need not be in the nifti header, included for completeness
also: to my unexpert eye this looks like a single shot sequence probably, would that be right?
help appreciated
Colin
256 128 2816 1 MonkBrain_425mic3Ddti fovx=57.599998 fovy=115.199997 fovz=57.599998 name=xxxxxx id=xxxxx dob= sex=female study name: 34667 macaque brain purpose: xxxxx
Institution=MGH Biospec 47/40 date=21:17:49_10_Sep_2005 Operator=****** Software=PV 3.0.1 Protocol/descr=A*******C/MonkBrain_425mic3Ddti pulse prog=gdDiffSE.ppg SW=29761.9048 Hz acq_rare_factor=1 acq_inter_echo_time=28.000 acq_echo_time=28.000 acq_repetition_time=250 Method is PVM exam=33 series=5 slices=1 coronal, readout=H_F, thickness=57.60 mm separation=57.60 mm offset=0.00 mm TE=28.00 TR=250.00 TI=0.00 NEX=1, acq time 25h1m52s0ms ExcPulse 1.580ms, 3417.7Hz, flip=90.0, 18.4dB, <hermite.exc> RefPulse 1.001ms, 3416.6Hz, flip=180.0, 8.4dB, <hermite.rfc> $GDDIFF_BigDelta=10.400000$GDDIFF_BigDelta=10.400000 $GDDIFF_LittleDelta=6.925000 $GDDIFF_DiffGrad=0.000 0.000 379.787 379.836 379.879 379.690 379.868 379.823 379.730 379.688 379.729 379.716 379.732 379.905 379.867 379.667 379.702 379.809 380.000 379.984 379.734 379.868 $GDDIFF_DiffGradB=0.000 0.000 4004.836 4005.877 4006.782 4002.793 4006.554 4005.596 4003.634 4002.761 4003.606 4003.338 4003.686 4007.327 4006.534 4002.317 4003.058 4005.309 4009.333 4009.005 4003.722 4006.558 $GDDIFF_PathName=/home/a********c $GDDIFF_DiffGradFileName=Jones20B.txt $GDDIFF_DiffGradRead=0.000 0.000 0.979 0.329 -0.396 0.807 0.006 -0.794 0.834 -0.235 0.817 0.009 -0.062 -0.263 -0.413 -0.588 -0.505 -0.773 0.713 0.259 -0.549 -0.396 $GDDIFF_DiffGradPhase=0.000 0.000 0.000 0.922 0.593 -0.502 -0.355 -0.281 -0.313 0.939 0.266 -0.885 -0.795 -0.382 -0.611 0.762 0.084 -0.594 -0.177 -0.094 -0.686 0.618 $GDDIFF_DiffGradSlice=0.000 0.000 0.000 0.000 0.670 -0.231 0.912 0.499 0.405 0.146 0.468 0.418 -0.568 -0.862 0.644 -0.173 -0.834 0.085 -0.647 -0.940 -0.431 -0.648 ImageType=MAGNITUDE_IMAGE
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu