@@ -1334,12 +1334,11 @@ write_basic_interfile_PDFS_header(const string& header_file_name, const string&
1334
1334
else
1335
1335
{
1336
1336
// !author Parisa Khateri
1337
- const shared_ptr< const ProjDataInfoBlocksOnCylindrical> proj_data_info_sptr
1338
- = dynamic_pointer_cast<const ProjDataInfoBlocksOnCylindrical >(pdfs.get_proj_data_info_sptr ());
1337
+ // generic (and hence BlocksOnCylindrical) scanner
1338
+ const auto proj_data_info_sptr = dynamic_pointer_cast<const ProjDataInfoGeneric >(pdfs.get_proj_data_info_sptr ());
1339
1339
1340
1340
if (proj_data_info_sptr != NULL )
1341
1341
{
1342
- // BlocksOncylindrical scanners
1343
1342
output_header << " minimum ring difference per segment := " ;
1344
1343
{
1345
1344
std::vector<int >::const_iterator seg = segment_sequence.begin ();
@@ -1359,66 +1358,18 @@ write_basic_interfile_PDFS_header(const string& header_file_name, const string&
1359
1358
}
1360
1359
1361
1360
const Scanner& scanner = *proj_data_info_sptr->get_scanner_ptr ();
1362
- #if 0 // KT commented out. currently no get_ring_radius() anymore
1363
- if (fabs(proj_data_info_sptr->get_ring_radius()-
1364
- scanner.get_effective_ring_radius()) > .1)
1365
- warning("write_basic_interfile_PDFS_header: inconsistent effective ring radius:\n"
1366
- "\tproj_data_info has %g, scanner has %g.\n"
1367
- "\tThis really should not happen and signifies a bug.\n"
1368
- "\tYou will have a problem reading this data back in.",
1369
- proj_data_info_sptr->get_ring_radius(),
1370
- scanner.get_effective_ring_radius());
1371
- #endif
1372
- if (fabs (proj_data_info_sptr->get_ring_spacing () - scanner.get_ring_spacing ()) > .1 )
1373
- warning (" write_basic_interfile_PDFS_header: inconsistent ring spacing:\n "
1374
- " \t proj_data_info has %g, scanner has %g.\n "
1375
- " \t This really should not happen and signifies a bug.\n "
1376
- " \t You will have a problem reading this data back in." ,
1377
- proj_data_info_sptr->get_ring_spacing (),
1378
- scanner.get_ring_spacing ());
1379
1361
1380
1362
output_header << scanner.parameter_info ();
1381
1363
1382
- } // end of BlocksOnCylindrical scanner
1383
- else // generic scanner
1364
+ } // end generic scanner
1365
+ else if (!dynamic_pointer_cast< const ProjDataInfoSubsetByView>(pdfs. get_proj_data_info_sptr ()))
1384
1366
{
1385
- const shared_ptr<const ProjDataInfoGeneric> proj_data_info_sptr
1386
- = dynamic_pointer_cast<const ProjDataInfoGeneric>(pdfs.get_proj_data_info_sptr ());
1387
-
1388
- if (proj_data_info_sptr != NULL )
1389
- {
1390
- output_header << " minimum ring difference per segment := " ;
1391
- {
1392
- std::vector<int >::const_iterator seg = segment_sequence.begin ();
1393
- output_header << " { " << proj_data_info_sptr->get_min_ring_difference (*seg);
1394
- for (seg++; seg != segment_sequence.end (); seg++)
1395
- output_header << " ," << proj_data_info_sptr->get_min_ring_difference (*seg);
1396
- output_header << " }\n " ;
1397
- }
1398
-
1399
- output_header << " maximum ring difference per segment := " ;
1400
- {
1401
- std::vector<int >::const_iterator seg = segment_sequence.begin ();
1402
- output_header << " { " << proj_data_info_sptr->get_max_ring_difference (*seg);
1403
- for (seg++; seg != segment_sequence.end (); seg++)
1404
- output_header << " ," << proj_data_info_sptr->get_max_ring_difference (*seg);
1405
- output_header << " }\n " ;
1406
- }
1407
-
1408
- const Scanner& scanner = *proj_data_info_sptr->get_scanner_ptr ();
1409
-
1410
- output_header << scanner.parameter_info ();
1411
-
1412
- } // end generic scanner
1413
- else if (!dynamic_pointer_cast<const ProjDataInfoSubsetByView>(pdfs.get_proj_data_info_sptr ()))
1414
- {
1415
- error (" write_basic_interfile_PDFS_header: cannot write subset data yet. Sorry" );
1416
- }
1417
- else
1418
- {
1419
- error (" write_basic_interfile_PDFS_header: Error casting the projdata to one of its geometries: "
1420
- " Cylindrical/BlocksOnCylindrical/Generic" );
1421
- }
1367
+ error (" write_basic_interfile_PDFS_header: cannot write subset data yet. Sorry" );
1368
+ }
1369
+ else
1370
+ {
1371
+ error (" write_basic_interfile_PDFS_header: Error casting the projdata to one of its geometries: "
1372
+ " Cylindrical/BlocksOnCylindrical/Generic" );
1422
1373
}
1423
1374
}
1424
1375
0 commit comments