Still, I am receiving an error for both of the fixes you suggested.
{
"name": "TemplateTypeError",
"message": "itk.TileMergeImageFilter is not wrapped for input type `itk.Image[itk.UC,2], itk.F`.
To limit the size of the package, only a limited number of
types are available in ITK Python. To print the supported
types, run the following command in your python environment:
itk.TileMergeImageFilter.GetTypes()
Possible solutions:
* If you are an application user:
** Convert your input image into a supported format (see below).
** Contact developer to report the issue.
* If you are an application developer, force input images to be
loaded in a supported pixel type.
e.g.: instance = itk.TileMergeImageFilter[itk.Image[itk.SS,2], itk.D].New(my_input)
* (Advanced) If you are an application developer, build ITK Python yourself and
turned to `ON` the corresponding CMake option to wrap the pixel type or image
dimension you need. When configuring ITK with CMake, you can set
`ITK_WRAP_${type}` (replace ${type} with appropriate pixel type such as
`double`). If you need to support images with 4 or 5 dimensions, you can add
these dimensions to the list of dimensions in the CMake variable
`ITK_WRAP_IMAGE_DIMS`.
Supported input types:
itk.Image[itk.SS,2]
itk.Image[itk.UC,2]
itk.Image[itk.US,2]
itk.Image[itk.F,2]
itk.Image[itk.D,2]
itk.Image[itk.RGBPixel[itk.UC],2]
itk.Image[itk.RGBAPixel[itk.UC],2]
itk.Image[itk.SS,3]
itk.Image[itk.UC,3]
itk.Image[itk.US,3]
itk.Image[itk.F,3]
itk.Image[itk.D,3]
itk.Image[itk.RGBPixel[itk.UC],3]
itk.Image[itk.RGBAPixel[itk.UC],3]
itk.Image[itk.SS,4]
itk.Image[itk.UC,4]
itk.Image[itk.US,4]
itk.Image[itk.F,4]
itk.Image[itk.D,4]
itk.Image[itk.RGBPixel[itk.UC],4]
itk.Image[itk.RGBAPixel[itk.UC],4]
",
"stack": "---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
File ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\itk\\support\\template_class.py:525, in itkTemplate.__getitem__(self, parameters)
524 try:
--> 525 this_item = self.__template__[key]
526 except KeyError:
KeyError: (<class 'itk.itkImagePython.itkImageUC2'>, <itkCType float>)
During handling of the above exception, another exception occurred:
TemplateTypeError Traceback (most recent call last)
Cell In [10], line 2
1 print(\"Producing the mosaic\")
----> 2 resampleF = itk.TileMergeImageFilter[type(color_images[0]), itk.F].New()# line creating the problem
3 resampleF.SetMontageSize(stage_tiles.GetAxisSizes())
4 for t in range(stage_tiles.LinearSize()):
File ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\itk\\support\\template_class.py:529, in itkTemplate.__getitem__(self, parameters)
526 except KeyError:
527 import itk
--> 529 raise itk.TemplateTypeError(self, key)
530 return this_item
TemplateTypeError: itk.TileMergeImageFilter is not wrapped for input type `itk.Image[itk.UC,2], itk.F`.
To limit the size of the package, only a limited number of
types are available in ITK Python. To print the supported
types, run the following command in your python environment:
itk.TileMergeImageFilter.GetTypes()
Possible solutions:
* If you are an application user:
** Convert your input image into a supported format (see below).
** Contact developer to report the issue.
* If you are an application developer, force input images to be
loaded in a supported pixel type.
e.g.: instance = itk.TileMergeImageFilter[itk.Image[itk.SS,2], itk.D].New(my_input)
* (Advanced) If you are an application developer, build ITK Python yourself and
turned to `ON` the corresponding CMake option to wrap the pixel type or image
dimension you need. When configuring ITK with CMake, you can set
`ITK_WRAP_${type}` (replace ${type} with appropriate pixel type such as
`double`). If you need to support images with 4 or 5 dimensions, you can add
these dimensions to the list of dimensions in the CMake variable
`ITK_WRAP_IMAGE_DIMS`.
Supported input types:
itk.Image[itk.SS,2]
itk.Image[itk.UC,2]
itk.Image[itk.US,2]
itk.Image[itk.F,2]
itk.Image[itk.D,2]
itk.Image[itk.RGBPixel[itk.UC],2]
itk.Image[itk.RGBAPixel[itk.UC],2]
itk.Image[itk.SS,3]
itk.Image[itk.UC,3]
itk.Image[itk.US,3]
itk.Image[itk.F,3]
itk.Image[itk.D,3]
itk.Image[itk.RGBPixel[itk.UC],3]
itk.Image[itk.RGBAPixel[itk.UC],3]
itk.Image[itk.SS,4]
itk.Image[itk.UC,4]
itk.Image[itk.US,4]
itk.Image[itk.F,4]
itk.Image[itk.D,4]
itk.Image[itk.RGBPixel[itk.UC],4]
itk.Image[itk.RGBAPixel[itk.UC],4]
"
}
for the other one
{
"name": "TemplateTypeError",
"message": "itk.TileMergeImageFilter is not wrapped for input type `itk.Image[itk.UC,2]`.
To limit the size of the package, only a limited number of
types are available in ITK Python. To print the supported
types, run the following command in your python environment:
itk.TileMergeImageFilter.GetTypes()
Possible solutions:
* If you are an application user:
** Convert your input image into a supported format (see below).
** Contact developer to report the issue.
* If you are an application developer, force input images to be
loaded in a supported pixel type.
e.g.: instance = itk.TileMergeImageFilter[itk.Image[itk.SS,2], itk.D].New(my_input)
* (Advanced) If you are an application developer, build ITK Python yourself and
turned to `ON` the corresponding CMake option to wrap the pixel type or image
dimension you need. When configuring ITK with CMake, you can set
`ITK_WRAP_${type}` (replace ${type} with appropriate pixel type such as
`double`). If you need to support images with 4 or 5 dimensions, you can add
these dimensions to the list of dimensions in the CMake variable
`ITK_WRAP_IMAGE_DIMS`.
Supported input types:
itk.Image[itk.SS,2]
itk.Image[itk.UC,2]
itk.Image[itk.US,2]
itk.Image[itk.F,2]
itk.Image[itk.D,2]
itk.Image[itk.RGBPixel[itk.UC],2]
itk.Image[itk.RGBAPixel[itk.UC],2]
itk.Image[itk.SS,3]
itk.Image[itk.UC,3]
itk.Image[itk.US,3]
itk.Image[itk.F,3]
itk.Image[itk.D,3]
itk.Image[itk.RGBPixel[itk.UC],3]
itk.Image[itk.RGBAPixel[itk.UC],3]
itk.Image[itk.SS,4]
itk.Image[itk.UC,4]
itk.Image[itk.US,4]
itk.Image[itk.F,4]
itk.Image[itk.D,4]
itk.Image[itk.RGBPixel[itk.UC],4]
itk.Image[itk.RGBAPixel[itk.UC],4]
",
"stack": "---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
File ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\itk\\support\\template_class.py:525, in itkTemplate.__getitem__(self, parameters)
524 try:
--> 525 this_item = self.__template__[key]
526 except KeyError:
KeyError: (<class 'itk.itkImagePython.itkImageUC2'>,)
During handling of the above exception, another exception occurred:
TemplateTypeError Traceback (most recent call last)
Cell In [11], line 2
1 print(\"Producing the mosaic\")
----> 2 resampleF = itk.TileMergeImageFilter[type(color_images[0])].New() # line creating the problem
3 resampleF.SetMontageSize(stage_tiles.GetAxisSizes())
4 for t in range(stage_tiles.LinearSize()):
File ~\\AppData\\Roaming\\Python\\Python38\\site-packages\\itk\\support\\template_class.py:529, in itkTemplate.__getitem__(self, parameters)
526 except KeyError:
527 import itk
--> 529 raise itk.TemplateTypeError(self, key)
530 return this_item
TemplateTypeError: itk.TileMergeImageFilter is not wrapped for input type `itk.Image[itk.UC,2]`.
To limit the size of the package, only a limited number of
types are available in ITK Python. To print the supported
types, run the following command in your python environment:
itk.TileMergeImageFilter.GetTypes()
Possible solutions:
* If you are an application user:
** Convert your input image into a supported format (see below).
** Contact developer to report the issue.
* If you are an application developer, force input images to be
loaded in a supported pixel type.
e.g.: instance = itk.TileMergeImageFilter[itk.Image[itk.SS,2], itk.D].New(my_input)
* (Advanced) If you are an application developer, build ITK Python yourself and
turned to `ON` the corresponding CMake option to wrap the pixel type or image
dimension you need. When configuring ITK with CMake, you can set
`ITK_WRAP_${type}` (replace ${type} with appropriate pixel type such as
`double`). If you need to support images with 4 or 5 dimensions, you can add
these dimensions to the list of dimensions in the CMake variable
`ITK_WRAP_IMAGE_DIMS`.
Supported input types:
itk.Image[itk.SS,2]
itk.Image[itk.UC,2]
itk.Image[itk.US,2]
itk.Image[itk.F,2]
itk.Image[itk.D,2]
itk.Image[itk.RGBPixel[itk.UC],2]
itk.Image[itk.RGBAPixel[itk.UC],2]
itk.Image[itk.SS,3]
itk.Image[itk.UC,3]
itk.Image[itk.US,3]
itk.Image[itk.F,3]
itk.Image[itk.D,3]
itk.Image[itk.RGBPixel[itk.UC],3]
itk.Image[itk.RGBAPixel[itk.UC],3]
itk.Image[itk.SS,4]
itk.Image[itk.UC,4]
itk.Image[itk.US,4]
itk.Image[itk.F,4]
itk.Image[itk.D,4]
itk.Image[itk.RGBPixel[itk.UC],4]
itk.Image[itk.RGBAPixel[itk.UC],4]
"
}
Can you help me with this? @dzenanz