import analysis
import sys
import os
import getData
import json
import config
import segmentation


def main(configFile):
   with open(configFile,'r') as f:
      xsetup=json.load(f)
   db,fb=getData.connectDB(xsetup['network'])

   summaryIVF=analysis.summaryPixelIVF(db,fb,xsetup)
   analysis.storeIVF(db,xsetup,summaryIVF)


if __name__=="__main__":
   main(sys.argv[1])
