21 #include <vtkImageData.h>
30 const vtkImageData *imageDataVtk)
31 :
ImageAccessorBase(iP, iDI), m_Image(iP.GetPointer()), m_ImageDataVtk(imageDataVtk)
33 m_Image->m_VtkReadersLock.Lock();
35 m_Image->m_VtkReaders.push_back(
this);
38 m_Image->m_VtkReadersLock.Unlock();
43 m_Image->m_VtkReadersLock.Lock();
45 auto it = std::find(m_Image->m_VtkReaders.begin(), m_Image->m_VtkReaders.end(),
this);
46 if (it != m_Image->m_VtkReaders.end())
48 m_Image->m_VtkReaders.erase(it);
52 m_Image->m_VtkReadersLock.Unlock();
57 return m_ImageDataVtk;
const vtkImageData * GetVtkImageData() const
ImageVtkReadAccessor(ImageConstPointer iP, const ImageDataItem *iDI, const vtkImageData *imageDataVtk)
Creates an ImageVtkWriteAccessor for a whole Image.
Image class for storing images.
Internal class for managing references on sub-images.
virtual const Image * GetImage() const override