00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 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 #ifndef MITK_SHOW_SEGMENTATION_AS_SURFACE_H_INCLUDET_WAD 00019 #define MITK_SHOW_SEGMENTATION_AS_SURFACE_H_INCLUDET_WAD 00020 00021 #include "mitkSegmentationSink.h" 00022 #include "MitkExtExports.h" 00023 #include "mitkUIDGenerator.h" 00024 #include "mitkSurface.h" 00025 00026 namespace mitk 00027 { 00028 00029 class MitkExt_EXPORT ShowSegmentationAsSurface : public SegmentationSink 00030 { 00031 public: 00032 00033 mitkClassMacro( ShowSegmentationAsSurface, SegmentationSink ) 00034 mitkAlgorithmNewMacro( ShowSegmentationAsSurface ); 00035 00036 protected: 00037 00038 ShowSegmentationAsSurface(); // use smart pointers 00039 virtual ~ShowSegmentationAsSurface(); 00040 00041 virtual void Initialize(const NonBlockingAlgorithm* other = NULL); 00042 virtual bool ReadyToRun(); 00043 00044 virtual bool ThreadedUpdateFunction(); // will be called from a thread after calling StartAlgorithm 00045 00046 virtual void ThreadedUpdateSuccessful(); // will be called from a thread after calling StartAlgorithm 00047 00048 private: 00049 00050 UIDGenerator m_UIDGeneratorSurfaces; 00051 00052 Surface::Pointer m_Surface; 00053 DataNode::Pointer m_Node; 00054 00055 bool m_AddToTree; 00056 00057 }; 00058 00059 } // namespace 00060 00061 #endif 00062 00063