fixed variable initialization for different 3d modes ... otherwise local global vars were not initialized if chan-vese was run first