Medical Imaging Interaction Toolkit  2018.4.99-6a3ea89d
Medical Imaging Interaction Toolkit
mitk::NavigationToolReader Class Reference

This class offers methods to read objects of the class NavigationTool from the harddisc. The tools have to be saved in a special format by the class NavigationToolWriter to be loadable. More...

#include <mitkNavigationToolReader.h>

Inheritance diagram for mitk::NavigationToolReader:
Collaboration diagram for mitk::NavigationToolReader:

Public Member Functions

 mitkClassMacroItkParent (NavigationToolReader, itk::Object)
 
Pointer Clone () const
 
mitk::NavigationTool::Pointer DoRead (std::string filename)
 This method reads a navigation tool from a file. More...
 
virtual std::string GetErrorMessage ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 NavigationToolReader ()
 
 ~NavigationToolReader () override
 
mitk::NavigationTool::Pointer ConvertDataNodeToNavigationTool (mitk::DataNode::Pointer node, std::string toolPath)
 
std::string GetFileWithoutPath (std::string FileWithPath)
 
mitk::PointSet::Pointer ConvertStringToPointSet (std::string string)
 
mitk::Point3D ConvertStringToPoint (std::string string)
 
mitk::Quaternion ConvertStringToQuaternion (std::string string)
 
void split (std::string &text, std::string &separators, std::vector< std::string > &words)
 

Protected Attributes

std::string m_ErrorMessage
 
std::string m_ToolfilePath
 

Detailed Description

This class offers methods to read objects of the class NavigationTool from the harddisc. The tools have to be saved in a special format by the class NavigationToolWriter to be loadable.

Documentation

Definition at line 34 of file mitkNavigationToolReader.h.

Constructor & Destructor Documentation

◆ NavigationToolReader()

mitk::NavigationToolReader::NavigationToolReader ( )
protected

Definition at line 32 of file mitkNavigationToolReader.cpp.

References mitk::IOUtil::GetTempPath(), and m_ToolfilePath.

◆ ~NavigationToolReader()

mitk::NavigationToolReader::~NavigationToolReader ( )
overrideprotected

Definition at line 37 of file mitkNavigationToolReader.cpp.

Member Function Documentation

◆ Clone()

Pointer mitk::NavigationToolReader::Clone ( ) const

◆ ConvertDataNodeToNavigationTool()

◆ ConvertStringToPoint()

mitk::Point3D mitk::NavigationToolReader::ConvertStringToPoint ( std::string  string)
protected

Definition at line 229 of file mitkNavigationToolReader.cpp.

References split().

Referenced by ConvertDataNodeToNavigationTool().

◆ ConvertStringToPointSet()

mitk::PointSet::Pointer mitk::NavigationToolReader::ConvertStringToPointSet ( std::string  string)
protected

Definition at line 206 of file mitkNavigationToolReader.cpp.

References mitk::PointSet::New(), and split().

Referenced by ConvertDataNodeToNavigationTool().

◆ ConvertStringToQuaternion()

mitk::Quaternion mitk::NavigationToolReader::ConvertStringToQuaternion ( std::string  string)
protected

Definition at line 244 of file mitkNavigationToolReader.cpp.

References split().

Referenced by ConvertDataNodeToNavigationTool().

◆ DoRead()

mitk::NavigationTool::Pointer mitk::NavigationToolReader::DoRead ( std::string  filename)

This method reads a navigation tool from a file.

Parameters
filenameThe filename where the tool is stored, "C:\temp\myTool.igtTool" for example.
Returns
Returns a pointer to the tool which was read. Returns nullptr, if something went wrong and no tool was read. In this case you may also want the error message which is availiable from the method GetErrorMessage().

Definition at line 41 of file mitkNavigationToolReader.cpp.

References ConvertDataNodeToNavigationTool(), GetFileWithoutPath(), m_ErrorMessage, m_ToolfilePath, and mitk::SceneIO::New().

◆ GetErrorMessage()

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

◆ GetFileWithoutPath()

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

Definition at line 200 of file mitkNavigationToolReader.cpp.

Referenced by DoRead().

◆ mitkClassMacroItkParent()

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

◆ New()

◆ split()

void mitk::NavigationToolReader::split ( std::string &  text,
std::string &  separators,
std::vector< std::string > &  words 
)
protected

Member Data Documentation

◆ m_ErrorMessage

std::string mitk::NavigationToolReader::m_ErrorMessage
protected

Definition at line 57 of file mitkNavigationToolReader.h.

Referenced by DoRead().

◆ m_ToolfilePath

std::string mitk::NavigationToolReader::m_ToolfilePath
protected

Definition at line 59 of file mitkNavigationToolReader.h.

Referenced by DoRead(), and NavigationToolReader().


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