[Brains-users] Re:

Eugene Zeien eugene-zeien at uiowa.edu
Thu Nov 17 08:17:55 PST 2005


Hmm.  Brains2 should be able to read the DICOM images.
However, brains2 will fail to read those if there are multiple
sequences in the same directory.


I have used medcon to process DICOM images before,
(read the medcon man page to determine which axes flips you need)

    medcon -c anlz -spm -fv -qc --files ${petid}_Oblique_[0-9]*

Which generates a separate .img and .hdr for each slice.
To combine those into a single analyze image,

    cat `ls -1r m*Oblique*.img` > ${petid}_Oblique.img
Keep one .hdr.  Any of the header files will suffice,
    cp `ls -1 m*Oblique*.hdr | head -1` ${petid}_Oblique.hdr

Then, we have to edit some of the .hdr internal values,
since all the .hdr files think there's only 1 slice.
Change the  128\n128  to match the slice dimensions of your
images.  Commonly, this is  256\n256  or 512\n512.  Finally,
replace  $#obl  with the correct number of slices for your image set.

    printf "INT\n${petid}_Oblique\n4\n128\n128\n$#obl\n1\n\n\n\n\n\n\n\n0\nY\n\n" |\
    /usr/local/brains2/bin/AnalyzeHeaderEditor ${petid}_Oblique.hdr >& /dev/null

No guarantee this will work for you, but I still use this sequence of actions
to convert some of our DICOM images to Analyze format with medcon.

Olof Lindberg wrote:
> Dear mr Zeien,
>   thanks again for the help in my effort trying to start Brains2.
>   I become a bit confused. I looked at the different suggetions you gave me and as far as I can tell I have a  working program here. I made another effort converting an image to dicom  - and suddenly I could at least open the image. I still get a problem messages and I am not able to do much with the image since the program do not seem to completely accept it. However I have done som checking - If I write strict analyze at cygwin prompt I can see that the program recognize the command since I get a lot of different options.
>    
>   The question is if I do something wrong when I convert to analyze. I use medcon: medcon -c anlz -f stack3d filename.
>   Is something else requiered by brains?
>    
>   yours sincerely
>   Olof Lindberg
> 




More information about the Brains-users mailing list