Medical Imaging Interaction Toolkit  2022.04.99-194dd5d8
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 #ifndef __mitkToFNrrdImageWriter_h
13 #define __mitkToFNrrdImageWriter_h
14 
15 #include <MitkToFHardwareExports.h>
16 #include "mitkToFImageWriter.h"
17 
18 #include <fstream>
19 
20 namespace mitk
21 {
32  {
33  public:
35  itkFactorylessNewMacro(Self);
36  itkCloneMacro(Self);
37 
41  void Open() override;
45  void Close() override;
49  void Add(float* distanceFloatData, float* amplitudeFloatData, float* intensityFloatData, unsigned char* rgbData=nullptr) override;
50 
51  protected:
52 
53  std::ofstream m_DistanceOutfile;
54  std::ofstream m_AmplitudeOutfile;
55  std::ofstream m_IntensityOutfile;
56  std::ofstream m_RGBOutfile;
57 
58  private:
59 
61  ~ToFNrrdImageWriter() override;
62 
66  void OpenStreamFile(std::ofstream &outfile, std::string outfileName);
70  void CloseStreamFile(std::ofstream &outfile, std::string fileName);
74  void ConvertStreamToNrrdFormat( std::string fileName );
75  };
76 } //END mitk namespace
77 #endif // __mitkToFNrrdImageWriter_h
std::ofstream m_RGBOutfile
file for intensity image
#define MITKTOFHARDWARE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
Writer class for ToF images.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
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