[ITK] [ITK-users] simple ITK C# show image

an qin anqin888 at gmail.com
Fri May 5 13:35:26 EDT 2017


Brad, Thank you so much. Yes, I do not have Fiji/ImageJ installed. --Andy

On Fri, May 5, 2017 at 1:11 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] <
blowekamp at mail.nih.gov> wrote:

> Hello,
>
> The documentation for the sitk::Show method can be found here:
> https://itk.org/SimpleITKDoxygen/html/namespaceitk_1_1simple.html#
> ac8416e6e7f02dedfe8373b83dbea411d
>
> I suspect that you don’t have Fiji/ImageJ installed, or the method was not
> able to locate the executable. There are some environment variables that
> can be set to properly configure it.
>
> The Show method is designed to be a convenience method to launch an
> external viewer to display data. It is convenient to use in interactive
> environments such as python or R for a quick display.
>
> SimpleITK provides wrapping for a large number of languages include
> Python, R, Lua, Tcl, Ruby, Java and C#. Some languages have more examples
> then others. In general it’s not too hard to figure out how to translate an
> useful example from one language to another.
>
> You can find a list of basic examples here:
>
> https://itk.org/SimpleITKDoxygen/html/examples.html
>
> And may Python and R notebooks here:
>
> https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks
>
> Hope that helps,
> Brad
>
> On May 5, 2017, at 12:22 PM, an qin <anqin888 at gmail.com> wrote:
>
> Hi, I am new to C# simpleITK and can't find much sample codes. I tried to
> read dicom image and display them in simpleITK. The dicom image was read
> without a problem. But got an exception when show.
>
> Any suggestion will be appreciated.
>
> Thanks.
> Andy
>
>
> //-------------code------------
> using itk.simple;
>
> namespace TestReadDicom
> {
>     class Program
>     {
>         static void Main(string[] args)
>         {
>             var myreader = new ImageSeriesReader();
>             var names = ImageSeriesReader.GetGDCMSeriesFileNames(@"E:\
> ImageSet_0.DICOM");
>             myreader.SetFileNames(names);
>             var image = myreader.Execute();
>             VectorDouble imDim = image.GetOrigin();
>             Console.WriteLine(imDim[0].ToString());
>             SimpleITK.Show(image);
>         }
>     }
> }
>
> //-------------output------------
> Additional information: Exception thrown in SimpleITK Show:
> ..\..\..\..\..\SimpleITK\Code\IO\src\sitkShow.cxx:500:
>
> sitk::ERROR: Error in administrating child process: [The parameter is
> incorrect
> _____________________________________
> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20170505/7f490696/attachment.html>
-------------- next part --------------
_____________________________________
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


More information about the Community mailing list