X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FIO%2FvtkExtractGroup.cxx;h=785ff9e54b33b0cdd2ffc6e04b305fec8fb2e67e;hb=bf16d364bb3ff8274d5f535dae5450ba6bc1e47d;hp=5eab0e9011aa5e435ae1036245fd9b960ca307f9;hpb=c4aa69ad44eec5e669cb416a73ff7117c97624e3;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx b/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx index 5eab0e90..785ff9e5 100644 --- a/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx +++ b/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx @@ -3,7 +3,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -58,8 +58,6 @@ vtkStandardNewMacro(vtkExtractGroup); -vtkCxxSetObjectMacro(vtkExtractGroup, SIL, vtkMutableDirectedGraph); - /////////////////// class ExtractGroupStatus @@ -427,6 +425,7 @@ void vtkExtractGroup::SetInsideOut(int val) int vtkExtractGroup::RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) { + vtkUnstructuredGridAlgorithm::RequestInformation(request,inputVector,outputVector); try { //std::cerr << "########################################## vtkExtractGroup::RequestInformation ##########################################" << std::endl; @@ -461,6 +460,16 @@ int vtkExtractGroup::RequestInformation(vtkInformation *request, vtkInformationV return 1; } +/*! + * Do not use vtkCxxSetObjectMacro macro because input mdg comes from an already managed in the pipeline just a ref on it. + */ +void vtkExtractGroup::SetSIL(vtkMutableDirectedGraph *mdg) +{ + if(this->SIL==mdg) + return ; + this->SIL=mdg; +} + template vtkDataSet *FilterFamilies(vtkDataSet *input, const std::set& idsToKeep, bool insideOut, const char *arrNameOfFamilyField, const char *associationForThreshold, bool& catchAll, bool& catchSmth) @@ -612,7 +621,7 @@ int vtkExtractGroup::RequestData(vtkInformation *request, vtkInformationVector * } else { - vtkDataSet *tryOnNode(FilterFamilies(tryOnCell,idsToKeep,this->InsideOut, + vtkDataSet *tryOnNode(FilterFamilies(input,idsToKeep,this->InsideOut, MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME,"vtkDataObject::FIELD_ASSOCIATION_POINTS",catchAll,catchSmth)); if(tryOnNode) {