K-ISHIDA / pythonxy

Automatically exported from code.google.com/p/pythonxy
0 stars 0 forks source link

Missing templates #700

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If relevant, please answer to the following questions:
1. What version of Python(x,y) have you installed?
2.7.5.1

2. Which components have you installed (Python(x,y) installer:
componentpage):
    a. Have you selected the "Recommended" component selection?
    b. Have you selected the "Full" component selection?
c. Have you selected manually plugins in the component list?
b

3. Have you selected the option "Customize installation directories"?
a. Yes
b. No
b

4. If the answer to 3. is yes, what installation directories have you
chosen?

5. Where did you install Python(x,y) itself?
a. default path
b. custom path, which one?
a

6. Have you installed Python(x,y):
    a. For "Current user only"
    b. For "All users"
b

7. What is your operating system?
a. Windows XP
b. Windows Vista
c. Windows 7
d. Windows 8
c

8. Is the operating system 64 bit?
a. Yes
b. No
a

9. When you installed Python(x,y), were you logged in as :
a. a regular user
b. an administrator of the machine
b

10. If you are using Windows Vista/7, have you installed Python(x,y):
a. simply by double-clicking on the installer
    b. by right-clicking on the installer and selecting "Run as an
administrator"
a

11. Regarding installed software on your machine, how did you clean your
machine before installing Python(x,y)  (multiple answers are possible):
a. you didn't do anything, you installed Python(x,y) directly on your
machine without precaution
b. you uninstalled any previous Python distribution (including the
official .msi)
c. you cleaned the Windows registry by removing all Python-related keys
d. you cleaned the environment variables by removing all deprecated
entries
b

What steps will reproduce the problem?
1. Enter python interpreter
2. Import itk
3. For example, itk.ConnectedComponentImageFilter[itk.Image[itk.F, 
3],itk.Image[itk.F,3]]

What is the expected output?
<class 'itkConnectedComponentImageFilterPython.itkConnectedComponentImageFilterI
F3IF3'>

What do you see instead?
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\itk\itkTemplate.py", line 233, in __getitem__ raise KeyError, 'itkTemplate : No template %s for the %s class' % (str(parameters), self.__name__)
KeyError: "itkTemplate : No template (<class itkImagePython.itkImageF3'>, 
<class 'itkImagePython.itkImageF3'>) for the itk::ConnectedComponentImageFilter 
clas"

Please provide any additional information below.
This happens with several itk methods, they are missing templates.

Original issue reported on code.google.com by goo...@lazlo.me on 11 Nov 2013 at 8:38

GoogleCodeExporter commented 9 years ago
Please provide an actual script which reproduces the above issue.

Original comment by grizzly.nyo on 12 Nov 2013 at 7:26

GoogleCodeExporter commented 9 years ago
For example, this does not work:

    import itk

    reader = itk.ImageFileReader[itk.F,3].New()
    reader.SetFileName('image.nii.gz')
    reader.UpdateLargestPossibleRegion()
    reader.Update()
    image = reader.GetOutput()

    filter = itk.ConnectedComponentImageFilter[itk.Image[itk.F,3],itk.Image[itk.F,3]].New()
    filter.FullyConnectedOn()
    filter.SetInput(image)
    filter.Update()

If you replace the image types with for example itk.UC the above script works, 
error also reproducible with other filters.

Original comment by goo...@lazlo.me on 12 Nov 2013 at 7:36

GoogleCodeExporter commented 9 years ago
There were considerable changes to ITK 4.X wrapping.

The above code should use 
reader = itk.ImageFileReader[itk.Image.F3].New().

Please refer to the ITK mailing list and issue tracker for further details.

Original comment by grizzly.nyo on 10 Feb 2014 at 1:31