void BiHeatmap::setModels(vtkSmartPointer<vtkTable> table, ObjectSelection * sels, ObjectSelection * sels2) { this->table = table; for( int i = 0; i < this->table->GetNumberOfRows(); i++) { ////////////////////////////////4 for( int j = 1; j < this->table->GetNumberOfColumns(); j++) { double var = this->table->GetValue(i, j).ToDouble(); if( !boost::math::isnan(var)) { if( var > 1E20) { std::cout<<" entry is too large, modified! Warning! "<<std::endl; var = 1E10; } if( var < -1E20) { var = -1E10; std::cout<<" entry is too negative, modified! Warning! "<<std::endl; } } else var = 0; this->table->SetValue(i, j, var); } } this->num_rows = this->table->GetNumberOfRows(); /////////////////////////////////////// this->num_cols = this->table->GetNumberOfColumns() - 1; this->indMapFromVertexToInd.clear(); this->indMapFromIndToVertex.clear(); if( this->table) { for( int i = 0; i < this->table->GetNumberOfRows(); i++) { int var = this->table->GetValue( i, 0).ToInt(); this->indMapFromVertexToInd.insert( std::pair< int, int>(var, i)); this->indMapFromIndToVertex.push_back( var); } } if(!sels) this->Selection = new ObjectSelection(); else this->Selection = sels; if(!sels2) this->Selection2 = new ObjectSelection(); else this->Selection2 = sels2; connect(Selection, SIGNAL(changed()), this, SLOT(GetSelecectedIDs())); }
void Dendrogram::setModels(vtkSmartPointer<vtkTable> table, ObjectSelection * sels, double powCof) { if(table) this->table = table; if(!sels) this->Selection = new ObjectSelection(); else this->Selection = sels; this->powCof = powCof; connect(Selection, SIGNAL(changed()), this, SLOT(GetSelecectedIDs())); //this->showGraph(); }