[BUG] Cannot specify non-default interpolator for ANTsRegistrator
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- computer-vision
Research direction
Start at the ANTsRegistrator entry point and trace how transformation_params reaches the registration call, using the provided reproduction with interpolator set to linear. Confirm the duplicate interpolator argument is removed and that registration completes while honoring the requested interpolator; add or run a regression test if the project has one.
Written by the indexing model from the issue text.
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
- Dominant language
- C
- Stars
- 39
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BrainLesion/preprocessing
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
BrainLesion/preprocessing#169 · 7 comments ·
-
bug
BrainLesion/preprocessing#192 · 4 comments · 1 assignee ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
BrainLesion/preprocessing#190 ·
-
bug
BrainLesion/preprocessing#188 · 1 reaction · 2 assignees ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
BrainLesion/preprocessing#185 ·
All issues in BrainLesion/preprocessing
Similar issues
-
os:linux
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
mpv-player/mpv#18510 · 2 comments ·
-
internal.h中,漏掉了1个定义。 Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
kovidgoyal/kitty#10516 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100