QXRD  0.11.16
qxrdpolartransform.cpp
Go to the documentation of this file.
1 #include "qxrdpolartransform.h"
2 #include "qxrdexperiment.h"
3 #include "qxrdintegratorcache.h"
4 #include "qxrddataprocessor.h"
5 #include "qcepdatasetmodel-ptr.h"
6 #include "qcepdatasetmodel.h"
7 #include "qcepimagedata.h"
8 
10  QcepObject("polarTransform", NULL),
11  m_Destination(saver, this, "destination", "Polar/image", "Destination for polar transform"),
12  m_OutputType(saver, this, "outputType", 3, "Output type 0=none, 1=data, 2=radial plot, 3=polar plot"),
13  m_Oversample(saver, this, "oversample", 1, "Oversample factor"),
14  m_EnableGeometricCorrections(saver, this, "enableGeometricCorrections", false, "Enable Geometric Corrections (tilt and distance) in Integration"),
15  m_EnablePolarizationCorrections(saver, this, "enablePolarizationCorrections", false, "Enable Polarization Corrections in Integration"),
16  m_Polarization(saver, this, "polarization", 1.0, "Beam Polarization Factor"),
17  m_PolarUnits(saver, this, "polarUnits", QxrdIntegrator::PolarIntegrateChi, "Polar Integration Type (0=Angle)"),
18  m_PolarStep(saver, this, "polarStep", 0.5, "Polar Integration Step Size"),
19  m_PolarNSteps(saver, this, "polarNSteps", 0, "Polar Integration Number of Steps"),
20  m_PolarStart(saver, this, "polarStart", 0, "Polar Integration Start"),
21  m_PolarEnd(saver, this, "polarEnd", 360, "Polar Integration End"),
22  m_RadialUnits(saver, this, "radialUnits", QxrdIntegrator::RadialIntegrateTTH, "Radial Units for Integration (0 = TTH, 1 = Q, 2 = R)"),
23  m_RadialStep(saver, this, "radialStep", 0.001, "Radial Integration Step Size"),
24  m_RadialNSteps(saver, this, "radialNSteps", 0, "Radial Integration Number of Steps"),
25  m_RadialStart(saver, this, "radialStart", 0, "Radial Integration Start"),
26  m_RadialEnd(saver, this, "radialEnd", 100000, "Radial Integration End"),
27  m_Saver(saver),
28  m_Experiment(exp)
29 {
30 }
31 
33 {
34 }
35 
37 {
39 
41 
42  if (expt) {
43  res = expt->integrator();
44  }
45 
46  return res;
47 }
48 
50 {
52 
53  if (expt) {
54  QxrdDataProcessorPtr proc(expt->dataProcessor());
55  QxrdCenterFinderPtr cf(expt->centerFinder());
56  QxrdIntegratorPtr integ(expt->integrator());
57 
58  if (proc && cf) {
59  QcepDoubleImageDataPtr img = proc->data();
60  QcepMaskDataPtr mask = proc->mask();
61 
64  expt, integ, sharedFromThis(), cf));
65 
66  QcepDatasetModelPtr ds = expt->dataset();
67 
68  QcepDoubleImageDataPtr res = ds->image(get_Destination());
69 
70  if (res == NULL) {
71  res = ds->newImage(get_Destination());
72  }
73 
74  m_IntegratorCache->performIntegration(res, img, mask, 0);
75  }
76  }
77 }
QSharedPointer< QxrdExperiment > QxrdExperimentPtr
QSharedPointer< QxrdCenterFinder > QxrdCenterFinderPtr
QSharedPointer< QxrdIntegratorCache > QxrdIntegratorCachePtr
QcepSettingsSaverWPtr m_Saver
QSharedPointer< QxrdDataProcessor > QxrdDataProcessorPtr
QWeakPointer< QxrdExperiment > QxrdExperimentWPtr
QSharedPointer< QxrdIntegrator > QxrdIntegratorPtr
QxrdExperimentWPtr m_Experiment
QWeakPointer< QxrdIntegrator > QxrdIntegratorWPtr
QxrdIntegratorWPtr integrator() const
QxrdIntegratorCachePtr m_IntegratorCache
QSharedPointer< QcepMaskData > QcepMaskDataPtr
QxrdPolarTransform(QcepSettingsSaverWPtr saver, QxrdExperimentWPtr exp)
QSharedPointer< QcepDatasetModel > QcepDatasetModelPtr
QWeakPointer< QcepSettingsSaver > QcepSettingsSaverWPtr
QSharedPointer< QcepDoubleImageData > QcepDoubleImageDataPtr