dahtah / imager

R package for image processing
GNU Lesser General Public License v3.0
187 stars 43 forks source link

split along specified list of values #100

Open norcalbiostat opened 5 years ago

norcalbiostat commented 5 years ago

imsplit() can split along an axis into equal sized segments, but what if the split needs to happen at places that are not equal in length? i.e. at c(10,50,100). is there a way to pass a vector of split locations? And if there's an issue with mismatching dimensions, just pad() all shorter frames to match the largest on the xy dimension?

dahtah commented 5 years ago

That's not supported at the moment, sorry. I'd just use imsub(im,x < cut) recursively (not super efficient, though). Happy to accept a pull request with a better solution!