feat: Implement new MIP Rainbow and Additive rendering presets and add interactive test controls.

This commit is contained in:
AndreaRigoni
2026-03-19 16:44:00 +00:00
parent 6234dffaa7
commit 85e1f1448f
2 changed files with 27 additions and 1 deletions

View File

@@ -43,6 +43,12 @@ void KeyPressCallbackFunction(vtkObject* caller, long unsigned int eventId, void
for (auto* img : state->images) img->SetRepresentation(Vtk::Puppet::Surface);
state->viewer->GetRenderWindow()->Render();
}
else if (key >= "0" && key <= "5") {
int preset = key[0] - '0';
std::cout << "--> Switching all images to Rendering Preset " << preset << std::endl;
for (auto* img : state->images) img->setShadingPreset(preset);
state->viewer->GetRenderWindow()->Render();
}
}
int main(int argc, char** argv) {
@@ -118,7 +124,14 @@ int main(int argc, char** argv) {
std::cout << " [RIGHT] Axes Gradient (Composite)" << std::endl;
std::cout << "-----------------------------------------" << std::endl;
std::cout << " Press [w] to show Wireframe Bounding Boxes" << std::endl;
std::cout << " Press [s] to switch back to Volume Rendering" << std::endl;
std::cout << " Press [s] to show Volume Rendering" << std::endl;
std::cout << " Press [0..5] to switch Rendering Presets:" << std::endl;
std::cout << " 0: MIP (Grayscale)" << std::endl;
std::cout << " 1: Composite (Grayscale)" << std::endl;
std::cout << " 2: Composite (Shaded)" << std::endl;
std::cout << " 3: CT Bone/Tissue (Bone colors)" << std::endl;
std::cout << " 4: MIP (Rainbow)" << std::endl;
std::cout << " 5: Additive (Total path sum)" << std::endl;
std::cout << " Press [q] to quit" << std::endl;
std::cout << "=========================================" << std::endl;