Hello,<div><br></div><div>I have difficulty in forming a commandline that can be executed from within Swift. </div><div><br></div><div>I have a commandline in the following form:</div><div><br></div><div><div>Image_Crop -dir "Repository to process" -xmin someint -ymin someint -xmax someint -ymax someint</div>
</div><div><br></div><div><br></div><div>I place it in Swiftscript as follows:</div><div><br></div><div>type messagefile;</div><div><br></div><div><div>(messagefile mf) image_crop (string somedir, int xmin, int ymin, int xmax, int ymax) {</div>
<div> app {</div><div> Image_Crop " -dir " somedir " -xmin " xmin " -ymin " ymin " -xmax " xmax " -ymax " ymax stdout=@filename(mf);</div><div> }</div><div>}</div></div>
<div><br></div><div><br></div><div>I call it as follows:</div><div><br></div><div>messagefile icoutfile <"icout.txt">;</div><div><br></div><div>icoutfile = image_crop ("/home/ketan/MpiReg/dataold/sorted/g_8b1e46671d5733/",20,71,142,169);</div>
<div><br></div><div><br></div><div>However, the call does not go through as expected. I suppose, Swift creates a wrapper around this call and adds more parameters and switches as shown in the log file inside its directory (*.d) as follows :</div>
<div><br></div><div><div>Image_Crop-txp9800k -jobdir t -e /home/ketan/MpiReg/bin/Image_Crop -out icout.txt -err stderr.txt -i -d -if -of icout.txt -k -status files -a -dir /home/ketan/MpiReg/dataold/sorted/g_8b1e46671d5733/ -xmin 20 -ymin 71 -xmax 142 -ymax 169</div>
</div><div><br></div><div><br></div><div>It seems the binary Image_Crop does not go along well with the additional switches and parameters generated by the wrapper.</div><div><br></div><div>Any suggestions to approach this?</div>
<div><br></div><div><br></div><div>Regards,</div><div><br></div><div>Ketan</div><div><br></div>