Hi to all,<br><br>I am using a reader to read an image and then pass the reader to a RescaleIntensityImageFilter, with which I rescale the image from 0 to 255.Then I am using an index type pointer tto get the pixel value, as it seems bellow:<br>
<br><i> InputImageType::Pointer image = filter_rescale->GetOutput();<br> InputImageType::IndexType index = filter_rescale->GetOutput()->GetLargestPossibleRegion().GetIndex();<br><br> InputImageType::IndexType currentIndex;<br>
currentIndex[0] = k2;<br> currentIndex[1] = k1;<br> currentIndex[2] = ui->verticalScrollBar_z->value();<br> InputImageType::PixelType currentValue = image->GetPixel(currentIndex);</i><br>
<br>But when I get the values of currentIndex, I get for example a value 113.581. I want to know in this case which rounding would be correct, the 113 value or the 114 value.And how I could achieve this rounding?<br><br>Thanks in advance<br>
<div style="visibility: hidden; left: -5000px; position: absolute; z-index: 9999; padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 130%;" id="avg_ls_inline_popup">
</div>