Improved CAMPVis deployment:

Added directories of various needed resources (textures, sampledata) to the CampvisShaderDirectories CMake variable, which is used for deployment. Replaced various occurences of CAMPVIS_SOURCE_DIR with ShdrMgr.completePath().
parent 388856cf
......@@ -117,6 +117,7 @@ IF(CAMPVIS_GROUP_SOURCE_FILES)
ENDIF()
IF(CAMPVIS_DEPLOY_SHADERS)
LIST(APPEND CampvisShaderDirectories "application/data")
LIST(APPEND CampvisShaderDirectories "application/glsl")
LIST(APPEND CampvisShaderDirectories "core/glsl")
......
......@@ -155,7 +155,7 @@ namespace campvis {
// load textureData from file
tgt::TextureReaderTga trt;
_errorTexture = trt.loadTexture(CAMPVIS_SOURCE_DIR "/application/data/no_input.tga", tgt::Texture::LINEAR);
_errorTexture = trt.loadTexture(ShdrMgr.completePath("application/data/no_input.tga"), tgt::Texture::LINEAR);
#ifdef CAMPVIS_HAS_SCRIPTING
......
......@@ -25,6 +25,7 @@ IF(${ModuleEnabled})
FILE(GLOB ThisModApplicationToBeMocced RELATIVE ${ModulesDir} modules/advancedusvis/widgets/*.h)
SET(ThisModShaderDirectories "modules/advancedusvis/glsl")
SET(ThisModShaderDirectories "modules/advancedusvis/sampledata")
SET(ThisModDependencies vis io preprocessing)
ENDIF(${ModuleEnabled})
......
......@@ -59,7 +59,7 @@ namespace campvis {
_ve.p_outputImage.setValue("result");
_renderTargetID.setValue("result");
_imageReader.p_url.setValue(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/smallHeart.mhd");
_imageReader.p_url.setValue(ShdrMgr.completePath("/modules/vis/sampledata/smallHeart.mhd"));
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.addSharedProperty(&_morphologyFilter.p_inputImage);
......
......@@ -59,7 +59,7 @@ namespace campvis {
_ve.p_outputImage.setValue("result");
_renderTargetID.setValue("result");
_imageReader.p_url.setValue(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/smallHeart.mhd");
_imageReader.p_url.setValue(ShdrMgr.completePath("/modules/vis/sampledata/smallHeart.mhd"));
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.addSharedProperty(&_resampler.p_inputImage);
......
......@@ -15,6 +15,7 @@ IF(${ModuleEnabled})
)
SET(ThisModShaderDirectories "modules/tensor/glsl")
SET(ThisModShaderDirectories "modules/tensor/sampledata")
SET(ThisModDependencies io vis)
ENDIF(${ModuleEnabled})
......
......@@ -16,6 +16,7 @@ IF(${ModuleEnabled})
)
SET(ThisModShaderDirectories "modules/vectorfield/glsl")
SET(ThisModShaderDirectories "modules/vectorfield/sampledata")
SET(ThisModDependencies io vis)
ENDIF(${ModuleEnabled})
......
......@@ -85,7 +85,7 @@ namespace campvis {
_camera.addSharedProperty(&_dvrNormal.p_camera);
_camera.addSharedProperty(&_dvrVM.p_camera);
_imageReader.p_url.setValue(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/smallHeart.mhd");
_imageReader.p_url.setValue(ShdrMgr.completePath("/modules/vis/sampledata/smallHeart.mhd"));
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.addSharedProperty(&_eepGenerator.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_vmEepGenerator.p_sourceImageID);
......
......@@ -72,7 +72,7 @@ namespace campvis {
// load textureData from file
tgt::TextureReaderTga trt;
tgt::Texture* campTexture = trt.loadTexture(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/camplogo.tga", tgt::Texture::LINEAR);
tgt::Texture* campTexture = trt.loadTexture(ShdrMgr.completePath("/modules/vis/sampledata/camplogo.tga"), tgt::Texture::LINEAR);
ImageData* textureData = new ImageData(2, campTexture->getDimensions(), campTexture->getNumChannels());
ImageRepresentationGL::create(textureData, campTexture);
getDataContainer().addData("CampTexture", textureData);
......@@ -94,7 +94,7 @@ namespace campvis {
_camera.addSharedProperty(&_teapotRenderer.p_camera);
_camera.addSharedProperty(&_cubeRenderer.p_camera);
_geometryReader.p_url.setValue(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/left_ventricle_mesh.vtk");
_geometryReader.p_url.setValue(ShdrMgr.completePath("/modules/vis/sampledata/left_ventricle_mesh.vtk"));
_geometryReader.p_targetImageID.setValue("reader.output");
_lvRenderer.p_geometryID.setValue("reader.output");
......
......@@ -70,7 +70,7 @@ namespace campvis {
_compositor.p_targetImageId.setValue("final");
_renderTargetID.setValue("final");
_imageReader.p_url.setValue(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/smallHeart.mhd");
_imageReader.p_url.setValue(ShdrMgr.completePath("/modules/vis/sampledata/smallHeart.mhd"));
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.addSharedProperty(&_mprRenderer.p_sourceImageID);
......
......@@ -50,7 +50,7 @@ namespace campvis {
void SliceVis::init() {
AutoEvaluationPipeline::init();
_imageReader.p_url.setValue(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/smallHeart.mhd");
_imageReader.p_url.setValue(ShdrMgr.completePath("/modules/vis/sampledata/smallHeart.mhd"));
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.addSharedProperty(&_sliceExtractor.p_sourceImageID);
_imageReader.s_validated.connect(this, &SliceVis::onProcessorValidated);
......
......@@ -54,7 +54,7 @@ namespace campvis {
_ve.p_outputImage.setValue("combine");
_renderTargetID.setValue("combine");
_imageReader.setURL(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/smallHeart.mhd");
_imageReader.setURL(ShdrMgr.completePath("/modules/vis/sampledata/smallHeart.mhd"));
_imageReader.setTargetImageId("reader.output");
_imageReader.setTargetImageIdSharedProperty(&_ve.p_inputVolume);
......
......@@ -64,7 +64,7 @@ namespace campvis {
_vr.p_outputImage.setValue("combine");
_renderTargetID.setValue("combine");
_imageReader.p_url.setValue(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/smallHeart.mhd");
_imageReader.p_url.setValue(ShdrMgr.completePath("/modules/vis/sampledata/smallHeart.mhd"));
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.addSharedProperty(&_vr.p_inputVolume);
......
......@@ -17,6 +17,7 @@ IF(${ModuleEnabled})
)
SET(ThisModShaderDirectories "modules/vis/glsl")
SET(ThisModShaderDirectories "modules/vis/sampledata")
SET(ThisModDependencies base io)
ENDIF(${ModuleEnabled})
......
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