<?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="_mg__tomo__track_8h">
<title>/Users/bernard/b20/bsoft/include/mg_tomo_track.h File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/include/mg_tomo_track.h</primary></indexterm>
<para>

<para>Functions to track fiducial markers in a tomographic series of images. </para>
 
</para>
<programlisting>#include &quot;mg_processing.h&quot;
#include &quot;rwmg.h&quot;
#include &quot;rwimg.h&quot;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para>double <link linkend="_mg__tomo__track_8h_1a022e6a0cb5b21fcf0d94ac05def713ca">project_find_tilt_axis</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, double tilt, double axis_start, double axis_end, double axis_step, double hi_res, double lo_res, double shift_limit)</para>

<para>Finds the tilt axis for a tomographic tilt series. </para>
</listitem>
            <listitem><para>int <link linkend="_mg__tomo__track_8h_1a8e7625b124b884feae83f5f5d8779329">project_track_markers</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, double hi_res, double lo_res, double shift_limit, double thickness, int max_cycle, double target, int cc_type, int recenter, <link linkend="_class_bstring">Bstring</link> paramfile)</para>

<para>Aligns markers in a tomographic series. </para>
</listitem>
            <listitem><para>int <link linkend="_mg__tomo__track_8h_1aea043218e47a78185516d8d16ec50621">project_track_markers_dual</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, double hi_res, double lo_res, double shift_limit, double thickness, int max_cycle, double target, int cc_type, int recenter, <link linkend="_class_bstring">Bstring</link> paramfile)</para>

<para>Aligns markers in a tomographic series. </para>
</listitem>
            <listitem><para>int <link linkend="_mg__tomo__track_8h_1a62cc9a41e82471168284d84eccac674b">project_refine_markers</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, double hi_res, double lo_res)</para>

<para>Refines marker positions in a tomographic series. </para>
</listitem>
            <listitem><para>int <link linkend="_mg__tomo__track_8h_1a0b0f0eb8bec8888b8ecc7c0e7bacd8e7">project_refine_one_marker</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, int id, double hi_res, double lo_res)</para>

<para>Refines marker positions in a tomographic series. </para>
</listitem>
            <listitem><para>int <link linkend="_mg__tomo__track_8h_1ab8848431a83b56335921515af1c11419">mg_refine_markers</link> (<link linkend="_struct_bmicrograph">Bmicrograph</link> *mg, <link linkend="_class_bimage">Bimage</link> *pgold, double hi_res, double lo_res)</para>

<para>Refines marker positions in a tomographic micrograph. </para>
</listitem>
            <listitem><para>double <link linkend="_mg__tomo__track_8h_1a65bf51633d449f416cb929300f95a00f">project_refine</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, int iter, double tol, <link linkend="_class_bstring">Bstring</link> refop)</para>

<para>Refines all the alignment parameters. </para>
</listitem>
            <listitem><para>double <link linkend="_mg__tomo__track_8h_1a4b1e9fdde16b988ae84933bcad7d1c00">project_refine_z</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>)</para>

<para>Refines the z coordinates of the marker model. </para>
</listitem>
            <listitem><para>double <link linkend="_mg__tomo__track_8h_1a1f5d0ba5315ee851a3af64e48fd048ae">project_refine</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, int do_view, int do_origin, int do_scale)</para>

<para>Refines the views from the marker positions and marker model. </para>
</listitem>
            <listitem><para>double <link linkend="_mg__tomo__track_8h_1a81893069fa38b3d9602bd590379d8405">mg_marker_shift</link> (<link linkend="_struct_bmicrograph">Bmicrograph</link> *mg, <link linkend="_class_bimage">Bimage</link> *pgold, double hi_res, double lo_res, double shift_limit)</para>
</listitem>
            <listitem><para>double <link linkend="_mg__tomo__track_8h_1a27f6e56aa4ea2f07c9e0e9cb936f2fb8">mg_marker_shift</link> (<link linkend="_struct_bmicrograph">Bmicrograph</link> *mg, <link linkend="_class_bimage">Bimage</link> *pgold, double hi_res, double lo_res, double shift_limit, <link linkend="_fft_8h_1a61d23c567e69684715ea52482137a5e6">fft_plan</link> <link linkend="_bico_8cpp_1a6ecaa8728bab23c3a7d96fe0cadc75f2">planf</link>, <link linkend="_fft_8h_1a61d23c567e69684715ea52482137a5e6">fft_plan</link> <link linkend="_bico_8cpp_1a9ec8849996c5e210d7b7e8e05b98639d">planb</link>)</para>

