geopro/src/render/actors/VoxelActor.hpp

27 lines
1.3 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <vtkSmartPointer.h>
#include <vtkVolume.h>
#include <vtkImageData.h>
#include "model/Field.hpp"
#include "model/ColorScale.hpp"
namespace geopro::render {
// 把 core 规则标量体IDW 输出,含 NaN 留空)转 vtkImageData再建 GPU 光线投射体绘制。
// 颜色按 ColorScale 在 [vmin,vmax] 采样NaN/留空格 → 不透明度 0透明
// 返回 vtkVolume由调用方加入 renderer
vtkSmartPointer<vtkVolume> buildVoxel(const geopro::core::ScalarVolume& vol,
const geopro::core::ColorScale& cs,
double ox, double oy, double oz,
double dx, double dy, double dz,
double vmin, double vmax);
// 同上,但额外通过 out 参数暴露内部 vtkImageData供 main 建交互切片 widget。
vtkSmartPointer<vtkVolume> buildVoxel(const geopro::core::ScalarVolume& vol,
const geopro::core::ColorScale& cs,
double ox, double oy, double oz,
double dx, double dy, double dz,
double vmin, double vmax,
vtkSmartPointer<vtkImageData>& outImage);
} // namespace geopro::render