<div dir="ltr">Thanks, Mike! The pixels values are correct now.<div><br></div><div><br></div><div>For the same sample image, I also found the SCIFIO reader reports different 'Voxel sizes', which is microns/pixels for x, y, and z, comparing to what I see from Fiji's Image ->  Show information. If I don't do "<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">reader->SetImageIO( io );", ITK's DICOM ImageIO actually reports the same value as Fiji's. Should I create another topic for this issue?</span></div>
<div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 23, 2013 at 4:19 PM, Mark Hiner <span dir="ltr"><<a href="mailto:hiner@wisc.edu" target="_blank">hiner@wisc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Joe,<br><br></div> I made my changes and pushed a new scifio-itk-bridge.jar. I didn't have to change the C++ side at all, so all you should have to do is delete the "scifio-itk-bridge-1.0.0.jar" in your local $ITK_BUILD/lib/jars, then clean and rebuild the SCIFIO module (which should trigger a download of the latest jar, but only if it's not already present in $ITK_BUILD/lib/jars).<br>



<br></div> You can also <a href="http://jenkins.imagej.net/view/SCIFIO/job/SCIFIOITKBridge/lastSuccessfulBuild/artifact/target/scifio-itk-bridge-1.0.0.jar" target="_blank">manually download</a> and replace the jar if you don't want to rebuild everything.<br>


<br></div> Let me know if you have any more problems, or if this fix doesn't work for you.<br>
<br>Thanks,<br>Mark<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 23, 2013 at 1:31 PM, Mark Hiner <span dir="ltr"><<a href="mailto:hinerm@gmail.com" target="_blank">hinerm@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Joe,<br><br> Just wanted to let you know I identified that this is an error with endianness not being handled correctly in the SCIFIO ImageIO.<br>


<div><div class="gmail_extra"><br></div><div class="gmail_extra">
 I fixed it locally, but found some bugs with how indexed and RGB images are being handled along the way. Once I have those fixed I'll update the SCIFIO ImageIO module and let you know.<br><br>Thank you for reporting this, and for using the SCIFIO-ITK imageIO!<br>



<br></div><div class="gmail_extra">- Mark<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 15, 2013 at 3:21 PM, Joe Ping-Lin Hsiao <span dir="ltr"><<a href="mailto:phsiao@cs.unc.edu" target="_blank">phsiao@cs.unc.edu</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Mark,<div><br></div><div>The output dimension is 3, which is equal to the input's dimension. I also tried "-d 5". Seems to me it doesn't change anything of the output. The output dimension is still 3 and the pixel values are wrong.</div>




<div><br></div><div>Don't know if this helps. I put the following code after reader->Update() to check the image's min and max pixel values:</div><div><br></div><div><div>typedef itk::MinimumMaximumImageCalculator <ImageType> ImageCalculatorFilterType;</div>




<div>ImageCalculatorFilterType::Pointer imageCalculatorFilter = ImageCalculatorFilterType::New ();</div><div>imageCalculatorFilter->SetImage(reader->GetOutput());<br></div><div>imageCalculatorFilter->Compute();</div>




<div>cout << "max intensity " << imageCalculatorFilter->GetMaximum() << endl;</div><div>cout << "min intensity " << imageCalculatorFilter->GetMinimum();</div></div>



<div>
<br></div><div>The value range is the full range of 'float' from -3.49e38 to 3.49e38, which seems wrong. But if I comment out reader->SetImageIO(io), the values look reasonable.</div><div><br></div><div>Thanks,</div>




<div>Joe</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 15, 2013 at 3:50 PM, Mark Hiner <span dir="ltr"><<a href="mailto:hinerm@gmail.com" target="_blank">hinerm@gmail.com</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi Joe,<br><br></div> Thanks for reporting this issue.<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">






reader->SetImageIO( io );<br>
</blockquote><div> </div></div> Just so you know, this is just disabling SCIFIO I believe, and defaulting to the ITK DICOM ImageIO.<br><br></div> Does the output file have the correct number of total planes? If not, you might try "-d 5" just to test. The dimension order is XYCZT but XYZ are the dimensions with length more than 1. The SCIFIO plugin is supposed to account for that but it could be a bug.<br>






<br></div> Otherwise if the dimensions are correct it could be an issue with the dataset being interleaved.<br><br></div> I'll try to look at it soon.<br><br>Thanks,<br>Mark<div><br><div><div><div><div><div>
<div><div><div>

<div class="gmail_extra"><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
From: Joe Ping-Lin Hsiao <<a href="mailto:phsiao@cs.unc.edu" target="_blank">phsiao@cs.unc.edu</a>><br>To: <a href="mailto:scifio@scif.io" target="_blank">scifio@scif.io</a><br>Cc: <br>Date: Tue, 15 Oct 2013 14:29:23 -0400<br>






Subject: Error reading a 32-bit nrrd image via ITK<br>
<div dir="ltr">I am having trouble using SCIFIO in ITK to read a 32-bit .nrrd image in 
my own program. The attached is a 32-bit 3-dimensional test image.<div><br></div><div>Then I used the following command to test with the SCIFIO test program:</div>
<div><br></div><div><div>SCIFIOTestDriver.exe itkSCIFIOImageIOTest sample_5.nrrd 123.ome.tiff -w -d 3 -t float</div></div><div><br></div><div>The output '123.ome.tiff' has wrong pixel values and looks wrong in ImageJ.</div>









<div><br></div><div>After I dig deeper, I found that in in 'itkSCIFIOImageIOTest.cxx', if I comment out this line</div><div><br></div><div>   reader->SetImageIO( io );</div><div><br></div><div>to
 use ITK's default ImageIO, the output image becomes normal.<br></div>
<div><br></div><div>Thanks,</div><div>Joe</div></div>
</blockquote></div><br></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>