diacomDemomain.tsx16 matches
45function App() {
6const [imageId, setImageId] = useState(null);
7const [file, setFile] = useState(null);
8const imageRef = useRef(null);
9const [cornerstoneLoaded, setCornerstoneLoaded] = useState(false);
1011useEffect(() => {
12let cornerstone, cornerstoneWADOImageLoader, dicomParser;
1314async function loadLibraries() {
15cornerstone = (await import("https://esm.sh/cornerstone-core")).default;
16cornerstoneWADOImageLoader = (await import("https://esm.sh/cornerstone-wado-image-loader")).default;
17dicomParser = (await import("https://esm.sh/dicom-parser")).default;
1819cornerstoneWADOImageLoader.external.cornerstone = cornerstone;
20cornerstoneWADOImageLoader.external.dicomParser = dicomParser;
21cornerstoneWADOImageLoader.configure({
22useWebWorkers: false,
23});
3031useEffect(() => {
32if (cornerstoneLoaded && imageId && imageRef.current) {
33import("https://esm.sh/cornerstone-core").then((cornerstone) => {
34cornerstone.default.enable(imageRef.current);
35cornerstone.default.loadImage(imageId).then(image => {
36cornerstone.default.displayImage(imageRef.current, image);
37});
38});
39}
40}, [imageId, cornerstoneLoaded]);
4142const handleFileChange = async (event) => {
44if (selectedFile) {
45setFile(selectedFile);
46const cornerstoneWADOImageLoader = (await import("https://esm.sh/cornerstone-wado-image-loader")).default;
47const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(selectedFile);
48setImageId(imageId);
49}
50};
67<h1>DICOM Viewer</h1>
68<input type="file" accept=".dcm" onChange={handleFileChange} />
69<div ref={imageRef} className="cornerstone-viewport" />
70{file && (
71<button onClick={handleDownload} className="download-button">
handleDiscordNewUsermain.tsx1 match
12content: body.data.email_addresses[0].email_address
13+ " "
14+ body.data.profile_image_url,
15});
16return new Response("Success");
isMyWebsiteDownREADME.md1 match
89<div align="center">
10<img src="https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/67a1d35e-c37c-41a4-0e5a-03a9ba585d00/public" width="500px"/>
11</div>
sqliteExplorerAppREADME.md1 match
3View and interact with your Val Town SQLite data. It's based off Steve's excellent [SQLite Admin](https://www.val.town/v/stevekrouse/sqlite_admin?v=46) val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by [LibSQL Studio](https://github.com/invisal/libsql-studio) by [invisal](https://github.com/invisal). This is now more an SPA, with tables, queries and results showing up on the same page.
45
67## Install
1011<div align="center">
12<img src="https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/67a1d35e-c37c-41a4-0e5a-03a9ba585d00/public" width="500px"/>
13</div>
45<div align="center">
6<img src="https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/67a1d35e-c37c-41a4-0e5a-03a9ba585d00/public" width="700px"/>
7</div>
CDS_Countermain.tsx7 matches
68}
6970const { image } = await request.json();
71
72// Check cache
73const cacheKey = image.slice(0, 100); // Use first 100 characters of image as cache key
74const cachedResult = cache.get(cacheKey);
75if (cachedResult) {
77}
78
79// Preprocess image using sharp
80const buffer = Buffer.from(image.split(',')[1], 'base64');
81const processedImage = await sharp(buffer)
82.resize(640, 480) // Resize to a standard size
83.toFormat('jpeg')
84.toBuffer();
85
86// Convert processed image to base64
87const processedBase64 = `data:image/jpeg;base64,${processedImage.toString('base64')}`;
88
89// Use worker for TensorFlow.js computation
blob_adminREADME.md1 match
3This is a lightweight Blob Admin interface to view and debug your Blob data.
45
67## Installation
sqliteExplorerAppREADME.md1 match
3View and interact with your Val Town SQLite data. It's based off Steve's excellent [SQLite Admin](https://www.val.town/v/stevekrouse/sqlite_admin?v=46) val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by [LibSQL Studio](https://github.com/invisal/libsql-studio) by [invisal](https://github.com/invisal). This is now more an SPA, with tables, queries and results showing up on the same page.
45
67## Install
blob_admin_oldREADME.md1 match
3This is a lightweight Blob Admin interface to view and debug your Blob data.
45
67## Installation