ANTsX / ANTsR

R interface to the ANTs biomedical image processing library
https://antsx.github.io/ANTsR
Apache License 2.0
127 stars 35 forks source link

plot.antsImage taking too long #334

Open muratmaga opened 3 years ago

muratmaga commented 3 years ago

Describe the bug I have a series of volumes and a label maps that I want to create cross-sections. Each plot is taking about a minute to produce with the command below. While volumes are largish (400x451x678), I still this a bit too slow. Is there anything I can do increase the speed?

plot(img, label, nslices=21, ncolumns=7, alpha = .8, outname = outs[i])

stnava commented 3 years ago

the quality parameter will have an impact on speed. I don't recall if higher => slower or faster but some quick experiments should help figure that out.

other than that, plotting directly to png is generally faster but I believe that's what you are doing anyway.

overall, ants.plot needs an overhaul, for sure. it was written in the early days of ANTsR ( 2012 or 2013 ) so it's probably sub-optimal.