Commit 08b68911 authored by promayon's avatar promayon
Browse files

FIXED NEEDS_ITK needs some libraries (at least with gcc) to link against

FIXED some compilation warnings



git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@392 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 8ec325ff
......@@ -353,6 +353,7 @@ macro(camitk_extension)
# ITK is required
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
set(ITK_LIBRARIES ITKBasicFilters ITKCommon ITKIO)
else()
set(ITK_LIBRARIES "")
endif()
......
# dicom component just needs to use the component_extension macro
camitk_extension(
COMPONENT_EXTENSION
NEEDS_ITK
# LIBRARIES ITKBasicFilters ITKCommon ITKIO
NEEDS_ITK
)
......@@ -68,8 +68,8 @@ void ObjComponent::initDynamicProperties() {
// a dynamic property can be change at any time
// the following line does not create a new property, it modifies the existing "Show Glyph" property
setProperty("Show Glyph", QVariant(false));
// at anytime, you can also access the dynamic property current value
bool propValue = property("Show Glyph").toBool();
// at anytime, you can also access the dynamic property current value:
// bool propValue = property("Show Glyph").toBool();
// you can also convert your value to QString. But beware that for some types of
// QVariant the conversion is not automatic (e.g. QColor to QString).
// @see the QVariant canConvert<T> and value<T> methods documentation
......
......@@ -43,7 +43,7 @@ QSet<Viewer*> Component::allViewers;
// -------------------- constructor --------------------
Component::Component ( const QString & file, const QString & n, Representation s ) : myParentNode (NULL), myFileName ( file ), myName ( n ), myService ( s ) {
Component::Component ( const QString & file, const QString & n, Representation s ) : myParentNode (NULL), myFileName ( file ), myService ( s ), myName ( n ) {
init();
}
......
......@@ -194,9 +194,6 @@ void GeometricObject::setDirection(const double x, const double y, const double
aroundZ *= 180.0 / M_PI;
aroundY *= 180.0 / M_PI;
double *o;
o = myActor->GetOrientationWXYZ();
//-- rotate around world's axis, and not vtkProp3D axis (do not use RotateZ(..) and RotateY(..)
if (fabs(aroundZ) > 1e-10)
myActor->RotateWXYZ(aroundZ, 0.0, 0.0, 1.0);
......
......@@ -167,7 +167,7 @@ void MonitoringManager::writeCsv(const char* fileName) {
if(out) {
for (unsigned int i = 0; i < monitors.size(); i++) {
int index =monitors[i]->getIndex();
unsigned int index =monitors[i]->getIndex();
out << "monitor: "<< monitors[i]->getTypeName() << " index: " << monitors[i]->getIndex() << endl;;
for (unsigned int j = 0; j < times.size(); j++) {
......@@ -328,7 +328,7 @@ void MonitoringManager::incStep() {
}
// -------------------- getOldPosition --------------------
void MonitoringManager::getOldPosition(double pos[3], int index) {
void MonitoringManager::getOldPosition(double pos[3], unsigned int index) {
// we use the current pml to find the position of the pointer for the old positionPtr
// look for atom #index in the atoms
......
......@@ -118,7 +118,7 @@ public:
std::string getmmlFileFolder();
Simulator* getSimulator();
/// get atom position for precedent step
void getOldPosition(double pos[3], int index);
void getOldPosition(double pos[3], unsigned int index);
///@}
///mutators for simulation parameters
......
......@@ -60,7 +60,7 @@ Monitor::Monitor(mml::Monitor* m,MonitoringManager* monitoringManager,Monitor::t
case Monitor::VECTORSET:
dimension=3;
break;
case Monitor::MATRIX_33SET:
case Monitor::MATRIX_33SET:
dimension=9;
break;
}
......
......@@ -45,7 +45,7 @@ class MML_API Monitor{
public:
/**
* type of the values stored
* type of the values stored (please update typeCount and doc if you update the enum)
* SCALAR: the monitor store a single scalar value
* SCALARSET: the monitor stores a scalar value for each atom
* VECTORSET: the monitor stores 3 scalar values for each atom
......@@ -55,9 +55,11 @@ class MML_API Monitor{
SCALAR,
SCALARSET,
VECTORSET,
MATRIX_33SET,
typeCount
MATRIX_33SET
};
/// number of possible types (siez of the previous enum). Please always update if the enum is updated.
static const unsigned int typeCount = 4;
/**
* constructor
* @param m the xsdcxx generated monitor
......
......@@ -38,7 +38,6 @@ MonitorForce::~MonitorForce(){}
void MonitorForce::calculate()
{
values.clear();
PhysicalModel* pml = monitoringManager->getPml();
Simulator* simul=monitoringManager->getSimulator();
double fo[3];
StructuralComponent *scSimul = dynamic_cast<StructuralComponent *>(monitoringManager->getPml()->getComponentByName(target));
......
......@@ -36,7 +36,6 @@ MonitorPosition::~MonitorPosition(){}
// -------------------- calculate --------------------
void MonitorPosition::calculate(){
values.clear();
PhysicalModel* pml = monitoringManager->getPml();
double pos[3];
//TODO indexes are in index vector: do not iterate and use indexes vector directly?
AtomIterator it=AtomIterator(monitoringManager->getPml(),target);
......
......@@ -199,16 +199,19 @@ bool Reference::getMonitoredData(string type, double time, int index, double &re
}else{
lastElem=data[i]->monitorsMap.upper_bound(type); //last elem of "type" key in map
bool indFound=false;
while(iter!=lastElem & !indFound){ // ieration element of "type" key in map, stop when an index is found
while(iter!=lastElem && !indFound){ // ieration element of "type" key in map, stop when an index is found
// looking for rigth index in this monitor
if (iter->second->getValuesOfIndex(index,ref)){
return true;
}
indFound = (iter->second->getValuesOfIndex(index,ref));
iter++;
}
std::cerr << "no data for index " << index <<" in monitor " << type << " (time: " << time << ")" <<std::endl;
if (indFound)
return true;
else {
std::cerr << "no data for index " << index <<" in monitor " << type << " (time: " << time << ")" <<std::endl;
return false;
}
}
return false;
}
// -------------------- getDistanceToTriangularMesh --------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment