<div dir="ltr">Thanks Simon,<div><br></div><div>Ill work on this tonight.</div><div><br></div><div>GT</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 20, 2017 at 3:19 PM, Luc SIMON <span dir="ltr"><<a href="mailto:uhqd75@gmail.com" target="_blank">uhqd75@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Dear all <br></div>I have a very very simple C code (attached) that merge to raw file if they have the same size (then I just keep the header of one of them for the merged file)<br><br></div><div>To compile :<br></div><div>gcc -c merge.c<br></div><div>gcc merge.o -o merge<br></div><div><br></div><div>Then<br>// Use : ./merge img1.raw img2.raw out.raw<br>// Add img1.raw and img2.raw in out.raw<br><br></div><div><br></div>Hereafter you ll find a part of a small bash script that loop in a directory to merge many files...<br><br> # - - - - - - - - - - - - - - - - - -<br> # MERGING <br><br> # get name of the first file<br> file1=`ls -1 output/water/*doseW.raw | head -1`<br> mv $file1 output/water/first.raw<br> cp output/water/first.raw output/water/backUp.raw<br> <br> varW=0<br> for file in output/water/*doseW.raw<br> do<br> varW=$((varW+1))<br> # merge first and next into out<br> output/water/merge $file output/water/first.raw output/water/out.raw<br> # out become first<br> mv output/water/out.raw output/water/first.raw<br> done<br> varW=$((varW+1))<br> <br> mv output/water/backUp.raw $file1<br> mv output/water/first.raw output/water/out.raw<br><br> # - - - - - - - - - - - - - - - - - -<br><br><br></div>Not perfect but it works for me<br></div>hope it helps<br><br></div>Luc SIMON<br><br><div><div><div><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2017-04-20 20:42 GMT+02:00 G Tom <span dir="ltr"><<a href="mailto:gregthom992@gmail.com" target="_blank">gregthom992@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Does anyone have a script to merge (mhd in particular or other files txt from dose actor) files from several split simulations ? VV seems to only merge several nD into (n+1)D not several nD into nD. <div><br></div><div><div><br></div><div>Thanks</div><span class="m_543633141256544364HOEnZb"><font color="#888888"><div><br></div><div>GT</div></font></span></div></div>
<br></div></div><span class="">______________________________<wbr>_________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecolla<wbr>boration.org</a><br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.opengatecollabora<wbr>tion.org/mailman/listinfo/<wbr>gate-users</a><br></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_543633141256544364gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>___________________<br><br>SIMON Luc, Physicien Médical, PhD<br>Département d'Ingénierie et de Physique Médicale - IUCT-Oncopole - Toulouse, FRANCE</div><div>INSERM UMR 1037 (CRCT) - Equipe 15 - Toulouse, FRANCE</div></div></div></div></div>
</font></span></div>
</blockquote></div><br></div>