<para>Finds the shift of a micrograph wrt the reference using markers. </para>
</listitem>
            <listitem><para>int <link linkend="_mg__tomo__track_8h_1a928229c9dba491e83496348eef50689c">project_transfer_seed</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, double rot_start, double rot_end, double rot_step, double hi_res, double lo_res, double shift_limit)</para>

<para>Transfers the seed markers from the first to the second project. </para>
</listitem>
            <listitem><para>int <link linkend="_mg__tomo__track_8h_1a6dd9a7ed8d8ed180387c718b1eeca140">project_transform_dual</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>)</para>

<para>Calculates the transformation of the second tilt series to fit the first. </para>
</listitem>
            <listitem><para>double <link linkend="_mg__tomo__track_8h_1ab44226fbd6c24bfcb8aa5df91a7f0ff0">project_dual_zcompare</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>)</para>

<para>Lists two sets of Z coordinates for comparison. </para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Functions to track fiducial markers in a tomographic series of images. </para>

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

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

<para>Created: 20020416 </para>

<para>Modified: 20160108 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_mg__tomo__track_8h_1a81893069fa38b3d9602bd590379d8405"/>    <section>
    <title>mg_marker_shift()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>mg_marker_shift</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>mg_marker_shift</secondary></indexterm>
<para><computeroutput>double mg_marker_shift (<link linkend="_struct_bmicrograph">Bmicrograph</link> * mg, <link linkend="_class_bimage">Bimage</link> * pgold, double hi_res, double lo_res, double shift_limit)</computeroutput></para>    </section><anchor xml:id="_mg__tomo__track_8h_1a27f6e56aa4ea2f07c9e0e9cb936f2fb8"/>    <section>
    <title>mg_marker_shift()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>mg_marker_shift</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>mg_marker_shift</secondary></indexterm>
<para><computeroutput>double mg_marker_shift (<link linkend="_struct_bmicrograph">Bmicrograph</link> * mg, <link linkend="_class_bimage">Bimage</link> * pgold, double hi_res, double lo_res, double shift_limit, <link linkend="_fft_8h_1a61d23c567e69684715ea52482137a5e6">fft_plan</link> planf, <link linkend="_fft_8h_1a61d23c567e69684715ea52482137a5e6">fft_plan</link> planb)</computeroutput></para><para>

<para>Finds the shift of a micrograph wrt the reference using markers. </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>*mg</entry>
                                <entry>
<para>micrograph. </para>
</entry>
                            </row>
                            <row>
                                <entry>*pgold</entry>
                                <entry>
<para>marker reference image (can be NULL). </para>
</entry>
                            </row>
                            <row>
                                <entry>hi_res</entry>
                                <entry>
<para>high resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>lo_res</entry>
                                <entry>
<para>low resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>shift_limit</entry>
                                <entry>
<para>maximum micrograph shift to search for. </para>
</entry>
                            </row>
                            <row>
                                <entry>planf</entry>
                                <entry>
<para>FFT forward plan. </para>
</entry>
                            </row>
                            <row>
                                <entry>planb</entry>
                                <entry>
<para>FFT backward plan. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double correlation coefficient. <literallayout><computeroutput>The marker locations and marker radius must already be set.
The correlation coefficient for the correlation between the micrograph
and the 2D image generated from the markers is retuned.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1112 of file mg_tomo_track.cpp.</para>
    </section><anchor xml:id="_mg__tomo__track_8h_1ab8848431a83b56335921515af1c11419"/>    <section>
    <title>mg_refine_markers()</title>
<indexterm><primary>mg_refine_markers</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>mg_refine_markers</secondary></indexterm>
<para><computeroutput>int mg_refine_markers (<link linkend="_struct_bmicrograph">Bmicrograph</link> * mg, <link linkend="_class_bimage">Bimage</link> * pgold, double hi_res, double lo_res)</computeroutput></para><para>

