QImage StereogramWidget::stereogram(const QSize& requestedSize)
{
    if (requestedSize == mStereogram.size())
        return mStereogram;
    DepthData oldScaledDepthData = mScaledDepthData;
    QSize oldRequestedStereogramSize = mRequestedStereogramSize;
    mRequestedStereogramSize = requestedSize;
    invalidateTexture();
    calcStereogram();
    mRequestedStereogramSize = oldRequestedStereogramSize;
    mScaledDepthData = oldScaledDepthData;
    QImage scaledStereogram = mStereogram;
    invalidateTexture();
    calcStereogram();
    return scaledStereogram;
}
void StereogramWidget::setTextureMode(TextureMode textureMode)
{
    mTextureMode = textureMode;
    invalidateTexture();
    makeTexture();
    update();
}
Beispiel #3
0
void texture_utils::invalidateTextures(const TXshSimpleLevel *sl)
{
	int f, fCount = sl->getFrameCount();

	for (f = 0; f != fCount; ++f)
		invalidateTexture(sl, sl->getFrameId(f));
}
Z3DTransferFunction::Z3DTransferFunction(const Z3DTransferFunction& tf)
  : ZColorMap(tf)
  , m_texture(NULL)
  , m_dimensions(tf.m_dimensions)
  , m_textureFormat(tf.m_textureFormat)
  , m_textureDataType(tf.m_textureDataType)
  , m_textureIsInvalid(true)
{
  connect(this, SIGNAL(changed()), this, SLOT(invalidateTexture()));
}
Z3DTransferFunction::Z3DTransferFunction(double min, double max, const glm::col4 &minColor,
                                         const glm::col4 &maxColor, int width, QObject *parent)
  : ZColorMap(min, max, minColor, maxColor, parent)
  , m_texture(NULL)
  , m_dimensions(width, 1, 1)
  , m_textureFormat(GL_BGRA)
  , m_textureDataType(GL_UNSIGNED_INT_8_8_8_8_REV)
  , m_textureIsInvalid(true)
{
  connect(this, SIGNAL(changed()), this, SLOT(invalidateTexture()));
}
void StereogramWidget::setTexture(const QImage& texture)
{
    mPreliminaryTexture = texture;
    invalidateTexture();
    update();
}
void StereogramWidget::setRequestedStereogramSize(const QSize& requestedSize)
{
    mRequestedStereogramSize = requestedSize;
    invalidateTexture();
    update();
}
Beispiel #8
0
void texture_utils::invalidateTextures(const TXsheet *xsh)
{
	int f, fCount = xsh->getFrameCount();
	for (f = 0; f != fCount; ++f)
		invalidateTexture(xsh, f);
}