def fullLayerFile(self): fulllayer_file = os.path.join(self._character_dir, "FullLayer.png") if os.path.exists(fulllayer_file): return fulllayer_file if len(datasetFiles(self._character_dir)) == 0: return None return datasetFiles(self._character_dir)[0]
def layerFiles(self): layer_files = datasetFiles(self._character_dir) layer_files = [ layer_file for layer_file in layer_files if not "FullLayer" in layer_file ] return layer_files
def __init__(self, name="", dataset_name=""): target_dir = datasetDir(dataset_name) super(DatasetBatch, self).__init__(name, target_dir) self._dataset_name = dataset_name self._data_name = "" self._data_file_name = "" self._data_file = "" self._result_root = subDirectory(self._target_dir, "results/" + self._name) self._dataset_files = datasetFiles(self._target_dir) self._data_file_id = 0
def layerFiles(self): layer_files = datasetFiles(self._character_dir) layer_files = [layer_file for layer_file in layer_files if not "FullLayer" in layer_file] return layer_files
def colorMapFiles(): return datasetFiles(colorMapDatasetDir(), file_filter=".png")
def shapeResultFiles(result_name): result_dir = shapeResultDir(result_name) return datasetFiles(result_dir, file_filter=".png")
def shapeFiles(): return datasetFiles(shapeDatasetDir(), file_filter=".png")