+#endif
+
+#if defined USE_GDCM2
+void GetInfoGdcmReader::Process()
+{
+ // Reset de reader, f
+ bbUserFinalizeProcessing();
+ gdcm::Reader *read = new gdcm::Reader();
+ read->SetFileName( bbGetInputIn().c_str());
+
+ bool res = read->Read();
+ if ( !res )
+ {
+ delete read;
+ bbSetOutputOut(0);
+ return;
+ }
+
+ // Get info from THE image file (only *one* as input)
+ const gdcm::File &f = read->GetFile();
+
+ // Image Orientation (Patient)
+ int i;
+ std::vector<double> v_iop;
+ const gdcm::DataElement &deIop = f.GetDataSet().GetDataElement(gdcm::Tag(0x0020, 0x0037));
+ std::stringstream ss;
+ deIop.GetValue().Print(ss);
+ gdcm::Element<gdcm::VR::DS,gdcm::VM::VM6> iop;
+ iop.Read( ss );
+ for(i=0; i< 6; i++)
+ v_iop.push_back((float)(iop[i]));
+ bbSetOutputIOP(v_iop );
+
+ // Image Position (Patient)
+ std::vector<double> v_ipp;
+ const gdcm::DataElement &deIpp = f.GetDataSet().GetDataElement(gdcm::Tag((0x0020,0x0032)));
+ deIpp.GetValue().Print(ss);
+ gdcm::Element<gdcm::VR::DS,gdcm::VM::VM3> ipp;
+ ipp.Read( ss );
+ for(i=0; i< 3; i++)
+ v_ipp.push_back((float)(ipp[i]));
+ bbSetOutputIPP(v_ipp );
+
+ std::vector<double> v_pixelspacing = gdcm::ImageHelper::GetSpacingValue(f);
+ bbSetOutputPixelSpacing(v_pixelspacing);
+
+ //double interslice; ?? ==1 NO?
+ bbSetOutputInterSlice(v_pixelspacing[2]);
+
+ reader = vtkGDCMImageReader::New();
+ reader->SetFileName( bbGetInputIn().c_str() );
+ reader->Update();
+ reader->GetOutput();
+ vtkIndent indent ;
+ reader->GetOutput()->PrintSelf(std::cout, indent);
+ bbSetOutputOut( reader->GetOutput() );
+}
+#endif
+