1 // Copyright (C) 2010-2013 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __vtkMedFieldOnProfile_h_
21 #define __vtkMedFieldOnProfile_h_
23 #include "vtkObject.h"
24 #include "vtkMedSetGet.h"
26 #include"vtkMedFilter.h"
28 class vtkMedFieldOverEntity;
33 class VTK_EXPORT vtkMedFieldOnProfile: public vtkObject
36 static vtkMedFieldOnProfile* New();
37 vtkTypeMacro(vtkMedFieldOnProfile, vtkObject);
38 void PrintSelf(ostream& os, vtkIndent indent);
41 // This is the iterator that is used while reading fromt he med file
42 vtkSetMacro(MedIterator, med_int);
43 vtkGetMacro(MedIterator, med_int);
46 // This is the FieldOverEntity this profile is on
47 virtual void SetParentFieldOverEntity(vtkMedFieldOverEntity*);
48 vtkGetObjectMacro(ParentFieldOverEntity, vtkMedFieldOverEntity);
51 // This is the name of the profile used by this field.
52 vtkGetStringMacro(ProfileName);
53 vtkSetStringMacro(ProfileName);
56 // This is the name of the localization used by this field on this profile.
57 vtkGetStringMacro(LocalizationName);
58 vtkSetStringMacro(LocalizationName);
61 // This stores the size of the profile.
62 vtkSetMacro(ProfileSize, med_int);
63 vtkGetMacro(ProfileSize, med_int);
66 // This stores the number of integration points for this localization.
67 vtkSetMacro(NumberOfIntegrationPoint, med_int);
68 vtkGetMacro(NumberOfIntegrationPoint, med_int);
71 // The number of values of this field on this mesh
72 vtkSetMacro(NumberOfValues, med_int);
73 vtkGetMacro(NumberOfValues, med_int);
76 // the Data that store the values read from file
77 virtual void SetData(vtkDataArray*);
78 vtkGetObjectMacro(Data, vtkDataArray);
81 // the Profile object associated witht he profile name.
82 virtual void SetProfile(vtkMedProfile*);
83 vtkGetObjectMacro(Profile, vtkMedProfile);
86 // returns true if the data has been loaded
90 // returns true if the profile name is not MED_NO_PROFILE
94 // Load the actual data of this field
95 void Load(med_storage_mode mode);
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;}
104 vtkMedFieldOnProfile();
105 virtual ~vtkMedFieldOnProfile();
108 vtkMedFieldOverEntity *ParentFieldOverEntity;
111 char* LocalizationName;
112 med_int NumberOfIntegrationPoint;
113 med_int NumberOfValues;
115 vtkMedProfile* Profile;
118 vtkMedFilter *Filter;
121 vtkMedFieldOnProfile(const vtkMedFieldOnProfile&); // Not implemented.
122 void operator=(const vtkMedFieldOnProfile&); // Not implemented.
126 #endif //__vtkMedFieldOnProfile_h_