[ITK-users] [ITK] why jpg image that is converted from a mhd image is so weird ?

Timothee Evain tevain at telecom-paristech.fr
Wed Jun 7 09:18:06 EDT 2017


Ok, I don't see the advantage of storing a slice as a 3D image since it confuses the code quite a bit, but I guess you have some good reasons.
Same thing for the cast, even if it works, that is really not a standard way of doing it, and could be tricky in the long term.

About the png being normal: Jpeg is a compressed format with loss, that could impact the aspect. But if the image appears normal it is probably because you switched to unsigned short instead of unsigned char, and your original image intensity range overflowed the char one, giving false values.

HTH,

Tim

----- Mail original -----
De: "XieYi" <xieyi4650 at 126.com>
À: insight-users at itk.org
Envoyé: Mercredi 7 Juin 2017 14:57:18
Objet: Re: [ITK] [ITK-users] why jpg image that is converted from a mhd image	is so	weird ?

Thank you very much Tim
There is one point not clear in my topic. The point is that the dimension of
image is 3, but infact it is a slice, i.e. it is a 2D image but store in a
3D image type. its size is 512x512x1

there are two strange things:
1, some ImageType can be cast into a 2D jpg image, and have no accident.
2, when I define the density ImageType as 
typedef  itk::RGBPixel<unsigned short>	PixelType_2D;
typedef itk::CudaImage< PixelType_2D, 2 > ImageType2;
typedef itk::PNGImageIO   ImageIOType;
the xxxxx.png look like normal.



--
View this message in context: http://itk-users.7.n7.nabble.com/why-jpg-image-that-is-converted-from-a-mhd-image-is-so-weird-tp38307p38309.html
Sent from the ITK - Users mailing list archive at Nabble.com.
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
_______________________________________________
Community mailing list
Community at itk.org
http://public.kitware.com/mailman/listinfo/community


More information about the Insight-users mailing list