CustusX  16.5
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::StaticMutexVtkLocker Class Reference

#include <cxDataReaderWriter.h>

Public Member Functions

 StaticMutexVtkLocker ()
 
 ~StaticMutexVtkLocker ()
 

Detailed Description

Locks a static mutex in the constructor and unlocks it in the desctructor, similar to a QMutexLocker.

Use this as a global access restriction for thread-unsafe VTK objects.

Testing has shown that the following methods need to be mutexed:

  • vtkMetaImageReader::Update()
  • vtkMetaImageWrite::Write() There are probably some global stuff inside vtkmetaio.

Note: Googling indicates that VTK in general is threadUNsafe.

Definition at line 71 of file cxDataReaderWriter.h.

Constructor & Destructor Documentation

cx::StaticMutexVtkLocker::StaticMutexVtkLocker ( )

Definition at line 87 of file cxDataReaderWriter.cpp.

cx::StaticMutexVtkLocker::~StaticMutexVtkLocker ( )

Definition at line 94 of file cxDataReaderWriter.cpp.


The documentation for this class was generated from the following files: