]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/kernel/marDicomBase.h
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / kernel / marDicomBase.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
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
8 #
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.
15 #
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
20 #  liability.
21 #
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 # ------------------------------------------------------------------------ */
25
26
27
28 #ifndef __MAR__KERNEL__MARDICOMBASE__HXX__
29 #define __MAR__KERNEL__MARDICOMBASE__HXX__
30
31
32
33 #include <wx/gauge.h>
34
35 #include "marObject.h"
36 #include "volume.hxx"
37
38
39 #include <vector>
40 #include <string>
41 //using namespace std;
42
43
44
45
46
47 class marFilesBase : public marObject{
48 public:
49                                                 marFilesBase(marParameters* p);
50         virtual                         ~marFilesBase();
51         virtual wxString        GetPatientName() {return _T(""); };
52                         kVolume*        getVolume( );
53                         void            SetVolume( kVolume* volume  );
54                         bool            volumeLoaded( );
55                         void            freeVolume( );
56
57         virtual void            loadActualSerie( wxGauge* gauge) {} ;
58         virtual bool            loadImage(int i) {return true; };
59         std::vector < std::string*>  *GetListImages();
60                         void            CleanListImages();
61
62         void                            ResetLstFileNotReaded();
63         std::string                     GetMsgLstFile();
64
65 private:
66         kVolume                                         *_volume;
67
68 protected:
69         std::vector < std::string*>     _lstString;
70         std::vector < char*>            _lstFileNotReaded; 
71
72 };
73
74
75
76 //-------------------------------------------------------------------
77
78 class marRAWFiles : public marFilesBase
79 {
80 public:
81         marRAWFiles(marParameters* p = NULL);
82         ~marRAWFiles();
83         virtual bool    loadImage(int i);
84         virtual void    loadActualSerie(wxGauge* gauge );
85                         void    SetLittreEndianBigEndian(int value);
86                         int             GetLittreEndianBigEndian();
87
88     void reset( );
89     void copyFrom( const marObject& from );
90     bool save( std::ofstream& os );
91     bool load( std::ifstream& is );
92
93
94 private:
95         int _littreEndianBigEndian;
96 protected:
97 };
98
99
100 //-------------------------------------------------------------------
101 class marRAW2Files : public marRAWFiles
102 {
103 public:
104         marRAW2Files(marParameters* p = NULL);
105         ~marRAW2Files();
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);
110
111 private:
112 protected:
113 };
114
115
116 //-------------------------------------------------------------------
117 class marRAW2AsciiFiles : public marRAWFiles
118 {
119 public:
120         marRAW2AsciiFiles(marParameters* p = NULL);
121         ~marRAW2AsciiFiles();
122         virtual bool loadImage(int i);
123         virtual void loadActualSerie(wxGauge* gauge );
124
125 private:
126 protected:
127 };
128
129
130
131
132
133
134 #endif // __MAR__KERNEL__MARDICOMBASE__HXX__
135