imageData->GetOutput()->GetPointData()->GetArray(“ImageScalars”);
I also tried the following code:
int* dimension = connector->GetOutput()->GetDimensions();
for (int x = 0; x < dimension[0]; x++)
{
double* pixel = static_cast<double*>(connector->GetOutput()->GetScalarPointer(x, 0, 0));
std::cout << pixel[x] << std::endl;
}
The output:
-6.818e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
-2.06898e+289
I am wondering what data type to be selected to receive the result pixel.