Segment Anything Model Python process handler class.
More...
#include <mitkSegmentAnythingPythonService.h>
|
static void | onPythonProcessEvent (itk::Object *, const itk::EventObject &, void *) |
| Static function to print out everything from itk::EventObject. Used as callback in mitk::ProcessExecutor object. More...
|
|
static bool | CheckStatus () |
| Checks CurrentStatus enum variable and returns true if daemon is READY (to read files) state, false is OFF state or throws exception if daemon is found KILL or Cuda error state. More...
|
|
Segment Anything Model Python process handler class.
Definition at line 30 of file mitkSegmentAnythingPythonService.h.
◆ Status
◆ SegmentAnythingPythonService()
mitk::SegmentAnythingPythonService::SegmentAnythingPythonService |
( |
std::string |
, |
|
|
std::string |
, |
|
|
std::string |
, |
|
|
unsigned int |
|
|
) |
| |
◆ ~SegmentAnythingPythonService()
mitk::SegmentAnythingPythonService::~SegmentAnythingPythonService |
( |
| ) |
|
◆ CheckStatus()
static bool mitk::SegmentAnythingPythonService::CheckStatus |
( |
| ) |
|
|
static |
Checks CurrentStatus enum variable and returns true if daemon is READY (to read files) state, false is OFF state or throws exception if daemon is found KILL or Cuda error state.
- Returns
- bool
◆ GetMitkTempDir()
virtual std::string mitk::SegmentAnythingPythonService::GetMitkTempDir |
( |
| ) |
const |
|
virtual |
◆ onPythonProcessEvent()
static void mitk::SegmentAnythingPythonService::onPythonProcessEvent |
( |
itk::Object * |
, |
|
|
const itk::EventObject & |
, |
|
|
void * |
|
|
) |
| |
|
static |
Static function to print out everything from itk::EventObject. Used as callback in mitk::ProcessExecutor object.
◆ RetrieveImageFromProcess()
◆ SetMitkTempDir()
virtual void mitk::SegmentAnythingPythonService::SetMitkTempDir |
( |
std::string |
_arg | ) |
|
|
virtual |
◆ StartAsyncProcess()
void mitk::SegmentAnythingPythonService::StartAsyncProcess |
( |
| ) |
|
Creates temp directories and calls start_python_daemon function async.
◆ StopAsyncProcess()
void mitk::SegmentAnythingPythonService::StopAsyncProcess |
( |
| ) |
|
Writes KILL to the control file to stop the daemon process.
◆ TransferImageToProcess()
void mitk::SegmentAnythingPythonService::TransferImageToProcess |
( |
const Image * |
, |
|
|
std::string & |
UId |
|
) |
| |
Writes image as nifity file with unique id (UId) as file name.
◆ TransferPointsToProcess()
void mitk::SegmentAnythingPythonService::TransferPointsToProcess |
( |
std::stringstream & |
| ) |
|
Writes csv stringstream of points to a csv file for python daemon to read.
◆ CurrentStatus
Status mitk::SegmentAnythingPythonService::CurrentStatus |
|
static |
The documentation for this class was generated from the following file: