Hey Sandra,
did you set the properties "scalar visibility" and "color mode" to true?
Probably updating the node and calling
mitk::RenderingManger::GetInstance()->RequestUpdateAll() from your plugin after
changing could help to renew the mapping.
Here is a problem in your code:
m_DataStorage->GetNamedNode(stentNode.toAscii())->SetFloatProperty("ScalarsRangeMaximum",
(float)* resultVector.at(i)->uGridStent->GetScalarRange());
The SetFloatProperty method requests a single float value, the call to
GetScalarRange returns a float* with min and max value of the range in this
order. So it seems like you set the minimum scalar value to the property.
Hope this can help you!
Best regards
Sven
-----Ursprüngliche Nachricht-----
Von: Scherer, Sandra [mailto:[email protected]]
Gesendet: Donnerstag, 26. Mai 2011 15:22
An: [email protected]
Betreff: [mitk-users] vtkLookUpTable - scalar Range?
Hello Sven,
hhanks for your answer. My problem is, that I can display the scalars with the
right coloring when I set the scalars immediately after reading the input file
at the beginning. I have several result files which I want to save and later on
want to success them.
void makeFEresult(QString variant, QString resultValues) {
QString path = "./Resources/FEMResults/" + variant + ".s4s";
std::string strPath = std::string(path.toAscii().data());
const char * filePath = strPath.c_str();
qDebug() <<"filePath = " << filePath;
ifstream file (filePath);
if (!file) {
file.close();
std::cout << "file not found" << std::endl;
//return ;
}
FEresult* result = new FEresult(file);
result->uGridIntima->SetPoints(result->nodeCoordinatesIntima);
result->uGridPlaque->SetPoints(result->nodeCoordinatesPlaque);
result->uGridStent->SetPoints(result->nodeCoordinatesStent);
result->uGridStent->GetPointData()->SetScalars(result->scalarsForceStent);
//when the command is at this place everything is fine
resultVector.push_back(result);
}
...When I want to access the result within anoter method from the resultVector
it doesn´t work - even if the node properties are equal...:
updateFEresult(bool state, QString resultValues) {
resultVector.at(i)->uGridStent->GetPointData()->SetScalars(resultVector.at(i)->scalarsForceStent);
}
...there is a coloring of the scalar values...but with false coloring. Maybe
there is something wrong with the scalar range?
But the following didn´t help:
m_DataStorage->GetNamedNode(stentNode.toAscii())->SetFloatProperty("ScalarsRangeMaximum",
(float)* resultVector.at(i)->uGridStent->GetScalarRange());
The scalars are double values.
Would be great if you can help me.
Thanks.
Regards,
Sandra
Dipl.-Inf. (FH) Sandra Scherer, Master en Multimédia Fraunhofer Institut für
Werkzeugmaschinen und Umformtechnik Gruppe Medizintechnik Hauptabteilung
Mechatronik und Leichtbau Nöthnitzer Str. 44
01187 Dresden
Telefon: +49 (0)351 / 4772 2340
Telefax: +49 (0)351 / 4772 2303
http://www.iwu.fraunhofer.de/
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, you get
blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users