bool check_input (const Item& item) { if (ipeaks_vox) { (*ipeaks_vox)[0] = item.pos[0]; (*ipeaks_vox)[1] = item.pos[1]; (*ipeaks_vox)[2] = item.pos[2]; (*ipeaks_vox)[3] = 0; if (std::isnan (value_type (ipeaks_vox->value()))) return true; } bool no_peaks = true; for (size_t i = 0; i < item.data.size(); i++) { if (std::isnan (item.data[i])) return true; if (no_peaks) if (i && item.data[i] != 0.0) no_peaks = false; } return no_peaks; }
bool check_input (const Item& item) { if (ipeaks_vox) { ipeaks_vox->index(0) = item.pos[0]; ipeaks_vox->index(1) = item.pos[1]; ipeaks_vox->index(2) = item.pos[2]; ipeaks_vox->index(3) = 0; if (std::isnan (value_type (ipeaks_vox->value()))) return true; } bool no_peaks = true; for (size_t i = 0; i < size_t(item.data.size()); i++) { if (std::isnan (item.data[i])) return true; if (no_peaks) if (i && item.data[i] != 0.0) no_peaks = false; } return no_peaks; }