You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This operation requires np.meshgrid or np.indices and can be costly for big shapes. Anyway, the DisplacementField should be immutable and it should be enough to compute the transformation once.
Some ideas
LRU cache
Explicit caching e.g. (self._tx, self._ty)
Optionally pass it in the constructor (assuming it was computed already)
Why relevant?
The primary example is when we download both the section and the expression image. We use the same DisplacementField to warp them, however, transformation is computed twice.
The text was updated successfully, but these errors were encountered:
Whenever one calls
warp
the transformation needs to be computed from the displacements.Atlas-Download-Tools/src/atldld/base.py
Line 319 in 60f0221
This operation requires
np.meshgrid
ornp.indices
and can be costly for big shapes. Anyway, theDisplacementField
should be immutable and it should be enough to compute the transformation once.Some ideas
e.g. (self._tx, self._ty)
Why relevant?
The primary example is when we download both the section and the expression image. We use the same
DisplacementField
to warp them, however,transformation
is computed twice.The text was updated successfully, but these errors were encountered: