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_CALCULATE_SEGMENTATION_VOLUME_H_INCLUDET_WAD 00019 #define MITK_CALCULATE_SEGMENTATION_VOLUME_H_INCLUDET_WAD 00020 00021 #include "mitkSegmentationSink.h" 00022 #include "MitkExtExports.h" 00023 #include "mitkImageCast.h" 00024 00025 namespace mitk 00026 { 00027 00028 class MitkExt_EXPORT CalculateSegmentationVolume : public SegmentationSink 00029 { 00030 public: 00031 00032 mitkClassMacro( CalculateSegmentationVolume, SegmentationSink ) 00033 mitkAlgorithmNewMacro( CalculateSegmentationVolume ); 00034 00035 protected: 00036 00037 CalculateSegmentationVolume(); // use smart pointers 00038 virtual ~CalculateSegmentationVolume(); 00039 00040 virtual bool ReadyToRun(); 00041 00042 virtual bool ThreadedUpdateFunction(); // will be called from a thread after calling StartAlgorithm 00043 00044 template < typename TPixel, unsigned int VImageDimension > 00045 void ItkImageProcessing( itk::Image< TPixel, VImageDimension >* itkImage, TPixel* dummy = NULL ); 00046 00047 private: 00048 00049 unsigned int m_Volume; 00050 00051 Vector3D m_CenterOfMass; 00052 Vector3D m_MinIndexOfBoundingBox; 00053 Vector3D m_MaxIndexOfBoundingBox; 00054 00055 }; 00056 00057 } // namespace 00058 00059 #endif 00060 00061