Skip to content

Commit

Permalink
CLEANUP: Put everything into a Overmix namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
spillerrec committed Sep 29, 2015
1 parent e430be6 commit ff51729
Show file tree
Hide file tree
Showing 102 changed files with 293 additions and 17 deletions.
4 changes: 4 additions & 0 deletions src/ARenderPipe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#include <utility>

namespace Overmix{

class ARenderPipe{
private:
ImageEx cache;
Expand Down Expand Up @@ -57,4 +59,6 @@ class ARenderPipe{
virtual ~ARenderPipe(){ }
};

}

#endif
2 changes: 2 additions & 0 deletions src/Deteleciner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "Deteleciner.hpp"
#include "planes/ImageEx.hpp"

using namespace Overmix;

ImageEx Deteleciner::addInterlaced( ImageEx image ){
if( !frame.is_valid() ){
frame = image;
Expand Down
4 changes: 4 additions & 0 deletions src/Deteleciner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#include "planes/ImageEx.hpp"

namespace Overmix{

class Deteleciner{
private:
bool active{ false };
Expand All @@ -44,4 +46,6 @@ class Deteleciner{
ImageEx process( ImageEx img );
};

}

#endif
4 changes: 4 additions & 0 deletions src/Geometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include <QSize>
#include <QSizeF>

namespace Overmix{

template<typename T=int>
struct Point{
T x{ 0 };
Expand Down Expand Up @@ -182,4 +184,6 @@ struct Rectangle{
}
};

}

#endif
2 changes: 2 additions & 0 deletions src/MultiPlaneIterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <climits>
#include <algorithm>

using namespace Overmix;


MultiPlaneLineIterator::MultiPlaneLineIterator(
int y, int left, int right, const std::vector<PlaneItInfo> &infos, void *data
Expand Down
4 changes: 4 additions & 0 deletions src/MultiPlaneIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "color.hpp"
#include "renders/ARender.hpp"

namespace Overmix{

struct PlaneItInfo{
Plane& p;
int x, y;
Expand Down Expand Up @@ -290,4 +292,6 @@ class MultiPlaneIterator{
}
};

}

#endif
4 changes: 4 additions & 0 deletions src/RenderOperations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include "ARenderPipe.hpp"
#include "color.hpp"

namespace Overmix{

class RenderPipeScaling : public ARenderPipe{
private:
Point<double> size;
Expand Down Expand Up @@ -168,4 +170,6 @@ class RenderPipeThreshold : public ARenderPipe{
void setSize( int size ){ set( this->size, size ); }
};

}

#endif
2 changes: 2 additions & 0 deletions src/aligners/AImageAligner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include <fstream>

using namespace Overmix;


AImageAligner::AImageAligner( AContainer& container, AlignMethod method, double scale )
: method(method), scale(scale), raw(false), container(container){
Expand Down
4 changes: 4 additions & 0 deletions src/aligners/AImageAligner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include <vector>

namespace Overmix{

class AProcessWatcher;
class ImageContainer;

Expand Down Expand Up @@ -110,4 +112,6 @@ class AImageAligner : public AContainer{
virtual void align( AProcessWatcher* watcher=nullptr ) = 0;
};

}

#endif
1 change: 1 addition & 0 deletions src/aligners/AnimationSaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <fstream>

using namespace std;
using namespace Overmix;

//TODO: not needed, can be done with QString directly
static QString numberZeroFill( int number, int digits ){
Expand Down
4 changes: 4 additions & 0 deletions src/aligners/AnimationSaver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include <vector>
#include <utility>

namespace Overmix{

class ImageEx;

class AnimationSaver{
Expand Down Expand Up @@ -60,4 +62,6 @@ class AnimationSaver{
void write();
};

}

#endif
1 change: 1 addition & 0 deletions src/aligners/AnimationSeparator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "../debug.hpp"

using namespace std;
using namespace Overmix;


class AnimFrame{
Expand Down
4 changes: 4 additions & 0 deletions src/aligners/AnimationSeparator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#include "AImageAligner.hpp"

namespace Overmix{

class AnimationSeparator : public AImageAligner{
private:
double find_threshold( AProcessWatcher* watcher );
Expand All @@ -29,4 +31,6 @@ class AnimationSeparator : public AImageAligner{
virtual void align( AProcessWatcher* watcher=nullptr ) override;
};

}

#endif
2 changes: 2 additions & 0 deletions src/aligners/AverageAligner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "AverageAligner.hpp"
#include "../renders/AverageRender.hpp"

using namespace Overmix;

void AverageAligner::align( AProcessWatcher* watcher ){
if( count() == 0 )
return;
Expand Down
4 changes: 4 additions & 0 deletions src/aligners/AverageAligner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@

#include "AImageAligner.hpp"

namespace Overmix{

class AverageAligner : public AImageAligner{
public:
AverageAligner( AContainer& container, AlignMethod method, double scale=1.0 )
: AImageAligner( container, method, scale ){ }
virtual void align( AProcessWatcher* watcher=nullptr ) override;
};

}

#endif
4 changes: 4 additions & 0 deletions src/aligners/FakeAligner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@

#include "AImageAligner.hpp"

namespace Overmix{

class FakeAligner : public AImageAligner{
public:
FakeAligner( AContainer& container ) : AImageAligner( container, ALIGN_BOTH, 1.0 ){ }
virtual void align( AProcessWatcher* ) override{ resetPosition(); }
};

}

#endif
2 changes: 2 additions & 0 deletions src/aligners/FrameAligner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "../containers/ImageContainer.hpp"
#include "../containers/FrameContainer.hpp"

using namespace Overmix;

void FrameAligner::align( AProcessWatcher* watcher ){
auto frames = getFrames();
auto base_point = minPoint();
Expand Down
4 changes: 4 additions & 0 deletions src/aligners/FrameAligner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@

#include "AImageAligner.hpp"

namespace Overmix{

class FrameAligner : public AImageAligner{
public:
FrameAligner( AContainer& container, AlignMethod method, double scale=1.0 )
: AImageAligner( container, method, scale ){ }
virtual void align( AProcessWatcher* watcher=nullptr ) override;
};

}

#endif
2 changes: 2 additions & 0 deletions src/aligners/ImageAligner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <QDebug>
#include <cmath>

using namespace Overmix;


void ImageAligner::on_add(){
//Compare this one against all other images
Expand Down
4 changes: 4 additions & 0 deletions src/aligners/ImageAligner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#include "AImageAligner.hpp"

namespace Overmix{

class ImageAligner : public AImageAligner{
protected:
std::vector<ImageOffset> offsets;
Expand All @@ -39,4 +41,6 @@ class ImageAligner : public AImageAligner{

};

}

#endif
2 changes: 2 additions & 0 deletions src/aligners/LayeredAligner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "LayeredAligner.hpp"
#include "AverageAligner.hpp"

using namespace Overmix;

/*
class InternAligner : public AverageAligner{
protected:
Expand Down
4 changes: 4 additions & 0 deletions src/aligners/LayeredAligner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@

#include "AImageAligner.hpp"

namespace Overmix{

class LayeredAligner : public AImageAligner{
public:
LayeredAligner( AContainer& container, AlignMethod method, double scale=1.0 )
: AImageAligner( container, method, scale ){ }
virtual void align( AProcessWatcher* watcher=nullptr ) override;
};

}

#endif
2 changes: 2 additions & 0 deletions src/aligners/LinearAligner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#include "LinearAligner.hpp"

using namespace Overmix;

struct LinearFunc{
double x1 = 0.0, x2 = 0.0, xy = 0.0, y1 = 0.0;
unsigned n = 0;
Expand Down
4 changes: 4 additions & 0 deletions src/aligners/LinearAligner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@

#include "AImageAligner.hpp"

namespace Overmix{

class LinearAligner : public AImageAligner{
public:
LinearAligner( AContainer& container, AlignMethod method )
: AImageAligner( container, method, 1.0 ){ }
virtual void align( AProcessWatcher* watcher=nullptr ) override;
};

}

#endif
3 changes: 2 additions & 1 deletion src/aligners/RecursiveAligner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <limits>
using namespace std;
using namespace Overmix;

static void copyLine( Plane& plane_out, const Plane& plane_in, unsigned y_out, unsigned y_in ){
auto out = plane_out.scan_line( y_out );
Expand Down Expand Up @@ -66,7 +67,7 @@ static Plane mergeVertical( const Plane& p1, const Plane& p2, int offset ){
return out;
}

class ImageGetter{
class Overmix::ImageGetter{
private:
Plane p, a;
unsigned val;
Expand Down
4 changes: 4 additions & 0 deletions src/aligners/RecursiveAligner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include "AImageAligner.hpp"
#include <utility>

namespace Overmix{

class ImageGetter;

class RecursiveAligner : public AImageAligner{
Expand All @@ -37,4 +39,6 @@ class RecursiveAligner : public AImageAligner{
virtual void align( AProcessWatcher* watcher=nullptr ) override;
};

}

#endif
2 changes: 2 additions & 0 deletions src/aligners/SuperResAligner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "SuperResAligner.hpp"
#include "../renders/RobustSrRender.hpp"

using namespace Overmix;


void SuperResAligner::align( AProcessWatcher* watcher ){
auto base = RobustSrRender( local_scale ).render( *this, watcher );
Expand Down
4 changes: 4 additions & 0 deletions src/aligners/SuperResAligner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#include "AImageAligner.hpp"

namespace Overmix{

class SuperResAligner : public AImageAligner{
private:
double local_scale;
Expand All @@ -29,4 +31,6 @@ class SuperResAligner : public AImageAligner{
virtual void align( AProcessWatcher* watcher=nullptr ) override;
};

}

#endif
2 changes: 2 additions & 0 deletions src/color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include <vector>

using namespace Overmix;

static std::vector<color_type> generate_gamma(){
std::vector<color_type> temp( UINT16_MAX );

Expand Down
Loading

0 comments on commit ff51729

Please sign in to comment.