void TransFuncEditorIntensityTexture::createConnections() {
    TransFuncEditorIntensity::createConnections();
    repaintButton_ = new QToolButton();
    repaintButton_->setIcon(QIcon(":/qt/icons/view-refresh.png"));
    repaintButton_->setToolTip(tr("Repaint the volume rendering"));
    connect(repaintButton_, SIGNAL(clicked()), this, SLOT(causeVolumeRenderingRepaint()));
}
void TransFunc1DKeysEditor::resetEditor() {
    if (property_->get() != transferFuncIntensity_) {
        LDEBUG("The pointers of property and transfer function do not match."
                << "Creating new transfer function object.....");
        transferFuncIntensity_ = new TransFunc1DKeys(1024);//TODO
        property_->set(transferFuncIntensity_);

        // propagate transfer function to mapping canvas and texture painter
        texturePainter_->setTransFunc(transferFuncIntensity_);
        transCanvas_->setTransFunc(transferFuncIntensity_);
    }

    // reset transfer function and thresholds
    resetTransferFunction();

    causeVolumeRenderingRepaint();
}
void TransFunc1DRampEditor::resetEditor() {
    if (property_->get() != transferFuncIntensity_) {
        LDEBUG("The pointers of property and transfer function do not match."
                << "Creating new transfer function object.....");
        transferFuncIntensity_ = new TransFunc1DKeys(maximumIntensity_ + 1);
        property_->set(transferFuncIntensity_);

        // propagate transfer function to mapping canvas and gradient
        texturePainter_->setTransFunc(transferFuncIntensity_);
        transCanvas_->setTransFunc(transferFuncIntensity_);
    }

    checkClipThresholds_->setChecked(false);
    // reset transfer function and thresholds
    resetThresholds();
    resetTransferFunction();

    causeVolumeRenderingRepaint();
}
void TransFuncEditorIntensityPet::resetEditor() {
    if (property_->get() != transferFuncIntensity_) {
        LDEBUG("The pointers of property and transfer function do not match."
                << "Creating new transfer function object.....");
        transferFuncIntensity_ = new TransFuncIntensity(maximumIntensity_ + 1);
        property_->set(transferFuncIntensity_);
        delete transferFuncGradient_;
        transferFuncGradient_ = new TransFuncIntensity(*transferFuncIntensity_);

        // propagate transfer functions to the gradients
        completeTexturePainter_->setTransFunc(transferFuncIntensity_);
        expandedTexturePainter_->setTransFunc(transferFuncGradient_);
    }

    resetTransferFunction();
    resetThresholds();

    causeVolumeRenderingRepaint();
}
void TransFunc1DRampEditor::clearButtonClicked() {
    resetThresholds();
    resetTransferFunction();

    causeVolumeRenderingRepaint();
}
void TransFuncEditorIntensityPet::resetButtonClicked() {
    resetTransferFunction();
    resetThresholds();

    causeVolumeRenderingRepaint();
}
void TransFunc1DKeysEditor::clearButtonClicked() {
    resetTransferFunction();
    causeVolumeRenderingRepaint();
}