- Launch Powershell in Administrator mode
- First install chocolatey
- Install gping:
choco install gping
gping google.com reddit.com <local-server>
notepad $PROFILE
#!/bin/bash | |
# Function to check the status of a service | |
check_service_status() { | |
local service=$1 | |
while true; do | |
sudo systemctl status "$service" --no-pager | |
if [ $? -eq 0 ]; then | |
break | |
fi |
choco install gping
gping google.com reddit.com <local-server>
notepad $PROFILE
""" | |
>> pip install uv # OR https://docs.astral.sh/uv/getting-started/installation/ | |
>> uv run -p 3.11 uv-monai-torchsummary.py | |
""" | |
# /// script | |
# requires-python = ">=3.11" | |
# dependencies = [ | |
# "monai==1.3.2", | |
# "torchsummary==1.5.1", |
{ | |
"DicomWeb" : | |
{ | |
"Enable" : true, // Whether DICOMweb support is enabled | |
"Root" : "/dicom-web/", // Root URI of the DICOMweb API (for QIDO-RS, STOW-RS and WADO-RS) | |
"EnableWado" : true, // Whether WADO-URI (aka. WADO) support is enabled | |
"WadoRoot" : "/wado", // Root URI of the WADO-URI (aka. WADO) API | |
"Host" : "localhost:8042", // Hard-codes the name of the host for subsequent WADO-RS requests | |
"Ssl" : false, // Whether HTTPS should be used for subsequent WADO-RS requests | |
"Servers" : { |
import skimage | |
import skimage.morphology | |
import voxynth as voxynth # https://github.com/dalcalab/voxynth | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def getContourScribbleForBinarySlice(mask, show=False): | |
""" | |
Params | |
------ |
import torchDataloader | |
import myDataloader | |
import pdb | |
import copy | |
import time | |
import tqdm | |
import pprint | |
import traceback | |
import numpy as np |
def get_svls_filter_3d(kernel_size=3, sigma=1, verbose=False): | |
""" | |
Ref: https://github.com/mobarakol/SVLS/blob/main/svls.py (pytorch) | |
- Alternative (for gauss kernel): https://gist.github.com/blzq/c87d42f45a8c5a53f5b393e27b1f5319 | |
Note: group parameter in Conv3D is giving an issue in tf==2.10.0 on Unix | |
- "tensorflow/compiler/xla/service/gpu/nvptx_compiler.cc:453] ptxas returned an error during compilation of ptx to sass: 'INTERNAL: Failed to launch ptxas'" | |
""" | |
try: |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js"></script> | |
<script src="https://unpkg.com/cornerstone-core/dist/cornerstone.js"></script> <!-- cornerstone-core - 2.6.1 - 2021-11-19 --> | |
<script src="https://unpkg.com/cornerstone-tools/dist/cornerstoneTools.js"></script> <!-- cornerstone-tools - 6.0.10 - 2023-07-21 --> | |
<script src="https://unpkg.com/cornerstone-math/dist/cornerstoneMath.js"></script> <!-- cornerstone-math - 0.1.10 - 2022-06-09 --> |
""" | |
Step 1 - Read Dose and CT .dcm files | |
Step 2 - Resample dose to CT | |
Step 3 - Plot | |
""" | |
import pdb | |
import pydicom | |
import traceback | |
import numpy as np | |
import SimpleITK as sitk |
import connect | |
RS_CHECK_PREFIX = '_' | |
RS_STR_TRANSLATE_OBJ = { ord(' ') : ord('_') , ord('(') : ord('_') , ord(')') : ord('_') , ord('-') : ord('_') , ord('+') : ord('_') , ord('<') : ord('_') , ord('>') : ord('_') } | |
KEYNAME_PATIENT = 'Patient' | |
def checkForRTPlan(case, planName): | |
exists = False | |
if RS_CHECK_PREFIX + str(planName).translate(RS_STR_TRANSLATE_OBJ) in dir(case.TreatmentPlans): | |
exists = True |