Salome HOME
Merge from BR_PORTING_VTK6 01/03/2013
[modules/paravis.git] / src / Plugins / MedReader / IO / vtkMedFieldOnProfile.h
1 // Copyright (C) 2010-2011  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef __vtkMedFieldOnProfile_h_
21 #define __vtkMedFieldOnProfile_h_
22
23 #include "vtkObject.h"
24 #include "vtkMedSetGet.h"
25 #include "vtkMed.h"
26 #include"vtkMedFilter.h"
27
28 class vtkMedFieldOverEntity;
29 class vtkMedString;
30 class vtkDataArray;
31 class vtkMedProfile;
32
33 class VTK_EXPORT vtkMedFieldOnProfile: public vtkObject
34 {
35 public:
36   static vtkMedFieldOnProfile* New();
37   vtkTypeMacro(vtkMedFieldOnProfile, vtkObject);
38   void PrintSelf(ostream& os, vtkIndent indent);
39
40   // Description:
41   // This is the iterator that is used while reading fromt he med file
42   vtkSetMacro(MedIterator, med_int);
43   vtkGetMacro(MedIterator, med_int);
44
45   // Description:
46   // This is the FieldOverEntity this profile is on
47   virtual void  SetParentFieldOverEntity(vtkMedFieldOverEntity*);
48   vtkGetObjectMacro(ParentFieldOverEntity, vtkMedFieldOverEntity);
49
50   // Description:
51   // This is the name of the profile used by this field.
52   vtkGetStringMacro(ProfileName);
53   vtkSetStringMacro(ProfileName);
54
55   // Description:
56   // This is the name of the localization used by this field on this profile.
57   vtkGetStringMacro(LocalizationName);
58   vtkSetStringMacro(LocalizationName);
59
60   // Description:
61   // This stores the size of the profile.
62   vtkSetMacro(ProfileSize, med_int);
63   vtkGetMacro(ProfileSize, med_int);
64
65   // Description:
66   // This stores the number of integration points for this localization.
67   vtkSetMacro(NumberOfIntegrationPoint, med_int);
68   vtkGetMacro(NumberOfIntegrationPoint, med_int);
69
70   // Description:
71   // The number of values of this field on this mesh
72   vtkSetMacro(NumberOfValues, med_int);
73   vtkGetMacro(NumberOfValues, med_int);
74
75   // Description:
76   // the Data that store the values read from file
77   virtual void  SetData(vtkDataArray*);
78   vtkGetObjectMacro(Data, vtkDataArray);
79
80   // Description:
81   // the Profile object associated witht he profile name.
82   virtual void  SetProfile(vtkMedProfile*);
83   vtkGetObjectMacro(Profile, vtkMedProfile);
84
85   // Description:
86   // returns true if the data has been loaded
87   int IsLoaded();
88
89   // Description:
90   // returns true if the profile name is not MED_NO_PROFILE
91   int GetHasProfile();
92
93   // Description:
94   // Load the actual data of this field
95   void  Load(med_storage_mode mode);
96
97   // Description:
98   // Get/Set of the MED Filter for parallel reading.
99   //void  SetFilter(const med_filter& filter){this->Filter = filter;}
100   //med_filter GetFilter(){return this->Filter;}
101   void  SetFilter(vtkMedFilter* filter){this->Filter = filter;}
102   vtkMedFilter* GetFilter(){return this->Filter;}
103 protected:
104   vtkMedFieldOnProfile();
105   virtual ~vtkMedFieldOnProfile();
106
107   med_int MedIterator;
108   vtkMedFieldOverEntity *ParentFieldOverEntity;
109   char* ProfileName;
110   med_int ProfileSize;
111   char* LocalizationName;
112   med_int NumberOfIntegrationPoint;
113   med_int NumberOfValues;
114   vtkDataArray* Data;
115   vtkMedProfile* Profile;
116
117   //med_filter Filter;
118   vtkMedFilter *Filter;
119
120 private:
121   vtkMedFieldOnProfile(const vtkMedFieldOnProfile&); // Not implemented.
122   void operator=(const vtkMedFieldOnProfile&); // Not implemented.
123
124 };
125
126 #endif //__vtkMedFieldOnProfile_h_