-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Specifying transformation_params={'interpolator': 'linear'} when instantiating ANTsRegistrator results in a Type Error when performing registration.
TypeError: ants.registration.apply_transforms.apply_transforms() got multiple values for keyword argument 'interpolator'
To Reproduce
from brainles_preprocessing.brain_extraction import HDBetExtractor
from brainles_preprocessing.constants import Atlas
from brainles_preprocessing.modality import Modality, CenterModality
from brainles_preprocessing.preprocessor import (
AtlasCentricPreprocessor,
)
from brainles_preprocessing.registration import ANTsRegistrator
from brainles_preprocessing.n4_bias_correction import SitkN4BiasCorrector
center_params = {} #your center modality params here
center_modality = CenterModality(**center_params)
mod1_params = {} #your modality 1 params here
modality_1 = Modality(**mod1_params)
mod2_params = {} #your modality 2 params here
modality_2 = Modality(**mod2_params)
mod3_params = {} #your modality 3 params here
modality_3 = Modality(**mod3_params)
modalities = [modality_1, modality_2, modality_3]
preprocessor = AtlasCentricPreprocessor(
center_modality=center_modality,
moving_modalities=modalities,
registrator=ANTsRegistrator(transformation_params={'interpolator': 'linear'}),
brain_extractor=HDBetExtractor(),
n4_bias_corrector=SitkN4BiasCorrector(),
atlas_image_path=Atlas.BRATS_MNI152,
)
preprocessor.run()Expected behavior
No error is raised as the ability to specify the interpolator is an expected feature.
Environment
operating system and version?
python 3.12 on debian bookworm container.
NVIDIA drivers and GPUs
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.126.18 Driver Version: 580.126.18 CUDA Version: 13.0 |
+-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3060 Off | 00000000:08:00.0 On | N/A |
| 0% 45C P8 20W / 170W | 2478MiB / 12288MiB | 49% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
Python environment and version?
python 3.12 on debian bookworm container
version of brainles_preprocessing ?
0.6.10
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working