The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 38db04f8 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Updated OpenIGTLink module.

refs #386
parent 9ccba1cb
......@@ -27,7 +27,7 @@
#include <memory>
#include <tbb/atomic.h>
#include "tgt/bounds.h"
#include "cgt/bounds.h"
#include "core/coreapi.h"
#include "core/datastructures/scopedtypeddata.h" // not directly needed here but by many classes including AbstractData
......@@ -48,7 +48,7 @@ namespace campvis {
* Returns the data extent in world coordinates.
* \return The data extent in world coordinates.
*/
virtual tgt::Bounds getWorldBounds() const = 0;
virtual cgt::Bounds getWorldBounds() const = 0;
};
// ================================================================================================
......
......@@ -32,7 +32,7 @@ namespace campvis {
: AutoEvaluationPipeline(dc)
{
addProcessor(&_igtlClient);
addProcessor(&_matrixProcessor);
addProcessor(&_matrixProcessor);
//addEventListenerToBack(&_ve);
}
......@@ -44,12 +44,12 @@ namespace campvis {
AutoEvaluationPipeline::init();
_igtlClient.s_validated.connect(this, &StreamingOIGTLDemo::onProcessorValidated);
_matrixProcessor.s_validated.connect(this, &StreamingOIGTLDemo::onProcessorValidated);
_matrixProcessor.s_validated.connect(this, &StreamingOIGTLDemo::onProcessorValidated);
_renderTargetID.setValue("IGTL.image.ImagerClient");
_matrixProcessor.p_matrixAID.setValue("IGTL.transform.ProbeToTracker");
_matrixProcessor.p_matrixAID.setValue("IGTL.transform.ProbeToTracker");
_matrixProcessor.p_matrixAType.selectByOption("data");
_matrixProcessor.p_matrixBID.setValue("IGTL.transform.ReferenceToTracker");
_matrixProcessor.p_matrixBID.setValue("IGTL.transform.ReferenceToTracker");
_matrixProcessor.p_matrixBType.selectByOption("data");
_igtlClient.p_address.setValue("127.0.0.1");
......
......@@ -64,7 +64,7 @@ namespace campvis {
virtual void onProcessorValidated(AbstractProcessor *processor);
OpenIGTLinkClient _igtlClient;
MatrixProcessor _matrixProcessor;
MatrixProcessor _matrixProcessor;
};
}
......
......@@ -48,8 +48,8 @@ namespace campvis {
, p_targetImagePrefix("targetImageName", "Target Image Prefix", "IGTL.image.")
, p_receiveTransforms("ReceiveTransforms", "Receive TRANSFORM Messages", true)
, p_targetTransformPrefix("targetTransformPrefix", "Target Transform Prefix", "IGTL.transform.")
, p_imageOffset("ImageOffset", "Image Offset in mm", tgt::vec3(0.f), tgt::vec3(-10000.f), tgt::vec3(10000.f), tgt::vec3(0.1f))
, p_voxelSize("VoxelSize", "Voxel Size in mm", tgt::vec3(1.f), tgt::vec3(-100.f), tgt::vec3(100.f), tgt::vec3(0.1f))
, p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f))
, p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f))
, p_receivePositions("ReceivePositions", "Receive POSITION Messages", true)
, p_targetPositionPrefix("targetPositionsPrefix", "Target Position Prefix", "IGTL.position.")
, _stopExecution()
......@@ -75,7 +75,7 @@ namespace campvis {
addProperty(p_receivePositions, INVALID_PROPERTIES);
addProperty(p_targetPositionPrefix, VALID);
invalidate(INVALID_PROPERTIES);
invalidate(INVALID_PROPERTIES);
}
......@@ -151,13 +151,13 @@ namespace campvis {
return;
}
tgt::vec3 imageOffset(0.f);
tgt::vec3 voxelSize(1.f);
tgt::ivec3 size_i(1);
cgt::vec3 imageOffset(0.f);
cgt::vec3 voxelSize(1.f);
cgt::ivec3 size_i(1);
imageMessage->GetSpacing(voxelSize.elem);
imageMessage->GetDimensions(size_i.elem);
tgt::svec3 size(size_i);
cgt::svec3 size(size_i);
imageMessage->GetOrigin(imageOffset.elem);
size_t dimensionality = (size_i[2] == 1) ? ((size_i[1] == 1) ? 1 : 2) : 3;
......@@ -192,7 +192,7 @@ namespace campvis {
p_imageOffset.setVisible(p_receiveImages.getValue());
p_voxelSize.setVisible(p_receiveImages.getValue());
p_targetTransformPrefix.setVisible(p_receiveImages.getValue() || p_receiveTransforms.getValue());
p_targetPositionPrefix.setVisible(p_receivePositions.getValue());
p_targetPositionPrefix.setVisible(p_receivePositions.getValue());
validate(INVALID_PROPERTIES);
}
......@@ -246,7 +246,7 @@ namespace campvis {
if (c & igtl::MessageHeader::UNPACK_BODY) // if CRC check is OK
{
tgt::mat4 mtx;
cgt::mat4 mtx;
// Retrieve the transform data (this cast is a bit dubious but should be ok judging from the respective class internals)
transMsg->GetMatrix(*reinterpret_cast<igtl::Matrix4x4*>(mtx.elem));
#ifdef IGTL_CLIENT_DEBUGGING
......@@ -346,7 +346,7 @@ namespace campvis {
imgMsg->GetSpacing(spacing);
imgMsg->GetSubVolume(svsize, svoffset);
tgt::mat4 mtx;
cgt::mat4 mtx;
// Retrieve the transform data (this cast is a bit dubious but should be ok judging from the class internals)
imgMsg->GetMatrix(*reinterpret_cast<igtl::Matrix4x4*>(mtx.elem));
......
......@@ -35,7 +35,7 @@
#include <igtlMessageHeader.h>
#include <igtlImageMessage.h>
#include <tgt/matrix.h>
#include <cgt/matrix.h>
#include <ext/threading.h>
#include <tbb/atomic.h>
......@@ -118,8 +118,8 @@ namespace campvis {
protected:
/// Stores received data from a POSITION Message
struct PositionMessageData {
tgt::vec3 _position;
tgt::vec4 _quaternion;
cgt::vec3 _position;
cgt::vec4 _quaternion;
};
/// Main method for the receiver thread. The new thread will
......@@ -139,7 +139,7 @@ namespace campvis {
igtl::ClientSocket::Pointer _socket;
//data
std::map<std::string, tgt::mat4> _receivedTransforms; ///< the transforms that has been received by the igtl worker thread, mapped by device name
std::map<std::string, cgt::mat4> _receivedTransforms; ///< the transforms that has been received by the igtl worker thread, mapped by device name
std::map<std::string, igtl::ImageMessage::Pointer> _receivedImages; ///< the image messages received by the igtl worker thread, mapped by device name
std::map<std::string, PositionMessageData> _receivedPositions; ///< position message data received by the igtl worker thread, mapped by device name
......
Markdown is supported
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