<!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>Hi,<BR>
<BR>
Since I am not working on a branch (just downloaded source code from ITK), I attached the file here.<BR>
Hope that after the holiday, you can submit the patch for me. Thank you!<BR>
<BR>
Wen<BR>
<BR>
Postdoctoral Fellow<BR>
Bioengineering, Sheikh Zayed Institute<BR>
Children's National Medical Center<BR>
111 Michigan Ave. NW<BR>
Washington DC, 20010<BR>
Email: wli@cnmc.org<BR>
Phone: 202-476-1268<BR>
<BR>
<BR>
<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 1:33 PM<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>
That is great you were able to wrap the class.<BR>
<BR>
It would be even better to contribute that back to the community. The ideal way is to submit a patch to gerrit for review:<BR>
<BR>
<A HREF="http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html">http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html</A><BR>
<BR>
Next would be to fork the github repository and push a patch to your fork.<BR>
<BR>
Lastly, even just e-mail the file would be appreciated. The point is to get you hard work out there so every one can benefit!<BR>
<BR>
Thanks,<BR>
Brad<BR>
<BR>
On Dec 21, 2012, at 1:23 PM, "Li, Wen" <WLi@childrensnational.org> wrote:<BR>
<BR>
> 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, "Li, Wen" <WLi@childrensnational.org> wrote:<BR>
><BR>
> > Brad,<BR>
> ><BR>
> > I tried your patch.<BR>
> > The writer is wrapped now but imagetype is unreasonably restricted.<BR>
> ><BR>
> > if I create a pointer like below in python:<BR>
> > writer=itk.ImageSeriesWriter[inputImageType, outputImageType].New()<BR>
> ><BR>
> > the inputImageType and outputImageType have to be exactly the same.<BR>
> ><BR>
> > Aren't we saying, outputImageType should have fewer dimensions than input?<BR>
> > I can live with having them to have the same pixel type but dimension...don't know. I thought "input" is usually 3 and "output" is 2. No?<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: Thu 12/20/2012 1:58 PM<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>
> > Doh,<BR>
> ><BR>
> > Pasted the wrong thing:<BR>
> ><BR>
> > <A HREF="http://review.source.kitware.com/#/c/9026/">http://review.source.kitware.com/#/c/9026/</A><BR>
> ><BR>
> > Heres info on how to review the patch:<BR>
> > <A HREF="http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html">http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html</A><BR>
> ><BR>
> > Brad<BR>
> ><BR>
> > On Dec 20, 2012, at 1:50 PM, "Li, Wen" <WLi@childrensnational.org> wrote:<BR>
> ><BR>
> > > Thanks!<BR>
> > ><BR>
> > > But where can I find the patch?...<BR>
> > ><BR>
> > > Wen<BR>
> > ><BR>
> > > Postdoctoral Fellow<BR>
> > > Bioengineering, Sheikh Zayed Institute<BR>
> > > Children's National Medical Center<BR>
> > > 111 Michigan Ave. NW<BR>
> > > Washington DC, 20010<BR>
> > > Email: wli@cnmc.org<BR>
> > > Phone: 202-476-1268<BR>
> > ><BR>
> > ><BR>
> > ><BR>
> > ><BR>
> > > -----Original Message-----<BR>
> > > From: Bradley Lowekamp [<A HREF="mailto:blowekamp@mail.nih.gov">mailto:blowekamp@mail.nih.gov</A>]<BR>
> > > Sent: Thu 12/20/2012 1:33 PM<BR>
> > > To: Li, Wen<BR>
> > > Cc: insight-users@itk.org<BR>
> > > Subject: Re: [Insight-users] reader is wrapped but not the writer?<BR>
> > ><BR>
> > > Hello,<BR>
> > ><BR>
> > > I quickly have put together the following patch. I have things compile but I have not really tested it yet.<BR>
> > ><BR>
> > > Modules/IO/ImageBase/wrapping/itkImageSeriesWriter.wrap<BR>
> > ><BR>
> > > Let me know if it works,<BR>
> > > Brad<BR>
> > ><BR>
> > > On Dec 20, 2012, at 10:52 AM, "Li, Wen" <WLi@childrensnational.org> wrote:<BR>
> > ><BR>
> > > > Hi insight-users,<BR>
> > > ><BR>
> > > > I am using ITK4.2.0 with python 2.7.<BR>
> > > ><BR>
> > > > Just discovered that itkImageSeriesWriter is not wrapped by python but the reader is :(<BR>
> > > ><BR>
> > > > Can anyone tell me how to hack that? Otherwise how can I write out a dicom image with python?<BR>
> > > ><BR>
> > > > Thanks in advance,<BR>
> > > > Wen<BR>
> > > ><BR>
> > > > Postdoctoral Fellow<BR>
> > > > Bioengineering, Sheikh Zayed Institute<BR>
> > > > Children's National Medical Center<BR>
> > > > 111 Michigan Ave. NW<BR>
> > > > Washington DC, 20010<BR>
> > > > Email: wli@cnmc.org<BR>
> > > > Phone: 202-476-1268<BR>
> > > ><BR>
> > > ><BR>
> > > ><BR>
> > > > _____________________________________<BR>
> > > > Powered by www.kitware.com<BR>
> > > ><BR>
> > > > Visit other Kitware open-source projects at<BR>
> > > > <A HREF="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR>
> > > ><BR>
> > > > Kitware offers ITK Training Courses, for more information visit:<BR>
> > > > <A HREF="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</A><BR>
> > > ><BR>
> > > > Please keep messages on-topic and check the ITK FAQ at:<BR>
> > > > <A HREF="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</A><BR>
> > > ><BR>
> > > > Follow this link to subscribe/unsubscribe:<BR>
> > > > <A HREF="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A><BR>
> > ><BR>
> > ><BR>
> > ><BR>
> ><BR>
> ><BR>
> ><BR>
><BR>
><BR>
><BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>