<para>Refines marker positions in a tomographic micrograph. </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>*mg</entry>
                                <entry>
<para>micrograph. </para>
</entry>
                            </row>
                            <row>
                                <entry>*pgold</entry>
                                <entry>
<para>marker reference image (can be NULL). </para>
</entry>
                            </row>
                            <row>
                                <entry>hi_res</entry>
                                <entry>
<para>high resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>lo_res</entry>
                                <entry>
<para>low resolution limit for cross-correlation. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. <literallayout><computeroutput>The area around a marker is extracted and cross-correlated with the
corresponding projection from the 3D marker model.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 831 of file mg_tomo_track.cpp.</para>
    </section><anchor xml:id="_mg__tomo__track_8h_1ab44226fbd6c24bfcb8aa5df91a7f0ff0"/>    <section>
    <title>project_dual_zcompare()</title>
<indexterm><primary>project_dual_zcompare</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>project_dual_zcompare</secondary></indexterm>
<para><computeroutput>double project_dual_zcompare (<link linkend="_struct_bproject">Bproject</link> * project)</computeroutput></para><para>

<para>Lists two sets of Z coordinates for comparison. </para>
</para>

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

<para>Jessica Mavadia, Bernard Heymann </para>
</formalpara>

                <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>*project</entry>
                                <entry>
<para>project with two tilt series. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double root-mean-square-difference. <literallayout><computeroutput>The root-mean-square-difference between the z coordinates is calculated.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1641 of file mg_tomo_track.cpp.</para>
    </section><anchor xml:id="_mg__tomo__track_8h_1a022e6a0cb5b21fcf0d94ac05def713ca"/>    <section>
    <title>project_find_tilt_axis()</title>
<indexterm><primary>project_find_tilt_axis</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>project_find_tilt_axis</secondary></indexterm>
<para><computeroutput>double project_find_tilt_axis (<link linkend="_struct_bproject">Bproject</link> * project, double tilt, double axis_start, double axis_end, double axis_step, double hi_res, double lo_res, double shift_limit)</computeroutput></para><para>

<para>Finds the tilt axis for a tomographic tilt series. </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>*project</entry>
                                <entry>
<para>project parameter structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>tilt</entry>
                                <entry>
<para>user-chosen tilt angle to use (radians). </para>
</entry>
                            </row>
                            <row>
                                <entry>axis_start</entry>
                                <entry>
<para>starting tilt axis angle. </para>
</entry>
                            </row>
                            <row>
                                <entry>axis_end</entry>
                                <entry>
<para>ending tilt axis angle. </para>
</entry>
                            </row>
                            <row>
                                <entry>axis_step</entry>
                                <entry>
<para>tilt axis angle step size (radians). </para>
</entry>
                            </row>
                            <row>
                                <entry>hi_res</entry>
                                <entry>
<para>high resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>lo_res</entry>
                                <entry>
<para>low resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>shift_limit</entry>
                                <entry>
<para>maximum micrograph shift to search for. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double best correlation coefficient. <literallayout><computeroutput>The zero-tilt reference marker set must be defined.
The micrographs closest to the positive and negative values of the
given tilt angle is selected to find the tilt axis.
The tilt axis for each of these micrographs is incremented from
-PI to PI, markers generated from the reference seed, and 
cross-correlated with the micrograph image.
The tilt axis angle giving the best cross-correlation is chosen
and assigned to all the micrographs.
The markers for the chosen tilted micrographs are deleted.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 153 of file mg_tomo_track.cpp.</para>
    </section><anchor xml:id="_mg__tomo__track_8h_1a65bf51633d449f416cb929300f95a00f"/>    <section>
    <title>project_refine()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>project_refine</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>project_refine</secondary></indexterm>
<para><computeroutput>double project_refine (<link linkend="_struct_bproject">Bproject</link> * project, int iter, double tol, <link linkend="_class_bstring">Bstring</link> refop)</computeroutput></para><para>

<para>Refines all the alignment parameters. </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>*project</entry>
                                <entry>
<para>micrograph project. </para>
</entry>
                            </row>
                            <row>
                                <entry>iter</entry>
                                <entry>
