3 #include "ui_imagewidget.h" 9 ui->graphicsView->setScene( m_scene );
11 QPalette p( palette( ) );
13 setAutoFillBackground(
true );
24 ui->frameControls->hide( );
28 ui->frameControls->show( );
32 if( ui->graphicsView->scene( ) ) {
33 ui->graphicsView->scene( )->setBackgroundBrush( color );
42 return( ui->graphicsView );
46 return( m_viewNumber );
55 throw std::invalid_argument(
BIAL_ERROR(
"start should be smaller than end" ) );
57 ui->spinBox->setMinimum( start );
58 ui->spinBox->setMaximum( end );
60 ui->horizontalSlider->setMinimum( start );
61 ui->horizontalSlider->setMaximum( end );
63 ui->spinBox->setEnabled(
false );
64 ui->horizontalSlider->setEnabled(
false );
69 if( ui->spinBox->value( ) != slice ) {
70 ui->spinBox->setValue( slice );
72 if( ui->horizontalSlider->value( ) != slice ) {
73 ui->horizontalSlider->setValue( slice );
81 void ImageWidget::on_spinBox_valueChanged(
int position ) {
85 void ImageWidget::on_rotateButton_clicked( ) {
86 emit
rotate( m_viewNumber );
89 void ImageWidget::on_horizontalSlider_valueChanged(
int position ) {
93 void ImageWidget::on_flip_h_button_clicked( ) {
94 emit
fliph( m_viewNumber );
97 void ImageWidget::on_flip_v_button_clicked( ) {
98 emit
flipv( m_viewNumber );
AdjacencyIterator end(const Adjacency &adj, const Vector< D > &vct, size_t pixel_index)
Returns an iterator to position after the end of elements.
#define BIAL_ERROR(exp)
Use BIAL_ERROR to compose runtime error messages. Note that ERROR generates a string, instead of a stream, because it is better to throw an exception, rather than exiting the program. This way, the exception may be threated by a higher level program, like an user IDE.
Content: Commonly used macros, types, static variables and functions. Description: Some macros used...
void dropImage(const QString &filePath)
Image< D > Background(const Image< D > &img)
Segments the darker clusters of the image, supposedly belonging to the background.
void dropFolder(const QString &folderPath)