fix: stylistic changes + addObservers
This commit is contained in:
1 parent
e0f92e4d9e
commit
3f7de8fdce
18 files changed
+67
-65
No files matched your search
@@ -0,0 +1,37 @@
|
||||
#ifndef BACKGROUND_H
|
||||
#define BACKGROUND_H
|
||||
|
||||
#include "Layer.h"
|
||||
#include <vtkImageReader2Factory.h>
|
||||
|
||||
/** Implements the Layer class for the case of a background image.
|
||||
* Specifically, reads a backgroundImage given by the imagePath attribute and puts it on layer 0.
|
||||
*/
|
||||
class BackgroundImage : public Layer {
|
||||
private:
|
||||
std::string imagePath;
|
||||
vtkSmartPointer<vtkImageReader2Factory> readerFactory;
|
||||
|
||||
/** This private function updates the background image using the imagePath attribute.
|
||||
*/
|
||||
void updateImage();
|
||||
|
||||
|
||||
public:
|
||||
/** Constructor.
|
||||
* @param imagePath : String to the path of the image to use as background.
|
||||
*/
|
||||
BackgroundImage(std::string imagePath);
|
||||
|
||||
/** Getter.
|
||||
* @return the imagePath attribute.
|
||||
*/
|
||||
std::string getImagePath();
|
||||
|
||||
/** Setter. Can be used to change the background image
|
||||
* @param imagePath : String to the path of the new image to use.
|
||||
*/
|
||||
void setImagePath(std::string imagePath);
|
||||
};
|
||||
|
||||
#endif
|
||||