From b97fb528fd6c3b562a3870bf403ae5aa9bf4835d Mon Sep 17 00:00:00 2001 From: copper Date: Fri, 24 Jun 2022 17:52:31 +0800 Subject: [PATCH] remove unused --- ECD.py | 5 ++++- innosetup.iss | 48 ++++++++++++++++++++++++++++++++++++++++ rscder/mul/mulexport.py | 32 --------------------------- rscder/mul/mulgrubcut.py | 19 ---------------- 4 files changed, 52 insertions(+), 52 deletions(-) create mode 100644 innosetup.iss delete mode 100644 rscder/mul/mulexport.py delete mode 100644 rscder/mul/mulgrubcut.py diff --git a/ECD.py b/ECD.py index 3b846d8..1dbf198 100644 --- a/ECD.py +++ b/ECD.py @@ -1,4 +1,7 @@ import os +import sys +import argparse +sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'libs')) os.environ['PROJ_LIB'] = os.path.join(os.path.dirname(__file__), 'share/proj') os.environ['GDAL_DATA'] = os.path.join(os.path.dirname(__file__), 'share') os.environ['ECD_BASEDIR'] = os.path.dirname(__file__) @@ -11,6 +14,6 @@ import logging logging.basicConfig(level=logging.INFO, filename=os.path.join(BASE_DIR, 'log.txt'), filemode='a', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') if __name__ == '__main__': - + t = MulStart() t.run() \ No newline at end of file diff --git a/innosetup.iss b/innosetup.iss new file mode 100644 index 0000000..23f9eef --- /dev/null +++ b/innosetup.iss @@ -0,0 +1,48 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyAppName "Easy Change Detection" +#define MyAppVersion "0.2.0" +#define MyAppPublisher "西安理工大学-ImgSciGroup" +#define MyAppURL "https://jsj.xaut.edu.cn/info/1052/2455.htm" +#define MyAppExeName "ECD.exe" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{78EB8520-9F1F-4396-909F-69DA29AEE98F} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={autopf}\{#MyAppName} +DisableProgramGroupPage=yes +; Uncomment the following line to run in non administrative install mode (install for current user only.) +;PrivilegesRequired=lowest +OutputBaseFilename=ECDInstaller +SetupIconFile=D:\CVEO\2021-12-22-CDGUI\rscder\logo.ico +Compression=lzma +SolidCompression=yes +WizardStyle=modern + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Files] +Source: "D:\CVEO\2021-12-22-CDGUI\rscder\package\dist-0.2.0\program\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\CVEO\2021-12-22-CDGUI\rscder\package\dist-0.2.0\program\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent + diff --git a/rscder/mul/mulexport.py b/rscder/mul/mulexport.py deleted file mode 100644 index f05d1fa..0000000 --- a/rscder/mul/mulexport.py +++ /dev/null @@ -1,32 +0,0 @@ -import multiprocessing -from alg.txt_export_to import export_to_shp -import os -import glob -from qgis.core import * -class ExportToSHP(multiprocessing.Process): - - def __init__(self, conn, result_path, output_dir): - super(ExportToSHP, self).__init__() - self.conn = conn - self.result_path = result_path - self.result_list = self.get_result_list() - self.output_dir = output_dir - os.makedirs(self.output_dir, exist_ok=True) - - def get_result_list(self): - fl = list(glob.glob(os.path.join(self.result_path, '*.txt'))) - return fl - - def run(self): - # result = [] - self.conn.send(len(self.result_list)) - qgs = QgsApplication([], False) - QgsApplication.initQgis() - for i, p in enumerate(self.result_list): - o = os.path.basename(p) - o = os.path.splitext(o)[0] - r = export_to_shp(p, os.path.join(self.output_dir, o + '.shp')) - # result.append([r, self.feats[i]]) - self.conn.send([i, r, o]) - # self.conn.send(result) - diff --git a/rscder/mul/mulgrubcut.py b/rscder/mul/mulgrubcut.py deleted file mode 100644 index 181a884..0000000 --- a/rscder/mul/mulgrubcut.py +++ /dev/null @@ -1,19 +0,0 @@ -import multiprocessing -from alg.grubcut import grubcut - -class GrabCut(multiprocessing.Process): - - def __init__(self, conn, img_path, pts = [], feats = []): - super(GrabCut, self).__init__() - self.conn = conn - self.pts = pts - self.feats = feats - self.img_path = img_path - def run(self): - result = [] - for i, p in enumerate(self.pts): - r = grubcut(self.img_path, p, False, True, False) - result.append([r, self.feats[i]]) - self.conn.send(i) - self.conn.send(result) -