#include <cimg_dependent.h>
Public Member Functions | |
UpdatableImage (const Image< double > &img, const char *name=0) | |
~UpdatableImage () | |
Destructor. This will also remove the Image<double> from screen for good. | |
void | update (const Image< double > &img, bool reshape=false) |
Update the displayed image. | |
void | interact () |
invoking this method will halt the program while the user is allowed to interact with the displayed image. | |
void | connect (UpdatableImage &rhs) |
connect this UpdatableImage with another one. | |
Private Attributes | |
Pimpl * | p_ |
This class is useful for debugging and demonstration purposes. Upon construction it immediately shows the concerned Image on the user display, where it remains as long as the constructed object exists. The image can be successively updated, allowing for slideshows or basic animations. The user can also be allowed basic interaction with the image, like resizing it or inspecting pixel values. Several UpdatableImages can also be connected, meaning that resizing one of them will automatically resize all the others, and inspecting pixel values in one will also return the corresponding pixel values in the connected UpdatableImages.
Definition at line 165 of file cimg_dependent.h.
lsseg::UpdatableImage::UpdatableImage | ( | const Image< double > & | img, | |
const char * | name = 0 | |||
) |
Upon construction, the image img
will immediately be displayed on the user's screen (and stay there). If name
points to a text string, the contents of that string will become the display window's name.
Definition at line 313 of file cimg_dependent.C.
lsseg::UpdatableImage::~UpdatableImage | ( | ) |
Destructor. This will also remove the Image<double> from screen for good.
Definition at line 315 of file cimg_dependent.C.
void lsseg::UpdatableImage::connect | ( | UpdatableImage & | rhs | ) |
connect this UpdatableImage with another one.
Connected UpdatableImages will react in unison when the user resizes one of them or when she inspects pixel values.
Definition at line 318 of file cimg_dependent.C.
void lsseg::UpdatableImage::interact | ( | ) |
invoking this method will halt the program while the user is allowed to interact with the displayed image.
The user is able to do the following after this method is called:
Definition at line 317 of file cimg_dependent.C.
void lsseg::UpdatableImage::update | ( | const Image< double > & | img, | |
bool | reshape = false | |||
) |
Update the displayed image.
img | the displayed image will be replaced by the contents of this image. | |
reshape | if true , the display window will be reshaped to the shape of the argument img . Otherwise, it will retain its old shape although its image contents has changed (resulting in a displayed image with a possibly altered aspect ratio). |
Definition at line 316 of file cimg_dependent.C.
Pimpl* lsseg::UpdatableImage::p_ [private] |
pointer-to-implementation paradigm used here in order to avoid having to include the very long header file CImg.h into this header file.
Definition at line 210 of file cimg_dependent.h.