| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
import argparse |
| 16 |
import os |
| 17 |
import jiplib as jl |
| 18 |
|
| 19 |
parser=argparse.ArgumentParser() |
| 20 |
parser.add_argument("-input","--input",help="Path of the input file",dest="input",required=True,type=str) |
| 21 |
args = parser.parse_args() |
| 22 |
|
| 23 |
jim0=jl.createJim(filename=args.input,noread=True) |
| 24 |
ULX=jim0.getUlx() |
| 25 |
ULY=jim0.getUly() |
| 26 |
LRX=ULX+1000 |
| 27 |
LRY=ULY-1000 |
| 28 |
jim0.close() |
| 29 |
jim0=jl.createJim(filename=args.input,ulx=ULX,uly=ULY,lrx=LRX,lry=LRY,dx=5,dy=5) |
| 30 |
if jim0.nrOfCol() != 200: |
| 31 |
print("Failed: createJim with upsample") |
| 32 |
elif jim0.nrOfRow() != 200: |
| 33 |
print("Failed: createJim with upsample") |
| 34 |
else: |
| 35 |
print("Success: createJim with upsample") |
| 36 |
jim0.close() |
| 37 |
|