[Insight-users] Input Format

Bill Lorensen bill.lorensen at gmail.com
Mon Oct 27 18:14:20 EDT 2008


You can do it with itk. Just read dicom, cast to float, write meta or nrrd.

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


More information about the Insight-users mailing list