Skip to content

docs: document in-browser sulcus drawing (pycortex-roidraw v0.4.0)#656

Open
jackgallant wants to merge 2 commits into
mainfrom
claude/document-sulcus-drawing
Open

docs: document in-browser sulcus drawing (pycortex-roidraw v0.4.0)#656
jackgallant wants to merge 2 commits into
mainfrom
claude/document-sulcus-drawing

Conversation

@jackgallant

Copy link
Copy Markdown
Contributor

pycortex-roidraw v0.4.0 draws sulci as well as ROIs. This updates docs/roidraw.rst to cover it, and fixes a stale cross-link title in docs/rois.rst.

Why sulci are worth calling out separately

Drawn ROIs export as a roidraw-native JSON vertex set, independent of the Inkscape ROI-mask system — the existing .. note:: already says so.

Sulci are different, and the docs now say why: they are exported as overlays.svg markup, so they are read by pycortex's own machinery (quickflat's sulci overlay, the WebGL viewer, Inkscape) once the fragment is merged into a subject's overlay file.

The format matches what pycortex already stores, rather than inventing one:

  • open, unfilled <path> elements in a sulci layer — the missing trailing z is the only on-disk marker separating a sulcus from an ROI, since both are fill:none;
  • one inkscape-labeled group per named sulcus, with same-named strokes merged as one <path> per hemisphere, exactly as CaS is stored in filestore/db/S1/overlays.svg;
  • no vertex data, because pycortex stores none — there is no get_sulci_verts, and the only path→vertex mapping in svgoverlay.py is set_coords' data-ptidx on label text.

Changes

  • docs/roidraw.rst — retitled "In-browser ROI and sulcus drawing"; new gesture rows for the ROI | Sulcus selector; open-curve editing behavior (endpoints show one handle and are always corners); an "Export formats" section covering both rois.json and sulci.svg; the .. note:: now distinguishes the two export paths.
  • docs/rois.rst — the .. seealso:: block hardcoded the roidraw page's old title as link text.

Docs-only; no code changes. Simple-table column widths and section underlines checked.

🤖 Generated with Claude Code

jackgallant and others added 2 commits July 9, 2026 00:47
pycortex-roidraw v0.4.0 draws sulci as well as ROIs. Unlike its ROI vertex-set
JSON, sulci export as overlays.svg markup -- open, unfilled paths in a sulci
layer, one inkscape-labeled group per name, same-named strokes merged one path
per hemisphere. So drawn sulci ARE read by pycortex's own machinery once the
fragment is merged into a subject's overlay file, which the note now says.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The seealso block hardcoded the roidraw page's old title as link text.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation to introduce the new in-browser sulcus drawing feature alongside the existing ROI drawing functionality. It details the differences between ROIs (closed curves exported as JSON) and sulci (open curves exported as SVG), and explains how to draw, edit, and export them. Feedback is provided to clarify a sentence in the documentation regarding how the exported SVG fragment is used by pycortex tools like quickflat.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread docs/roidraw.rst
Comment on lines +83 to +84
stored. Merge the fragment into the subject's ``overlays.svg`` and ``quickflat``, the WebGL viewer,
and Inkscape all read it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current phrasing "Merge the fragment into the subject's overlays.svg and quickflat..." can be slightly confusing because quickflat is a Python module/function rather than a file or destination to merge into. Rephrasing this with a semicolon clarifies that quickflat, the WebGL viewer, and Inkscape are the tools that will read the updated overlays.svg file.

Suggested change
stored. Merge the fragment into the subject's ``overlays.svg`` and ``quickflat``, the WebGL viewer,
and Inkscape all read it.
stored. Merge the fragment into the subject's ``overlays.svg``; then ``quickflat``, the WebGL viewer,
and Inkscape will all read it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant