<?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="_rw_c_c_p4_8cpp">
<title>/Users/bernard/b20/bsoft/src/rwimg/rwCCP4.cpp File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/src/rwimg/rwCCP4.cpp</primary></indexterm>
<para>

<para>Functions for reading and writing CCP4 files. </para>
 
</para>
<programlisting>#include &quot;rwCCP4.h&quot;
#include &quot;UnitCell.h&quot;
#include &quot;file_util.h&quot;
#include &quot;utilities.h&quot;
#include &quot;rwsymop.h&quot;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para>int <link linkend="_rw_c_c_p4_8cpp_1a237549111e089620e95dfc900c5581b8">set_CCP4_machine_stamp</link> (char *machine_stamp)</para>

<para>Setting a CCP4 style machine stamp. </para>
</listitem>
            <listitem><para>int <link linkend="_rw_c_c_p4_8cpp_1a0998048310d44c746881f651ae74b894">readCCP4</link> (<link linkend="_class_bimage">Bimage</link> *p, int readdata)</para>

<para>Reading a CCP4 map image file format. </para>
</listitem>
            <listitem><para>int <link linkend="_rw_c_c_p4_8cpp_1aa2af506bd981e7932cdb260fefba51f9">writeCCP4</link> (<link linkend="_class_bimage">Bimage</link> *p)</para>

<para>Writing a CCP4 map image file format. </para>
</listitem>
        </itemizedlist>
</simplesect>
<simplesect>
    <title>Variables    </title>
        <itemizedlist>
            <listitem><para>int <link linkend="_rw_c_c_p4_8cpp_1a0b2caeb4b6f130be43e5a2f0267dd453">verbose</link></para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Functions for reading and writing CCP4 files. </para>

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

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

<para>Created: 19990410 </para>

<para>Modified: 20120730 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_rw_c_c_p4_8cpp_1a0998048310d44c746881f651ae74b894"/>    <section>
    <title>readCCP4()</title>
<indexterm><primary>readCCP4</primary><secondary>rwCCP4.cpp</secondary></indexterm>
<indexterm><primary>rwCCP4.cpp</primary><secondary>readCCP4</secondary></indexterm>
<para><computeroutput>int readCCP4 (<link linkend="_class_bimage">Bimage</link> * p, int readdata)</computeroutput></para><para>

<para>Reading a CCP4 map image file format. </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>the image structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>readdata</entry>
                                <entry>
<para>flag to activate reading of image data. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int error code (&lt;0 means failure). A 3D image format used in X-ray crystallography. Header size: 1024 bytes followed by the symmetry operator table which is composed of 80 character lines, each line for a symmetry operator. File format extensions: .map, .ccp, .ccp4 The identifier is a 4-byte machine stamp: 1 Big-endian IEEE 17 17 00 00 2 VAX 34 65 00 00 3 Cray - 4 Little-endian IEEE 68 65 00 00 5 Convex 85 17 00 00 6 Fijitsu VP - (Note: not always implemented - so unreliable) Byte order determination: Data type and third dimension values must be less than 256*256. Data types: 0 = signed char, 1 = short, 2 = float, 3 = complex short, 4 = complex float. <link linkend="_class_transform">Transform</link> type: Centered hermitian The x-dimension contains the x-size of the full transform </para>
</formalpara>
</para>
<para>
Definition at line 81 of file rwCCP4.cpp.</para>
    </section><anchor xml:id="_rw_c_c_p4_8cpp_1a237549111e089620e95dfc900c5581b8"/>    <section>
    <title>set_CCP4_machine_stamp()</title>
<indexterm><primary>set_CCP4_machine_stamp</primary><secondary>rwCCP4.cpp</secondary></indexterm>
<indexterm><primary>rwCCP4.cpp</primary><secondary>set_CCP4_machine_stamp</secondary></indexterm>
<para><computeroutput>int set_CCP4_machine_stamp (char * machine_stamp)</computeroutput></para><para>

<para>Setting a CCP4 style machine stamp. </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>*machine_stamp</entry>
                                <entry>
<para>machine stamp string. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int error code (&lt;0 means failure). The 4-byte machine stamp: 1 Big-endian IEEE 17 17 00 00 2 VAX 34 65 00 00 3 Cray - 4 Little-endian IEEE 68 65 00 00 5 Convex 85 17 00 00 6 Fijitsu VP - (Note: not always implemented - so unreliable) </para>
</formalpara>
</para>
<para>
Definition at line 34 of file rwCCP4.cpp.</para>
    </section><anchor xml:id="_rw_c_c_p4_8cpp_1aa2af506bd981e7932cdb260fefba51f9"/>    <section>
    <title>writeCCP4()</title>
<indexterm><primary>writeCCP4</primary><secondary>rwCCP4.cpp</secondary></indexterm>
<indexterm><primary>rwCCP4.cpp</primary><secondary>writeCCP4</secondary></indexterm>
<para><computeroutput>int writeCCP4 (<link linkend="_class_bimage">Bimage</link> * p)</computeroutput></para><para>

<para>Writing a CCP4 map image file format. </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>the image structure. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int error code (&lt;0 means failure). A 3D image format used in X-ray crystallography. </para>
</formalpara>
</para>
<para>
Definition at line 207 of file rwCCP4.cpp.</para>
</section>
</section>
<section>
<title>Variable Documentation</title>
<anchor xml:id="_rw_c_c_p4_8cpp_1a0b2caeb4b6f130be43e5a2f0267dd453"/>    <section>
    <title>verbose</title>
<indexterm><primary>verbose</primary><secondary>rwCCP4.cpp</secondary></indexterm>
<indexterm><primary>rwCCP4.cpp</primary><secondary>verbose</secondary></indexterm>
<para><computeroutput>int verbose</computeroutput></para></section>
</section>
</section>
