Skip to content

Refactor PET-related classes #191

@jhlegarreta

Description

@jhlegarreta

What would you like to see added in this software?

PR #174 finished the implementation of PET-related data, model and estimator classes. The implementations deviated from the base class implementations or did not inherit base class implementations:

  • The data.PET class implements a lofo_split method. However, there is a lovo_split function in the splitting module. The data splitting function used by PET should dwell in splitting and the necessary refactoring/reconciling should take place so that it is sufficiently generic so as to be used by any modality.
  • The data.PET.to_nifti function deviates from the base class signature, and thus, when adding type hinting was attempted in PR STY: Add type hints to PET-related classes and functions #189, mypy complained about this. So the signature should be reconciled with the one from the base class or the latter should be adapted.
  • The statement
    root = in_file["/0"]
    seems to assume some HDF5 file structure that may not be common across modalities. This should be harmonized.
  • The PETEstimator class generates the train/test splits internally. In general, handling the train/test splits should be done by some manager class that is common to all modalities, and thus, should be taken out of the PETEstimator.run function:
    train_dataset = PET(
  • The correction method should probably be made configurable, and default to/offer only the B-Spline method for now. Also, the method itself should probably be refactored into a separate function/class/module.

Do you have any interest in helping implement the feature?

Yes

Additional information / screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions