def implement(self): b0 = self.getUpsamplingImage('b0', 'upsample') mrtrixMatrix = self.getRegistrationImage("freesurfer_dwi", ["transformation", "mrtrix"], "mat") freesurferToDWI = self.getRegistrationImage("freesurfer_dwi", "transformation", "mat") brodmann = self.getAtlasImage("brodmann") aal2 = self.getAtlasImage("aal2") networks7 = self.getAtlasImage("networks7") brodmannRegister = mriutil.applyRegistrationMrtrix( brodmann, mrtrixMatrix, self.buildName(brodmann, "register")) mriutil.applyResampleFsl(brodmann, b0, freesurferToDWI, self.buildName(brodmann, "resample"), True) aal2Register = mriutil.applyRegistrationMrtrix( aal2, mrtrixMatrix, self.buildName(aal2, "register")) mriutil.applyResampleFsl(aal2, b0, freesurferToDWI, self.buildName(aal2, "resample"), True) networks7Register = mriutil.applyRegistrationMrtrix( networks7, mrtrixMatrix, self.buildName(networks7, "register")) mriutil.applyResampleFsl(networks7, b0, freesurferToDWI, self.buildName(networks7, "resample"), True)
def implement(self): b0 = self.getUpsamplingImage('b0','upsample') mrtrixMatrix = self.getRegistrationImage("freesurfer_dwi", ["transformation", "mrtrix"], "mat") freesurferToDWI = self.getRegistrationImage("freesurfer_dwi", "transformation", "mat") brodmann = self.getAtlasImage("brodmann") aal2 = self.getAtlasImage("aal2") networks7 = self.getAtlasImage("networks7") brodmannRegister = mriutil.applyRegistrationMrtrix(brodmann, mrtrixMatrix, self.buildName(brodmann, "register")) mriutil.applyResampleFsl(brodmann, b0, freesurferToDWI, self.buildName(brodmann, "resample"), True) aal2Register = mriutil.applyRegistrationMrtrix(aal2, mrtrixMatrix, self.buildName(aal2, "register")) mriutil.applyResampleFsl(aal2, b0, freesurferToDWI, self.buildName(aal2, "resample"), True) networks7Register = mriutil.applyRegistrationMrtrix(networks7, mrtrixMatrix, self.buildName(networks7, "register")) mriutil.applyResampleFsl(networks7, b0, freesurferToDWI, self.buildName(networks7, "resample"), True)
def implement(self): b0 = self.getUpsamplingImage('b0','upsample') norm= self.getParcellationImage('norm') anat = self.getParcellationImage('anat', 'freesurfer') aparcAsegFile = self.getParcellationImage("aparc_aseg") wmparcFile = self.getParcellationImage("wmparc") rhRibbon = self.getParcellationImage("rh_ribbon") lhRibbon = self.getParcellationImage("lh_ribbon") tt5 = self.getParcellationImage("tt5") mask = self.getParcellationImage("mask") extraArgs = " -dof 6 " # Because same subject if self.get("methodology", "intrasession"): extraArgs += " -usesqform " freesurferToDWIMatrix = self.__freesurferToDWITransformation(b0, norm, extraArgs) mriutil.applyResampleFsl(anat, b0, freesurferToDWIMatrix, self.buildName(anat, "resample")) mrtrixMatrix = self.__transformFslToMrtrixMatrix(anat, b0, freesurferToDWIMatrix) """ Grey matter parcellation """ mriutil.applyRegistrationMrtrix(aparcAsegFile, mrtrixMatrix, self.buildName(aparcAsegFile, "register")) mriutil.applyResampleFsl(aparcAsegFile, b0, freesurferToDWIMatrix, self.buildName(aparcAsegFile, "resample"), True) """ White matter parcellation """ mriutil.applyRegistrationMrtrix(wmparcFile, mrtrixMatrix, self.buildName(wmparcFile, "register")) mriutil.applyResampleFsl(wmparcFile, b0, freesurferToDWIMatrix, self.buildName(wmparcFile, "resample"), True) lhRibbonRegister = mriutil.applyRegistrationMrtrix(lhRibbon, mrtrixMatrix, self.buildName(lhRibbon, "register")) rhRibbonRegister = mriutil.applyRegistrationMrtrix(rhRibbon, mrtrixMatrix, self.buildName(rhRibbon, "register")) tt5Register = mriutil.applyRegistrationMrtrix(tt5, mrtrixMatrix, self.buildName(tt5, "register")) maskRegister = mriutil.applyRegistrationMrtrix(mask, mrtrixMatrix, self.buildName(mask, "register")) normRegister = mriutil.applyRegistrationMrtrix(norm, mrtrixMatrix, self.buildName(norm, "register")) mriutil.applyResampleFsl(lhRibbon, b0, freesurferToDWIMatrix, self.buildName(lhRibbon, "resample"),True) mriutil.applyResampleFsl(rhRibbon, b0, freesurferToDWIMatrix, self.buildName(rhRibbon, "resample"),True) mriutil.applyResampleFsl(tt5, b0, freesurferToDWIMatrix, self.buildName(tt5, "resample"),True) mriutil.applyResampleFsl(mask, b0, freesurferToDWIMatrix, self.buildName(mask, "resample"),True) mriutil.applyResampleFsl(norm, b0, freesurferToDWIMatrix, self.buildName(norm, "resample"),True)
def implement(self): b0 = self.getUpsamplingImage('b0', 'upsample') norm = self.getParcellationImage('norm') anat = self.getParcellationImage('anat', 'freesurfer') aparcAsegFile = self.getParcellationImage("aparc_aseg") wmparcFile = self.getParcellationImage("wmparc") rhRibbon = self.getParcellationImage("rh_ribbon") lhRibbon = self.getParcellationImage("lh_ribbon") tt5 = self.getParcellationImage("tt5") mask = self.getParcellationImage("mask") extraArgs = " -dof 6 " # Because same subject if self.get("methodology", "intrasession"): extraArgs += " -usesqform " freesurferToDWIMatrix = self.__freesurferToDWITransformation( b0, norm, extraArgs) mriutil.applyResampleFsl(anat, b0, freesurferToDWIMatrix, self.buildName(anat, "resample")) mrtrixMatrix = self.__transformFslToMrtrixMatrix( anat, b0, freesurferToDWIMatrix) """ Grey matter parcellation """ mriutil.applyRegistrationMrtrix( aparcAsegFile, mrtrixMatrix, self.buildName(aparcAsegFile, "register")) mriutil.applyResampleFsl(aparcAsegFile, b0, freesurferToDWIMatrix, self.buildName(aparcAsegFile, "resample"), True) """ White matter parcellation """ mriutil.applyRegistrationMrtrix(wmparcFile, mrtrixMatrix, self.buildName(wmparcFile, "register")) mriutil.applyResampleFsl(wmparcFile, b0, freesurferToDWIMatrix, self.buildName(wmparcFile, "resample"), True) lhRibbonRegister = mriutil.applyRegistrationMrtrix( lhRibbon, mrtrixMatrix, self.buildName(lhRibbon, "register")) rhRibbonRegister = mriutil.applyRegistrationMrtrix( rhRibbon, mrtrixMatrix, self.buildName(rhRibbon, "register")) tt5Register = mriutil.applyRegistrationMrtrix( tt5, mrtrixMatrix, self.buildName(tt5, "register")) maskRegister = mriutil.applyRegistrationMrtrix( mask, mrtrixMatrix, self.buildName(mask, "register")) normRegister = mriutil.applyRegistrationMrtrix( norm, mrtrixMatrix, self.buildName(norm, "register")) mriutil.applyResampleFsl(lhRibbon, b0, freesurferToDWIMatrix, self.buildName(lhRibbon, "resample"), True) mriutil.applyResampleFsl(rhRibbon, b0, freesurferToDWIMatrix, self.buildName(rhRibbon, "resample"), True) mriutil.applyResampleFsl(tt5, b0, freesurferToDWIMatrix, self.buildName(tt5, "resample"), True) mriutil.applyResampleFsl(mask, b0, freesurferToDWIMatrix, self.buildName(mask, "resample"), True) mriutil.applyResampleFsl(norm, b0, freesurferToDWIMatrix, self.buildName(norm, "resample"), True)