Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkDiffusionHeaderDICOMFileReader.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 
17 #ifndef MITKDIFFUSIONHEADERFILEREADER_H
18 #define MITKDIFFUSIONHEADERFILEREADER_H
19 
21 #include <mitkCommon.h>
22 
23 #include <itkLightObject.h>
24 #include <itkObjectFactory.h>
25 
26 #include "gdcmScanner.h"
27 #include "gdcmReader.h"
28 #include <vnl/vnl_vector_fixed.h>
29 
30 
31 namespace mitk
32 {
33 
38 {
40  : b_value(0),
41  baseline(false),
42  isotropic(false)
43  {
44  g_vector.fill(0);
45  }
46 
47  void Print()
48  {
49  MITK_INFO << " DiffusionImageHeaderInformation : \n"
50  << " : b value : " << b_value << "\n"
51  << " : gradient : " << g_vector << "\n"
52  << " : isotropic : " << isotropic << "\n --- \n";
53  }
54 
55  unsigned int b_value;
56  vnl_vector_fixed< double, 3> g_vector;
57  bool baseline;
58  bool isotropic;
59 };
60 
63 {
64  unsigned long n_images;
66 };
67 
68 
69 
78  : public itk::LightObject
79 {
80 public:
81 
82  typedef std::vector< DiffusionImageDICOMHeaderInformation > DICOMHeaderListType;
83 
85  itkSimpleNewMacro( Self )
86 
91  virtual bool ReadDiffusionHeader( std::string ){ return false; }
92 
93  DICOMHeaderListType GetHeaderInformation();
94 
95 protected:
97 
99 
100  DICOMHeaderListType m_HeaderInformationList;
101 };
102 
113 bool RevealBinaryTag(const gdcm::Tag tag, const gdcm::DataSet& dataset, std::string& target);
114 
115 bool RevealBinaryTagC(const gdcm::Tag tag, const gdcm::DataSet& dataset, char* target_array );
116 
117 
118 } // end namespace mitk
119 
120 #endif // MITKDIFFUSIONHEADERFILEREADER_H
#define MITK_INFO
Definition: mitkLogMacros.h:22
bool RevealBinaryTag(const gdcm::Tag tag, const gdcm::DataSet &dataset, std::string &target)
Retrieve the value of a gdcm tag to the given string.
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKDIFFUSIONCORE_EXPORT
Abstract class for all vendor specific diffusion file header reader.
The DiffusionImageHeaderInformation struct.
std::vector< DiffusionImageDICOMHeaderInformation > DICOMHeaderListType
bool RevealBinaryTagC(const gdcm::Tag tag, const gdcm::DataSet &dataset, char *target_array)
mitkClassMacroItkParent(DiffusionHeaderDICOMFileReader, itk::LightObject) itkSimpleNewMacro(Self) virtual bool ReadDiffusionHeader(std
IsDiffusionHeader Parse the given dicom file and collect the special diffusion image information...