[Insight-users] information loss of images
Luis Ibanez
luis.ibanez at kitware.com
Tue, 06 Apr 2004 18:11:28 -0400
Hi Kasp,
Thanks for sending the additional information
regarding your image.
From your metaimage header, it seems that your
data is stored in 16 bits (unsigned short).
I wonder if you are trying to read it in an
image of 8bits. ITK will allow you to do that
but by silently truncating your data to 8 bits.
That could easily look like a corrupted image.
Please make sure that the pixel type you use
for the instantiation of the Image<> class is
capable of representing the actual data of you
dicom files.
You probably want something like:
typedef itk::Image< unsigned short, 3 > ImageType;
Regards,
Luis
----------------
ja sk wrote:
> Hi Luis,
>
> A) I'm not sure what you mean by modality, but its MRI cine from siemens
>
> B) I created the Meta Header manually and using the MetaImageImporter
> C)I did not use any ImageFileReader/Writer for creating the .mhd file,
> so no raw files for the volumes were created.
>
> Well i tried DicomSeriesReadImageWrite but the images are in "time
> series", so DicomSeriesReadImageWrite will just create a .mhd and .raw
> for a particular slice for a time instance.
> I also tried out Jolinda's MRIConvert, and it has no means of writing
> out a volume in this case. Any suggestions, Thank You!!
>
> here's the mhd file:
> *********************
> NDims = 3
> DimSize = 256 256 12
> ElementSpacing = 1.25 1.25 10
> Position = 0 0 0
> ElementByteOrderMSB = True
> ElementType = MET_USHORT
> ElementDataFile = LIST 2
> mri_189.dcm
> mri_210.dcm
> mri_231.dcm
> mri_252.dcm
> mri_273.dcm
> mri_294.dcm
> mri_315.dcm
> mri_336.dcm
> mri_376.dcm
> mri_397.dcm
> mri_418.dcm
> mri_439.dcm
> **************************
>
> Regards
> Kasp
>
>
> */Luis Ibanez <luis.ibanez at kitware.com>/* wrote:
>
>
>
> Hi Kasp,
>
>
> The answer to your question probably
> can be found among the answers of the
> following new questions:
>
>
> A) What image modality is stored in your DICOM files ?
>
> B) Did you created the MetaHeader manually ?
> or through the ImageFileWriter ?
>
> C) What pixel type did you used for instantiating the
> ImageFileReader ?
>
> D) What pixel type did you used for instantiating the
> ImageFileWriter ?
>
> E) Can you post the MetaImage header that you got ?
>
>
> Probably a post of your code will be a better
> answer to these questions.
>
> FYI, The simplest way of converting DICOM to MetaImage
> (or to any other ITK supported file format) is to use
> the application:
>
> Insight/Examples/IO/
> DicomSeriesReadImageWrite.cxx
>
>
> You could also use MRIConvert
> http://lcni.uoregon.edu/~jolinda/MRIConvert
>
>
>
> Regards,
>
>
>
>
> Luis
>
>
>
> --------------
> ja sk wrote:
>
> > Hi,
> >
> > I created a meta header file for a volume of dicom slices, but
> when i
> > tried to view the volume with the image viewer found in the Insight
> > applications, it seems like the quality has disintegrated alot (not
> > clear at all), as compared to reading the single dicom file. Is
> there
> > any way to prevent this, thanks.
> >
> > Regards from Kasp
> >
>
>