MCPcopy Create free account
hub / github.com/Theverat/NormalmapGenerator / displayChannelIntensity

Method displayChannelIntensity

src_gui/mainwindow.cpp:772–788  ·  view source on GitHub ↗

displays single color channels of the image (handled by an intensitymap)

Source from the content-addressed store, hash-verified

770
771//displays single color channels of the image (handled by an intensitymap)
772void MainWindow::displayChannelIntensity() {
773 if(input.isNull())
774 return;
775
776 IntensityMap temp;
777 if(ui->radioButton_displayRed->isChecked())
778 temp = IntensityMap(input, IntensityMap::AVERAGE, true, false, false, false);
779 else if(ui->radioButton_displayGreen->isChecked())
780 temp = IntensityMap(input, IntensityMap::AVERAGE, false, true, false, false);
781 else if(ui->radioButton_displayBlue->isChecked())
782 temp = IntensityMap(input, IntensityMap::AVERAGE, false, false, true, false);
783 else
784 temp = IntensityMap(input, IntensityMap::AVERAGE, false, false, false, true);
785
786 this->channelIntensity = temp.convertToQImage();
787 preview(0);
788}
789
790//automatically update the preview if the calculation took only a certain amount of time
791//in milliseconds, e.g. 500 (0.5 seconds)

Callers

nothing calls this directly

Calls 2

IntensityMapClass · 0.85
convertToQImageMethod · 0.80

Tested by

no test coverage detected