Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkToFNrrdImageWriter.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 #ifndef __mitkToFNrrdImageWriter_h
17 #define __mitkToFNrrdImageWriter_h
18 
19 #include <MitkToFHardwareExports.h>
20 #include "mitkToFImageWriter.h"
21 
22 #include <fstream>
23 
24 namespace mitk
25 {
35  class MITKTOFHARDWARE_EXPORT ToFNrrdImageWriter : public ToFImageWriter
36  {
37  public:
39  itkFactorylessNewMacro(Self)
40  itkCloneMacro(Self)
41 
42 
45  void Open() override;
49  void Close() override;
53  void Add(float* distanceFloatData, float* amplitudeFloatData, float* intensityFloatData, unsigned char* rgbData=0) override;
54 
55  protected:
56 
57  std::ofstream m_DistanceOutfile;
58  std::ofstream m_AmplitudeOutfile;
59  std::ofstream m_IntensityOutfile;
60  std::ofstream m_RGBOutfile;
61 
62  private:
63 
66 
70  void OpenStreamFile(std::ofstream &outfile, std::string outfileName);
74  void CloseStreamFile(std::ofstream &outfile, std::string fileName);
78  void ConvertStreamToNrrdFormat( std::string fileName );
79  };
80 } //END mitk namespace
81 #endif // __mitkToFNrrdImageWriter_h
std::ofstream m_RGBOutfile
file for intensity image
DataCollection - Class to facilitate loading/accessing structured data.
Writer class for ToF images.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Writer class for ToF nrrd images.
std::ofstream m_DistanceOutfile
file for distance image
std::ofstream m_IntensityOutfile
file for intensity image
std::ofstream m_AmplitudeOutfile
file for amplitude image