Thanks very much again mountain man. I have also realised something a bit more about part of an earlier post I made:
Part of my workflow often involves analysing multipe DICOM images from multiple systems all in one go and to do this I import the images as a stack (or more commonly a virtual stack). In some images the pixel data may be signed short, in some unsigned short, in some 32-bit etc.
If you take the images that you uploaded in your last post and put them all in the same directory and import them as an image sequence in imagej then you can run the python script you posted previously to see that the Calibration object created for the whole stack is based on the last image in the stack (I experimented a bit renaming the images so that they were imported in different orders). However, the pixels stored in the ImageProcessor for each slice are each read in as we have already discussed above (fortunately not munged based on the last slices but on the correct DICOM information for that slice as discussed earlier in the thread!).
This was giving me some very strange and inconsistent behaviour because the type of the last slice in my image was usually different so I hadn’t been able to figure out what was going on with the getPixelValue function! It sometimes seemed to work and sometimes didn’t… now I know why.
Thanks again for all of your help.