This file is indexed.

/usr/include/relion-1.4/src/particle_sorter.h is in librelion-dev-common 1.4+dfsg-3ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/***************************************************************************
 *
 * Author: "Sjors H.W. Scheres"
 * MRC Laboratory of Molecular Biology
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * This complete copyright notice must be included in any revised version of the
 * source code. Additional authorship citations may be added, but existing
 * author citations must be preserved.
 ***************************************************************************/

#ifndef PARTICLE_SORTER_H_
#define PARTICLE_SORTER_H_

#include "src/image.h"
#include "src/multidim_array.h"
#include "src/metadata_table.h"
#include "src/projector.h"
#include "src/ctf.h"
#include <src/fftw.h>
#include <src/time.h>

#define FEATURE_DF_AVG      0
#define FEATURE_DF_SIG      1
#define FEATURE_DF_SKW      2
#define FEATURE_DF_KRT      3
#define FEATURE_DF_QUADSIG  4
#define FEATURE_DF_ROTFOURCORR 5
#define NR_FEATURES 6

#define WIDTH_FMASK_EDGEB 2


class ParticleSorter
{
public:

	// I/O Parser
	IOParser parser;

	// Verbosity
	int verb;

	// Input & Output rootname
	FileName fn_in, fn_ref, fn_out;

	// Input metadata
	MetaDataTable MDin;

	// Pixel size (for low-pass filter and particle diameter)
	DOUBLE angpix;

	// Particle diameter (in Angstroms)
	DOUBLE particle_diameter;
	int particle_radius2;

	// Low pass filetr cutoff (in Angstroms)
	DOUBLE lowpass;

	// Original size of the reference images
	int particle_size;

	// Dimension of the filtered image
	int current_size;

	// Minimum Z-value to count in the sorting
	DOUBLE min_z;

	// Vector with all original reference images
	std::vector<MultidimArray<DOUBLE> > Mrefs;

	// FTs of the reference images for feature calculation
	std::vector<Projector > PPref;

	// Feature values for all input images
	MultidimArray<DOUBLE> features;

	// Is density in micrograph inverted wrt templates?
	bool do_invert;

	// Correct the references for CTF effects?
	bool do_ctf;

	// Keep the CTFs unchanged until the first peak?
	bool intact_ctf_first_peak;

public:
	// Read command line arguments
	void read(int argc, char **argv);

	// Print usage instructions
	void usage();

	// General function to decide what to do
	void run();

	// Initialise some general stuff after reading
	void initialise();

	void calculateFeaturesOneParticle(long int ipart);

protected:

	void normaliseFeatures();

	// Write out (for now in libsvm format)
	void writeFeatures();

	void calculateStatsOneImage(MultidimArray<DOUBLE> &img,
			DOUBLE &mean, DOUBLE &stddev, DOUBLE &skew, DOUBLE &kurt, DOUBLE &quadrant_stddev);

	DOUBLE rotationalSymmetryFourierTransform(MultidimArray<Complex > &Fimg);

};


#endif /* PARTICLE_SORTER_H_ */