libatomprobe
Library for Atom Probe Tomography (APT) computation
readpos.h
Go to the documentation of this file.
1 /* readpos.h: Standalone c-only example program for reading Atom Probe "POS" files
2  * Requires a C99 compiler, notably *NOT* the free MS Visual Studio compiler.
3  * Copyright (C) 2015 Daniel Haley
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 #ifndef READPOS_H
19 #define READPOS_H
20 
21 //Read a pos file into its xyz and mass/charge components.
22 //input : filename.
23 // output: x,y,z,m data and number of points.
24 // if no error, zero is returned. Otherwise:
25 // Err:
26 // 1 - File could not be opened
27 // 2 - filesize could not be determined
28 // 3 - size was not a multiple of 16 - cannot be posfile
29 // 4 - Unable to allocate memory
30 // 5 - cannot read file contents
31 
32 //If no error, and nPts is nonzero, then you must free() the returned data
33 unsigned int readPos(const char *filename,
34  float **x, float **y, float **z, float **m, unsigned int *nPts);
35 
36 #endif
unsigned int readPos(const char *filename, float **x, float **y, float **z, float **m, unsigned int *nPts)