You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
3.3 KiB
C

/**********************************************************************
* @file FITKAlgDatReader.h
* @brief Tecplotdat
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*********************************************************************/
#ifndef _FITKAlgDatReader_H_
#define _FITKAlgDatReader_H_
#include "FITKInterfaceCFDPostAPI.h"
#include <vtkSmartPointer.h>
#include <vtkMultiBlockDataSetAlgorithm.h>
#include <QHash>
#include <QStringList>
#include <vtkDataSetAlgorithm.h>
#include <vtkUnstructuredGridAlgorithm.h>
class vtkMultiBlockDataSet;
class vtkAlgorithmOutput;
class vtkInformation;
class vtkDataSet;
namespace Interface
{
/**
* @brief
* @since Version: 1.0.0
**/
typedef struct tpArrayInfo
{
int components;
int tuples;
} tArrayInfo;
class FITKInterfaceCFDPostAPI FITKAlgDatReader : public vtkUnstructuredGridAlgorithm
{
public:
/**
* @brief Plot3DReader
* @since Version: 1.0.0
**/
static FITKAlgDatReader *New();
/**
* @brief
* @since Version: 1.0.0
**/
void PrintSelf(ostream &os, vtkIndent indent);
void setFileName(QString fileName);
QString getFileName();
int getNumberOfBlocks();
void setVisible(int blockIndex, bool vis);
QStringList getBlockNames();
QStringList getBlockBCTypes();
/**
* @brief
* @since Version: 1.0.0
**/
int FillOutputPortInformation(int nPort, vtkInformation *info);
protected:
FITKAlgDatReader();
~FITKAlgDatReader();
/**
* @brief
* @note
* @since Version: 1.0.0
**/
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
/**
* @brief
* @note
* @since Version: 1.0.0
**/
int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector,
vtkInformationVector *outputVector);
private:
/**
* @note 使New()
* @since Version: 1.0.0
**/
FITKAlgDatReader(const FITKAlgDatReader &);
void operator=(const FITKAlgDatReader &);
/**
* @brief
* @since Version: 1.0.0
**/
void getBlocks(vtkDataObject *blockData);
protected:
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
QString _fileName = "";
private:
/**
* @brief
* @note multiblockdataset,
* @since Version: 1.0.0
**/
QList<vtkDataSet *> _blockList;
/**
* @brief
* @note QString-, int-
* @since Version: 1.0.0
**/
QHash<QString, tArrayInfo> _attributesPointList;
QHash<QString, tArrayInfo> _attributesCellList;
QList<bool> _visibleStates{};
QStringList _blockNames{};
};
}
#endif