STIR  6.2.0
Functions | Variables
scan_sgl_file.cxx File Reference

Utility program scans the singles file looking for anomalous values. More...

#include "stir/data/SinglesRatesFromSglFile.h"
#include "stir/error.h"
#include <string>
#include <fstream>
#include <vector>

Functions

int calcMedian (const ecat::ecat7::SinglesRatesFromSglFile &singles_rates, int singles_bin_index, int start_slice, int end_slice)
 
int getMedian (const ecat::ecat7::SinglesRatesFromSglFile &singles_rates, int singles_bin_index, int start_slice)
 
bool compareAdjacentBin (int value, int slice, int singles_bin_index, const ecat::ecat7::SinglesRatesFromSglFile &singles_rates, int transaxial_offset)
 
bool checkAdjacentBins (int value, int slice, int singles_bin_index, const ecat::ecat7::SinglesRatesFromSglFile &singles_rates)
 
bool checkValue (int value, int slice, int singles_bin_index, const ecat::ecat7::SinglesRatesFromSglFile &singles_rates, int previous_value)
 
bool correctSinglesValue (int value, int slice, int singles_bin_index, ecat::ecat7::SinglesRatesFromSglFile &singles_rates)
 
bool correctAllValues (ecat::ecat7::SinglesRatesFromSglFile &singles_rates, std::ostream &output)
 
int main (int argc, char **argv)
 

Variables

const int MAX_VALID_VALUE = 1000000
 
const float MIN_PREVIOUS_FRACTION = 0.225
 
const float MAX_PREVIOUS_MULTIPLE = 3.0
 
const float MIN_MEDIAN_FRACTION = 0.2
 
const float MAX_MEDIAN_MULTIPLE = 3.5
 
const float ADJACENT_TOLERANCE = 0.75
 
const int MEDIAN_SIZE = 7
 

Detailed Description

Utility program scans the singles file looking for anomalous values.

Author
Kris Thielemans
Tim Borgeaud