I am new to vtk.js and experiencing some unexpected orientation related issues. I have tried my code with both my custom data loader as well as the itk-wasm loader and got the same results in both cases. I am loading a standard axial DICOM dataset (row vec: [1,0,0], col vec [0,1,0] ). I am loading the bottom most slice in the dataset as the first image in the vtkImageData image buffer and the direction is set to the identity matrix.
First issue is with vtkImageResliceMapper … for the axial view, I use a normal of [0,0,1] and a ViewUp of [0,-1,0] and things appear as expected. However, for the sagittal, I specify a normal of [-1,0,0] which seems to require a ViewUp of [0,0,-1] instead of [0,0,1] to get the head on top. Similarly my coronal view uses a normal of [0,1,0] and also seems to require a ViewUp of [0,0,-1] to get the head on top. The head is at +z so why the -1 in the ViewUp.
Second related issue with vtkVolumeMapper … trying to display an initial coronal view of the volume with the head up from the front (anterior) using a camera position of [0,-y,0]. I found I also needed to use a ViewUp of [0,0,-1] which doesn’t make sense to me as the head should be at +z. Additionally the anatomy was flipped in the x direction (i.e. the right/left anatomy was flipped). I was able to get it to look correct with a setScale(-1,1,1).
Both of these issues suggest to me that I have some basic misunderstanding of how the coordinate system works within vtk so hoping someone can provide some insight.