Skip to content

Commit

Permalink
Add keyword 'g_Keyword_Metadata_Exposure' to replace 'g_Keyword_Meatd…
Browse files Browse the repository at this point in the history
…ata_Expsoure'. Add comment to indicate that 'g_Keyword_Meatdata_Exposure' is deprecated.
  • Loading branch information
Hazen Babcock authored and Hazen Babcock committed Oct 12, 2024
1 parent b541d0c commit 5239fa6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions DeviceAdapters/Aravis/AravisCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ void AravisCamera::AcquisitionCallback(ArvStreamCallbackType type, ArvBuffer *cb
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));
md.put(MM::g_Keyword_Metadata_Exposure, exposure_time);
md.put(MM::g_Keyword_Meatdata_Exposure, exposure_time);
md.put(MM::g_Keyword_PixelType, pixel_type);

Expand Down
1 change: 1 addition & 0 deletions DeviceAdapters/Basler/BaslerPylonCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2131,6 +2131,7 @@ void CircularBufferInserter::OnImageGrabbed(CInstantCamera& /* camera */, const
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()));
md.put(MM::g_Keyword_Metadata_Exposure, dev_->GetExposure());
md.put(MM::g_Keyword_Meatdata_Exposure, dev_->GetExposure());
// Image grabbed successfully?
if (ptrGrabResult->GrabSucceeded())
Expand Down
3 changes: 2 additions & 1 deletion DeviceAdapters/DahengGalaxy/ClassGalaxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1863,6 +1863,7 @@ void CircularBufferInserter::DoOnImageCaptured(CImageDataPointer& objImageDataPo
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()));
md.put(MM::g_Keyword_Metadata_Exposure, dev_->GetExposure());
md.put(MM::g_Keyword_Meatdata_Exposure, dev_->GetExposure());
// Image grabbed successfully ?
if (objImageDataPointer->GetStatus()== GX_FRAME_STATUS_SUCCESS)
Expand Down Expand Up @@ -2160,4 +2161,4 @@ void ClassGalaxy::SaveRaw(CImageDataPointer& objCImageDataPointer, const std::st
::WriteFile(hFile, pbuffer, dwImageSize, &dwBytesRead, NULL);
CloseHandle(hFile);
}
}
}
3 changes: 2 additions & 1 deletion DeviceAdapters/Ximea/XIMEACamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@ int XimeaCamera::InsertImage()
// Important: metadata about the image are generated here:
Metadata md;
double exp_time = (double)image.GetExpTime() / 1000;
md.put(MM::g_Keyword_Metadata_Exposure, CDeviceUtils::ConvertToString(exp_time));
md.put(MM::g_Keyword_Meatdata_Exposure, CDeviceUtils::ConvertToString(exp_time));
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 Expand Up @@ -1742,4 +1743,4 @@ int XiSequenceThread::svc(void) throw()
return ret;
}

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
3 changes: 2 additions & 1 deletion MMDevice/MMDeviceConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ 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_Exposure = "Exposure-ms";
const char* const g_Keyword_Meatdata_Exposure = "Exposure-ms"; // Deprecated, use g_Keyword_Metadata_Exposure.
const char* const g_Keyword_Metadata_Score = "Score";
const char* const g_Keyword_Metadata_ImageNumber = "ImageNumber";
// Removed: g_Keyword_Metadata_StartTime = "StartTime-ms";
Expand Down

0 comments on commit 5239fa6

Please sign in to comment.