MeVisLab Toolbox Reference
mlMultiFileVolumeListWaveformOutput.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code
3 //----------------------------------------------------------------------------------
6 
12 
13 //----------------------------------------------------------------------------------
14 #pragma once
15 
16 // Base class of output module.
18 
19 // ML includes
20 #include <mlXMarkerList.h>
21 #include <mlDiagramData.h>
22 #include <mlCurveData.h>
23 
24 // DICOM
25 #include <DCMTree_Tree.h>
26 
27 class QAudioOutput;
28 class QBuffer;
29 
30 ML_START_NAMESPACE
31 
32 // Forward to internally used classes.
33 class MultiFileVolume;
34 
35 //----------------------------------------------------------------------------------
38 //----------------------------------------------------------------------------------
40 {
41 public:
42 
45  Overlap = 0,
46  Stack = 1,
47 
48  NumStackingModes
49  };
50 
52  static const char *const stackingModeStrings[NumStackingModes];
53 
55  MultiFileVolumeListWaveformOutput(int numInputs=0, int numOutputs=0);
56 
59 
60 protected:
61 
63  void activateAttachments() override;
64 
66  void handleNotification(Field *field) override;
67 
70  void _updateVolumeInformation(MultiFileVolume *currVol) override;
71 
72 private:
73 
76 
78  void _initializeFieldsAndMembers();
79 
81  void _resetLoadedMembers();
82 
84  void _playAudio();
86 
87 
89  StringField *_infoFld;
90 
91 
94 
96  EnumField *_stackingModeFld;
97 
99  DoubleField *_curveTranslationYScaleFld;
101 
102 
105 
107  NotifyField *_playFld;
108 
110  NotifyField *_suspendFld;
111 
113  NotifyField *_resumeFld;
114 
116  NotifyField *_stopFld;
117 
119  BoolField *_isAudioDICOMFld;
121 
122 
124 
126  BaseField *_outXMarkerListFld;
127 
129  BaseField *_outCurveListFld;
131 
132 
135 
137  XMarkerList _outXMarkerList;
138 
140  CurveList _outCurveList;
142 
143 
145 
147  QAudioOutput *_audioOutput;
148 
150  QBuffer *_audioInBuffer;
151 
153  DCMTree::Const_TagPtr _audioStreamDataTag;
154 
156  size_t _audioDataSampleSize;
157 
159  MLdouble _audioSamplingFrequency;
160 
162  size_t _audioSamplesPerStream;
163 
165  bool _audioDataSamplesAreSigned;
166 
168  size_t _audioNumChannels;
170 
173  NotifyField *_updateWaveformOutputInformationDoneFld;
174 
177 };
178 
179 ML_END_NAMESPACE
#define MLDIRECTDICOMIMPORTOUTPUTS_EXPORT
DLL export macro definition.
Field to encapsulate a pointer to an ML base object.
Definition: mlFields.h:1187
Field to encapsulate a boolean value.
Definition: mlFields.h:62
Base object class CurveList with a list of CurveData object pointers.
Definition: mlCurveList.h:46
Field to encapsulate a double value.
Definition: mlFields.h:806
Field to encapsulate an enumerated value.
Definition: mlFields.h:363
Base class for all fields used in the ML.
Definition: mlField.h:73
The ML module base class MultiFileVolumeListBaseOutput used to implement further output modules for t...
The ML module class MultiFileVolumeListWaveformOutput providing an additional output for waveform DIC...
StackingModes
Defines in which region a curve is drawn.
void handleNotification(Field *field) override
Handles changes of fields.
void activateAttachments() override
Called after changes of fields without handleNotification calls.
MultiFileVolumeListWaveformOutput(int numInputs=0, int numOutputs=0)
Constructor.
void _updateVolumeInformation(MultiFileVolume *currVol) override
This is called by the super class if the volume has changed.
~MultiFileVolumeListWaveformOutput() override
Destructor.
Management class used by DirectDicomImport to create, represent and describe volumes composed of mult...
Field without value for notifications.
Definition: mlFields.h:1049
Field to encapsulate a string value.
Definition: mlFields.h:1000
Base object class XMarkerList (derived from BaseListTemplate) specialized for XMarker items.
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
Provides the base class for an additional output for a MultiFileVolumeList module.
double MLdouble
Definition: mlTypeDefs.h:223
boost::shared_ptr< const Tag > Const_TagPtr
Definition: DCMTree_Lib.h:63