# --------------------------------------------------------------------- # # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image # pour la Santé) # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton # Previous Authors : Laurent Guigues, Jean-Pierre Roux # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil # # This software is governed by the CeCILL-B license under French law and # abiding by the rules of distribution of free software. You can use, # modify and/ or redistribute the software under the terms of the CeCILL-B # license as circulated by CEA, CNRS and INRIA at the following URL # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html # or in the file LICENSE.txt. # # As a counterpart to the access to the source code and rights to copy, # modify and redistribute granted by the license, users are provided only # with a limited warranty and the software's author, the holder of the # economic rights, and the successive licensors have only limited # liability. # # The fact that you are presently reading this means that you have had # knowledge of the CeCILL-B license and that you accept its terms. # ------------------------------------------------------------------------ creaBruker (c) CREATIS 2012 a Bruker exam has the following 3 levels structure : ======================================================================== * subject * AdjStatePerStudy * 1 * acqp * AdjStatePerScan * fid * imnd / method * pulseprogram * spnam0 * spnam1 * pdata * 1 // only 'native' images * 2dseq * d3proc * meta * procs * reco <-- * roi * CreatisComputedCartoFile * 2 // post processed images (if any) * 2dseq * d3proc * isa <-- * meta * procs * roi ... * roi * 3 // post processed images (if any) * 2dseq * d3proc * isa <-- * meta * procs * roi * ... * 2 * acqp * fid * ... * pdata * 3 * ... ======================================================================== To tell the truth, a lot of changes are found at every new version. We only can hope the mandatory (for us) files keep the same name, with the same informations inside. Or we shall have to find out the version number, and swich - case all the methods (see NRRD format...) ======================================================================== AdjStatePerStudy subject 1 acqp method pdata 1 2dseq d3proc id meta reco roi visu_pars pulseprogram spnam0 uxnmr.par 2 acqp method pdata 1 2dseq d3proc id meta reco roi visu_pars pulseprogram spnam0 uxnmr.par 3 ... ======================================================================== Dicom convertion *demands* the following files : subject; acqp; method; d3proc; isa; reco; ======================================================================== This project contains : appli :testBruker2Dicom: ------------------------ - explores the given directory (holding a FULL Bruker exam), at the 3 levels, - fills an equivalent Directory with the MHD files and/or the DICOM files usage: testBruker2Dicom --dirin=rootDirectoryName --dirout=outputDirectoryName [-D] [-M] [{-b|-l}] b:BigEndian,l:LittleEndian default : l [--debug] [--verbose] [--listonly] [--usage] D : user wants to export as DICOM M : user wants to export as MHD debug : developper wants to run the program in 'debug mode' REMARK : If you were supplied an *incomplete* Bruker exam (e.g. only the '2' serie) put it a 'root' directory, and run this test using this 'root' directory as 'dirin' lib : ---- NO inheritance ! class Bruker2Dicom: starts from a 'root' directory, iterates on each 'serie', at the 3 levels fills an equivalent Directory with the DICOM files. class BrukerDataSet: corresponds to a 'parameter file', at any level. LoadFile(std::string fileName); GetFieldData(std::string fieldName); class BrukerFieldData : according to what users *knows* about the element, he will use: std::string &GetDataType(); int GetDimensionNumber() int GetNumberOfElements() std::vector &GetStringValue() std::vector &GetIntValue () std::vector &GetDoubleValue() class BrukerObjectVaryingProperties : class BrukerKspaceObject : class BrukerImage class BrukerSizeException: class BrukerInitException class BrukerHopelessException