diff --git a/Modules/AlgorithmsExt/mitkUnstructuredGridToUnstructuredGridFilter.cpp b/Modules/AlgorithmsExt/mitkUnstructuredGridToUnstructuredGridFilter.cpp index 21de9c484d..f42ba6f924 100644 --- a/Modules/AlgorithmsExt/mitkUnstructuredGridToUnstructuredGridFilter.cpp +++ b/Modules/AlgorithmsExt/mitkUnstructuredGridToUnstructuredGridFilter.cpp @@ -1,75 +1,62 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include #include #include #include #include #include mitk::UnstructuredGridToUnstructuredGridFilter::UnstructuredGridToUnstructuredGridFilter() { this->m_UnstructGrid = mitk::UnstructuredGrid::New(); } mitk::UnstructuredGridToUnstructuredGridFilter::~UnstructuredGridToUnstructuredGridFilter(){} -void mitk::UnstructuredGridToUnstructuredGridFilter::GenerateData() -{ - const mitk::UnstructuredGrid* grid = this->GetInput(); - - if(grid == NULL || !grid->IsInitialized()) - { - MITK_ERROR << "Wrong input UnstructuredGrid set" << std::endl; - return; - } - -// m_UnstructGrid = grid->Clone(); -} - void mitk::UnstructuredGridToUnstructuredGridFilter::SetInput(const mitk::UnstructuredGrid* image) { this->ProcessObject::SetNthInput(0, const_cast< mitk::UnstructuredGrid* >( image ) ); } const mitk::UnstructuredGrid* mitk::UnstructuredGridToUnstructuredGridFilter::GetInput(void) { if (this->GetNumberOfInputs() < 1) { MITK_ERROR << "No input set" << std::endl; return 0; } return static_cast( this->ProcessObject::GetInput(0) ); } void mitk::UnstructuredGridToUnstructuredGridFilter::GenerateOutputInformation() { mitk::UnstructuredGrid::ConstPointer inputImage = this->GetInput(); m_UnstructGrid = this->GetOutput(); itkDebugMacro(<<"GenerateOutputInformation()"); if(inputImage.IsNull()) return; } diff --git a/Modules/AlgorithmsExt/mitkUnstructuredGridToUnstructuredGridFilter.h b/Modules/AlgorithmsExt/mitkUnstructuredGridToUnstructuredGridFilter.h index ab4a3b2e79..f50ac1efa1 100644 --- a/Modules/AlgorithmsExt/mitkUnstructuredGridToUnstructuredGridFilter.h +++ b/Modules/AlgorithmsExt/mitkUnstructuredGridToUnstructuredGridFilter.h @@ -1,74 +1,71 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef _MITKUNSTRUCTUREDGRIDTOUNSTRUCTUREDGRID_h__ #define _MITKUNSTRUCTUREDGRIDTOUNSTRUCTUREDGRID_h__ #include #include #include #include #include namespace mitk { class MitkAlgorithmsExt_EXPORT UnstructuredGridToUnstructuredGridFilter : public UnstructuredGridSource { public: mitkClassMacro(UnstructuredGridToUnstructuredGridFilter, UnstructuredGridSource) itkFactorylessNewMacro(Self) itkCloneMacro(Self) - /** This method is called by Update(). */ - virtual void GenerateData(); - /** Initializes the output information */ virtual void GenerateOutputInformation(); /** Returns a const reference to the input image */ const mitk::UnstructuredGrid* GetInput(void); /** Set the source grid. As input every mitk unstructured grid can be used. */ using itk::ProcessObject::SetInput; virtual void SetInput(const UnstructuredGrid *image); protected: /** Constructor */ UnstructuredGridToUnstructuredGridFilter(); /** Destructor */ virtual ~UnstructuredGridToUnstructuredGridFilter(); private: /** The output of the filter */ mitk::UnstructuredGrid::Pointer m_UnstructGrid; }; } // namespace mitk #endif //_MITKUNSTRUCTUREDGRIDTOUNSTRUCTUREDGRID_h__