<para>maximum number of iterations. </para>
</entry>
                            </row>
                            <row>
                                <entry>tol</entry>
                                <entry>
<para>tolerance for exit condition. </para>
</entry>
                            </row>
                            <row>
                                <entry>refop</entry>
                                <entry>
<para>string holding sequence of refinement operations. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double marker RMSD. </para>
</formalpara>
</para>
<para>
Definition at line 868 of file mg_tomo_track.cpp.</para>
    </section><anchor xml:id="_mg__tomo__track_8h_1a1f5d0ba5315ee851a3af64e48fd048ae"/>    <section>
    <title>project_refine()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>project_refine</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>project_refine</secondary></indexterm>
<para><computeroutput>double project_refine (<link linkend="_struct_bproject">Bproject</link> * project, int do_view, int do_origin, int do_scale)</computeroutput></para><para>

<para>Refines the views from the marker positions and marker model. </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>*project</entry>
                                <entry>
<para>micrograph project. </para>
</entry>
                            </row>
                            <row>
                                <entry>do_view</entry>
                                <entry>
<para>refine micrograph views. </para>
</entry>
                            </row>
                            <row>
                                <entry>do_origin</entry>
                                <entry>
<para>refine micrograph origins. </para>
</entry>
                            </row>
                            <row>
                                <entry>do_scale</entry>
                                <entry>
<para>refine micrograph scales. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double best residual. <literallayout><computeroutput>Requires the matrices in the micrograph structures to be defined.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1005 of file mg_tomo_track.cpp.</para>
    </section><anchor xml:id="_mg__tomo__track_8h_1a62cc9a41e82471168284d84eccac674b"/>    <section>
    <title>project_refine_markers()</title>
<indexterm><primary>project_refine_markers</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>project_refine_markers</secondary></indexterm>
<para><computeroutput>int project_refine_markers (<link linkend="_struct_bproject">Bproject</link> * project, double hi_res, double lo_res)</computeroutput></para><para>

<para>Refines marker positions in a tomographic series. </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>*project</entry>
                                <entry>
<para>project parameter structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>hi_res</entry>
                                <entry>
<para>high resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>lo_res</entry>
                                <entry>
<para>low resolution limit for cross-correlation. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0, &lt;0 on error. <literallayout><computeroutput>The area around a marker is extracted and cross-correlated with the
corresponding projection from the 3D marker model.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 683 of file mg_tomo_track.cpp.</para>
    </section><anchor xml:id="_mg__tomo__track_8h_1a0b0f0eb8bec8888b8ecc7c0e7bacd8e7"/>    <section>
    <title>project_refine_one_marker()</title>
<indexterm><primary>project_refine_one_marker</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>project_refine_one_marker</secondary></indexterm>
<para><computeroutput>int project_refine_one_marker (<link linkend="_struct_bproject">Bproject</link> * project, int id, double hi_res, double lo_res)</computeroutput></para><para>

<para>Refines marker positions in a tomographic series. </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>*project</entry>
                                <entry>
<para>project parameter structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>id</entry>
                                <entry>
<para>marker identifier. </para>
</entry>
                            </row>
                            <row>
                                <entry>hi_res</entry>
                                <entry>
<para>high resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>lo_res</entry>
                                <entry>
<para>low resolution limit for cross-correlation. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0, &lt;0 on error. <literallayout><computeroutput>The area around a marker is extracted and cross-correlated with the
corresponding projection from the 3D marker model.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 768 of file mg_tomo_track.cpp.</para>
    </section><anchor xml:id="_mg__tomo__track_8h_1a4b1e9fdde16b988ae84933bcad7d1c00"/>    <section>
    <title>project_refine_z()</title>
<indexterm><primary>project_refine_z</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>project_refine_z</secondary></indexterm>
<para><computeroutput>double project_refine_z (<link linkend="_struct_bproject">Bproject</link> * project)</computeroutput></para><para>

<para>Refines the z coordinates of the marker model. </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>*project</entry>
                                <entry>
<para>micrograph project. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double overall RMS change. </para>
</formalpara>
</para>
<para>
Definition at line 948 of file mg_tomo_track.cpp.</para>
    </section><anchor xml:id="_mg__tomo__track_8h_1a8e7625b124b884feae83f5f5d8779329"/>    <section>
    <title>project_track_markers()</title>
