Repository navigation
Add SZ3Reader ParaView plugin - #112
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a ParaView plugin for reading SZ3-compressed files directly in ParaView. The plugin provides a VTK reader that decompresses SZ3 files and visualizes the data without requiring manual decompression.
- Implements
vtkSZ3Readerclass to handle SZ3 compressed file reading - Adds CMake configuration for building the plugin as part of the SZ3 project
- Provides comprehensive documentation for building and using the plugin
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/paraview/SZ3Reader/paraview.plugin | Plugin metadata defining dependencies and description |
| tools/paraview/SZ3Reader/Reader/vtkSZ3Reader.h | Header file declaring the SZ3 reader class interface |
| tools/paraview/SZ3Reader/Reader/vtkSZ3Reader.cxx | Implementation of the SZ3 reader with decompression logic |
| tools/paraview/SZ3Reader/Reader/vtk.module | VTK module configuration for the reader |
| tools/paraview/SZ3Reader/Reader/SZ3Reader.xml | ParaView GUI configuration for the reader interface |
| tools/paraview/SZ3Reader/Reader/CMakeLists.txt | CMake build configuration for the reader module |
| tools/paraview/SZ3Reader/CMakeLists.txt | CMake plugin registration and build setup |
| tools/paraview/README.md | Documentation for building and using the plugin |
| tools/paraview/CMakeLists.txt | Top-level ParaView build configuration with plugin scanning |
| README.md | Updated main README to reference the ParaView plugin |
| CMakeLists.txt | Added BUILD_PARAVIEW_PLUGIN option to main CMake |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return 0; | ||
| } | ||
|
|
||
| std::ifstream file(this->FileName, std::ios::binary); |
There was a problem hiding this comment.
Missing #include <fstream> for std::ifstream. The file uses std::ifstream but does not include the required header, which will cause compilation errors.
| file.seekg(0, std::ios::end); | ||
| size_t compressedSize = file.tellg(); | ||
| file.seekg(0, std::ios::beg); | ||
| std::vector<char> compressedBuffer(compressedSize); |
There was a problem hiding this comment.
Missing #include <vector> for std::vector. The file uses std::vector but does not include the required header, which will cause compilation errors.
| std::cout << "FileName: " << (this->FileName ? this->FileName : "(none)") << std::endl; | ||
| std::cout << "DomainDimensions: " << this->DomainDimensions[0] << ", " << this->DomainDimensions[1] << ", " << this->DomainDimensions[2] << std::endl; | ||
| std::cout << "DoublePrecision: " << this->UseDoublePrecision << std::endl; |
There was a problem hiding this comment.
Debug output statements should be removed or replaced with proper VTK logging mechanisms (e.g., vtkDebugMacro) before production release. These std::cout statements are not appropriate for production code.
| REQUIRES_MODULES modules) | ||
|
|
||
| # Ensure we have required modules. | ||
| foreach (module IN LISTS REQUIRES_MODULES) |
There was a problem hiding this comment.
Variable name mismatch: should be modules instead of REQUIRES_MODULES. The paraview_plugin_scan outputs to the variable modules (line 10), but the loop iterates over REQUIRES_MODULES which is undefined.
| foreach (module IN LISTS REQUIRES_MODULES) | |
| foreach (module IN LISTS modules) |
There was a problem hiding this comment.
@guoxiliu could you look into those AI generated warnings?
This PR introduces the SZ3Reader ParaView plugin to natively load and visualize SZ3-compressed datasets in ParaView.
Key features of the initial version:
BUILD_PARAVIEW_PLUGINCMake option