-
Notifications
You must be signed in to change notification settings - Fork 61
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
ENH: Add template for input ImageType for itk2Dicom #507
Conversation
@jadh4v: @michaelonken looked at this and noticed something that I did not think about.
Can you please comment on this? |
Good catch. The use cases are limited by explicit instantiation of the templated function
|
I have pushed a commit adding the restriction to the template function. error C3190: 'DcmDataset *dcmqi::Itk2DicomConverter::itkimage2dcmSegmentation(std::vector<DcmDataset *,std::allocator<DcmDataset *>>,std::vector<slicer_itk::SmartPointer<const slicer_itk::VectorImageToImageAdaptor<int,3>>,std::allocator<slicer_itk::SmartPointer<const slicer_itk::VectorImageToImageAdaptor<int,3>>>>,const std::string &,bool,bool,bool)'
with the provided template arguments is not the explicit instantiation of any member function of 'dcmqi::Itk2DicomConverter'
dcmqi\libsrc\Itk2DicomConverter.cpp(713,44): error C2945: explicit instantiation does not refer to a template-class specialization |
Hmmm will have to add fixes for Linux and macOS. |
👍 I think that's the best solution to already reject wrong usage during compile time. |
…e2dcmSegmentation Tempalted function Itk2DicomConverter::itkimage2dcmSegmentation should not be instantiated with PixelType other than short. This is because we do not handle any other pixel type for writing DICOM segmentation object. Any attempt to instantiate should result in a compile time error, warning the developer about the limitation.
@michaelonken @fedorov Looks like the CI is passing with my last fix. Please approve and merge. |
No description provided.