fast::ImageRenderer class

Renders 2D Image data objects, both in 2D and 3D.

Base classes

class Renderer virtual
Abstract base class for Renderers.

Derived classes

class HeatmapRenderer
Renders Tensor data objects as heatmaps.
class SegmentationRenderer
Renders 2D segmentation data.
class SliceRenderer
Renders a 2D image slice extracted from a 3D image.
class VectorFieldColorRenderer
Renders a vector field image using colors.

Constructors, destructors, conversion operators

~ImageRenderer()

Public functions

auto create(float level, float window, float opacity, bool applyTransformationsIn2D) -> std::shared_ptr<ImageRenderer> override
Create instance.
void setIntensityLevel(float level)
auto getIntensityLevel() -> float
void setIntensityWindow(float window)
auto getIntensityWindow() -> float

Protected functions

void draw(Matrix4f perspectiveMatrix, Matrix4f viewingMatrix, float zNear, float zFar, bool mode2D, int viewWidth, int viewHeight) virtual
void deleteAllTextures() virtual
void drawTextures(std::unordered_map<uint, std::shared_ptr<SpatialDataObject>> copy, Matrix4f& perspectiveMatrix, Matrix4f& viewingMatrix, bool mode2D, bool useInterpolation = false, bool useWindowLevel = true)

Protected variables

std::unordered_map<uint, uint> mTexturesToRender
std::unordered_map<uint, Image::pointer> mImageUsed
std::unordered_map<uint, uint64_t> mDataTimestamp
std::unordered_map<uint, uint> mVAO
std::unordered_map<uint, uint> mVBO
std::unordered_map<uint, uint> mEBO
cl::Kernel mKernel
float mWindow
float mLevel
float m_opacity
bool m_applyTransformationsIn2D

Function documentation

std::shared_ptr<ImageRenderer> fast::ImageRenderer::create(float level, float window, float opacity, bool applyTransformationsIn2D) override

Create instance.

Parameters
level
window
opacity Draw image with an opacity. Useful if you want to draw an image on top of another
applyTransformationsIn2D In 2D transformations (rotation/translation) are typically not applied. by setting this to true they will be applied.
Returns instance

Variable documentation

std::unordered_map<uint, uint64_t> fast::ImageRenderer::mDataTimestamp protected

Timestamp used to generate texture