Commit 9209e715 authored by Victor Poughon's avatar Victor Poughon

DOC: remove obsolete windows section

parent 00a71586
Pipeline #322 passed with stage
in 27 minutes and 11 seconds
......@@ -20,9 +20,6 @@ you’ll use almost everywhere.
Hello world
Linux and Mac OS X
Let’s start by the typical *Hello world* program. We are going to
compile this C++ program linking to your new OTB.
......@@ -83,113 +80,6 @@ Actually, using OTB for that is not very useful, and we doubt that you
downloaded OTB only to do that. It’s time to move on to a more advanced
Create a directory (with write access) where to store your work (for
example at C:\\path\\to\\MyFirstCode). Organize your repository as it :
- MyFirstCode\\src
- MyFirstCode\\build
Follow the following steps:
#. Create a CMakeLists.txt into the src repository with the following
.. code-block:: cmake
cmake_minimum_required(VERSION 3.1.0)
find_package(OTB REQUIRED)
add_executable(MyFirstProcessing MyFirstProcessing.cxx )
target_link_libraries(MyFirstProcessing ${OTB_LIBRARIES} )
#. Create a MyFirstProcessing.cxx into the src repository with the
following lines:
.. code-block:: cpp
#include "otbImage.h"
#include "otbVectorImage.h"
#include "otbImageFileReader.h"
#include "otbImageFileWriter.h"
#include "otbMultiToMonoChannelExtractROI.h"
int main(int argc, char* argv[])
if (argc < 3)
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0] << " inputImageFile outputImageFile" << std::endl;
typedef unsigned short PixelType;
typedef otb::Image <PixelType, 2> ImageType;
typedef otb::VectorImage <PixelType, 2> VectorImageType;
typedef otb::MultiToMonoChannelExtractROI <PixelType, PixelType> FilterType;
typedef otb::ImageFileReader<VectorImageType> ReaderType;
typedef otb::ImageFileWriter<ImageType> WriterType;
FilterType::Pointer filter = FilterType::New();
ReaderType::Pointer reader = ReaderType::New();
WriterType::Pointer writer = WriterType::New();
#. create a file named BuildMyFirstProcessing.bat into the MyFirstCode
directory with the following lines:
@echo off
set /A ARGS\_COUNT=0 for if if NOT DEFINED OSGEO4W\_ROOT (goto
set src\_dir=set build\_dir=set otb\_install\_dir=set current\_dir=
cmake –build . –target INSTALL –config Release
cd goto :END
:Usage echo You need to provide 3 arguments to the script: echo 1.
path to the source directory echo 2. path to the build directory echo
3. path to the installation directory GOTO :END
:NoOSGEO4W echo You need to run this script from an OSGeo4W shell
#. into a OSGEo4W shell, run the configure.bat with the right arguments:
full path to your src directory, full path to your build directory,
full path to the place where find OTBConfig.cmake file (should be
#. into the OSGeo4W shell, open the MyFirstProcessing.sln
#. build the solution
#. into the OSGeo4W shell, go to the bin\\Release directory and run
MyFirstProcessing.exe. You can try for example with the otb\_logo.tif
file which can be found into the OTB source.
Pipeline basics: read and write
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment