]> SALOME platform Git repositories - modules/paravis.git/blob - src/Plugins/StaticMesh/plugin/StaticMeshModule/vtkStaticEnSight6Reader.h
Salome HOME
[EDF24911] : StaticMesh option in Ensight Reader + Force Static Mesh Plugin. Synchron...
[modules/paravis.git] / src / Plugins / StaticMesh / plugin / StaticMeshModule / vtkStaticEnSight6Reader.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    vtkStaticEnSight6Reader.h
5
6   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7   All rights reserved.
8   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10      This software is distributed WITHOUT ANY WARRANTY; without even
11      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12      PURPOSE.  See the above copyright notice for more information.
13
14 =========================================================================*/
15 /**
16  * @class   vtkStaticEnSight6Reader
17  * @brief   class to read binary EnSight6 files
18  *
19  * vtkStaticEnSight6Reader is a class to read binary EnSight6 files into vtk.
20  * Because the different parts of the EnSight data can be of various data
21  * types, this reader produces multiple outputs, one per part in the input
22  * file.
23  * All variable information is being stored in field data.  The descriptions
24  * listed in the case file are used as the array names in the field data.
25  * For complex vector variables, the description is appended with _r (for the
26  * array of real values) and _i (for the array if imaginary values).  Complex
27  * scalar variables are stored as a single array with 2 components, real and
28  * imaginary, listed in that order.
29  * @warning
30  * You must manually call Update on this reader and then connect the rest
31  * of the pipeline because (due to the nature of the file format) it is
32  * not possible to know ahead of time how many outputs you will have or
33  * what types they will be.
34  * If UseStaticMesh is true, this reader generates an unstructured grid
35  * with static geometry.
36  */
37
38 #ifndef vtkStaticEnSight6Reader_h
39 #define vtkStaticEnSight6Reader_h
40
41 #include <vtkEnSight6Reader.h>
42 #include <vtkNew.h>
43
44 #include "StaticMeshModuleModule.h"
45
46 class vtkMultiBlockDataSet;
47
48 class STATICMESHMODULE_EXPORT vtkStaticEnSight6Reader : public vtkEnSight6Reader
49 {
50 public:
51   static vtkStaticEnSight6Reader* New();
52   vtkTypeMacro(vtkStaticEnSight6Reader, vtkEnSight6Reader);
53
54   // @{
55   /**
56    * This boolean control whether or not the output
57    * should be considered a static mesh.
58    */
59   vtkGetMacro(UseStaticMesh, bool);
60   vtkSetMacro(UseStaticMesh, bool);
61   vtkBooleanMacro(UseStaticMesh, bool);
62   // @}
63
64 protected:
65   vtkStaticEnSight6Reader() = default;
66   ~vtkStaticEnSight6Reader() override = default;
67
68   /**
69    * see vtkDataSetAlgorithm
70    */
71   int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
72
73 private:
74   vtkStaticEnSight6Reader(const vtkStaticEnSight6Reader&) = delete;
75   void operator=(const vtkStaticEnSight6Reader&) = delete;
76
77   bool UseStaticMesh = false;
78
79   vtkNew<vtkMultiBlockDataSet> Cache;
80   vtkTimeStamp CacheMTime;
81 };
82
83 #endif