Snapshot and observation¶
See the observation guide for view conventions, render-pass semantics, installation, offline assets, and pixel picking.
Capture one deterministic WebGL raster and optional raw pass array.
A Figure camera is used when neither view nor camera is supplied;
otherwise named presets frame the compiled scene. Explicit config,
resolution, and background override Figure intent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Layer | Figure
|
Layer or Figure to capture. |
required |
view
|
ViewPreset | None
|
Named camera preset and result label. |
None
|
pass_name
|
PassName
|
Beauty, albedo, depth, normal, element-ID, or layer-ID pass. |
'beauty'
|
resolution
|
tuple[int, int] | None
|
Output width and height in pixels. |
None
|
camera
|
CameraState | None
|
Explicit camera overriding the named preset. |
None
|
config
|
Config | None
|
Explicit invocation configuration. |
None
|
backend
|
BackendName
|
Capture backend; currently only |
'webgl'
|
background
|
Literal['light', 'dark'] | None
|
Light or dark studio background. |
None
|
up_axis
|
Literal['y', 'z']
|
Coordinate convention used by named camera presets. |
'y'
|
filename
|
str | Path | None
|
Optional PNG path; raw pass data is saved beside it as NPY. |
None
|
timeout
|
float
|
Chromium capture timeout in seconds. |
60.0
|
Returns:
| Type | Description |
|---|---|
Snapshot
|
Snapshot containing the image, raw data, camera, matrices, and metadata. |
Source code in hakowan/workflow/observation.py
859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 | |
Capture a deterministic multi-view, multi-pass inspection bundle.
Defaults to front, right, top, and isometric views with beauty, depth, and normal passes. Figure output passes are inherited when present. Request depth plus both ID passes to enable picking and structured visibility queries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Layer | Figure
|
Layer or Figure to inspect. |
required |
views
|
Sequence[str] | None
|
Ordered named view presets or labels with explicit camera overrides. |
None
|
passes
|
Sequence[PassName] | None
|
Ordered semantic pass names. |
None
|
resolution
|
tuple[int, int] | None
|
Width and height shared by every capture. |
None
|
cameras
|
dict[str, CameraState] | None
|
Explicit CameraState overrides keyed by view label. |
None
|
config
|
Config | None
|
Explicit invocation configuration. |
None
|
backend
|
BackendName
|
Capture backend; currently only |
'webgl'
|
background
|
Literal['light', 'dark'] | None
|
Light or dark studio background. |
None
|
up_axis
|
Literal['y', 'z']
|
Coordinate convention used by named camera presets. |
'y'
|
output_dir
|
str | Path | None
|
Optional directory for PNG, NPY, contact-sheet, and manifest files. |
None
|
timeout
|
float
|
Chromium capture timeout in seconds. |
60.0
|
Returns:
| Type | Description |
|---|---|
Observation
|
Observation containing snapshots, structured scene evidence, and manifest. |
Source code in hakowan/workflow/observation.py
938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 | |
Resolved deterministic camera used for one or more snapshots.
scale is the full vertical extent for orthographic cameras and is
None for perspective cameras.
Source code in hakowan/workflow/observation.py
One deterministic camera/pass raster and its machine-readable state.
Source code in hakowan/workflow/observation.py
to_manifest()
¶
Return paths, hashes, camera state, matrices, bounds, and diagnostics.
Source code in hakowan/workflow/observation.py
Multi-view, multi-pass evidence bundle for visual examination.
Source code in hakowan/workflow/observation.py
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | |
attribute_extrema(attribute, *, layer=None, view=None, bounds=None)
¶
Summarize a numeric attribute over visible source elements.
bounds optionally restricts the query to a half-open pixel region.
Vector extrema are selected by magnitude while component-wise statistics
and the original extremum samples are retained.
Source code in hakowan/workflow/observation.py
occlusion_report(*, view=None, layer=None)
¶
Report depth-ordered projected overlap for selected views or layers.
Source code in hakowan/workflow/observation.py
pick(view, pixel)
¶
Resolve IDs, depth, world position, normal, and attributes at a pixel.
The observation must contain depth, element-ID, and layer-ID passes for
the requested view. Background pixels return None.
Source code in hakowan/workflow/observation.py
region(x0, y0, x1, y1, *, view=None)
¶
Summarize IDs and coverage inside half-open pixel bounds.
Source code in hakowan/workflow/observation.py
save(directory)
¶
Write PNGs, raw NumPy pass arrays, a contact sheet, and manifest.
Source code in hakowan/workflow/observation.py
snapshot(view, pass_name)
¶
visible_elements(layer=None, *, view=None)
¶
Return visibility records for all layers or one ID/name selector.
Source code in hakowan/workflow/observation.py
visual_diagnostics(*, min_occupancy=0.02, max_occupancy=0.95, max_clipped_fraction=0.05, min_contrast=0.08)
¶
Diagnose deterministic visual failures against explicit thresholds.
Source code in hakowan/workflow/observation.py
Geometry and data resolved at one observation pixel.
Source code in hakowan/workflow/observation.py
Normalized scene bounds, coordinate convention, and layer summaries.
Source code in hakowan/workflow/observation.py
to_dict()
¶
Return a JSON-safe scene summary.
Source code in hakowan/workflow/observation.py
Geometry counts and identity for one compiled observation layer.
Source code in hakowan/workflow/observation.py
Layer and background coverage within a half-open pixel rectangle.
Source code in hakowan/workflow/observation_queries.py
to_dict()
¶
Return a JSON-safe region summary with nested layer records.
Visible pixels and elements for one layer in one captured view.
Source code in hakowan/workflow/observation_queries.py
Statistics for visible source elements carrying one numeric attribute.
Source code in hakowan/workflow/observation_queries.py
Projected overlap where one layer is entirely closer than another.