+
+ GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f);
+ void *imageData;
+ int dataSize;
+
+ int subImDimX = nX;
+ int subImDimY = nY;
+
+ if (roi)
+ {
+ std::cout << " " << boundRoiVal[0] << " " << boundRoiVal[1] << " " << boundRoiVal[2] << " " <<
+ boundRoiVal[3] <<std::endl;
+ if (boundRoiVal[0]<0 || boundRoiVal[0]>=nX)
+ {
+ std::cout << "xBegin out of bounds; 'roi' ignored" << std::endl;
+ fail = true;
+ }
+ if (boundRoiVal[1]<0 || boundRoiVal[1]>=nX)
+ {
+ std::cout << "xEnd out of bounds; 'roi' ignored" << std::endl;
+ fail = true;
+ }
+ if (boundRoiVal[0] > boundRoiVal[1])
+ {
+ std::cout << "xBegin greater than xEnd; 'roi' ignored" << std::endl;
+ fail = true;
+ }
+
+ if (boundRoiVal[2]<0 || boundRoiVal[2]>=nY)
+ {
+ std::cout << "yBegin out of bounds; 'roi' ignored" << std::endl;
+ fail = true;
+ }
+ if (boundRoiVal[3]<0 || boundRoiVal[3]>=nY)
+ {
+ std::cout << "yEnd out of bounds; 'roi' ignored" << std::endl;
+ fail = true;
+ }
+ if (boundRoiVal[2] > boundRoiVal[3])
+ {
+ std::cout << "yBegin greater than yEnd; 'roi' ignored" << std::endl;
+ fail = true;
+ }