-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
add 32 export in raw #876
add 32 export in raw #876
Conversation
* GenericWriter | ||
* Template partial specialisation for volume images of dimension 3 and unsigned int value type (which allows to export raw file format). | ||
**/ | ||
template <typename TContainer, typename TFunctor> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you can consider DGtal::uint32_t as specialization type instead if unsigned int
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes ok
Without the raw32 reader, it's a bit hard to check possible issues with the endianess. |
any update ? |
I look it |
I am working on Raw32 integration in generic reader not yet finished |
@dcoeurjo should be good now : we have both reader and writer 32 bits for raw ;à |
template <typename TContainer, typename TFunctor> | ||
struct GenericWriter<TContainer, 2, DGtal::uint32_t, TFunctor> | ||
{ | ||
BOOST_CONCEPT_ASSERT(( CConstImage<TContainer> )) ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it's dangerous here... We using genericwriter on value type T, the behavior would be:
- export as raw8 with cast function from T -> char
- except if T==uint32_t which would be exported as raw32
This is maybe a bit complex/strange for the user... I would say: in the generic wirter/reader, we only consider raw8 export. If the user wants raw32, he/she has to explicitly use the Raw32 method of the raw writer.. what do you think ?
I am not sure that complex for user:
But perhaps you are right just if a user use a 32 bits image and just want export it in pgm it will compile but wll finished with an error message in the execution. Perhaps we can just indicate to the user to change the image mode to export in pgm ? |
okay but what is the behavior for 'unsigned int' ? raw32 or raw8 ? But that's weird case I admit.. Have you make it clear in the doc ? |
perhaps it is dependent of the system, for me unsigned int = uint32 but since it only specialized with uint32 it should be fine. |
@dcoeurjo done |
ok merging |
just to export 32 bits images