mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-18 01:41:29 -06:00
Implement vector variable length and better progress cb in kameleonvolumetorawtask
This commit is contained in:
committed by
Matthias Berg
parent
7fdc139879
commit
69a3bfb1cf
13
data/tasks/mas_bastille_single_conversion.task
Normal file
13
data/tasks/mas_bastille_single_conversion.task
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
return {{
|
||||
Type = "KameleonVolumeToRawTask",
|
||||
Input = "/media/jgrangien/SimDataDrive/BastilleDay/mhd_run/3D_CDF/mas_merged_step_112.cdf",
|
||||
-- Variable = "rho",
|
||||
VariableVector = "ur uphi utheta",
|
||||
InnerRadialLimit = 1.75,
|
||||
Dimensions = {100, 100, 128},
|
||||
LowerDomainBound = {1, -90, 0},
|
||||
UpperDomainBound = {15, 90, 360},
|
||||
RawVolumeOutput = "${DATA}/mas/bastille/u/mas_merged_step_112.rawvolume",
|
||||
DictionaryOutput = "${DATA}/mas/bastille/u/mas_merged_step_112.dictionary"
|
||||
}}
|
||||
@@ -159,6 +159,12 @@ std::unique_ptr<volume::RawVolume<float>> KameleonVolumeReader::readFloatVolume(
|
||||
continue;
|
||||
}
|
||||
|
||||
// Radius is within custom limit of exclusion, skip value
|
||||
if (volumeCoords.x < innerRadialLimit) {
|
||||
// std::cout << "Skipping radius " << volumeCoords.x << std::endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
float value = !variable.empty() ? sample(volumeCoords) : sampleVectorVariablesLength(volumeCoords);
|
||||
|
||||
// Multiply value by the squared first coordinate
|
||||
@@ -341,3 +347,4 @@ void KameleonVolumeReader::setReaderCallback(callback_t& cb) {
|
||||
};
|
||||
|
||||
} // namespace openspace::kameleonvolume
|
||||
|
||||
|
||||
@@ -30,10 +30,9 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <modules/volume/rawvolume.h>
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
// #include <ghoul/misc/dictionary.h>
|
||||
#include <functional>
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4619) // #pragma warning: there is no warning number '4619'
|
||||
@@ -93,6 +92,8 @@ public:
|
||||
|
||||
void setReaderCallback(callback_t& cb);
|
||||
|
||||
void setReaderCallback(callback_t& cb);
|
||||
|
||||
private:
|
||||
static void addAttributeToDictionary(ghoul::Dictionary& dictionary,
|
||||
const std::string& key, ccmc::Attribute& attr);
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
namespace {
|
||||
constexpr const char* KeyInput = "Input";
|
||||
constexpr const char* KeyRawVolumeOutput = "RawVolumeOutput";
|
||||
|
||||
Reference in New Issue
Block a user