Medical Imaging Interaction Toolkit  2023.12.00
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 {
31  class MITKTOFHARDWARE_EXPORT ToFNrrdImageWriter : public ToFImageWriter
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
mitk::ToFImageWriter
Writer class for ToF images.
Definition: mitkToFImageWriter.h:34
mitk::ToFNrrdImageWriter::m_DistanceOutfile
std::ofstream m_DistanceOutfile
file for distance image
Definition: mitkToFNrrdImageWriter.h:53
mitk::ToFNrrdImageWriter
Writer class for ToF nrrd images.
Definition: mitkToFNrrdImageWriter.h:31
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitkToFImageWriter.h
mitk::ToFNrrdImageWriter::m_AmplitudeOutfile
std::ofstream m_AmplitudeOutfile
file for amplitude image
Definition: mitkToFNrrdImageWriter.h:54
mitk::ToFNrrdImageWriter::m_RGBOutfile
std::ofstream m_RGBOutfile
file for intensity image
Definition: mitkToFNrrdImageWriter.h:56
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::ToFNrrdImageWriter::m_IntensityOutfile
std::ofstream m_IntensityOutfile
file for intensity image
Definition: mitkToFNrrdImageWriter.h:55