<div dir="ltr"><div>Hi,<br>Yes, you need to modify it, add the TOutputImageType to overwrite the default line 80 of <a href="https://github.com/SimonRit/RTK/blob/master/code/rtkLUTbasedVariableI0RawToAttenuationImageFilter.hxx">rtkLUTbasedVariableI0RawToAttenuationImageFilter.hxx</a>. But note that bitshift 2 (the default) seems small to me for unsigned int because your histogram will be 8 GB. You probably want to test different bitshifts in this function and use a larger one for int. Actually, you'll also have a similarly huge lookup table. Have you considered casting your projections to unsigned short for the I0 estimation?<br></div>Simon<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 8, 2017 at 12:03 PM, Lotte Schyns <span dir="ltr"><<a href="mailto:lotte.schyns@maastro.nl" target="_blank">lotte.schyns@maastro.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div bgcolor="#FFFFFF" text="#000000">
<p>Hello Simon,<br>
<br>
Thanks for fixing it. The reason I removed the default templates was because there were unsigned shorts in the default templates and for an instance of the I0EstimationProjectionFilter class in rtk::<wbr>LUTbasedVariableI0RawToAttenua<wbr>tionImageFilter::<wbr>BeforeThreadedGenerateData(),
 only TInputImage is defined, so I wanted to prevent some undesired unsigned shorts to show up there because of the default templates. Do you think LUTbasedVariableI0RawToAttenua<wbr>tionImageFilter can now also handle unsigned ints in BeforeThreadedGenerateData,
 even with the default templates? I wasn't sure, so I deleted them.<span class="HOEnZb"><font color="#888888"><br>
<br>
Lotte</font></span></p><div><div class="h5">
<br>
<div class="m_6685285799650404498moz-cite-prefix">On 07-03-17 22:38, Simon Rit wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi Lotte,<br>
</div>
You had removed the default templates, which was the cause of the compilation problem. I have fixed it and put the change in a new branch:<br>
<a href="https://github.com/SimonRit/RTK/tree/Lotte1990-patch" target="_blank">https://github.com/SimonRit/<wbr>RTK/tree/Lotte1990-patch</a><br>
</div>
I'll merge tomorrow if the tests pass.<br>
</div>
Thanks for the work,<br>
</div>
Simon<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Mar 6, 2017 at 1:02 PM, Lotte Schyns <span dir="ltr">
<<a href="mailto:lotte.schyns@maastro.nl" target="_blank">lotte.schyns@maastro.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">Hello Simon,<br>
<br>
Thanks for the quick response. I made some changes and sent you a pull request. However, because of the changes I made, I'm now having some problems in rtk::LUTbasedVariableI0RawToAt<wbr>tenuationImageFilter::BeforeTh<wbr>readedGenerateData(). I tried
 to solve it using typename, but it seems to be unsuccessful. Could you please have a look? The I0EstimationProjectionFilter seems to work now.<span class="m_6685285799650404498HOEnZb"><font color="#888888"><br>
<br>
Lotte</font></span>
<div>
<div class="m_6685285799650404498h5"><br>
<br>
<div class="m_6685285799650404498m_2635047111946176357moz-cite-prefix">On 04-03-17 11:25, Simon Rit wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Hi Lotte,<br>
</div>
This code has only be used for unsigned short. I guess you should replace all "unsigned short" in the two code files by InputImagePixelType which is already defined in the header. I would also advise a code review, for example 16 line 33 of rtkI0EstimationProjectionFilte<wbr>r.hxx
 should be replace by <span class="m_6685285799650404498m_2635047111946176357gmail-t-c"><span class="m_6685285799650404498m_2635047111946176357gmail-mw-geshi m_6685285799650404498m_2635047111946176357gmail-cpp m_6685285799650404498m_2635047111946176357gmail-source-cpp"><a href="http://en.cppreference.com/w/cpp/types/numeric_limits" target="_blank"><span class="m_6685285799650404498m_2635047111946176357gmail-kw344">std::<span class="m_6685285799650404498m_2635047111946176357gmail-me2">numeric_limits</span></span></a><span class="m_6685285799650404498m_2635047111946176357gmail-sy1"><</span></span></span>InputImage<wbr>PixelType<span class="m_6685285799650404498m_2635047111946176357gmail-t-c"><span class="m_6685285799650404498m_2635047111946176357gmail-mw-geshi m_6685285799650404498m_2635047111946176357gmail-cpp m_6685285799650404498m_2635047111946176357gmail-source-cpp"><span class="m_6685285799650404498m_2635047111946176357gmail-sy1">></span><span class="m_6685285799650404498m_2635047111946176357gmail-sy4">::</span><span class="m_6685285799650404498m_2635047111946176357gmail-me2">digits.<br>
</span></span></span></div>
<span class="m_6685285799650404498m_2635047111946176357gmail-t-c"><span class="m_6685285799650404498m_2635047111946176357gmail-mw-geshi m_6685285799650404498m_2635047111946176357gmail-cpp m_6685285799650404498m_2635047111946176357gmail-source-cpp"><span class="m_6685285799650404498m_2635047111946176357gmail-me2">I0EstimationProjectionFilter
 is based on a histogram analysis. Using 2^16 bins for unsigned shorts or 2^32 for unsigned int is too large so bitShift is used to reduce the number of bins to, e.g., for unsigned shorts, 2^(16-bitShift) bins.<br>
</span></span></span></div>
<span class="m_6685285799650404498m_2635047111946176357gmail-t-c"><span class="m_6685285799650404498m_2635047111946176357gmail-mw-geshi m_6685285799650404498m_2635047111946176357gmail-cpp m_6685285799650404498m_2635047111946176357gmail-source-cpp"><span class="m_6685285799650404498m_2635047111946176357gmail-me2">If
 you can't figure it out, let us know. If you do, please share your dev!<br>
</span></span></span></div>
<span class="m_6685285799650404498m_2635047111946176357gmail-t-c"><span class="m_6685285799650404498m_2635047111946176357gmail-mw-geshi m_6685285799650404498m_2635047111946176357gmail-cpp m_6685285799650404498m_2635047111946176357gmail-source-cpp"><span class="m_6685285799650404498m_2635047111946176357gmail-me2">Thanks,<br>
</span></span></span></div>
<span class="m_6685285799650404498m_2635047111946176357gmail-t-c"><span class="m_6685285799650404498m_2635047111946176357gmail-mw-geshi m_6685285799650404498m_2635047111946176357gmail-cpp m_6685285799650404498m_2635047111946176357gmail-source-cpp"><span class="m_6685285799650404498m_2635047111946176357gmail-me2">Simon<br>
</span></span></span></div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Mar 3, 2017 at 2:39 PM, Lotte Schyns <span dir="ltr">
<<a href="mailto:lotte.schyns@maastro.nl" target="_blank">lotte.schyns@maastro.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I would like to set the maximum pixel value in<br>
rtk::I0EstimationProjectionFil<wbr>ter to (2^32)-1 since I have (unsigned)<br>
pixels of 4 bytes each. However, the input for SetMaxPixelValue requires<br>
an unsigned short, so I can only set a maximum value of (2^16)-1, which<br>
is not enough. Is there a possible solution/workaround for this? Could<br>
you also tell me what the bitShift represents in<br>
rtk::I0EstimationProjectionFil<wbr>ter? Thanks in advance.<br>
<br>
Lotte<br>
______________________________<wbr>_________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="http://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/rtk-users</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>

</blockquote></div><br></div>