fw4spl
ImageDiffCommand.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWCOMMAND_IMAGEDIFFCOMMAND_HPP__
8 #define __FWCOMMAND_IMAGEDIFFCOMMAND_HPP__
9 
10 #include "fwCommand/config.hpp"
11 #include "fwCommand/ICommand.hpp"
12 
13 #include <fwData/Image.hpp>
14 
15 #include <fwDataTools/Image.hpp>
16 #include <fwDataTools/ImageDiff.hpp>
17 
18 namespace fwCommand
19 {
20 
21 class FWCOMMAND_CLASS_API ImageDiffCommand : public ICommand
22 {
23 public:
24 
26  FWCOMMAND_API ImageDiffCommand(const ::fwData::Image::sptr& img, ::fwDataTools::ImageDiff diff);
27 
29  FWCOMMAND_API virtual size_t getSize() const;
30 
32  FWCOMMAND_API virtual bool redo();
33 
35  FWCOMMAND_API virtual bool undo();
36 
38  FWCOMMAND_API virtual const std::string getDescription() const;
39 
40 private:
41 
42  ::fwData::Image::sptr m_img;
43 
44  ::fwData::Image::BufferModifiedSignalType::sptr m_modifSig;
45 
47 
48 };
49 
50 } // namespace fwCommand
51 
52 #endif // __FWCOMMAND_IMAGEDIFFCOMMAND_HPP__
The base class for commands.
Definition: ICommand.hpp:21
The namespace fwCommand contains classes describing and managing commands.
Definition: ICommand.hpp:15
Class memorizing pixel changes in an image.
Definition: ImageDiff.hpp:21