Skip to content
Snippets Groups Projects
Commit 5d8556ba authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

DOC: Viewer tutorial now use the new visu

parent 330888a0
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ TARGET_LINK_LIBRARIES(SmarterFilteringPipeline OTBCommon OTBIO)
IF(OTB_USE_VISU_GUI)
ADD_EXECUTABLE(SimpleViewer SimpleViewer.cxx )
TARGET_LINK_LIBRARIES(SimpleViewer OTBCommon OTBIO OTBGui OTBVisu ${OTB_VISU_GUI_LIBRARIES})
TARGET_LINK_LIBRARIES(SimpleViewer OTBCommon OTBIO OTBGui OTBVisualization ${OTB_VISU_GUI_LIBRARIES})
ENDIF(OTB_USE_VISU_GUI)
ADD_EXECUTABLE(OrthoFusion OrthoFusion.cxx )
......@@ -50,7 +50,7 @@ ADD_TEST( TutorialsPipelineTest ${EXE_TESTS}
${INPUTDATA}/QB_Suburb.png
${TEMP}/TutorialsPipelineOutput.png
)
ADD_TEST( TutorialsFilteringPipelineTest ${EXE_TESTS}
--compare-image ${TOL} ${BASELINE}/TutorialsFilteringPipelineOutput.png
${TEMP}/TutorialsFilteringPipelineOutput.png
......@@ -58,7 +58,7 @@ ADD_TEST( TutorialsFilteringPipelineTest ${EXE_TESTS}
${INPUTDATA}/QB_Suburb.png
${TEMP}/TutorialsFilteringPipelineOutput.png
)
ADD_TEST( TutorialsScalingPipelineTest ${EXE_TESTS}
--compare-image ${TOL} ${BASELINE}/TutorialsScalingPipelineOutput.png
${TEMP}/TutorialsScalingPipelineOutput.png
......@@ -66,7 +66,7 @@ ADD_TEST( TutorialsScalingPipelineTest ${EXE_TESTS}
${INPUTDATA}/QB_Suburb.png
${TEMP}/TutorialsScalingPipelineOutput.png
)
ADD_TEST( TutorialsMultispectralTest ${EXE_TESTS}
--compare-n-images ${TOL} 2 ${BASELINE}/MultispectralOutput1.tif
${TEMP}/MultispectralOutput1.tif
......@@ -76,8 +76,8 @@ ADD_TEST( TutorialsMultispectralTest ${EXE_TESTS}
${INPUTDATA}/qb_RoadExtract.tif
${TEMP}/MultispectralOutput1.tif
${TEMP}/MultispectralOutput2.tif
)
)
ADD_TEST( TutorialsSmarterFilteringPipelineTest ${EXE_TESTS}
--compare-image ${TOL} ${BASELINE}/TutorialsSmarterFilteringPipelineOutput.png
......@@ -85,8 +85,8 @@ ADD_TEST( TutorialsSmarterFilteringPipelineTest ${EXE_TESTS}
TutorialsSmarterFilteringPipelineTest
-in ${INPUTDATA}/QB_Suburb.png
-out ${TEMP}/TutorialsSmarterFilteringPipelineOutput.png
-d 1.5
-i 2
-d 1.5
-i 2
-a 0.1
)
......@@ -100,11 +100,11 @@ ADD_TEST( TutorialsOrthoFusionTest ${EXE_TESTS}
${TEMP}/TutorialsOrthoFusionOutput.tif
31
N
375000
4828100
500
500
0.6
375000
4828100
500
500
0.6
-0.6
)
ENDIF(OTB_DATA_USE_LARGEINPUT)
......
......@@ -18,7 +18,7 @@
// Software Guide : BeginLatex
//
// Now, we are going to illustrate the use of the \doxygen{otb}{ImageViewer}
// Now, we are going to illustrate the use of the \doxygen{otb}{StandardImageViewer}
// to display an image or the result of an algorithm without saving the image.
//
// We include the required header including the header
......@@ -31,7 +31,7 @@
#include "otbImage.h"
#include "otbImageFileReader.h"
#include "itkGradientMagnitudeImageFilter.h"
#include "otbImageViewer.h"
#include "otbStandardImageViewer.h"
int main( int argc, char * argv[] )
{
......@@ -69,14 +69,14 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex
//
// Unlike most OTB filters, the \doxygen{otb}{ImageViewer} is
// templated over the input pixel type instead of the image
// type. This will allow to use it with scalar and vector images.
// The \doxygen{otb}{StandardImageViewer} is the new, highly versatile
// component to display images in OTB. There is a system of plugins to
// fully customize its behavior. But we'll keep it simple for now.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef otb::ImageViewer<PixelType> ViewerType;
typedef otb::StandardImageViewer<ImageType> ViewerType;
ViewerType::Pointer viewer = ViewerType::New();
// Software Guide : EndCodeSnippet
......@@ -108,12 +108,12 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex
//
// We trigger the pipeline execution and the image display
// with the \code{Show()} method of the viewer.
// with the \code{Update()} method of the viewer.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
viewer->Show();
viewer->Update();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
......
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