MCPcopy Create free account
hub / github.com/SatDump/SatDump / updateImage

Method updateImage

src-interface/viewer/image_handler.cpp:93–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 15

median_blurFunction · 0.85
kuwahara_filterFunction · 0.85
equalizeFunction · 0.85
white_balanceFunction · 0.85
linear_invertFunction · 0.85
normalizeFunction · 0.85
brightness_contrastFunction · 0.85
remove_backgroundFunction · 0.85
setupProjectionFunctionFunction · 0.85
radiance_to_temperatureFunction · 0.85
has_calibationMethod · 0.80

Tested by

no test coverage detected