Skip to content

Add SZ3Reader ParaView plugin - #112

Merged
ayzk merged 3 commits into
szcompressor:masterfrom
guoxiliu:paraview-plugin
Nov 11, 2025
Merged

ayzk merged 3 commits into
szcompressor:masterfrom
guoxiliu:paraview-plugin

Conversation

@guoxiliu

Copy link
Copy Markdown
Contributor

This PR introduces the SZ3Reader ParaView plugin to natively load and visualize SZ3-compressed datasets in ParaView.

Key features of the initial version:

  • Supports regular float/double data with up to three dimensions
  • Includes build and loading instructions for seamless integration into existing ParaView workflows
  • Can be optionally compiled via the BUILD_PARAVIEW_PLUGIN CMake option

@ayzk
ayzk requested a review from Copilot November 1, 2025 21:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 vtkSZ3Reader class 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);

Copilot AI Nov 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing #include <fstream> for std::ifstream. The file uses std::ifstream but does not include the required header, which will cause compilation errors.

Copilot uses AI. Check for mistakes.
file.seekg(0, std::ios::end);
size_t compressedSize = file.tellg();
file.seekg(0, std::ios::beg);
std::vector<char> compressedBuffer(compressedSize);

Copilot AI Nov 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing #include <vector> for std::vector. The file uses std::vector but does not include the required header, which will cause compilation errors.

Copilot uses AI. Check for mistakes.
Comment on lines +54 to +56
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;

Copilot AI Nov 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread tools/paraview/CMakeLists.txt Outdated
REQUIRES_MODULES modules)

# Ensure we have required modules.
foreach (module IN LISTS REQUIRES_MODULES)

Copilot AI Nov 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
foreach (module IN LISTS REQUIRES_MODULES)
foreach (module IN LISTS modules)

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guoxiliu could you look into those AI generated warnings?

@ayzk
ayzk merged commit a32faab into szcompressor:master Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants