Skip to content

Commit

Permalink
Merge pull request #468 from tlambert03/camera-tag
Browse files Browse the repository at this point in the history
use keyword for Camera tag added in circular buffer metadata
  • Loading branch information
marktsuchida authored Jun 20, 2024
2 parents 446fab8 + 9a4b73d commit 503321c
Show file tree
Hide file tree
Showing 36 changed files with 36 additions and 35 deletions.
2 changes: 1 addition & 1 deletion DeviceAdapters/ABS/ABSCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ int CABSCamera::InsertImage()

// Important: metadata about the image are generated here:
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString( imageCounter_ ));
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString( (long) GetImageWidth()));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/AlliedVisionCamera/AlliedVisionCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ void AlliedVisionCamera::insertFrame(VmbFrame_t *frame)

// TODO implement metadata
Metadata md;
md.put("Camera", m_cameraName);
md.put(MM::g_Keyword_Metadata_CameraLabel, m_cameraName);

VmbUint8_t *buffer = reinterpret_cast<VmbUint8_t *>(frame->buffer);
err = GetCoreCallback()->InsertImage(this, buffer, GetImageWidth(), GetImageHeight(), m_currentPixelFormat.getBytesPerPixel(),
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/AmScope/AmScope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ int AmScope::InsertImage()
MMThreadGuard g(imgPixelsLock_);
// Important: metadata about the image are generated here:
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString( imageCounter_ ));
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString( (long) roiX_));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/Andor/Andor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5780,7 +5780,7 @@ unsigned int AndorCamera::PopulateROIDropdownFVB()
// remove first .put deprecated and check if any changes. Perhaps take 5seq MDA first using current build, then rebuild and check difference
// Check both MM Metadata, and .text file generated by stack images.
// add SRRF - may need better timings, perhaps a new m_var_ but can decide during impl.
//md.put("Camera", label);
//md.put(MM::g_Keyword_Metadata_CameraLabel, label);
//md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timestamp - startTime_).getMsec()));
//md.put(MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString(imageCounter_));
//md.put(MM::g_Keyword_Binning, binSize_);
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/Aravis/AravisCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void AravisCamera::AcquisitionCallback(ArvStreamCallbackType type, ArvBuffer *cb
ArvBufferUpdate(cb_arv_buffer);

// Image metadata.
md.put("Camera", "");
md.put(MM::g_Keyword_Metadata_CameraLabel, "");
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString((long)img_buffer_width));
md.put(MM::g_Keyword_Metadata_ROI_Y, CDeviceUtils::ConvertToString((long)img_buffer_height));
md.put(MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString(counter));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/Atik/Atik.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ int Atik::InsertImage()
// Important: metadata about the image are generated here:
Metadata md;

md.put("Camera", "Atik SDK Camera");
md.put(MM::g_Keyword_Metadata_CameraLabel, "Atik SDK Camera");

string serialised = md.Serialize();

Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/Basler/BaslerPylonCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@ void CircularBufferInserter::OnImageGrabbed(CInstantCamera& /* camera */, const

// Important: meta data about the image are generated here:
Metadata md;
md.put("Camera", "");
md.put(MM::g_Keyword_Metadata_CameraLabel, "");
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString((long)ptrGrabResult->GetWidth()));
md.put(MM::g_Keyword_Metadata_ROI_Y, CDeviceUtils::ConvertToString((long)ptrGrabResult->GetHeight()));
md.put(MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString((long)ptrGrabResult->GetImageNumber()));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/BaumerOptronic/BaumerOptronic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2273,7 +2273,7 @@ int CBaumerOptronic::SendImageToCore()
char label[MM::MaxStrLength];
this->GetLabel(label);
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);

int err = WaitForImageAndCopyToBuffer();
if (err != DEVICE_OK)
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/DahengGalaxy/ClassGalaxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,7 @@ void CircularBufferInserter::DoOnImageCaptured(CImageDataPointer& objImageDataPo
//dev_->AddToLog("OnImageGrabbed");
// Important: meta data about the image are generated here:
Metadata md;
md.put("Camera", "");
md.put(MM::g_Keyword_Metadata_CameraLabel, "");
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString((long)objImageDataPointer->GetWidth()));
md.put(MM::g_Keyword_Metadata_ROI_Y, CDeviceUtils::ConvertToString((long)objImageDataPointer->GetHeight()));
md.put(MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString((long)objImageDataPointer->GetFrameID()));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/DemoCamera/DemoCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ int CDemoCamera::InsertImage()

