[Insight-users] License for code posted to the users-list : (Re: Your software
code)
Luis Ibanez
luis.ibanez at kitware.com
Sat, 28 Feb 2004 10:22:12 -0500
Hi Rahul,
Please consider the code that develpers post
to the users-list to be covered by the Insight
Copyright:
http://www.itk.org/HTML/Copyright.htm
This license has been devised with the aim of
promoting it use for research and commercial
applications. It doesn't impose any restrictions
on the way you use the code other than having
the copyright notice on it, and not claiming
that the Insight Software Consortium endorse
any products.
Feel free to use this code in your project
no matter if it is for research, education
or commercial applications.
Code posted by users (not developers) is in
a gray area...
Let us know if you have further questions.
Thanks
Luis
---------------------
Rahul Chander wrote:
> Hi Luis,
>
> I have a copy of your code that you posted on the itk user list for
> creating 3D images from 2D slices. Can I get your permission to
> modify this code and use it in my project? Do you wish to release
> the code under any particular license (Berkley, FreeBSD, GNU etc)?
>
> Thanks.
> Rahul Chander.
>
> #include "itkNumericSeriesFileNames.h"
> #include "itkImageSeriesReader.h"
> #include "itkImageFileWriter.h"
> #include "itkImage.h"
>
> int main(int argc, char * argv[])
> {
> typedef itk::Image<unsigned char,3> Image3DType;
>
> //
> // Here we generate filenames like
> // myImage000.png, myImage001.png .... to myImage200.png
> //
> itk::NumericSeriesFileNames::Pointer fileIter =
> itk::NumericSeriesFileNames::New();
>
> fileIter->SetStartIndex( 0 );
> fileIter->SetEndIndex( 200 );
> fileIter->SetIncrementIndex( 1 );
> fileIter->SetSeriesFormat("myImages%03d.png");
>
> itk::ImageSeriesReader<Image3DType>::Pointer reader =
> itk::ImageSeriesReader<Image3DType>::New();
>
> reader->SetFileNames( fileIter->GetFileNames() );
> reader->Update();
>
>
> //
> // Here we save the image in GIPL format
> //
> itk::ImageFileWriter< Image3DType >::Pointer writer =
> itk::ImageFileWriter< Image3DType >::New();
>
> writer->SetInput( reader->GetOutput() );
> writer->SetFileName("myImage.gipl");
> writer->Update();
>
> return 0;
> }