[Insight-users] reader is wrapped but not the writer?

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Dec 21 13:33:11 EST 2012


Hello,

That is great you were able to wrap the class.

It would be even better to contribute that back to the community. The ideal way is to submit a patch to gerrit for review:

http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html

Next would be to fork the github repository and push a patch to your fork.

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!

Thanks,
Brad

On Dec 21, 2012, at 1:23 PM, "Li, Wen" <WLi at childrensnational.org> wrote:

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121221/2250e993/attachment.htm>


More information about the Insight-users mailing list