Changelog
Source:NEWS.md
neurosurf (development version)
Bug fixes
series()on aNeuroSurfaceVectornow returns aT x length(i)matrix (time in rows, vertices in columns) for a single integer index, as it already did for double indices and asneuroim2::series()does forNeuroVec. Previouslyseries(x, 2L)returned1 x Twhileseries(x, 2)returnedT x 1; this also madeseries_roi(x, <single integer>)fail with an invalidROISurfaceVector. Code that relied on the old1 x Tresult for a single integer index must drop its transpose (#93).neighbor_graph()on aSurfaceGeometrynow accepts double-stored node indices (e.g.nodes = c(1, 2)) as well as integer ones; previously only integernodeshad a method and doubles failed dispatch (#93).
Documentation
conn_comp()andcluster_threshold()now document thatthresholdis two-tailed: vertices with values<= threshold[1]or>= threshold[2]are retained (#94).SurfaceSearchlight()now documents thatdistance_typedefaults to"euclidean"(not geodesic, as its title andradiusdocs claimed), and that this differs fromneighbor_graph()andRandomSurfaceSearchlight(), which use geodesic distance. The default itself is unchanged (#94).series()documents its return orientation correctly:T x length(i)for aNeuroSurfaceVectorand1 x length(i)for aNeuroSurface(#94).The Rd file for the
FreesurferSurfaceGeometryMetaInfoclass is now namedman/FreesurferSurfaceGeometryMetaInfo-class.Rd, matching the name roxygen generates. The tracked file still used the oldFreeSurfer...casing, sodevtools::document()deleted it on case-insensitive filesystems and renamed it on case-sensitive ones. The class name is unchanged (#95).
Searchlights and continuous integration
-
RandomSurfaceSearchlight()now acceptsdistance_type, with geodesic as its default.SurfaceSearchlight()keeps its Euclidean default to preserve existing analyses. Pass the same metric explicitly to both constructors when comparing sampling strategies. Existing positional calls are unchanged (#96). - The pkgcheck workflow is advisory: it retains the rOpenSci findings and reports failures in the log and job summary without failing the workflow. R CMD check remains the package check. The pkgcheck job now sets
RGL_USE_NULL=TRUEbefore installation for headless runners (#97).
neurosurf 0.1.0
Interactive report scenes
The bundled surfview runtime is repinned to surfviewjs 2d9f786. Report scenes gain an anatomical whole-brain layout with a data-driven overview pose, a
reportpreset (sulcal two-tone underlay, camera-attached lighting, anti-aliased threshold isolines), overlay-aware camera framing, and fixes for self-overlap artefacts on inflated surfaces, ignored curvature restyling, and hover picks that reported a hidden hemisphere. The runtime patch is now empty: every former patch hunk is upstream.The bundled surfview runtime is repinned to surfviewjs 1dfed43. Threshold edges are drawn one-sided, between shown and hidden vertices; picking only hits surfaces that are drawn (GPU pick meshes carry their source surface’s layers, and the selected surface wins ties); figure export uses the viewer background and the active layer’s colour key, including dual-threshold and volume layers. The widget dependency version is bumped to 2.2.0.9002 so browsers do not serve the previous bundle from cache.
Parcel maps
- New publication parcel-map renderer:
prepare_surface_parcels()andrender_surface_parcels()rasterize a labelled surface with deferred per-pixel shading. Parcel boundaries follow smoothed label memberships, so they are smooth and antialiased rather than stair-stepped along triangle edges; the underlay combines a sulcal-depth proxy with soft Lambert lighting; filled parcels get a thin outline and the medial wall is drawn flat.surface_parcel_style()collects the settings, andsurface_sulcal_proxy()estimates sulcal depth from white and inflated meshes.
Static surface figures
render_surface_rgba() and surface_figure() produce substantially better figures by default:
- Surfaces are lit with interpolated normals (two-light Blinn-Phong with hemispheric ambient), so cortical form is visible.
lighting = FALSErestores flat rendering; a named list tunes it. Overlay shading is normalized so camera-facing overlay matches the colour bar. - Coarse meshes are subdivided for display (
subdivide = "auto") with an interpolating butterfly scheme. Original vertex values are preserved and new values are clamped to their edge’s endpoints, so no suprathreshold region appears that linear interpolation would not show. - Palettes span only the suprathreshold range, so the weakest displayed value is clearly coloured. New defaults suit each
tail; the positive palette runs light to dark. - The anatomy underlay is lighter, with sulci darker than gyri.
anatomy_invert = "auto"detects metrics that are larger in sulci (FreeSurfersulc,curv) and inverts them. - The silhouette contour is anti-aliased, the default background is white, and the default supersampling is 3.
- Medial views are now true camera views (the left hemisphere’s anterior pole is on the right). Previously they were mirror images.
-
surface_figure()shows dorsal and ventral views of both hemispheres in one bilateral panel beside the lateral/medial rows, adds hemisphere and view headers (labels), and draws a colour bar with only the suprathreshold segments, labelled at limits and thresholds. - Overlay colour stays within a few percent of its colour-bar colour at any viewing angle; lighting conveys form, the palette conveys value.
- Bilateral dorsal and ventral panels carry anterior/posterior markers.
Templates and I/O
- The fsaverage5 template (inflated and white surfaces, sulcal depth) is bundled:
load_fsaverage("fsaverage5")andload_fsaverage_sulc(). The README and figure vignette use it instead of the legacy std.8 mesh. -
read_surf_geometry()reads gzipped GIFTI (.gii.gz) surfaces; it previously failed on them.
Package distribution
- Initial CRAN submission.
- Require CRAN neuroim2 0.19.1. Replace the unattributed optional downloads with small synthetic GIFTI/NIML fixtures generated locally in a versioned cache.
neurosurf_download_testdata()remains a compatibility wrapper. - Ship compact vignettes and complete viewer source and third-party notices.