<indexterm><primary>project_track_markers</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>project_track_markers</secondary></indexterm>
<para><computeroutput>int project_track_markers (<link linkend="_struct_bproject">Bproject</link> * project, double hi_res, double lo_res, double shift_limit, double thickness, int max_cycle, double target, int cc_type, int recenter, <link linkend="_class_bstring">Bstring</link> paramfile)</computeroutput></para><para>

<para>Aligns markers in a tomographic series. </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>*project</entry>
                                <entry>
<para>project parameter structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>hi_res</entry>
                                <entry>
<para>high resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>lo_res</entry>
                                <entry>
<para>low resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>shift_limit</entry>
                                <entry>
<para>maximum micrograph shift to search for. </para>
</entry>
                            </row>
                            <row>
                                <entry>thickness</entry>
                                <entry>
<para>estimated tomogram thickness (angstrom). </para>
</entry>
                            </row>
                            <row>
                                <entry>max_cycle</entry>
                                <entry>
<para>maximum number of iterations. </para>
</entry>
                            </row>
                            <row>
                                <entry>target</entry>
                                <entry>
<para>target residual to terminate tracking. </para>
</entry>
                            </row>
                            <row>
                                <entry>cc_type</entry>
                                <entry>
<para>indicates type of marker correlation: 0=real space, 1=cross correlation </para>
</entry>
                            </row>
                            <row>
                                <entry>recenter</entry>
                                <entry>
<para>flag to recenter z coordinates. </para>
</entry>
                            </row>
                            <row>
                                <entry>paramfile</entry>
                                <entry>
<para>output parameter file name. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0, &lt;0 on error. <literallayout><computeroutput>From the fiducial marker seed in the zero-degree tilt image, the 
z coordinates of the markers as well as the image shift for 
each micrograph is determined. The algorithm first attempts to 
find the z-coordinate for each marker in an image by doing 
real space correlations along a line determined by the tilt direction. 
It then generates a projection image from the whole marker set at 
the nominal tilt angle and cross-correlates it with the image to 
find the shift. The process proceeds from the low-angle tilts to 
higher tilts in both directions, using the lower dependence of the 
low-tilt images on correct marker z-coordinates. This process is 
iterated (typically 2-5 times) until the change in z-coordinates drops
below one pixel on average or up to the maximum number of iterations. 
The resolution limits are used in the cross-correlations.
The shift limit prevents setting micrograph origin to far from the nominal origin.
The thickness determines the extent of searching for the z coordinate of a marker.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 313 of file mg_tomo_track.cpp.</para>
    </section><anchor xml:id="_mg__tomo__track_8h_1aea043218e47a78185516d8d16ec50621"/>    <section>
    <title>project_track_markers_dual()</title>
<indexterm><primary>project_track_markers_dual</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>project_track_markers_dual</secondary></indexterm>
<para><computeroutput>int project_track_markers_dual (<link linkend="_struct_bproject">Bproject</link> * project, double hi_res, double lo_res, double shift_limit, double thickness, int max_cycle, double target, int cc_type, int recenter, <link linkend="_class_bstring">Bstring</link> paramfile)</computeroutput></para><para>

<para>Aligns markers in a tomographic series. </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>*project</entry>
                                <entry>
<para>project parameter structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>hi_res</entry>
                                <entry>
<para>high resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>lo_res</entry>
                                <entry>
<para>low resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>shift_limit</entry>
                                <entry>
<para>maximum micrograph shift to search for. </para>
</entry>
                            </row>
                            <row>
                                <entry>thickness</entry>
                                <entry>
<para>estimated tomogram thickness (angstrom). </para>
</entry>
                            </row>
                            <row>
                                <entry>max_cycle</entry>
                                <entry>
<para>maximum number of iterations. </para>
</entry>
                            </row>
                            <row>
                                <entry>target</entry>
                                <entry>
<para>target residual to terminate tracking. </para>
</entry>
                            </row>
                            <row>
                                <entry>cc_type</entry>
                                <entry>
