<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi Tobias,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">you can see the <a href="https://itk.org/Doxygen/html/classitk_1_1ImageIOBase.html">inheritance</a> diagram of ImageIOs (you have to click to expand). If you want to have some things common with NIFTIImageIO, you could create a new class (you could call it RescalableImageBase or something like that), and have both Bruker and Nifti inherit from it (similar to how a few IOs inherit from IPLCommonImageIO). Of course, put common methods inside that class. But CastCopy and RescaleFunction are so small that I don't think it is nearly worth the effort.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Regards,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Dženan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 11, 2017 at 5:21 PM, Wood, Tobias <span dir="ltr"><<a href="mailto:tobias.wood@kcl.ac.uk" target="_blank">tobias.wood@kcl.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Dzenan,<br>
<span class=""><br>
> In case that NIFTI reader detects it needs to do rescale/slope transformation (in function ReadImageInformation), it says that this->m_ComponentType=FLOAT, no matter what is the real component type on disk. Then Read reads the image data, converts it to float, does rescale/slope transformation in place (float to float).<br>
<br>
</span>Thanks so much - I had missed this part. I have copied the NIFTI code, and the rescaling is working now. There are two functions (CastCopy and RescaleFunction) that I have copied & pasted - these could go into a common file somewhere, but I have no idea where is appropriate in the ITK heirarchy.<br>
<br>
> On 11/02/2017, 16:18, "Jon Haitz Legarreta" <<a href="mailto:jhlegarreta@vicomtech.org">jhlegarreta@vicomtech.org</a>> wrote:<br>
> Hi Tobias,<br>
> if you are to move the classes out of review/external module, please provide a test (if it does not already exist).<br>
> I can help you if required. You can add me as a reviewer to the gerrit topic.<br>
> Kind regards,<br>
> JON HAITZ<br>
<br>
Hi Jon,<br>
<br>
There does not appear to be a meaningful test at the moment - only a skeleton file that doesn’t actually test anything. I would like to implement a test but I’m not planning on extending the class to be able to write as well as read Bruker.  I have no use case for this, and I doubt anyone else would either. Hence without checking an actual file into the repo I’m not sure what test would be useful?<br>
<br>
I will work on this code more before submitting it to gerrit - there are a lot of corner cases I haven’t implemented yet.<br>
<br>
Best wishes,<br>
<div class="HOEnZb"><div class="h5">Toby<br>
<br>
______________________________<wbr>_________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/community" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/community</a><br>
</div></div></blockquote></div><br></div>