ATV Modulator: transmit fixed image (1)

pull/27/head
f4exb 2017-03-08 23:48:14 +01:00
rodzic 4056fd0f5c
commit f20d522aa7
3 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -250,6 +250,7 @@ bool ATVMod::handleMessage(const Message& cmd)
else if (MsgConfigureImageFileName::match(cmd)) else if (MsgConfigureImageFileName::match(cmd))
{ {
MsgConfigureImageFileName& conf = (MsgConfigureImageFileName&) cmd; MsgConfigureImageFileName& conf = (MsgConfigureImageFileName&) cmd;
openImage(conf.getFileName());
// m_fileName = conf.getFileName(); // TODO // m_fileName = conf.getFileName(); // TODO
// openFileStream(); // openFileStream();
return true; return true;
@ -366,7 +367,7 @@ void ATVMod::applyStandard()
} }
} }
void ATVMod::openImage(QString& fileName) void ATVMod::openImage(const QString& fileName)
{ {
cv::Mat tmpImage = cv::imread(qPrintable(fileName), CV_LOAD_IMAGE_GRAYSCALE); cv::Mat tmpImage = cv::imread(qPrintable(fileName), CV_LOAD_IMAGE_GRAYSCALE);
m_imageOK = tmpImage.data != 0; m_imageOK = tmpImage.data != 0;

Wyświetl plik

@ -227,7 +227,7 @@ private:
void calculateLevel(Real& sample); void calculateLevel(Real& sample);
void modulateSample(); void modulateSample();
void applyStandard(); void applyStandard();
void openImage(QString& fileName); void openImage(const QString& fileName);
inline void pullImageLine(Real& sample) inline void pullImageLine(Real& sample)
{ {

Wyświetl plik

@ -385,6 +385,11 @@
<string>V Grad</string> <string>V Grad</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>Image</string>
</property>
</item>
</widget> </widget>
</item> </item>
<item> <item>