You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement OSG volume rendering with slice visualization
Added real 3D rendering to the ImGui viewer:
OSG Renderer Implementation:
- Created full osgViewer::Viewer instance for 3D rendering
- Integrated TrackballManipulator for camera control
- Set up proper projection matrix with perspective view
- Configured single-threaded rendering mode for ImGui compatibility
Volume Visualization:
- Extract and display middle slice (Z-axis) from loaded volume
- Create textured quad geometry with volume data
- Apply linear filtering for smooth slice display
- Automatic slice selection (z = depth/2)
Rendering Pipeline:
- Initialize OSG viewer on startup
- Create scene graph with volume geometry
- Render frames synchronized with ImGui
- Dynamic viewport resizing based on window size
- Proper camera home positioning
Console Feedback:
- Log renderer initialization status
- Display slice number being shown
- Report scene creation success
- Track viewport dimension changes
The viewer now renders actual volume data! When you load a volume,
you'll see the middle slice displayed as a textured 2D plane.
This provides immediate visual feedback that the volume loaded correctly.
Next step: Full 3D volumetric ray-casting rendering.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
0 commit comments