18 vtkInformationVector **inputVector,
19 vtkInformationVector *outputVector) {
21 auto inputImage = vtkImageData::GetData(inputVector[0]);
22 auto outputImage = vtkImageData::GetData(outputVector);
23 outputImage->ShallowCopy(inputImage);
25 size_t const nPoints = outputImage->GetNumberOfPoints();
28 noise->SetName(
"Noise");
29 noise->SetNumberOfTuples(nPoints);
33 outputImage->GetDimensions(dim);
36 const std::string msg =
"Computing Noise (" + std::to_string(dim[0]) +
"x"
37 + std::to_string(dim[1]) +
"x"
38 + std::to_string(dim[2]) +
")";
42 for(
size_t i = 0; i < nPoints; i++)
43 noiseData[i] = ((
float)std::rand()) / ((float)RAND_MAX);
47 outputImage->GetPointData()->AddArray(noise);
printMsg(debug::output::BOLD+" | | | | | . \\ | | (__| | / __/| |_| / __/|__ _|"+debug::output::ENDCOLOR, debug::Priority::PERFORMANCE, debug::LineMode::NEW, stream)