-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explore adding RGBUS wrapping #207
Comments
Hi @dzenanz , yes, this can definitely be done. I imagine there is a strong motivation to keep RGB unsigned short pixel wrappings disabled for Python wheel distributions if it is not commonly used, as we are already pushing quite close to the 2GB limit for ITKPythonBuilds archives as-is. In that case ITKMontage is the correct place to add those wrappings. ITKUltrasound is a good module to reference as an example, it adds additional wrappings for "list-of-indices" pixel types for https://github.com/KitwareMedical/ITKUltrasound/blob/master/wrapping/itkImageUltrasound.wrap If I recall correctly it is a requirement that the wrap file names in the module itself do not conflict with those in ITK, i.e. ITK has |
@ZymUpc and @zhusihan-python, would one of you like to make a PR per Tom's suggestion? Pseudocode of if (NOT ITK_WRAP_rgb_unsigned_short)
message(STATUS "Enabling 16-bit RGB support in ITKMontage, despite it being disabled in ITK")
# instantiate for RGBUS: Image, ImageToImageFilter, and other things needed for TileMerge
# maybe also CastImageFilter, ImageFileReader, and ImageFileWriter
endif() Instantiation code should similar to https://github.com/InsightSoftwareConsortium/ITKMontage/blob/master/wrapping/itkTileMergeImageFilter.wrap. |
I would love to, but im not familiar with cpp and makefiles, i guess its like this, right?
if someone have the complete wrap file, i can help to compile itk montage on windows10 and ubuntu22 |
@dzenanz @zhusihan-python Thank you for your help. I'm happy to try this method I'm sorry, but I have other things to do on Saturday and Sunday I will try it as early as possible on Monday. |
@zhusihan-python I have compiled itk itk-5.2.1.dev20210904 python packages in ubuntu 22(from python 3.6 to 3.9)with ITK_WRAP_rgb_unsigned_short :BOOL=ON that can use itk.RGBPixel[itk.US] method, but I want the support in itk-montage which is not available in Python Package Index (PyPI) , because I have the same problem in @ZymUpc 's issue(InsightSoftwareConsortium/ITK#3779). I will uploads to Baidu Net dist if you need these wheel files and related folders |
@dzenanz In my image processing,I need the method of itk.RGBPixel[itk.US] in itk and method of itk.TileConfiguration and itk.TileMergeImageFilter in itk-montage. I helped @ZymUpc to built the python packages he wanted , but the dependence on itk-montage is s against our background expectation. The sample code that we want is as below : image = itk.imread(filename,itk.RGBPixel[itk.US])
dimension = 2
stage_tiles = itk.TileConfiguration[dimension]()
linear_size = stage_tiles.LinearSize()
resampleF = itk.TileMergeImageFilter[itk.RGBPixel[itk.US]].New() |
first build itk with wrap_python on, this is from my personal experience build itk and itk montage on windows 10 |
Hi, for a 2D 16-bit RGB image, I recommend that we wrap The code of @BohriumKwong becomes
and the rest is the same. Another option is,
Either way, we will be able to use the pre-built binary Python packages. |
Hello, our ultimate goal is to achieve 2D 16 bit RGB image mosaic based on itk and itk-montage. We hope to use the following two lines of code correctly
Now I change the code to the following:
It seems that itk-montage (corresponding to itk. TileMergeImageFilter) does not support itk.Vector [itk.F, 3] type data. The itk-montage installed with pip install itk-montage==0.7.3 only supports the following data types: Do you mean that we need to recompile itk-montage?
|
This will probably not need further wrappings, like |
This is off by default. If we add it here, will support for that work properly? Are additional wrappings for
Image
,ImageToImageFilter
, etc allowed to be in Montage's wheel?Motivation: this module is frequently used with 16-bit RGB images.
The text was updated successfully, but these errors were encountered: