These are chat archives for thunder-project/thunder
Series(respectively), perhaps what you're looking for?
Imagesobject? In that case: it's not yet implemented, but we can discuss whether to add methods for it, or just make use of it within an analysis routine.
Imagesobject. This comes up in the Lucas-Kanade registration algorithm where we need to solve a linear system that has dimensions
nparams. I need to view the volume both in its vectorized and unvectorized forms in the
getTransformmethod that is applied via a
map, so this reshaping method shouldn't be part of
Images. Here's a snippet showing a hacky function that converts back and forth between vectors and volumes: https://gist.github.com/poolio/9a923135a70843c79691
Imagesitself, versus possibly just contained within the registration algo that you're working on?
images.applyValues(np.ravel)to go from volume to vector, then
images.applyValues(lambda vec: np.reshape(vec, orig_shape_tuple)for the reverse operation. Haven't actually tried this myself, YMMV. :)
getTransformmethod. That function you posted looks perfectly reasonable, and a natural place for it (and its counterpart) would be inside
imgprocessing/regmethods/utils.py. My guess is you won't want to call it via
images.applyValuesbecause it'll be specific to this reg method, and once you are inside the reg-method-specific
getTransformyou're working on a single record, not the original
imgprocessing/regmethods/utils.py. Related, there are a bunch of volume processing methods that I can't decide where to put. Thinks like applying a gaussian filter, zeroing out a border, resizing a volume. Should that also go in
utils.py? I think these could be more generally useful outside registration, but I don't think they should be methods of
Imagesbecause they are simple functions that could be applied to individual volumes and not just RDDs.
regmethods/utils.pyfor now as functions that work on images / volumes. We can always later add methods to
Imagesthat call these functions. But this way you can use them on single volumes within registration as well. Also note that there are already
Imagesthat basically just call out to
scipyfunctions, so this would be in a similar spirit.
result = regressmodel.fit(imDat), how can I get the betas out of
resultwill have N items, where N is equal to the number of entries in
result.index, so if
result.index = 'betas'then I can just just get the betas of the first entry via e.g.