[ITK] Bruker Format
Wood, Tobias
tobias.wood at kcl.ac.uk
Fri Feb 10 17:02:49 EST 2017
Hello,
I’ve made some progress on rewriting the Bruker code. I’m stuck on when the ImageIO classes should apply scalings/offsets.
Bruker’s default data type is INT16. They store a scaling and offset that must be applied to the data. For whatever reason, the scaling tends to very small - about 1e-5. Hence a lot of values should be scaled down to < 1. Obviously, if this is done at INT16 precision then most of the data is rounded to zero and lost.
I tried to copy the NifiIO class which also applies scaling (See lines 707 onwarsds in itkNiftiImageIO.cxx). However - if I read this correctly, it is applying the scaling at the precision/datatype of the image file, not the PixelType requested by the itkImage template parameter to itkImageFileReader.
At what point is the buffer read by the ImageIO classes converted to the PixelType of the requested itkImage? How do I supply the scaling and offset to this conversion?
As always, I hope I’m missing something obvious.
Thanks,
Toby
On 16/01/2017, 09:27, "Wood, Tobias" <tobias.wood at kcl.ac.uk> wrote:
> In addition to Dženan's suggestion, the code could be cleaned up, moved out of the ITKReview module, and placed in its own module in the IO group. This will enable it to be automatically registered like the other ImageIOs.
Thanks Matt and Dženan, that’s what I was wondering. I will experiment with the code and submit a patch if I find time.
Best wishes,
Toby
More information about the Community
mailing list