-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0659783
commit 70afb52
Showing
6 changed files
with
29 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from clinica.pipelines.engine import Pipeline | ||
|
||
|
||
class PETPipeline(Pipeline): | ||
def _check_pipeline_parameters(self) -> None: | ||
"""Check pipeline parameters.""" | ||
if "acq_label" not in self.parameters.keys(): | ||
raise KeyError("Missing compulsory acq_label key in pipeline parameter.") | ||
self.parameters.setdefault("reconstruction_method", None) | ||
|
||
def _get_pet_scans_query(self) -> dict: | ||
"""Return the query to retrieve PET scans.""" | ||
from clinica.utils.input_files import bids_pet_nii | ||
from clinica.utils.pet import ReconstructionMethod, Tracer | ||
|
||
pet_tracer = None | ||
if self.parameters["acq_label"] is not None: | ||
pet_tracer = Tracer(self.parameters["acq_label"]) | ||
|
||
reconstruction_method = None | ||
if self.parameters["reconstruction_method"] is not None: | ||
reconstruction_method = ReconstructionMethod( | ||
self.parameters["reconstruction_method"] | ||
) | ||
|
||
return bids_pet_nii(pet_tracer, reconstruction_method) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters