[BUG] Cannot specify non-default interpolator for ANTsRegistrator
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
ANTsRegistrator のエントリーポイントから開始し、interpolator を linear に設定した、提供されている再現手順を使って、transformation_params がどのように registration call に到達するかを追跡してください。重複した interpolator 引数が削除され、要求された interpolator を尊重して registration が完了することを確認してください。プロジェクトに回帰テストがある場合は、それを追加するか実行してください。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- C
- スター
- 39
- フォーク
- 11
- 平均マージ
- 13時間 40分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
BrainLesion/preprocessing のほかの issue
-
[BUG] Zenodo api error response not saved nor displayed対応中かも @rtmalikian が 118 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
BrainLesion/preprocessing#169 · コメント 7 件 ·
-
[BUG] ANTsRegistrator resamples MRI modalities with nearest-neighbor interpolation by default対応中かも @LMZimmer が 26 日前に担当しました。 オープンbug
BrainLesion/preprocessing#192 · コメント 4 件 · 担当者 1 名 ·
-
[BUG] HTTP error responses from Zenodo bypass the "use local copy" fallback対応中かも @ErikGro が 37 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
BrainLesion/preprocessing#190 ·
-
[BUG] cannot import ANTSRegistrator再び着手できるかも @neuronflow が 62 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
BrainLesion/preprocessing#188 · リアクション 1 件 · 担当者 2 名 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
BrainLesion/preprocessing#185 ·
BrainLesion/preprocessing の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fluent/fluent-bit#12579 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
obsproject/obs-studio#14036 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100