Skip to content

CLOrient3D lazy eval #1099

@garrettwrong

Description

@garrettwrong

In CLOrient3D.__init__, the final step is _build which includes the following code:

    def _build(self):
...
        imgs = self.src.images[:]

....
        self.pf = self.pft.transform(imgs)
....
        self.pf = self.pf[:, :, 1:]

Probably not be worth building out batching at this time, since we expect the total number of images at this stage to be manageable.

It would be preferable if the (pf) images are generated when the OrientedSource calls for the estimated rotations (ie when the source is asked to serve up images).

I think this might just involve moving pf to an attribute that is generated on first touch. Or perhaps delaying the call to _build to first touch. Requires inspecting the classes.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions