Skip to content

Commit

Permalink
BUG: skip measurements that cause issues on write
Browse files Browse the repository at this point in the history
This came up with "nan" generated by PET measurements plugin.

Related issue: QIICR/QuantitativeReporting#186
  • Loading branch information
fedorov committed Aug 24, 2017
1 parent 87fce09 commit 033eb8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/sr/tid1500writer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ int main(int argc, char** argv){
// TODO - add measurement method and derivation!
const CMR_TID1411_in_TID1500::MeasurementValue numValue(measurement["value"].asCString(), json2cev(measurement["units"]));

CHECK_COND(measurements.addMeasurement(json2cev(measurement["quantity"]), numValue));
if(measurements.addMeasurement(json2cev(measurement["quantity"]), numValue)){
std::cerr << "ERROR: Skipping measurement with the value of " << measurement["value"].asCString() << std::endl;
continue;
}

if(measurement.isMember("derivationModifier")){
CHECK_COND(measurements.getMeasurement().setDerivation(json2cev(measurement["derivationModifier"])));
Expand Down

0 comments on commit 033eb8b

Please sign in to comment.