Example #1
0
                print "To check usage, run: python extract.py"
                sys.exit()
            SulciThld = float(p)
        else:
            print "[ERROR] Option", o, "is unrecognized. Please check usage."
            sys.exit()

    return SurfFile, ThickFile, CurvFile, ConvFile,\
        FundiVTK, PitsVTK, SulciVTK, Use, SulciThld

if __name__ == "__main__":
    import sys, getopt # this line imports pulic libraries
    import libfundi

    try:
        opts, args = getopt.getopt(sys.argv[1:],"",["thick=","conv=","fundi=", "pits=","sulci=", "curv=", "use=", "sulciThld="])
    except getopt.GetoptError, err:
        print str(err) # will print something like "option -a not recognized"
    #    print_help()
        print "To check usage, run: python extract.py"
        print "If you use options like --second, --pits2, --fundi2, --sulci2,",
        "please note that we have disabled mapping features onto secondary surface.",
        "Please check maps_to_second_surface.py under utils directory to do so."
        sys.exit(2)
    
    check_opt(opts, args)
    InputFiles = process_opt(opts, args)
    
    # new unified extraction function Forrest 2011-10-08 
    libfundi.getFeatures(InputFiles, 'FreeSurfer', '')
Example #2
0
#            print "  [Output] Sulci on 2nd surface in:" + OutputColor + Sulci2VTK + EndColor


 


    return VTKFile, ThickFile, ConvexFile, MeanCurvVTK, GaussCurvVTK,\
        FundiVTK, PitsVTK, SulciVTK,\
        SulciThld, Clouchoux

if __name__ == "__main__":
    # this script extracts fundi/pits/sulci from a VTK file from the output from Joachim's code
    
    import libfundi # this line imports my own library

    try:
        opts, args = getopt.getopt(sys.argv[1:],"h",
                                   ["clouchoux", "help","thick=", "convex=","fundi=","pits=","sulci=","sulciThld=","meancurv=", "gausscurv="])
    except getopt.GetoptError, err:
        print str(err) # will print something like "option -a not recognized"
        print "   Please run [python vtk_extract.py -h] or [python vtk_extract.py --help] to get the usage."
        print "If you use options like --second, --pits2, --fundi2, --sulci2,",
        "please note that we have disabled mapping features onto secondary surface.",
        "Please check maps_to_second_surface.py under utils directory to do so."
        sys.exit(2)
    check_opt(opts, args)
    
    InputArguments = process_opt(opts, args)
    
    libfundi.getFeatures(InputArguments, 'vtk','')