21 #ifndef __vtkMRMLApplicationLogic_h 22 #define __vtkMRMLApplicationLogic_h 27 #include "vtkMRMLLogicExport.h" 40 class vtkTextProperty;
55 void PrintSelf(ostream& os, vtkIndent indent)
override;
65 void SetSliceLogics(vtkCollection* sliceLogics);
66 vtkCollection* GetSliceLogics()
const;
73 void SetViewLogics(vtkCollection* viewLogics);
74 vtkCollection* GetViewLogics()
const;
93 void PropagateVolumeSelection(
int fit = 1);
100 void PropagateBackgroundVolumeSelection(
int fit = 1);
107 void PropagateForegroundVolumeSelection(
int fit = 1);
114 void PropagateLabelVolumeSelection(
int fit = 1);
119 ForegroundLayer = 0x2,
120 BackgroundLayer = 0x4,
121 AllLayers = LabelLayer | ForegroundLayer | BackgroundLayer
127 void PropagateVolumeSelection(
int layer,
int fit);
133 void FitSliceToAll(
bool onlyIfPropagateVolumeSelectionAllowed=
false,
bool resetOrientation=
true);
136 void PropagateTableSelection();
139 void PropagatePlotChartSelection();
143 bool Zip(
const char* zipFileName,
const char* directoryToZip);
147 bool Unzip(
const char* zipFileName,
const char* destinationDirectory);
158 static std::string PercentEncode(std::string s);
165 bool SaveSceneToSlicerDataBundleDirectory(
const char* sdbDir, vtkImageData* screenShot =
nullptr);
170 bool OpenSlicerDataBundle(
const char* sdbFilePath,
const char* temporaryDirectory);
175 std::string UnpackSlicerDataBundle(
const char* sdbFilePath,
const char* temporaryDirectory);
179 static int LoadDefaultParameterSets(
vtkMRMLScene* scene,
180 const std::vector<std::string>& directories);
187 static std::string CreateUniqueFileName(
const std::string &filename,
const std::string& knownExtension=
"");
191 RequestInvokeEvent = vtkCommand::UserEvent + 1,
192 PauseRenderEvent = vtkCommand::UserEvent + 101,
201 unsigned int Delay{100};
203 vtkObject* Caller{
nullptr};
205 unsigned long EventID{vtkCommand::ModifiedEvent};
207 void* CallData{
nullptr};
210 void InvokeEventWithDelay(
unsigned int delayInMs,
212 unsigned long eventID = vtkCommand::ModifiedEvent,
213 void* callData =
nullptr);
216 const char* GetTemporaryPath();
219 void SetTemporaryPath(
const char* path);
223 void SaveSceneScreenshot(vtkImageData* screenshot);
232 virtual void PauseRender();
237 virtual void ResumeRender();
263 void SetIntersectingSlicesEnabled(IntersectingSlicesOperation operation,
bool enabled);
264 bool GetIntersectingSlicesEnabled(IntersectingSlicesOperation operation);
266 void SetIntersectingSlicesIntersectionMode(
int mode);
267 int GetIntersectingSlicesIntersectionMode();
269 void SetIntersectingSlicesLineThicknessMode(
int mode);
270 int GetIntersectingSlicesLineThicknessMode();
276 void SetFontFileName(
int fontFamily,
const std::string& fontFileName);
277 std::string GetFontFileName(
int fontFamily);
281 std::string GetFontFilePath(
const std::string& fontFileName);
284 std::string GetFontsDirectory();
289 void UseCustomFontFile(vtkTextProperty* textProperty);
316 vtkInternal* Internal;
IntersectingSlicesOperation
Superclass for MRML logic classes.
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void OnMRMLSceneEndImport()
MRML node to represent a display property of 3D surface model.
MRML node for storing a slice through RAS space.
virtual void OnMRMLSceneStartImport()
MRML logic class for color manipulation.
virtual void ProcessMRMLNodesEvents(vtkObject *caller, unsigned long event, void *callData)
virtual void OnMRMLSceneStartBatchProcess()
Events
List of custom events fired by the class.
MRML node to represent a 3D surface model.
A set of MRML Nodes that supports serialization and undo/redo.
virtual void OnMRMLSceneEndBatchProcess()
Structure passed as calldata pointer in the RequestEvent invoked event.
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
A superclass for other storage nodes.
Slicer logic class for view manipulation.
virtual void OnMRMLSceneEndRestore()
MRML node to represent a 3D view.
virtual void OnMRMLSceneStartRestore()
Abstract Superclass for all specific types of MRML nodes.
static vtkMRMLAbstractLogic * New()
MRML node for storing information about the active nodes in the scene.
Slicer logic class for slice manipulation.