<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7655.5">
<TITLE>RE: [Insight-users] reader is wrapped but not the writer?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>OK. by mimic wrapping of ExtractImageFilter:<BR>
<BR>
<A HREF="https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap">https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap</A><BR>
<BR>
itkImageSeriesWriter is wrapped correctly.<BR>
<BR>
Thank you and Happy Holidays!<BR>
<BR>
Wen<BR>
<BR>
-----Original Message-----<BR>
From: Bradley Lowekamp [<A HREF="mailto:blowekamp@mail.nih.gov">mailto:blowekamp@mail.nih.gov</A>]<BR>
Sent: Fri 12/21/2012 11:10 AM<BR>
To: Li, Wen<BR>
Cc: Bradley Lowekamp; insight-users@itk.org<BR>
Subject: Re: [Insight-users] reader is wrapped but not the writer?<BR>
<BR>
Hello,<BR>
<BR>
Doh, I for got that's what the output image type is used for.<BR>
<BR>
I don't think I am going to get a chance to revisit this before the holiday.<BR>
<BR>
You can take a stab at it an submit a patch yourself if you are successful.<BR>
<BR>
Use the ExtractImageFilter as an exemplar in what needs to be done for this case:<BR>
<BR>
<A HREF="https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap">https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap</A><BR>
<BR>
Brad<BR>
<BR>
On Dec 21, 2012, at 9:57 AM, &quot;Li, Wen&quot; &lt;WLi@childrensnational.org&gt; wrote:<BR>
<BR>
&gt; Brad,<BR>
&gt;<BR>
&gt; I tried your patch.<BR>
&gt; The writer is wrapped now but imagetype is unreasonably restricted.<BR>
&gt;<BR>
&gt; if I create a pointer like below in python:<BR>
&gt; writer=itk.ImageSeriesWriter[inputImageType, outputImageType].New()<BR>
&gt;<BR>
&gt; the inputImageType and outputImageType have to be exactly the same.<BR>
&gt;<BR>
&gt; Aren't we saying, outputImageType should have fewer dimensions than input?<BR>
&gt; I can live with having them to have the same pixel type but dimension...don't know. I thought &quot;input&quot; is usually 3 and &quot;output&quot; is 2. No?<BR>
&gt;<BR>
&gt; Wen<BR>
&gt;<BR>
&gt; -----Original Message-----<BR>
&gt; From: Bradley Lowekamp [<A HREF="mailto:blowekamp@mail.nih.gov">mailto:blowekamp@mail.nih.gov</A>]<BR>
&gt; Sent: Thu 12/20/2012 1:58 PM<BR>
&gt; To: Li, Wen<BR>
&gt; Cc: Bradley Lowekamp; insight-users@itk.org<BR>
&gt; Subject: Re: [Insight-users] reader is wrapped but not the writer?<BR>
&gt;<BR>
&gt; Doh,<BR>
&gt;<BR>
&gt; Pasted the wrong thing:<BR>
&gt;<BR>
&gt; <A HREF="http://review.source.kitware.com/#/c/9026/">http://review.source.kitware.com/#/c/9026/</A><BR>
&gt;<BR>
&gt; Heres info on how to review the patch:<BR>
&gt; <A HREF="http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html">http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html</A><BR>
&gt;<BR>
&gt; Brad<BR>
&gt;<BR>
&gt; On Dec 20, 2012, at 1:50 PM, &quot;Li, Wen&quot; &lt;WLi@childrensnational.org&gt; wrote:<BR>
&gt;<BR>
&gt; &gt; Thanks!<BR>
&gt; &gt;<BR>
&gt; &gt; But where can I find the patch?...<BR>
&gt; &gt;<BR>
&gt; &gt; Wen<BR>
&gt; &gt;<BR>
&gt; &gt; Postdoctoral Fellow<BR>
&gt; &gt; Bioengineering, Sheikh Zayed Institute<BR>
&gt; &gt; Children's National Medical Center<BR>
&gt; &gt; 111 Michigan Ave. NW<BR>
&gt; &gt; Washington DC, 20010<BR>
&gt; &gt; Email: wli@cnmc.org<BR>
&gt; &gt; Phone: 202-476-1268<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt; -----Original Message-----<BR>
&gt; &gt; From: Bradley Lowekamp [<A HREF="mailto:blowekamp@mail.nih.gov">mailto:blowekamp@mail.nih.gov</A>]<BR>
&gt; &gt; Sent: Thu 12/20/2012 1:33 PM<BR>
&gt; &gt; To: Li, Wen<BR>
&gt; &gt; Cc: insight-users@itk.org<BR>
&gt; &gt; Subject: Re: [Insight-users] reader is wrapped but not the writer?<BR>
&gt; &gt;<BR>
&gt; &gt; Hello,<BR>
&gt; &gt;<BR>
&gt; &gt; I quickly have put together the following patch. I have things compile but I have not really tested it yet.<BR>
&gt; &gt;<BR>
&gt; &gt; Modules/IO/ImageBase/wrapping/itkImageSeriesWriter.wrap<BR>
&gt; &gt;<BR>
&gt; &gt; Let me know if it works,<BR>
&gt; &gt; Brad<BR>
&gt; &gt;<BR>
&gt; &gt; On Dec 20, 2012, at 10:52 AM, &quot;Li, Wen&quot; &lt;WLi@childrensnational.org&gt; wrote:<BR>
&gt; &gt;<BR>
&gt; &gt; &gt; Hi insight-users,<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; I am using ITK4.2.0 with python 2.7.<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Just discovered that itkImageSeriesWriter is not wrapped by python but the reader is :(<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Can anyone tell me how to hack that? Otherwise how can I write out a dicom image with python?<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Thanks in advance,<BR>
&gt; &gt; &gt; Wen<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Postdoctoral Fellow<BR>
&gt; &gt; &gt; Bioengineering, Sheikh Zayed Institute<BR>
&gt; &gt; &gt; Children's National Medical Center<BR>
&gt; &gt; &gt; 111 Michigan Ave. NW<BR>
&gt; &gt; &gt; Washington DC, 20010<BR>
&gt; &gt; &gt; Email: wli@cnmc.org<BR>
&gt; &gt; &gt; Phone: 202-476-1268<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; _____________________________________<BR>
&gt; &gt; &gt; Powered by www.kitware.com<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Visit other Kitware open-source projects at<BR>
&gt; &gt; &gt; <A HREF="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Kitware offers ITK Training Courses, for more information visit:<BR>
&gt; &gt; &gt; <A HREF="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</A><BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Please keep messages on-topic and check the ITK FAQ at:<BR>
&gt; &gt; &gt; <A HREF="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</A><BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; &gt; &gt; <A HREF="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A><BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>