[ITK] Python Wrapping with no Image Module

Matt McCormick matt.mccormick at kitware.com
Wed Apr 19 14:28:01 EDT 2017


Hi Tenysson,

Welcome to ITK!


The ITK Python wrapping uses lazy loading by default (this increases
interactive loading speed). What we see there is only the ITK modules
and a few special functions. If you are using the IPython terminal
[1], once the tab is pressed for completion, it will load all the
modules. When used in a script, only the modules that are required are
loaded as needed. To force load all the modules and see all the
classes available, call

  itk.force_load()


We have beta Python packages, including binary packages for Python 2.7
on Windows. These may be worth a try because they are built with the
same Visual Studio compiler as the compiler used to build the
python.org distributions, which ensures C runtime compatibility. They
can be installed with:

 python -m pip install --upgrade pip
 python -m pip install itk -f
https://github.com/InsightSoftwareConsortium/ITKPythonPackage/releases/tag/latest

Thanks,
Matt

[1] https://ipython.org/

On Wed, Apr 19, 2017 at 9:55 AM, Tenysson <tenyssonwill at gmail.com> wrote:
> I built the ITK with Python Wrapper in 64 bits in Release mode, using the
> python 2.7 and Visual Studio Community 2015, with no errors.
> I copy the files and folders generate in Install/lib/site-packages to
> C:\Python27\Lib\site-packages.
> I use in python import itk and seems to be ok. But I'm not finding the
> module Image, like itk.Image
> I don't know if it was not generate or where is it. In python just show the
> module below.
> Someone could help me?
>
>>>> itk.
> itk.B                                      itk.ITKIOSiemens
> itk.ITKRegistrationCommon                  itk.__new__(
> itk.ios_base_xalloc(
> itk.D                                      itk.ITKIOSpatialObjects
> itk.ITKRegistrationMethodsv4               itk.__path__
> itk.iostream(
> itk.F                                      itk.ITKIOStimulate
> itk.ITKSmoothing                           itk.__reduce__(
> itk.ipython_kw_matches(
> itk.ITKAnisotropicSmoothing                itk.ITKIOTIFF
> itk.ITKSpatialObjects                      itk.__reduce_ex__(
> itk.istream(
> itk.ITKAntiAlias                           itk.ITKIOTransformBase
> itk.ITKStatistics                          itk.__repr__(
> itk.itkConfig
> itk.ITKBinaryMathematicalMorphology        itk.ITKIOVTK
> itk.ITKTestKernel                          itk.__setattr__(
> itk.list
> itk.ITKClassifiers                         itk.ITKImageCompare
> itk.ITKThresholding                        itk.__sizeof__(
> itk.map
> itk.ITKColormap                            itk.ITKImageCompose
> itk.ITKTransform                           itk.__str__(
> itk.number_of_objects(
> itk.ITKCommon                              itk.ITKImageFeature
> itk.ITKVTK                                 itk.__subclasshook__(
> itk.origin(
> itk.ITKConnectedComponents                 itk.ITKImageFilterBase
> itk.ITKVoronoi                             itk.__weakref__
> itk.ostream(
> itk.ITKConvolution                         itk.ITKImageFunction
> itk.ITKVtkGlue                             itk.attribute_dict(
> itk.output(
> itk.ITKCurvatureFlow                       itk.ITKImageFusion
> itk.ITKWatersheds                          itk.attribute_list(
> itk.physical_size(
> itk.ITKDeconvolution                       itk.ITKImageGradient
> itk.LD                                     itk.attributes_list(
> itk.pipeline(
> itk.ITKDisplacementField                   itk.ITKImageGrid
> itk.SC                                     itk.auto_not_in_place(
> itk.print_function
> itk.ITKDistanceMap                         itk.ITKImageIntensity
> itk.SI                                     itk.auto_pipeline(
> itk.range(
> itk.ITKEigen                               itk.ITKImageLabel
> itk.SL                                     itk.auto_progress(
> itk.region(
> itk.ITKFFT                                 itk.ITKImageNoise
> itk.SLL                                    itk.cerr
> itk.search(
> itk.ITKFastMarching                        itk.ITKImageSources
> itk.SS                                     itk.cin
> itk.set
> itk.ITKFiniteDifference                    itk.ITKImageStatistics
> itk.UC                                     itk.class_(
> itk.set_inputs(
> itk.ITKIOBMP                               itk.ITKLabelMap
> itk.UI                                     itk.clog
> itk.show(
> itk.ITKIOBioRad                            itk.ITKLabelVoting
> itk.UL                                     itk.clrLine
> itk.show2D
> itk.ITKIOGDCM                              itk.ITKLevelSets
> itk.ULL                                    itk.cout
> itk.simple_import_callback(
> itk.ITKIOGE                                itk.ITKMathematicalMorphology
> itk.US                                     itk.ctype(
> itk.simple_progress_callback(
> itk.ITKIOGIPL                              itk.ITKMesh
> itk.WrapITKBuildOptions                    itk.cvar
> itk.size(
> itk.ITKIOHDF5                              itk.ITKMetricsv4
> itk._LazyITKModule__belong_lazy_attributes itk.down_cast(
> itk.spacing(
> itk.ITKIOIPL                               itk.ITKNarrowBand
> itk.__class__(                             itk.echo(
> itk.string(
> itk.ITKIOImageBase                         itk.ITKOptimizers
> itk.__delattr__(                           itk.endl(
> itk.swig
> itk.ITKIOJPEG                              itk.ITKOptimizersv4
> itk.__dict__                               itk.ends(
> itk.template(
> itk.ITKIOLSM                               itk.ITKPDEDeformableRegistration
> itk.__doc__                                itk.flush(
> itk.templated_class
> itk.ITKIOMRC                               itk.ITKPath
> itk.__format__(                            itk.force_load(
> itk.terminal_import_callback(
> itk.ITKIOMeta                              itk.ITKPyBase
> itk.__getattribute__(                      itk.image(
> itk.terminal_progress_callback(
> itk.ITKIONIFTI                             itk.ITKPyUtils
> itk.__hash__(                              itk.index(
> itk.vector
> itk.ITKIONRRD                              itk.ITKQuadEdgeMesh
> itk.__init__(                              itk.ios(
> itk.write(
> itk.ITKIOPNG                               itk.ITKQuadEdgeMeshFiltering
> itk.__module__                             itk.ios_base(
> itk.ITKIORAW                               itk.ITKRegionGrowing
> itk.__name__                               itk.ios_base_sync_with_stdio(
>
>
> Build Settings
> ITK 4.10.1
> Platform: Windows 10
> compiler : Visual C++ 14.0 in x64
> Python 2.7 in x64
> CMake 3.6.1
> CMake Settings: ITK_WRAP_PYTHON
> Error message: None
>
> Best Regards
> --
> Tenysson Will de Lemos
>
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>


More information about the Community mailing list