Trying to load custom loaded images into vtkImageImport

First of all, thank you for your time and your reply ^^

  • The folder I am using to test this import contain 16bit images, so either short or unsigned short. I can check with image.bitsStored() that in this case is 16. Also image.pixelRepresentation() returns int16 (so probably short because the flag UInt16 exist for unsigned).
  • The argument of getRawPixelData(x) is the frame, this because there might be a case where all the frames of the volume are in a single “image”. In this case every image has a single frame so it’s always 0.
  • getRawPixelData(x) returns a buffer void* that points to the raw pixel data of the frame
  • About the size, I am not 100% sure, the best way seems doing image.pixelData(0)->size(). This returns 524’288 (512x512x2), and I am being told that is *2 because is 16bit.
    Why? How should i use this size?