diff --git a/Core/Code/IO/mitkFileWriter.cpp b/Core/Code/IO/mitkFileWriter.cpp index 7fbfc3159b..a9684b6905 100644 --- a/Core/Code/IO/mitkFileWriter.cpp +++ b/Core/Code/IO/mitkFileWriter.cpp @@ -1,97 +1,98 @@ /*=================================================================== 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 "mitkFileWriter.h" -bool mitk::FileWriter::CanWriteDataType( DataNode* ) +bool mitk::FileWriter::CanWriteDataType( DataNode* node ) { //TODO #345 check for writing permission - return false; + if (node == NULL || node->GetData() == NULL) return false; + return node->GetData()->GetNameOfClass() == this->GetSupportedBaseData(); } std::string mitk::FileWriter::GetWritenMIMEType() { return ""; } void mitk::FileWriter::SetInput(mitk::BaseData* data) { this->SetNthInput(0, data); } std::string mitk::FileWriter::GetFileExtension() { return ""; } std::string mitk::FileWriter::GetPossibleFileExtensionsAsString() { std::vector possibleFileExtensions = this->GetPossibleFileExtensions(); std::stringstream stream; for (unsigned int i=0; i possibleFileExtensions = this->GetPossibleFileExtensions(); for (unsigned int i=0; i