Skip to main content

Neuralyzer::DataSynthesizer

Neuralyzer::DataSynthesizer

Classes

Name
class Neuralyzer::DataSynthesizer::GeneratorRegistry
Singleton registry for data generators.
struct Neuralyzer::DataSynthesizer::GeneratorContext
Context passed to generators during execution.
struct Neuralyzer::DataSynthesizer::GeneratorMetadata
Metadata describing a registered generator.
struct Neuralyzer::DataSynthesizer::GeneratorEntry
A registry entry pairing a generator function with its metadata.
class Neuralyzer::DataSynthesizer::RegisterGenerator
RAII helper for compile-time generator registration.
struct Neuralyzer::DataSynthesizer::BoundaryParams
Boundary parameters shared by all moving generators.
struct Neuralyzer::DataSynthesizer::LinearMotionParams
Parameters for linear motion.
struct Neuralyzer::DataSynthesizer::SinusoidalMotionParams
Parameters for sinusoidal motion.
struct Neuralyzer::DataSynthesizer::BrownianMotionParams
Parameters for Brownian motion.
struct Neuralyzer::DataSynthesizer::TrajectoryParams
Parameters controlling trajectory computation.

Types

Name
enum class MaskShape { circle, rectangle, ellipse}
Shape type for the moving mask.
enum class BoundaryMode { clamp, bounce, wrap}
Boundary enforcement mode for trajectory computation.
using std::function< DataTypeVariant(std::string const &params_json, GeneratorContext const &ctx)> GeneratorFunction
Type alias for the generator function signature.
using rfl::TaggedUnion< “model”, LinearMotionParams, SinusoidalMotionParams, BrownianMotionParams > MotionModelVariant

Functions

Name
void register_datasynthesizer_commands()
Register DataSynthesizer commands with the CommandRegistry singleton.
std::string boundaryModeToString(BoundaryMode mode)
Convert enum BoundaryMode to the string expected by TrajectoryParams.
TrajectoryParams toTrajectoryParams(MotionModelVariant const & motion, BoundaryParams const & boundary)
Convert typed motion variant + boundary params to the internal TrajectoryParams.
std::vector< Point2D< float > > computeTrajectory(float start_x, float start_y, int num_frames, TrajectoryParams const & params)
Compute a trajectory of num_frames positions.

Types Documentation

enum MaskShape

Enumerator Value Description
circle
rectangle
ellipse

Shape type for the moving mask.

enum BoundaryMode

Enumerator Value Description
clamp
bounce
wrap

Boundary enforcement mode for trajectory computation.

using GeneratorFunction

using Neuralyzer::DataSynthesizer::GeneratorFunction =  std::function<DataTypeVariant(std::string const & params_json, GeneratorContext const & ctx)>;

Type alias for the generator function signature.

A generator takes a JSON string of parameters and returns a DataTypeVariant. The generator is responsible for deserializing its own parameter struct from the JSON string using rfl::json::read.

using MotionModelVariant

using Neuralyzer::DataSynthesizer::MotionModelVariant =  rfl::TaggedUnion<
        "model",
        LinearMotionParams,
        SinusoidalMotionParams,
        BrownianMotionParams>;

Discriminated union of motion model parameters. The discriminator field is “model” in the serialized JSON.

Functions Documentation

function register_datasynthesizer_commands

void register_datasynthesizer_commands()

Register DataSynthesizer commands with the CommandRegistry singleton.

Must be called once at startup before any command creation or introspection. Safe to call multiple times (subsequent calls are no-ops).

function boundaryModeToString

inline std::string boundaryModeToString(
    BoundaryMode mode
)

Convert enum BoundaryMode to the string expected by TrajectoryParams.

function toTrajectoryParams

inline TrajectoryParams toTrajectoryParams(
    MotionModelVariant const & motion,
    BoundaryParams const & boundary
)

Convert typed motion variant + boundary params to the internal TrajectoryParams.

This bridges the user-facing typed parameters (enum + tagged union) to the internal flat TrajectoryParams used by computeTrajectory().

function computeTrajectory

std::vector< Point2D< float > > computeTrajectory(
    float start_x,
    float start_y,
    int num_frames,
    TrajectoryParams const & params
)

Compute a trajectory of num_frames positions.

Parameters:

  • start_x Starting X position
  • start_y Starting Y position
  • num_frames Number of frames (positions) to generate
  • params Trajectory parameters controlling motion and boundaries

Return: Vector of num_frames positions

Precondition:

  • num_frames > 0
  • bounds_max > bounds_min for both axes
  • model is one of “linear”, “sinusoidal”, “brownian”
  • boundary_mode is one of “clamp”, “bounce”, “wrap”

Updated on 2026-11-13 at 20:25:41 +0000