feat: import pacs
This commit is contained in:
parent
6df7442b9b
commit
3ab485fb2b
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -27,3 +27,4 @@ release
|
|||
|
||||
|
||||
_internal
|
||||
OrthancStorage
|
|
@ -10,6 +10,7 @@ import { db } from "./core/db";
|
|||
import axios from "axios";
|
||||
import path from "node:path";
|
||||
import { mkdir, stat } from "fs/promises";
|
||||
import { readFileSync } from "node:fs";
|
||||
|
||||
/**
|
||||
* 渲染进程和主进程的事件调度
|
||||
|
@ -237,6 +238,26 @@ const registerIpcMainHandlers = (mainWindow: Electron.BrowserWindow | null) => {
|
|||
shell.openPath(resolvedPath);
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.on("request-dicom", async (event, data) => {
|
||||
console.log(data);
|
||||
const SeriesInstanceUID = data;
|
||||
await db.read();
|
||||
const series = await db.data.series.find(
|
||||
(s) => s.SeriesInstanceUID === SeriesInstanceUID
|
||||
);
|
||||
console.log(series);
|
||||
if (series) {
|
||||
const { filePaths } = series;
|
||||
const buffers = filePaths.map((filePath) => {
|
||||
const dicomFileBuffer = readFileSync(filePath);
|
||||
return dicomFileBuffer;
|
||||
});
|
||||
event.reply("request-dicom:response", series);
|
||||
} else {
|
||||
console.log("没找到series");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export default registerIpcMainHandlers;
|
||||
|
|
|
@ -65,6 +65,17 @@ function createWindow() {
|
|||
});
|
||||
});
|
||||
|
||||
const pacsPath =
|
||||
platform !== "macos"
|
||||
? path.join(
|
||||
process.env.VITE_PUBLIC!,
|
||||
"orthanc-win64-1.12.4",
|
||||
"Orthanc.exe"
|
||||
)
|
||||
: path.join(process.env.VITE_PUBLIC!, "orthanc-mac-24.8.1", "Orthanc");
|
||||
|
||||
spawn(pacsPath);
|
||||
|
||||
if (VITE_DEV_SERVER_URL) {
|
||||
win.loadURL(VITE_DEV_SERVER_URL);
|
||||
registerIpcMainHandlers(win);
|
||||
|
|
|
@ -85,6 +85,8 @@
|
|||
"vite": "^5.1.6",
|
||||
"vite-plugin-electron": "^0.28.6",
|
||||
"vite-plugin-electron-renderer": "^0.14.5",
|
||||
"@types/lodash": "4.17.7"
|
||||
"@types/lodash": "4.17.7",
|
||||
"vite-plugin-static-copy": "1.0.6",
|
||||
"vite-plugin-node-polyfills": "0.22.0"
|
||||
}
|
||||
}
|
||||
|
|
BIN
apps/desktop/public/orthanc-mac-24.8.1/Orthanc
Executable file
BIN
apps/desktop/public/orthanc-mac-24.8.1/Orthanc
Executable file
Binary file not shown.
3447
apps/desktop/public/orthanc-mac-24.8.1/ca-certificates.crt
Normal file
3447
apps/desktop/public/orthanc-mac-24.8.1/ca-certificates.crt
Normal file
File diff suppressed because it is too large
Load Diff
15
apps/desktop/public/orthanc-mac-24.8.1/configMacOS.json
Normal file
15
apps/desktop/public/orthanc-mac-24.8.1/configMacOS.json
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
// The reference of the Orthanc configuration file is available at:
|
||||
// https://orthanc.uclouvain.be/hg/orthanc/file/default/OrthancServer/Resources/Configuration.json
|
||||
"Name" : "MyOrthanc",
|
||||
|
||||
// Load all the Orthanc plugins that are available in this folder:
|
||||
"Plugins" : [ "." ],
|
||||
|
||||
// Orthanc Explorer 2 configuration. Reference is available at:
|
||||
// https://github.com/orthanc-server/orthanc-explorer-2/blob/master/Plugin/DefaultConfiguration.json
|
||||
"OrthancExplorer2" : {
|
||||
"Enable": true,
|
||||
"IsDefaultOrthancUI": false
|
||||
}
|
||||
}
|
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libDelayedDeletion.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libDelayedDeletion.dylib
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libHousekeeper.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libHousekeeper.dylib
Normal file
Binary file not shown.
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libMultitenantDicom.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libMultitenantDicom.dylib
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancDicomWeb.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancDicomWeb.dylib
Normal file
Binary file not shown.
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancGdcm.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancGdcm.dylib
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancIndexer.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancIndexer.dylib
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancNeuro.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancNeuro.dylib
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancOdbcIndex.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancOdbcIndex.dylib
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancTcia.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancTcia.dylib
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancTransfers.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancTransfers.dylib
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancVolView.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancVolView.dylib
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancWebViewer.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOrthancWebViewer.dylib
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOsimisWebViewer.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libOsimisWebViewer.dylib
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libServeFolders.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libServeFolders.dylib
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-mac-24.8.1/libStoneWebViewer.dylib
Normal file
BIN
apps/desktop/public/orthanc-mac-24.8.1/libStoneWebViewer.dylib
Normal file
Binary file not shown.
18
apps/desktop/public/orthanc-mac-24.8.1/readme.txt
Normal file
18
apps/desktop/public/orthanc-mac-24.8.1/readme.txt
Normal file
|
@ -0,0 +1,18 @@
|
|||
This package contains Orthanc and its main plugins.
|
||||
|
||||
QuickStart:
|
||||
----------
|
||||
|
||||
Unzip this archive (do not run Orthanc from the zip archive).
|
||||
Double-click startOrthanc.command to launch a pre-configured Orthanc instance.
|
||||
Open a browser at http://localhost:8042 to reach the Orthanc Explorer.
|
||||
|
||||
Open the upload page, you may drop a DICOM file.
|
||||
Once the DICOM file is uploaded, go back to the patients page and browse the study.
|
||||
Click on 'Osimis WebViewer' to visualize the study in the web browser.
|
||||
|
||||
Going further:
|
||||
-------------
|
||||
Read the Orthanc book to learn more about Orthanc configuration and advanced usage (https://book.orthanc-server.com)
|
||||
|
||||
|
3
apps/desktop/public/orthanc-mac-24.8.1/startOrthanc.command
Executable file
3
apps/desktop/public/orthanc-mac-24.8.1/startOrthanc.command
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
cd "$(dirname "$0")"
|
||||
./Orthanc configMacOS.json
|
BIN
apps/desktop/public/orthanc-win64-1.12.4/ConnectivityChecks.dll
Normal file
BIN
apps/desktop/public/orthanc-win64-1.12.4/ConnectivityChecks.dll
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-win64-1.12.4/DelayedDeletion.dll
Normal file
BIN
apps/desktop/public/orthanc-win64-1.12.4/DelayedDeletion.dll
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-win64-1.12.4/Housekeeper.dll
Normal file
BIN
apps/desktop/public/orthanc-win64-1.12.4/Housekeeper.dll
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-win64-1.12.4/ModalityWorklists.dll
Normal file
BIN
apps/desktop/public/orthanc-win64-1.12.4/ModalityWorklists.dll
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-win64-1.12.4/MultitenantDicom.dll
Normal file
BIN
apps/desktop/public/orthanc-win64-1.12.4/MultitenantDicom.dll
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-win64-1.12.4/Orthanc.exe
Normal file
BIN
apps/desktop/public/orthanc-win64-1.12.4/Orthanc.exe
Normal file
Binary file not shown.
Binary file not shown.
BIN
apps/desktop/public/orthanc-win64-1.12.4/ServeFolders.dll
Normal file
BIN
apps/desktop/public/orthanc-win64-1.12.4/ServeFolders.dll
Normal file
Binary file not shown.
BIN
apps/desktop/public/orthanc-win64-1.12.4/UnitTests.exe
Normal file
BIN
apps/desktop/public/orthanc-win64-1.12.4/UnitTests.exe
Normal file
Binary file not shown.
|
@ -134,8 +134,10 @@ const Boot = () => {
|
|||
<ResizableHandle withHandle />
|
||||
<ResizablePanel defaultSize={61.8}>
|
||||
<div className="flex h-full items-center justify-center p-6">
|
||||
{messageText.map((item) => (
|
||||
<p className="font-semibold">{item}</p>
|
||||
{messageText.map((item, index) => (
|
||||
<p className="font-semibold" key={index}>
|
||||
{item}
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
</ResizablePanel>
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
import { useLocation } from "react-router-dom"
|
||||
import { useLocation } from "react-router-dom";
|
||||
|
||||
export const Viewer = () => {
|
||||
const location = useLocation()
|
||||
const location = useLocation();
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
const SeriesInstanceUID = queryParams.get('SeriesInstanceUID'); // 获取URL参数
|
||||
const SeriesInstanceUID = queryParams.get("SeriesInstanceUID"); // 获取URL参数
|
||||
|
||||
return <div>
|
||||
return (
|
||||
<div>
|
||||
{SeriesInstanceUID}
|
||||
<p>找到一个本地dicom的mpr方案</p>
|
||||
{/* <DICOMViewer /> */}
|
||||
</div>
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
|
@ -2,10 +2,13 @@ import { defineConfig } from "vite";
|
|||
import path from "node:path";
|
||||
import electron from "vite-plugin-electron/simple";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { nodePolyfills } from 'vite-plugin-node-polyfills'
|
||||
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
nodePolyfills(),
|
||||
react(),
|
||||
electron({
|
||||
main: {
|
||||
|
@ -30,6 +33,8 @@ export default defineConfig({
|
|||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
"cornerstone-wado-image-loader":
|
||||
"cornerstone-wado-image-loader/dist/dynamic-import/cornerstoneWADOImageLoader.min.js",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
812
pnpm-lock.yaml
812
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user