Skip to contents

Images and backends

Read images and register formats.

at_read_image()
Read an image
at_tile()
Read a tile from an image
at_dims()
Image dimensions at a pyramid level
at_n_levels()
Number of pyramid levels
at_n_bands()
Number of bands (channels)
at_bands()
Band (channel) table
at_wavelengths()
Band centre wavelengths
at_is_spectral()
Is the image a spectral cube?
at_is_pyramidal()
Is the image pyramidal?
at_pixel_size()
Physical pixel size
at_meta()
Image metadata
at_backend_list()
List registered image backends
at_backend_get()
Get a registered backend
at_backend_detect()
Detect the backend for a file
at_backend_register()
Register an image backend

Regions of interest

Construct and measure individual ROIs.

at_roi_point()
Create a point ROI
at_roi_rect()
Create a rectangular ROI
at_roi_circle()
Create a circular ROI
at_roi_ellipse()
Create an elliptical ROI
at_roi_polygon()
Create a polygon ROI
at_roi_freehand()
Create a freehand ROI
at_roi_from_sf()
Create an ROI from an existing sf geometry
at_roi_area()
ROI area
at_roi_centroid()
ROI centroid
at_roi_bbox()
ROI bounding box

Geometry

Transforms, set operations, predicates, and validity.

at_transform()
Transform an ROI between pyramid levels using real image dimensions
at_roi_rescale()
Rescale an ROI between pyramid levels
at_roi_buffer()
Buffer an ROI
at_roi_simplify()
Simplify an ROI
at_flip_y()
Flip an ROI's y-axis
at_snap()
Snap ROI vertices to a grid
at_clamp()
Clip an ROI to image bounds
at_roi_union() at_roi_intersect() at_roi_difference() at_roi_symdiff()
Set operations on ROIs
at_roi_ring()
Ring (annulus) along an ROI margin
at_roi_contains()
Test whether points fall inside an ROI
at_roi_overlaps()
Test whether two ROIs intersect
at_roi_distance()
Distance between two ROIs
at_rois_overlap()
Pairwise ROI overlaps within a layer
at_check_geometry()
Check the geometry of every ROI in a project
at_fix_geometry()
Repair the geometry of a project
at_check_containment()
Check cross-layer containment

Layers and projects

Organise ROIs into layers and projects.

at_style()
Layer style
at_layer()
Create a layer
at_layer_add()
Add an ROI to a layer
at_layer_remove()
Remove an ROI from a layer
at_layer_rois()
Layer ROI table
at_layer_n()
Number of ROIs in a layer
at_project()
Create an annotation project
at_add_layer()
Add a layer to a project
at_remove_layer()
Remove a layer from a project
at_add_roi()
Add an ROI to a project layer
at_remove_roi()
Remove an ROI from a project
at_layers()
Layer summary table
at_rois()
Query the ROIs of a project
at_validate()
Validate a project's invariants
at_summary()
Summarise a project

Sessions and batch

Resumable queues and whole-session operations.

at_session()
Create a batch annotation session
at_next()
Advance to the next image
at_prev()
Step back to the previous image
at_goto()
Jump to a specific image
at_current()
The current project
at_set_status()
Set the status of a queued image
at_session_status()
The session manifest
at_manifest()
Session progress manifest with per-label counts
at_resume()
Resume a saved session
at_export_all()
Export a whole session
at_summary_table()
Session summary statistics
at_batch_apply()
Apply a function to every project in a session
at_batch_check_geometry()
Check geometry across a whole session

Masks

Rasterise annotations and round-trip masks.

at_mask()
Rasterise ROIs to a mask ("Schablone")
at_mask_legend()
Legend of a mask
at_mask_stats()
Per-value statistics of a mask
at_mask_boundary()
Object boundaries of a mask
at_mask_preview()
Downsampled preview of a mask
at_mask_stack()
Stack per-layer masks into a 3D array
at_mask_derive()
Derive a training mask from layer masks
at_mask_agreement()
Agreement between two masks
at_write_mask()
Write a mask to disk
at_read_mask()
Read a mask into editable ROIs
at_write_masks()
Batch-write the masks of a project
at_write_npy()
Write a mask to a NumPy .npy file
at_read_npy()
Read a NumPy .npy integer mask

Extraction

Summarise image and spectral values under ROIs.

at_extract()
Extract summary statistics under ROIs
at_extract_spectrum()
Extract mean/median spectra for a spectral cube
at_extract_pixels()
Extract per-pixel values under ROIs

Visualisation

ggplot2 plots.

at_plot()
Plot generic for annotatR objects
at_plot_image()
Plot an image
at_plot_project()
Plot a project's ROIs
at_plot_overlay()
Plot ROIs overlaid on the image
at_plot_mask()
Plot a mask
at_plot_spectrum()
Plot spectra
at_plot_summary()
Plot a project summary

Import and export

Interchange with GeoJSON, QuPath, CSV, and RDS.

at_write_geojson()
Write a project's ROIs to GeoJSON
at_read_geojson()
Read ROIs from a GeoJSON file
at_roi_from_geojson()
Convert a GeoJSON feature to an ROI
at_write_qupath()
Write a project's ROIs as QuPath GeoJSON
at_read_qupath()
Read ROIs from a QuPath GeoJSON file
at_save_project()
Save a project
at_load_project()
Load a project
at_save_session()
Save a session
at_load_session()
Load a session
at_write_rois_csv()
Write a project's ROIs to CSV
at_read_rois_csv()
Read ROIs from a CSV with WKT geometry

Shiny application

The batch annotation app and canvas widget.

at_annotate()
Launch the batch annotation application
at_canvas()
An annotation canvas widget
atCanvasOutput()
Shiny output for the annotation canvas
renderAtCanvas()
Render an annotation canvas in Shiny
at_canvas_proxy()
A proxy for an existing annotation canvas
at_canvas_set_annotations()
Replace the annotations on a canvas
at_canvas_set_tool()
Set the active drawing tool
at_canvas_set_band()
Set the displayed band or RGB triple
at_canvas_set_overlay()
Overlay a mask on the canvas
at_canvas_fit()
Zoom the canvas to a bounding box
at_tile_source()
Build a tile-source descriptor for the canvas

Example data

Bundled synthetic examples.

at_example_image()
Read a bundled example image
at_example_path()
Path to a bundled example file
at_example_project()
A populated example project
at_example_session()
An example batch session

Concepts

annotatR-classes annot_image annot_roi annot_layer annot_project annot_session annot_mask annot_style annot_summary
annotatR S3 classes
annotatR annotatR-package
annotatR: Multi-Layer Region-of-Interest Annotation for Images and Spectral Cubes