1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
28 #ifndef __MAR__KERNEL__MARDICOMBASE__HXX__
29 #define __MAR__KERNEL__MARDICOMBASE__HXX__
35 #include "marObject.h"
41 //using namespace std;
47 class marFilesBase : public marObject{
49 marFilesBase(marParameters* p);
50 virtual ~marFilesBase();
51 virtual wxString GetPatientName() {return _T(""); };
52 kVolume* getVolume( );
53 void SetVolume( kVolume* volume );
57 virtual void loadActualSerie( wxGauge* gauge) {} ;
58 virtual bool loadImage(int i) {return true; };
59 std::vector < std::string*> *GetListImages();
60 void CleanListImages();
62 void ResetLstFileNotReaded();
63 std::string GetMsgLstFile();
69 std::vector < std::string*> _lstString;
70 std::vector < char*> _lstFileNotReaded;
76 //-------------------------------------------------------------------
78 class marRAWFiles : public marFilesBase
81 marRAWFiles(marParameters* p = NULL);
83 virtual bool loadImage(int i);
84 virtual void loadActualSerie(wxGauge* gauge );
85 void SetLittreEndianBigEndian(int value);
86 int GetLittreEndianBigEndian();
89 void copyFrom( const marObject& from );
90 bool save( std::ofstream& os );
91 bool load( std::ifstream& is );
95 int _littreEndianBigEndian;
100 //-------------------------------------------------------------------
101 class marRAW2Files : public marRAWFiles
104 marRAW2Files(marParameters* p = NULL);
106 virtual bool loadImage(int i);
107 virtual void loadActualSerie(wxGauge* gauge );
108 virtual void saveVolume( std::string directory, std::string filename, vtkImageData *vtkimagedata,int voi[6], double slope, double intercept);
109 void FlipY(vtkImageData *imagedata);
116 //-------------------------------------------------------------------
117 class marRAW2AsciiFiles : public marRAWFiles
120 marRAW2AsciiFiles(marParameters* p = NULL);
121 ~marRAW2AsciiFiles();
122 virtual bool loadImage(int i);
123 virtual void loadActualSerie(wxGauge* gauge );
134 #endif // __MAR__KERNEL__MARDICOMBASE__HXX__