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 5774ef3c authored by Jakob Weiss's avatar Jakob Weiss
Browse files

Minor fixes in various places

* datacontainerinspector can now display alpha-channel only in a meaningful way
* new method in stringutils to display bytes in a humanly readable form
* depth darkening has slightly increased range for lambda
* satisfied formatting OCD
parent ff4c2359
......@@ -101,12 +101,17 @@ void main() {
if (! _renderRChannel)
out_Color.r = 0.0;
if (! _renderGChannel)
out_Color.g = 0.0;
if (! _renderBChannel)
out_Color.b = 0.0;
if (! _renderAChannel)
out_Color.a = 1.0;
else if(! _renderRChannel && ! _renderGChannel && ! _renderBChannel)
out_Color = vec4(vec3((abs(out_Color.a) - vec3(_transferFunctionParams._intensityDomain.x)) / (_transferFunctionParams._intensityDomain.y - _transferFunctionParams._intensityDomain.x)), 1);
// mix with fancy checkerboard pattern:
if ((mod(ex_TexCoord.x * 10.0, 2.0) > 1.0) ^^ (mod(ex_TexCoord.y * 10.0, 2.0) > 1.0))
......
......@@ -149,4 +149,22 @@ namespace campvis {
return str.substr(first, last - first + 1);
}
}
std::string StringUtils::humanizeBytes(size_t numBytes)
{
std::string units[5] = { " Bytes", " KiB", " MiB", " GiB", " TiB" };
size_t index = 0;
size_t remainder = 0;
while (numBytes > 1024 && index < 4) {
remainder = numBytes % 1024;
numBytes /= 1024;
++index;
}
if (remainder != 0)
return toString(numBytes) + "." + toString(remainder) + units[index];
else
return toString(numBytes) + units[index];
}
}
\ No newline at end of file
......@@ -143,6 +143,11 @@ namespace campvis {
*/
template<typename T>
static std::string join(const std::vector<T>& tokens, const std::string& delimiter);
/**
* Converts a number of bytes into a humanly readable form
*/
static std::string humanizeBytes(size_t numBytes);
};
// - Template definition --------------------------------------------------------------------------
......
......@@ -44,7 +44,7 @@ namespace campvis {
, p_inputImage("InputImage", "Input Image", "", DataNameProperty::READ)
, p_outputImage("OutputImage", "Output Image", "dd.output", DataNameProperty::WRITE)
, p_sigma("Sigma", "Sigma of Gaussian Filter", 2.f, 0.f, 10.f, 0.1f)
, p_lambda("Lambda", "Strength of Depth Darkening Effect", 10.f, 0.f, 50.f, 0.1f)
, p_lambda("Lambda", "Strength of Depth Darkening Effect", 10.f, 0.f, 150.f, 0.1f)
, p_useColorCoding("UseColorCoding", "Cold/Warm Color Coding", false)
, p_coldColor("ColdColor", "Cold Color (Far Objects)", cgt::vec3(0.f, 0.f, 1.f), cgt::vec3(0.f), cgt::vec3(1.f))
, p_warmColor("WarmColor", "Warm Color (Near Objects)", cgt::vec3(1.f, 0.f, 0.f), cgt::vec3(0.f), cgt::vec3(1.f))
......
......@@ -115,10 +115,10 @@ namespace campvis {
// mirror matrix sponsored by:
// Jiang
mirrorMatrix = cgt::transpose(cgt::mat4(
1 - 2*n.x*n.x, -2*n.y*n.x , -2*n.z*n.x , 0,
-2*n.x*n.y , 1 - 2*n.y*n.y, -2*n.z*n.y , 0,
-2*n.x*n.z , -2*n.y*n.z , 1 - 2*n.z*n.z, 0,
2*n.x*k , 2*n.y*k , 2*n.z*k , 1));
1 - 2*n.x*n.x , - 2*n.y*n.x , - 2*n.z*n.x , 0,
- 2*n.x*n.y , 1 - 2*n.y*n.y , - 2*n.z*n.y , 0,
- 2*n.x*n.z , - 2*n.y*n.z , 1 - 2*n.z*n.z , 0,
2*n.x*k , 2*n.y*k , 2*n.z*k , 1));
}
else {
LERROR("No suitable virtual mirror geometry found.");
......
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