Skip to content

mutable or immutable of ImageSource Class  #208

@junchaoxia

Description

@junchaoxia

The original design of ImageSource class targets an immutable class which prevents the change of class variables and metadata. However, this is not exactly followed such as in the downsample function that resets the class variable L for the image size due to the downsampling and in whitening function that modifies the type of CTF filters. The reset of L can cause crash in the Simulation class when the clear images need to be reconstructed at different stages. We have a few options need to be discussed.

  1. Use additional variable such as _L for the original image size.
  2. Implement the clone method to generate new object when changing values of variables is needed.
  3. Derive new ImageSource class for each submodule or preprocess step such as the DenoisedImageSource class.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions