ANTsPy icon indicating copy to clipboard operation
ANTsPy copied to clipboard

small utilities related to time-series quality assessment

Open stnava opened this issue 1 year ago • 1 comments

These are notes about some utilities that would be useful.

  • implementation of slice time series ( for assessing motion / registration )

time_series_slice(  img_4d ,   pythonic placeholders for axes to sweep over )

probably just a wrapper for slice_image .... more important would be the display of the slice with some relevant annotation. would be something like :

>>> img=ants.image_read("timeseries.nii.gz")
>>> img
ANTsImage
	 Pixel Type : float (float32)
	 Components : 1
	 Dimensions : (90, 104, 72, 420)
	 Spacing    : (2.0, 2.0, 2.0, 0.72)
	 Origin     : (-90.4777, 30.0725, -58.2543, 0.0)
	 Direction  : [ 0.9998  0.0206 -0.0087  0.      0.0219 -0.9783  0.206   0.      0.0043
  0.2061  0.9785  0.      0.      0.      0.      1.    ]

>>> sv1=ants.slice_image(img,1,50)
>>> sv2=ants.slice_image( sv1,0,40)

then add some information about similarity, distortion and/or motion. see below.

  • a simple time series wrapper for image similarity

time_series_metric(  img_4d, optional img_3d , other_params )

if img_3d is present, assess similarity with next neighbor. otherwise similarity against the reference. returns a numpy array (?)

  • deformation quantification ( a single number ) -- this probably exists but not sure ... would likely want something like norm( grad(U) ) ... would want to assess across a time series.

stnava avatar Mar 25 '24 12:03 stnava