MITK-IGT
IGT Extension of MITK
|
#include <mitkUSImageLoggingFilter.h>
Public Member Functions | |
mitkClassMacro (USImageLoggingFilter, mitk::ImageToImageFilter) | |
itkNewMacro (USImageLoggingFilter) | |
void | GenerateData () override |
void | AddMessageToCurrentImage (std::string message) |
void | SaveImages (std::string path, std::vector< std::string > &imageFilenames, std::string &csvFileName) |
void | SaveImages (std::string path) |
bool | SetImageFilesExtension (std::string extension) |
Protected Types | |
typedef std::vector< mitk::Image::Pointer > | ImageCollection |
Protected Member Functions | |
USImageLoggingFilter () | |
~USImageLoggingFilter () override | |
Protected Attributes | |
mitk::RealTimeClock::Pointer | m_SystemTimeClock |
system time clock for system time tag | |
ImageCollection | m_LoggedImages |
An image collection for every input. The string identifies the input. | |
std::map< int, std::string > | m_LoggedMessages |
(Optional) messages for every logged image | |
std::vector< double > | m_LoggedMITKSystemTimes |
Logged system times for every logged image. | |
std::string | m_ImageExtension |
stores the image extension, default is ".nrrd" | |
An object of this class is a filter which saves/logs a clone of the current image whenever Update() is called. Additionally a timestamp of this image is saved. Optionally you can add messages. All data (images, timestamps and messages) is written to the harddisc when the method SaveImages(...) is called.
Caution: only supports logging of one input at the moment, multiple inputs are ignored!
Definition at line 32 of file mitkUSImageLoggingFilter.h.
|
protected |
Definition at line 79 of file mitkUSImageLoggingFilter.h.
|
protected |
Definition at line 24 of file mitkUSImageLoggingFilter.cpp.
|
overrideprotected |
Definition at line 29 of file mitkUSImageLoggingFilter.cpp.
void mitk::USImageLoggingFilter::AddMessageToCurrentImage | ( | std::string | message | ) |
Adds a message to the current (last logged) image. This message is internally stored and written to the harddisc when SaveImages(...) is called.
message | The string which contains the message which is logged to the current image |
Definition at line 80 of file mitkUSImageLoggingFilter.cpp.
|
override |
This method is internally called by the Update() mechanism of the pipeline. Don't call it directly.
Definition at line 33 of file mitkUSImageLoggingFilter.cpp.
mitk::USImageLoggingFilter::itkNewMacro | ( | USImageLoggingFilter | ) |
mitk::USImageLoggingFilter::mitkClassMacro | ( | USImageLoggingFilter | , |
mitk::ImageToImageFilter | ) |
void mitk::USImageLoggingFilter::SaveImages | ( | std::string | path | ) |
Saves all logged data to the given path. Every image is written to a separate image file. Additionaly a csv file containing a list of all images together with timestamps and messages is saved. For one call of this method all files will start with a unique number to avoid overwrite of old files.
[in] | path | Should contain a valid path were all logging data will be stored. |
mitk::Exception | Throws an exception if there is a problem during writing the images. E.g., if the path is not valid / not writable. |
Definition at line 85 of file mitkUSImageLoggingFilter.cpp.
void mitk::USImageLoggingFilter::SaveImages | ( | std::string | path, |
std::vector< std::string > & | imageFilenames, | ||
std::string & | csvFileName ) |
Saves all logged data to the given path. Every image is written to a separate image file. Additionaly a csv file containing a list of all images together with timestamps and messages is saved. For one call of this method all files will start with a unique number to avoid overwrite of old files.
[in] | path | Should contain a valid path were all logging data will be stored. |
[out] | imageFilenames | Returns a list of all images filenames which were stored to the harddisc. |
[out] | csvFileName | Returns the filename of the csv list with the timestamps and the messages. |
mitk::Exception | Throws an exception if there is a problem during writing the images. E.g., if the path is not valid / not writable. |
Definition at line 92 of file mitkUSImageLoggingFilter.cpp.
bool mitk::USImageLoggingFilter::SetImageFilesExtension | ( | std::string | extension | ) |
Sets the extension of the output images which alse defines the file type. E.g., ".nrrd" or ".jpg". ".nrrd" is default.
Definition at line 142 of file mitkUSImageLoggingFilter.cpp.
|
protected |
stores the image extension, default is ".nrrd"
Definition at line 86 of file mitkUSImageLoggingFilter.h.
|
protected |
An image collection for every input. The string identifies the input.
Definition at line 83 of file mitkUSImageLoggingFilter.h.
|
protected |
(Optional) messages for every logged image
Definition at line 84 of file mitkUSImageLoggingFilter.h.
|
protected |
Logged system times for every logged image.
Definition at line 85 of file mitkUSImageLoggingFilter.h.
|
protected |
system time clock for system time tag
Definition at line 80 of file mitkUSImageLoggingFilter.h.