21 January 2010

writeNIfTI() is fully compatible with FSLView

With the NIfTI-1 header extensions the world is your oyster.  We decided that one use for such a capability is to keep an audit trail of all operations performed on the image data volume.  This is a key feature in the dcemriS4 package.  There are three main components to a NIfTI-1 header extension: esize, ecode and edata.  At first we arbitrarily set ecode = 1002 and further developed the software.  Turns out, FSLView is quite strict about the numbers used in ecode and it failed to accept our NIfTI-1 header extensions saved from R.  Looking at the file nifti1_io.h, the following ecodes have been defined:



Advice from the FSL team (thanks: Matt Webster and Dave Flitney) was for us to use ecode = 6 (ASCII) since the audit trail is text in XML format.  Now one can produce an example data volume



We now have a file "img_nifti.nii.gz" that is available to us and using a utility in FSL we can investigate the attributes of this file

% $FSLDIR/bin/fslhd img_nifti | grep 'vox_offset'
vox_offset     1168

and reading the file back into R allows us to interrogate the ecode via its S4 slot


8 comments:

  1. I have been only searching for this code, Thanks for the share, this is really very helpful.

    bioinformatics training india

    ReplyDelete
  2. I'm glad you found this helpful, please feel free to contact me if you have any other questions about the software.

    ReplyDelete
  3. I am very much delighted. To everyone reading this,i want to inform the public on how i got cured from stage 2 ovarian cancer by Dr Itua Herbal Medicines. i have been suffering from ovarian cancer, and i have also taken treatment from my doctor but no way out,few weeks back i came on the internet to see if i will be able to get any information as to curing Cancers, on my search i saw various testimony of people who was healed from Uterine Cancers and Brain Tumors by the good doctor, called Dr Itua. without any hesitation, i contacted his email: drituaherbalcenter@gmail.com and i wrote him and and he guided me,i asked him for solutions and he started the remedies for me so i started using the medicine, after the period of three weeks given to me by Dr Itua i was completely cured nomore tumors on my body was found anymore. So dear viewer why living your life in therapist or chemo?contact him now on WhatsApp +2348149277967 he is able to cure the listed diseases:Arthritis,Amyotrophic Lateral Scoliosis,Brain Tumor,Fibromyalgia,Pancreative Cancer,Fluoroquinolone ToxicityBladder cancer,Brain cancer,Hiv,Herpes,Esophageal cancer,Kidney cancer,Gallbladder cancer,Gestational trophoblastic disease,Head and neck cancer,Hodgkin lymphoma,Thyroid Cancer,Uterine cancer,Fibroid,Angiopathy, Ataxia,
    Intestinal cancer,Hpv,Lung cancer,Melanoma,Mesothelioma,Multiple myeloma,Neuroendocrine tumors
    Non-Hodgkin lymphoma,Oral cancer,Ovarian cancer,Sinus cancer,Hepatitis,Skin cancer,Soft tissue sarcoma,Spinal cancer,Stomach cancer,Leukemia,Liver cancer,Vaginal cancer,Vulvar cancer,Alzheimer's disease,Chronic Diarrhea,Copd,Parkinson,Als,Adrenocortical carcinoma  Infectious mononucleosis.
    Testicular cancer,Tach Diseases,Throat cancer,Ocd,
    Syndrome Fibrodysplasia Ossificans ProgresSclerosis,

    ReplyDelete
  4. Really impressed! Everything is very open and very clear clarification of issues. It contains truly facts. Your website is very valuable. Thanks for sharing.

    ReplyDelete
  5. I was suggested this blog by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my difficulty. You are incredible! Thanks!

    ReplyDelete
  6. Whenever I read your articles, I feel as if I am learning something new. As well, I always look forward to reading your posts because I find you so insightful and inspiring.Womens Shearling Jackets

    ReplyDelete
  7. You looking for solution to your marriage or relationship problem? if your answer is " YES " don't hesitate to text Marital solution Doctor he helped me get my ex lover back, Doctor Robbbinson Spells are authentic, My Husband left me for 8 months and I was devastated and couldn't find any way out to get him back. At some point I was depressed, until I came across comments while i was scrolling through the internet where people testified about how Dr Robbinson helped them Solve similar problems i am facing in my marriage. I contacted him and he never hesitated to help me as well,i followed and obeyed all instruction and advice given by Doctor today i am at peace with my husband again, my happiness is restored
    Text/call: +12267705795
    Email: Drrobbinssonspiritualhome@gmail.com
    https://www.facebook.com/profile.php?id=100087189020870

    ReplyDelete
  8. I’d must consult you here. Which is not some thing It’s my job to do! I spend time reading an article that may get people to think. Also, many thanks for permitting me to comment! Mobile Accessories

    ReplyDelete