So can I convert the dicom file to meta or nrrd inside ITK? Or do I need some other software to convert the file before reading the converted file into ITK.<br><br>Thanks a lot for your help!<br><br>Ankit.<br><br><div class="gmail_quote">
On Mon, Oct 27, 2008 at 2:56 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If you cast to unsigned char, the cast filter does not do any rescale.<br>
You should use RescaleIntensityImageFilter to rescale the outputs of<br>
the filters to the 0,255 range of unsigned char.<br>
<br>
As for file formats, both meta and nrrd support floating point pixels.<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
On Mon, Oct 27, 2008 at 5:45 PM, Ankit Gupta <<a href="mailto:gankit@cs.stanford.edu">gankit@cs.stanford.edu</a>> wrote:<br>
> Hi Bill,<br>
><br>
> Yeah. I cast the image to unsigned char to output it as a png file. But that<br>
> is not my main problem.<br>
><br>
> My main issue is taking the dicom file as input and converting it into some<br>
> format (either using ITK or some other software) so that I can use float as<br>
> the pixel type and apply filters on it. What would this file type be?<br>
><br>
> Ankit.<br>
><br>
> On Mon, Oct 27, 2008 at 2:27 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Ankit,<br>
>><br>
>> png does not support float images. meta and nrrd support float. You<br>
>> could cast back to signed short after the processing. Then save as<br>
>> dicom, meta or nrrd. png does not support signed short.<br>
>><br>
>> Bill<br>
>><br>
>> On Mon, Oct 27, 2008 at 4:51 PM, Ankit Gupta <<a href="mailto:gankit@cs.stanford.edu">gankit@cs.stanford.edu</a>><br>
>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> > I am relatively new to ITK and my project involves working with dicom<br>
>> > images, applying image processing filters on them and viewing the<br>
>> > output.<br>
>> > Currently, I am trying to apply different blur filters to dicom images.<br>
>> > I<br>
>> > understand that these filters use float as the pixel type whereas dicom<br>
>> > files have signed short as pixel types. So, what image format should be<br>
>> > used<br>
>> > (or what format should these dicom images be converted to) so as to<br>
>> > apply<br>
>> > filters on them without loss of information?<br>
>> ><br>
>> > I tried to take a dicom file as input and apply a resize and then a cast<br>
>> > filter to cast it to a float format. But by viewing the output (as a png<br>
>> > file), I found that a lot of information was lost and the image looked<br>
>> > very<br>
>> > different. I am stuck at his point for nearly a week and can't seem to<br>
>> > find<br>
>> > any solution. Any help would be greatly appreciated.<br>
>> ><br>
>> > Thanks,<br>
>> > Ankit.<br>
>> ><br>
>> > --<br>
>> > Ankit Gupta<br>
>> > 1st yr. Grad Student<br>
>> > Stanford University<br>
>> ><br>
>> > _______________________________________________<br>
>> > Insight-users mailing list<br>
>> > <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>
>> > <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>> ><br>
>> ><br>
><br>
><br>
><br>
> --<br>
> Ankit Gupta<br>
> 1st yr. Grad Student<br>
> Stanford University<br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Ankit Gupta<br>1st yr. Grad Student<br>Stanford University<br>