Skip to content

willkeller3/3D_retinal_analysis_software

Repository files navigation

<<<<<<< HEAD

3D-4D-Retinal-Analysis-Software

=======

3D/4D Retinal Analysis Software

Medical imaging software for visualizing and analyzing 3D/4D microscopy data (similar to Imaris).

Project Status

3D/4D Retinal Analysis Software

Medical imaging software for visualizing and analyzing 3D/4D microscopy data (similar to Imaris).

Project Status

Phase 1 Complete: Foundation Layer (Math Module)

  • Vector3, Matrix4, Ray, BoundingBox
  • 100 unit tests with full coverage
  • See docs/PHASE1_COMPLETE.txt for details

Phase 2 Complete: Core Data Structures

  • ImageVolume, Channel, TimePoint, Dataset
  • 109 unit tests with full coverage
  • 4D (3D + time) data management
  • See docs/PHASE2_COMPLETE.txt for details

Phase 3 Complete: Rendering Foundations

  • Framebuffer, Camera, TransferFunction
  • 78 unit tests with full coverage
  • Rendering pipeline infrastructure
  • See docs/PHASE3_COMPLETE.txt for details

Phase 4 Complete: Volume Rendering

  • RayMarcher, VolumeRenderer
  • 43 unit tests with full coverage
  • Ray casting, MIP rendering modes
  • Multi-channel compositing
  • See docs/PHASE4_COMPLETE.txt for details

Phase 5 Complete: Interactive Controls

  • CameraController, TimeController
  • 89 unit tests with full coverage
  • Mouse-based 3D navigation (arcball rotation, pan, zoom)
  • Temporal navigation and animation playback
  • See docs/PHASE5_COMPLETE.txt for details

Phase 6 Complete: User Interface

  • UIManager, TimelineWidget, ChannelPanel, ContrastPanel
  • 71 unit tests with full coverage
  • 4D temporal scrubbing and playback control
  • Multi-channel visibility and property management
  • Histogram and contrast adjustment widgets
  • See docs/PHASE6_COMPLETE.txt for details

Total: 529 tests passing, ~10,000 lines of tested code

Prerequisites

macOS

  1. Xcode Command Line Tools

    xcode-select --install
  2. Homebrew (if not installed)

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. CMake

    brew install cmake
  4. Google Test (for unit tests)

    brew install googletest

Building the Project

Quick Start

# Create build directory
mkdir build
cd build

# Configure with CMake (using Ninja)
cmake .. -G Ninja

# Build
ninja

# Run tests (if Google Test is installed)
ctest --output-on-failure

Detailed Build Steps

  1. Configure the project
    mkdir -p build
    cd build
    cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release

Build all libraries**

ninja
  1. Build and run tests

    ctest --output-on-failure

    Or use CTest:

    ctest --verbose

Build Options

  • Build without tests: cmake .. -G Ninja -DBUILD_TESTS=OFF
  • Debug build: cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug
  • Show verbose output: ninja -v

IDE Setup

Visual Studio Code

The workspace is pre-configured with:

  • .vscode/c_cpp_properties.json - IntelliSense configuration
  • CMake integration recommended

Recommended Extensions:

  • C/C++ (Microsoft)
  • CMake Tools
  • CMake (twxs)

IntelliSense Issues?

  1. Press Cmd+Shift+P
  2. Select "C/C++: Edit Configurations (UI)"
  3. Verify include paths point to your project

Project Structure

3D:4D Retinal Analysis Software/
├── src/
│   ├── math/              # Phase 1: Math utilities
│   │   ├── Vector3.h/cpp
│   │   ├── Matrix4.h/cpp
│   │   ├── Ray.h/cpp
│   │   └── BoundingBox.h/cpp
│   ├── data/              # Phase 2: Data structures
│   │   ├── ImageVolume.h/cpp
│   │   ├── Channel.h/cpp
│   │   ├── TimePoint.h/cpp
│   │   └── Dataset.h/cpp
│   ├── rendering/         # Phase 3 & 4: Rendering
│   │   ├── Framebuffer.h/cpp
│   │   ├── TransferFunction.h/cpp
│   │   ├── RayMarcher.h/cpp
│   │   └── VolumeRenderer.h/cpp
│   ├── camera/            # Phase 3 & 5: Camera system
│   │   ├── Camera.h/cpp
│   │   └── CameraController.h/cpp
│   └── animation/         # Phase 5: Temporal control
│       └── TimeController.h/cpp
├── tests/
│   ├── math/              # Phase 1 tests (100)
│   ├── data/              # Phase 2 tests (109)
│   ├── rendering/         # Phase 3 & 4 tests (92)
│   ├── camera/            # Phase 3 & 5 tests (69)
│   └── animation/         # Phase 5 tests (48)
├── docs/                  # Documentation
│   ├── PHASE1_COMPLETE.txt
│   │   ├── PHASE2_COMPLETE.txt
│   │   ├── PHASE3_COMPLETE.txt
│   │   ├── PHASE4_COMPLETE.txt
│   │   └── PHASE5_COMPLETE.txt
├── CMakeLists.txt         # Build configuration
├── architecture_design.txt # System architecture
└── 3d_4d_viewer_pseudocode.txt # Implementation guide

Development Workflow

We follow Test-Driven Development (TDD):

  1. Write tests first (RED phase)
  2. Implement to pass tests (GREEN phase)
  3. Refactor and document (REFACTOR phase)

Running Tests

# All tests (418 tests)
cd build && ctest

# Phase 1 tests only
ctest -R "Vector3|Matrix4|Ray|BoundingBox"

# Phase 2 tests only
ctest -R "ImageVolume|Channel|TimePoint|Dataset"

# Phase 3 tests only
ctest -R "Framebuffer|Camera|TransferFunction"

# Phase 4 tests only
ctest -R "RayMarcher|VolumeRenderer"

# Phase 5 tests only
ctest -R "CameraController|TimeController"

# Specific test suite
./math_tests --gtest_filter=Vector3Test.*

# Verbose output
ctest --verbose

Troubleshooting

"cannot open source file gtest/gtest.h"

Solution: Install Google Test

brew install googletest

Then rebuild:

cd build
cmake .. -G Ninja
ninja

"Include errors detected" in VS Code

Solution 1: Reload VS Code IntelliSense

  • Press Cmd+Shift+P
  • Select "C/C++: Reset IntelliSense Database"

Solution 2: Check compiler path

which clang++
# Should output: /usr/bin/clang++

Update .vscode/c_cpp_properties.json if path differs.

CMake can't find Google Test

Solution: Specify Google Test location

cmake .. -DGTEST_ROOT=/opt/homebrew

Or on Intel Macs:

cmake .. -DGTEST_ROOT=/usr/local

Next Phases

  • Phase 6: User Interface (Qt/ImGui, widgets, panels)
  • Phase 7: Advanced Rendering (shadows, lighting, advanced transfer functions)
  • Phase 8: Data Import/Export (TIFF stacks, OME-TIFF, HDF5)
  • Phase 9: Analysis Tools (measurements, segmentation, tracking)
  • Phase 10: Performance Optimization (GPU acceleration, streaming)

See architecture_design.txt for complete development roadmap.

Contributing

This project follows strict architecture patterns:

  • Hub and Spoke design (loose coupling)
  • Test-first development
  • Comprehensive documentation
  • Zero circular dependencies

License

[To be determined]

Contact

[To be determined]

About

prompt engineered side project to remake 3D/4D image viewer for common retinal imaging; still testing to get working

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors