Commit 7b772ff5 authored by Declara Denis's avatar Declara Denis Committed by Christian Schulte zu Berge
Browse files

Fixed warnings in AdvancedUsFusion processor

warnings were caused by incorrect signature of updateProperties method
parent bb5d23dd
......@@ -154,15 +154,17 @@ namespace campvis {
}
}
void AdvancedUsFusion::updateProperties(DataContainer dc) {
void AdvancedUsFusion::updateProperties(DataContainer& dc) {
ScopedTypedData<ImageData> img(dc, p_usImageId.getValue());
p_transferFunction.setImageHandle(img.getDataHandle());
const cgt::svec3& imgSize = img->getSize();
if (static_cast<cgt::svec3::ElemType> (p_sliceNumber.getMaxValue()) != imgSize.z - 1){
p_sliceNumber.setMaxValue(static_cast<int>(imgSize.z) - 1);
if (img != nullptr) {
const cgt::svec3& imgSize = img->getSize();
if (static_cast<cgt::svec3::ElemType> (p_sliceNumber.getMaxValue()) != imgSize.z - 1){
p_sliceNumber.setMaxValue(static_cast<int>(imgSize.z) - 1);
}
p_use3DTexture.setValue(img->getDimensionality() == 3);
}
p_use3DTexture.setValue(img->getDimensionality() == 3);
}
std::string AdvancedUsFusion::generateHeader() const {
......
......@@ -94,7 +94,7 @@ namespace campvis {
/// \see AbstractProcessor::updateResult
virtual void updateResult(DataContainer& dataContainer);
/// adapts the range of the p_sliceNumber property to the image
virtual void updateProperties(DataContainer dc);
virtual void updateProperties(DataContainer& dc);
std::string generateHeader() const;
......
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