when running the exe, exception happen
can you tell me why?
qSlicer* classes assume that the application class is
qSlicerApplication and not just a generic
QApplication. Currently, the easiest way is to run Slicer-dependent Python code in Slicer’s Python environment (using command-line arguments, or Slicer’s Python console, or Slicer’s Jupyter kernel, or using Slicer web server, etc.).
In the future, maybe in a year or two, we will make essential Slicer libraries (MRML, vtkSegmentationCore, vtkAddon, vtkITK, etc.) easily pip-installable and usable without instantiating a Slicer application. Later we may make module logics and GUI widgets independently available, too. If you wanted to get this earlier and you are willing learn the internals of Slicer and work in C++ then let us know, we can help you getting started.