def invert_seg(self):
        for dic_slice in self.slices:
            im_dic = Image(param=dic_slice.im)
            sc = im_dic.copy()
            nz_coord_sc = sc.getNonZeroCoordinates()
            im_seg = Image(param=dic_slice.gm_seg)
            '''
            nz_coord_d = im_seg.getNonZeroCoordinates()
            for coord in nz_coord_sc:
                sc.data[coord.x, coord.y] = 1
            for coord in nz_coord_d:
                im_seg.data[coord.x, coord.y] = 1
            # cast of the -1 values (-> GM pixel at the exterior of the SC pixels) to +1 --> WM pixel
            inverted_slice_decision = np.absolute(sc.data - im_seg.data).astype(int)
            '''
            inverted_slice_decision = inverse_gmseg_to_wmseg(im_seg, im_dic, save=False)
            dic_slice.set(wm_seg=inverted_slice_decision.data)

    # ------------------------------------------------------------------------------------------------------------------
Start a gluster volume.
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/dev/sct_segment_gray_matter_asman/2015-08-17-full_scripts_before_cleaning/sct_asman.py/ModelDictionary.invert_seg--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/glusterfs.py/start_volume