Commit 411bdecd authored by Antoine Regimbeau's avatar Antoine Regimbeau
Browse files

Merge branch 'develop' into ci_gitclonedir

No related merge requests found
Showing with 61 additions and 5 deletions
+61 -5
File added
148.1360412249 176.9065574064 79.2367424483 275.6865470422
180.3646315623 255.4157568188 138.2565634726 656.5357728603
187.5074713392 256.7055784897 121.8671939978 115.8660938389
220.0887858502 326.8933399989 229.672560688 434.3589597278
515.191687488 834.8626368509 642.6102022528 814.8945435557
Data/Input/qb_ExtractRoad_pretty.png

132 Bytes

Data/Output/DEMToHotImageGenerator.png

131 Bytes

Data/Output/DEMToRainbowImageGenerator.png

131 Bytes

Data/Output/DEMToReliefImageGenerator.png

131 Bytes

Data/Output/GomaSmallFrostFiltered.png

130 Bytes

Data/Output/HillShadingColorExample.png

131 Bytes

Data/Output/HillShadingExample.png

131 Bytes

Data/Output/MSClusteredOutput-pretty.png

131 Bytes

Data/Output/MSLabeledOutput-pretty.png

131 Bytes

Data/Output/PrintableExampleOutput1.jpg

131 Bytes

Data/Output/PrintableExampleOutput2.jpg

131 Bytes

Data/Output/QB_Toulouse_Ortho_PAN_casted.png

131 Bytes

Data/Output/QB_Toulouse_Ortho_PAN_rescaled.png

131 Bytes

Data/Output/buildingExtractionIndexed_scaled.png

130 Bytes

Data/Output/buildingExtractionRGB.png

130 Bytes

Data/Output/qb_BandMath-pretty.jpg

130 Bytes

......@@ -33,7 +33,7 @@ blacklist = [
"LAIAndPROSAILToSensorResponse" # does not run, wrong arguments
]
def run_example(otb_root, otb_data, name, dry_run):
def run_example(otb_root, name, dry_run):
"""
Run an example by name
Assumes the current working directory is an OTB build
......@@ -71,6 +71,7 @@ def run_example(otb_root, otb_data, name, dry_run):
print("$ " + binary + " " + " ".join(example_args))
if not dry_run:
otb_data = join(otb_root, "Data")
# Make sure Output dir exists
os.makedirs(join(otb_data, "Output"), exist_ok=True)
......@@ -81,19 +82,18 @@ def run_example(otb_root, otb_data, name, dry_run):
def main():
parser = argparse.ArgumentParser(usage="Run one or all OTB cxx examples")
parser.add_argument("otb_root", help="Path to otb repository")
parser.add_argument("otb_data", help="Path to otb-data repository")
parser.add_argument("--name", type=str, help="Run only one example with then given name")
parser.add_argument("-n", "--dry-run", action='store_true', help="Dry run, only print commands")
parser.add_argument("-k", "--keep-going", action='store_true', help="Keep going after failing examples")
args = parser.parse_args()
if args.name:
run_example(args.otb_root, args.otb_data, args.name, dry_run=args.dry_run)
run_example(args.otb_root, args.name, dry_run=args.dry_run)
else:
list_of_examples =[os.path.splitext(os.path.basename(f))[0] for f in glob.glob(join(args.otb_root, "Examples/*/*.cxx"))]
for name in list_of_examples:
try:
run_example(args.otb_root, args.otb_data, name, dry_run=args.dry_run)
run_example(args.otb_root, name, dry_run=args.dry_run)
except Exception as e:
if args.keep_going:
print("Warning:", e)
......
......@@ -44,7 +44,7 @@ def generate_examples_index(rst_dir, list_of_examples):
index_f = open(join(rst_dir, "Examples.rst"), "w")
index_f.write(RstPageHeading("C++ Examples", 3, ref="cpp-examples"))
for tag, examples_filenames in tag_files.items():
for tag, examples_filenames in sorted(tag_files.items()):
tag_filename = join("Examples", tag + ".rst")
index_f.write("\t" + tag_filename + "\n")
......
Supports Markdown
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