Skip to content

vc-render-tifxyz: add opt-in normal direction flip#1055

Open
LubuSeb wants to merge 1 commit into
ScrollPrize:mainfrom
LubuSeb:codex/villa-1044-flip-normals
Open

vc-render-tifxyz: add opt-in normal direction flip#1055
LubuSeb wants to merge 1 commit into
ScrollPrize:mainfrom
LubuSeb:codex/villa-1044-flip-normals

Conversation

@LubuSeb

@LubuSeb LubuSeb commented Jun 18, 2026

Copy link
Copy Markdown

Fixes #1044.

Summary

  • add an opt-in --flip-normals flag to vc_render_tifxyz
  • flip the generated surface-normal sampling direction before applying slice offsets
  • pass the same normal-direction setting through both prefetch-region calculation and tiled/banded rendering
  • leave existing output behavior unchanged unless the new flag is provided

Scope / Minimality

This patch is limited to volume-cartographer/apps/src/vc_render_tifxyz.cpp.

It does not change the default normal orientation policy, surface generation, affine transform behavior, output post-processing, or tile scheduling. The option is deliberately off by default because issue #1044 discussed making the reversed normal direction available as an optional flag rather than changing defaults globally.

Reproduction / Context

Issue #1044 reports that readable UV-space text can render with the opposite orientation from what the reporter expects, and asks whether vc_render_tifxyz should flip normal direction. The maintainer discussion explicitly allows adding the behavior as an optional flag rather than changing default behavior.

The relevant renderer path generates surface points and normals, normalizes the direction vectors, then samples image data at slice offsets along those normals. Without an opt-in switch, users have to change segment orientation or modify code locally to sample in the opposite direction. This patch exposes that opposite sampling direction as a CLI option while preserving the existing default.

Issue / Artifact Binding

  • Issue: Flip normal direction in vc3d? #1044
  • Artifact: this pull request from LubuSeb:codex/villa-1044-flip-normals
  • Prize context: Vesuvius Challenge monthly progress prizes may consider VC/tooling improvements; this PR is the reviewable technical artifact, not a guaranteed award request.

Validation

Run in the project Docker builder:

cmake --preset ci-tests-gcc
cmake --build --preset ci-tests-gcc --target vc_render_tifxyz
./build/ci-tests-gcc/bin/vc_render_tifxyz --help | grep -q -- --flip-normals
cmake --build --preset ci-tests-gcc
ctest --preset ci-tests-gcc --output-on-failure

Results:

  • vc_render_tifxyz built successfully.
  • --flip-normals is exposed by vc_render_tifxyz --help.
  • Full configured CTest passed: 97/97 tests.
  • git diff --check passed; only Windows LF-to-CRLF warnings were emitted by Git.

Known Limits

I validated the control path, build, CLI exposure, and full Dockerized test suite. I did not have a reviewer-provided segment/volume pair with a known desired flipped-normal rendering, so this PR implements the requested opt-in direction switch without asserting that it should become the default.

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

@LubuSeb is attempting to deploy a commit to the scroll Team on Vercel.

A member of the Team first needs to authorize it.

@LubuSeb LubuSeb force-pushed the codex/villa-1044-flip-normals branch from 1caa5fd to 090cf37 Compare June 22, 2026 07:34
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.

Flip normal direction in vc3d?

1 participant