1 #ifndef QXRDDATAPROCESSORBASE_H
2 #define QXRDDATAPROCESSORBASE_H
9 #include <QWaitCondition>
52 Q_PROPERTY(QString
fileName READ get_FileName WRITE set_FileName STORED
false)
55 Q_PROPERTY(QString
dataPath READ get_DataPath WRITE set_DataPath)
58 Q_PROPERTY(QString
darkImagePath READ get_DarkImagePath WRITE set_DarkImagePath)
61 Q_PROPERTY(QString
badPixelsPath READ get_BadPixelsPath WRITE set_BadPixelsPath)
64 Q_PROPERTY(QString
gainMapPath READ get_GainMapPath WRITE set_GainMapPath)
67 Q_PROPERTY(QString
maskPath READ get_MaskPath WRITE set_MaskPath)
70 Q_PROPERTY(QString
scriptPath READ get_ScriptPath WRITE set_ScriptPath)
76 Q_PROPERTY(
bool saveRawImages READ get_SaveRawImages WRITE set_SaveRawImages)
79 Q_PROPERTY(
bool saveDarkImages READ get_SaveDarkImages WRITE set_SaveDarkImages)
88 Q_PROPERTY(
bool saveSubtracted READ get_SaveSubtracted WRITE set_SaveSubtracted)
91 Q_PROPERTY(
bool saveAsText READ get_SaveAsText WRITE set_SaveAsText)
169 Q_PROPERTY(
double saveAsTextTime READ get_SaveAsTextTime WRITE set_SaveAsTextTime)
184 Q_PROPERTY(
double averagingRatio READ get_AveragingRatio WRITE set_AveragingRatio)
199 Q_PROPERTY(
bool maskSetPixels READ get_MaskSetPixels WRITE set_MaskSetPixels)
205 Q_PROPERTY(
double average READ get_Average WRITE set_Average STORED false)
208 Q_PROPERTY(
double averageDark READ get_AverageDark WRITE set_AverageDark STORED false)
211 Q_PROPERTY(
double averageRaw READ get_AverageRaw WRITE set_AverageRaw STORED false)
220 Q_PROPERTY(
int saverQueueLength READ get_SaverQueueLength WRITE set_SaverQueueLength STORED false)
226 Q_PROPERTY(
int zingerMask READ get_ZingerMask WRITE set_ZingerMask)
232 Q_PROPERTY(
int zingerSize1 READ get_ZingerSize1 WRITE set_ZingerSize1)
235 Q_PROPERTY(
int zingerSize2 READ get_ZingerSize2 WRITE set_ZingerSize2)
251 void printMessage(QString msg, QDateTime ts=QDateTime::currentDateTime())
const;
252 void criticalMessage(QString msg, QDateTime ts=QDateTime::currentDateTime())
const;
253 void statusMessage(QString msg, QDateTime ts=QDateTime::currentDateTime())
const;
278 QStringList
ls()
const;
279 QStringList
ls(QString pattern)
const;
330 void newImage(
int ncols,
int nrows);
331 void exponentialTail(
double cx,
double cy,
double width,
int oversample);
332 void reciprocalTail(
double cx,
double cy,
double strength,
int oversample);
333 void powderRing(
double cx,
double cy,
double radius,
double width,
double strength,
int oversample);
334 void ellipse(
double cx,
double cy,
double a,
double e,
double ang,
double width,
double strength,
int oversample);
387 void readSettings(QSettings *settings, QString section);
QSharedPointer< QxrdExperiment > QxrdExperimentPtr
QxrdPolarTransformPtr polarTransform() const
QSharedPointer< QxrdCenterFinder > QxrdCenterFinderPtr
void multiplyData(double scalar)
void calculateHistogram()
QcepMaskDataPtr mask() const
QxrdMaskStackPtr maskStack()
QcepDoubleImageDataPtr m_BadPixels
void powderRing(double cx, double cy, double radius, double width, double strength, int oversample)
QString experimentDirectory() const
QcepInt32ImageQueue m_AcquiredInt32Images
void orNotMaskStack(int pos)
void newBadPixelsImage(QcepDoubleImageDataPtr image)
void subtractDarkImage(QcepDoubleImageDataPtr image, QcepDoubleImageDataPtr dark)
void showMaskAllStack(int pos)
QcepDoubleImageDataPtr m_GainMap
QxrdPolarNormalizationPtr m_PolarNormalization
void loadData(QString name)
QcepMaskDataPtr m_Overflow
QcepDoubleImageDataPtr darkImage() const
void invertMaskStack(int pos)
#define QCEP_DOUBLE_PROPERTY(propname)
QString rawOutputDirectory() const
QxrdCenterFinderPtr m_CenterFinder
QString saveAsTextSeparator
void newDarkImage(QcepInt16ImageDataPtr image)
void saveOutputScan(QString fileName)
double performGainCorrectionTime
QxrdAcquisitionWPtr m_Acquisition
QcepDoubleImageDataPtr processAcquiredImage(QcepDoubleImageDataPtr processed, QcepDoubleImageDataPtr dimg, QcepDoubleImageDataPtr dark, QcepMaskDataPtr mask, QcepMaskDataPtr overflow, QcepDoubleList v=QcepDoubleList())
void saveNamedImageDataAsText(QString name, QcepDoubleImageDataPtr image, QcepMaskDataPtr overflow, int canOverwrite=NoOverwrite)
QcepDoubleImageDataPtr takeNextFreeImage(int width, int height)
void criticalMessage(QString msg, QDateTime ts=QDateTime::currentDateTime()) const
QString filePathInSubtractedOutputDirectory(QString name) const
QxrdDistortionCorrectionPtr distortionCorrection() const
void appendToOutputScan(double x, double y)
QxrdGenerateTestImageWPtr generateTestImage() const
QcepInt16ImageQueue m_AcquiredInt16Images
bool saveRawInSubdirectory
void xorNotMaskStack(int pos)
QString accumulateIntegratedFileName
void hideMaskAllStack(int pos)
QString filePathInExperimentDirectory(QString name) const
QString accumulateIntegratedDirectory
void saveDark(QString name, int canOverwrite=NoOverwrite)
void newData(QcepDoubleImageDataPtr image, QcepMaskDataPtr overflow)
void newOutputScan(QString title)
void setWindow(QxrdWindowWPtr win)
double saveSubtractedTime
QWeakPointer< QxrdExperiment > QxrdExperimentWPtr
void statusMessage(QString msg, QDateTime ts=QDateTime::currentDateTime()) const
void newImage(int ncols, int nrows)
QSharedPointer< QcepIntegratedData > QcepIntegratedDataPtr
void popMaskStack(int amount=1)
QxrdGenerateTestImagePtr m_GenerateTestImage
int incrementAcquiredCount()
void saveCachedIntensity(QString name)
void updateEstimatedTime(QcepDoubleProperty *prop, int msec)
QxrdDataProcessorBase(QcepSettingsSaverWPtr saver, QxrdExperimentWPtr doc, QxrdAcquisitionWPtr acq, QxrdFileSaverWPtr filesaver)
void saveData(QString name, int canOverwrite=NoOverwrite)
bool saveIntegratedInSeparateFiles
void ellipse(double cx, double cy, double a, double e, double ang, double width, double strength, int oversample)
void readSettings(QSettings *settings, QString section)
void newGainMapImage(QcepDoubleImageDataPtr image)
bool performDarkSubtraction
void writeSettings(QSettings *settings, QString section)
void maskCircle(QRectF pt)
int newMaskHeight() const
QcepDoubleImageDataPtr m_DarkFrame
void maskPolygon(QVector< QPointF > poly)
QcepDoubleImageDataPtr gainMap() const
void createMaskIfNeeded()
int correctionQueueLength
QxrdIntegratorPtr integrator() const
void printMeasuredPolygon(QVector< QPointF > poly)
void updateEstimatedProcessingTime()
#define QCEP_INTEGER_PROPERTY(propname)
void exchangeMaskStack(int pos)
double performBadPixelsTime
QcepDoubleImageDataPtr badPixels() const
bool performGainCorrection
QWeakPointer< QxrdWindow > QxrdWindowWPtr
QSharedPointer< QxrdGenerateTestImage > QxrdGenerateTestImagePtr
QAtomicInt m_AcquiredCount
void saveGainMap(QString name, int canOverwrite=NoOverwrite)
void newIntegrationAvailable(QcepIntegratedDataPtr data)
QString existingOutputDirectory(QString dir, QString subdir) const
int decrementAcquiredCount()
enum QxrdDataProcessorBase::@7 ZingerConstants
bool displayIntegratedData
void showMaskRangeStack(int pos)
void hideMaskRangeStack(int pos)
QcepDoubleImageDataPtr data() const
virtual void integrateSaveAndDisplay()=0
int integrationQueueLength
double displayIntegratedDataTime
int maskStackPosition(int pos)
void loadBadPixels(QString name)
QSharedPointer< QxrdPolarNormalization > QxrdPolarNormalizationPtr
void saveCachedGeometry(QString name)
void measurePolygon(QVector< QPointF > poly)
QWeakPointer< QxrdFileSaver > QxrdFileSaverWPtr
QString filePathInDarkOutputDirectory(QString name) const
QStringList integrateRectangle(int x0, int y0, int x1, int y1)
QString saveDarkSubdirectory
QWeakPointer< QxrdGenerateTestImage > QxrdGenerateTestImageWPtr
QList< double > QcepDoubleList
#define QCEP_STRING_PROPERTY(propname)
QxrdExperimentWPtr m_Experiment
bool saveSubtractedInSubdirectory
QcepIntegratedDataPtr m_OutputScan
void correctBadPixels(QcepDoubleImageDataPtr image)
QcepDoubleImageDataPtr m_Data
void xorMaskStack(int pos)
QSharedPointer< QxrdIntegrator > QxrdIntegratorPtr
bool saveIntegratedInSubdirectory
void performImageCorrections(QcepDoubleImageDataPtr image)
double performIntegrationTime
void summarizeMeasuredPolygon(QVector< QPointF > poly)
QxrdIntegratorPtr m_Integrator
QcepDoubleImageDataPtr processAcquiredDoubleImage(QcepDoubleImageDataPtr processed, QcepDoubleImageDataPtr image, QcepDoubleImageDataPtr dark, QcepMaskDataPtr mask, QcepMaskDataPtr overflow)
virtual void slicePolygon(QVector< QPointF > poly)=0
void writeOutputScan(QcepIntegratedDataPtr d)
#define QCEP_BOOLEAN_PROPERTY(propname)
void pushMaskStack(QcepMaskDataPtr mask=QcepMaskDataPtr())
QxrdPolarTransformPtr m_PolarTransform
QString saveIntegratedPath
void saveNamedMaskData(QString name, QcepMaskDataPtr mask, int canOverwrite=NoOverwrite)
void loadMask(QString name)
void offsetData(double offset)
void setAcquisition(QxrdAcquisitionWPtr acq)
QSharedPointer< QcepDataObject > QcepDataObjectPtr
void shrinkMaskStack(int pos)
bool saveDarkInSubdirectory
QcepDoubleImageDataPtr m_LiveData
QString subtractedOutputDirectory() const
void unsubtractDarkImage(QcepDoubleImageDataPtr image, QcepDoubleImageDataPtr dark)
QxrdPolarNormalizationPtr polarNormalization() const
QWeakPointer< QxrdAcquisition > QxrdAcquisitionWPtr
QSharedPointer< QcepInt32ImageData > QcepInt32ImageDataPtr
QcepDoubleImageDataPtr processAcquiredInt16Image(QcepDoubleImageDataPtr processed, QcepInt16ImageDataPtr image, QcepDoubleImageDataPtr dark, QcepMaskDataPtr mask, QcepMaskDataPtr overflow)
double estimatedProcessingTime
QString accumulateIntegratedName
void growMaskStack(int pos)
void orMaskStack(int pos)
void printMessage(QString msg, QDateTime ts=QDateTime::currentDateTime()) const
QxrdDistortionCorrectionPtr m_DistortionCorrection
QWaitCondition m_ProcessWaiting
void andNotMaskStack(int pos)
QString saveRawSubdirectory
QString darkOutputDirectory() const
QString filePathInDataDirectory(QString name) const
void saveNamedImageData(QString name, QcepDoubleImageDataPtr image, QcepMaskDataPtr overflow, int canOverwrite=NoOverwrite)
QxrdCenterFinderPtr centerFinder() const
void reciprocalTail(double cx, double cy, double strength, int oversample)
double performDarkSubtractionTime
void loadDark(QString name)
void rollMaskStack(int amount)
QxrdExperimentPtr experiment() const
QString saveSubtractedSubdirectory
bool accumulateIntegrated2D
void loadGainMap(QString name)
virtual ~QxrdDataProcessorBase()
QString filePathInIntegratedOutputDirectory(QString name) const
QcepDoubleImageDataPtr processAcquiredInt32Image(QcepDoubleImageDataPtr processed, QcepInt32ImageDataPtr image, QcepDoubleImageDataPtr dark, QcepMaskDataPtr mask, QcepMaskDataPtr overflow)
QSharedPointer< QcepInt16ImageData > QcepInt16ImageDataPtr
void fileWriteTest(int dim, QString path)
QSharedPointer< QcepMaskData > QcepMaskDataPtr
QxrdFileSaverWPtr m_FileSaver
QcepMaskDataPtr overflow() const
QcepSettingsSaverWPtr m_Saver
QcepDoubleImageDataPtr liveData() const
QSharedPointer< QxrdDistortionCorrection > QxrdDistortionCorrectionPtr
QString saveIntegratedSubdirectory
double saveIntegratedDataTime
void saveMask(QString name, int canOverwrite=NoOverwrite)
void exponentialTail(double cx, double cy, double width, int oversample)
QString accumulateIntegratedFormat
QWeakPointer< QcepSettingsSaver > QcepSettingsSaverWPtr
QString dataDirectory() const
QString filePathInRawOutputDirectory(QString name) const
void andMaskStack(int pos)
void saveNamedRawImageData(QString name, QcepInt16ImageDataPtr image, QcepMaskDataPtr overflow, int canOverwrite=NoOverwrite)
void correctImageGains(QcepDoubleImageDataPtr image)
void saveBadPixels(QString name, int canOverwrite=NoOverwrite)
QSharedPointer< QcepDoubleImageData > QcepDoubleImageDataPtr
QString integratedOutputDirectory() const