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

<para>Functions to do a tomographic reconstruction. </para>
 
</para>
<programlisting>#include &quot;mg_processing.h&quot;
#include &quot;rwimg.h&quot;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para><link linkend="_class_bimage">Bimage</link> * <link linkend="_mg__tomo__rec_8h_1ad278516c74499cc3a2e571c3ceac1a43">project_tomo_reconstruct</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, double hi_res, double scale, <link linkend="_class_vector3">Vector3</link>&lt; long &gt; size, int interp_type, int pad_factor, double edge_width, double marker_radius, int fill_type, double fill, int action, double wiener)</para>

<para>Reciprocal space reconstruction from the images in a multi-image file. </para>
</listitem>
            <listitem><para><link linkend="_class_bimage">Bimage</link> * <link linkend="_mg__tomo__rec_8h_1a56126ce6933914a8c06bae3704800d17">project_fourier_reconstruction_slab</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, double hi_res, double scale, <link linkend="_class_vector3">Vector3</link>&lt; long &gt; size, int slab_start, int slab_end, double marker_radius, int fill_type, double fill, int action, double wiener)</para>

<para>Reciprocal space reconstruction from the images in a multi-image file. </para>
</listitem>
            <listitem><para>long <link linkend="_mg__tomo__rec_8h_1a3333f17b9beed63654c0a8e4f12dab83">project_tomo_reconstruct_particles</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, double resolution, int interp_type, int pad_factor, int ctf_action, double wiener, <link linkend="_struct_bsymmetry">Bsymmetry</link> *sym, <link linkend="_class_bstring">Bstring</link> &amp;partbase, <link linkend="_class_bstring">Bstring</link> &amp;partpath, <link linkend="_class_bstring">Bstring</link> &amp;partext)</para>

<para>Reconstructs particles from a tilt series. </para>
</listitem>
            <listitem><para>long <link linkend="_mg__tomo__rec_8h_1a1142db4f55925935dd3c264f85cfb250">img_pack_2D_in_recip_space_slab</link> (<link linkend="_class_bimage">Bimage</link> *p, <link linkend="_class_bimage">Bimage</link> *prec, long zsize, long slab_start, float *weight, float *weight2, double hi_res, <link linkend="_class_matrix3">Matrix3</link> mat, double scale)</para>

<para>Packs a 2D Fourier transform into a 3D reciprocal space volume. </para>
</listitem>
            <listitem><para>int <link linkend="_mg__tomo__rec_8h_1ad7223caf92e4a93f5a205da6d0382f96">img_backtransform_slices</link> (<link linkend="_class_bimage">Bimage</link> *p)</para>

<para>Backtransforms 2D slices in a 3D volume. </para>
</listitem>
            <listitem><para>int <link linkend="_mg__tomo__rec_8h_1aa976d053c150f485c17ce8f3c7f69535">img_phase_shift_slab_to_origin</link> (<link linkend="_class_bimage">Bimage</link> *p, int zsize, int slab_start)</para>

<para>Phase shifts a set of reflections to the image origin. </para>
</listitem>
            <listitem><para>int <link linkend="_mg__tomo__rec_8h_1a2faaa1cec5662e25b214f3269ce58f42">mg_fft_write</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, <link linkend="_class_vector3">Vector3</link>&lt; int &gt; size, double scale, int pad_factor, <link linkend="_class_bstring">Bstring</link> &amp;label, <link linkend="_utilities_8h_1ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</link> datatype, double marker_radius, int fill_type, double fill)</para>

<para>Fourier transform micrographs and write to disk. </para>
</listitem>
            <listitem><para><link linkend="_class_bimage">Bimage</link> * <link linkend="_mg__tomo__rec_8h_1a30366f649d6aa26b48c160cb6de91041">img_extract_ytile</link> (<link linkend="_class_bstring">Bstring</link> *file_list, int ystart, int ysize)</para>

