21 #include <vtkImageData.h>
30 vtkImageData *imageDataVtk)
31 :
ImageAccessorBase(nullptr, 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;
vtkImageData * GetVtkImageData() const
ImageVtkWriteAccessor(ImagePointer iP, const ImageDataItem *iDI, vtkImageData *imageDataVtk)
Creates an ImageVtkWriteAccessor for a whole Image.
virtual const Image * GetImage() const override
Image class for storing images.
Internal class for managing references on sub-images.