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.

153 lines
4.5 KiB
C

/**********************************************************************
* @file FITKAlgPltReader.h
* @brief plt
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*********************************************************************/
#ifndef READDATATECPLT_H
#define READDATATECPLT_H
#include "FITKInterfaceCFDPostAPI.h"
#include <QString>
#include <QStringList>
#include <QHash>
#include <vtkUnstructuredGridAlgorithm.h>
namespace Interface
{
/**
* @brief plt
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
class FITKInterfaceCFDPostAPI FITKAlgPltReader : public vtkUnstructuredGridAlgorithm
{
public:
/**
* @brief
* @return FITKAlgPltReader*
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
static FITKAlgPltReader* New();
/**
* @brief
* @param[o] os
* @param[i] indent
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
void PrintSelf(ostream& os, vtkIndent indent) override;
/**
* @brief
* @param[i] fileName
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
void setFileName(QString fileName);
/**
* @brief
* @return QString
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
QString getFileName();
/**
* @brief block
* @return int
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
int getNumberOfBlocks();
void setVisible(int blockIndex, bool vis);
QStringList getBlockNames();
//QStringList getBlockBCTypes();
int FillOutputPortInformation(int nPort, vtkInformation* info);
/**
* @brief
* @param[i] dataset
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
void getPointArray(vtkDataSet* dataset);
/**
* @brief
* @param[i] dataset
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
void getCellArray(vtkDataSet* dataset);
/**
* @brief
* @param[i] block
* @param[i] cuttentName
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
void getBlocks(vtkDataObject* block, const char* cuttentName = "");
protected:
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
FITKAlgPltReader();
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
~FITKAlgPltReader();
int ProcessRequest(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector);
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
protected:
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
QString _fileName = "";
private:
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
QStringList _blockNames{};
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
QList<vtkDataSet*> _blockList;
QList<bool> _visibleStates{};
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
QHash<QString, int*> _pointDataArray{};
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-10-09
*/
QHash<QString, int*> _cellDataArray{};
};
}
#endif