<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_btile_8cpp">
<title>/Users/bernard/b20/bsoft/src/btile.cpp File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/src/btile.cpp</primary></indexterm>
<para>

<para>Program to split an image into overlapping tiles. </para>
 
</para>
<programlisting>#include &quot;rwmg.h&quot;
#include &quot;mg_processing.h&quot;
#include &quot;rwimg.h&quot;
#include &quot;file_util.h&quot;
#include &quot;utilities.h&quot;
#include &quot;options.h&quot;
#include &quot;timer.h&quot;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para>int <link linkend="_btile_8cpp_1aad7c59d52d6b5fd344a99334ef59f8e5">img_tile_with_overlap</link> (<link linkend="_class_bimage">Bimage</link> *p, <link linkend="_class_bstring">Bstring</link> outputfile, <link linkend="_class_vector3">Vector3</link>&lt; int &gt; size, <link linkend="_class_vector3">Vector3</link>&lt; int &gt; overlap, int digits, int first_number, <link linkend="_utilities_8h_1ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</link> nudatatype)</para>

<para>Writes overlapping tiles into new images. </para>
</listitem>
            <listitem><para>int <link linkend="_btile_8cpp_1a3c04138a5bfe5d72780bb7e82a18e627">main</link> (int argc, char **argv)</para>
</listitem>
        </itemizedlist>
</simplesect>
<simplesect>
    <title>Variables    </title>
        <itemizedlist>
            <listitem><para>int <link linkend="_btile_8cpp_1a0b2caeb4b6f130be43e5a2f0267dd453">verbose</link></para>
</listitem>
            <listitem><para>const char * <link linkend="_btile_8cpp_1a4de0ad4c7190962494815c0fa7f948df">use</link> []</para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Program to split an image into overlapping tiles. </para>

<para><formalpara><title>Author: </title>

<para>Bernard Heymann </para>
</formalpara>
<formalpara><title>Date: </title>

<para>Created: 20040712 </para>

<para>Modified: 20160601 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_btile_8cpp_1aad7c59d52d6b5fd344a99334ef59f8e5"/>    <section>
    <title>img_tile_with_overlap()</title>
