Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkSegmentAnythingProcessExecutor.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkSegmentAnythingProcessExecutor_h
14 #define mitkSegmentAnythingProcessExecutor_h
15 
17 #include <mitkProcessExecutor.h>
18 #include <itksys/Process.h>
19 #include <mitkCommon.h>
20 
21 namespace mitk
22 {
30  {
31  public:
37 
40 
41  itkSetMacro(Stop, bool);
42  itkGetConstMacro(Stop, bool);
43 
48  bool Execute(const std::string &executionPath, const ArgumentListType &argumentList);
49 
50  void SetTimeout(double &timeout);
51 
52  protected:
56 
57  private:
58  itksysProcess *m_ProcessID = nullptr;
59  double m_Timeout;
60  bool m_Stop = false; // Exit token to force stop the daemon.
61  };
62 
63 } // namespace mitk
64 #endif
#define MITKSEGMENTATION_EXPORT
You may register an observer for an ExternalProcessOutputEvent, ExternalProcessStdOutEvent or Externa...
bool Execute(const std::string &executionPath, const std::string &executableName, ArgumentListType &argumentList)
std::vector< std::string > ArgumentListType
You may register an observer for an ExternalProcessOutputEvent, ExternalProcessStdOutEvent or Externa...
mitkNewMacro1Param(SegmentAnythingProcessExecutor, double &)
bool Execute(const std::string &executionPath, const ArgumentListType &argumentList)
Executes the process. This version assumes that the executable name is the first argument in the argu...
void SetTimeout(double &timeout)
Find image slices visible on a given plane.