[Gate-users] Moby phantom interfile reading problem in GATE
Der Sarkissian Henri, Haroutune
Henri.Der-Sarkissian at eleves.ec-nantes.fr
Thu Jun 23 23:35:51 CEST 2011
Hello Rameshwar,
your problem comes from the "end of line" character which is different
on Linux, Mac and Windows. Basically, Linux uses the "\n" code as end
of line, while Mac used \r and Windows \r\n.
All you need is to use a program like TextWrangler on MacOS, and
convert your header file end of line to \n, then it should work
properly. On Linux, you can use the command sed.
Cheers,
Henri Der Sarkissian
RAMESHwar <rjhaji at gmail.com> a écrit :
> Hello All
> I am trying to read Moby attenuation file as interfile. This I have
> converted as unsigned integer using Matlab.I am able to open this image into
> AMIDE or ImageJ as interfile.
> But when I am reading as voxelised phantom in GATE it is giving error as :
>
> PreInit> /gate/moby_mouse/interfileReader/readFile moby_atn16bit.h33
> /gate/moby_mouse/interfileReader/readFile moby_atn16bit.h33
> 'nrecognised type name 'unsigned integer
> Header read from 'moby_atn16bit.h33'
> 'Data file name
> '/usr/local/gate/gate_v5.0.0/gate_v5.0.0/moby_atn16bit.i33
> Nb of planes: 250
> Nb of pixels per plane: 128 128
> Pixel size: 1.000e+00 1.000e+00
> Slice thickness: 1.000e+00
> Matrix size: 1.280e+02 1.280e+02
> Data type: UNSIGNED INTEGER
>
> '!ror: Could not open header file 'moby_atn16bit.i33
>
>
> MY HEADER is as follows:
> ===========================================
> !INTERFILE :=
> !imaging modality := nucmed
> !originating system := (X)MedCon
> !version of keys := 3.3
> date of keys := 1996:09:24
> conversion program := (X)MedCon
> program author := Erik Nolf
> program version := 0.10.7
> program date := 2010:09:15
> ;
> !GENERAL DATA :=
> original institution := NucMed
> !data offset in bytes := 0
> !name of data file := moby_atn16bit.i33
> patient name := Unknown
> !patient ID := Unknown
> patient dob := 0000:00:00
> patient sex := Unknown
> !study ID := Unknown
> exam type := Unknown
> data compression := none
> data encode := none
> organ := Unknown
> isotope := Unknown
> dose := 0
> NUD/Patient Weight [kg] := 0.00
> NUD/imaging modality := PT
> NUD/activity := 0
> NUD/activity start time := 00:00:00
> NUD/isotope half life [hours] := 0.000000
> ;
> !GENERAL IMAGE DATA :=
> !type of data := Tomographic
> !total number of images := 250
> study date := 0000:00:00
> study time := 00:00:00
> imagedata byte order := LITTLEENDIAN
> process label := Unknown
> ;
> number of energy windows := 1
> ;
> energy window [1] :=
> energy window lower level [1] :=
> energy window upper level [1] :=
> flood corrected := N
> decay corrected := N
> ;
> !SPECT STUDY (general) :=
> number of detector heads := 1
> ;
> !number of images/energy window := 250
> !process status := Reconstructed
> !matrix size [1] := 128
> !matrix size [2] := 128
> !number format := unsigned integer
> !number of bytes per pixel := 2
> scaling factor (mm/pixel) [1] := +1.000000e+000
> scaling factor (mm/pixel) [2] := +1.000000e+000
> !number of projections := 250
> !extent of rotation :=
> !time per projection (sec) := 0
> study duration (sec) := 0
> !maximum pixel count := +4.000000e+000
> patient orientation := head_in
> patient rotation := supine
> ;
> !SPECT STUDY (reconstructed data) :=
> method of reconstruction := Unknown
> !number of slices := 250
> number of reference frame := 0
> slice orientation := Transverse
> slice thickness (pixels) := +1.000000e+000
> centre-centre slice separation (pixels) := +1.000000e+000
> filter name := Unknown
> filter parameters := Cutoff
> method of attenuation correction := measured
> scatter corrected := N
> oblique reconstruction := N
> !END OF INTERFILE :=
> =======================================================
> my phantom mac is :
>
> /gate/world/daughters/name moby_mouse
> /gate/world/daughters/insert regularMatrix
> /gate/moby_mouse/geometry/insertReader interfile
> /gate/moby_mouse/interfileReader/insertTranslator range
> /gate/moby_mouse/interfileReader/rangeTranslator/readTable range.dat
> /gate/moby_mouse/interfileReader/rangeTranslator/describe 1
> /gate/moby_mouse/interfileReader/readFile moby_atn16bit.h33
> /gate/moby_mouse/placement/setTranslation 0. 0. 0. mm
> /gate/moby_mouse/attachVoxelPhantomSD
>
> Any comment will be highly appreciated.
> Thanks and regards
> Ramesh
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>
More information about the Gate-users
mailing list