| 91 | } |
| 92 | |
| 93 | void ImageViewerHandler::updateImage() |
| 94 | { |
| 95 | if (select_image_id == 0) |
| 96 | { |
| 97 | current_image = rgb_image; |
| 98 | } |
| 99 | else if (select_image_id - 1 < (int)products->images.size()) |
| 100 | { |
| 101 | if (active_channel_calibrated && products->has_calibation()) |
| 102 | { |
| 103 | if (products->get_calibration_type(active_channel_id) && is_temp) |
| 104 | current_image = products->get_calibrated_image(select_image_id - 1, &rgb_progress, |
| 105 | ImageProducts::CALIB_VTYPE_TEMPERATURE, temp_ranges[select_image_id - 1]); |
| 106 | else |
| 107 | current_image = products->get_calibrated_image(select_image_id - 1, &rgb_progress, |
| 108 | ImageProducts::CALIB_VTYPE_AUTO, radiance_ranges[select_image_id - 1]); |
| 109 | update_needed = false; |
| 110 | } |
| 111 | else |
| 112 | current_image = products->images[select_image_id - 1].image; |
| 113 | current_proj_metadata = products->get_channel_proj_metdata(select_image_id - 1); |
| 114 | } |
| 115 | |
| 116 | if (select_image_id != 0) |
| 117 | current_timestamps = products->get_timestamps(select_image_id - 1); |
| 118 | |
| 119 | if (median_blur) |
| 120 | image::median_blur(current_image); |
| 121 | |
| 122 | if (despeckle) |
| 123 | image::kuwahara_filter(current_image); |
| 124 | |
| 125 | if (rotate_image) |
| 126 | current_image.mirror(true, true); |
| 127 | |
| 128 | if (equalize_image) |
| 129 | image::equalize(current_image); |
| 130 | |
| 131 | if (individual_equalize_image) |
| 132 | image::equalize(current_image, true); |
| 133 | |
| 134 | if (white_balance_image) |
| 135 | image::white_balance(current_image); |
| 136 | |
| 137 | if (invert_image) |
| 138 | image::linear_invert(current_image); |
| 139 | |
| 140 | if (normalize_image) |
| 141 | image::normalize(current_image); |
| 142 | |
| 143 | if (manual_brightness_contrast) |
| 144 | image::brightness_contrast(current_image, manual_brightness_contrast_brightness, manual_brightness_contrast_contrast); |
| 145 | |
| 146 | // TODO : Cleanup? |
| 147 | if (using_lut) |
| 148 | { |
| 149 | if (current_image.channels() < 3) |
| 150 | current_image.to_rgb(); |
nothing calls this directly
no test coverage detected