confrim names

This commit is contained in:
copper 2022-11-11 16:36:38 +08:00
parent 1762e760ef
commit 429221ecf0
6 changed files with 11 additions and 8 deletions

View File

@ -1 +1 @@
wd1l4X/jr1cgW76fh50mc7p7gK2TwB6Mmn5Pcgdo3xJFxcfLcDFFQP5t0OpPv9oLnDe2zLQtNmjLkdTI3dwx4iQnBkfBeYX6/2V2A3Y1fzOVR35NoDNIhsu7qH7XD76gpyI20cRA6K4EKvIUMFwaVRBJjT7j6uJn74X4MtcixBhTvHJKrLzTF2AXDcSDyEVz
vd4FiYncytyziGH9GNCAA8hGGr1/79Xmphtc5+PHPJDpxvqj1hP7+985QMojYO4M5Qn/aqEAvFgeDN3CA8x1YAK8SdCgSXSBJpRBK8wqPQjBY1ak96QfdPCrTLunr+xuPxK3Gxe772adTTsee2+ot7WePYUsC4y4NcS5+rlP1if87xtYqVeSwx3c64cOmAGP

View File

@ -111,7 +111,8 @@ class EvaluationPlugin(BasicPlugin):
if pred_band is None or gt_band is None:
return
# import pdb
# pdb.set_trace()
if pred_ds.RasterXSize != gt_ds.RasterXSize or pred_ds.RasterYSize != gt_ds.RasterYSize:
self.send_message.emit('真值与预测结果大小不匹配')
return

View File

@ -94,7 +94,7 @@ class BilaterFilter(AlgFrontend):
ds = gdal.Open(pth)
band_count = ds.RasterCount
name = os.path.splitext(os.path.basename(pth))[0]
out_path = os.path.join(Project().other_path, '{}_bilater_filter_{}.tif'.format(name, format_now()))
out_path = os.path.join(Project().other_path, '{}_{}_{}.tif'.format(name, BilaterFilter.get_name(), format_now()))
out_ds = gdal.GetDriverByName('GTiff').Create(out_path, ds.RasterXSize, ds.RasterYSize, band_count, ds.GetRasterBand(1).DataType)
out_ds.SetProjection(ds.GetProjection())
out_ds.SetGeoTransform(ds.GetGeoTransform())

View File

@ -100,7 +100,7 @@ class MainPlugin(BasicPlugin):
# # self.action.setChecked(False)
# self.action.triggered.connect(self.run)
# ActionManager().filter_menu.addAction(self.action)
# self.alg_ok.connect(self.alg_oked)
self.alg_ok.connect(self.alg_oked)
# basic

View File

@ -77,8 +77,8 @@ class MeanFilter(AlgFrontend):
ds = gdal.Open(pth)
band_count = ds.RasterCount
out_path = os.path.join(Project().other_path, 'mean_filter_{}.tif'.format(format_now()))
name = os.path.splitext(os.path.basename(pth))[0]
out_path = os.path.join(Project().other_path, '{}_{}_{}.tif'.format(name, MeanFilter.get_name(), format_now()))
out_ds = gdal.GetDriverByName('GTiff').Create(out_path, ds.RasterXSize, ds.RasterYSize, band_count, ds.GetRasterBand(1).DataType)
out_ds.SetProjection(ds.GetProjection())
out_ds.SetGeoTransform(ds.GetGeoTransform())

View File

@ -1,4 +1,5 @@
from misc import AlgFrontend
from misc.utils import format_now
from osgeo import gdal, gdal_array
from skimage.filters import rank
from skimage.morphology import rectangle
@ -14,7 +15,7 @@ class MorphologyFilter(AlgFrontend):
@staticmethod
def get_name():
return '形态学滤波'
return '形态学梯度'
@staticmethod
def get_icon():
@ -75,8 +76,9 @@ class MorphologyFilter(AlgFrontend):
ds = gdal.Open(pth)
band_count = ds.RasterCount
name = os.path.splitext(os.path.basename(pth))[0]
out_path = os.path.join(Project().other_path, 'morphology_filter_{}.tif'.format(int(datetime.now().timestamp() * 1000)))
out_path = os.path.join(Project().other_path, '{}_{}_{}.tif'.format(name, MorphologyFilter.get_name(), format_now()))
out_ds = gdal.GetDriverByName('GTiff').Create(out_path, ds.RasterXSize, ds.RasterYSize, band_count, ds.GetRasterBand(1).DataType)
out_ds.SetProjection(ds.GetProjection())
out_ds.SetGeoTransform(ds.GetGeoTransform())