diff --git a/Modules/MatchPointRegistration/Helper/mitkResultNodeGenerationHelper.cpp b/Modules/MatchPointRegistration/Helper/mitkResultNodeGenerationHelper.cpp index fe95072436..b7b686922e 100644 --- a/Modules/MatchPointRegistration/Helper/mitkResultNodeGenerationHelper.cpp +++ b/Modules/MatchPointRegistration/Helper/mitkResultNodeGenerationHelper.cpp @@ -1,81 +1,81 @@ /*=================================================================== 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 "mitkResultNodeGenerationHelper.h" #include #include #include mitk::DataNode::Pointer - mitk::generateRegistrationResultNode(const std::string& nodeName, mitk::MAPRegistrationWrapper::Pointer resultReg, const std::string& algorithmUID, const std::string& movingNodeUID, const std::string& targetNodeUID) + mitk::generateRegistrationResultNode(const std::string& nodeName, mitk::MAPRegistrationWrapper::Pointer resultReg, const std::string& algorithmUID, const std::string& movingDataUID, const std::string& targetDataUID) { if (resultReg.IsNull()) { mitkThrow() << "Cannot generate registration result node. Passed registration wrapper points to NULL."; } mitk::DataNode::Pointer m_spRegNode = mitk::DataNode::New(); m_spRegNode->SetData(resultReg); m_spRegNode->SetName(nodeName); resultReg->SetProperty(mitk::Prop_RegAlgUsed, mitk::StringProperty::New(algorithmUID)); - resultReg->SetProperty(mitk::Prop_RegAlgMovingData, mitk::StringProperty::New(movingNodeUID)); - resultReg->SetProperty(mitk::Prop_RegAlgTargetData, mitk::StringProperty::New(targetNodeUID)); + resultReg->SetProperty(mitk::Prop_RegAlgMovingData, mitk::StringProperty::New(movingDataUID)); + resultReg->SetProperty(mitk::Prop_RegAlgTargetData, mitk::StringProperty::New(targetDataUID)); resultReg->SetProperty(mitk::Prop_RegUID, mitk::StringProperty::New(resultReg->GetRegistration()->getRegistrationUID())); return m_spRegNode; }; mitk::DataNode::Pointer - mitk::generateMappedResultNode(const std::string& nodeName, mitk::BaseData::Pointer mappedData, const std::string& regUID, const std::string& inputNodeUID, const bool refinedGeometry, const std::string& interpolator) + mitk::generateMappedResultNode(const std::string& nodeName, mitk::BaseData::Pointer mappedData, const std::string& regUID, const std::string& inputDataUID, const bool refinedGeometry, const std::string& interpolator) { if (mappedData.IsNull()) { mitkThrow() << "Cannot generate mapping result node. Passed mapped data points to NULL."; } mitk::DataNode::Pointer mappedDataNode = mitk::DataNode::New(); mappedDataNode->SetData(mappedData); mappedDataNode->SetName(nodeName); if (!regUID.empty()) { mappedData->SetProperty(mitk::Prop_RegUID, mitk::StringProperty::New(regUID)); } - mappedData->SetProperty(mitk::Prop_MappingInputData, mitk::StringProperty::New(inputNodeUID)); + mappedData->SetProperty(mitk::Prop_MappingInputData, mitk::StringProperty::New(inputDataUID)); if (refinedGeometry) { mappedData->SetProperty(mitk::Prop_MappingInterpolator, mitk::StringProperty::New("None")); mappedData->SetProperty(mitk::Prop_MappingRefinedGeometry, mitk::BoolProperty::New(true)); } else { mitk::Image* image = dynamic_cast(mappedData.GetPointer()); if(image) { mappedData->SetProperty(mitk::Prop_MappingInterpolator, mitk::StringProperty::New(interpolator)); } else { mappedData->SetProperty(mitk::Prop_MappingInterpolator, mitk::StringProperty::New("None")); mappedDataNode->SetColor(0.0, 0.0, 1.0); } } return mappedDataNode; }; diff --git a/Modules/MatchPointRegistration/Helper/mitkResultNodeGenerationHelper.h b/Modules/MatchPointRegistration/Helper/mitkResultNodeGenerationHelper.h index 8af0eb0655..df18a519b6 100644 --- a/Modules/MatchPointRegistration/Helper/mitkResultNodeGenerationHelper.h +++ b/Modules/MatchPointRegistration/Helper/mitkResultNodeGenerationHelper.h @@ -1,51 +1,51 @@ /*=================================================================== 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 MITK_RESULT_NODE_GENERATION_HELPER_H #define MITK_RESULT_NODE_GENERATION_HELPER_H #include "mitkDataNode.h" #include "mitkMAPRegistrationWrapper.h" #include "MitkMatchPointRegistrationExports.h" namespace mitk { /**Method generates a proper result node for the given registration wrapper. @param nodeName Name of the result node @param resultReg Pointer to the registration wrapper that should be data of the node. @param algorithmUID UID string of the algorithm used to generate the result. - @param movingNodeUID UID string of the node used as moving input for the registration algorithm. - @param targetNodeUID UID string of the node used as moving input for the registration algorithm. + @param movingDataUID UID string of the data used as moving input for the registration algorithm. + @param targetDataUID UID string of the data used as moving input for the registration algorithm. @pre registration must point to a valid instance @result Pointer to a data node with all properties properly set.*/ - MITKMATCHPOINTREGISTRATION_EXPORT mitk::DataNode::Pointer generateRegistrationResultNode(const std::string& nodeName, mitk::MAPRegistrationWrapper::Pointer resultReg, const std::string& algorithmUID, const std::string& movingNodeUID, const std::string& targetNodeUID); + MITKMATCHPOINTREGISTRATION_EXPORT mitk::DataNode::Pointer generateRegistrationResultNode(const std::string& nodeName, mitk::MAPRegistrationWrapper::Pointer resultReg, const std::string& algorithmUID, const std::string& movingDataUID, const std::string& targetDataUID); /**Method generates a proper result node for the given registration wrapper. @param nodeName Name of the result node @param mappedData Pointer to the mapped data that should be data of the node. @param regUID UID string of the registration used to map the data. - @param inputNodeUID UID string of the node used as input for the mapping. + @param inputDataUID UID string of the data used as input for the mapping. @param refinedGeometry Indicates if the data was really mapped or the geometry was refined. @param interpolator Name of the used interpolation strategy. @pre mappedData must point to a valid instance @result Pointer to a data node with all properties properly set.*/ - MITKMATCHPOINTREGISTRATION_EXPORT mitk::DataNode::Pointer generateMappedResultNode(const std::string& nodeName, mitk::BaseData::Pointer mappedData, const std::string& regUID, const std::string& inputNodeUID, const bool refinedGeometry, const std::string& interpolator = "Unkown"); + MITKMATCHPOINTREGISTRATION_EXPORT mitk::DataNode::Pointer generateMappedResultNode(const std::string& nodeName, mitk::BaseData::Pointer mappedData, const std::string& regUID, const std::string& inputDataUID, const bool refinedGeometry, const std::string& interpolator = "Unkown"); } #endif \ No newline at end of file