Package: petdeface
petdefaceA nipype implementation of an anatomical MR and PET defacing pipeline for BIDS datasets. This is a working prototype,
in active development denoted by the 0.x.x version number. However, it is functional and can be used to deface PET and
MR data as well as co-register the two modalities. Use is encouraged and feedback via Github issues or email toopenneuropet@gmail.comis more than welcome. As is often the case this medical research software is constrained
to testing on data that its developers have access to.This software can be installed via source or via pip from PyPi.RequirementsNon-Python DependenciesFreeSurfer and MiDeFAce >= 7.3.2https://surfer.nmr.mgh.harvard.edu/https://surfer.nmr.mgh.harvard.edu/fswiki/MiDeFacePython Dependenciesnipype >= 1.6.0https://nipype.readthedocs.io/en/latest/pybidsfor a full list of dependencies see the pyproject.toml in this repoUsageusage:petdeface.py[-h][--output_dirOUTPUT_DIR][--anat_only][--subjectSUBJECT][--sessionSESSION][--docker][--n_procsN_PROCS][--skip_bids_validator][--version][--placementPLACEMENT][--remove_existing]input_dir

PetDeface

positionalarguments:input_dirThedirectorywiththeinputdataset

options:-h,--helpshowthishelpmessageandexit--output_dirOUTPUT_DIR,-oOUTPUT_DIRThedirectorywheretheoutputfilesshouldbestored--anat_only,-aOnlydefaceanatomicalimages--subjectSUBJECT,-sSUBJECTThelabelofthesubjecttobeprocessed.--sessionSESSION,-sesSESSIONThelabelofthesessiontobeprocessed.--docker,-dRunindockercontainer--n_procsN_PROCSNumberofprocessorstousewhenrunningtheworkflow--skip_bids_validator--version,-vshowprogram's version number and exit--placement PLACEMENT, -p PLACEMENTWhere to place the defaced images. Options are'adjacent': next to the input_dir (default) in a folder appended with _defaced'inplace': defaces the dataset in place, e.g. replaces faced PET and T1w imagesw/ defaced at input_dir'derivatives':doesallofthedefacingwithinthederivativesfolderininput_dir.--remove_existing,-rRemoveexistingoutputfilesinoutput_dir.DevelopmentThis project uses poetry to package and build, to create a pip installable version of the package run:gitclonehttps://github.com/openneuropet/petdeface.gitcdpetdeface
poetrybuild
pipinstalldist/petdeface-<X.X.X>-py3-none-any.whl# where X.X.X is the version number of the generated fileThen install the tar or wheel file created indist:pipinstallpetdeface-<X.X.X>-py3-none-any.whl# where X.X.X is the version number of the generated fileCitationsDale A, Fischl B, Sereno MI. Cortical Surface-Based Analysis: I. Segmentation and Surface Reconstruction.
Neuroimage. 1999;9(2):179–94. doi:10.1006/nimg.1998.0395.Gorgolewski, Krzysztof J. ; Esteban, Oscar ; Burns, Christopher ; Ziegler, Erik ; Pinsard, Basile ; Madison, Cindee ;
Waskom, Michael ; Ellis, David Gage ; Clark, Dav ; Dayan, Michael ; Manhães-Savio, Alexandre ;
Notter, Michael Philipp ; Johnson, Hans ; Dewey, Blake E ; Halchenko, Yaroslav O. ; Hamalainen, Carlo ;
Keshavan, Anisha ; Clark, Daniel ; Huntenburg, Julia M. ; Hanke, Michael ; Nichols, B. Nolan ; Wassermann , Demian ;
Eshaghi, Arman ; Markiewicz, Christopher ; Varoquaux, Gael ; Acland, Benjamin ; Forbes, Jessica ; Rokem, Ariel ;
Kong, Xiang-Zhen ; Gramfort, Alexandre ; Kleesiek, Jens ; Schaefer, Alexander ; Sikka, Sharad ;
Perez-Guevara, Martin Felipe ; Glatard, Tristan ; Iqbal, Shariq ; Liu, Siqi ; Welch, David ; Sharp, Paul ;
Warner, Joshua ; Kastman, Erik ; Lampe, Leonie ; Perkins, L. Nathan ; Craddock, R. Cameron ; Küttner, René ;
Bielievtsov, Dmytro ; Geisler, Daniel ; Gerhard, Stephan ; Liem, Franziskus ; Linkersdörfer, Janosch ;
Margulies, Daniel S. ; Andberg, Sami Kristian ; Stadler, Jörg ; Steele, Christopher John ; Broderick, William ;
Cooper, Gavin ; Floren, Andrew ; Huang, Lijie ; Gonzalez, Ivan ; McNamee, Daniel ; Papadopoulos Orfanos, Dimitri ;
Pellman, John ; Triplett, William ; Ghosh, Satrajit (2016). Nipype: a flexible, lightweight and extensible
neuroimaging data processing framework in Python. 0.12.0-rc1. Zenodo. 10.5281/zenodo.50186