def setOutputDirectory(self, defaultDir):
        if not defaultDir:
            outputDir = abspath(curdir)
        elif defaultDir=="tmp":
            outputDir = self.tmpDir
        elif defaultDir=="resampled":
            outputDir = self.resampledDir
        elif defaultDir=="labels":
            outputDir = self.labelsDir
        elif defaultDir=="transforms":
            outputDir = self.transformsDir
        elif defaultDir=="stats":
            outputDir = self.statsDir
        else:
            outputDir = abspath(defaultDir)
        return(outputDir)
    
    #MF TODO: This code is getting a bit repetitive. Lets see if we can't
    # consolidate a bit.
sets output directory based on defaults for each type of call
dataset/ETHPy150Open Mouse-Imaging-Centre/pydpiper/atoms_and_modules/registration_file_handling.py/RegistrationPipeFH.setOutputDirectory