14 #ifndef vtkPVDataInformation_h 15 #define vtkPVDataInformation_h 20 #include "vtkRemotingCoreModule.h" 29 class vtkDataAssembly;
37 class vtkPVDataInformationHelper;
56 vtkSetMacro(PortNumber,
int);
57 vtkGetMacro(PortNumber,
int);
66 vtkSetMacro(InspectCells,
bool);
73 vtkSetClampMacro(Rank,
int, -1, VTK_INT_MAX);
74 vtkGetMacro(Rank,
int);
83 vtkGetStringMacro(SubsetSelector);
84 vtkSetStringMacro(SubsetSelector);
93 vtkSetStringMacro(SubsetAssemblyName);
94 vtkGetStringMacro(SubsetAssemblyName);
95 void SetSubsetAssemblyNameToHierarchy();
144 vtkGetMacro(DataSetType,
int);
150 vtkGetMacro(CompositeDataSetType,
int);
160 bool IsNull()
const {
return this->DataSetType == -1 && this->CompositeDataSetType == -1; }
173 return static_cast<unsigned int>(this->UniqueBlockTypes.size());
175 int GetUniqueBlockType(
unsigned int index)
const;
185 static const char* GetDataSetTypeAsString(
int type);
192 return this->DataSetType != -1 ? this->GetDataSetTypeAsString() :
nullptr;
196 return this->CompositeDataSetType != -1
206 const char* GetPrettyDataTypeString()
const;
207 static const char* GetPrettyDataTypeString(
int dtype);
222 bool DataSetTypeIsA(
const char* classname)
const;
223 bool DataSetTypeIsA(
int typeId)
const;
233 bool HasDataSetType(
const char* classname)
const;
234 bool HasDataSetType(
int typeId)
const;
244 vtkTypeInt64 GetNumberOfElements(
int elementType)
const;
258 vtkTypeInt64
GetNumberOfSides()
const {
return this->GetNumberOfElements(vtkDataObject::SIDE); }
266 vtkGetMacro(NumberOfTrees, vtkTypeInt64);
267 vtkGetMacro(NumberOfLeaves, vtkTypeInt64);
274 vtkGetMacro(NumberOfAMRLevels, vtkTypeInt64);
280 vtkTypeInt64 GetNumberOfAMRDataSets(vtkTypeInt64
level)
const;
294 vtkGetMacro(NumberOfDataSets, vtkTypeInt64);
302 vtkGetMacro(MemorySize, vtkTypeInt64);
309 vtkGetVector6Macro(Bounds,
double);
317 vtkGetVector6Macro(Extent,
int);
331 int GetNumberOfAttributeTypes()
const;
332 std::vector<int> GetAttributeTypes()
const;
333 std::vector<std::string> GetAttributeNames()
const;
334 std::string GetAttributeName(
int attributeType)
const;
365 return this->GetAttributeInformation(vtkDataObject::SIDE);
385 vtkGetMacro(HasTime,
bool);
386 vtkGetMacro(Time,
double);
395 vtkGetVector2Macro(TimeRange,
double);
396 vtkGetMacro(TimeLabel, std::string);
397 const std::set<double>&
GetTimeSteps()
const {
return this->TimeSteps; }
400 return static_cast<unsigned int>(this->TimeSteps.size());
408 bool IsDataStructured()
const;
414 bool HasStructuredData()
const;
420 bool HasUnstructuredData()
const;
427 bool IsAttributeValid(
int attributeType)
const;
432 static int GetExtentType(
int dataType);
442 vtkDataAssembly* GetHierarchy()
const;
443 vtkDataAssembly* GetDataAssembly()
const;
444 vtkDataAssembly* GetDataAssembly(
const char* assemblyName)
const;
453 vtkGetMacro(FirstLeafCompositeIndex, vtkTypeUInt64);
468 std::string GetBlockName(vtkTypeUInt64 cid)
const;
473 std::vector<std::string> GetBlockNames(
474 const std::vector<std::string>& selectors,
const char* assemblyName)
const;
482 unsigned int ComputeCompositeIndexForAMR(
unsigned int level,
unsigned int index)
const;
501 friend class vtkPVDataInformationHelper;
520 char* SubsetSelector =
nullptr;
521 char* SubsetAssemblyName =
nullptr;
523 int DataSetType = -1;
524 int CompositeDataSetType = -1;
525 vtkTypeUInt64 FirstLeafCompositeIndex = 0;
526 vtkTypeInt64 NumberOfTrees = 0;
527 vtkTypeInt64 NumberOfLeaves = 0;
528 vtkTypeInt64 NumberOfAMRLevels = 0;
529 vtkTypeInt64 NumberOfDataSets = 0;
530 vtkTypeInt64 MemorySize = 0;
532 VTK_DOUBLE_MAX, -VTK_DOUBLE_MAX };
535 bool HasTime =
false;
537 double TimeRange[2] = { VTK_DOUBLE_MAX, -VTK_DOUBLE_MAX };
538 std::set<double> TimeSteps;
539 std::string TimeLabel;
540 std::vector<vtkTypeInt64> AMRNumberOfDataSets;
542 std::vector<int> UniqueBlockTypes;
543 struct AttributeMetadata
546 vtkTypeInt64 NumberOfElements;
549 std::map<int, AttributeMetadata> AttributeMetadata;
555 bool InspectCells =
false;
556 std::vector<unsigned char> UniqueCellTypes;
558 friend class vtkPVDataInformationAccumulator;
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
Store messages for the interpreter.