MCPcopy Create free account
hub / github.com/Kitware/VTK / ExecuteDataWithInformation

Method ExecuteDataWithInformation

Imaging/Sources/vtkImageNoiseSource.cxx:84–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void vtkImageNoiseSource::ExecuteDataWithInformation(vtkDataObject* output, vtkInformation* outInfo)
85{
86 vtkImageData* data = this->AllocateOutputData(output, outInfo);
87
88 if (data->GetScalarType() != VTK_DOUBLE)
89 {
90 vtkErrorMacro("Execute: This source only outputs doubles");
91 }
92
93 vtkImageProgressIterator<double> outIt(data, data->GetExtent(), this, 0);
94
95 // Loop through output pixels
96 while (!outIt.IsAtEnd())
97 {
98 double* outSI = outIt.BeginSpan();
99 double* outSIEnd = outIt.EndSpan();
100 while (outSI != outSIEnd)
101 {
102 // now process the components
103 *outSI = this->Minimum + (this->Maximum - this->Minimum) * vtkMath::Random();
104 outSI++;
105 }
106 outIt.NextSpan();
107 }
108}
109
110void vtkImageNoiseSource::PrintSelf(ostream& os, vtkIndent indent)
111{

Callers

nothing calls this directly

Calls 5

NextSpanMethod · 0.80
AllocateOutputDataMethod · 0.45
GetScalarTypeMethod · 0.45
GetExtentMethod · 0.45
IsAtEndMethod · 0.45

Tested by

no test coverage detected