1 // Copyright (C) 2010-2016 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay
21 #include "vtkExtractGroup.h"
22 #include "MEDFileFieldRepresentationTree.hxx"
23 #include "vtkMEDReader.h"
25 #include "vtkAdjacentVertexIterator.h"
26 #include "vtkDataArrayTemplate.h"
27 #include "vtkIntArray.h"
28 #include "vtkCellData.h"
29 #include "vtkPointData.h"
31 #include "vtkStreamingDemandDrivenPipeline.h"
32 #include "vtkUnstructuredGrid.h"
33 #include "vtkMultiBlockDataSet.h"
35 #include "vtkInformationStringKey.h"
36 #include "vtkAlgorithmOutput.h"
37 #include "vtkObjectFactory.h"
38 #include "vtkMutableDirectedGraph.h"
39 #include "vtkMultiBlockDataSet.h"
40 #include "vtkDataSet.h"
41 #include "vtkInformationVector.h"
42 #include "vtkInformation.h"
43 #include "vtkDataArraySelection.h"
44 #include "vtkTimeStamp.h"
45 #include "vtkInEdgeIterator.h"
46 #include "vtkInformationDataObjectKey.h"
47 #include "vtkExecutive.h"
48 #include "vtkVariantArray.h"
49 #include "vtkStringArray.h"
50 #include "vtkDoubleArray.h"
51 #include "vtkCharArray.h"
52 #include "vtkUnsignedCharArray.h"
53 #include "vtkDataSetAttributes.h"
54 #include "vtkDemandDrivenPipeline.h"
55 #include "vtkDataObjectTreeIterator.h"
56 #include "vtkThreshold.h"
57 #include "vtkMultiBlockDataGroupFilter.h"
58 #include "vtkCompositeDataToUnstructuredGridFilter.h"
59 #include "vtkInformationDataObjectMetaDataKey.h"
64 vtkStandardNewMacro(vtkExtractGroup);
68 class ExtractGroupStatus
71 ExtractGroupStatus():_status(false) { }
72 ExtractGroupStatus(const char *name);
73 bool getStatus() const { return _status; }
74 void setStatus(bool status) const { _status=status; }
75 void cpyStatusFrom(const ExtractGroupStatus& other) { _status=other._status; }
76 std::string getName() const { return _name; }
77 void resetStatus() const { _status=false; }
78 const char *getKeyOfEntry() const { return _ze_key_name.c_str(); }
79 virtual void printMySelf(std::ostream& os) const;
80 virtual bool isSameAs(const ExtractGroupStatus& other) const;
84 std::string _ze_key_name;
87 class ExtractGroupGrp : public ExtractGroupStatus
90 ExtractGroupGrp(const char *name):ExtractGroupStatus(name) { std::ostringstream oss; oss << START << name; _ze_key_name=oss.str(); }
91 void setFamilies(const std::vector<std::string>& fams) { _fams=fams; }
92 const std::vector<std::string>& getFamiliesLyingOn() const { return _fams; }
93 bool isSameAs(const ExtractGroupGrp& other) const;
95 static const char START[];
96 std::vector<std::string> _fams;
99 class ExtractGroupFam : public ExtractGroupStatus
102 ExtractGroupFam(const char *name);
103 void printMySelf(std::ostream& os) const;
104 void fillIdsToKeep(std::set<int>& s) const;
105 int getId() const { return _id; }
106 bool isSameAs(const ExtractGroupFam& other) const;
108 static const char START[];
113 class vtkExtractGroup::vtkExtractGroupInternal
116 void loadFrom(vtkMutableDirectedGraph *sil);
117 int getNumberOfEntries() const;
118 const char *getMeshName() const;
119 const char *getKeyOfEntry(int i) const;
120 bool getStatusOfEntryStr(const char *entry) const;
121 void setStatusOfEntryStr(const char *entry, bool status);
122 void printMySelf(std::ostream& os) const;
123 std::set<int> getIdsToKeep() const;
124 void clearSelection() const;
125 int getIdOfFamily(const std::string& famName) const;
126 static bool IsInformationOK(vtkInformation *info);
128 std::map<std::string,int> computeFamStrIdMap() const;
129 const ExtractGroupStatus& getEntry(const char *entry) const;
130 ExtractGroupStatus& getEntry(const char *entry);
132 std::vector<ExtractGroupGrp> _groups;
133 std::vector<ExtractGroupFam> _fams;
134 mutable std::vector< std::pair<std::string,bool> > _selection;
135 std::string _mesh_name;
138 const char ExtractGroupGrp::START[]="GRP_";
140 const char ExtractGroupFam::START[]="FAM_";
142 ExtractGroupStatus::ExtractGroupStatus(const char *name):_status(false),_name(name)
146 void ExtractGroupStatus::printMySelf(std::ostream& os) const
148 os << " -" << _ze_key_name << "(";
153 os << ")" << std::endl;
156 bool ExtractGroupStatus::isSameAs(const ExtractGroupStatus& other) const
158 return _name==other._name && _ze_key_name==other._ze_key_name;
161 bool ExtractGroupGrp::isSameAs(const ExtractGroupGrp& other) const
163 bool ret(ExtractGroupStatus::isSameAs(other));
165 return _fams==other._fams;
170 bool vtkExtractGroup::vtkExtractGroupInternal::IsInformationOK(vtkInformation *info)
172 // Check the information contain meta data key
173 if(!info->Has(vtkMEDReader::META_DATA()))
177 vtkMutableDirectedGraph *sil(vtkMutableDirectedGraph::SafeDownCast(info->Get(vtkMEDReader::META_DATA())));
181 vtkAbstractArray *verticesNames(sil->GetVertexData()->GetAbstractArray("Names",idNames));
182 vtkStringArray *verticesNames2(vtkStringArray::SafeDownCast(verticesNames));
185 for(int i=0;i<verticesNames2->GetNumberOfValues();i++)
187 vtkStdString &st(verticesNames2->GetValue(i));
188 if(st=="MeshesFamsGrps")
194 const char* vtkExtractGroup::GetGrpStart()
196 return ExtractGroupGrp::START;
199 const char* vtkExtractGroup::GetFamStart()
201 return ExtractGroupFam::START;
204 const char *vtkExtractGroup::vtkExtractGroupInternal::getMeshName() const
206 return this->_mesh_name.c_str();
209 void vtkExtractGroup::vtkExtractGroupInternal::loadFrom(vtkMutableDirectedGraph *sil)
211 std::vector<ExtractGroupGrp> oldGrps(_groups); _groups.clear();
212 std::vector<ExtractGroupFam> oldFams(_fams); _fams.clear();
214 vtkAbstractArray *verticesNames(sil->GetVertexData()->GetAbstractArray("Names",idNames));
215 vtkStringArray *verticesNames2(vtkStringArray::SafeDownCast(verticesNames));
218 for(int i=0;i<verticesNames2->GetNumberOfValues();i++)
220 vtkStdString &st(verticesNames2->GetValue(i));
221 if(st=="MeshesFamsGrps")
228 throw INTERP_KERNEL::Exception("There is an internal error ! The tree on server side has not the expected look !");
229 vtkAdjacentVertexIterator *it0(vtkAdjacentVertexIterator::New());
230 sil->GetAdjacentVertices(id0,it0);
232 while(it0->HasNext())
234 vtkIdType id1(it0->Next());
235 std::string meshName((const char *)verticesNames2->GetValue(id1));
236 this->_mesh_name=meshName;
237 vtkAdjacentVertexIterator *it1(vtkAdjacentVertexIterator::New());
238 sil->GetAdjacentVertices(id1,it1);
239 vtkIdType idZeGrps(it1->Next());//zeGroups
240 vtkAdjacentVertexIterator *itGrps(vtkAdjacentVertexIterator::New());
241 sil->GetAdjacentVertices(idZeGrps,itGrps);
242 while(itGrps->HasNext())
244 vtkIdType idg(itGrps->Next());
245 ExtractGroupGrp grp((const char *)verticesNames2->GetValue(idg));
246 vtkAdjacentVertexIterator *itGrps2(vtkAdjacentVertexIterator::New());
247 sil->GetAdjacentVertices(idg,itGrps2);
248 std::vector<std::string> famsOnGroup;
249 while(itGrps2->HasNext())
251 vtkIdType idgf(itGrps2->Next());
252 famsOnGroup.push_back(std::string((const char *)verticesNames2->GetValue(idgf)));
254 grp.setFamilies(famsOnGroup);
256 _groups.push_back(grp);
259 vtkIdType idZeFams(it1->Next());//zeFams
261 vtkAdjacentVertexIterator *itFams(vtkAdjacentVertexIterator::New());
262 sil->GetAdjacentVertices(idZeFams,itFams);
263 while(itFams->HasNext())
265 vtkIdType idf(itFams->Next());
266 ExtractGroupFam fam((const char *)verticesNames2->GetValue(idf));
267 _fams.push_back(fam);
273 std::size_t szg(_groups.size()),szf(_fams.size());
274 if(szg==oldGrps.size() && szf==oldFams.size())
277 for(std::size_t i=0;i<szg && isSame;i++)
278 isSame=_groups[i].isSameAs(oldGrps[i]);
279 for(std::size_t i=0;i<szf && isSame;i++)
280 isSame=_fams[i].isSameAs(oldFams[i]);
283 for(std::size_t i=0;i<szg;i++)
284 _groups[i].cpyStatusFrom(oldGrps[i]);
285 for(std::size_t i=0;i<szf;i++)
286 _fams[i].cpyStatusFrom(oldFams[i]);
291 int vtkExtractGroup::vtkExtractGroupInternal::getNumberOfEntries() const
293 std::size_t sz0(_groups.size()),sz1(_fams.size());
294 return (int)(sz0+sz1);
297 const char *vtkExtractGroup::vtkExtractGroupInternal::getKeyOfEntry(int i) const
299 int sz0((int)_groups.size());
301 return _groups[i].getKeyOfEntry();
303 return _fams[i-sz0].getKeyOfEntry();
306 bool vtkExtractGroup::vtkExtractGroupInternal::getStatusOfEntryStr(const char *entry) const
308 const ExtractGroupStatus& elt(getEntry(entry));
309 return elt.getStatus();
312 void vtkExtractGroup::vtkExtractGroupInternal::setStatusOfEntryStr(const char *entry, bool status)
314 _selection.emplace_back(entry,status);
317 const ExtractGroupStatus& vtkExtractGroup::vtkExtractGroupInternal::getEntry(const char *entry) const
319 std::string entryCpp(entry);
320 for(std::vector<ExtractGroupGrp>::const_iterator it0=_groups.begin();it0!=_groups.end();it0++)
321 if(entryCpp==(*it0).getKeyOfEntry())
323 for(std::vector<ExtractGroupFam>::const_iterator it0=_fams.begin();it0!=_fams.end();it0++)
324 if(entryCpp==(*it0).getKeyOfEntry())
326 std::ostringstream oss; oss << "vtkExtractGroupInternal::getEntry : no such entry \"" << entry << "\"!";
327 throw INTERP_KERNEL::Exception(oss.str().c_str());
330 ExtractGroupStatus& vtkExtractGroup::vtkExtractGroupInternal::getEntry(const char *entry)
332 std::string entryCpp(entry);
333 for(std::vector<ExtractGroupGrp>::iterator it0=_groups.begin();it0!=_groups.end();it0++)
334 if(entryCpp==(*it0).getKeyOfEntry())
336 for(std::vector<ExtractGroupFam>::iterator it0=_fams.begin();it0!=_fams.end();it0++)
337 if(entryCpp==(*it0).getKeyOfEntry())
339 std::ostringstream oss; oss << "vtkExtractGroupInternal::getEntry : no such entry \"" << entry << "\"!";
340 throw INTERP_KERNEL::Exception(oss.str().c_str());
343 void vtkExtractGroup::vtkExtractGroupInternal::printMySelf(std::ostream& os) const
345 os << "Groups :" << std::endl;
346 for(std::vector<ExtractGroupGrp>::const_iterator it0=_groups.begin();it0!=_groups.end();it0++)
347 (*it0).printMySelf(os);
348 os << "Families :" << std::endl;
349 for(std::vector<ExtractGroupFam>::const_iterator it0=_fams.begin();it0!=_fams.end();it0++)
350 (*it0).printMySelf(os);
353 int vtkExtractGroup::vtkExtractGroupInternal::getIdOfFamily(const std::string& famName) const
355 for(std::vector<ExtractGroupFam>::const_iterator it=_fams.begin();it!=_fams.end();it++)
357 if((*it).getName()==famName)
358 return (*it).getId();
362 ExtractGroupFam::ExtractGroupFam(const char *name):ExtractGroupStatus(name),_id(0)
364 std::size_t pos(_name.find(MEDFileFieldRepresentationLeavesArrays::ZE_SEP));
365 std::string name0(_name.substr(0,pos)),name1(_name.substr(pos+strlen(MEDFileFieldRepresentationLeavesArrays::ZE_SEP)));
366 std::istringstream iss(name1);
368 std::ostringstream oss; oss << START << name; _ze_key_name=oss.str(); _name=name0;
371 bool ExtractGroupFam::isSameAs(const ExtractGroupFam& other) const
373 bool ret(ExtractGroupStatus::isSameAs(other));
375 return _id==other._id;
380 void ExtractGroupFam::printMySelf(std::ostream& os) const
382 os << " -" << _ze_key_name << " famName : \"" << _name << "\" id : " << _id << " (";
387 os << ")" << std::endl;
390 void ExtractGroupFam::fillIdsToKeep(std::set<int>& s) const
395 std::set<int> vtkExtractGroup::vtkExtractGroupInternal::getIdsToKeep() const
397 for(auto it: _selection)
399 const ExtractGroupStatus& elt(getEntry(it.first.c_str()));
400 elt.setStatus(it.second);
402 std::map<std::string,int> m(this->computeFamStrIdMap());
404 for(std::vector<ExtractGroupGrp>::const_iterator it0=_groups.begin();it0!=_groups.end();it0++)
406 if((*it0).getStatus())
408 const std::vector<std::string>& fams((*it0).getFamiliesLyingOn());
409 for(std::vector<std::string>::const_iterator it1=fams.begin();it1!=fams.end();it1++)
411 std::map<std::string,int>::iterator it2(m.find((*it1)));
413 s.insert((*it2).second);
417 for(std::vector<ExtractGroupFam>::const_iterator it0=_fams.begin();it0!=_fams.end();it0++)
418 if((*it0).getStatus())
419 (*it0).fillIdsToKeep(s);
423 void vtkExtractGroup::vtkExtractGroupInternal::clearSelection() const
426 for(auto it : _groups)
432 std::map<std::string,int> vtkExtractGroup::vtkExtractGroupInternal::computeFamStrIdMap() const
434 std::map<std::string,int> ret;
435 for(std::vector<ExtractGroupFam>::const_iterator it0=_fams.begin();it0!=_fams.end();it0++)
436 ret[(*it0).getName()]=(*it0).getId();
442 vtkExtractGroup::vtkExtractGroup():SIL(NULL),Internal(new vtkExtractGroupInternal),InsideOut(0)
446 vtkExtractGroup::~vtkExtractGroup()
448 delete this->Internal;
451 void vtkExtractGroup::SetInsideOut(int val)
453 if(this->InsideOut!=val)
460 int vtkExtractGroup::RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
462 // vtkUnstructuredGridAlgorithm::RequestInformation(request,inputVector,outputVector);
465 // std::cerr << "########################################## vtkExtractGroup::RequestInformation ##########################################" << std::endl;
466 // request->Print(cout);
467 vtkInformation *outInfo(outputVector->GetInformationObject(0));
468 vtkInformation *inputInfo(inputVector[0]->GetInformationObject(0));
469 if(!vtkExtractGroup::vtkExtractGroupInternal::IsInformationOK(inputInfo))
471 vtkErrorMacro("No SIL Data available ! The source of this filter must be MEDReader !");
475 this->SetSIL(vtkMutableDirectedGraph::SafeDownCast(inputInfo->Get(vtkMEDReader::META_DATA())));
476 this->Internal->loadFrom(this->SIL);
477 //this->Internal->printMySelf(std::cerr);
479 catch(INTERP_KERNEL::Exception& e)
481 std::cerr << "Exception has been thrown in vtkExtractGroup::RequestInformation : " << e.what() << std::endl;
488 * Do not use vtkCxxSetObjectMacro macro because input mdg comes from an already managed in the pipeline just a ref on it.
490 void vtkExtractGroup::SetSIL(vtkMutableDirectedGraph *mdg)
497 template<class CellPointExtractor>
498 vtkDataSet *FilterFamilies(vtkSmartPointer<vtkThreshold>& thres,
499 vtkDataSet *input, const std::set<int>& idsToKeep, bool insideOut, const char *arrNameOfFamilyField,
500 const char *associationForThreshold, bool& catchAll, bool& catchSmth)
502 const int VTK_DATA_ARRAY_DELETE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_DELETE;
503 const char ZE_SELECTION_ARR_NAME[]="@@ZeSelection@@";
504 vtkDataSet *output(input->NewInstance());
505 output->ShallowCopy(input);
506 thres->SetInputData(output);
507 vtkDataSetAttributes *dscIn(input->GetCellData()),*dscIn2(input->GetPointData());
508 vtkDataSetAttributes *dscOut(output->GetCellData()),*dscOut2(output->GetPointData());
510 double vMin(insideOut==0?1.:0.),vMax(insideOut==0?2.:1.);
511 thres->ThresholdBetween(vMin,vMax);
514 CellPointExtractor cpe2(input);
515 vtkDataArray *da(cpe2.Get()->GetScalars(arrNameOfFamilyField));
518 std::string daName(da->GetName());
519 vtkIntArray *dai(vtkIntArray::SafeDownCast(da));
520 if(daName!=arrNameOfFamilyField || !dai)
523 int nbOfTuples(dai->GetNumberOfTuples());
524 vtkCharArray *zeSelection(vtkCharArray::New());
525 zeSelection->SetName(ZE_SELECTION_ARR_NAME);
526 zeSelection->SetNumberOfComponents(1);
527 char *pt(new char[nbOfTuples]);
528 zeSelection->SetArray(pt,nbOfTuples,0,VTK_DATA_ARRAY_DELETE);
529 const int *inPtr(dai->GetPointer(0));
530 std::fill(pt,pt+nbOfTuples,0);
531 catchAll=true; catchSmth=false;
532 std::vector<bool> pt2(nbOfTuples,false);
533 for(std::set<int>::const_iterator it=idsToKeep.begin();it!=idsToKeep.end();it++)
535 bool catchFid(false);
536 for(int i=0;i<nbOfTuples;i++)
538 { pt2[i]=true; catchFid=true; }
544 for(int ii=0;ii<nbOfTuples;ii++)
547 CellPointExtractor cpe3(output);
548 int idx(cpe3.Get()->AddArray(zeSelection));
549 cpe3.Get()->SetActiveAttribute(idx,vtkDataSetAttributes::SCALARS);
550 cpe3.Get()->CopyScalarsOff();
551 zeSelection->Delete();
553 thres->SetInputArrayToProcess(idx,0,0,associationForThreshold,ZE_SELECTION_ARR_NAME);
555 vtkUnstructuredGrid *zeComputedOutput(thres->GetOutput());
556 CellPointExtractor cpe(zeComputedOutput);
557 cpe.Get()->RemoveArray(idx);
559 zeComputedOutput->Register(0);
560 return zeComputedOutput;
566 CellExtractor(vtkDataSet *ds):_ds(ds) { }
567 vtkDataSetAttributes *Get() { return _ds->GetCellData(); }
575 PointExtractor(vtkDataSet *ds):_ds(ds) { }
576 vtkDataSetAttributes *Get() { return _ds->GetPointData(); }
581 int vtkExtractGroup::RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
585 // std::cerr << "########################################## vtkExtractGroup::RequestData ##########################################" << std::endl;
586 // request->Print(cout);
587 vtkInformation* inputInfo=inputVector[0]->GetInformationObject(0);
588 vtkMultiBlockDataSet *inputMB(vtkMultiBlockDataSet::SafeDownCast(inputInfo->Get(vtkDataObject::DATA_OBJECT())));
589 if(inputMB->GetNumberOfBlocks()!=1)
591 std::ostringstream oss; oss << "vtkExtractGroup::RequestData : input has not the right number of parts ! Expected 1 !";
592 if(this->HasObserver("ErrorEvent") )
593 this->InvokeEvent("ErrorEvent",const_cast<char *>(oss.str().c_str()));
595 vtkOutputWindowDisplayErrorText(const_cast<char *>(oss.str().c_str()));
596 vtkObject::BreakOnError();
599 vtkDataSet *input(vtkDataSet::SafeDownCast(inputMB->GetBlock(0)));
600 vtkInformation *info(input->GetInformation());
601 vtkInformation *outInfo(outputVector->GetInformationObject(0));
602 vtkMultiBlockDataSet *output(vtkMultiBlockDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())));
603 std::set<int> idsToKeep(this->Internal->getIdsToKeep());
604 this->Internal->clearSelection();
605 // first shrink the input
606 bool catchAll,catchSmth;
607 vtkSmartPointer<vtkThreshold> thres1(vtkSmartPointer<vtkThreshold>::New()),thres2(vtkSmartPointer<vtkThreshold>::New());
608 vtkDataSet *tryOnCell(FilterFamilies<CellExtractor>(thres1,input,idsToKeep,this->InsideOut,
609 MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_CELL_NAME,"vtkDataObject::FIELD_ASSOCIATION_CELLS",catchAll,catchSmth));
614 output->SetBlock(0,tryOnCell);
615 tryOnCell->Delete();//
622 vtkDataSet *tryOnNode(FilterFamilies<PointExtractor>(thres2,input,idsToKeep,this->InsideOut,
623 MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME,"vtkDataObject::FIELD_ASSOCIATION_POINTS",catchAll,catchSmth));
624 if(tryOnNode && catchSmth)
626 output->SetBlock(0,tryOnCell);
627 output->SetBlock(1,tryOnNode);
636 output->SetBlock(0,tryOnCell);
643 vtkDataSet *tryOnNode(FilterFamilies<PointExtractor>(thres1,input,idsToKeep,this->InsideOut,
644 MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME,"vtkDataObject::FIELD_ASSOCIATION_POINTS",catchAll,catchSmth));
648 output->SetBlock(0,tryOnNode);
654 output->SetBlock(0,tryOnNode);
663 vtkDataSet *tryOnNode(FilterFamilies<PointExtractor>(thres1,input,idsToKeep,this->InsideOut,
664 MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME,"vtkDataObject::FIELD_ASSOCIATION_POINTS",catchAll,catchSmth));
667 output->ShallowCopy(tryOnNode);
668 tryOnNode->Delete();//
673 std::ostringstream oss; oss << "vtkExtractGroup::RequestData : The integer array with name \""<< MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_CELL_NAME;
674 oss << "\" or \"" << MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME << "\" does not exist ! The extraction of group and/or family is not possible !";
675 if(this->HasObserver("ErrorEvent") )
676 this->InvokeEvent("ErrorEvent",const_cast<char *>(oss.str().c_str()));
678 vtkOutputWindowDisplayErrorText(const_cast<char *>(oss.str().c_str()));
679 vtkObject::BreakOnError();
684 catch(INTERP_KERNEL::Exception& e)
686 std::cerr << "Exception has been thrown in vtkExtractGroup::RequestData : " << e.what() << std::endl;
691 int vtkExtractGroup::GetSILUpdateStamp()
693 return this->SILTime;
696 void vtkExtractGroup::PrintSelf(ostream& os, vtkIndent indent)
698 this->Superclass::PrintSelf(os, indent);
701 int vtkExtractGroup::GetNumberOfGroupsFlagsArrays()
703 int ret(this->Internal->getNumberOfEntries());
704 //std::cerr << "vtkExtractGroup::GetNumberOfFieldsTreeArrays() -> " << ret << std::endl;
708 const char *vtkExtractGroup::GetGroupsFlagsArrayName(int index)
710 const char *ret(this->Internal->getKeyOfEntry(index));
711 // std::cerr << "vtkExtractGroup::GetFieldsTreeArrayName(" << index << ") -> " << ret << std::endl;
715 int vtkExtractGroup::GetGroupsFlagsArrayStatus(const char *name)
717 int ret((int)this->Internal->getStatusOfEntryStr(name));
718 // std::cerr << "vtkExtractGroup::GetGroupsFlagsArrayStatus(" << name << ") -> " << ret << std::endl;
722 void vtkExtractGroup::SetGroupsFlagsStatus(const char *name, int status)
724 //std::cerr << "vtkExtractGroup::SetFieldsStatus(" << name << "," << status << ")" << std::endl;
725 this->Internal->setStatusOfEntryStr(name,(bool)status);
727 //this->Internal->printMySelf(std::cerr);
730 const char *vtkExtractGroup::GetMeshName()
732 return this->Internal->getMeshName();