vix raytracer representation

This commit is contained in:
AndreaRigoni
2026-03-07 09:07:07 +00:00
parent e8f8e96521
commit 38dd416ced
3 changed files with 11 additions and 3 deletions

View File

@@ -62,7 +62,7 @@ public:
if (annotation) {
sprintf(str, "total length = %f", vtk_raytr->GetRay().TotalLength());
annotation->SetText(1, str);
for (int i = 0; i < vtk_raytr->GetRay().Data().size(); ++i) {
for (int i = 0; i < vtk_raytr->GetRay().size(); ++i) {
std::cout << "L[" << i << "] = " << vtk_raytr->GetRay().Data().at(i).L
<< "\n";
}

View File

@@ -249,13 +249,14 @@ void vtkVoxRaytracerRepresentation::SetRay(VoxRaytracer::RayData *ray) {
Vector3i idv = m_Content->GetImage()->UnMap(id);
vtkSmartPointer<vtkCubeSource> cube = vtkSmartPointer<vtkCubeSource>::New();
cube->SetBounds(idv(0), idv(0) + 1, idv(1), idv(1) + 1, idv(2), idv(2) + 1);
#if VTK_MAJOR_VERSION <= 5
cube->Update();
#if VTK_MAJOR_VERSION <= 5
appender->AddInput(cube->GetOutput());
#else
appender->AddInputData(cube->GetOutput());
#endif
}
appender->Modified();
}
void vtkVoxRaytracerRepresentation::SetVoxelsColor(Vector4f rgba) {