1 #ifndef CCTWCHUNKEDDATA_H
2 #define CCTWCHUNKEDDATA_H
8 #include "qcepproperty.h"
11 #define NEXUS_ENABLED 0
12 #if NEXUS_ENABLED == 1
13 #include <nexus/NeXusFile.hpp>
33 #define CCTW_H5T_INTERNAL_TYPE H5T_NATIVE_FLOAT
58 virtual void setDims(QString desc);
137 #if NEXUS_ENABLED == 1
138 NeXus::File *m_NeXusFile;
147 Q_PROPERTY(QString
dataFileName READ get_DataFileName WRITE set_DataFileName)
148 QCEP_STRING_PROPERTY(DataFileName)
150 Q_PROPERTY(QString
dataSetName READ get_DataSetName WRITE set_DataSetName)
151 QCEP_STRING_PROPERTY(DataSetName)
154 QCEP_STRING_PROPERTY(MaskDataFileName)
156 Q_PROPERTY(QString
maskDataSetName READ get_MaskDataSetName WRITE set_MaskDataSetName)
157 QCEP_STRING_PROPERTY(MaskDataSetName)
159 Q_PROPERTY(QcepIntVector
mask READ get_Mask WRITE set_Mask STORED false)
160 QCEP_INTEGER_VECTOR_PROPERTY(Mask)
163 QCEP_STRING_PROPERTY(AnglesDataFileName)
166 QCEP_STRING_PROPERTY(AnglesDataSetName)
168 Q_PROPERTY(QcepDoubleVector
angles READ get_Angles WRITE set_Angles STORED false)
169 QCEP_DOUBLE_VECTOR_PROPERTY(Angles)
172 QCEP_STRING_PROPERTY(WeightsDataFileName)
175 QCEP_STRING_PROPERTY(WeightsDataSetName)
177 Q_PROPERTY(QcepDoubleVector
weights READ get_Weights WRITE set_Weights STORED false)
178 QCEP_DOUBLE_VECTOR_PROPERTY(Weights)
189 Q_PROPERTY(
int compression READ get_Compression WRITE set_Compression)
190 QCEP_INTEGER_PROPERTY(Compression)
192 Q_PROPERTY(
int normalization READ get_Normalization WRITE set_Normalization)
193 QCEP_INTEGER_PROPERTY(Normalization)
198 Q_PROPERTY(
int chunksRead READ get_ChunksRead WRITE set_ChunksRead STORED false)
199 QCEP_INTEGER_PROPERTY(ChunksRead)
201 Q_PROPERTY(
int chunksWritten READ get_ChunksWritten WRITE set_ChunksWritten STORED false)
202 QCEP_INTEGER_PROPERTY(ChunksWritten)
204 Q_PROPERTY(
int chunksHeld READ get_ChunksHeld WRITE set_ChunksHeld STORED false)
205 QCEP_INTEGER_PROPERTY(ChunksHeld)
207 Q_PROPERTY(
int chunksHeldMax READ get_ChunksHeldMax WRITE set_ChunksHeldMax STORED false)
208 QCEP_INTEGER_PROPERTY(ChunksHeldMax)
236 #endif // CCTWCHUNKEDDATA_H
void incChunksHeld(int n)
bool beginTransform(bool isInput, int transformOptions)
void onMaskFileNameChanged()
virtual void setMaskDataset(QString desc)
virtual void setWeightsSource(QString desc)
void onDataFileNameChanged()
bool openInputNeXusFile()
CctwIntVector3D chunkIndexFromNumber(int n)
virtual void setAnglesSource(QString desc)
CctwIntVector3D chunkStart(int n)
void releaseChunkData(int n)
virtual void setWeightsDataset(QString desc)
CctwDataChunk * chunk(int n)
bool containsChunk(int ix, int iy, int iz)
void setMaskDimensions(int mx, int my)
void addDependency(int f, int t)
CctwIntVector3D m_DimensionsCache
void setDimensions(CctwIntVector3D dim)
virtual void setChunks(QString desc)
bool openInputFile(bool quietly=false)
CctwIntVector3D chunkSize() const
virtual void setDataset(QString desc)
void setWeightsDimensions(int n)
bool openMaskFile(bool quietly=false)
void mergeChunk(CctwDataChunk *chunk)
void setAnglesDimensions(int n)
void chunkSizeChanged(CctwIntVector3D sz)
#define CCTW_INTVECTOR3D_PROPERTY(propname)
virtual void setDataSource(QString desc)
CctwIntVector3D m_ChunkCountCache
virtual void setDims(QString desc)
void normalizeChunk(int n)
CctwIntVector3D dimensions() const
int chunkContaining(CctwIntVector3D pixelCoord)
CctwChunkedData(CctwApplication *application, CctwIntVector3D dim, CctwIntVector3D chunkSize, bool isInput, QString name, QObject *parent)
int allocatedChunkCount()
void setChunkSize(CctwIntVector3D cksz)
QString anglesDataFileName
void chunkCountChanged(CctwIntVector3D ct)
CctwIntVector3D chunkCount() const
void closeInputNeXusFile()
void incChunksRead(int n)
bool openWeightsFile(bool quietly=false)
QVector< CctwDataChunk * > m_DataChunks
bool containsPixel(CctwIntVector3D pixelCoord)
QString anglesDataSetName
QString weightsDataFileName
hid_t m_WeightsDataspaceId
bool openAnglesFile(bool quietly=false)
hid_t m_AnglesDataspaceId
void clearMergeCounters()
CctwIntVector3D hdfChunkSize
CctwIntVector3D m_ChunkSizeCache
void incChunksWritten(int n)
void setWeight(int n, double v)
void dimensionsChanged(CctwIntVector3D dm)
static QMutex m_FileAccessMutex
void setAngle(int n, double v)
QString weightsDataSetName
CctwApplication * m_Application
virtual void setMaskSource(QString desc)
int chunkNumberFromIndex(CctwIntVector3D chunkIdx)
virtual void setAnglesDataset(QString desc)
CctwDataChunk * readChunk(int n)