<para>Extracts a tile from the image with limits in y. </para>
</listitem>
            <listitem><para><link linkend="_class_bimage">Bimage</link> * <link linkend="_mg__tomo__rec_8h_1a1785021f439e808474b84c5107fb5aaf">img_backtransform_z_on_disk</link> (<link linkend="_class_bstring">Bstring</link> *file_list, <link linkend="_class_bstring">Bstring</link> &amp;recfile, <link linkend="_utilities_8h_1ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</link> datatype, <link linkend="_class_bstring">Bstring</link> &amp;label, double avg, double std, double cutmin, double cutmax)</para>

<para>The lines along the z-dimensions of a disk-based block is Fourier back-transformed. </para>
</listitem>
            <listitem><para>int <link linkend="_mg__tomo__rec_8h_1a041526572728d553dd3c80a3d2ef387b">img_backtransform_z_lines</link> (<link linkend="_class_bimage">Bimage</link> *p)</para>

<para>The lines along the z-dimensions of a disk-based block is Fourier back-transformed. </para>
</listitem>
            <listitem><para><link linkend="_class_bimage">Bimage</link> * <link linkend="_mg__tomo__rec_8h_1a4c8a5148f0492456835a080a8375eaee">project_missing_mask</link> (<link linkend="_struct_bproject">Bproject</link> *<link linkend="_tcltk__bmodel_8cpp_1aea438e09dfc03683a0f49a05e9a69cac">project</link>, <link linkend="_class_vector3">Vector3</link>&lt; long &gt; size, <link linkend="_class_vector3">Vector3</link>&lt; double &gt; origin, double hi_res, double scale)</para>

<para>Creates a reciprocal space mask from the tilt series orientations. </para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Functions to do a tomographic reconstruction. </para>

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

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

<para>Created: 20020416 </para>

<para>Modified: 20180629 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_mg__tomo__rec_8h_1ad7223caf92e4a93f5a205da6d0382f96"/>    <section>
    <title>img_backtransform_slices()</title>
<indexterm><primary>img_backtransform_slices</primary><secondary>mg_tomo_rec.h</secondary></indexterm>
<indexterm><primary>mg_tomo_rec.h</primary><secondary>img_backtransform_slices</secondary></indexterm>
<para><computeroutput>int img_backtransform_slices (<link linkend="_class_bimage">Bimage</link> * p)</computeroutput></para><para>

<para>Backtransforms 2D slices in a 3D volume. </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>3D complex volume. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. <literallayout><computeroutput>Each slice is extracted, backtransformed and copied back into the
original volume.
Note: The phases are now not hermitian any more.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 731 of file mg_tomo_rec.cpp.</para>
    </section><anchor xml:id="_mg__tomo__rec_8h_1a041526572728d553dd3c80a3d2ef387b"/>    <section>
    <title>img_backtransform_z_lines()</title>
<indexterm><primary>img_backtransform_z_lines</primary><secondary>mg_tomo_rec.h</secondary></indexterm>
<indexterm><primary>mg_tomo_rec.h</primary><secondary>img_backtransform_z_lines</secondary></indexterm>
<para><computeroutput>int img_backtransform_z_lines (<link linkend="_class_bimage">Bimage</link> * p)</computeroutput></para><para>

<para>The lines along the z-dimensions of a disk-based block is Fourier back-transformed. </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 header information (statistics updated). </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. <literallayout><computeroutput>Each 2D xz plane is read from the raw complex data block.
Each z-line in the plane is back-transformed.
The transformed 2D plane is written back into the raw data block.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1334 of file mg_tomo_rec.cpp.</para>
    </section><anchor xml:id="_mg__tomo__rec_8h_1a1785021f439e808474b84c5107fb5aaf"/>    <section>
    <title>img_backtransform_z_on_disk()</title>
<indexterm><primary>img_backtransform_z_on_disk</primary><secondary>mg_tomo_rec.h</secondary></indexterm>
<indexterm><primary>mg_tomo_rec.h</primary><secondary>img_backtransform_z_on_disk</secondary></indexterm>
<para><computeroutput><link linkend="_class_bimage">Bimage</link>* img_backtransform_z_on_disk (<link linkend="_class_bstring">Bstring</link> * file_list, <link linkend="_class_bstring">Bstring</link> &amp; recfile, <link linkend="_utilities_8h_1ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</link> datatype, <link linkend="_class_bstring">Bstring</link> &amp; label, double avg, double std, double cutmin, double cutmax)</computeroutput></para><para>

<para>The lines along the z-dimensions of a disk-based block is Fourier back-transformed. </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>*file_list</entry>
                                <entry>
<para>list of image file names. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;recfile</entry>
                                <entry>
<para>new reconstruction file name. </para>
</entry>
                            </row>
                            <row>
                                <entry>datatype</entry>
                                <entry>
<para>data type for new reconstruction file. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;label</entry>
                                <entry>
<para>command line string. </para>
</entry>
                            </row>
                            <row>
                                <entry>avg</entry>
                                <entry>
<para>target average. </para>
</entry>
                            </row>
                            <row>
                                <entry>std</entry>
                                <entry>
<para>target standard deviation. </para>
</entry>
                            </row>
                            <row>
                                <entry>cutmin</entry>
                                <entry>
<para>minimum for truncation. </para>
</entry>
                            </row>
                            <row>
                                <entry>cutmax</entry>
                                <entry>
<para>maximum for truncation. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. <literallayout><computeroutput>Each 2D xz plane is read from the raw complex data block.
Each z-line in the plane is back-transformed.
The transformed 2D plane is written back into the raw data block.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1184 of file mg_tomo_rec.cpp.</para>
    </section><anchor xml:id="_mg__tomo__rec_8h_1a30366f649d6aa26b48c160cb6de91041"/>    <section>
    <title>img_extract_ytile()</title>
<indexterm><primary>img_extract_ytile</primary><secondary>mg_tomo_rec.h</secondary></indexterm>
<indexterm><primary>mg_tomo_rec.h</primary><secondary>img_extract_ytile</secondary></indexterm>
<para><computeroutput><link linkend="_class_bimage">Bimage</link>* img_extract_ytile (<link linkend="_class_bstring">Bstring</link> * file_list, int ystart, int ysize)</computeroutput></para><para>

<para>Extracts a tile from the image with limits in y. </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>*file_list</entry>
                                <entry>
<para>list of image file names. </para>
</entry>
                            </row>
                            <row>
                                <entry>ystart</entry>
                                <entry>
<para>first y index. </para>
</entry>
                            </row>
                            <row>
                                <entry>ysize</entry>
                                <entry>
<para>size in y. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bimage* tile, NULL on failure. <literallayout><computeroutput>From a series of z-slab images, tiles are extracted from a defined start in y,
and with a defined size in y.
A file indicating the origins of the tiles, &quot;y.tiles&quot;, is written to
be used with bpatch to assemble the tiles.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1082 of file mg_tomo_rec.cpp.</para>
    </section><anchor xml:id="_mg__tomo__rec_8h_1a1142db4f55925935dd3c264f85cfb250"/>    <section>
    <title>img_pack_2D_in_recip_space_slab()</title>
<indexterm><primary>img_pack_2D_in_recip_space_slab</primary><secondary>mg_tomo_rec.h</secondary></indexterm>
<indexterm><primary>mg_tomo_rec.h</primary><secondary>img_pack_2D_in_recip_space_slab</secondary></indexterm>
<para><computeroutput>long img_pack_2D_in_recip_space_slab (<link linkend="_class_bimage">Bimage</link> * p, <link linkend="_class_bimage">Bimage</link> * prec, long zsize, long slab_start, float * weight, float * weight2, double hi_res, <link linkend="_class_matrix3">Matrix3</link> mat, double scale)</computeroutput></para><para>

<para>Packs a 2D Fourier transform into a 3D reciprocal space volume. </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>2D Fourier transform </para>
</entry>
                            </row>
                            <row>
                                <entry>*prec</entry>
                                <entry>
<para>3D reciprocal space slab volume. </para>
</entry>
                            </row>
                            <row>
                                <entry>zsize</entry>
                                <entry>
<para>intentional z dimension of reconstruction. </para>
</entry>
                            </row>
                            <row>
                                <entry>slab_start</entry>
                                <entry>
<para>start of current slab. </para>
</entry>
                            </row>
                            <row>
                                <entry>*weight</entry>
                                <entry>
<para>weigth array. </para>
</entry>
                            </row>
                            <row>
                                <entry>*weight2</entry>
                                <entry>
<para>weight squared array. </para>
</entry>
                            </row>
                            <row>
                                <entry>hi_res</entry>
                                <entry>
<para>high resolution limit. </para>
</entry>
                            </row>
                            <row>
                                <entry>mat</entry>
                                <entry>
<para>affine matrix. </para>
</entry>
                            </row>
                            <row>
                                <entry>scale</entry>
                                <entry>
<para>scale of reconstruction and particle magnification. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long 0. <literallayout><computeroutput>The rotation matrix is used to determine the plane in reciprocal space
to which the 2D transform data is added. The map is assumed to be cubic
and the 2D transform square. The real space 2D image must be supplied.
This is then padded to more than twice its original size, fourier
transformed, and packed into the 3D reciprocal space block.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 782 of file mg_tomo_rec.cpp.</para>
    </section><anchor xml:id="_mg__tomo__rec_8h_1aa976d053c150f485c17ce8f3c7f69535"/>    <section>
    <title>img_phase_shift_slab_to_origin()</title>
<indexterm><primary>img_phase_shift_slab_to_origin</primary><secondary>mg_tomo_rec.h</secondary></indexterm>
<indexterm><primary>mg_tomo_rec.h</primary><secondary>img_phase_shift_slab_to_origin</secondary></indexterm>
<para><computeroutput>int img_phase_shift_slab_to_origin (<link linkend="_class_bimage">Bimage</link> * p, int zsize, int slab_start)</computeroutput></para><para>

<para>Phase shifts a set of reflections to the image origin. </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>complex image. </para>
</entry>
                            </row>
                            <row>
                                <entry>zsize</entry>
                                <entry>
<para>slab thickness. </para>
</entry>
                            </row>
                            <row>
                                <entry>slab_start</entry>
                                <entry>
<para>slab start. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. <literallayout><computeroutput>A real space translation with wrapping is equivalent to phase shifting
in reciprocal space. The phases are shifted based on the embedded
sub-image origins.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 891 of file mg_tomo_rec.cpp.</para>
    </section><anchor xml:id="_mg__tomo__rec_8h_1a2faaa1cec5662e25b214f3269ce58f42"/>    <section>
    <title>mg_fft_write()</title>
<indexterm><primary>mg_fft_write</primary><secondary>mg_tomo_rec.h</secondary></indexterm>
<indexterm><primary>mg_tomo_rec.h</primary><secondary>mg_fft_write</secondary></indexterm>
<para><computeroutput>int mg_fft_write (<link linkend="_struct_bproject">Bproject</link> * project, <link linkend="_class_vector3">Vector3</link>&lt; int &gt; size, double scale, int pad_factor, <link linkend="_class_bstring">Bstring</link> &amp; label, <link linkend="_utilities_8h_1ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</link> datatype, double marker_radius, int fill_type, double fill)</computeroutput></para><para>

<para>Fourier transform micrographs and write to disk. </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>image processing parameter structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>size</entry>
                                <entry>
<para>intended reconstruction size. </para>
</entry>
                            </row>
                            <row>
                                <entry>scale</entry>
                                <entry>
<para>reconstruction scale. </para>
</entry>
                            </row>
                            <row>
                                <entry>pad_factor</entry>
                                <entry>
<para>factor that determines image padding. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;label</entry>
                                <entry>
<para>label to write into image. </para>
</entry>
                            </row>
                            <row>
                                <entry>datatype</entry>
                                <entry>
<para>datatype (default complex float). </para>
</entry>
                            </row>
                            <row>
                                <entry>marker_radius</entry>
                                <entry>
<para>flag to mask out markers. </para>
</entry>
                            </row>
                            <row>
                                <entry>fill_type</entry>
                                <entry>
<para>FILL_AVERAGE, FILL_BACKGROUND, FILL_USER </para>
</entry>
                            </row>
                            <row>
                                <entry>fill</entry>
                                <entry>
<para>value to paint markers. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bimage* reconstruction, NULL on failure. <literallayout><computeroutput>Each micrograph is padded to a square size that has power of 2
dimensions. The micrograph is transformed and the phases shifted
to the origin.
A pad factor of zero indicates use of original size.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 986 of file mg_tomo_rec.cpp.</para>
    </section><anchor xml:id="_mg__tomo__rec_8h_1a56126ce6933914a8c06bae3704800d17"/>    <section>
    <title>project_fourier_reconstruction_slab()</title>
<indexterm><primary>project_fourier_reconstruction_slab</primary><secondary>mg_tomo_rec.h</secondary></indexterm>
<indexterm><primary>mg_tomo_rec.h</primary><secondary>project_fourier_reconstruction_slab</secondary></indexterm>
<para><computeroutput><link linkend="_class_bimage">Bimage</link>* project_fourier_reconstruction_slab (<link linkend="_struct_bproject">Bproject</link> * project, double hi_res, double scale, <link linkend="_class_vector3">Vector3</link>&lt; long &gt; size, int slab_start, int slab_end, double marker_radius, int fill_type, double fill, int action, double wiener)</computeroutput></para><para>

<para>Reciprocal space reconstruction from the images in a multi-image file. </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>image processing parameter structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>hi_res</entry>
                                <entry>
<para>high resolution limit. </para>
</entry>
                            </row>
                            <row>
                                <entry>scale</entry>
                                <entry>
<para>scale of reconstruction. </para>
</entry>
                            </row>
                            <row>
                                <entry>size</entry>
                                <entry>
<para>size of reconstruction. </para>
</entry>
                            </row>
                            <row>
                                <entry>slab_start</entry>
                                <entry>
<para>start of reconstruction slab. </para>
</entry>
                            </row>
                            <row>
                                <entry>slab_end</entry>
                                <entry>
<para>end of reconstruction slab. </para>
</entry>
                            </row>
                            <row>
                                <entry>marker_radius</entry>
                                <entry>
<para>flag and radius to mask out markers. </para>
</entry>
                            </row>
                            <row>
                                <entry>fill_type</entry>
                                <entry>
<para>FILL_AVERAGE, FILL_BACKGROUND, FILL_USER </para>
</entry>
                            </row>
                            <row>
                                <entry>fill</entry>
                                <entry>
<para>value to paint markers. </para>
</entry>
                            </row>
                            <row>
                                <entry>action</entry>
                                <entry>
<para>flag to apply CTF to projections. </para>
</entry>
                            </row>
                            <row>
                                <entry>wiener</entry>
                                <entry>
<para>Wiener factor. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bimage* reconstruction, NULL on failure. <literallayout><computeroutput>The orientation parameters, view vector, angle of rotation and origin,
must all be set. Each image is padded to at least two times its size 
and its Fourier transform packed into 3D reciprocal space.
The figure-of-merit calculated for each reciprocal space voxel is:
           sum(w*re)^2 + sum(w*im)^2
    FOM = ---------------------------
          sum(w)*sum(w*(re^2 + im^2))
where
    re  real part
    im  imaginary part
    w   weight (inverse distance of image pixel to closest grid point)
For voxels with only one data pixel contributing to it, FOM = 0.
An image is used in the reconstruction if its selection flag has been set.
If the selection number is less than zero, all particles with selection flags
greater than zero are used. If the selection number is zero or above, all
particles with the selection flag set to the same number are used.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 299 of file mg_tomo_rec.cpp.</para>
    </section><anchor xml:id="_mg__tomo__rec_8h_1a4c8a5148f0492456835a080a8375eaee"/>    <section>
    <title>project_missing_mask()</title>
<indexterm><primary>project_missing_mask</primary><secondary>mg_tomo_rec.h</secondary></indexterm>
<indexterm><primary>mg_tomo_rec.h</primary><secondary>project_missing_mask</secondary></indexterm>
<para><computeroutput><link linkend="_class_bimage">Bimage</link>* project_missing_mask (<link linkend="_struct_bproject">Bproject</link> * project, <link linkend="_class_vector3">Vector3</link>&lt; long &gt; size, <link linkend="_class_vector3">Vector3</link>&lt; double &gt; origin, double hi_res, double scale)</computeroutput></para><para>

<para>Creates a reciprocal space mask from the tilt series orientations. </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>size</entry>
                                <entry>
<para>size of mask. </para>
</entry>
                            </row>
                            <row>
                                <entry>origin</entry>
                                <entry>
<para>origin of mask. </para>
</entry>
                            </row>
                            <row>
                                <entry>hi_res</entry>
                                <entry>
<para>high resolution limit. </para>
</entry>
                            </row>
                            <row>
                                <entry>scale</entry>
                                <entry>
<para>scale of mask. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bimage* mask, NULL on failure. <literallayout><computeroutput>The orientation parameters of the micrographs must all be set. 
A 2D mask is overlayed onto the 3D image for each micrograph.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 1594 of file mg_tomo_rec.cpp.</para>
    </section><anchor xml:id="_mg__tomo__rec_8h_1ad278516c74499cc3a2e571c3ceac1a43"/>    <section>
    <title>project_tomo_reconstruct()</title>
<indexterm><primary>project_tomo_reconstruct</primary><secondary>mg_tomo_rec.h</secondary></indexterm>
<indexterm><primary>mg_tomo_rec.h</primary><secondary>project_tomo_reconstruct</secondary></indexterm>
<para><computeroutput><link linkend="_class_bimage">Bimage</link>* project_tomo_reconstruct (<link linkend="_struct_bproject">Bproject</link> * project, double hi_res, double scale, <link linkend="_class_vector3">Vector3</link>&lt; long &gt; size, int interp_type, int pad_factor, double edge_width, double marker_radius, int fill_type, double fill, int action, double wiener)</computeroutput></para><para>

<para>Reciprocal space reconstruction from the images in a multi-image file. </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>image processing parameter structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>hi_res</entry>
                                <entry>
<para>high resolution limit. </para>
</entry>
                            </row>
                            <row>
                                <entry>scale</entry>
                                <entry>
<para>scale of reconstruction. </para>
</entry>
                            </row>
                            <row>
                                <entry>size</entry>
                                <entry>
<para>size of reconstruction. </para>
</entry>
                            </row>
                            <row>
                                <entry>interp_type</entry>
                                <entry>
<para>interpolation type. </para>
</entry>
                            </row>
                            <row>
                                <entry>pad_factor</entry>
                                <entry>
<para>factor that determines image padding. </para>
</entry>
                            </row>
                            <row>
                                <entry>edge_width</entry>
                                <entry>
<para>edge smoothing width for masks. </para>
</entry>
                            </row>
                            <row>
                                <entry>marker_radius</entry>
                                <entry>
<para>flag and radius to mask out markers. </para>
</entry>
                            </row>
                            <row>
                                <entry>fill_type</entry>
                                <entry>
<para>FILL_AVERAGE, FILL_BACKGROUND, FILL_USER </para>
</entry>
                            </row>
                            <row>
                                <entry>fill</entry>
                                <entry>
<para>value to paint markers. </para>
</entry>
                            </row>
                            <row>
                                <entry>action</entry>
                                <entry>
<para>flag to apply CTF to projections. </para>
</entry>
                            </row>
                            <row>
                                <entry>wiener</entry>
                                <entry>
<para>Wiener factor. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bimage* reconstruction, NULL on failure. <literallayout><computeroutput>The orientation parameters, view vector, angle of rotation and origin,
must all be set. Each image is padded to at least two times its size 
and its Fourier transform packed into 3D reciprocal space.
The figure-of-merit calculated for each reciprocal space voxel is:
           sum(w*re)^2 + sum(w*im)^2
    FOM = ---------------------------
          sum(w)*sum(w*(re^2 + im^2))
where
    re  real part
    im  imaginary part
    w   weight (inverse distance of image pixel to closest grid point)
For voxels with only one data pixel contributing to it, FOM = 0.
An image is used in the reconstruction if its selection flag has been set.
If the selection number is less than zero, all particles with selection flags
greater than zero are used. If the selection number is zero or above, all
particles with the selection flag set to the same number are used.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 113 of file mg_tomo_rec.cpp.</para>
    </section><anchor xml:id="_mg__tomo__rec_8h_1a3333f17b9beed63654c0a8e4f12dab83"/>    <section>
    <title>project_tomo_reconstruct_particles()</title>
<indexterm><primary>project_tomo_reconstruct_particles</primary><secondary>mg_tomo_rec.h</secondary></indexterm>
<indexterm><primary>mg_tomo_rec.h</primary><secondary>project_tomo_reconstruct_particles</secondary></indexterm>
<para><computeroutput>long project_tomo_reconstruct_particles (<link linkend="_struct_bproject">Bproject</link> * project, double resolution, int interp_type, int pad_factor, int ctf_action, double wiener, <link linkend="_struct_bsymmetry">Bsymmetry</link> * sym, <link linkend="_class_bstring">Bstring</link> &amp; partbase, <link linkend="_class_bstring">Bstring</link> &amp; partpath, <link linkend="_class_bstring">Bstring</link> &amp; partext)</computeroutput></para><para>

<para>Reconstructs particles from a 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>micrograph project. </para>
</entry>
                            </row>
                            <row>
                                <entry>resolution</entry>
                                <entry>
<para>high resolution limit for reconstruction. </para>
</entry>
                            </row>
                            <row>
                                <entry>interp_type</entry>
                                <entry>
<para>interpolation type. </para>
</entry>
                            </row>
                            <row>
                                <entry>pad_factor</entry>
                                <entry>
<para>factor that determines image padding. </para>
</entry>
                            </row>
                            <row>
                                <entry>ctf_action</entry>
                                <entry>
<para>flag to apply CTF to projections. </para>
</entry>
                            </row>
                            <row>
                                <entry>wiener</entry>
                                <entry>
<para>Wiener factor. </para>
</entry>
                            </row>
                            <row>
                                <entry>*sym</entry>
                                <entry>
<para>point group symmetry. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;partbase</entry>
                                <entry>
<para>particle base name for new particle reconstructions. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;partpath</entry>
                                <entry>
<para>directory for new particle reconstructions. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;partext</entry>
                                <entry>
<para>extension of new reconstructions. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of particles. <literallayout><computeroutput>Requires the particles to be defined in all micrographs.
The partbase, partpath and partext arguments can be left empty to
use defaults.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 604 of file mg_tomo_rec.cpp.</para>
</section>
</section>
</section>
