def coregister_data(self,  transfo_to_apply=None):
        list_im = [dic_slice.im for dic_slice in self.slices]
        list_gm_seg = [dic_slice.gm_seg for dic_slice in self.slices]

        for dic_slice in self.slices:
            for n_transfo, transfo in enumerate(transfo_to_apply):
                im_m = apply_ants_transfo(self.compute_mean_dic_image(list_im), dic_slice.im, search_reg=False, transfo_name=dic_slice.reg_to_M[n_transfo], binary=False, path=self.param.model_dir+'/', transfo_type=transfo, metric=self.param.reg_metric)
                gm_seg_m = apply_ants_transfo(compute_majority_vote_mean_seg(list_gm_seg), dic_slice.gm_seg, search_reg=False, transfo_name=dic_slice.reg_to_M[n_transfo], binary=True, path=self.param.model_dir+'/', transfo_type=transfo, metric=self.param.reg_metric)
                # apply_2D_rigid_transformation(self.im[j], self.RM[j]['tx'], self.RM[j]['ty'], self.RM[j]['theta'])

            dic_slice.set(im_m=im_m)
            dic_slice.set(gm_seg_m=gm_seg_m)
            dic_slice.set(im_m_flat=im_m.flatten())

        # Delete the directory containing the transformations : They are not needed anymore
        for transfo_type in transfo_to_apply:
            transfo_dir = transfo_type.lower() + '_transformations'
            if transfo_dir in os.listdir(self.param.model_dir + '/'):
                sct.run('rm -rf ' + self.param.model_dir + '/' + transfo_dir + '/')

    # ------------------------------------------------------------------------------------------------------------------
Retrieves first page of group members of the group.
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/dev/sct_segment_gray_matter_asman/2015-08-17-full_scripts_before_cleaning/sct_asman.py/ModelDictionary.coregister_data--crossover with--dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/apps/groups/client.py/GroupsProvisioningClient.retrieve_page_of_members