diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index a0cd7135cf66497374f398568dd1d9ac217c87f6..d18e0805c5af4b54594b7f0de06f256876add3a4 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -28,7 +28,7 @@ ADD_SUBDIRECTORY(OBIA) IF(OTB_USE_VISU_GUI) - ADD_SUBDIRECTORY(Visu) + ADD_SUBDIRECTORY(Visualization) ENDIF(OTB_USE_VISU_GUI) IF(OTB_USE_PATENTED) diff --git a/Examples/Visu/CMakeLists.txt b/Examples/Visualization/CMakeLists.txt similarity index 51% rename from Examples/Visu/CMakeLists.txt rename to Examples/Visualization/CMakeLists.txt index e568613065a4fafe97677dc4d78071d3e91961ff..1cf62670aacd81ad8bf48681e0fd503e433140a7 100644 --- a/Examples/Visu/CMakeLists.txt +++ b/Examples/Visualization/CMakeLists.txt @@ -2,6 +2,6 @@ PROJECT(VisuExamples) INCLUDE_REGULAR_EXPRESSION("^.*$") ADD_EXECUTABLE(VisuExample1 VisuExample1.cxx ) -TARGET_LINK_LIBRARIES(VisuExample1 OTBVisu OTBGui OTBIO OTBCommon ${OTB_VISU_GUI_LIBRARIES}) +TARGET_LINK_LIBRARIES(VisuExample1 OTBVisualization OTBGui OTBIO OTBCommon ${OTB_VISU_GUI_LIBRARIES}) diff --git a/Examples/Visu/VisuExample1.cxx b/Examples/Visualization/VisuExample1.cxx similarity index 87% rename from Examples/Visu/VisuExample1.cxx rename to Examples/Visualization/VisuExample1.cxx index 4a27e61280a1d78721e5a4d388a3eef50eb5a244..a8d0f9af3c959c431abe71bb13491517d3016a95 100644 --- a/Examples/Visu/VisuExample1.cxx +++ b/Examples/Visualization/VisuExample1.cxx @@ -25,14 +25,14 @@ // Software Guide : BeginLatex // -// This example shows the use of the \doxygen{otb}{ImageViewer} +// This example shows the use of the \doxygen{otb}{StandardImageViewer} // class for image visualization. As usual, we start by // including the header file for the class. // // Software Guide : EndLatex // Software Guide : BeginCodeSnippet -#include "otbImageViewer.h" +#include "otbStandardImageViewer.h" // Software Guide : EndCodeSnippet int main(int argc, char * argv[]) @@ -41,6 +41,7 @@ int main(int argc, char * argv[]) if (argc != 2) { std::cout << " Usage : InputImage" << std::endl; + return EXIT_FAILURE; } const char * inputFilename = argv[1]; @@ -55,10 +56,10 @@ int main(int argc, char * argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef int PixelType; - typedef otb::VectorImage<PixelType, 2> ImageType; - typedef otb::ImageFileReader<ImageType> ReaderType; - typedef otb::ImageViewer<PixelType> ViewerType; + typedef int PixelType; + typedef otb::VectorImage<PixelType, 2> ImageType; + typedef otb::ImageFileReader<ImageType> ReaderType; + typedef otb::StandardImageViewer<ImageType> ViewerType; // Software Guide : EndCodeSnippet // Software Guide : BeginLatex @@ -71,7 +72,7 @@ int main(int argc, char * argv[]) ViewerType::Pointer lViewer = ViewerType::New(); ReaderType::Pointer lReader = ReaderType::New(); lReader->SetFileName(inputFilename); - lReader->Update(); + lReader->UpdateOutputInformation(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex @@ -94,13 +95,13 @@ int main(int argc, char * argv[]) // Software Guide : BeginCodeSnippet lViewer->SetImage(lReader->GetOutput()); - lViewer->Show(); + lViewer->Update(); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex // // The last step consists in starting the GUI event loop by calling - // the appropiate FLTK method. + // the appropriate FLTK method. // // Software Guide : EndLatex @@ -111,7 +112,7 @@ int main(int argc, char * argv[]) // // \begin{figure} // \center - // \includegraphics[width=.8\textwidth]{VisuGrey.eps} + // \includegraphics[width=.8\textwidth]{VisualizationAll.eps} // \itkcaption[Image visualization.]{Example of image visualization.} // \label{fig:Visu1} // \end{figure}