21 #include <vnl/vnl_math.h>
34 gdcm::Reader gdcmReader;
35 gdcmReader.SetFileName( filename.c_str() );
39 gdcm::Tag philips_bvalue_tag( 0x2001, 0x1003 );
48 if(
RevealBinaryTagC( philips_bvalue_tag, gdcmReader.GetFile().GetDataSet(), (
char*) &bvalue) )
51 header_info.
b_value = std::ceil( bvalue );
58 MITK_WARN(
"diffusion.dicomreader.philips") <<
"No b-value found. Most probably no diffusion-weighted image.";
62 gdcm::Tag philips_new_bvalue_tag( 0x0018,0x9087 );
64 if(
RevealBinaryTagC( philips_new_bvalue_tag, gdcmReader.GetFile().GetDataSet(), (
char*) &dbvalue) )
66 MITK_INFO(
"philips.dicom.diffusion.bvalue") << dbvalue;
76 MITK_INFO(
"philips.dicom.diffusion.gradientdir") <<
"Parsing gradient direction.";
78 gdcm::Tag philips_gradient_direction_new( 0x0018, 0x9089 );
79 double gr_dir_arr[3] = {1,0,-1};
81 if(
RevealBinaryTagC( philips_gradient_direction_new, gdcmReader.GetFile().GetDataSet(), (
char*) &gr_dir_arr ) )
83 MITK_INFO(
"philips.dicom.diffusion.gradient") <<
"(" << gr_dir_arr[0] <<
"," << gr_dir_arr[1] <<
"," <<gr_dir_arr[2] <<
")";
86 header_info.
g_vector.copy_in( &gr_dir_arr[0] );
94 this->m_HeaderInformationList.push_back( header_info );
static const std::string filename
MITKCORE_EXPORT const ScalarType eps
bool RevealBinaryTagC(const gdcm::Tag tag, const gdcm::DataSet &dataset, char *target_array)