<para>indicates type of marker correlation: 0=real space, 1=cross correlation </para>
</entry>
                            </row>
                            <row>
                                <entry>recenter</entry>
                                <entry>
<para>flag to recenter z coordinates. </para>
</entry>
                            </row>
                            <row>
                                <entry>paramfile</entry>
                                <entry>
<para>output parameter file name. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0, &lt;0 on error. <literallayout><computeroutput>From the fiducial marker seed in the zero-degree tilt image, the 
z coordinates of the markers as well as the image shift for 
each micrograph is determined. The algorithm first attempts to 
find the z-coordinate for each marker in an image by doing 
real space correlations along a line determined by the tilt direction. 
It then generates a projection image from the whole marker set at 
the nominal tilt angle and cross-correlates it with the image to 
find the shift. The process proceeds from the low-angle tilts to 
higher tilts in both directions, using the lower dependence of the 
low-tilt images on correct marker z-coordinates. This process is 
iterated (typically 2-5 times) until the change in z-coordinates drops
below one pixel on average or up to the maximum number of iterations. 
The resolution limits are used in the cross-correlations.
The shift limit prevents setting micrograph origin to far from the nominal origin.
The thickness determines the extent of searching for the z coordinate of a marker.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 489 of file mg_tomo_track.cpp.</para>
    </section><anchor xml:id="_mg__tomo__track_8h_1a928229c9dba491e83496348eef50689c"/>    <section>
    <title>project_transfer_seed()</title>
<indexterm><primary>project_transfer_seed</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>project_transfer_seed</secondary></indexterm>
<para><computeroutput>int project_transfer_seed (<link linkend="_struct_bproject">Bproject</link> * project, double rot_start, double rot_end, double rot_step, double hi_res, double lo_res, double shift_limit)</computeroutput></para><para>

<para>Transfers the seed markers from the first to the second project. </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>*project</entry>
                                <entry>
<para>project with seed markers in first field. </para>
</entry>
                            </row>
                            <row>
                                <entry>rot_start</entry>
                                <entry>
<para>starting rotation angle. </para>
</entry>
                            </row>
                            <row>
                                <entry>rot_end</entry>
                                <entry>
<para>final rotation angle. </para>
</entry>
                            </row>
                            <row>
                                <entry>rot_step</entry>
                                <entry>
<para>angular search step size. </para>
</entry>
                            </row>
                            <row>
                                <entry>hi_res</entry>
                                <entry>
<para>high resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>lo_res</entry>
                                <entry>
<para>low resolution limit for cross-correlation. </para>
</entry>
                            </row>
                            <row>
                                <entry>shift_limit</entry>
                                <entry>
<para>maximum micrograph shift to search for. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int number of markers. <literallayout><computeroutput>The markers from the first series are rotated around the micrograph
origin by the search angle. The markers are then used to generate
an image with synthetic markers, and this image is cross-correlated 
with the zero-tilt micrograph of the second series. The search angle
giving the best correlation coefficient is selected and the seed marker
locations for the second series are calculated.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1418 of file mg_tomo_track.cpp.</para>
    </section><anchor xml:id="_mg__tomo__track_8h_1a6dd9a7ed8d8ed180387c718b1eeca140"/>    <section>
    <title>project_transform_dual()</title>
<indexterm><primary>project_transform_dual</primary><secondary>mg_tomo_track.h</secondary></indexterm>
<indexterm><primary>mg_tomo_track.h</primary><secondary>project_transform_dual</secondary></indexterm>
<para><computeroutput>int project_transform_dual (<link linkend="_struct_bproject">Bproject</link> * project)</computeroutput></para><para>

<para>Calculates the transformation of the second tilt series to fit the first. </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>*project</entry>
                                <entry>
<para>project with seed markers. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int number of markers compared. <literallayout><computeroutput>The 3D marker coordinates from the second series are fitted to those
of the first series to determine the rotation matrix and shifts.
The 3D marker locations and the micrograph orientations and origins
of the second series are then adkjusted to correspond to the first.
Restrictions: The first two fields should contain the two tilt series
and the first two reconstructions the corresponding 3D marker sets.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1541 of file mg_tomo_track.cpp.</para>
</section>
</section>
</section>
