Commit a0fa5e29 authored by Cédric Traizet's avatar Cédric Traizet

Merge branch 'remove_convert_app' into 'develop'

Remove convert app

See merge request !324
parents ad7d7f72 7831e1fb
......@@ -396,10 +396,10 @@ Some examples are provided below:
::
$ otbcli_Convert -in OTB-Data/Examples/QB_1_ortho.tif -out "/tmp/example1.tif?&gdal:co:TILED=YES&gdal:co:COMPRESS=DEFLATE"
$ otbcli_DynamicConvert -in OTB-Data/Examples/QB_1_ortho.tif -out "/tmp/example1.tif?&gdal:co:TILED=YES&gdal:co:COMPRESS=DEFLATE"
- Process only first band from a file
::
$ otbcli_Convert -in "OTB-Data/Examples/QB_1_ortho.tif?&bands=1" -out /tmp/example2.tif
$ otbcli_DynamicConvert -in "OTB-Data/Examples/QB_1_ortho.tif?&bands=1" -out /tmp/example2.tif
......@@ -33,9 +33,9 @@ The complete list of applications is described in the Chapter :ref:`apprefdoc`.
All standard applications share the same implementation and automatically expose
generated interfaces.
However they are accessed in a slightly different way: the command-line interface is prefixed by ``otbcli_``, while the Qt interface is prefixed by
``otbgui_``. For cwinstance, calling ``otbcli_Convert`` will launch the
command-line interface of the Convert application, while
``otbgui_Convert`` will launch the GUI.
``otbgui_``. For instance, calling ``otbcli_DynamicConvert`` will launch the
command-line interface of the DynamicConvert application, while
``otbgui_DynamicConvert`` will launch the GUI.
Command-line launcher
---------------------
......
......@@ -23,12 +23,6 @@ otb_create_application(
SOURCES otbDownloadSRTMTiles.cxx
LINK_LIBRARIES ${${otb-module}_LIBRARIES})
otb_create_application(
NAME Convert
SOURCES otbConvert.cxx
LINK_LIBRARIES ${${otb-module}_LIBRARIES})
otb_create_application(
NAME PixelValue
SOURCES otbPixelValue.cxx
......
......@@ -66,7 +66,7 @@ private:
"and generates a single multi-channel image. The channel order is the same as the list.");
SetDocLimitations("All input images must have the same size.");
SetDocAuthors("OTB-Team");
SetDocSeeAlso("Rescale application, Convert, SplitImage");
SetDocSeeAlso("Rescale application, DynamicConvert, SplitImage");
AddDocTag(Tags::Manip);
AddDocTag("Concatenation");
......
This diff is collapsed.
......@@ -111,7 +111,7 @@ private:
);
SetDocLimitations("The application does not support complex pixel types as output.");
SetDocAuthors("OTB-Team");
SetDocSeeAlso("Convert, Rescale");
SetDocSeeAlso("Rescale");
AddDocTag(Tags::Manip);
AddDocTag("Conversion");
......
......@@ -27,66 +27,6 @@ otb_test_application(NAME apTuUtDownloadSRTMTiles
-tiledir ${INPUTDATA}/DEM/srtm_directory
)
#----------- Convert TESTS ----------------
otb_test_application(NAME apTvUtConvertBasic
APP Convert
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
-out ${TEMP}/apTvUtConvertBasicOutput.tif float
VALID --compare-image ${NOTOL}
${OTBAPP_BASELINE}/apTvUtConvertBasicOutput.tif
${TEMP}/apTvUtConvertBasicOutput.tif
)
otb_test_application(NAME apTuUtConvertExtendedFilename_writer
APP Convert
OPTIONS -in ${INPUTDATA}/ToulouseExtract_WithGeom.tif
-out ${TEMP}/apTvUtGeomExtendedFilename.tif?&gdal:co:TILED=YES&writegeom=false
)
otb_test_application(NAME apTvUtConvertWithScaling
APP Convert
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
-out ${TEMP}/apTvUtConvertWithScalingOutput.tif
-type linear
VALID --compare-image ${NOTOL}
${OTBAPP_BASELINE}/apTvUtConvertWithScalingOutput.tif
${TEMP}/apTvUtConvertWithScalingOutput.tif
)
otb_test_application(NAME apTvUtConvertExtendedFilename_readerGEOM
APP Convert
OPTIONS -in ${INPUTDATA}/ToulouseExtract_WithGeom.tif?&geom=${INPUTDATA}/ToulouseExtract_ModifiedGeom.geom
-out ${TEMP}/apTvUtGeomExtendedFilename.tif
VALID --compare-ascii ${EPSILON_7}
${INPUTDATA}/ToulouseExtract_ModifiedGeom.geom
${TEMP}/apTvUtGeomExtendedFilename.geom)
otb_test_application(NAME apTvUtConvertSelectChannels
APP Convert
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
-out ${TEMP}/apTvUtConvertSelectChannelsRgbOutput.tif
-channels rgb
-channels.rgb.red 2
-channels.rgb.green 3
-channels.rgb.blue 1
-type linear
VALID --compare-image ${NOTOL}
${OTBAPP_BASELINE}/apTvUtConvertSelectChannelsRgbOutput.tif
${TEMP}/apTvUtConvertSelectChannelsRgbOutput.tif)
otb_test_application(NAME apTvUtConvertMonoChannel
APP Convert
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_PAN.tif
-out ${TEMP}/apTvUtConvertMonoChannelOutput.tif
-channels grayscale
-type linear
VALID --compare-image ${NOTOL}
${OTBAPP_BASELINE}/apTvUtConvertMonoChannelOutput.tif
${TEMP}/apTvUtConvertMonoChannelOutput.tif)
#----------- DynamicConvert TESTS ------------
otb_test_application(NAME apTvUtDynamicConvertBasic
APP DynamicConvert
......@@ -101,6 +41,20 @@ otb_test_application(NAME apTvUtDynamicConvertBasic
${OTBAPP_BASELINE}/apTvUtConvertSelectChannelsRgbOutput.tif
${TEMP}/apTvUtDynamicConvertOutput.tif)
otb_test_application(NAME apTuUtDynamicConvertExtendedFilename_writer
APP DynamicConvert
OPTIONS -in ${INPUTDATA}/ToulouseExtract_WithGeom.tif
-out ${TEMP}/apTvUtGeomExtendedFilename.tif?&gdal:co:TILED=YES&writegeom=false
)
otb_test_application(NAME apTvUtDynamicConvertExtendedFilename_readerGEOM
APP DynamicConvert
OPTIONS -in ${INPUTDATA}/ToulouseExtract_WithGeom.tif?&geom=${INPUTDATA}/ToulouseExtract_ModifiedGeom.geom
-out ${TEMP}/apTvUtGeomExtendedFilename.tif
VALID --compare-ascii ${EPSILON_7}
${INPUTDATA}/ToulouseExtract_ModifiedGeom.geom
${TEMP}/apTvUtGeomExtendedFilename.geom)
otb_test_application(NAME apTvUtDynamicConvertLog2
APP DynamicConvert
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
......
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Import the otb applications package
import sys
def test(otbApplication, argv):
# The following line creates an instance of the Convert application
Convert = otbApplication.Registry.CreateApplication("Convert")
# The following lines set all the application parameters:
Convert.SetParameterString("in", argv[1])
Convert.SetParameterString("out", argv[2])
Convert.SetParameterString("type","linear")
# The following line execute the application
sys.exit(Convert.ExecuteAndWriteOutput())
......@@ -53,14 +53,6 @@ add_test( NAME pyTvHyperspectralUnmixingUCLS
ucls
)
add_test( NAME pyTvBug440
COMMAND ${TEST_DRIVER} Execute
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
Bug440
${OTB_DATA_ROOT}/Input/scene.png
${TEMP}/pyTvBug440Output.tif
)
add_test( NAME pyTvBug804
COMMAND ${TEST_DRIVER} Execute
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
......
......@@ -65,16 +65,16 @@ def test(otbApplication, argv):
RescaleOut = Rescale.GetVectorImageAsNumpyArray("out", 'float')
# misc.imsave('RescaleOut.jpg', RescaleOut)
Convert = otbApplication.Registry.CreateApplication("Convert")
# take numpy output from Rescale application and feed into Convert
Convert.SetVectorImageFromNumpyArray("in", RescaleOut)
Convert.SetParameterString("out", "ConvertOut.png")
Convert.ExecuteAndWriteOutput()
ConvertOut = Convert.GetVectorImageAsNumpyArray("out", 'float')
DynamicConvert = otbApplication.Registry.CreateApplication("DynamicConvert")
# take numpy output from Rescale application and feed into DynamicConvert
DynamicConvert.SetVectorImageFromNumpyArray("in", RescaleOut)
DynamicConvert.SetParameterString("out", "ConvertOut.png")
DynamicConvert.ExecuteAndWriteOutput()
DynamicConvertOut = DynamicConvert.GetVectorImageAsNumpyArray("out", 'float')
Smoothing = otbApplication.Registry.CreateApplication("Smoothing")
# take numpy output from Convert application and feed into Smoothing
Smoothing.SetVectorImageFromNumpyArray("in", ConvertOut)
Smoothing.SetVectorImageFromNumpyArray("in", DynamicConvertOut)
Smoothing.SetParameterString("type", 'anidif')
Smoothing.SetParameterString("out", outFile)
Smoothing.ExecuteAndWriteOutput()
......@@ -23,6 +23,9 @@
#
# Example on the use of the Rescale
# This test checks that the Python wrapping works correctly. For instance, it
# ensures that Init() is called on the Swig/Python interface (see bug #440,
# https://bugs.orfeo-toolbox.org//view.php?id=440)
#
def test(otb, argv):
app = otb.Registry.CreateApplication("Rescale")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment