Skip to content

Commit dfc36d9

Browse files
committed
updated milkImage
1 parent 78d7258 commit dfc36d9

1 file changed

Lines changed: 52 additions & 3 deletions

File tree

include/improc/milkImage.hpp

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
//***********************************************************************//
9-
// Copyright 2015, 2016, 2017 Jared R. Males (jaredmales@gmail.com)
9+
// Copyright 2025 Jared R. Males (jaredmales@gmail.com)
1010
//
1111
// This file is part of mxlib.
1212
//
@@ -403,11 +403,35 @@ class milkImage
403403
*/
404404
void post();
405405

406+
/// Get the creation time
407+
/**
408+
* \returns the ImageStream creationtime
409+
*/
410+
const timespec & creationtime() const;
411+
412+
/// Get the last access time
413+
/**
414+
* \returns ImageStream lastaccesstime
415+
*/
416+
const timespec & lastaccesstime() const;
417+
418+
/// Get the acquisition time
419+
/**
420+
* \returns ImageStream acquisition time
421+
*/
422+
const timespec & atime() const;
423+
424+
/// Get the write time
425+
/**
426+
* \returns ImageStream writetime
427+
*/
428+
const timespec & writetime() const;
429+
406430
/// Get the value of cnt0 (the frame counter)
407431
/**
408432
* \returns the current value of cnt0
409433
*/
410-
uint64_t cnt0();
434+
const uint64_t & cnt0() const;
411435
};
412436

413437
template <typename dataT>
@@ -792,11 +816,36 @@ void milkImage<dataT>::post()
792816
}
793817

794818
template <typename dataT>
795-
uint64_t milkImage<dataT>::cnt0()
819+
const timespec & milkImage<dataT>::creationtime() const
820+
{
821+
return m_image->md->creationtime;
822+
}
823+
824+
template <typename dataT>
825+
const timespec & milkImage<dataT>::lastaccesstime() const
826+
{
827+
return m_image->md->lastaccesstime;
828+
}
829+
830+
template <typename dataT>
831+
const timespec & milkImage<dataT>::atime() const
832+
{
833+
return m_image->md->atime;
834+
}
835+
836+
template <typename dataT>
837+
const timespec & milkImage<dataT>::writetime() const
838+
{
839+
return m_image->md->writetime;
840+
}
841+
842+
template <typename dataT>
843+
const uint64_t & milkImage<dataT>::cnt0() const
796844
{
797845
return m_image->md->cnt0;
798846
}
799847

848+
800849
} // namespace improc
801850
} // namespace mx
802851

0 commit comments

Comments
 (0)