Package: hyperannotatR 0.3.1

Raban Heller

hyperannotatR: Region-of-Interest Annotation for Hyperspectral Data

Annotate multiple layers of regions of interest in hyperspectral data cubes and their associated display rasters. Annotations are stored as validated simple-feature geometries in image pixel coordinates with explicit pyramid-level transforms, and can be rasterised to binary, labelled, or multi-class integer masks for downstream segmentation and classification workflows. A batch annotation application built on 'shiny' supports resumable sessions across image queues, live mask preview, and export to 'GeoJSON', 'QuPath', and 'TIFF' formats. A versioned partner contract exchanges hash-inventoried handoff directories, deep-learning training datasets and typed commands over an optional local control service.

Authors:Raban Heller [aut, cre]

hyperannotatR_0.3.1.tar.gz
hyperannotatR_0.3.1.zip(r-4.7-any)hyperannotatR_0.3.1.zip(r-4.6-any)hyperannotatR_0.3.1.zip(r-4.5-any)
hyperannotatR_0.3.1.tgz(r-4.6-any)hyperannotatR_0.3.1.tgz(r-4.5-any)
hyperannotatR_0.3.1.tar.gz(r-4.7-any)hyperannotatR_0.3.1.tar.gz(r-4.6-any)
hyperannotatR_0.3.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
hyperannotatR/json (API)

