Closed markus-hinsche closed 1 year ago
I would like to include a LoadImaged which support a custom reader NrrdReader
NrrdReader
transforms: prob: 0.1 mode: [bilinear, nearest] base: LoadImaged: keys: [image, label] reader: [ITKReader, NrrdReader]
This is the current implementation in trainlib:
def get_base_transforms(config: dict) -> List[Callable]: """Transforms applied everytime at the start of the transform pipeline""" tfms = [ get_transform("LoadImaged", config=config, allow_missing_keys=True), get_transform("EnsureChannelFirstd", config=config, allow_missing_keys=True), ] if "base" in config.transforms.keys(): tfm_names = list(config.transforms.base) tfms += [get_transform(tn, config) for tn in tfm_names] return tfms
Problem: When adding a custom LoadImaged, I also have to get the standard LoadImaged by default, which I don't want
LoadImaged
A solution I could think of is: removing default/opinionated transforms (in the tfms list above) as they are but limit other use cases.
tfms
Related: https://github.com/kbressem/transforms/pull/4
I think we discussed this some time ago? Given you are having troubles again with the defaults, it's probably a good idea to change it. Will you do the PR?
I would like to include a LoadImaged which support a custom reader
NrrdReader
This is the current implementation in trainlib:
Problem: When adding a custom
LoadImaged
, I also have to get the standardLoadImaged
by default, which I don't wantA solution I could think of is: removing default/opinionated transforms (in the
tfms
list above) as they are but limit other use cases.Related: https://github.com/kbressem/transforms/pull/4