// Important: metadata about the image are generated here:
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString( (long) roiX_));
md.put(MM::g_Keyword_Metadata_ROI_Y, CDeviceUtils::ConvertToString( (long) roiY_));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/Fli/FirstLightImagingCameras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void FirstLightImagingCameras::imageReceived(const uint8_t* image)
Metadata md;
char label[MM::MaxStrLength];
GetLabel(label);
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString((long)w));
md.put(MM::g_Keyword_Metadata_ROI_Y, CDeviceUtils::ConvertToString((long)h));

Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/Hikrobot/HikrobotCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ void HikrobotCamera::ImageRecvThreadProc()

//!fix , md must assign something
Metadata md;
md.put("Camera", "");
md.put(MM::g_Keyword_Metadata_CameraLabel, "");

nRet = GetCoreCallback()->InsertImage(this, (const unsigned char*)stConvertParam.pDstBuffer,
stOutFrame.stFrameInfo.nWidth,
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/IDSPeak/IDSPeak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ int CIDSPeak::InsertImage()

// Important: metadata about the image are generated here:
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString((long)roiX_));
md.put(MM::g_Keyword_Metadata_ROI_Y, CDeviceUtils::ConvertToString((long)roiY_));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/IDS_uEye/IDS_uEye.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ int CIDS_uEye::InsertImage()
*/

// Add our own metadata
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString(imageCounter_));
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString( (long) roiX_));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/IIDC/MMIIDCCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2071,7 +2071,7 @@ MMIIDCCamera::ProcessedSequenceCallback(const void* pixels,

char label[MM::MaxStrLength];
GetLabel(label);
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);

#ifndef _WIN32
// The Windows CMU backend does not provide a valid timestamp (the field
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/MatrixVision/mvIMPACT_Acquire_Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ int mvIMPACT_Acquire_Device::InsertImage( void )
Metadata md;
char label[MM::MaxStrLength];
GetLabel( label );
md.put( "Camera", label );
md.put(MM::g_Keyword_Metadata_CameraLabel, label );
MM::MMTime timeStamp = readoutStartTime_;
md.put( MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString( ( timeStamp - sequenceStartTime_ ).getMsec() ) );
md.put( MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString( static_cast<long>( pCurrentRequest_->infoFrameID.read() ) ) );
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/Mightex_C_Cam/Mightex_USBCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ int CMightex_BUF_USBCCDCamera::InsertImage()

// Important: metadata about the image are generated here:
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString( (long) roiX_));
md.put(MM::g_Keyword_Metadata_ROI_Y, CDeviceUtils::ConvertToString( (long) roiY_));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/OpenCVgrabber/OpenCVgrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ int COpenCVgrabber::InsertImage()

// Important: metadata about the image are generated here:
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString(imageCounter_));
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString( (long) roiX_));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/PICAM/PICAMUniversal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2525,7 +2525,7 @@ int Universal::BuildMetadata( Metadata& md )

MM::MMTime timestamp = GetCurrentMMTime();
md.Clear();
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);

#ifdef PICAM_FRAME_INFO_SUPPORTED
md.PutImageTag<int32>("PICAM-FrameNr", pFrameInfo_->FrameNr);
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/PVCAM/PVCAMUniversal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4205,7 +4205,7 @@ int Universal::ProcessNotification( const NotificationEntry& entry )
{
// Build the metadata
Metadata md;
md.PutImageTag("Camera", deviceLabel_);
md.PutImageTag(MM::g_Keyword_Metadata_CameraLabel, deviceLabel_);
md.PutImageTag("TimeStampMsec", CDeviceUtils::ConvertToString(frameNfo.TimeStampMsec()));

#ifdef PVCAM_FRAME_INFO_SUPPORTED
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/PlayerOne/POACamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ int POACamera::InsertImage()

// Important: metadata about the image are generated here:
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString((long)roiX_));
md.put(MM::g_Keyword_Metadata_ROI_Y, CDeviceUtils::ConvertToString((long)roiY_));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/PyDevice/PyCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ int CPyCamera::InsertImage()
char label[MM::MaxStrLength];
this->GetLabel(label);
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
auto buffer = GetImageBuffer();
if (!buffer)
return DEVICE_ERR;
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/QSI/QSICameraAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ int QSICameraAdapter::InsertImage()
// Assemble metadata
this->GetLabel( label );

metadata.put( "Camera", label );
metadata.put(MM::g_Keyword_Metadata_CameraLabel, label );

