[Insight-users] SimpleITK create simple image

Bradley Lowekamp blowekamp at mail.nih.gov
Sun Nov 25 20:55:50 EST 2012


Hello Sam,

I am not sure what type "UC2" is. SimpleITK has just about all types except 64-bit integers which are not instantiated yet dues to some portability issues that still need to be addressed.

Are you looking for an "unsigned short", "uint16_t"? This would be called sitkUInt16.

The missing compression parameter to sitk::ImageFileWriter is an overlook and should be addressed. Could you please add this feature request to SimpleITK's bug tracker here:
https://issues.itk.org/jira/browse/SIMPLEITK

SimpleITK's goals with DICOM is rather simply to provide easy access to reading and and primitive writing DICOM files. If you are interested in directly manipulating the DICOM tags in the series, I would look into a specific DICOM library, and this is outside the planned scope of SimpleITK. I believe that GDCM has CSharp wrapping:

http://sourceforge.net/apps/mediawiki/gdcm/index.php?title=Configuring_and_Building_With_VS_.NET_2008_(Include_C_sharp_wrapping)

I have not used this myself. Just to let you know, in the binary distributed versions and the standard super build of SimpleITK where ITK is build as a static libraries, there are no GDCM exported symbols, so you could safely use what ever version of GDCM you can obtain along side SimpleITK. This is one advantage of the simplified architecture.

Hope this help, please let us know if you encounter any other missing feature or need additional help getting started with SimpleITK and CSharp.

Thanks,
Brad



On Nov 25, 2012, at 5:50 PM, Sam <sistephan at gmail.com> wrote:

> Hello,
> I'm using SimpleITK C# to create a blank image.  I would like to create a
> UC2 image but since that is not available I'm using UInt8.  It looks like
> the dcm file created is compressed.  Can I tell SimpleITK not to compress
> the file?
> 
> itk.simple.Image image = new itk.simple.Image(256, 265,
> itk.simple.PixelIDValueEnum.sitkUInt8);
> ITK.WriteImage(image, "C:\\testSimpleITK\\simpleITKFirstImage.dcm");
> 
> Also, is there a way to read/modify the DICOM header?
> 
> 
> 
> --
> View this message in context: http://itk-insight-users.2283740.n2.nabble.com/SimpleITK-create-simple-image-tp7581746.html
> Sent from the ITK Insight 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://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list