Skip to content

Rewrite MATLAB import functions with readtable()#345

Open
Jerry1144 wants to merge 4 commits into
trackmate-sc:masterfrom
Jerry1144:rewrite-in-readtable
Open

Rewrite MATLAB import functions with readtable()#345
Jerry1144 wants to merge 4 commits into
trackmate-sc:masterfrom
Jerry1144:rewrite-in-readtable

Conversation

@Jerry1144

@Jerry1144 Jerry1144 commented May 27, 2026

Copy link
Copy Markdown

Another path to #343, rewriting trackmateSpots.m with readtable() function. Shifting to MATLAB's own capabilities helps alleviate Java heap size problems.

Specific to this path:

  1. To read through the file as few time as possible, call trackmateFeatureDeclarations.m for the initial validity check, and directly construct XMLImportOptions instead of calling detectImportOptions() where possible.
  • There's a commented-out section of "reading the first Spot node for attributes", as that requires detectImportOptions(). Instead I consult the feature map. Doing so shaves off ~15% run time and 10GB memory use(!)
  1. trackmateFeatureDeclarations.m only looks at EdgeFeatures and TrackFeatures when the output argument requested them.
  • trackmateSpots.m
  • trackmateFeatureDeclarations.m
  • trackmateEdges.m very inefficient. Consider walking the DOM tree manually.
  • trackmateGraph.m
  • trackmateImageCalibration.m Won't do It's silly not to handle the DOM tree manually.

Jerry1144 added 2 commits May 26, 2026 21:14
Rewritten trackmateSpots.m with `readtable()` function.

To support its function, trackmateFeatureDeclarations.m is rewritten too.

Shifting to MATLAB's own capabilities helps alleviate heap size problems.
Fix bug: switch should work on MException's identifier.
Jerry1144 added 2 commits June 3, 2026 13:10
Each track is read once with readtable(). Very slow and memory hungry.

Owing to XPath 1.0's limitations, it's not possible to record the parent node
when a child node is selected. Thus the obviously efficient solution of reading
once and sub-dividing later cannot be taken.
Minor changes to call *R21a.m functions.
@Jerry1144 Jerry1144 changed the title [WIP] Rewrite MATLAB import functions with readtable() Rewrite MATLAB import functions with readtable() Jun 3, 2026
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