def _load_data(self): """ Interactively loads data from a data set. Adds as new layer """ from glue.qt.glue_application import GlueApplication layers = qtutil.data_wizard() GlueApplication.add_datasets(self.data_collection, layers)
def _choose_load_data(self, data_importer=None): if data_importer is None: self.add_datasets(self.data_collection, data_wizard()) else: data = data_importer() if not isinstance(data, list): raise TypeError("Data loader should return list of Data objects") for item in data: if not isinstance(item, Data): raise TypeError("Data loader should return list of Data objects") self.add_datasets(self.data_collection, data)
def _load_data(self): for data in list(self.data_collection): self.data_collection.remove(data) data = data_wizard() if not data: return self.add_datasets(self.data_collection, data) self.image.add_data(self.data_collection[0]) self.box1.setCurrentIndex(1) self.ui.top_bar.insertWidget(1,self.image.ui.slice._slices[0]._ui_slider)