Revision: 2500
http://hugin.svn.sourceforge.net/hugin/?rev=2500&view=rev
Author: dangelo
Date: 2007-10-26 15:47:38 -0700 (Fri, 26 Oct 2007)
Log Message:
-----------
Made code and CMake build system compatible to MSVC.
Tested with MSVC 2003
Modified Paths:
--------------
hugin/trunk/src/CMakeLists.txt
hugin/trunk/src/deghosting/CMakeLists.txt
hugin/trunk/src/deghosting/hugin_hdrmerge.cpp
hugin/trunk/src/deghosting/khan.cpp
hugin/trunk/src/deghosting/khanSupport.cpp
hugin/trunk/src/foreign/CMakeLists.txt
hugin/trunk/src/foreign/getopt/include/getopt.h
hugin/trunk/src/foreign/vigra/vigra_impex/exr.cxx
hugin/trunk/src/hugin1/PT/Panorama.h
hugin/trunk/src/hugin1/PT/PhotometricOptimizer.h
hugin/trunk/src/hugin1/base_wx/huginConfig.cpp
hugin/trunk/src/hugin1/hugin/CMakeLists.txt
hugin/trunk/src/hugin1/hugin/CPImageCtrl.h
hugin/trunk/src/hugin1/hugin/CPListFrame.cpp
hugin/trunk/src/hugin1/hugin/MainFrame.cpp
hugin/trunk/src/hugin1/hugin/PreferencesDialog.cpp
hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp
hugin/trunk/src/hugin1/hugin/RunStitcherFrame.cpp
hugin/trunk/src/hugin1/hugin/VigCorrDialog.cpp
hugin/trunk/src/hugin1/hugin/huginApp.cpp
hugin/trunk/src/hugin1/hugin/xrc/data/CMakeLists.txt
hugin/trunk/src/hugin1/hugin/xrc/data/tips.txt
hugin/trunk/src/hugin1/nona_gui/CMakeLists.txt
hugin/trunk/src/hugin1/stitch_project/CMakeLists.txt
hugin/trunk/src/hugin_base/algorithm/PanoramaAlgorithm.h
hugin/trunk/src/hugin_base/algorithms/nona/FitPanorama.cpp
hugin/trunk/src/hugin_base/algorithms/optimizer/PTOptimizer.cpp
hugin/trunk/src/hugin_base/algorithms/optimizer/PhotometricOptimizer.cpp
hugin/trunk/src/hugin_base/algorithms/optimizer/PhotometricOptimizer.h
hugin/trunk/src/hugin_base/algorithms/point_sampler/PointSampler.h
hugin/trunk/src/hugin_base/appbase/ProgressDisplayOld.cpp
hugin/trunk/src/hugin_base/hugin_math/hugin_math.h
hugin/trunk/src/hugin_base/nona/Stitcher.cpp
hugin/trunk/src/hugin_base/nona/Stitcher.h
hugin/trunk/src/hugin_base/nona/Stitcher4.cpp
hugin/trunk/src/hugin_base/panodata/PanoramaData.h
hugin/trunk/src/hugin_base/panodata/PanoramaOptions.h
hugin/trunk/src/hugin_base/panotools/PanoToolsInterface.h
hugin/trunk/src/hugin_base/panotools/PanoToolsOptimizerWrapper.cpp
hugin/trunk/src/hugin_base/vigra_ext/Interpolators.h
hugin/trunk/src/hugin_base/vigra_ext/ResponseTransform.h
hugin/trunk/src/tools/CMakeLists.txt
hugin/trunk/src/tools/autooptimiser.cpp
hugin/trunk/src/tools/vig_optimize.cpp
Modified: hugin/trunk/src/CMakeLists.txt
===================================================================
--- hugin/trunk/src/CMakeLists.txt 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/CMakeLists.txt 2007-10-26 22:47:38 UTC (rev 2500)
@@ -5,8 +5,18 @@
include_directories( ${CMAKE_SOURCE_DIR}/src/foreign/vigra )
# define common sets of libraries, used by different subdirectories
-set(common_libs huginbase huginjhead
- boost_thread ${PANO_LIBRARIES} huginlevmar)
+IF (WIN32)
+ # boost_thread is linked automatically
+ # additionally link to our getopt
+ set(common_libs huginbase huginjhead hugingetopt
+ ${PANO_LIBRARIES} huginlevmar)
+ include_directories( ${CMAKE_SOURCE_DIR}/src/foreign/getopt/include )
+ELSE (WIN32)
+ # need to specify boost thread library
+ set(common_libs huginbase huginjhead
+ boost_thread ${PANO_LIBRARIES} huginlevmar)
+ENDIF (WIN32)
+
set(image_libs huginvigraimpex ${JPEG_LIBRARIES} ${TIFF_LIBRARIES}
${PNG_LIBRARIES} ${OPENEXR_LIBRARIES})
Modified: hugin/trunk/src/deghosting/CMakeLists.txt
===================================================================
--- hugin/trunk/src/deghosting/CMakeLists.txt 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/deghosting/CMakeLists.txt 2007-10-26 22:47:38 UTC (rev 2500)
@@ -3,4 +3,5 @@
add_executable(hugin_hdrmerge hugin_hdrmerge.cpp khan.cpp jbu.cpp khanSupport.cpp)
target_link_libraries(hugin_hdrmerge ${common_libs} ${image_libs})
-install(TARGETS hugin_hdrmerge DESTINATION bin)
\ No newline at end of file
+install(TARGETS hugin_hdrmerge DESTINATION ${BINDIR})
+
Modified: hugin/trunk/src/deghosting/hugin_hdrmerge.cpp
===================================================================
--- hugin/trunk/src/deghosting/hugin_hdrmerge.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/deghosting/hugin_hdrmerge.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -405,7 +405,7 @@
return false;
}
- for(uint i = 0; i < prep.size(); i++) {
+ for(unsigned i = 0; i < prep.size(); i++) {
string tmp(prep.at(i));
tmp.erase(tmp.rfind('.', tmp.length()-1));
tmp.append(app);
@@ -426,7 +426,7 @@
return false;
}
- for(uint i = 0; i < prep.size(); i++) {
+ for(unsigned i = 0; i < prep.size(); i++) {
string tmp(prep.at(i));
tmp.erase(tmp.rfind('.', tmp.length()-1));
tmp.append(app);
Modified: hugin/trunk/src/deghosting/khan.cpp
===================================================================
--- hugin/trunk/src/deghosting/khan.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/deghosting/khan.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -46,6 +46,10 @@
#include "khan.h"
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
#define ENABLE_SAME 0 /*-a s option currently doesn't work */
#define ENABLE_SCALING 0 /*-a m and u options currently don't work */
@@ -78,7 +82,7 @@
string exr = "EXR";
//load images and prepare initial weights
- for (uint i = 0; i < inputFiles.size(); i++) {
+ for (unsigned i = 0; i < inputFiles.size(); i++) {
if (g_verbose > 0) {
std::cout << "Loading and preparing " << inputFiles[i] << std::endl;
}
@@ -244,7 +248,7 @@
if(g_verbose > 3) { //check consistency
cout << "checking image and weight vectors for consistent size" <<endl;
assert(source_images.size() == weights.size());
- for(uint i = 0; i < source_images.size(); i++)
+ for(unsigned i = 0; i < source_images.size(); i++)
assert(source_images.at(i).size() == weights.at(i).size());
}
@@ -324,7 +328,7 @@
assert(smallWeights.size() == img_bounds.size());
- for(uint i = 0; i < smallWeights.size(); i++) {
+ for(unsigned i = 0; i < smallWeights.size(); i++) {
int w = img_bounds.at(i).width();
int h = img_bounds.at(i).height();
@@ -402,7 +406,7 @@
Fvectors2Images(img_bounds, alpha_images, weights, width,
&smallWeights);
- for(uint i = 0; i < smallWeights.size(); i++) {
+ for(unsigned i = 0; i < smallWeights.size(); i++) {
int w = img_bounds.at(i).width();
int h = img_bounds.at(i).height();
//resize weights
@@ -451,7 +455,7 @@
Fvectors2Images(img_bounds, alpha_images, weights, width, &w);
char tmpfn[100];
- for(uint i = 0; i < w.size(); i++) {
+ for(unsigned i = 0; i < w.size(); i++) {
snprintf(tmpfn, 99, "iter%d_weight_layer%d.tiff", iter, i);
ImageExportInfo exWeight(tmpfn);
exportImage(srcImageRange(*(w.at(i))), exWeight.setPixelType("UINT8"));
@@ -647,7 +651,7 @@
float min_weight = FLT_MAX;
int num_layers = old_weights.at(total_offset).size();
- assert((uint)num_layers == source_images.at(total_offset).size());
+ assert((unsigned)num_layers == source_images.at(total_offset).size());
//for each layer
for(int layer = 0; layer < num_layers; layer++) {
if(g_verbose > 3) {
@@ -663,12 +667,12 @@
if(g_verbose >3)
cout << "\tpixel = " << curr_px << endl;
//for each neighbor location
- for(uint n = 0; n < neighbor_offsets.size(); n++) {
+ for(unsigned n = 0; n < neighbor_offsets.size(); n++) {
int n_offset = neighbor_offsets.at(n);
vector<float> *px_neighbor_w = &(old_weights.at(n_offset));
const vector<float> *px_neighbor_v =
&(source_images.at(n_offset));
- uint num_l = px_neighbor_w->size();
+ unsigned num_l = px_neighbor_w->size();
assert(num_l == px_neighbor_v->size());
float tmp_weight = 0;
float tmp_prev_weight = 0;
@@ -679,7 +683,7 @@
}
//number of layers at this neighbor location
- for(uint l = 0; l < num_l; l++) {
+ for(unsigned l = 0; l < num_l; l++) {
if(g_verbose > 3) {
cout << "\t\t\tlayer " << l << endl
Modified: hugin/trunk/src/deghosting/khanSupport.cpp
===================================================================
--- hugin/trunk/src/deghosting/khanSupport.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/deghosting/khanSupport.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -91,7 +91,7 @@
output->resize(width, height);
mask->resize(width, height);
- for(uint i = 0; i < inputInfo.size(); i++) {
+ for(unsigned i = 0; i < inputInfo.size(); i++) {
const ImageImportInfo curr_info = inputInfo.at(i);
Rect2D bounds(Point2D(curr_info.getPosition()), curr_info.size());
FRGBImage img(inputInfo.at(i).size());
@@ -133,7 +133,7 @@
bool ignore_alpha = !(alpha_images.size());
//error checking
- if((uint)total_layers != input_images.size())
+ if((unsigned)total_layers != input_images.size())
return -1;
for(int i = 0; i < total_layers; i++) {
@@ -189,7 +189,7 @@
bool ignore_alpha = !(alpha_images.size());
//error checking
- if((uint)total_layers != input_images.size())
+ if((unsigned)total_layers != input_images.size())
return -1;
for(int i = 0; i < total_layers; i++) {
@@ -243,13 +243,13 @@
int total_layers = bounds.size();
bool ignore_alpha = !(alpha_images.size());
if(!ignore_alpha)
- assert((uint)total_layers == alpha_images.size());
+ assert((unsigned)total_layers == alpha_images.size());
output_images->resize(total_layers);
//duplicate input_images
vector<vector<float> > input;
- for(uint i = 0; i < input_images.size(); i++) {
+ for(unsigned i = 0; i < input_images.size(); i++) {
input.push_back(vector<float>(input_images.at(i)));
}
@@ -290,7 +290,7 @@
int height = input_images.size() / width;
bool ignore_alpha = !(alpha_images.size());
if(!ignore_alpha)
- assert((uint)total_layers == alpha_images.size());
+ assert((unsigned)total_layers == alpha_images.size());
for(int i = 0; i < total_layers; i++) {
output_images->push_back(BImagePtr(new BImage(bounds.at(i).size())));
@@ -299,7 +299,7 @@
for(int y = 0; y < height; y++) {
for(int x = 0; x < width; x++) {
Point2D pt(x, y);
- uint ind = 0;
+ unsigned ind = 0;
vector<char> pixel_layers = input_images.at(y * width + x);
for(int i = 0; i < total_layers && ind < pixel_layers.size(); i++) {
Modified: hugin/trunk/src/foreign/CMakeLists.txt
===================================================================
--- hugin/trunk/src/foreign/CMakeLists.txt 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/foreign/CMakeLists.txt 2007-10-26 22:47:38 UTC (rev 2500)
@@ -4,3 +4,8 @@
add_subdirectory(levmar)
add_subdirectory(jhead)
add_subdirectory(lensdb)
+
+IF (WIN32)
+add_subdirectory(getopt)
+ENDIF (WIN32)
+
Modified: hugin/trunk/src/foreign/getopt/include/getopt.h
===================================================================
--- hugin/trunk/src/foreign/getopt/include/getopt.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/foreign/getopt/include/getopt.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -18,14 +18,6 @@
#ifndef _GETOPT_H
#define _GETOPT_H 1
-#if defined(_MSC_VER) && !defined(BUILD_GETOPT)
-# ifdef _DEBUG
-# pragma comment(lib,"getopt_debug.lib")
-# else
-# pragma comment(lib,"getopt.lib")
-# endif
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
Modified: hugin/trunk/src/foreign/vigra/vigra_impex/exr.cxx
===================================================================
--- hugin/trunk/src/foreign/vigra/vigra_impex/exr.cxx 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/foreign/vigra/vigra_impex/exr.cxx 2007-10-26 22:47:38 UTC (rev 2500)
@@ -47,10 +47,10 @@
#include <stdexcept>
#include <iostream>
-#include <OpenEXR/ImfRgbaFile.h>
-#include <OpenEXR/ImfStringAttribute.h>
-#include <OpenEXR/ImfMatrixAttribute.h>
-#include <OpenEXR/ImfArray.h>
+#include <ImfRgbaFile.h>
+#include <ImfStringAttribute.h>
+#include <ImfMatrixAttribute.h>
+#include <ImfArray.h>
using namespace Imf;
using namespace Imath;
Modified: hugin/trunk/src/hugin1/PT/Panorama.h
===================================================================
--- hugin/trunk/src/hugin1/PT/Panorama.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/PT/Panorama.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -67,10 +67,8 @@
hugin_utils::FDiff2D calcFOV() const
{
Panorama pano(*this);
- return HuginBase::CalculateFOV(pano)
- .run<HuginBase::CalculateFOV>()
- .getResultFOV();
- }
+ return HuginBase::CalculateFOV::calcFOV(pano);
+ }
/** calculate the HFOV and height so that the whole input
* fits in into the output panorama */
@@ -91,9 +89,7 @@
unsigned calcOptimalWidth() const
{
Panorama pano(*this);
- return HuginBase::CalculateOptimalScale(pano)
- .run<HuginBase::CalculateOptimalScale>()
- .getResultOptimalWidth();
+ return HuginBase::CalculateOptimalScale::calcOptimalScale(pano) * pano.getOptions().getWidth();
}
/** calculate control point error distance statistics */
@@ -206,9 +202,7 @@
inline double calcMeanExposure(Panorama& pano)
{
- return HuginBase::CalculateMeanExposure(pano)
- .run<HuginBase::CalculateMeanExposure>()
- .getResultExposure();
+ return HuginBase::CalculateMeanExposure::calcMeanExposure(pano);
}
Modified: hugin/trunk/src/hugin1/PT/PhotometricOptimizer.h
===================================================================
--- hugin/trunk/src/hugin1/PT/PhotometricOptimizer.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/PT/PhotometricOptimizer.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -39,7 +39,7 @@
utils::ProgressReporter & progress,
double & error)
{
- HuginBase::PhorometricOptimizer::optimizePhotometric(pano, vars, correspondences, progress, error);
+ HuginBase::PhotometricOptimizer::optimizePhotometric(pano, vars, correspondences, progress, error);
}
Modified: hugin/trunk/src/hugin1/base_wx/huginConfig.cpp
===================================================================
--- hugin/trunk/src/hugin1/base_wx/huginConfig.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/base_wx/huginConfig.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -41,7 +41,7 @@
enblendroot = root + "/enblend/";
ptroot = root + "/panotools/";
-#elsif defined __WXMAC__
+#elif defined __WXMAC__
// dangelo: on OSX, the tools are inside the application bundle, but I don't know
// where.
root = "";
Modified: hugin/trunk/src/hugin1/hugin/CMakeLists.txt
===================================================================
--- hugin/trunk/src/hugin1/hugin/CMakeLists.txt 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/hugin/CMakeLists.txt 2007-10-26 22:47:38 UTC (rev 2500)
@@ -80,14 +80,16 @@
COMMAND ${CMAKE_COMMAND}
ARGS -Dfile="${CMAKE_CURRENT_BINARY_DIR}/${PROGNAME}.app/Contents/Resources/xrc/cp_editor_panel.xrc" -P ${CMAKE_SOURCE_DIR}/CMakeModules/fix_osx_xrc.cmake
)
-ELSE( APPLE )
+ELSEIF ( WIN32 )
+ ADD_EXECUTABLE( ${PROGNAME} WIN32 ${hugin_SOURCES} hugin_rc.rc )
+ELSE (APPLE)
ADD_EXECUTABLE( ${PROGNAME} ${hugin_SOURCES} )
ENDIF( APPLE )
target_link_libraries( ${PROGNAME} ${common_libs} ${image_libs} huginbasewx ${wxWidgets_LIBRARIES})
install(TARGETS ${PROGNAME}
- DESTINATION bin)
+ DESTINATION ${BINDIR})
# install further stuff (icons etc.)
Modified: hugin/trunk/src/hugin1/hugin/CPImageCtrl.h
===================================================================
--- hugin/trunk/src/hugin1/hugin/CPImageCtrl.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/hugin/CPImageCtrl.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -416,7 +416,7 @@
/// check if p is over a known point, if it is, pointNr contains
/// the point
- EditorState isOccupied(wxPoint p, const hugin_utils::FDiff2D &p, unsigned int & pointNr) const;
+ EditorState isOccupied(wxPoint mousePos, const hugin_utils::FDiff2D & point, unsigned int & pointNr) const;
CPEditorPanel * m_editPanel;
Modified: hugin/trunk/src/hugin1/hugin/CPListFrame.cpp
===================================================================
--- hugin/trunk/src/hugin1/hugin/CPListFrame.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/hugin/CPListFrame.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -266,11 +266,11 @@
wxConfigBase * config = wxConfigBase::Get();
m_verbose = (config->Read(wxT("/CPListFrame/verbose"),0l) != 0);
-#if __WXMSW__
+#ifdef __WXMSW__
// wxFrame does have a strange background color on Windows, copy color from a child widget
this->SetBackgroundColour(XRCCTRL(*this, "cp_list_select", wxButton)->GetBackgroundColour());
#endif
-#if __WXMSW__
+#ifdef __WXMSW__
wxIcon myIcon(MainFrame::Get()->GetXRCPath() + wxT("data/icon.ico"),wxBITMAP_TYPE_ICO);
#else
wxIcon myIcon(MainFrame::Get()->GetXRCPath() + wxT("data/icon.png"),wxBITMAP_TYPE_PNG);
Modified: hugin/trunk/src/hugin1/hugin/MainFrame.cpp
===================================================================
--- hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -297,7 +297,7 @@
pref_dlg = new PreferencesDialog(this);
// set the minimize icon
-#if __WXMSW__
+#ifdef __WXMSW__
wxIcon myIcon(GetXRCPath() + wxT("data/icon.ico"),wxBITMAP_TYPE_ICO);
#else
wxIcon myIcon(GetXRCPath() + wxT("data/icon.png"),wxBITMAP_TYPE_PNG);
@@ -364,7 +364,7 @@
SetAutoLayout(false);
-#if __WXMSW__
+#ifdef __WXMSW__
// wxFrame does have a strange background color on Windows, copy color from a child widget
this->SetBackgroundColour(images_panel->GetBackgroundColour());
#endif
Modified: hugin/trunk/src/hugin1/hugin/PreferencesDialog.cpp
===================================================================
--- hugin/trunk/src/hugin1/hugin/PreferencesDialog.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/hugin/PreferencesDialog.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -100,7 +100,7 @@
// initialization. this will be done later.
wxXmlResource::Get()->LoadFrame(this, parent, wxT("pref_dialog"));
-#if __WXMSW__
+#ifdef __WXMSW__
wxIcon myIcon(MainFrame::Get()->GetXRCPath() + wxT("data/icon.ico"),wxBITMAP_TYPE_ICO);
#else
wxIcon myIcon(MainFrame::Get()->GetXRCPath() + wxT("data/icon.png"),wxBITMAP_TYPE_PNG);
@@ -178,7 +178,7 @@
// Load configuration values from wxConfig
UpdateDisplayData();
-#if __WXMSW__
+#ifdef __WXMSW__
// wxFrame does have a strange background color on Windows, copy color from a child widget
this->SetBackgroundColour(XRCCTRL(*this, "prefs_ft_RotationStartAngle", wxSpinCtrl)->GetBackgroundColour());
#endif
Modified: hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp
===================================================================
--- hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -355,7 +355,7 @@
m_topsizer->SetSizeHints( this );
// set the minimize icon
-#if __WXMSW__
+#ifdef __WXMSW__
wxIcon myIcon(MainFrame::Get()->GetXRCPath() + wxT("data/icon.ico"),wxBITMAP_TYPE_ICO);
#else
wxIcon myIcon(MainFrame::Get()->GetXRCPath() + wxT("data/icon.png"),wxBITMAP_TYPE_PNG);
Modified: hugin/trunk/src/hugin1/hugin/RunStitcherFrame.cpp
===================================================================
--- hugin/trunk/src/hugin1/hugin/RunStitcherFrame.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/hugin/RunStitcherFrame.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -65,7 +65,7 @@
bool ok = wxXmlResource::Get()->LoadFrame(this, parent, wxT("run_stitcher_frame"));
assert(ok);
-#if __WXMSW__
+#if defined __WXMSW__
wxIcon myIcon(MainFrame::Get()->GetXRCPath() + wxT("data/icon.ico"),wxBITMAP_TYPE_ICO);
#else
wxIcon myIcon(MainFrame::Get()->GetXRCPath() + wxT("data/icon.png"),wxBITMAP_TYPE_PNG);
Modified: hugin/trunk/src/hugin1/hugin/VigCorrDialog.cpp
===================================================================
--- hugin/trunk/src/hugin1/hugin/VigCorrDialog.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/hugin/VigCorrDialog.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -89,7 +89,7 @@
// initialization. this will be done later.
wxXmlResource::Get()->LoadFrame(this, parent, wxT("vig_corr_dlg"));
-#if __WXMSW__
+#ifdef __WXMSW__
wxIcon myIcon(MainFrame::Get()->GetXRCPath() + wxT("data/icon.ico"),wxBITMAP_TYPE_ICO);
#else
wxIcon myIcon(MainFrame::Get()->GetXRCPath() + wxT("data/icon.png"),wxBITMAP_TYPE_PNG);
@@ -131,7 +131,7 @@
// update display with values from panorama
UpdateDisplayData();
-#if __WXMSW__
+#ifdef __WXMSW__
// wxFrame does have a strange background color on Windows, copy color from a child widget
this->SetBackgroundColour(XRCCTRL(*this, "vig_corr_mode_rbbox", wxRadioBox)->GetBackgroundColour());
#endif
Modified: hugin/trunk/src/hugin1/hugin/huginApp.cpp
===================================================================
--- hugin/trunk/src/hugin1/hugin/huginApp.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/hugin/huginApp.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -240,6 +240,7 @@
locale.AddCatalogLookupPathPrefix(m_huginPath + wxT("/locale"));
#if defined __WXMSW__
locale.AddCatalogLookupPathPrefix(wxT("./locale"));
+
#elif defined __WXMAC__
// set path to include bundled executables
wxSetEnv(wxT("PATH"), wxString(wxGetenv(wxT("PATH")))+wxT(":")+wxFileName(MacGetPathTOBundledExecutableFile(CFSTR("enblend"))).GetPath());
Modified: hugin/trunk/src/hugin1/hugin/xrc/data/CMakeLists.txt
===================================================================
--- hugin/trunk/src/hugin1/hugin/xrc/data/CMakeLists.txt 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/hugin/xrc/data/CMakeLists.txt 2007-10-26 22:47:38 UTC (rev 2500)
@@ -2,5 +2,8 @@
FILE(GLOB DATAFILES *.htm *.html *.ico *.jpg *.png *.xpm *.txt *.mk)
INSTALL(FILES ${DATAFILES} DESTINATION ${HUGINDATADIR}/xrc/data)
-INSTALL(FILES hugin.png DESTINATION ${DATADIR}/pixmaps)
+IF (UNIX)
+ INSTALL(FILES hugin.png DESTINATION ${DATADIR}/pixmaps)
+ENDIF (UNIX)
+
ADD_SUBDIRECTORY(help_en_EN)
Modified: hugin/trunk/src/hugin1/hugin/xrc/data/tips.txt
===================================================================
--- hugin/trunk/src/hugin1/hugin/xrc/data/tips.txt 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/hugin/xrc/data/tips.txt 2007-10-26 22:47:38 UTC (rev 2500)
@@ -1,6 +1,6 @@
# Tips for hugin
# These tips are translated via gettext.
-_("Welcome to Hugin.\n To create a panorama, just follow the sequence shown in the assistant tab.")
+_("Welcome to Hugin. To create a panorama, just follow the sequence shown in the assistant tab.")
_("If the horizon of a panorama is wavy, use the straighten function in the preview window to straighten it")
_("The Preview window can be used to center the panorama by clicking with the left mouse button. A right click will rotate the panorama")
_("The Autopano and Autopano-SIFT programs can be used to create control points automatically. Please install one of them if you haven't already done so.")
Modified: hugin/trunk/src/hugin1/nona_gui/CMakeLists.txt
===================================================================
--- hugin/trunk/src/hugin1/nona_gui/CMakeLists.txt 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/nona_gui/CMakeLists.txt 2007-10-26 22:47:38 UTC (rev 2500)
@@ -1,8 +1,12 @@
-add_executable(nona_gui nona_gui.cpp)
+IF (WIN32)
+ add_executable(nona_gui WIN32 nona_gui.cpp nona_gui_rc.rc)
+ELSEIF (WIN32)
+ add_executable(nona_gui nona_gui.cpp)
+ENDIF (WIN32)
target_link_libraries(nona_gui ${common_libs} ${image_libs} huginbasewx ${wxWidgets_LIBRARIES})
-install(TARGETS nona_gui DESTINATION bin)
+install(TARGETS nona_gui DESTINATION ${BINDIR})
add_subdirectory(po)
Modified: hugin/trunk/src/hugin1/stitch_project/CMakeLists.txt
===================================================================
--- hugin/trunk/src/hugin1/stitch_project/CMakeLists.txt 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin1/stitch_project/CMakeLists.txt 2007-10-26 22:47:38 UTC (rev 2500)
@@ -1,9 +1,15 @@
-add_executable(hugin_stitch_project hugin_stitch_project.cpp)
+IF (WIN32)
+ add_executable(hugin_stitch_project WIN32 hugin_stitch_project.cpp hugin_stitch_project_rc.rc)
+ELSE (WIN32)
+ add_executable(hugin_stitch_project hugin_stitch_project.cpp)
+ENDIF (WIN32)
+
+
target_link_libraries(hugin_stitch_project ${common_libs} ${image_libs} huginbasewx ${wxWidgets_LIBRARIES})
install(TARGETS hugin_stitch_project
- DESTINATION bin)
+ DESTINATION ${BINDIR})
Modified: hugin/trunk/src/hugin_base/algorithm/PanoramaAlgorithm.h
===================================================================
--- hugin/trunk/src/hugin_base/algorithm/PanoramaAlgorithm.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/algorithm/PanoramaAlgorithm.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -72,14 +72,16 @@
o_successful = runAlgorithm();
}
+#if 1
/// runs the algorithm.
template<class AlgorithmClass>
- AlgorithmClass& run()
+ AlgorithmClass& runMe()
{
AlgorithmClass& THIS = static_cast<AlgorithmClass&>(*this);
THIS.run();
return THIS;
}
+#endif
/** implementation of the algorithm.
* You should override with your algorithm's implementiation.
Modified: hugin/trunk/src/hugin_base/algorithms/nona/FitPanorama.cpp
===================================================================
--- hugin/trunk/src/hugin_base/algorithms/nona/FitPanorama.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/algorithms/nona/FitPanorama.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -38,7 +38,7 @@
{
// FIXME: doesn't work properly for fisheye and mirror projections,
// it will not calculate a vfov bigger than 180.
- FDiff2D fov = CalculateFOV(panorama).run<CalculateFOV>().getResultFOV();
+ FDiff2D fov = CalculateFOV::calcFOV(panorama);
// use estimated fov to calculate a suitable panorama height.
// calculate VFOV based on current panorama
Modified: hugin/trunk/src/hugin_base/algorithms/optimizer/PTOptimizer.cpp
===================================================================
--- hugin/trunk/src/hugin_base/algorithms/optimizer/PTOptimizer.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/algorithms/optimizer/PTOptimizer.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -175,7 +175,8 @@
// check if this is a 360 deg pano.
CenterHorizontally(optPano).run();
- FDiff2D fov = CalculateFOV(optPano).run<CalculateFOV>().getResultFOV();
+ //FDiff2D fov = CalculateFOV(optPano).run<CalculateFOV>().getResultFOV();
+ FDiff2D fov = CalculateFOV::calcFOV(optPano);
if (fov.x >= 359) {
// optimize HFOV for 360 deg panos
Modified: hugin/trunk/src/hugin_base/algorithms/optimizer/PhotometricOptimizer.cpp
===================================================================
--- hugin/trunk/src/hugin_base/algorithms/optimizer/PhotometricOptimizer.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/algorithms/optimizer/PhotometricOptimizer.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -48,7 +48,7 @@
-PhorometricOptimizer::OptimData::OptimData(const PanoramaData & pano, const OptimizeVector & optvars,
+PhotometricOptimizer::OptimData::OptimData(const PanoramaData & pano, const OptimizeVector & optvars,
const std::vector<vigra_ext::PointPairRGB> & data,
double mEstimatorSigma, bool symmetric,
int maxIter, AppBase::ProgressReporter & progress)
@@ -105,7 +105,7 @@
}
}
-void PhorometricOptimizer::OptimData::ToX(double * x)
+void PhotometricOptimizer::OptimData::ToX(double * x)
{
for (size_t i=0; i < m_vars.size(); i++)
{
@@ -119,7 +119,7 @@
}
-void PhorometricOptimizer::OptimData::FromX(double * x)
+void PhotometricOptimizer::OptimData::FromX(double * x)
{
for (size_t i=0; i < m_vars.size(); i++)
{
@@ -136,7 +136,7 @@
-void PhorometricOptimizer::photometricError(double *p, double *x, int m, int n, void * data)
+void PhotometricOptimizer::photometricError(double *p, double *x, int m, int n, void * data)
{
#ifdef DEBUG_LOG_VIG
static int iter = 0;
@@ -244,7 +244,7 @@
DEBUG_DEBUG("squared error: " << sqerror);
}
-int PhorometricOptimizer::photometricVis(double *p, double *x, int m, int n, int iter, double sqerror, void * data)
+int PhotometricOptimizer::photometricVis(double *p, double *x, int m, int n, int iter, double sqerror, void * data)
{
OptimData * dat = (OptimData *) data;
char tmp[200];
@@ -254,7 +254,7 @@
return dat->m_progress.increaseProgress(0.0, tmp) ? 1 : 0 ;
}
-void PhorometricOptimizer::optimizePhotometric(PanoramaData & pano, const OptimizeVector & vars,
+void PhotometricOptimizer::optimizePhotometric(PanoramaData & pano, const OptimizeVector & vars,
const std::vector<vigra_ext::PointPairRGB> & correspondences,
AppBase::ProgressReporter & progress,
double & error)
@@ -388,7 +388,7 @@
}
-bool PhorometricOptimizer::runAlgorithm()
+bool PhotometricOptimizer::runAlgorithm()
{
// is this correct? how much progress requierd?
AppBase::ProgressReporter* progRep =
Modified: hugin/trunk/src/hugin_base/algorithms/optimizer/PhotometricOptimizer.h
===================================================================
--- hugin/trunk/src/hugin_base/algorithms/optimizer/PhotometricOptimizer.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/algorithms/optimizer/PhotometricOptimizer.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -35,7 +35,7 @@
namespace HuginBase
{
- class PhorometricOptimizer : public TimeConsumingPanoramaAlgorithm
+ class PhotometricOptimizer : public TimeConsumingPanoramaAlgorithm
{
public:
@@ -43,7 +43,7 @@
typedef std::vector<vigra_ext::PointPairRGB> PointPairs;
///
- PhorometricOptimizer(PanoramaData& panorama, AppBase::ProgressDisplay* progressDisplay,
+ PhotometricOptimizer(PanoramaData& panorama, AppBase::ProgressDisplay* progressDisplay,
const OptimizeVector& vars,
const PointPairs& correspondences)
: TimeConsumingPanoramaAlgorithm(panorama, progressDisplay),
@@ -51,7 +51,7 @@
{};
///
- virtual ~PhorometricOptimizer() {};
+ virtual ~PhotometricOptimizer() {};
public:
@@ -130,7 +130,7 @@
- class SmartPhotometricOptimizer : public PhorometricOptimizer, protected SmartOptimizerStub
+ class SmartPhotometricOptimizer : public PhotometricOptimizer, protected SmartOptimizerStub
{
public:
/// local optimize definition.
@@ -145,7 +145,7 @@
SmartPhotometricOptimizer(PanoramaData& panorama, AppBase::ProgressDisplay* progressDisplay,
const OptimizeVector& vars,
const PointPairs& correspondences)
- : PhorometricOptimizer(panorama, progressDisplay, vars, correspondences)
+ : PhotometricOptimizer(panorama, progressDisplay, vars, correspondences)
{};
///
Modified: hugin/trunk/src/hugin_base/algorithms/point_sampler/PointSampler.h
===================================================================
--- hugin/trunk/src/hugin_base/algorithms/point_sampler/PointSampler.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/algorithms/point_sampler/PointSampler.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -24,6 +24,8 @@
#ifndef _POINTSAMPLER_H
#define _POINTSAMPLER_H
+#include <ctime>
+
#include <algorithm/PanoramaAlgorithm.h>
#include <boost/random.hpp>
@@ -96,8 +98,13 @@
///
virtual bool runAlgorithm();
+
+ PointSampler & execute()
+ {
+ run();
+ return *this;
+ }
-
public:
///
typedef std::vector<vigra_ext::PointPairRGB> PointPairs;
Modified: hugin/trunk/src/hugin_base/appbase/ProgressDisplayOld.cpp
===================================================================
--- hugin/trunk/src/hugin_base/appbase/ProgressDisplayOld.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/appbase/ProgressDisplayOld.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -23,6 +23,10 @@
#include "ProgressDisplayOld.h"
+#ifdef WIN32
+#define snprintf _snprintf
+#endif
+
namespace AppBase {
Modified: hugin/trunk/src/hugin_base/hugin_math/hugin_math.h
===================================================================
--- hugin/trunk/src/hugin_base/hugin_math/hugin_math.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/hugin_math/hugin_math.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -27,9 +27,14 @@
#ifndef _HUGIN_MATH_HUGIN_MATH_H
#define _HUGIN_MATH_HUGIN_MATH_H
+#include <math.h>
#include <iostream>
#include <vigra/diff2d.hxx>
+#ifndef M_PI
+ #define M_PI 3.14159265358979323846
+#endif
+
#ifndef PI
#define PI 3.14159265358979323846
#endif
Modified: hugin/trunk/src/hugin_base/nona/Stitcher.cpp
===================================================================
--- hugin/trunk/src/hugin_base/nona/Stitcher.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/nona/Stitcher.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -24,12 +24,13 @@
*/
+
+
+
#include "Stitcher.h"
-#include <vigra/windows.h>
#include <vigra/stdimage.hxx>
-
namespace HuginBase {
namespace Nona {
Modified: hugin/trunk/src/hugin_base/nona/Stitcher.h
===================================================================
--- hugin/trunk/src/hugin_base/nona/Stitcher.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/nona/Stitcher.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -26,6 +26,8 @@
#ifndef _NONA_STITCHER_H
#define _NONA_STITCHER_H
+// To avoid windows.h namespace pollution later on
+#include <vigra/windows.h>
#include <sstream>
#include <iomanip>
@@ -45,13 +47,19 @@
#include <vigra_ext/ImageTransforms.h>
#include <panodata/PanoramaData.h>
+#include <algorithms/nona/ComputeImageROI.h>
#include <nona/RemappedPanoImage.h>
#include <nona/ImageRemapper.h>
-#include <algorithms/nona/ComputeImageROI.h>
// calculate distance image for multi file output
#define STITCHER_CALC_DIST_IMG 0
+// somehow these are still
+#undef DIFFERENCE
+#undef min
+#undef max
+#undef MIN
+#undef MAX
namespace HuginBase {
namespace Nona {
Modified: hugin/trunk/src/hugin_base/nona/Stitcher4.cpp
===================================================================
--- hugin/trunk/src/hugin_base/nona/Stitcher4.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/nona/Stitcher4.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -24,7 +24,14 @@
*/
#include "Stitcher.h"
+// somehow these are still set after panorama.h has been included
+#undef DIFFERENCE
+#undef min
+#undef max
+#undef MIN
+#undef MAX
+
using namespace std;
using namespace vigra;
Modified: hugin/trunk/src/hugin_base/panodata/PanoramaData.h
===================================================================
--- hugin/trunk/src/hugin_base/panodata/PanoramaData.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/panodata/PanoramaData.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -532,7 +532,7 @@
virtual PanoramaDataMemento* getNewMemento() const =0;
/// set the internal state
- virtual bool setMementoToCopyOf(const PanoramaDataMemento* memento) =0;
+ virtual bool setMementoToCopyOf(const PanoramaDataMemento* const memento) =0;
// -- Optimization Status --
Modified: hugin/trunk/src/hugin_base/panodata/PanoramaOptions.h
===================================================================
--- hugin/trunk/src/hugin_base/panodata/PanoramaOptions.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/panodata/PanoramaOptions.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -34,9 +34,14 @@
//#include <math.h>
#include <vigra/diff2d.hxx>
+
+
+#if 1
#ifdef HasPANO13
- extern "C" {
+#include <vigra/windows.h>
+extern "C" {
+
#ifdef __INTEL__
#define __INTELMEMO__
#undef __INTEL__
@@ -51,27 +56,26 @@
// remove stupid #defines from the evil windows.h
- #ifdef DIFFERENCE
- #undef DIFFERENCE
- #endif
+#ifdef DIFFERENCE
+#undef DIFFERENCE
+#endif
+#ifdef min
+#undef min
+#endif
+#ifdef max
+#undef max
+#endif
+#ifdef MIN
+#undef MIN
+#endif
+#ifdef MAX
+#undef MAX
+#endif
- #ifdef MIN
- #undef MIN
- #endif
-
- #ifdef MAX
- #undef MAX
- #endif
-
- #ifdef min
- #undef min
- #endif
-
- #ifdef max
- #undef max
- #endif
}
#endif
+
+#endif
//
//#include "PT/PanoImage.h"
Modified: hugin/trunk/src/hugin_base/panotools/PanoToolsInterface.h
===================================================================
--- hugin/trunk/src/hugin_base/panotools/PanoToolsInterface.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/panotools/PanoToolsInterface.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -26,7 +26,36 @@
#include <hugin_config.h>
+#include <string>
+#include <set>
+
+#include <hugin_math/hugin_math.h>
+#include <panodata/PanoramaVariable.h>
+#include <panodata/Lens.h>
+#include <panodata/PanoramaOptions.h>
+#include <panodata/SrcPanoImage.h>
+#include <panodata/ControlPoint.h>
+
+
// libpano includes ------------------------------------------------------------
+
+#ifdef _WIN32
+// include windows.h with sensible defines, otherwise
+// panotools might include with its stupid, commonly
+// named macros all over the place.
+#define _STLP_VERBOSE_AUTO_LINK
+#define _USE_MATH_DEFINES
+#define NOMINMAX
+#define VC_EXTRALEAN
+#include <windows.h>
+#undef DIFFERENCE
+#undef min
+#undef max
+#undef MIN
+#undef MAX
+#endif
+
+
extern "C" {
#ifdef __INTEL__
#define __INTELMEMO__
@@ -49,38 +78,19 @@
#else
#include <pano12/filter.h>
#endif
-}
-// remove stupid #defines from the evil windows.h
-#ifdef __WXMSW__
-#include <wx/msw/winundef.h>
+// somehow these are still set after panorama.h has been included
#undef DIFFERENCE
-#ifdef MIN
+#undef min
+#undef max
#undef MIN
-#endif
-#ifdef MAX
#undef MAX
-#endif
-#endif
-#ifdef min
-#undef min
-#endif
-#ifdef max
-#undef max
-#endif
+}
+
//------------------------------------------------------------------------------
-#include <string>
-#include <set>
-#include <hugin_math/hugin_math.h>
-#include <panodata/PanoramaVariable.h>
-#include <panodata/Lens.h>
-#include <panodata/PanoramaOptions.h>
-#include <panodata/SrcPanoImage.h>
-#include <panodata/ControlPoint.h>
-
namespace vigra { class Diff2D; }
namespace HuginBase { class PanoramaData; }
Modified: hugin/trunk/src/hugin_base/panotools/PanoToolsOptimizerWrapper.cpp
===================================================================
--- hugin/trunk/src/hugin_base/panotools/PanoToolsOptimizerWrapper.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/panotools/PanoToolsOptimizerWrapper.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -28,53 +28,29 @@
#include <hugin_config.h>
+#include <sstream>
+#include <hugin_utils/utils.h>
+
// libpano includes ------------------------------------------------------------
#include <stdlib.h>
-extern "C" {
-#ifdef __INTEL__
-#define __INTELMEMO__
-#undef __INTEL__
-#endif
-
-#ifdef HasPANO13
-#include <pano13/panorama.h>
-#else
-#include <pano12/panorama.h>
-#endif
-
-#ifdef __INTELMEMO__
-#define __INTEL__
-#undef __INTELMEMO__
-#endif
-
-#ifdef HasPANO13
-#include <pano13/filter.h>
-#else
-#include <pano12/filter.h>
-#endif
-}
-
-// remove stupid #defines from the evil windows.h
-#ifdef __WXMSW__
-#include <wx/msw/winundef.h>
+#ifdef _WIN32
+// include windows.h with sensible defines, otherwise
+// panotools might include with its stupid, commonly
+// named macros all over the place.
+#define _STLP_VERBOSE_AUTO_LINK
+#define _USE_MATH_DEFINES
+#define NOMINMAX
+#define VC_EXTRALEAN
+#include <windows.h>
#undef DIFFERENCE
-#ifdef MIN
-#undef MIN
#endif
-#ifdef MAX
-#undef MAX
-#endif
-#endif
-#ifdef min
-#undef min
-#endif
-#ifdef max
-#undef max
-#endif
+#include "PanoToolsInterface.h"
+#include "PanoToolsOptimizerWrapper.h"
+
// missing prototype in filter.h
extern "C" {
int CheckParams( AlignInfo *g );
@@ -85,13 +61,8 @@
//------------------------------------------------------------------------------
-#include <sstream>
-#include <hugin_utils/utils.h>
-#include "PanoToolsInterface.h"
-#include "PanoToolsOptimizerWrapper.h"
-
//#define DEBUG_WRITE_OPTIM_OUTPUT
//#define DEBUG_WRITE_OPTIM_OUTPUT_FILE "hugin_debug_optim_results.txt"
Modified: hugin/trunk/src/hugin_base/vigra_ext/Interpolators.h
===================================================================
--- hugin/trunk/src/hugin_base/vigra_ext/Interpolators.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/vigra_ext/Interpolators.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -28,6 +28,7 @@
#define VIGRA_EXT_INTERPOLATORS_H
#include <math.h>
+#include <hugin_math/hugin_math.h>
#include <algorithm>
#include <vigra/accessor.hxx>
Modified: hugin/trunk/src/hugin_base/vigra_ext/ResponseTransform.h
===================================================================
--- hugin/trunk/src/hugin_base/vigra_ext/ResponseTransform.h 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/hugin_base/vigra_ext/ResponseTransform.h 2007-10-26 22:47:38 UTC (rev 2500)
@@ -26,7 +26,8 @@
#include <photometric/ResponseTransform.h>
-#warning "Deprecated!"
+// does not work on MSVC
+//#warning "Deprecated!"
namespace vigra_ext {
Modified: hugin/trunk/src/tools/CMakeLists.txt
===================================================================
--- hugin/trunk/src/tools/CMakeLists.txt 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/tools/CMakeLists.txt 2007-10-26 22:47:38 UTC (rev 2500)
@@ -15,5 +15,5 @@
target_link_libraries(vig_optimize ${common_libs} ${image_libs})
install(TARGETS nona vig_optimize autooptimiser fulla
- DESTINATION bin)
+ DESTINATION ${BINDIR})
Modified: hugin/trunk/src/tools/autooptimiser.cpp
===================================================================
--- hugin/trunk/src/tools/autooptimiser.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/tools/autooptimiser.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -222,6 +222,7 @@
opts.setHFOV(fitPano.getResultHorizontalFOV());
opts.setHeight(roundi(fitPano.getResultHeight()));
vfov = opts.getVFOV();
+ hfov = opts.getHFOV();
// avoid perspective projection if field of view > 100 deg
double mf = 100;
if (vfov < mf) {
@@ -237,8 +238,8 @@
double sizeFactor = 0.7;
pano.setOptions(opts);
- int w = CalculateOptimalScale(pano).run<CalculateOptimalScale>().getResultOptimalWidth();
- opts.setWidth(roundi(w*sizeFactor), true);
+ int w = CalculateOptimalScale::calcOptimalScale(pano);
+ opts.setWidth(roundi(opts.getWidth()*w*sizeFactor), true);
pano.setOptions(opts);
}
Modified: hugin/trunk/src/tools/vig_optimize.cpp
===================================================================
--- hugin/trunk/src/tools/vig_optimize.cpp 2007-10-26 20:29:17 UTC (rev 2499)
+++ hugin/trunk/src/tools/vig_optimize.cpp 2007-10-26 22:47:38 UTC (rev 2500)
@@ -274,10 +274,9 @@
}
- double error =
- PhorometricOptimizer(pano, &progressDisplay, pano.getOptimizeVector(), points)
- .run<PhorometricOptimizer>()
- .getResultError();
+ PhotometricOptimizer photoopt(pano, &progressDisplay, pano.getOptimizeVector(), points);
+ photoopt.run();
+ double error = photoopt.getResultError();
progressDisplay.finishSubtask();
@@ -303,7 +302,7 @@
template<class ImageType>
-std::vector<ImageType *> loadImagesPyr(std::vector<std::string> files, int pyrLevel, int verbose=0)
+std::vector<ImageType *> loadImagesPyr(std::vector<std::string> files, int pyrLevel, int verbose)
{
typedef typename ImageType::value_type PixelType;
std::vector<ImageType *> srcImgs;
@@ -373,7 +372,7 @@
images = loadImagesPyr<vigra::FRGBImage>(files, pyrLevel, 1);
if(randomPoints)
- points = RandomPointSampler(pano, &progress, images, nPoints).run<PointSampler>().getResultPoints();
+ points = RandomPointSampler(pano, &progress, images, nPoints).execute().getResultPoints();
else
- points = AllPointSampler(pano, &progress, images, nPoints).run<PointSampler>().getResultPoints();
+ points = AllPointSampler(pano, &progress, images, nPoints).execute().getResultPoints();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|