Skip to content

Add mode property, nuclei channel - #3

Merged
marktsuchida merged 5 commits into
marktsuchida:mainfrom
gselzer:puncta-channel
Sep 25, 2026
Merged

marktsuchida merged 5 commits into
marktsuchida:mainfrom
gselzer:puncta-channel

Conversation

@gselzer

@gselzer gselzer commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

This PR introduces a Mode property, which allows the user to toggle between the existing Filament generation and a new Nuclei generation. It's built atop #2, mostly for convenience/testing.

The new Nuclei mode has:

  • A uniformly random, sparse distribution of "nuclei". In the image below, there's only one visible:
image * Each "nucleus" contains several "puncta", *which are very hard to see at lower objective magnitudes* image

@marktsuchida let me know what you think!

@ctrueden

ctrueden commented Sep 22, 2026 •

Copy link
Copy Markdown

I tried to build this on macOS, but just build fails with:

[365/378] Compiling C++ object test_SimulatedCamera.p/SimHub.cpp.o
FAILED: [code=1] test_SimulatedCamera.p/SimHub.cpp.o
c++ -Itest_SimulatedCamera.p -I. -I.. -Isubprojects/mmdevice -I../subprojects/mmdevice -fdiagnostics-color=always -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST -Wall -Winvalid-pch -Wextra -Wpedantic -std=c++17 -O3 -DBL_STATIC -isystem../subprojects/libhwy-52a2d98 -isystemsubprojects/libhwy-52a2d98 -isystem../subprojects/Catch2-3.9.1/src -isystemsubprojects/Catch2-3.9.1/src -isystem../subprojects/blend2d-007bf48/src -Wno-gnu-anonymous-struct -Wno-nested-anon-types -DUSE_HIGHWAY_SIMD -DUSE_HIGHWAY_DYNAMIC_DISPATCH -MD -MQ test_SimulatedCamera.p/SimHub.cpp.o -MF test_SimulatedCamera.p/SimHub.cpp.o.d -o test_SimulatedCamera.p/SimHub.cpp.o -c ../SimHub.cpp
In file included from ../SimHub.cpp:5:
../SimObjectiveTurret.h:21:17: error: default member initializer for 'medium' needed within definition of enclosing class 'SimObjectiveTurret' outside of member functions
   21 |         {10, 0.3},
      |                 ^
../SimObjectiveTurret.h:17:21: note: default member initializer declared here
   17 |         const char *medium = nullptr;
      |                     ^
../SimObjectiveTurret.h:22:17: error: default member initializer for 'medium' needed within definition of enclosing class 'SimObjectiveTurret' outside of member functions
   22 |         {20, 0.7},
      |                 ^
../SimObjectiveTurret.h:17:21: note: default member initializer declared here
   17 |         const char *medium = nullptr;
      |                     ^
../SimObjectiveTurret.h:23:18: error: default member initializer for 'medium' needed within definition of enclosing class 'SimObjectiveTurret' outside of member functions
   23 |         {40, 0.75},
      |                  ^
../SimObjectiveTurret.h:17:21: note: default member initializer declared here
   17 |         const char *medium = nullptr;
      |                     ^
In file included from ../SimHub.cpp:1:
../SimHub.h:39:31: error: no viable overloaded '='
   39 |         getMagnificationFunc_ = f;
      |         ~~~~~~~~~~~~~~~~~~~~~ ^ ~
../SimObjectiveTurret.h:70:14: note: in instantiation of function template specialization 'SimHub::SetGetMagnificationFunction<(lambda at ../SimObjectiveTurret.h:70:42)>' requested here
   70 |         hub->SetGetMagnificationFunction([this] {
      |              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/function.h:658:35: note: candidate function not viable: no known conversion from '(lambda at ../SimObjectiveTurret.h:70:42)' to 'const function<double ()>' for 1st argument
  658 |   _LIBCPP_HIDE_FROM_ABI function& operator=(const function&);
      |                                   ^         ~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/function.h:659:35: note: candidate function not viable: no known conversion from '(lambda at ../SimObjectiveTurret.h:70:42)' to 'function<double ()>' for 1st argument
  659 |   _LIBCPP_HIDE_FROM_ABI function& operator=(function&&) _NOEXCEPT;
      |                                   ^         ~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/function.h:660:35: note: candidate function not viable: no known conversion from '(lambda at ../SimObjectiveTurret.h:70:42)' to 'nullptr_t' (aka 'std::nullptr_t') for 1st argument
  660 |   _LIBCPP_HIDE_FROM_ABI function& operator=(nullptr_t) _NOEXCEPT;
      |                                   ^         ~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/function.h:662:35: note: candidate template ignored: requirement '__callable<(lambda at ../SimObjectiveTurret.h:70:42) &, false>::value' was not satisfied [with _Fp = (lambda at ../SimObjectiveTurret.h:70:42) &]
  662 |   _LIBCPP_HIDE_FROM_ABI function& operator=(_Fp&&);
      |                                   ^
In file included from ../SimHub.cpp:1:
../SimHub.h:43:20: error: no viable overloaded '='
   43 |         getNAFunc_ = f;
      |         ~~~~~~~~~~ ^ ~
../SimObjectiveTurret.h:73:14: note: in instantiation of function template specialization 'SimHub::SetGetNAFunction<(lambda at ../SimObjectiveTurret.h:73:31)>' requested here
   73 |         hub->SetGetNAFunction([this] {
      |              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/function.h:658:35: note: candidate function not viable: no known conversion from '(lambda at ../SimObjectiveTurret.h:73:31)' to 'const function<double ()>' for 1st argument
  658 |   _LIBCPP_HIDE_FROM_ABI function& operator=(const function&);
      |                                   ^         ~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/function.h:659:35: note: candidate function not viable: no known conversion from '(lambda at ../SimObjectiveTurret.h:73:31)' to 'function<double ()>' for 1st argument
  659 |   _LIBCPP_HIDE_FROM_ABI function& operator=(function&&) _NOEXCEPT;
      |                                   ^         ~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/function.h:660:35: note: candidate function not viable: no known conversion from '(lambda at ../SimObjectiveTurret.h:73:31)' to 'nullptr_t' (aka 'std::nullptr_t') for 1st argument
  660 |   _LIBCPP_HIDE_FROM_ABI function& operator=(nullptr_t) _NOEXCEPT;
      |                                   ^         ~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/function.h:662:35: note: candidate template ignored: requirement '__callable<(lambda at ../SimObjectiveTurret.h:73:31) &, false>::value' was not satisfied [with _Fp = (lambda at ../SimObjectiveTurret.h:73:31) &]
  662 |   _LIBCPP_HIDE_FROM_ABI function& operator=(_Fp&&);
      |                                   ^
5 errors generated.
[372/378] Compiling C++ object subprojects/goo...googletest/libgtest-all.a.p/src_gtest-all.cc.o
ninja: build stopped: subcommand failed.
error: recipe `build` failed on line 32 with exit code 1

Whereas on the main branch, the build succeeds.

@gselzer

gselzer commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @ctrueden, Claude took a stab at fixing it on #2

Let me know if it still doesn't work (@marktsuchida we may want some CI jobs for this...)

@marktsuchida

Copy link
Copy Markdown
Owner

(Resolving conflicts.)

Conflicts were caused by reformatting on 'main'.
Not reformatting new code here (yet).
@marktsuchida
marktsuchida merged commit 792f1ad into marktsuchida:main Sep 25, 2026
6 checks passed
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.

3 participants