{"action":"created","issue":{"url":"https://api.github.com/repos/Enet4/nifti-rs/issues/5","repository_url":"https://api.github.com/repos/Enet4/nifti-rs","labels_url":"https://api.github.com/repos/Enet4/nifti-rs/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/Enet4/nifti-rs/issues/5/comments","events_url":"https://api.github.com/repos/Enet4/nifti-rs/issues/5/events","html_url":"https://github.com/Enet4/nifti-rs/pull/5","id":271988846,"number":5,"title":"Support all POD for ndarray","user":{"login":"nilgoyette","id":2658640,"avatar_url":"https://avatars3.githubusercontent.com/u/2658640?v=4","gravatar_id":"","url":"https://api.github.com/users/nilgoyette","html_url":"https://github.com/nilgoyette","followers_url":"https://api.github.com/users/nilgoyette/followers","following_url":"https://api.github.com/users/nilgoyette/following{/other_user}","gists_url":"https://api.github.com/users/nilgoyette/gists{/gist_id}","starred_url":"https://api.github.com/users/nilgoyette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilgoyette/subscriptions","organizations_url":"https://api.github.com/users/nilgoyette/orgs","repos_url":"https://api.github.com/users/nilgoyette/repos","events_url":"https://api.github.com/users/nilgoyette/events{/privacy}","received_events_url":"https://api.github.com/users/nilgoyette/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-11-07T21:24:54Z","updated_at":"2017-12-14T19:19:30Z","closed_at":"2017-11-15T22:54:17Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/Enet4/nifti-rs/pulls/5","html_url":"https://github.com/Enet4/nifti-rs/pull/5","diff_url":"https://github.com/Enet4/nifti-rs/pull/5.diff","patch_url":"https://github.com/Enet4/nifti-rs/pull/5.patch"},"body":"Hi Enet4. my company needed to load more datatypes and I didn't want to disturb you so I added them myself. The way I did it, it first loads the header-defined datatype so there's no precision loss, then it casts to the desired type, which may be bad for the precision. However, this is not our fault because it's the user-desired type... he's supposed to know what he's loading. You can use it the same way you did before: `volume.to_ndarray::<u32>()` or any other type.\r\n\r\nI understand that this is not idiomatic Rust. I'm a python and C++ programmer by trade so my rust is not as good as it could be. Please be as critical as you would be to your own code.\r\n\r\nYou were going, I believe, in another direction with the type management. I'm not too sure where you where going though so I coded it like I would in C++. If you actually prefer another way, just tell me and close this PR. My company will use my fork though because it's working quite well and we need it now :)\r\n\r\nThis should be tested a lot, so I tested everything... **except the weird types (complex, rgb and 128)** I only used `u8`, `i16` and `f32` in real-life tests though. 128bits would be quite easy to add.\r\n\r\nIf you actually merge this, I'll probably send a PR specific dimension (instead if dynamic) and a PR for the rgb types because we might need them."},"comment":{"url":"https://api.github.com/repos/Enet4/nifti-rs/issues/comments/351809244","html_url":"https://github.com/Enet4/nifti-rs/pull/5#issuecomment-351809244","issue_url":"https://api.github.com/repos/Enet4/nifti-rs/issues/5","id":351809244,"user":{"login":"nilgoyette","id":2658640,"avatar_url":"https://avatars3.githubusercontent.com/u/2658640?v=4","gravatar_id":"","url":"https://api.github.com/users/nilgoyette","html_url":"https://github.com/nilgoyette","followers_url":"https://api.github.com/users/nilgoyette/followers","following_url":"https://api.github.com/users/nilgoyette/following{/other_user}","gists_url":"https://api.github.com/users/nilgoyette/gists{/gist_id}","starred_url":"https://api.github.com/users/nilgoyette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilgoyette/subscriptions","organizations_url":"https://api.github.com/users/nilgoyette/orgs","repos_url":"https://api.github.com/users/nilgoyette/repos","events_url":"https://api.github.com/users/nilgoyette/events{/privacy}","received_events_url":"https://api.github.com/users/nilgoyette/received_events","type":"User","site_admin":false},"created_at":"2017-12-14T19:19:30Z","updated_at":"2017-12-14T19:19:30Z","author_association":"NONE","body":"Hey @Enet4, I know you wanted to refactor your lib before a new release but can you please publish a new version with this PR? Since I'm the creator of the [only dependant crate](https://crates.io/crates/nifti/reverse_dependencies), I don't think anyone will complain."}}
{"actor":{"display_login":"nilgoyette"}}