#pragma once #ifdef MYVIEWER_EXPORT #define MYVIEWER_EXPORT_API __declspec(dllexport) #else #define MYVIEWER_EXPORT_API __declspec(dllimport) #endif #include #include #include class vtkImageViewer2; class vtkRenderWindowInteractor; class vtkImageData; class vtkImageImport; class myViewerCallback; class MYVIEWER_EXPORT_API ShowImageDll { public: ShowImageDll(); ~ShowImageDll(); //设置父窗口接口 void SetPairentID(void* windowID); //设置窗口大小接口 void SetWindowSize(int w,int h); //对外开放的显示控件接口 void Show(unsigned long long smid); void flash(unsigned long long smid); void SetLoggerParm(int SlicerMode, int level, const std::string& dir); private: unsigned short* myData = new unsigned short[960 * 960 * 2]; //vtk显示窗口 vtkSmartPointer Viewer; //vtk交互器 vtkSmartPointer Interactor; //vtk的图像类 //vtkImageData* ImageData; //一个回调类,实现再cpp文件 vtkSmartPointer importer; myViewerCallback* ViewerCallback; std::queue SMIDQueue; friend class myViewerCallback; int first = 1; };