Medical Imaging Interaction Toolkit  2018.4.99-08619e4f
Medical Imaging Interaction Toolkit
mitk::NavigationToolWriter Class Reference

This class offers methods to write objects of the class navigation tool permanently to the harddisk. The objects are saved in a special fileformat which can be read by the class NavigationToolReader to restore the object. More...

#include <mitkNavigationToolWriter.h>

Inheritance diagram for mitk::NavigationToolWriter:
Collaboration diagram for mitk::NavigationToolWriter:

Public Member Functions

 mitkClassMacroItkParent (NavigationToolWriter, itk::Object)
 
Pointer Clone () const
 
bool DoWrite (std::string FileName, mitk::NavigationTool::Pointer Tool)
 Writes a navigation tool to a file. More...
 
virtual std::string GetErrorMessage ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 NavigationToolWriter ()
 
 ~NavigationToolWriter () override
 
mitk::DataNode::Pointer ConvertToDataNode (mitk::NavigationTool::Pointer Tool)
 
std::string GetFileWithoutPath (std::string FileWithPath)
 
std::string ConvertPointSetToString (mitk::PointSet::Pointer pointSet)
 
std::string ConvertPointToString (mitk::Point3D point)
 
std::string ConvertQuaternionToString (mitk::Quaternion quat)
 

Protected Attributes

std::string m_ErrorMessage
 

Detailed Description

This class offers methods to write objects of the class navigation tool permanently to the harddisk. The objects are saved in a special fileformat which can be read by the class NavigationToolReader to restore the object.

Documentation

Definition at line 35 of file mitkNavigationToolWriter.h.

Constructor & Destructor Documentation

◆ NavigationToolWriter()

mitk::NavigationToolWriter::NavigationToolWriter ( )
protected

Definition at line 28 of file mitkNavigationToolWriter.cpp.

◆ ~NavigationToolWriter()

mitk::NavigationToolWriter::~NavigationToolWriter ( )
overrideprotected

Definition at line 33 of file mitkNavigationToolWriter.cpp.

Member Function Documentation

◆ Clone()

Pointer mitk::NavigationToolWriter::Clone ( ) const

◆ ConvertPointSetToString()

std::string mitk::NavigationToolWriter::ConvertPointSetToString ( mitk::PointSet::Pointer  pointSet)
protected

Definition at line 141 of file mitkNavigationToolWriter.cpp.

References ConvertPointToString().

Referenced by ConvertToDataNode().

◆ ConvertPointToString()

std::string mitk::NavigationToolWriter::ConvertPointToString ( mitk::Point3D  point)
protected

Definition at line 153 of file mitkNavigationToolWriter.cpp.

Referenced by ConvertPointSetToString(), and ConvertToDataNode().

◆ ConvertQuaternionToString()

std::string mitk::NavigationToolWriter::ConvertQuaternionToString ( mitk::Quaternion  quat)
protected

Definition at line 160 of file mitkNavigationToolWriter.cpp.

Referenced by ConvertToDataNode().

◆ ConvertToDataNode()

mitk::DataNode::Pointer mitk::NavigationToolWriter::ConvertToDataNode ( mitk::NavigationTool::Pointer  Tool)
protected

◆ DoWrite()

bool mitk::NavigationToolWriter::DoWrite ( std::string  FileName,
mitk::NavigationTool::Pointer  Tool 
)

Writes a navigation tool to a file.

Parameters
FileNameThe filename (complete, with path, C:/temp/myTool.igtTool for example)
ToolThe tool which should be written to the file.
Returns
Returns true if the file was written successfully, false if not. In the second case you can get the error message by using the method GetErrorMessage().

Definition at line 38 of file mitkNavigationToolWriter.cpp.

References ConvertToDataNode(), mitk::IOUtil::CreateTemporaryDirectory(), GetFileWithoutPath(), m_ErrorMessage, MITK_ERROR, MITK_WARN, mitk::SceneIO::New(), and mitk::StandaloneDataStorage::New().

◆ GetErrorMessage()

virtual std::string mitk::NavigationToolWriter::GetErrorMessage ( )
virtual

◆ GetFileWithoutPath()

std::string mitk::NavigationToolWriter::GetFileWithoutPath ( std::string  FileWithPath)
protected

Definition at line 135 of file mitkNavigationToolWriter.cpp.

Referenced by ConvertToDataNode(), and DoWrite().

◆ mitkClassMacroItkParent()

mitk::NavigationToolWriter::mitkClassMacroItkParent ( NavigationToolWriter  ,
itk::Object   
)

◆ New()

Member Data Documentation

◆ m_ErrorMessage

std::string mitk::NavigationToolWriter::m_ErrorMessage
protected

Definition at line 58 of file mitkNavigationToolWriter.h.

Referenced by DoWrite().


The documentation for this class was generated from the following files: