13 #ifndef mitkSegmentationInterpolationController_h
14 #define mitkSegmentationInterpolationController_h
22 #include <itkObjectFactory.h>
69 itkFactorylessNewMacro(Self);
115 unsigned int sliceDimension,
116 unsigned int sliceIndex,
117 unsigned int timeStep);
134 unsigned int sliceIndex,
136 unsigned int timeStep,
137 mitk::ShapeBasedInterpolationAlgorithm::Pointer algorithm =
nullptr);
169 unsigned int sd,
unsigned int si,
unsigned int d0,
unsigned int d1,
unsigned int t,
const void *pixels)
170 : sliceDimension(sd), sliceIndex(si), dim0(d0), dim1(d1), timeStep(t), pixelData(pixels)
192 template <
typename DATATYPE>
195 template <
typename TPixel,
unsigned int VImageDimension>
198 template <
typename DATATYPE>
#define MITKSEGMENTATION_EXPORT
Image class for storing images.
Describes a two-dimensional, rectangular plane.
Protected class of mitk::SegmentationInterpolationController. Don't use (you shouldn't be able to do ...
unsigned int sliceDimension
SetChangedSliceOptions(unsigned int sd, unsigned int si, unsigned int d0, unsigned int d1, unsigned int t, const void *pixels)
Generates interpolations of 2D slices.
SegmentationInterpolationController()
Image::Pointer Interpolate(unsigned int sliceDimension, unsigned int sliceIndex, const mitk::PlaneGeometry *currentPlane, unsigned int timeStep, mitk::ShapeBasedInterpolationAlgorithm::Pointer algorithm=nullptr)
Generates an interpolated image for the given slice.
void BlockModified(bool)
Block reaction to an images Modified() events.
std::pair< unsigned long, bool > m_SegmentationModifiedObserverTag
void DisableSliceImageCache()
void OnImageModified(const itk::EventObject &)
void EnableSliceImageCache()
mitkClassMacroItkParent(SegmentationInterpolationController, itk::Object)
~SegmentationInterpolationController() override
std::map< const Image *, SegmentationInterpolationController * > InterpolatorMapType
void SetChangedSlice(const Image *sliceDiff, unsigned int sliceDimension, unsigned int sliceIndex, unsigned int timeStep)
Update after changing a single slice.
void SetChangedVolume(const Image *sliceDiff, unsigned int timeStep)
void ScanChangedSlice(const itk::Image< DATATYPE, 2 > *, const SetChangedSliceOptions &options)
internal scan of a single slice
TimeResolvedDirtyVectorType m_SegmentationCountInSlice
std::map< std::pair< unsigned int, unsigned int >, Image::Pointer > m_SliceImageCache
bool m_EnableSliceImageCache
void ScanWholeVolume(const itk::Image< DATATYPE, 3 > *, const Image *volume, unsigned int timeStep)
std::vector< unsigned int > DirtyVectorType
static InterpolatorMapType s_InterpolatorForImage
std::vector< std::vector< DirtyVectorType > > TimeResolvedDirtyVectorType
void ScanChangedVolume(const itk::Image< TPixel, VImageDimension > *, unsigned int timeStep)
bool m_2DInterpolationActivated
void Activate2DInterpolation(bool)
mitk::Image::Pointer ExtractSlice(const PlaneGeometry *planeGeometry, unsigned int sliceIndex, unsigned int timeStep, bool cache=false)
static SegmentationInterpolationController * InterpolatorForImage(const Image *)
Find interpolator for a given image.
Image::ConstPointer m_Segmentation
static SegmentationInterpolationController * GetInstance()
Get existing instance or create a new one.
void SetSegmentationVolume(const Image *segmentation)
Initialize with a whole volume.
std::mutex m_SliceImageCacheMutex
Find image slices visible on a given plane.