Table of Contents:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| DICOM files --> vtk array --> vtk 3D visualization | |
| 1. read a series of DICOM files by vtkDICOMImageReader(which will do HU and don't resample) | |
| 2. process vtk 3D array with marching cubes algorithm | |
| 3. render vtk 3D array | |
| """ | |
| import vtk | |
| from utils import CreateTissue | |
When running FastAPI app, all the logs in console are from Uvicorn and they do not have timestamp and other useful information. As Uvicorn applies python logging module, we can override Uvicorn logging formatter by applying a new logging configuration.
Meanwhile, it's able to unify the your endpoints logging with the Uvicorn logging by configuring all of them in the config file log_conf.yaml.
Before overriding:
uvicorn main:app --reload
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| #-*- coding: utf-8 -*- | |
| import logging | |
| import timeit | |
| import traceback | |
| import time | |
| import gi | |
| gi.require_version('Gst', '1.0') |
# Show available `presets`
ffmpeg -h encoder=h264_nvenclinker - Equivalent of DYLD_PRINT_LIBRARIES on linux? - Stack Overflow
linux - How do I find out what all symbols are exported from a shared object? - Stack Overflow
# print runtime loaded and accessed librariesNewerOlder