diff --git a/MMCore/CircularBuffer.cpp b/MMCore/CircularBuffer.cpp index e23ea89b3..2453bda49 100644 --- a/MMCore/CircularBuffer.cpp +++ b/MMCore/CircularBuffer.cpp @@ -282,23 +282,23 @@ bool CircularBuffer::InsertMultiChannel(const unsigned char* pixArray, unsigned auto now = std::chrono::system_clock::now(); md.PutImageTag(MM::g_Keyword_Metadata_TimeInCore, FormatLocalTime(now)); - md.PutImageTag("Width",width); - md.PutImageTag("Height",height); + md.PutImageTag(MM::g_Keyword_Metadata_Width, width); + md.PutImageTag(MM::g_Keyword_Metadata_Height, height); if (byteDepth == 1) - md.PutImageTag("PixelType","GRAY8"); + md.PutImageTag(MM::g_Keyword_PixelType, MM::g_Keyword_PixelType_GRAY8); else if (byteDepth == 2) - md.PutImageTag("PixelType","GRAY16"); + md.PutImageTag(MM::g_Keyword_PixelType, MM::g_Keyword_PixelType_GRAY16); else if (byteDepth == 4) { if (nComponents == 1) - md.PutImageTag("PixelType","GRAY32"); + md.PutImageTag(MM::g_Keyword_PixelType, MM::g_Keyword_PixelType_GRAY32); else - md.PutImageTag("PixelType","RGB32"); + md.PutImageTag(MM::g_Keyword_PixelType, MM::g_Keyword_PixelType_RGB32); } else if (byteDepth == 8) - md.PutImageTag("PixelType","RGB64"); + md.PutImageTag(MM::g_Keyword_PixelType, MM::g_Keyword_PixelType_RGB64); else - md.PutImageTag("PixelType","Unknown"); + md.PutImageTag(MM::g_Keyword_PixelType, MM::g_Keyword_PixelType_Unknown); pImg->SetMetadata(md); //pImg->SetPixels(pixArray + i * singleChannelSize); diff --git a/MMDevice/MMDeviceConstants.h b/MMDevice/MMDeviceConstants.h index 62aa53ce6..442d5205b 100644 --- a/MMDevice/MMDeviceConstants.h +++ b/MMDevice/MMDeviceConstants.h @@ -141,8 +141,16 @@ namespace MM { const char* const g_Keyword_Closed_Position = "ClosedPosition"; const char* const g_Keyword_HubID = "HubID"; + const char* const g_Keyword_PixelType_GRAY8 = "GRAY8"; + const char* const g_Keyword_PixelType_GRAY16 = "GRAY16"; + const char* const g_Keyword_PixelType_GRAY32 = "GRAY32"; + const char* const g_Keyword_PixelType_RGB32 = "RGB32"; + const char* const g_Keyword_PixelType_RGB64 = "RGB64"; + const char* const g_Keyword_PixelType_Unknown = "Unknown"; // image annotations + const char* const g_Keyword_Metadata_Width = "Width"; + const char* const g_Keyword_Metadata_Height = "Height"; 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";