Skip to content
Snippets Groups Projects
Commit 4a09796a authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

MRG : merge

parents 65d3c009 0df587cd
No related branches found
No related tags found
No related merge requests found
...@@ -155,6 +155,7 @@ NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField> ...@@ -155,6 +155,7 @@ NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
drfp->SetRadius(radius); drfp->SetRadius(radius);
this->Modified();
} }
template <class TFixedImage, class TMovingImage, class TDeformationField> template <class TFixedImage, class TMovingImage, class TDeformationField>
......
...@@ -138,8 +138,8 @@ namespace otb ...@@ -138,8 +138,8 @@ namespace otb
/** For each octave, we fill the imageList for the extremum search*/ /** For each octave, we fill the imageList for the extremum search*/
m_ImageList->PushBack(m_determinantImage); m_ImageList->PushBack(m_determinantImage);
} }
/*----------------------------------------------------*/ /*----------------------------------------------------*/
/* extremum Search over octave's scales */ /* extremum Search over octave's scales */
/*----------------------------------------------------*/ /*----------------------------------------------------*/
...@@ -351,7 +351,7 @@ namespace otb ...@@ -351,7 +351,7 @@ namespace otb
{ {
col = i%Largeur - rayon ; col = i%Largeur - rayon ;
raw = i/Largeur - rayon ; raw = i/Largeur - rayon ;
dist = vcl_sqrt(col *col + raw * raw ); dist = vcl_sqrt(static_cast<double>(col *col + raw * raw) );
col +=rayon; col +=rayon;
raw +=rayon; // Backup to the image coordinate axes raw +=rayon; // Backup to the image coordinate axes
......
...@@ -121,7 +121,7 @@ FixedSizeFullImageWidget<TPixel> ...@@ -121,7 +121,7 @@ FixedSizeFullImageWidget<TPixel>
::UpdateOpenGlBufferedRegion(void) ::UpdateOpenGlBufferedRegion(void)
{ {
//otbMsgDebugMacro(<<"UpdateOpenGlBufferedRegion: "<<this->GetViewedRegion()); //otbMsgDebugMacro(<<"UpdateOpenGlBufferedRegion: "<<this->GetViewedRegion());
this->SetBufferedRegion((this->GetInput()->GetLargestPossibleRegion())); this->SetBufferedRegion(this->GetViewedRegion());
} }
} // end namespace otb } // end namespace otb
#endif #endif
...@@ -179,14 +179,12 @@ ImageWidgetBase<TPixel> ...@@ -179,14 +179,12 @@ ImageWidgetBase<TPixel>
{ {
m_Image=image; m_Image=image;
m_Image->UpdateOutputInformation(); m_Image->UpdateOutputInformation();
SizeType size; SizeType size;
size.Fill(0); size.Fill(0);
m_BufferedRegion.SetSize(size); m_BufferedRegion.SetSize(size);
SizeType displaySize; SizeType displaySize;
displaySize[0]=this->w(); displaySize[0]=this->w();
displaySize[1]=this->h(); displaySize[1]=this->h();
m_ViewedRegion.SetSize(displaySize); m_ViewedRegion.SetSize(displaySize);
m_ViewedRegion.Crop(m_Image->GetLargestPossibleRegion()); m_ViewedRegion.Crop(m_Image->GetLargestPossibleRegion());
} }
...@@ -300,10 +298,14 @@ ImageWidgetBase<TPixel> ...@@ -300,10 +298,14 @@ ImageWidgetBase<TPixel>
m_ImageOverlay->SetRequestedRegion(m_BufferedRegion); m_ImageOverlay->SetRequestedRegion(m_BufferedRegion);
m_ImageOverlay->PropagateRequestedRegion(); m_ImageOverlay->PropagateRequestedRegion();
m_ImageOverlay->UpdateOutputData(); m_ImageOverlay->UpdateOutputData();
RebuildOpenGlImageOverlayBuffer();
} }
} }
if(m_ImageOverlayVisible)
{
RebuildOpenGlImageOverlayBuffer();
}
if (!this->valid()) if (!this->valid())
{ {
valid(1); valid(1);
...@@ -322,10 +324,15 @@ ImageWidgetBase<TPixel> ...@@ -322,10 +324,15 @@ ImageWidgetBase<TPixel>
glDisable(GL_BLEND); glDisable(GL_BLEND);
glRasterPos2i(0,0);
#ifndef OTB_GL_USE_ACCEL #ifndef OTB_GL_USE_ACCEL
glPixelZoom(m_OpenGlIsotropicZoom, m_OpenGlIsotropicZoom);
// To be consistent with old method
int displayHeight = static_cast<int>(vcl_ceil(m_BufferedRegion.GetSize()[1]*m_OpenGlIsotropicZoom));
int viewPortOffset = 0;
viewPortOffset = h()-displayHeight;
glRasterPos2i(0,viewPortOffset);
glPixelZoom(m_OpenGlIsotropicZoom,m_OpenGlIsotropicZoom);
// display the image // display the image
glDrawPixels(m_BufferedRegion.GetSize()[0], glDrawPixels(m_BufferedRegion.GetSize()[0],
...@@ -426,6 +433,7 @@ ImageWidgetBase<TPixel> ...@@ -426,6 +433,7 @@ ImageWidgetBase<TPixel>
//otbMsgDebugMacro(<<"Deleting previous buffer ..."); //otbMsgDebugMacro(<<"Deleting previous buffer ...");
delete [] m_OpenGlBuffer; delete [] m_OpenGlBuffer;
} }
//otbMsgDebugMacro(<<"Buffered region: "<<m_BufferedRegion);
unsigned int bufferLenght = 4*m_BufferedRegion.GetNumberOfPixels(); unsigned int bufferLenght = 4*m_BufferedRegion.GetNumberOfPixels();
//otbMsgDebugMacro(<<"New buffer lenght: "<<bufferLenght); //otbMsgDebugMacro(<<"New buffer lenght: "<<bufferLenght);
m_OpenGlBuffer = new unsigned char[bufferLenght]; m_OpenGlBuffer = new unsigned char[bufferLenght];
......
...@@ -169,4 +169,9 @@ ENDIF(ITK_USE_REVIEW) ...@@ -169,4 +169,9 @@ ENDIF(ITK_USE_REVIEW)
ADD_EXECUTABLE(otbIOExamplesTests otbIOExamplesTests.cxx) ADD_EXECUTABLE(otbIOExamplesTests otbIOExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbIOExamplesTests otbossim OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBProjections ITKIO ITKAlgorithms ITKStatistics ITKCommon ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES}) TARGET_LINK_LIBRARIES(otbIOExamplesTests otbossim OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBProjections ITKIO ITKAlgorithms ITKStatistics ITKCommon ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
IF(ITK_USE_REVIEW)
ADD_EXECUTABLE(otbIOExamplesTests2 otbIOExamplesTests2.cxx)
TARGET_LINK_LIBRARIES(otbIOExamplesTests2 otbossim OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBProjections ITKIO ITKAlgorithms ITKStatistics ITKCommon ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
ENDIF(ITK_USE_REVIEW)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING ) ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
...@@ -27,7 +27,6 @@ void RegisterTests() ...@@ -27,7 +27,6 @@ void RegisterTests()
{ {
REGISTER_TEST(ExtractROITest); REGISTER_TEST(ExtractROITest);
REGISTER_TEST(DEMToImageGeneratorTest); REGISTER_TEST(DEMToImageGeneratorTest);
REGISTER_TEST(LidarToImageExampleTest);
} }
#undef main #undef main
...@@ -37,7 +36,3 @@ REGISTER_TEST(LidarToImageExampleTest); ...@@ -37,7 +36,3 @@ REGISTER_TEST(LidarToImageExampleTest);
#undef main #undef main
#define main DEMToImageGeneratorTest #define main DEMToImageGeneratorTest
#include "DEMToImageGenerator.cxx" #include "DEMToImageGenerator.cxx"
#undef main
#define main LidarToImageExampleTest
#include "LidarToImageExample.cxx"
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
// this file defines the otbMultiScaleTest for the test driver
// and all it expects is that you have a function called RegisterTests
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#include <iostream>
#include "otbTestMain.h"
void RegisterTests()
{
REGISTER_TEST(LidarToImageExampleTest);
}
#undef main
#define main LidarToImageExampleTest
#include "LidarToImageExample.cxx"
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