-
Notifications
You must be signed in to change notification settings - Fork 78
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
to_dynamic_image method not found in DecodedPixelData<'_>
#465
Comments
I get this error for the second example:
These are my dependencies in Cargo.toml:
|
I suspect that there is some trait version mismatch. Can you try importing use dicom_object::open_file; |
Thank you for your quick response. Unfortunately, this did not solve the problem. I have changed the code to:
with this Cargo.toml
My OS information are:
|
If anything, there may be something going on at the Cargo.lock. Here are a few more steps to try and resolve the situation:
|
I have solved the issue. The method "to_dynamic_image" is part of the image feature of pixeldata, which seems to be not enabled by default. It works with this dependencies:
I have also tried it with the dependencies |
Oh yes, I must have overlooked that detail in your Cargo.toml. Converting to an image object requires the I'm afraid that this is by design, so there isn't much one can do here, other than improve the way that documentation is generated to clarify the features required for those methods to exist. |
No worries. Thank you for your support. How can I enable the feature in the root crate? I have tried this, but it does not work.
|
For that to work, If anything, one can add more Cargo features to |
Thank you for your support. It is a great library anyway. I will close this ticket now. |
Your feedback is appreciated! I have provided said re-exports in #469, to be delivered in the next version. |
Hi,
i am trying to run the example from https://docs.rs/dicom-pixeldata/latest/dicom_pixeldata/index.html
This is the code I run:
When I run
cargo build
, I get the following error:What am I doing wrong?
The text was updated successfully, but these errors were encountered: