Reduce rawimage.h dependencies

This commit is contained in:
Ingo Weyrich 2019-10-29 15:21:02 +01:00
parent c11087c28d
commit ed161c6288
21 changed files with 50 additions and 35 deletions

View File

@ -20,6 +20,7 @@
#include "array2D.h"
#include "median.h"
#include "pixelsmap.h"
#include "rawimage.h"
#include "rawimagesource.h"
namespace rtengine

View File

@ -20,6 +20,7 @@
#include <iostream>
#include "rtengine.h"
#include "rawimage.h"
#include "rawimagesource.h"
#include "rt_math.h"
#include "procparams.h"

View File

@ -21,6 +21,7 @@
#include <cstdio>
#include <cstring>
#include <functional>
#include <glib/gstdio.h>
#include "dcp.h"

View File

@ -30,6 +30,7 @@
namespace rtengine
{
class RawImage;
class dfInfo
{
public:

View File

@ -20,6 +20,7 @@
#include <cmath>
#include "color.h"
#include "rawimage.h"
#include "rawimagesource.h"
#include "rawimagesource_i.h"
#include "jaggedarray.h"

View File

@ -50,6 +50,13 @@ inline ffInfo& ffInfo::operator =(const ffInfo &o)
return *this;
}
ffInfo::~ffInfo()
{
if( ri ) {
delete ri;
}
}
bool ffInfo::operator <(const ffInfo &e2) const
{
if( this->maker.compare( e2.maker) >= 0 ) {

View File

@ -19,16 +19,16 @@
#pragma once
#include <cmath>
#include <list>
#include <map>
#include <string>
#include <glibmm/ustring.h>
#include "rawimage.h"
namespace rtengine
{
class RawImage;
class ffInfo
{
public:
@ -48,13 +48,8 @@ public:
ffInfo( const ffInfo &o)
: pathname(o.pathname), maker(o.maker), model(o.model), lens(o.lens), aperture(o.aperture), focallength(o.focallength), timestamp(o.timestamp), ri(nullptr) {}
~ffInfo()
{
if( ri ) {
delete ri;
}
}
~ffInfo();
ffInfo &operator =(const ffInfo &o);
bool operator <(const ffInfo &e2) const;

View File

@ -23,6 +23,7 @@
#include <omp.h>
#endif
#include "rawimage.h"
#include "rawimagesource.h"
#include "mytime.h"

View File

@ -18,6 +18,7 @@
*/
#include <cmath>
#include "rawimage.h"
#include "rawimagesource.h"
#include "rawimagesource_i.h"
#include "jaggedarray.h"

View File

@ -21,7 +21,6 @@
#include <cstdio>
#include <memory>
#include "rawimage.h"
#include <string>
#include <glibmm.h>
#include "../rtexif/rtexif.h"

View File

@ -19,6 +19,7 @@
*/
#include "pdaflinesfilter.h"
#include "rawimage.h"
#include "settings.h"
#include <iostream>
#include "camconst.h"

View File

@ -26,6 +26,8 @@
namespace rtengine {
class RawImage;
class PDAFLinesFilter: public rtengine::NonCopyable
{
public:

View File

@ -16,8 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __RAWIMAGE_H
#define __RAWIMAGE_H
#pragma once
#include <ctime>
#include <cmath>
@ -307,5 +306,3 @@ public:
};
}
#endif // __RAWIMAGE_H

View File

@ -21,6 +21,7 @@
#include "rtengine.h"
#include "imagefloat.h"
#include "rawimage.h"
#include "rawimagesource.h"
#include "rawimagesource_i.h"
#include "jaggedarray.h"
@ -501,6 +502,26 @@ RawImageSource::~RawImageSource ()
}
}
unsigned RawImageSource::FC(int row, int col) const
{
return ri->FC(row, col);
}
eSensorType RawImageSource::getSensorType () const
{
return ri != nullptr ? ri->getSensorType() : ST_NONE;
}
bool RawImageSource::isMono() const
{
return ri->get_colors() == 1;
}
int RawImageSource::getRotateDegree() const
{
return ri->get_rotateDegree();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void RawImageSource::transformRect (const PreviewProps &pp, int tran, int &ssx1, int &ssy1, int &width, int &height, int &fw)

View File

@ -33,7 +33,7 @@
namespace rtengine
{
class RawImage;
class DiagonalCurve;
class RetinextransmissionCurve;
class RetinexgaintransmissionCurve;
@ -110,10 +110,7 @@ protected:
void transformRect (const PreviewProps &pp, int tran, int &sx1, int &sy1, int &width, int &height, int &fw);
void transformPosition (int x, int y, int tran, int& tx, int& ty);
unsigned FC(int row, int col) const
{
return ri->FC(row, col);
}
unsigned FC(int row, int col) const;
inline void getRowStartEnd (int x, int &start, int &end);
static void getProfilePreprocParams(cmsHPROFILE in, float& gammafac, float& lineFac, float& lineSum);
@ -147,14 +144,8 @@ public:
void scaleColors (int winx, int winy, int winw, int winh, const procparams::RAWParams &raw, array2D<float> &rawData); // raw for cblack
void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const procparams::ToneCurveParams &hrp, const procparams::RAWParams &raw) override;
eSensorType getSensorType () const override
{
return ri != nullptr ? ri->getSensorType() : ST_NONE;
}
bool isMono () const override
{
return ri->get_colors() == 1;
}
eSensorType getSensorType () const override;
bool isMono () const override;
ColorTemp getWB () const override
{
return camera_wb;
@ -173,10 +164,7 @@ public:
void getFullSize (int& w, int& h, int tr = TR_NONE) override;
void getSize (const PreviewProps &pp, int& w, int& h) override;
int getRotateDegree() const override
{
return ri->get_rotateDegree();
}
int getRotateDegree() const override;
ImageMatrices* getImageMatrices () override
{

View File

@ -21,6 +21,7 @@
////////////////////////////////////////////////////////////////
#include "rtengine.h"
#include "rawimage.h"
#include "rawimagesource.h"
#include "procparams.h"
#include "../rtgui/multilangmgr.h"

View File

@ -20,6 +20,7 @@
////////////////////////////////////////////////////////////////
#include "rtengine.h"
#include "rawimage.h"
#include "rawimagesource.h"
#include "rt_algo.h"
#include "rt_math.h"

View File

@ -22,7 +22,6 @@
#include <gtkmm.h>
#include "adjuster.h"
#include "toolpanel.h"
#include "../rtengine/rawimage.h"
class BayerPreProcess : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel
{

View File

@ -24,7 +24,6 @@
#include "toolpanel.h"
#include "adjuster.h"
#include "guiutils.h"
#include "../rtengine/rawimage.h"
class PreProcess : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel
{

View File

@ -22,7 +22,6 @@
#include <gtkmm.h>
#include "adjuster.h"
#include "toolpanel.h"
#include "../rtengine/rawimage.h"
class RAWExposure : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel
{

View File

@ -22,7 +22,6 @@
#include <gtkmm.h>
#include "adjuster.h"
#include "toolpanel.h"
#include "../rtengine/rawimage.h"
class XTransRAWExposure : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel
{