<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 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 class="im"><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>