[ITK] [EXAMPLES] Problems creating a new example through the Python script

Matt McCormick matt.mccormick at kitware.com
Sun Aug 23 10:42:45 EDT 2015


Hi Jon,

I am not sure why there was difficulty writing to the file, but this
patch avoids writing to a file altogether:

  http://review.source.kitware.com/#/c/20117/

Also, this patch handles paths better on Windows:

  http://review.source.kitware.com/#/c/20116/

Thanks,
Matt

On Wed, Aug 19, 2015 at 6:04 PM, Jon Haitz Legarreta
<jhlegarreta at vicomtech.org> wrote:
> Hi Matt,
> thanks for the follow-up.
>
> My /path/to/source/ITK is:
> C:/SDKs/ITK/itk-head/ITK
>
> When it comes to submitting patches to the ITK source this path is not a
> problem, though.
>
> Any guess?
>
> JON HAITZ
>
>
>
>
>
> On 19 August 2015 at 21:35, Matt McCormick <matt.mccormick at kitware.com>
> wrote:
>>
>> Hi Jon,
>>
>> Thanks for working on a new example :-)
>>
>> What is the actual path to the source tree in your case?
>>
>> Thanks,
>> Matt
>>
>> On Wed, Aug 19, 2015 at 1:45 PM, Jon Haitz Legarreta
>> <jhlegarreta at vicomtech.org> wrote: follow-up.
>>
>> > Hi there,
>> > I'm trying to contribute with an example to ITK, but the
>> > CreateNewExample
>> > Python script is yielding an error related to the location of the ITK
>> > source
>> > directory.
>> >
>> > According to the ITK example contribution documentation [1] and the
>> > command
>> > help, to contribute with an example of a given class (say
>> > itk::ParametricSpaceToImageSpaceMeshFilter), I should run
>> >
>> > cd /path/to/ITKExamples-build/Utilities
>> > ./CreateNewExample.py --class-name ParametricSpaceToImageSpaceMeshFilter
>> > /path/to/source/ITK
>> >
>> > It looks like I'm failing to correctly specify the path to my ITK
>> > source:
>> > I've tried with the root of my ITK sources (located in a different
>> > folder
>> > from the example):
>> > /path/to/source/ITK
>> >
>> > Then the Python script fails on line 18:
>> > Traceback (most recen call last):
>> > File "./CreateNewExample.py", line 239, in module
>> > write_all_itk_headers(itk_dir)
>> > File "./CreateNewExample.py", line 18, in write_all_itk_headers
>> > output = file('listofITKheader','w')
>> >
>> >
>> > I've also tried with the folders where the mentioned filter's files lie
>> > /path/to/source/ITK/Modules/Core/Mesh
>> > and
>> > /path/to/source/ITK/Modules/Core/Mesh/include
>> > and
>> > /path/to/source/ITK/Modules/Core/Mesh/src
>> >
>> > In these cases git says
>> > Error: wrong path for itk source tree
>> >
>> > Any thoughts?
>> >
>> > Thank you,
>> > JON HAITZ
>> >
>> >
>> > [1]
>> >
>> > http://itk.org/ITKExamples/Documentation/Contribute/ContributeWithGit.html#createnewexample
>> >
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Community mailing list
>> > Community at itk.org
>> > http://public.kitware.com/mailman/listinfo/community
>> >
>
>


More information about the Community mailing list