<indexterm><primary>img_tile_with_overlap</primary><secondary>btile.cpp</secondary></indexterm>
<indexterm><primary>btile.cpp</primary><secondary>img_tile_with_overlap</secondary></indexterm>
<para><computeroutput>int img_tile_with_overlap (<link linkend="_class_bimage">Bimage</link> * p, <link linkend="_class_bstring">Bstring</link> outputfile, <link linkend="_class_vector3">Vector3</link>&lt; int &gt; size, <link linkend="_class_vector3">Vector3</link>&lt; int &gt; overlap, int digits, int first_number, <link linkend="_utilities_8h_1ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</link> nudatatype)</computeroutput></para><para>

<para>Writes overlapping tiles into new images. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*p</entry>
                                <entry>
<para>image = tile. </para>
</entry>
                            </row>
                            <row>
                                <entry>outputfile</entry>
                                <entry>
<para>output file name. </para>
</entry>
                            </row>
                            <row>
                                <entry>size</entry>
                                <entry>
<para>tile size. </para>
</entry>
                            </row>
                            <row>
                                <entry>overlap</entry>
                                <entry>
<para>tile overlap. </para>
</entry>
                            </row>
                            <row>
                                <entry>digits</entry>
                                <entry>
<para>number of digits in tile file number. </para>
</entry>
                            </row>
                            <row>
                                <entry>first_number</entry>
                                <entry>
<para>first tile file number. </para>
</entry>
                            </row>
                            <row>
                                <entry>nudatatype</entry>
                                <entry>
<para>tile datatype. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int number of tiles. <literallayout><computeroutput>Each tile is copied into a new image and written with a numbered file name.
The tiles at the ends of the block may not be the same size as the
other tiles, being truncated at the end of the input data.
A text file with the extension &quot;.tiles&quot; is written with the positions
of the tiles, and it is needed to patch the image together again.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 171 of file btile.cpp.</para>
    </section><anchor xml:id="_btile_8cpp_1a3c04138a5bfe5d72780bb7e82a18e627"/>    <section>
    <title>main()</title>
<indexterm><primary>main</primary><secondary>btile.cpp</secondary></indexterm>
<indexterm><primary>btile.cpp</primary><secondary>main</secondary></indexterm>
<para><computeroutput>int main (int argc, char ** argv)</computeroutput></para><para>
Definition at line 54 of file btile.cpp.</para>
</section>
</section>
<section>
<title>Variable Documentation</title>
<anchor xml:id="_btile_8cpp_1a4de0ad4c7190962494815c0fa7f948df"/>    <section>
    <title>use</title>
<indexterm><primary>use</primary><secondary>btile.cpp</secondary></indexterm>
<indexterm><primary>btile.cpp</primary><secondary>use</secondary></indexterm>
<para><computeroutput>const char* use[]</computeroutput></para><emphasis role="strong">Initial value:</emphasis><programlisting>=&#32;{
<emphasis role="stringliteral">&quot;&#32;&quot;</emphasis>,
<emphasis role="stringliteral">&quot;Usage:&#32;btile&#32;[options]&#32;input.img/input.star&#32;output.img&quot;</emphasis>,
<emphasis role="stringliteral">&quot;------------------------------------------------------&quot;</emphasis>,
<emphasis role="stringliteral">&quot;Splits&#32;an&#32;image&#32;into&#32;overlapping&#32;tiles.&quot;</emphasis>,
<emphasis role="stringliteral">&quot;During&#32;tiling,&#32;the&#32;original&#32;size&#32;and&#32;tile&#32;origins&#32;are&#32;written&#32;into&#32;a&#32;text&quot;</emphasis>,
<emphasis role="stringliteral">&quot;&#32;&#32;&#32;file&#32;with&#32;the&#32;base&#32;of&#32;the&#32;output&#32;file&#32;name&#32;and&#32;the&#32;extension&#32;\&quot;.tiles\&quot;.&quot;</emphasis>,
<emphasis role="stringliteral">&quot;The&#32;program&#32;bpatch&#32;can&#32;reassemble&#32;the&#32;tiles&#32;using&#32;this&#32;text&#32;file.&quot;</emphasis>,
<emphasis role="stringliteral">&quot;&#32;&quot;</emphasis>,
<emphasis role="stringliteral">&quot;Action:&quot;</emphasis>,
<emphasis role="stringliteral">&quot;-split&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;Split&#32;into&#32;multiple&#32;images.&quot;</emphasis>,
<emphasis role="stringliteral">&quot;&#32;&quot;</emphasis>,
<emphasis role="stringliteral">&quot;Parameters:&quot;</emphasis>,
<emphasis role="stringliteral">&quot;-verbose&#32;7&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;Verbosity&#32;of&#32;output.&quot;</emphasis>,
<emphasis role="stringliteral">&quot;-datatype&#32;u&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;Force&#32;writing&#32;of&#32;a&#32;new&#32;data&#32;type.&quot;</emphasis>,
<emphasis role="stringliteral">&quot;-sampling&#32;1.5,1.5,1.5&#32;&#32;&#32;&#32;Sampling&#32;(A/pixel;&#32;a&#32;single&#32;value&#32;can&#32;be&#32;given).&quot;</emphasis>,
<emphasis role="stringliteral">&quot;-size&#32;120,150,70&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;Size&#32;of&#32;tiles&#32;(default&#32;512,512,512).&quot;</emphasis>,
<emphasis role="stringliteral">&quot;-overlap&#32;13,15,8&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;Overlap&#32;of&#32;tiles&#32;(default&#32;0,0,0).&quot;</emphasis>,
<emphasis role="stringliteral">&quot;-first&#32;5&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;Number&#32;given&#32;to&#32;the&#32;first&#32;file&#32;(default&#32;0).&quot;</emphasis>,
<emphasis role="stringliteral">&quot;-digits&#32;3&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;Number&#32;of&#32;digits&#32;inserted&#32;before&#32;the&#32;last&#32;period&#32;in&#32;the&#32;output&#32;file&#32;name&#32;(default&#32;3).&quot;</emphasis>,
<emphasis role="stringliteral">&quot;&#32;&quot;</emphasis>,
<emphasis role="stringliteral">&quot;Parameters&#32;for&#32;reconstructions:&quot;</emphasis>,
<emphasis role="stringliteral">&quot;-recid&#32;rec_1&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;Reconstruction&#32;ID&#32;to&#32;use.&quot;</emphasis>,
<emphasis role="stringliteral">&quot;&#32;&quot;</emphasis>,
<emphasis role="stringliteral">&quot;Output:&quot;</emphasis>,
<emphasis role="stringliteral">&quot;-output&#32;output.star&#32;&#32;&#32;&#32;&#32;&#32;Output&#32;parameter&#32;file.&quot;</emphasis>,
<emphasis role="stringliteral">&quot;&#32;&quot;</emphasis>,
NULL
}
</programlisting><para>
Definition at line 24 of file btile.cpp.</para>
    </section><anchor xml:id="_btile_8cpp_1a0b2caeb4b6f130be43e5a2f0267dd453"/>    <section>
    <title>verbose</title>
<indexterm><primary>verbose</primary><secondary>btile.cpp</secondary></indexterm>
<indexterm><primary>btile.cpp</primary><secondary>verbose</secondary></indexterm>
<para><computeroutput>int verbose</computeroutput></para></section>
</section>
</section>
