00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision: 3056 $ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #ifndef mitkApplyDiffImageIIncluded 00020 #define mitkApplyDiffImageIIncluded 00021 00022 #include "mitkOperation.h" 00023 #include "MitkExtExports.h" 00024 #include "mitkCompressedImageContainer.h" 00025 00026 namespace mitk { 00027 00045 class MitkExt_EXPORT ApplyDiffImageOperation : public Operation 00046 { 00047 protected: 00048 00049 void OnImageDeleted(); 00050 00051 Image* m_Image; 00052 unsigned int m_SliceIndex; 00053 unsigned int m_SliceDimension; 00054 unsigned int m_TimeStep; 00055 double m_Factor; 00056 bool m_ImageStillValid; 00057 00058 unsigned long m_DeleteTag; 00059 00060 CompressedImageContainer::Pointer zlibContainer; 00061 00062 public: 00063 00069 ApplyDiffImageOperation(OperationType operationType, Image* image, Image* diffImage, unsigned int timeStep = 0, unsigned int sliceDimension = 2, unsigned int sliceIndex = 0); 00070 virtual ~ApplyDiffImageOperation(); 00071 00072 // Unfortunately cannot use itkGet/SetMacros here, since Operation does not inherit itk::Object 00073 unsigned int GetSliceIndex() { return m_SliceIndex; } 00074 unsigned int GetSliceDimension() { return m_SliceDimension; } 00075 unsigned int GetTimeStep() { return m_TimeStep; } 00076 00077 void SetFactor(double factor) { m_Factor = factor; } 00078 double GetFactor() { return m_Factor; } 00079 00080 Image* GetImage() { return m_Image; } 00081 Image::ConstPointer GetDiffImage(); 00082 00083 bool IsImageStillValid() { return m_ImageStillValid; } 00084 00085 }; 00086 00087 } // namespace mitk 00088 00089 #endif 00090 00091