Slicer
4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
#include <Libs/MRML/Logic/vtkMRMLApplicationLogic.h>
Classes | |
struct | InvokeRequest |
Structure passed as calldata pointer in the RequestEvent invoked event. More... | |
Public Types | |
enum | Events { RequestInvokeEvent = vtkCommand::UserEvent + 1 } |
List of custom events fired by the class. More... | |
enum | Layers { LabelLayer = 0x1, ForegroundLayer = 0x2, BackgroundLayer = 0x4, AllLayers = LabelLayer | ForegroundLayer | BackgroundLayer } |
typedef vtkMRMLAbstractLogic | Superclass |
Public Types inherited from vtkMRMLAbstractLogic | |
typedef vtkObject | Superclass |
typedef void(vtkMRMLAbstractLogic::* | TaskFunctionPointer) (void *clientdata) |
Public Member Functions | |
void | FitSliceToAll (bool onlyIfPropagateVolumeSelectionAllowed=false) |
virtual const char * | GetClassName () |
vtkMRMLColorLogic * | GetColorLogic () const |
vtkMRMLInteractionNode * | GetInteractionNode () const |
Get current Interaction node. More... | |
vtkMRMLModelHierarchyLogic * | GetModelHierarchyLogic () const |
Get ModelHierarchyLogic. More... | |
vtkMRMLSelectionNode * | GetSelectionNode () const |
Get current Selection node. More... | |
vtkMRMLSliceLogic * | GetSliceLogic (vtkMRMLSliceNode *sliceNode) const |
vtkMRMLSliceLogic * | GetSliceLogicByLayoutName (const char *layoutName) const |
vtkMRMLSliceLogic * | GetSliceLogicByModelDisplayNode (vtkMRMLModelDisplayNode *displayNode) const |
Get slice logic from slice model display node. More... | |
vtkCollection * | GetSliceLogics () const |
const char * | GetTemporaryPath () |
Return the temporary path that was set by the application. More... | |
void | InvokeEventWithDelay (unsigned int delayInMs, vtkObject *caller, unsigned long eventID=vtkCommand::ModifiedEvent, void *callData=0) |
Conveniently calls an InvokeEvent on an object with a delay. More... | |
virtual int | IsA (const char *type) |
bool | OpenSlicerDataBundle (const char *sdbFilePath, const char *temporaryDirectory) |
std::string | PercentEncode (std::string s) |
void | PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE |
void | PropagateBackgroundVolumeSelection (int fit=1) |
void | PropagateForegroundVolumeSelection (int fit=1) |
void | PropagateLabelVolumeSelection (int fit=1) |
void | PropagatePlotChartSelection () |
Propagate selected PlotChart in the SelectionNode to Plot view nodes. More... | |
void | PropagateTableSelection () |
Propagate selected table in the SelectionNode to table view nodes. More... | |
void | PropagateVolumeSelection (int fit=1) |
void | PropagateVolumeSelection (int layer, int fit) |
bool | SaveSceneToSlicerDataBundleDirectory (const char *sdbDir, vtkImageData *screenShot=NULL) |
void | SetColorLogic (vtkMRMLColorLogic *newColorLogic) |
void | SetSliceLogics (vtkCollection *sliceLogics) |
All the slice logics in the application. More... | |
void | SetTemporaryPath (const char *path) |
Set the temporary path the logics can use. The path should be set by the application. More... | |
std::string | UnpackSlicerDataBundle (const char *sdbFilePath, const char *temporaryDirectory) |
bool | Unzip (const char *zipFileName, const char *destinationDirectory) |
bool | Zip (const char *zipFileName, const char *directoryToZip) |
Public Member Functions inherited from vtkMRMLAbstractLogic | |
virtual vtkMRMLApplicationLogic * | GetMRMLApplicationLogic () const |
Get access to overall application state. More... | |
vtkMRMLScene * | GetMRMLScene () const |
Return a reference to the current MRML scene. More... | |
void | PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE |
virtual void | SetMRMLApplicationLogic (vtkMRMLApplicationLogic *logic) |
void | SetMRMLScene (vtkMRMLScene *newScene) |
Set and observe the MRMLScene. More... | |
Static Public Member Functions | |
static std::string | CreateUniqueFileName (std::string &filename) |
Creates a unique non-existant file name by adding an index after base file name. More... | |
static int | IsTypeOf (const char *type) |
static int | LoadDefaultParameterSets (vtkMRMLScene *scene, const std::vector< std::string > &directories) |
static vtkMRMLApplicationLogic * | New () |
static vtkMRMLApplicationLogic * | SafeDownCast (vtkObject *o) |
Static Public Member Functions inherited from vtkMRMLAbstractLogic | |
static int | IsTypeOf (const char *type) |
static vtkMRMLAbstractLogic * | New () |
static vtkMRMLAbstractLogic * | SafeDownCast (vtkObject *o) |
Additional Inherited Members | |
Static Protected Member Functions inherited from vtkMRMLAbstractLogic | |
static void | MRMLLogicsCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
MRMLLogicCallback is a static function to relay modified events from the logics. More... | |
static void | MRMLNodesCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
MRMLNodesCallback is a static function to relay modified events from the nodes. More... | |
static void | MRMLSceneCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
Definition at line 46 of file vtkMRMLApplicationLogic.h.
Definition at line 53 of file vtkMRMLApplicationLogic.h.
List of custom events fired by the class.
Enumerator | |
---|---|
RequestInvokeEvent |
Definition at line 179 of file vtkMRMLApplicationLogic.h.
Enumerator | |
---|---|
LabelLayer | |
ForegroundLayer | |
BackgroundLayer | |
AllLayers |
Definition at line 110 of file vtkMRMLApplicationLogic.h.
|
protected |
|
protectedvirtual |
|
static |
Creates a unique non-existant file name by adding an index after base file name.
void vtkMRMLApplicationLogic::FitSliceToAll | ( | bool | onlyIfPropagateVolumeSelectionAllowed = false | ) |
Fit all the volumes into their views If onlyIfPropagateVolumeSelectionAllowed is true then field of view will be reset on only those slices where propagate volume selection is allowed
|
virtual |
Reimplemented from vtkMRMLAbstractLogic.
Reimplemented in vtkSlicerApplicationLogic.
vtkMRMLColorLogic* vtkMRMLApplicationLogic::GetColorLogic | ( | ) | const |
vtkMRMLInteractionNode* vtkMRMLApplicationLogic::GetInteractionNode | ( | ) | const |
Get current Interaction node.
vtkMRMLModelHierarchyLogic* vtkMRMLApplicationLogic::GetModelHierarchyLogic | ( | ) | const |
Get ModelHierarchyLogic.
vtkMRMLSelectionNode* vtkMRMLApplicationLogic::GetSelectionNode | ( | ) | const |
Get current Selection node.
vtkMRMLSliceLogic* vtkMRMLApplicationLogic::GetSliceLogic | ( | vtkMRMLSliceNode * | sliceNode | ) | const |
vtkMRMLSliceLogic* vtkMRMLApplicationLogic::GetSliceLogicByLayoutName | ( | const char * | layoutName | ) | const |
vtkMRMLSliceLogic* vtkMRMLApplicationLogic::GetSliceLogicByModelDisplayNode | ( | vtkMRMLModelDisplayNode * | displayNode | ) | const |
Get slice logic from slice model display node.
vtkCollection* vtkMRMLApplicationLogic::GetSliceLogics | ( | ) | const |
const char* vtkMRMLApplicationLogic::GetTemporaryPath | ( | ) |
Return the temporary path that was set by the application.
void vtkMRMLApplicationLogic::InvokeEventWithDelay | ( | unsigned int | delayInMs, |
vtkObject * | caller, | ||
unsigned long | eventID = vtkCommand::ModifiedEvent , |
||
void * | callData = 0 |
||
) |
Conveniently calls an InvokeEvent on an object with a delay.
|
virtual |
Reimplemented from vtkMRMLAbstractLogic.
Reimplemented in vtkSlicerApplicationLogic.
|
static |
|
static |
Load any default parameter sets into the specified scene Returns the total number of loaded parameter sets
|
static |
bool vtkMRMLApplicationLogic::OpenSlicerDataBundle | ( | const char * | sdbFilePath, |
const char * | temporaryDirectory | ||
) |
Open the file into a temp directory and load the scene file inside. Note that the first mrml file found in the extracted directory will be used.
std::string vtkMRMLApplicationLogic::PercentEncode | ( | std::string | s | ) |
Convert reserved characters into percent notation to avoid issues with filenames containing things that might be mistaken, for example, for windows drive letters. Used internally by SaveSceneToSlicerDataBundleDirectory. This is not a general purpose implementation; it preseves commonly used characters for filenames but avoids known issue like slashes or colons. Ideally a version from vtksys or similar should be used, but nothing seems to be available. http://en.wikipedia.org/wiki/Percent-encoding See http://na-mic.org/Bug/view.php?id=2605
void vtkMRMLApplicationLogic::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
void vtkMRMLApplicationLogic::PropagateBackgroundVolumeSelection | ( | int | fit = 1 | ) |
Propagate only active background volume in the SelectionNode to slice composite nodes
void vtkMRMLApplicationLogic::PropagateForegroundVolumeSelection | ( | int | fit = 1 | ) |
Propagate only active foreground volume in the SelectionNode to slice composite nodes
void vtkMRMLApplicationLogic::PropagateLabelVolumeSelection | ( | int | fit = 1 | ) |
Propagate only active label volume in the SelectionNode to slice composite nodes
void vtkMRMLApplicationLogic::PropagatePlotChartSelection | ( | ) |
Propagate selected PlotChart in the SelectionNode to Plot view nodes.
void vtkMRMLApplicationLogic::PropagateTableSelection | ( | ) |
Propagate selected table in the SelectionNode to table view nodes.
void vtkMRMLApplicationLogic::PropagateVolumeSelection | ( | int | fit = 1 | ) |
Apply the active volumes in the SelectionNode to the slice composite nodes Perform the default behavior related to selecting a volume (in this case, making it the background for all SliceCompositeNodes)
void vtkMRMLApplicationLogic::PropagateVolumeSelection | ( | int | layer, |
int | fit | ||
) |
Propagate selected volume layer in the SelectionNode to the slice composite nodes.
|
static |
bool vtkMRMLApplicationLogic::SaveSceneToSlicerDataBundleDirectory | ( | const char * | sdbDir, |
vtkImageData * | screenShot = NULL |
||
) |
Save the scene into a self contained directory, sdbDir Called by the qSlicerSceneWriter, which can be accessed via
|
protected |
void vtkMRMLApplicationLogic::SetColorLogic | ( | vtkMRMLColorLogic * | newColorLogic | ) |
Set/Get color logic. The application typically sets a custom color logic (i.e. vtkSlicerColorLogic) that contains default color nodes. By default, a vtkMRMLColorLogic is instantiated.
|
protected |
|
protectedvirtual |
Called each time a new scene is set. Can be reimplemented in derivated classes. Doesn't observe the scene by default, that means that UpdateFromMRMLScene() won't be called by default when a scene is imported, closed or restored, only when a new scene is set.
Reimplemented from vtkMRMLAbstractLogic.
|
protected |
void vtkMRMLApplicationLogic::SetSliceLogics | ( | vtkCollection * | sliceLogics | ) |
All the slice logics in the application.
void vtkMRMLApplicationLogic::SetTemporaryPath | ( | const char * | path | ) |
Set the temporary path the logics can use. The path should be set by the application.
std::string vtkMRMLApplicationLogic::UnpackSlicerDataBundle | ( | const char * | sdbFilePath, |
const char * | temporaryDirectory | ||
) |
Unpack the file into a temp directory and return the scene file inside. Note that the first mrml file found in the extracted directory will be used.
bool vtkMRMLApplicationLogic::Unzip | ( | const char * | zipFileName, |
const char * | destinationDirectory | ||
) |
unzip the zip file to the current working directory Returns success or failure.
bool vtkMRMLApplicationLogic::Zip | ( | const char * | zipFileName, |
const char * | directoryToZip | ||
) |
zip the directory into a zip file Returns success or failure.