diff --git a/TEST/NoseTests/test_write.py b/TEST/NoseTests/test_write.py index dd53bb0..78810c8 100644 --- a/TEST/NoseTests/test_write.py +++ b/TEST/NoseTests/test_write.py @@ -8,7 +8,7 @@ from bidsmanager.write.dataset_writer import write_dataset from bidsmanager.read import read_csv, read_dataset from bidsmanager.utils.utils import read_json, read_tsv -from bidsmanager.base import DataSet, Subject, Session, Image, FunctionalImage +from bidsmanager.base import DataSet, Subject, Session, Image def get_script_directory(): diff --git a/bidsmanager/base/__init__.py b/bidsmanager/base/__init__.py index de43f9e..ab1e7a9 100644 --- a/bidsmanager/base/__init__.py +++ b/bidsmanager/base/__init__.py @@ -1,4 +1,4 @@ from .subject import Subject from .session import Session from .dataset import DataSet -from .image import Image, FunctionalImage +from .image import Image diff --git a/bidsmanager/base/group.py b/bidsmanager/base/group.py index 55bba05..bdffc31 100644 --- a/bidsmanager/base/group.py +++ b/bidsmanager/base/group.py @@ -1,4 +1,3 @@ -from .image import FunctionalImage from .base import BIDSFolder diff --git a/bidsmanager/base/image.py b/bidsmanager/base/image.py index a014efd..91852b8 100644 --- a/bidsmanager/base/image.py +++ b/bidsmanager/base/image.py @@ -245,12 +245,4 @@ def update_diffusion_files(self, move=False): self.update_bvec(move=move) -class FunctionalImage(Image): - def __init__(self, *inputs, **kwargs): - super(FunctionalImage, self).__init__(*inputs, **kwargs) - - def is_match(self, task_name=None, **kwargs): - return (not task_name or task_name == self.get_task_name()) and super(FunctionalImage, self).is_match(**kwargs) - - image_entities = ("task", "acq", "ce", "dir", "rec", "run", "echo") diff --git a/bidsmanager/utils/image_utils.py b/bidsmanager/utils/image_utils.py index 299de5f..d420310 100644 --- a/bidsmanager/utils/image_utils.py +++ b/bidsmanager/utils/image_utils.py @@ -1,15 +1,8 @@ -from bidsmanager.base.image import FunctionalImage, Image +from bidsmanager.base.image import Image def load_image(path_to_image, modality=None, acquisition=None, task_name=None, run_number=None, path_to_sidecar=None, bval_path=None, bvec_path=None, metadata=None, **entities): - if modality == "bold": - return FunctionalImage(modality=modality, - path=path_to_image, - sidecar_path=path_to_sidecar, - metadata=metadata, - **entities) - else: - return Image(modality=modality, path=path_to_image, - sidecar_path=path_to_sidecar, metadata=metadata, bval_path=bval_path, bvec_path=bvec_path, - **entities) + return Image(modality=modality, path=path_to_image, + sidecar_path=path_to_sidecar, metadata=metadata, bval_path=bval_path, bvec_path=bvec_path, + **entities)