Skip to content
Snippets Groups Projects
Commit 1822d3ef authored by Sacha Percot-Tétu's avatar Sacha Percot-Tétu
Browse files

Removed useless include, corrected some bugs

parent fd513c33
No related branches found
No related tags found
No related merge requests found
......@@ -22,8 +22,6 @@
#include <Operation.h>
#include <Image.h>
#include <ImgWidget.h>
#include "CenterOp.h"
......
......@@ -27,7 +27,6 @@
#include <GrayscaleImage.h>
#include <Converter.h>
#include <ImgWidget.h>
#include <Widgets/ImageListBox.h>
#include "CombineColorOp.h"
......@@ -53,10 +52,10 @@ void CombineColorOp::operator()(const imagein::Image*, const std::map<const imag
dialog->setLayout(layout);
int nChannel = 3;
unsigned int nChannel = 3;
ImageListBox** imageBoxes = new ImageListBox*[nChannel];
for(int i=0; i < nChannel; ++i) {
for(unsigned int i=0; i < nChannel; ++i) {
imageBoxes[i] = new ImageListBox(dialog, NULL, imgList);
QLabel* label = new QLabel(Tools::colorName(i, nChannel), dialog);
layout->insertRow(i, label, imageBoxes[i]);
......@@ -77,7 +76,9 @@ void CombineColorOp::operator()(const imagein::Image*, const std::map<const imag
unsigned int maxWidth = numeric_limits<unsigned int>::max();
unsigned int maxHeight = numeric_limits<unsigned int>::max();
for(unsigned int c = 0; c < nChannel; ++c) {
channels[c] = Converter<GrayscaleImage>::convert(*imageBoxes[c]->currentImage());
const Image* img = imageBoxes[c]->currentImage();
if(img == NULL) return;
channels[c] = Converter<GrayscaleImage>::convert(*img);
maxWidth = min(maxWidth, channels[c]->getWidth());
maxHeight = min(maxHeight, channels[c]->getHeight());
}
......
......@@ -16,7 +16,6 @@
* You should have received a copy of the GNU General Public License
* along with EIImage. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ImgWidget.h"
#include "FFTOp.h"
#include "../Tools.h"
#include "../Algorithms/FFT.h"
......
......@@ -21,7 +21,6 @@
#include <Image.h>
#include "ImgWidget.h"
#include "FlipOp.h"
using namespace std;
......
......@@ -26,7 +26,6 @@
#include <QRadioButton>
#include "IFFTOp.h"
#include "ImgWidget.h"
#include "../Tools.h"
#include "../Algorithms/FFT.h"
#include <cmath>
......@@ -100,6 +99,7 @@ void IFFTOp::operator()(const imagein::Image_t<double>*, const map<const imagein
const Image_t<double>* magnitudeImg = magtdImgBox->currentImage();
const Image_t<double>* phaseImg = phaseImgBox->currentImage();
if(magnitudeImg == NULL || phaseImg == NULL) return;
unsigned int width = min(nearestUpPower2(magnitudeImg->getWidth()), nearestUpPower2(phaseImg->getWidth()));
unsigned int height = min(nearestUpPower2(magnitudeImg->getHeight()), nearestUpPower2(phaseImg->getHeight()));
unsigned int channels = min(magnitudeImg->getNbChannels(), phaseImg->getNbChannels());
......@@ -151,6 +151,7 @@ void IFFTOp::operator()(const imagein::Image_t<double>*, const map<const imagein
const Image_t<double>* realImg = realImgBox->currentImage();
const Image_t<double>* imagImg = imagImgBox->currentImage();
if(realImg == NULL || imagImg == NULL) return;
unsigned int width = min(nearestUpPower2(realImg->getWidth()), nearestUpPower2(imagImg->getWidth()));
unsigned int height = min(nearestUpPower2(realImg->getHeight()), nearestUpPower2(imagImg->getHeight()));
unsigned int channels = min(realImg->getNbChannels(), imagImg->getNbChannels());
......
......@@ -30,7 +30,6 @@
#include <QGroupBox>
#include "PointOp.h"
#include "ImgWidget.h"
#include <Widgets/ImageListBox.h>
#include <Widgets/ImageWidgets/StandardImageWindow.h>
#include <Widgets/ImageWidgets/DoubleImageWindow.h>
......
......@@ -23,8 +23,6 @@
#include <QSpinBox>
#include <QCheckBox>
#include "ImgWidget.h"
#include "RotateOp.h"
#include "../Tools.h"
......
......@@ -18,8 +18,6 @@
*/
#include <GrayscaleImage.h>
#include "ImgWidget.h"
#include "SplitColorOp.h"
#include "../Tools.h"
......
#include "ImgWidget.h"
#include "Algorithm/Binarization.h"
#include "Converter.h"
......
......@@ -4,8 +4,6 @@
#include <QSpinBox>
#include <QCheckBox>
#include "ImgWidget.h"
#include "TranslateOp.h"
#include "../Tools.h"
using namespace std;
......
......@@ -21,7 +21,6 @@
#include <GenericInterface.h>
#include <Widgets/ImageWidgets/DoubleImageWindow.h>
#include <Widgets/ImageWidgets/StandardImageWindow.h>
#include <ImgWidget.h>
#include "EIImageService.h"
#include <QMessageBox>
......
......@@ -23,7 +23,6 @@
#include <map>
#include <string>
#include "Output.h"
#include "Image.h"
class QWidget;
......
......@@ -43,10 +43,6 @@ void PlugOperation::addInput(const Input& input) {
this->_inputs.push_back(input.clone());
}
void PlugOperation::addOutput(const Output& output) {
_outputs.push_back(output.clone());
}
bool PlugOperation::isValidImgWnd(const genericinterface::ImageWindow* imgWnd) const {
if(!this->needCurrentImg()) {
return true;
......
......@@ -25,7 +25,6 @@
#include "Input.h"
#include "Parameter.h"
#include "Output.h"
#include <Image.h>
#include "Operation.h"
......
......@@ -73,6 +73,7 @@ class Dithering : public PlugOperation {
public:
Dithering() : PlugOperation("Dithering") {
this->addParam(CurrentImg(), &Dithering::img);
// this->addParam(ImgParam("Image"), &Dithering::img);
}
void operation() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment