|
Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <mitkUSImageLoggingFilter.h>


Public Member Functions | |
| mitkClassMacro (USImageLoggingFilter, mitk::ImageToImageFilter) | |
| 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) |
Public Member Functions inherited from mitk::ImageToImageFilter | |
| virtual std::vector< std::string > | GetClassHierarchy () const override |
| virtual const char * | GetClassName () const |
| Pointer | Clone () const |
| virtual void | SetInput (const InputImageType *image) |
| virtual void | SetInput (unsigned int, const InputImageType *image) |
| InputImageType * | GetInput (void) |
| InputImageType * | GetInput (unsigned int idx) |
| const InputImageType * | GetInput (void) const |
| const InputImageType * | GetInput (unsigned int idx) const |
Public Member Functions inherited from mitk::ImageSource | |
| Pointer | Clone () const |
| OutputType * | GetOutput () |
| Get the output data of this image source object. More... | |
| const OutputType * | GetOutput () const |
| OutputType * | GetOutput (DataObjectPointerArraySizeType idx) |
| const OutputType * | GetOutput (DataObjectPointerArraySizeType idx) const |
| itk::DataObject::Pointer | MakeOutput (DataObjectPointerArraySizeType idx) override |
| Make a DataObject of the correct type to used as the specified output. More... | |
| itk::DataObject::Pointer | MakeOutput (const DataObjectIdentifierType &name) override |
| virtual vtkImageData * | GetVtkImageData () |
| virtual const vtkImageData * | GetVtkImageData () const |
Public Member Functions inherited from mitk::BaseDataSource | |
| OutputType * | GetOutput () |
| const OutputType * | GetOutput () const |
| OutputType * | GetOutput (DataObjectPointerArraySizeType idx) |
| const OutputType * | GetOutput (DataObjectPointerArraySizeType idx) const |
| virtual void | GraftOutput (OutputType *output) |
| Graft the specified BaseData onto this BaseDataSource's output. More... | |
| virtual void | GraftOutput (const DataObjectIdentifierType &key, OutputType *output) |
| virtual void | GraftNthOutput (unsigned int idx, OutputType *output) |
| Graft the specified base data object onto this BaseDataSource's idx'th output. More... | |
| bool | Updating () const |
| Access itk::ProcessObject::m_Updating. More... | |
Static Public Member Functions | |
| static Pointer | New () |
Static Public Member Functions inherited from mitk::ImageToImageFilter | |
| static const char * | GetStaticNameOfClass () |
| static Pointer | New () |
Static Public Member Functions inherited from mitk::ImageSource | |
| static const char * | GetStaticNameOfClass () |
| static Pointer | New () |
| Method for creation through the object factory. More... | |
Static Public Member Functions inherited from mitk::BaseDataSource | |
| static const char * | GetStaticNameOfClass () |
Protected Types | |
| typedef std::vector< mitk::Image::Pointer > | ImageCollection |
Protected Member Functions | |
| USImageLoggingFilter () | |
| ~USImageLoggingFilter () override | |
Protected Member Functions inherited from mitk::ImageToImageFilter | |
| ImageToImageFilter () | |
| ~ImageToImageFilter () override | |
| void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
| void | GenerateInputRequestedRegion () override |
Protected Member Functions inherited from mitk::ImageSource | |
| ImageSource () | |
| ~ImageSource () override | |
| void | GenerateData () override |
| A version of GenerateData() specific for image processing filters. More... | |
| virtual void | ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId) |
| If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData(). More... | |
| void | PrepareOutputs () override |
| This method is intentionally left blank. More... | |
| virtual void | AllocateOutputs () |
| The GenerateData method normally allocates the buffers for all of the outputs of a filter. More... | |
| virtual void | BeforeThreadedGenerateData () |
| If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData(). More... | |
| virtual void | AfterThreadedGenerateData () |
| If an imaging filter needs to perform processing after all processing threads have completed, the filter can can provide an implementation for AfterThreadedGenerateData(). More... | |
| virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int num, OutputImageRegionType &splitRegion) |
| Split the output's RequestedRegion into "num" pieces, returning region "i" as "splitRegion". More... | |
Protected Member Functions inherited from mitk::BaseDataSource | |
| BaseDataSource () | |
| ~BaseDataSource () override | |
Protected Attributes | |
| mitk::RealTimeClock::Pointer | m_SystemTimeClock |
| system time clock for system time tag More... | |
| ImageCollection | m_LoggedImages |
| An image collection for every input. The string identifies the input. More... | |
| std::map< int, std::string > | m_LoggedMessages |
| (Optional) messages for every logged image More... | |
| std::vector< double > | m_LoggedMITKSystemTimes |
| Logged system times for every logged image. More... | |
| std::string | m_ImageExtension |
| stores the image extension, default is ".nrrd" More... | |
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.
References m_LoggedImages, and m_LoggedMessages.
|
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.
References mitk::ImageToImageFilter::GetInput(), mitk::ImageSource::GetOutput(), m_LoggedImages, m_LoggedMITKSystemTimes, m_SystemTimeClock, and MITK_WARN.
| mitk::USImageLoggingFilter::mitkClassMacro | ( | USImageLoggingFilter | , |
| mitk::ImageToImageFilter | |||
| ) |
|
static |
| 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.
References mitk::UIDGenerator::GetUID(), m_ImageExtension, m_LoggedImages, m_LoggedMessages, m_LoggedMITKSystemTimes, mitkThrow, and mitk::IOUtil::Save().
Referenced by SaveImages().
| 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.
References SaveImages().
| 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.
References mitk::IOMimeTypes::CATEGORY_IMAGES(), mitk::CoreServices::GetMimeTypeProvider(), and m_ImageExtension.
|
protected |
stores the image extension, default is ".nrrd"
Definition at line 86 of file mitkUSImageLoggingFilter.h.
Referenced by SaveImages(), and SetImageFilesExtension().
|
protected |
An image collection for every input. The string identifies the input.
Definition at line 83 of file mitkUSImageLoggingFilter.h.
Referenced by AddMessageToCurrentImage(), GenerateData(), and SaveImages().
|
protected |
(Optional) messages for every logged image
Definition at line 84 of file mitkUSImageLoggingFilter.h.
Referenced by AddMessageToCurrentImage(), and SaveImages().
|
protected |
Logged system times for every logged image.
Definition at line 85 of file mitkUSImageLoggingFilter.h.
Referenced by GenerateData(), and SaveImages().
|
protected |
system time clock for system time tag
Definition at line 80 of file mitkUSImageLoggingFilter.h.
Referenced by GenerateData().