Skip to content
Snippets Groups Projects

Local itk-vtk-viewer

2 files
+ 6
3
Compare changes
  • Side-by-side
  • Inline

Files

+ 5
2
@@ -48,7 +48,7 @@ def run_within_qim_dir():
run_for_platform(linux_func=linux_func, windows_func=windows_func, macos_func=linux_func)
def itk_vtk_viewer(filename:str = None):
def itk_vtk_viewer(filename:str = None, open_browser:bool = True):
global is_installed
# This might seem redundant but is here in case we have to go through the installation first
# If we have to install first this variable is set to False and doesn't disappear
@@ -68,7 +68,10 @@ def itk_vtk_viewer(filename:str = None):
qim3d.utils.start_http_server(os.path.dirname(filename))
viz_url = f"http://localhost:3000/?rotate=false&fileToLoad=http://localhost:8000/{os.path.basename(filename)}"
webbrowser.open_new_tab(viz_url)
if open_browser:
webbrowser.open_new_tab(viz_url)
log.info(f"\nVisualization url:\n{viz_url}\n")
c.release()
Loading