PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
PlusCommon.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2  Program: Plus
3  Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4  See License.txt for details.
5 =========================================================Plus=header=end*/
6 
7 #ifndef __PlusCommon_h
8 #define __PlusCommon_h
9 
10 // PLUS includes
11 #include "vtkPlusCommonExport.h"
12 #include "itkImageIOBase.h"
13 #include "vtkPlusLogger.h"
14 #include "vtkPlusMacro.h"
15 #include "vtkIGSIORecursiveCriticalSection.h"
16 
17 // VTK includes
18 #include <vtkImageData.h>
19 #include <vtksys/SystemTools.hxx>
20 
21 // ITK includes
22 #include <itkImage.h>
23 
24 // System includes
25 #include <float.h>
26 
27 // STL includes
28 #include <array>
29 #include <list>
30 #include <locale>
31 #include <sstream>
32 
33 // IGSIO includes
34 #include <igsioCommon.h>
35 #include <vtkIGSIOTrackedFrameList.h>
36 #include <igsioTrackedFrame.h>
37 #include <igsioVideoFrame.h>
38 #include <vtkIGSIOTransformRepository.h>
39 
41 
42 typedef igsioStatus PlusStatus;
43 #define PLUS_FAIL IGSIO_FAIL
44 #define PLUS_SUCCESS IGSIO_SUCCESS
45 
46 class vtkXMLDataElement;
47 
48 #ifndef VTK_OVERRIDE
49  #define VTK_OVERRIDE override;
50 #endif
51 
52 namespace PlusCommon
53 {
54  typedef itk::ImageIOBase::IOComponentType ITKScalarPixelType;
55  typedef int VTKScalarPixelType;
56  typedef int IGTLScalarPixelType;
57 
58  vtkPlusCommonExport std::string GetPlusLibVersionString();
59 
60  vtkPlusCommonExport PlusStatus WriteToFile(igsioTrackedFrame* frame, const std::string& filename, vtkMatrix4x4* imageToTracker);
61 
62 #ifdef PLUS_USE_OpenIGTLink
63 
64  vtkPlusCommonExport IGTLScalarPixelType GetIGTLScalarPixelTypeFromVTK(igsioCommon::VTKScalarPixelType vtkScalarPixelType);
65 
67  vtkPlusCommonExport VTKScalarPixelType GetVTKScalarPixelTypeFromIGTL(igsioCommon::IGTLScalarPixelType igtlPixelType);
68 #endif
69 
71  template<typename ScalarType> vtkPlusCommonExport PlusStatus DeepCopyVtkVolumeToItkVolume(vtkImageData* inFrame, typename itk::Image< ScalarType, 3 >::Pointer outFrame);
73  template<typename ScalarType> vtkPlusCommonExport PlusStatus DeepCopyVtkVolumeToItkImage(vtkImageData* inFrame, typename itk::Image< ScalarType, 2 >::Pointer outFrame);
74 
75 };
76 
77 #include "vtkPlusConfig.h"
78 #include "PlusXmlUtils.h"
79 #include "PlusCommon.txx"
80 
81 #endif //__PlusCommon_h
vtkPlusCommonExport PlusStatus WriteToFile(igsioTrackedFrame *frame, const std::string &filename, vtkMatrix4x4 *imageToTracker)
Definition: PlusCommon.cxx:50
vtkPlusCommonExport PlusStatus DeepCopyVtkVolumeToItkImage(vtkImageData *inFrame, typename itk::Image< ScalarType, 2 >::Pointer outFrame)
igsioStatus PlusStatus
Definition: PlusCommon.h:40
itk::ImageIOBase::IOComponentType ITKScalarPixelType
Definition: PlusCommon.h:54
int VTKScalarPixelType
Definition: PlusCommon.h:55
This is a base class for defining a common scan conversion algorithm interface for all kinds of probe...
vtkPlusCommonExport PlusStatus DeepCopyVtkVolumeToItkVolume(vtkImageData *inFrame, typename itk::Image< ScalarType, 3 >::Pointer outFrame)
int IGTLScalarPixelType
Definition: PlusCommon.h:56
vtkPlusCommonExport std::string GetPlusLibVersionString()
Definition: PlusCommon.cxx:30