[Insight-users] The easy way to wrap.

Luis Ibanez luis.ibanez@kitware.com
Tue May 4 15:42:32 EDT 2004


Hi James,

Here is the easy solution for your CVS synchronization
problem: You can specify a date and time for the version
that you want to get from CVS.


You will find details on this in the CVS book online:

        http://cvsbook.red-bean.com/

pdf-page 84, or paper page 63.

The command will look something like

     cvs update -D "2004-05-04  08:59:59 GMT"


There are currently two builds with Python wrapping
in the ITK Dashboard. They are:

      zion.kitware          g++-3.3
      terminus.kitware      VisualStudio .NET 2003


You may update to yesterday morning for example,
when both builds were green.  That will be:

     cvs -q update -dP  -D "2004-05-03 07:00:00 GMT"


Please let us know if you still encounter any
problems,


   Thanks



      Luis



---------------------
James Carroll wrote:

> Hi Luis,
> 
> I understand the RelWithDebInfo now.  (No problem in my case, since I
> have a debugging version of the library from building the Python
> source.)
> 
> I haven't successfully built everything yet though, and may need more
> advise.  I updated my CVS head, and re-built and got another set of
> errors (I didn't save them.)  I cleaned out my build binaries directory,
> and started over and got the same error.  I'm pretty sure I'm running
> into trouble because the dashboard is always a half day or so behind
> what's actually in CVS.
> 
> So I grabbed a copy of the 1.6.0 source and tried compiling everything
> again.  When I get to step 5 (building the second time, including
> CableSwig) It goes for a good hour or so before complaining:
> 
> Building wrap_VXLNumericsPythonPython.cxx from
> C:\jimc\prj\InsightToolkit-1.6.0\lib\Wrapping\CSwig\VXLNumerics\wrap_VXL
> NumericsPythonPython.cxx.rule
> SWIG(1): Warning(120): -c command line option is deprecated. Use
> -noruntime instead.
> swig error : Unrecognized option -bindir
> swig error : Unrecognized option
> C:/jimc/prj/InsightToolkit-1.6.0/lib/bin/.\Release
> Use 'swig -help' for available options.
> Error executing c:\windows\system32\cmd.exe.
> 
> ALL_BUILD - 2 error(s), 2 warning(s)
> 
> (I'm using the CVS Head of CableSwig with 1.6.0 of ITK under Visual C++
> 6 SP6)
> 
> So my questions are:
> 
> Is there by any chance a tag in CVS that would point me to a recent
> version of ITK where the python wrappings build cleanly?
> 
> Does anyone have a set of windows binaries that include Python wrappings
> that they would be willing to send my way?
> 
> Thanks!
> -Jim
> 
> 
> 
> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez@kitware.com] 
> Sent: Friday, April 30, 2004 8:06 PM
> To: James Carroll
> Cc: Vidina Monagas; Insight-users@itk.org
> Subject: Re: [Insight-users] The easy way to wrap.
> 
> 
> Hi James,
> 
> 
> The reason why the python wrapping must be built for
> Release or RelWithDebInfo in Windows, is that the
> python distribution only has Release libraries, not
> Debug libraries. Since code compiled for Debug is
> not compatible with code compiled for Release, you
> should avoid using Debug for building ITK if you intend
> to use Python wrapping.
> 
> --
> 
> The problem you are facing were shown in the Dashboard
> this morning. Please look at the Python build in
> terminus.kitware.
> 
> http://www.itk.org/Testing/Sites/terminus.kitware/Windows-devenv-Python/
> 20040430-0500-Nightly/Results/__Testing_Code_Algorithms_itkCurvatureFlow
> TestPython2.html
> 
> Brad fixed this problem today, and the current experimentals
> on Python are getting green. (e.g. zion.kitware).
> 
> So, please update your CVS checkout and build again.
> 
> Setting your PYTHONPATH should be enough for being
> able to use the wrapping. There is no need to move
> the python files to other locations.
> 
> 
> Please let us know if you still find any problems.
> 
> 
>     Thanks
> 
> 
>       Luis
> 
> 
> 
> -----------------------
> James Carroll wrote:
> 
> 
>>Thank you Luis for the instructions on building wrappers.  I think I
>>almost have Python working.
>>
>>The build gave a lot of warnings (in step 5) about not being able to
>>find wrappers, but the build completed with zero errors.
>>
>>If I simply add C:\jimc\prj\Insight\lib\Wrapping\CSwig\Python\Release
> 
> to
> 
>>my python-Path (Following the Wrapping\CSwig\Readme), then it can't
> 
> find
> 
>>anything.  I'm not sure I understand the last line of the readme:
>>"     - Python must be built Release of RelWithDebInfo on windows."
>>
>>Now I'm copying files to my Python lib/site-packages to see if I can
>>start using Insight from python.  
>>
>>(I'm using CVS Head for Insight, VC6.0 SP6, on Windows XP)
>>
>>When I import InsightToolkit, I get the following error:
>>
>>
>>
>>
>>>>>import InsightToolkit as itk
>>
>>Traceback (most recent call last):
>>  File "<stdin>", line 1, in ?
>>  File
>>
> 
> "C:/jimc/prj/Insight/lib/Wrapping/CSwig/Python\Release\InsightToolkit.py
> 
>>", line 1, in ?
>>    from itkalgorithms import *
>>  File
>>
> 
> "C:/jimc/prj/Insight/lib/Wrapping/CSwig/Python\Release\itkalgorithms.py"
> 
>>, line 1, in ?
>>    from itkbasicfilters import *
>>  File
>>
> 
> "C:/jimc/prj/Insight/lib/Wrapping/CSwig/Python\Release\itkbasicfilters.p
> 
>>y ", line 3, in ?
>>    from ITKBasicFiltersPython import *
>>  File "ITKBasicFiltersPython.py", line 33, in ?
>>    from itkAnisotropicDiffusionImageFilter import *
>>  File "itkAnisotropicDiffusionImageFilter.py", line 136, in ?
>>    class
>>
> 
> itkAnisotropicDiffusionImageFilterSI3SI3(itkExtractImageFilter.itkImageT
> 
>>oImageFilterSI3SI3):
>>AttributeError: 'module' object has no attribute
>>'itkImageToImageFilterSI3SI3'
>>
>>
>>Does anyone have an insight for me on Python?
>>
>>Thank you kindly,
>>-Jim
>>
>>I've created an itk.pth file, and copied other stuff this way:
>>
>>in python233\lib\site-packages\  file
>>    itk.pyth
>>has contents:    
>>       InsightToolkit
>>    
>>
>>in python233\lib\site-packages\InsightToolkit files:
>>    
>>    InsightToolkit.py
>>    InsightToolkit.pyc
>>    itkalgorithms.py
>>    itkalgorithms.pyc
>>    itkbase.py
>>    itkbase.pyc
>>    itkbasicfilters.py
>>    itkbasicfilters.pyc
>>    ITKCommon.dll
>>    itkcommon.py
>>    itkcommon.pyc
>>    itkdata.py
>>    itkdata.pyc
>>    itkio.py
>>    itkio.pyc
>>    itknumerics.py
>>    itknumerics.pyc
>>    itktesting.py
>>    itktesting.pyc
>>    SwigRuntimePython.dll
>>    vxlnumerics.py
>>    vxlnumerics.pyc
>>    _ITKAlgorithmsPython.dll
>>    _ITKBasicFiltersBPython.dll
>>    _ITKBasicFiltersPython.dll
>>    _ITKCommonPython.dll
>>    _ITKIOPython.dll
>>    _ITKNumericsPython.dll
>>    _VXLNumericsPython.dll
>>    
>>
>>
>>-----Original Message-----
>>From: insight-users-admin@itk.org [mailto:insight-users-admin@itk.org]
>>On Behalf Of Luis Ibanez
>>Sent: Friday, April 30, 2004 10:16 AM
>>To: Vidina Monagas
>>Cc: Insight-users@itk.org
>>Subject: [Insight-users] The easy way to wrap.
>>
>>
>>Hi Vidina,
>>
>>
>>Here is the easy way to build ITK:
>>
>>1) Run CMake
>>    Disable TESTING,
>>    Disable EXAMPLES
>>    Disable WRAPPING
>>    Enable  SHARED libraries
>>    configure in this way.
>>
>>
>>2) Open the Workspace in Visual Studio
>>    Select ALL_BUILD
>>    Select build for Release
>>    Build the project
>>    It should take 15 minutes
>>
>>
>>3) Download CableSwig
>>    and put it in the Utilities
>>    Subdirectory of ITK.
>>    It will look like:
>>
>>    Insight/Utilities/CableSwig
>>
>>    By doing this, CableSwig will be
>>    built along with ITK.
>>
>>
>>4) Close the ITK workspace,
>>    Re-run CMake
>>    Enable Wrapping (for the scripting
>>    language you are interested on).
>>    configure this way.
>>
>>
>>5) Open the ITK Workspace
>>    Select ALL_BUILD
>>    Select build for Release
>>    build the project
>>    This time it will take
>>    about 1.5 hours.
>>
>>
>>Please let us know if you still find
>>any problems,
>>
>>
>>    Thanks
>>
>>
>>
>>      Luis
>>
>>
>>---------------------
>>Vidina Monagas wrote:
>>
>>
>>>Should I compile CableSwig before ITK?
>>>
>>>----- Original Message ----- 
>>>From: "Luis Ibanez" <luis.ibanez@kitware.com>
>>>To: "Vidina Monagas" <vidina@ctm.ulpgc.es>
>>>Cc: <Insight-users@itk.org>
>>>Sent: Friday, April 30, 2004 12:18 AM
>>>Subject: Re: 24 hours is too long :-)
>>>
>>>
>>>
>>>
>>>
>>>>Hi Vidina,
>>>>
>>>>The compilation should not take 24 hours,   :-)
>>>>
>>>>There is definitely something wrong.
>>>>
>>>>The typical ITK build should take 15 minutes,
>>>>when you disable Testing and Examples.
>>>>
>>>>Did you changed any of the CMake default
>>>>options when you configured ITK ?
>>>
>>>
>>>
>>>>Or did you make any changes to the workspace
>>>>file after loading it in Visual Studio ?
>>>>
>>>>I didn't see anything strange in your
>>>>CMakeCache.txt...
>>>>
>>>>Do you have other versions of VisualStudio
>>>>installed in the same machine ?
>>>>
>>>>Do you trust your VisualStudion installation ?
>>>>(that is, have you used for building any
>>>>serious-size project ? )
>>>>
>>>>
>>>>I would suggest you to delete the binary
>>>>directory where you are attempting this
>>>>build, and restart from scratch.
>>>>
>>>>Please follow the instruction in the tutorials
>>>>
>>>>  http://www.itk.org/HTML/Tutorials.htm
>>>>
>>>>Let us know if you still have any problems,
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>>   Luis
>>>>
>>>>
>>
>>
>>
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users@itk.org
>>http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users@itk.org
>>http://www.itk.org/mailman/listinfo/insight-users
>>
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 






More information about the Insight-users mailing list