cctw  0.2.1
cctwtransformer.h
Go to the documentation of this file.
1 #ifndef CCTWTRANSFORMER_H
2 #define CCTWTRANSFORMER_H
3 
4 #include "cctwobject.h"
5 #include "cctwchunkeddata.h"
7 #include <QUrl>
8 
9 template <class T>
11 
12 class CctwApplication;
13 
15 {
16  Q_OBJECT
17 public:
18  CctwTransformer(CctwApplication *application,
19  CctwChunkedData *input, // The input data
20  CctwChunkedData *output, // The output data
21  CctwTransformInterface *xform, // The transform
22 // int osx, int osy, int osz, // Oversampling factors
23  QString name,
24  QObject *parent);
25 
26  virtual ~CctwTransformer();
27 
28 public slots:
29  void transform();
30  void simpleTransform();
31  void checkTransform();
32 
33  void saveDependencies(QString path);
34  void loadDependencies(QString path);
35 
36  QcepIntList dependencies(int n);
37  QList<CctwIntVector3D> dependencies(int cx, int cy, int cz);
38 
39  void runTransformChunkNumber(int n);
40  void transformChunkNumber(int chunkId);
41  void transformChunkData(int chunkId,
42  CctwDataChunk *inputChunk,
43  QMap<int, CctwDataChunk*> &outputChunks);
44 
45  void clearDependencies(int use);
46  void addDependency(int f, int t);
47 
48 #ifdef WANT_ANALYSIS_COMMANDS
49  void inputProject(QString path, int axes);
50  void outputProject(QString path, int axes);
51 #endif
52 
53 public:
54  virtual void writeSettings(QSettings *set, QString section);
55  virtual void readSettings(QSettings *set, QString section);
56 
57 private:
59 
60 #ifdef WANT_ANALYSIS_COMMANDS
61  void projectDatasetChunk(CctwChunkedData *data, int chunk, int axes);
62  void projectDataset(QString path, CctwChunkedData *data, int axes);
63 #endif
64 
65  bool parseSubset(CctwChunkedData *data = NULL);
66 
67 private:
72 
73  QMutex m_LockX;
74  QMutex m_LockY;
75  QMutex m_LockZ;
76 
83 
84  double m_MinData;
85  double m_MaxData;
86  double m_MinWeight;
87  double m_MaxWeight;
88 
91 
92 public:
93  Q_PROPERTY(double wallTime READ get_WallTime WRITE set_WallTime STORED false)
94  QCEP_DOUBLE_PROPERTY(WallTime)
95 
96  Q_PROPERTY(int blocksLimit READ get_BlocksLimit WRITE set_BlocksLimit)
97  QCEP_INTEGER_PROPERTY(BlocksLimit)
98 
99  Q_PROPERTY(int transformOptions READ get_TransformOptions WRITE set_TransformOptions)
100  QCEP_INTEGER_PROPERTY(TransformOptions)
101 
102  Q_PROPERTY(int oversampleX READ get_OversampleX WRITE set_OversampleX)
103  QCEP_INTEGER_PROPERTY(OversampleX)
104 
105  Q_PROPERTY(int oversampleY READ get_OversampleY WRITE set_OversampleY)
106  QCEP_INTEGER_PROPERTY(OversampleY)
107 
108  Q_PROPERTY(int oversampleZ READ get_OversampleZ WRITE set_OversampleZ)
109  QCEP_INTEGER_PROPERTY(OversampleZ)
110 
111  Q_PROPERTY(bool projectX READ get_ProjectX WRITE set_ProjectX)
112  QCEP_BOOLEAN_PROPERTY(ProjectX)
113 
114  Q_PROPERTY(bool projectY READ get_ProjectY WRITE set_ProjectY)
115  QCEP_BOOLEAN_PROPERTY(ProjectY)
116 
117  Q_PROPERTY(bool projectZ READ get_ProjectZ WRITE set_ProjectZ)
118  QCEP_BOOLEAN_PROPERTY(ProjectZ)
119 
120  Q_PROPERTY(QString projectDestination READ get_ProjectDestination WRITE set_ProjectDestination)
121  QCEP_STRING_PROPERTY(ProjectDestination)
122 
123  Q_PROPERTY(int normalization READ get_Normalization WRITE set_Normalization)
124  QCEP_INTEGER_PROPERTY(Normalization)
125 
126  Q_PROPERTY(int compression READ get_Compression WRITE set_Compression)
127  QCEP_INTEGER_PROPERTY(Compression)
128 
129  Q_PROPERTY(QString subset READ get_Subset WRITE set_Subset STORED false)
130  QCEP_STRING_PROPERTY(Subset)
131 
132  Q_PROPERTY(int useDependencies READ get_UseDependencies WRITE set_UseDependencies STORED false)
133  QCEP_INTEGER_PROPERTY(UseDependencies)
134 
135  Q_PROPERTY(int skipped READ get_Skipped WRITE set_Skipped STORED false)
136  QCEP_INTEGER_PROPERTY(Skipped)
137 };
138 
139 #endif // CCTWTRANSFORMER_H
QString projectDestination
QString name
Definition: cctwobject.h:32
void saveDependencies(QString path)
QcepImageData< double > * m_WeightZ
CctwTransformer(CctwApplication *application, CctwChunkedData *input, CctwChunkedData *output, CctwTransformInterface *xform, QString name, QObject *parent)
virtual void writeSettings(QSettings *set, QString section)
CctwIntVector3D m_SubsetStart
void runTransformChunkNumber(int n)
void markInputChunkNeeded(CctwIntVector3D idx)
virtual void readSettings(QSettings *set, QString section)
QcepImageData< double > * m_ImageY
bool parseSubset(CctwChunkedData *data=NULL)
QcepIntList dependencies(int n)
QcepImageData< double > * m_WeightX
CctwIntVector3D m_SubsetEnd
void transformChunkData(int chunkId, CctwDataChunk *inputChunk, QMap< int, CctwDataChunk * > &outputChunks)
void transformChunkNumber(int chunkId)
void addDependency(int f, int t)
CctwApplication * m_Application
QcepImageData< double > * m_WeightY
QcepImageData< double > * m_ImageZ
void loadDependencies(QString path)
CctwTransformInterface * m_Transform
virtual ~CctwTransformer()
CctwChunkedData * m_OutputData
QcepImageData< double > * m_ImageX
void clearDependencies(int use)
CctwChunkedData * m_InputData