pSerializedMetadata = metadata.Serialize().c_str();

Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/RaptorEPIX/RaptorEPIX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5885,7 +5885,7 @@ int CRaptorEPIX::InsertImage()
md.PutTag(mst.GetName(), mst.GetDevice(), mst.GetValue());
}
*/
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
//md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString(fieldCount_));
md.put(MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString(imageCounter_));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/SequenceTester/SequenceTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ TesterCamera::SendSequence(bool finite, long count, bool stopOnOverflow)
char label[MM::MaxStrLength];
GetLabel(label);
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
std::string serializedMD(md.Serialize());

const unsigned char* bytes = 0;
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/SigmaKoki/Camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ int Camera::InsertImage()

// Important: metadata about the image are generated here:
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString(imageCounter_));

Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/Spinnaker/SpinnakerCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ int SpinnakerCamera::MoveImageToCircularBuffer()
this->GetLabel(label);

Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - m_aqThread->GetStartTime()).getMsec()));
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString((long)m_cam->Width.GetValue()));
md.put(MM::g_Keyword_Metadata_ROI_Y, CDeviceUtils::ConvertToString((long)m_cam->Height.GetValue()));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/TISCam/TIScamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2161,7 +2161,7 @@ int CTIScamera::PushImage()

// Important: metadata about the image are generated here:
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString(imageCounter_));
md.put(MM::g_Keyword_Binning, binSize_);
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/TUCam/MMTUCam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2850,7 +2850,7 @@ int CMMTUCam::InsertImage()

// Important: metadata about the image are generated here:
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString( (long) roiX_));
md.put(MM::g_Keyword_Metadata_ROI_Y, CDeviceUtils::ConvertToString( (long) roiY_));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/ThorlabsUSBCamera/ThorlabsUSBCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ int ThorlabsUSBCam::InsertImage()
Metadata md;
char label[MM::MaxStrLength];
this->GetLabel(label);
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((GetCurrentMMTime() - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ImageNumber, CDeviceUtils::ConvertToString(imageCounter_));

Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/UniversalMMHubUsb/ummhUsb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3744,7 +3744,7 @@ int UmmhCamera::InsertImage()

// Important: metadata about the image are generated here:
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
md.put(MM::g_Keyword_Elapsed_Time_ms, CDeviceUtils::ConvertToString((timeStamp - sequenceStartTime_).getMsec()));
md.put(MM::g_Keyword_Metadata_ROI_X, CDeviceUtils::ConvertToString( (long) roiX_));
md.put(MM::g_Keyword_Metadata_ROI_Y, CDeviceUtils::ConvertToString( (long) roiY_));
Expand Down
2 changes: 1 addition & 1 deletion DeviceAdapters/ZWO/MyASICam2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ int CMyASICam::InsertImage()

// Important: metadata about the image are generated here:
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);

char buf[MM::MaxStrLength];
GetProperty(MM::g_Keyword_Binning, buf);
Expand Down
2 changes: 1 addition & 1 deletion MMCore/CircularBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ bool CircularBuffer::InsertMultiChannel(const unsigned char* pixArray, unsigned
md = *pMd;
}

std::string cameraName = md.GetSingleTag("Camera").GetValue();
std::string cameraName = md.GetSingleTag(MM::g_Keyword_Metadata_CameraLabel).GetValue();
if (imageNumbers_.end() == imageNumbers_.find(cameraName))
{
imageNumbers_[cameraName] = 0;
Expand Down
2 changes: 1 addition & 1 deletion MMCore/CoreCallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ CoreCallback::AddCameraMetadata(const MM::Device* caller, const Metadata* pMd)
core_->deviceManager_->GetDevice(caller));

std::string label = camera->GetLabel();
newMD.put("Camera", label);
newMD.put(MM::g_Keyword_Metadata_CameraLabel, label);

std::string serializedMD;
try
Expand Down
2 changes: 1 addition & 1 deletion MMDevice/DeviceBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,7 @@ class CCameraBase : public CDeviceBase<MM::Camera, U>
char label[MM::MaxStrLength];
this->GetLabel(label);
Metadata md;
md.put("Camera", label);
md.put(MM::g_Keyword_Metadata_CameraLabel, label);
int ret = GetCoreCallback()->InsertImage(this, GetImageBuffer(), GetImageWidth(),
GetImageHeight(), GetImageBytesPerPixel(),
md.Serialize().c_str());
Expand Down
1 change: 1 addition & 0 deletions MMDevice/MMDeviceConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ namespace MM {


// image annotations
const char* const g_Keyword_Metadata_CameraLabel = "Camera";
const char* const g_Keyword_Meatdata_Exposure = "Exposure-ms";
const char* const g_Keyword_Metadata_Score = "Score";
const char* const g_Keyword_Metadata_ImageNumber = "ImageNumber";
Expand Down

0 comments on commit 503321c

Please sign in to comment.