void BackgroundStateCurve::processImageFromSavedInputs (const Transformation &transformation,
                                                        const DocumentModelGridRemoval &modelGridRemoval,
                                                        const DocumentModelColorFilter &modelColorFilter,
                                                        const QString &curveSelected)
{
  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateCurve::processImageFromSavedInputs";

  // Use the settings if the selected curve is known
  if (!curveSelected.isEmpty()) {

    // Generate filtered image
    FilterImage filterImage;
    QPixmap pixmapFiltered = filterImage.filter (m_pixmapOriginal.toImage(),
                                                 transformation,
                                                 curveSelected,
                                                 modelColorFilter,
                                                 modelGridRemoval);

    setProcessedPixmap (pixmapFiltered);

  } else {

    // Set the image in case BackgroundStateContext::fitInView is called, so the bounding rect is available
    setProcessedPixmap (m_pixmapOriginal);

  }
}
void BackgroundStateOriginal::setPixmap (const Transformation & /* transformation */,
                                         const DocumentModelGridRemoval & /* modelGridRemoval */,
                                         const DocumentModelColorFilter & /* modelColorFilter */,
                                         const QPixmap &pixmapOriginal)
{
  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateOriginal::setPixmap";

  // Unfiltered original image
  setProcessedPixmap (pixmapOriginal);
}
void BackgroundStateNone::setPixmap (const Transformation & /* transformation */,
                                     const DocumentModelGridRemoval & /* modelGridRemoval */,
                                     const DocumentModelColorFilter & /* modelColorFilter */,
                                     const QPixmap &pixmapOriginal)
{
  LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::setPixmap";

  // Empty background
  QPixmap pixmapNone (pixmapOriginal);
  pixmapNone.fill (Qt::white);
  setProcessedPixmap (pixmapNone);

}