#include <mainwindow.h>
Public Member Functions | |
MainWindow (QWidget *parent=0) | |
~MainWindow () | |
void | mask_pixmap () |
void | undo_mask_pixmap () |
void | make_color_mask () |
void | clear_many_pixel () |
void | clear_many_pixel_1 () |
void | mask_many_pixel () |
void | mask_many_pixel_1 () |
void | clear_individual_pixel () |
void | mask_invidual_pixel () |
void | insert_wind_emitter () |
Data Fields | |
QPixmap | pixmap |
QVector< QPoint > | emitter_points |
myscene * | scene |
colormask * | mycolormask |
tutorial * | mytutorial |
about * | myabout |
QString | file |
QString | file_save |
QString | file_masked_image_save |
QPointF | point1 |
QPointF | point2 |
QColor | final_mark_color |
QColor | emitter_color_x |
QColor | emitter_color_mx |
QColor | emitter_color_y |
QColor | emitter_color_my |
int | imagewidth |
int | imageheight |
int | pixmapwidth |
int | pixmapheight |
int | maskwidth |
int | counter |
int | counter_wind_emitter |
int | counter_first_emitter |
int | toCheck |
int | alpha |
int | alpha_special_marking |
int | alpha_emitter |
bool | mousebutton_pressed |
Data Fields inherited from image_stack | |
QVector< QImage > | imagestack |
QImage | image |
QImage | image1 |
QImage | wind_emitter |
QImage | wind_emitter_save |
Protected Member Functions | |
void | resizeEvent (QResizeEvent *event) |
void | keyPressEvent (QKeyEvent *event) |
Private Slots | |
void | openfile () |
void | scale_to_width () |
void | scale_original () |
void | zoom_in () |
void | zoom_out () |
void | memo_color_mask () |
void | clear_last_color_mask () |
void | open_color_mask () |
void | quit () |
void | value_change_int () |
void | reset_mask () |
void | savefile () |
void | savefile_soundemitter () |
void | save_wind_emitter () |
void | save_masked_image () |
void | invert_mask () |
void | open_about () |
void | open_tutorial () |
void | wind_emitter_on () |
void | wind_emitter_off () |
void | reset_wind_emitter () |
void | scale_image () |
void | rotate_by_90 () |
Private Attributes | |
Ui::MainWindow * | ui |
Definition at line 19 of file mainwindow.h.
|
explicit |
Sets up the Mainwindow object
Definition at line 37 of file mainwindow.cpp.
References Ui_MainWindow::actionAbout, Ui_MainWindow::actionLoad_Image, Ui_MainWindow::actionQuit_tychoICGEN, Ui_MainWindow::actionSave_Boundary, Ui_MainWindow::actionSave_Masked_Image, Ui_MainWindow::actionSave_Sound_Emitter, Ui_MainWindow::actionSave_Wind_Emitter, Ui_MainWindow::actionTutorial, alpha, alpha_emitter, alpha_special_marking, blue_checked, blue_low, blue_up, clear_last_color_mask(), Ui_MainWindow::ColorMask, colormask_counter, counter, counter_first_emitter, counter_wind_emitter, emitter_color_mx, emitter_color_my, emitter_color_x, emitter_color_y, final_mark_color, green_checked, green_low, green_up, Ui_MainWindow::image_height, Ui_MainWindow::image_width, invert_mask(), Ui_MainWindow::invertmask, memo_color_mask(), Ui_MainWindow::memo_mask, no_image, open_about(), open_color_mask(), open_tutorial(), openfile(), Ui_MainWindow::original, quit(), red_checked, red_low, red_up, Ui_MainWindow::remove_mask, Ui_MainWindow::reset_mask, reset_mask(), reset_wind_emitter(), Ui_MainWindow::resetwindemitter, Ui_MainWindow::rotate_by_90, rotate_by_90(), save_masked_image(), save_wind_emitter(), savefile(), savefile_soundemitter(), scale_image(), scale_original(), Ui_MainWindow::scale_to_width, scale_to_width(), Ui_MainWindow::setupUi(), toCheck, ui, value, value_change_int(), wind_emitter_off(), wind_emitter_on(), Ui_MainWindow::windemitter, Ui_MainWindow::zoom_in, zoom_in(), Ui_MainWindow::zoom_out, and zoom_out().
MainWindow::~MainWindow | ( | ) |
void MainWindow::clear_individual_pixel | ( | ) |
Clears indiviudal pixels
Definition at line 95 of file color_segmentation.cpp.
References Ui_MainWindow::graphicsView, image_stack::image, image_stack::imagestack, no_image, pixmap, point, scene, and ui.
Referenced by keyPressEvent().
|
privateslot |
Deletes the last image in the stack
Definition at line 77 of file color_segmentation.cpp.
References Ui_MainWindow::graphicsView, image_stack::image, image_stack::imagestack, pixmap, scene, ui, and image_stack::wind_emitter.
Referenced by MainWindow().
void MainWindow::clear_many_pixel | ( | ) |
Clears many pixels until a mask is found
Definition at line 370 of file color_segmentation.cpp.
References alpha, image_stack::image, image_stack::imagestack, and point.
Referenced by clear_many_pixel_1().
void MainWindow::clear_many_pixel_1 | ( | ) |
Clears islands in the mask
Definition at line 113 of file color_segmentation.cpp.
References alpha, alpha_special_marking, clear_many_pixel(), Ui_MainWindow::graphicsView, image_stack::image, image_stack::imagestack, pixmap, point, scene, ui, and image_stack::wind_emitter.
Referenced by keyPressEvent().
void MainWindow::insert_wind_emitter | ( | ) |
Definition at line 47 of file wind_emitter.cpp.
References counter_wind_emitter, emitter_color_mx, emitter_color_my, emitter_color_x, emitter_color_y, final_mark_color, Ui_MainWindow::graphicsView, Ui_MainWindow::mxdir, Ui_MainWindow::mydir, no_image, pixmap, point, point1, point2, scene, ui, image_stack::wind_emitter, image_stack::wind_emitter_save, Ui_MainWindow::xdir, and Ui_MainWindow::ydir.
Referenced by keyPressEvent().
|
privateslot |
Invert the mask
Definition at line 794 of file color_segmentation.cpp.
References final_mark_color, Ui_MainWindow::graphicsView, image_stack::image, image_stack::imagestack, pixmap, scene, ui, and image_stack::wind_emitter.
Referenced by MainWindow().
|
protected |
All the keypress events are defined here
Definition at line 148 of file mainwindow.cpp.
References clear_individual_pixel(), clear_many_pixel_1(), Ui_MainWindow::clearmode, Ui_MainWindow::clearpixel, counter_first_emitter, image_stack::imagestack, insert_wind_emitter(), make_color_mask(), Ui_MainWindow::maksmode, mask_invidual_pixel(), mask_many_pixel_1(), Ui_MainWindow::maskislands, Ui_MainWindow::maskpixel, pick_blue, pick_green, pick_red, point, ui, Ui_MainWindow::windemitter, zoom_in(), and zoom_out().
void MainWindow::make_color_mask | ( | ) |
This is tychoICGEN - color segmentation file. The core is a maksing of pixels in the same color-range.
Masks the pixels in the given color range.
Definition at line 22 of file color_segmentation.cpp.
References blue_low, blue_up, final_mark_color, Ui_MainWindow::graphicsView, green_low, green_up, image_stack::image, image_stack::imagestack, no_image, pick_blue, pick_green, pick_red, pixmap, red_low, red_up, scene, ui, and image_stack::wind_emitter.
Referenced by keyPressEvent(), and value_change_int().
void MainWindow::mask_invidual_pixel | ( | ) |
Masks individual pixels
Definition at line 777 of file color_segmentation.cpp.
References final_mark_color, Ui_MainWindow::graphicsView, image_stack::image, no_image, pixmap, point, scene, and ui.
Referenced by keyPressEvent().
void MainWindow::mask_many_pixel | ( | ) |
Masks many pixels until a mask pixel is found
Definition at line 705 of file color_segmentation.cpp.
References alpha, final_mark_color, image_stack::image, and point.
Referenced by mask_many_pixel_1().
void MainWindow::mask_many_pixel_1 | ( | ) |
Masks many pixels, good to mask islands in the mask
Definition at line 445 of file color_segmentation.cpp.
References alpha, alpha_special_marking, final_mark_color, Ui_MainWindow::graphicsView, image_stack::image, image_stack::imagestack, mask_many_pixel(), pixmap, point, scene, ui, and image_stack::wind_emitter.
Referenced by keyPressEvent().
void MainWindow::mask_pixmap | ( | ) |
|
privateslot |
A maks is put on the mask-stack
Definition at line 56 of file color_segmentation.cpp.
References counter, Ui_MainWindow::graphicsView, image_stack::image, image_stack::imagestack, Ui_MainWindow::invertmask, pixmap, scene, and ui.
Referenced by MainWindow().
|
privateslot |
Opens the about window
Definition at line 258 of file mainwindow.cpp.
References myabout.
Referenced by MainWindow().
|
privateslot |
Open the colormask window
Definition at line 248 of file mainwindow.cpp.
References mycolormask.
Referenced by MainWindow().
|
privateslot |
Opens the tutorial window
Definition at line 268 of file mainwindow.cpp.
References mytutorial.
Referenced by MainWindow().
|
privateslot |
Open / Save files
Opens an Image
Definition at line 17 of file openfile.cpp.
References file, Ui_MainWindow::graphicsView, image_stack::image, Ui_MainWindow::image_depth, Ui_MainWindow::image_height, Ui_MainWindow::image_width, imageheight, image_stack::imagestack, imagewidth, no_image, pixmap, pixmapheight, pixmapwidth, Ui_MainWindow::reset_mask, scene, ui, image_stack::wind_emitter, and image_stack::wind_emitter_save.
Referenced by MainWindow().
|
privateslot |
Standard quit
Definition at line 279 of file mainwindow.cpp.
Referenced by MainWindow().
|
privateslot |
resets the mask
Definition at line 206 of file mainwindow.cpp.
References counter, counter_first_emitter, counter_wind_emitter, file, Ui_MainWindow::graphicsView, image_stack::image, Ui_MainWindow::image_depth, Ui_MainWindow::image_height, Ui_MainWindow::image_width, imageheight, image_stack::imagestack, imagewidth, Ui_MainWindow::invertmask, pixmap, pixmapheight, pixmapwidth, Ui_MainWindow::reset_mask, scene, ui, image_stack::wind_emitter, and image_stack::wind_emitter_save.
Referenced by MainWindow().
|
privateslot |
Definition at line 202 of file wind_emitter.cpp.
References Ui_MainWindow::graphicsView, image_stack::image, no_image, pixmap, scene, ui, image_stack::wind_emitter, and image_stack::wind_emitter_save.
Referenced by MainWindow().
|
protected |
Changes the size of the viewer at resizing the mainwindiw
Definition at line 136 of file mainwindow.cpp.
References Ui_MainWindow::graphicsView, and ui.
|
privateslot |
*rotate by 90 degree
Definition at line 322 of file mainwindow.cpp.
References Ui_MainWindow::graphicsView, and ui.
Referenced by MainWindow().
|
privateslot |
saves a masked image for further masking action
Definition at line 63 of file openfile.cpp.
References file, file_masked_image_save, image_stack::image, and no_image.
Referenced by MainWindow().
|
privateslot |
Saves a TYCHO Wind-Emitter file
Definition at line 180 of file openfile.cpp.
References emitter_color_mx, emitter_color_my, emitter_color_x, emitter_color_y, file, file_save, image_stack::image, Ui_MainWindow::image_depth, no_image, ui, and image_stack::wind_emitter_save.
Referenced by MainWindow().
|
privateslot |
Saves a TYCHO boundary file
Definition at line 80 of file openfile.cpp.
References file, file_save, final_mark_color, image_stack::image, Ui_MainWindow::image_depth, image_stack::imagestack, no_image, and ui.
Referenced by MainWindow().
|
privateslot |
Saves a TYCHO soundemitter file
Definition at line 130 of file openfile.cpp.
References file, file_save, final_mark_color, image_stack::image, Ui_MainWindow::image_depth, image_stack::imagestack, no_image, and ui.
Referenced by MainWindow().
|
privateslot |
Rescale the image
Definition at line 287 of file mainwindow.cpp.
References Ui_MainWindow::graphicsView, image_stack::image, Ui_MainWindow::image_height, Ui_MainWindow::image_width, image_stack::imagestack, pixmap, pixmapheight, pixmapwidth, Ui_MainWindow::reset_mask, scene, ui, image_stack::wind_emitter, and image_stack::wind_emitter_save.
Referenced by MainWindow().
|
privateslot |
Definition at line 22 of file viewing.cpp.
References Ui_MainWindow::graphicsView, and ui.
Referenced by MainWindow().
|
privateslot |
Zooming and viewing
Definition at line 15 of file viewing.cpp.
References Ui_MainWindow::graphicsView, image_stack::image, and ui.
Referenced by MainWindow().
void MainWindow::undo_mask_pixmap | ( | ) |
|
privateslot |
checks when the colormask values are changed
Definition at line 195 of file mainwindow.cpp.
References make_color_mask(), toCheck, and value.
Referenced by MainWindow().
|
privateslot |
Definition at line 29 of file wind_emitter.cpp.
References Ui_MainWindow::mxdir, Ui_MainWindow::mydir, Ui_MainWindow::resetwindemitter, ui, Ui_MainWindow::xdir, and Ui_MainWindow::ydir.
Referenced by MainWindow().
|
privateslot |
Setting up a wind-emitter
Definition at line 16 of file wind_emitter.cpp.
References Ui_MainWindow::mxdir, Ui_MainWindow::mydir, Ui_MainWindow::resetwindemitter, ui, Ui_MainWindow::xdir, and Ui_MainWindow::ydir.
Referenced by MainWindow().
|
privateslot |
Definition at line 29 of file viewing.cpp.
References Ui_MainWindow::graphicsView, image_stack::image, ui, and Ui_MainWindow::zoom_factor.
Referenced by keyPressEvent(), and MainWindow().
|
privateslot |
Definition at line 40 of file viewing.cpp.
References Ui_MainWindow::graphicsView, image_stack::image, ui, and Ui_MainWindow::zoom_factor.
Referenced by keyPressEvent(), and MainWindow().
int MainWindow::alpha |
Definition at line 52 of file mainwindow.h.
Referenced by clear_many_pixel(), clear_many_pixel_1(), MainWindow(), mask_many_pixel(), and mask_many_pixel_1().
int MainWindow::alpha_emitter |
Definition at line 54 of file mainwindow.h.
Referenced by MainWindow().
int MainWindow::alpha_special_marking |
Definition at line 53 of file mainwindow.h.
Referenced by clear_many_pixel_1(), MainWindow(), and mask_many_pixel_1().
int MainWindow::counter |
Definition at line 48 of file mainwindow.h.
Referenced by MainWindow(), memo_color_mask(), and reset_mask().
int MainWindow::counter_first_emitter |
Definition at line 50 of file mainwindow.h.
Referenced by keyPressEvent(), MainWindow(), and reset_mask().
int MainWindow::counter_wind_emitter |
Definition at line 49 of file mainwindow.h.
Referenced by insert_wind_emitter(), MainWindow(), and reset_mask().
QColor MainWindow::emitter_color_mx |
Definition at line 39 of file mainwindow.h.
Referenced by insert_wind_emitter(), MainWindow(), and save_wind_emitter().
QColor MainWindow::emitter_color_my |
Definition at line 41 of file mainwindow.h.
Referenced by insert_wind_emitter(), MainWindow(), and save_wind_emitter().
QColor MainWindow::emitter_color_x |
Definition at line 38 of file mainwindow.h.
Referenced by insert_wind_emitter(), MainWindow(), and save_wind_emitter().
QColor MainWindow::emitter_color_y |
Definition at line 40 of file mainwindow.h.
Referenced by insert_wind_emitter(), MainWindow(), and save_wind_emitter().
QVector<QPoint> MainWindow::emitter_points |
Definition at line 28 of file mainwindow.h.
QString MainWindow::file |
Definition at line 33 of file mainwindow.h.
Referenced by openfile(), reset_mask(), save_masked_image(), save_wind_emitter(), savefile(), and savefile_soundemitter().
QString MainWindow::file_masked_image_save |
Definition at line 35 of file mainwindow.h.
Referenced by save_masked_image().
QString MainWindow::file_save |
Definition at line 34 of file mainwindow.h.
Referenced by save_wind_emitter(), savefile(), and savefile_soundemitter().
QColor MainWindow::final_mark_color |
Definition at line 37 of file mainwindow.h.
Referenced by insert_wind_emitter(), invert_mask(), MainWindow(), make_color_mask(), mask_invidual_pixel(), mask_many_pixel(), mask_many_pixel_1(), savefile(), and savefile_soundemitter().
int MainWindow::imageheight |
Definition at line 44 of file mainwindow.h.
Referenced by openfile(), and reset_mask().
int MainWindow::imagewidth |
Definition at line 43 of file mainwindow.h.
Referenced by openfile(), and reset_mask().
int MainWindow::maskwidth |
Definition at line 47 of file mainwindow.h.
bool MainWindow::mousebutton_pressed |
Definition at line 55 of file mainwindow.h.
about* MainWindow::myabout |
Definition at line 32 of file mainwindow.h.
Referenced by open_about().
colormask* MainWindow::mycolormask |
Definition at line 30 of file mainwindow.h.
Referenced by open_color_mask().
tutorial* MainWindow::mytutorial |
Definition at line 31 of file mainwindow.h.
Referenced by open_tutorial().
QPixmap MainWindow::pixmap |
Definition at line 27 of file mainwindow.h.
Referenced by clear_individual_pixel(), clear_last_color_mask(), clear_many_pixel_1(), insert_wind_emitter(), invert_mask(), make_color_mask(), mask_invidual_pixel(), mask_many_pixel_1(), memo_color_mask(), openfile(), reset_mask(), reset_wind_emitter(), and scale_image().
int MainWindow::pixmapheight |
Definition at line 46 of file mainwindow.h.
Referenced by openfile(), reset_mask(), and scale_image().
int MainWindow::pixmapwidth |
Definition at line 45 of file mainwindow.h.
Referenced by openfile(), reset_mask(), and scale_image().
QPointF MainWindow::point1 |
Definition at line 36 of file mainwindow.h.
Referenced by insert_wind_emitter().
QPointF MainWindow::point2 |
Definition at line 36 of file mainwindow.h.
Referenced by insert_wind_emitter().
myscene* MainWindow::scene |
Definition at line 29 of file mainwindow.h.
Referenced by clear_individual_pixel(), clear_last_color_mask(), clear_many_pixel_1(), insert_wind_emitter(), invert_mask(), make_color_mask(), mask_invidual_pixel(), mask_many_pixel_1(), memo_color_mask(), openfile(), reset_mask(), reset_wind_emitter(), and scale_image().
int MainWindow::toCheck |
Definition at line 51 of file mainwindow.h.
Referenced by MainWindow(), and value_change_int().
|
private |
Definition at line 71 of file mainwindow.h.
Referenced by clear_individual_pixel(), clear_last_color_mask(), clear_many_pixel_1(), insert_wind_emitter(), invert_mask(), keyPressEvent(), MainWindow(), make_color_mask(), mask_invidual_pixel(), mask_many_pixel_1(), memo_color_mask(), openfile(), reset_mask(), reset_wind_emitter(), resizeEvent(), rotate_by_90(), save_wind_emitter(), savefile(), savefile_soundemitter(), scale_image(), scale_original(), scale_to_width(), wind_emitter_off(), wind_emitter_on(), zoom_in(), zoom_out(), and ~MainWindow().