1 /***************************************************************************
2 * This file is part of Tecorrec. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
5 * Tecorrec is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 2 of the License, or *
8 * (at your option) any later version. *
10 * Tecorrec is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with Tecorrec. If not, write to the Free Software Foundation, *
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
21 * @file tcProcessingData.cpp
22 * @brief Processing data channels.
25 #include "tcProcessingData.h"
26 #include "tcLandsatData.h"
27 #include "tcSrtmModel.h"
28 #include "tcChannelManager.h"
29 #include "tcLambertianShading.h"
30 #include "tcElevation.h"
31 #include "tcElevationDifference.h"
32 #include "tcElevationOptimization.h"
33 #include "tcPixelOp.h"
38 * Constructors + destructor
41 /// Primary constructor.
42 tcProcessingData::tcProcessingData(const QList
<tcLandsatData
*>& landsatDatasets
, tcSrtmModel
* dem
)
45 setName(QObject::tr("Processing channels"));
46 //setTexToGeo(landsatDatasets[0]->texToGeo());
48 tcGeoImageData
* refImagery
= landsatDatasets
[0];
49 tcChannel
* reference
= refImagery
->channelManager()->channel(0);
51 tcLambertianShading
* upshading
= new tcLambertianShading(reference
, dem
, this, maths::Vector
<3,float>(0.0f
, 0.0f
, 1.0f
));
52 channelManager()->addChannel(upshading
);
54 tcElevation
* elevation
= new tcElevation(refImagery
, reference
, dem
, this);
55 channelManager()->addChannel(elevation
);
57 tcElevationDifference
* elevationDifference
= new tcElevationDifference(refImagery
, reference
, dem
, this);
58 channelManager()->addChannel(elevationDifference
);
60 tcElevationOptimization
* elevationOpt
= new tcElevationOptimization(landsatDatasets
, dem
, this);
61 channelManager()->addChannel(elevationOpt
);
63 tcPixelOp
* elevDiff
= new tcPixelOp(tcPixelOp::Diff
, QList
<tcChannel
*>() << elevationOpt
<< elevation
);
64 channelManager()->addChannel(elevDiff
);
68 tcProcessingData::~tcProcessingData()