# Install 'hyperannotatR' in R:
install.packages('hyperannotatR', repos = c('https://cttir.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/cttir/hyperannotatr/issues

Pkgdown/docs site:https://cttir.github.io

On CRAN:

Conda:

4.56 score 154 exports 41 dependencies

Last updated from:2ac2309744. Checks:7 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develNOTE634
source / vignettesOK319
linux-releaseNOTE639
macos-releaseNOTE566
macos-oldrelNOTE507
windows-develNOTE655
windows-releaseNOTE641
windows-oldrelNOTE444
wasm-releaseOK147

Exports:at_add_layerat_add_roiat_annotateat_annotation_revisionat_appat_backend_detectat_backend_getat_backend_listat_backend_registerat_band_operationsat_band_viewat_bandsat_batch_applyat_batch_check_geometryat_canvasat_canvas_fitat_canvas_proxyat_canvas_set_annotationsat_canvas_set_bandat_canvas_set_overlayat_canvas_set_selectionat_canvas_set_toolat_check_containmentat_check_geometryat_clampat_close_imageat_commit_qupflowrat_control_capabilitiesat_control_closeat_control_commandat_control_connectat_control_eventsat_control_request_statusat_control_startat_control_stateat_control_stopat_convert_valuesat_cubert_export_enviat_currentat_dimsat_example_imageat_example_pathat_example_projectat_example_sessionat_export_allat_export_qupflowrat_extractat_extract_pixelsat_extract_spectrumat_fix_geometryat_flip_yat_gotoat_hsi_metaat_image_capabilitiesat_import_qupflowrat_inspect_savedat_inspect_sourceat_interop_capabilitiesat_interop_manifestat_is_pyramidalat_is_spectralat_layerat_layer_addat_layer_nat_layer_removeat_layer_roisat_layersat_load_projectat_load_sessionat_manifestat_maskat_mask_agreementat_mask_boundaryat_mask_deriveat_mask_legendat_mask_previewat_mask_stackat_mask_statsat_metaat_n_bandsat_n_levelsat_nextat_pixel_sizeat_plotat_plot_imageat_plot_maskat_plot_overlayat_plot_projectat_plot_spectrumat_plot_summaryat_prevat_projectat_read_geojsonat_read_imageat_read_maskat_read_npyat_read_qupathat_read_rois_csvat_read_statsat_relink_sourceat_remove_layerat_remove_roiat_resumeat_roi_areaat_roi_bboxat_roi_bufferat_roi_centroidat_roi_circleat_roi_containsat_roi_differenceat_roi_distanceat_roi_ellipseat_roi_freehandat_roi_from_geojsonat_roi_from_sfat_roi_intersectat_roi_overlapsat_roi_pointat_roi_polygonat_roi_rectat_roi_rescaleat_roi_ringat_roi_simplifyat_roi_symdiffat_roi_unionat_roisat_rois_overlapat_save_projectat_save_sessionat_sessionat_session_statusat_set_statusat_snapat_stage_qupflowrat_styleat_summaryat_summary_tableat_tileat_tile_sourceat_tivita_profileat_training_checkat_training_exportat_training_importat_transformat_validateat_wavelengthsat_write_geojsonat_write_maskat_write_masksat_write_npyat_write_qupathat_write_rois_csvatCanvasOutputrenderAtCanvas

Dependencies:abindclassclassIntclicpp11DBIdigestdplyre1071farverfsgenericsggplot2gluegtableisobandjsonliteKernSmoothlabelinglifecyclemagrittrpillarpkgconfigproxyR6RColorBrewerRcpprlangs2S7scalessfstarstibbletidyselectunitsutf8vctrsviridisLitewithrwk

Working with qupflowR: handoffs, control and training data
What this installation supports | Handoff directories | The manifest | Importing, staging and committing | Hyperspectral metadata | Deep-learning training datasets | The control service | Versions and migration

Last update: 2026-11-02
Started: 2026-09-15

The batch annotation app
Building a session | Layer templates and label vocabularies | Launching the app | Hyperspectral cubes in the app | Reference lengths and estimated spatial scale | Staged changes and status | Keyboard shortcuts | Copy-forward for serial sections | Autosave and recovery | Folder restrictions | The session API without the app | Export scoping

Last update: 2026-11-02
Started: 2026-07-20

Masks
Three mask types | Grid size and memory budget | Encoding metadata and alignment | The pixel-coverage contract | touches: centres versus contact | Overlap resolution | Masks from a project | Writing masks and the legend sidecar | Downstream consumption | Reading masks back

Last update: 2026-11-02
Started: 2026-07-20

Images and backends
Image handles and windowed readers | Pyramid levels | Backends | Raw samples and input validation | Reopening saved reader contracts | The universal tile accessor | Registering a custom backend | Memory discipline | Quantitative extraction contracts

Last update: 2026-11-02
Started: 2026-07-20

Get started with hyperannotatR
An example image | Building a project | Adding some regions | Inspecting the annotations | Seeing them in context | Rasterising to a mask | Writing the mask to disk

Last update: 2026-11-02
Started: 2026-10-19

Interoperability
GeoJSON | Coordinate levels and legacy imports | The flip_y option | QuPath | The colour gotcha | Masks for Python | CSV and WKT | Export destinations and receipts

Last update: 2026-11-02
Started: 2026-07-20

Reproducible analytical summaries
Counts and estimands | Nonfinite values and spectra | Agreement with explicit alignment | Traceability and scope

Last update: 2026-11-02
Started: 2026-10-19

The annotation model
The coordinate system | The object hierarchy | Geometry validity and repair | Pyramid levels and coordinate transforms

Last update: 2026-11-02
Started: 2026-07-20

Readme and manuals

Help Manual

Help pageTopics
Add a layer to a projectat_add_layer
Add an ROI to a project layerat_add_roi
Launch the batch annotation applicationat_annotate
Annotation revision tokenat_annotation_revision
Build the annotation app as a Shiny app objectat_app
Detect the backend for a fileat_backend_detect
Get a registered backendat_backend_get
List registered image backendsat_backend_list
Register an image backendat_backend_register
Registered band operationsat_band_operations
Compute a registered band viewat_band_view
Band (channel) tableat_bands
Apply a function to every project in a sessionat_batch_apply
Check geometry across a whole sessionat_batch_check_geometry
An annotation canvas widgetat_canvas
Zoom the canvas to a bounding boxat_canvas_fit
A proxy for an existing annotation canvasat_canvas_proxy
Replace the annotations on a canvasat_canvas_set_annotations
Set the displayed band or RGB tripleat_canvas_set_band
Overlay a mask on the canvasat_canvas_set_overlay
Highlight selected ROIs on a canvasat_canvas_set_selection
Set the active drawing toolat_canvas_set_tool
Check cross-layer containmentat_check_containment
Check the geometry of every ROI in a projectat_check_geometry
Clip an ROI to image boundsat_clamp
Release an image handleat_close_image
Commit a staged partner patchat_commit_qupflowr
Control protocol capabilitiesat_control_capabilities
Close a control service connectionat_control_close
Send a typed control commandat_control_command
Connect to a running control serviceat_control_connect
Read control events after a cursorat_control_events
Resolve the outcome of a control requestat_control_request_status
Start the local control serviceat_control_start
Read the state of a control serviceat_control_state
Stop a local control serviceat_control_stop
Convert spectral values between declared unitsat_convert_values
Export a Cubert measurement to a portable ENVI cubeat_cubert_export_envi
The current projectat_current
Image dimensions at a pyramid levelat_dims dim.annot_image
Read a bundled example imageat_example_image
Path to a bundled example fileat_example_path
A populated example projectat_example_project
An example batch sessionat_example_session
Export a whole sessionat_export_all
Export annotations as a qupflowR handoff directoryat_export_qupflowr
Extract summary statistics under ROIsat_extract
Extract per-pixel values under ROIsat_extract_pixels
Extract mean/median spectra for a spectral cubeat_extract_spectrum
Repair the geometry of a projectat_fix_geometry
Flip an ROI's y-axisat_flip_y
Jump to a specific imageat_goto
Hyperspectral and acquisition metadata of an imageat_hsi_meta
Inspect the effective reading capabilities of an imageat_image_capabilities
Import a qupflowR handoff or neutral interchange fileat_import_qupflowr
Inspect a saved checkpoint without modifying itat_inspect_saved
Inspect an image source without changing annotations or reading pixelsat_inspect_source
Partner interoperability capabilitiesat_interop_capabilities
Build a partner interop manifestat_interop_manifest
Is the image pyramidal?at_is_pyramidal
Is the image a spectral cube?at_is_spectral
Create a layerat_layer
Add an ROI to a layerat_layer_add
Number of ROIs in a layerat_layer_n
Remove an ROI from a layerat_layer_remove
Layer ROI tableat_layer_rois
Layer summary tableat_layers
Load a projectat_load_project
Load a sessionat_load_session
Session progress manifest with per-label countsat_manifest
Rasterise ROIs to a mask ("Schablone")at_mask
Agreement between two masksat_mask_agreement
Object boundaries of a maskat_mask_boundary
Derive a training mask from layer masksat_mask_derive
Legend of a maskat_mask_legend
Downsampled preview of a maskat_mask_preview
Stack per-layer masks into a 3D arrayat_mask_stack
Per-value statistics of a maskat_mask_stats
Image metadataat_meta
Number of bands (channels)at_n_bands
Number of pyramid levelsat_n_levels
Advance to the next imageat_next
Physical pixel sizeat_pixel_size
Plot generic for hyperannotatR objectsat_plot
Plot an imageat_plot_image
Plot a maskat_plot_mask
Plot ROIs overlaid on the imageat_plot_overlay
Plot a project's ROIsat_plot_project
Plot spectraat_plot_spectrum
Plot a project summaryat_plot_summary
Step back to the previous imageat_prev
Create an annotation projectat_project
Read ROIs from a GeoJSON fileat_read_geojson
Read an imageat_read_image
Read a mask into editable ROIsat_read_mask
Read a NumPy '.npy' integer maskat_read_npy
Read ROIs from a QuPath GeoJSON fileat_read_qupath
Read ROIs from a CSV with WKT geometryat_read_rois_csv
Read accounting for an imageat_read_stats
Explicitly relink or revalidate an image sourceat_relink_source
Remove a layer from a projectat_remove_layer
Remove an ROI from a projectat_remove_roi
Resume a saved sessionat_resume
ROI areaat_roi_area
ROI bounding boxat_roi_bbox
Buffer an ROIat_roi_buffer
ROI centroidat_roi_centroid
Create a circular ROIat_roi_circle
Test whether points fall inside an ROIat_roi_contains
Distance between two ROIsat_roi_distance
Create an elliptical ROIat_roi_ellipse
Create a freehand ROIat_roi_freehand
Convert a GeoJSON feature to an ROIat_roi_from_geojson
Create an ROI from an existing sf geometryat_roi_from_sf
Test whether two ROIs intersectat_roi_overlaps
Create a point ROIat_roi_point
Create a polygon ROIat_roi_polygon
Create a rectangular ROIat_roi_rect
Rescale an ROI between pyramid levelsat_roi_rescale
Ring (annulus) along an ROI marginat_roi_ring
Set operations on ROIsat_roi_difference at_roi_intersect at_roi_setops at_roi_symdiff at_roi_union
Simplify an ROIat_roi_simplify
Query the ROIs of a projectat_rois
Pairwise ROI overlaps within a layerat_rois_overlap
Save a projectat_save_project
Save a sessionat_save_session
Create a batch annotation sessionat_session
The session manifestat_session_status
Set the status of a queued imageat_set_status
Snap ROI vertices to a gridat_snap
Stage partner changes against a hyperannotatR projectat_stage_qupflowr
Layer styleat_style
Summarise a projectat_summary
Session summary statisticsat_summary_table
Read a tile from an imageat_tile
Build a tile-source descriptor for the canvasat_tile_source
Declare a TIVITA SpecCube layout profileat_tivita_profile
Check a training datasetat_training_check
Export a DNN training datasetat_training_export
Import model predictions as staged annotationsat_training_import
Transform an ROI between pyramid levels using real image dimensionsat_transform
Validate a project's invariantsat_validate
Band centre wavelengthsat_wavelengths
Write a project's ROIs to GeoJSONat_write_geojson
Write a mask to diskat_write_mask
Batch-write the masks of a projectat_write_masks
Write a mask to a NumPy '.npy' fileat_write_npy
Write a project's ROIs as QuPath GeoJSONat_write_qupath
Write a project's ROIs to CSVat_write_rois_csv
Shiny output for the annotation canvasatCanvasOutput
hyperannotatR S3 classesannot_image annot_layer annot_mask annot_project annot_roi annot_session annot_style annot_summary hyperannotatR-classes
Render an annotation canvas in ShinyrenderAtCanvas