Skip to content

gdevenyi/minc-diff-labels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Idea for diffing label sets in MINC.

Use the extra dimensionality to store labels as a "time" dimension. This could be an arbitrary dimension name, but time allows viewing in Display/register.

Usage

Create a diff:

$ diff-labels.sh old.mnc new.mnc diff.mnc

Apply a diff

$ patch-labels.sh old.mnc diff.mnc new.mnc

How this tool works:

Steps to compute a diff:

  1. Use minclookup to split up two label sets to diff. One file per label, all values 1
  2. Use minccalc to do "new - old"
  • 0 no change
  • 1 added voxel
  • -1 removed voxel

This creates a per-voxel index of changes to label set.

  1. Stack these labels in a time dimension using mincconcat, use the label numbers as the time coordinates

Steps to apply a diff:

  1. Split input label set into one file per label.
  2. Split out time dimension on diff into per file diffs
  3. Apply diff to label file using minccalc, multiply by label value
  4. Merge label files back into a single file

About

Implementation to diff MINC label files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages