View Issue Details

IDProjectCategoryView StatusLast Update
0003420Slicer4Module CropVolumepublic2017-06-07 23:27
ReporterjcfrAssigned Tofedorov 
PrioritylowSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0003420: Fix conversion warnings in CropVolumeLogic - Int or double ?
Description

See https://github.com/Slicer/Slicer/blob/ee3b1a5f0c1de6bc1117fd392613b533c25e883f/Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx#L421

It seems that min variables should all be integer. See https://github.com/Slicer/Slicer/blob/ee3b1a5f0c1de6bc1117fd392613b533c25e883f/Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx#L404-409

/home/jchris/Projects/Slicer/Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx: In member function ‘void vtkSlicerCropVolumeLogic::CropVoxelBased(vtkMRMLAnnotationROINode, vtkMRMLVolumeNode, vtkMRMLVolumeNode*)’:
/home/jchris/Projects/Slicer/Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx:421:60: warning: narrowing conversion of ‘minX’ from ‘double’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer/Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx:421:60: warning: narrowing conversion of ‘maxX’ from ‘double’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer/Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx:421:60: warning: narrowing conversion of ‘minY’ from ‘double’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer/Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx:421:60: warning: narrowing conversion of ‘maxY’ from ‘double’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer/Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx:421:60: warning: narrowing conversion of ‘minZ’ from ‘double’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer/Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx:421:60: warning: narrowing conversion of ‘maxZ’ from ‘double’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer/Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx:423:47: warning: narrowing conversion of ‘outputWholeExtent[0]’ from ‘int’ to ‘double’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer/Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx:423:68: warning: narrowing conversion of ‘outputWholeExtent[2]’ from ‘int’ to ‘double’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer/Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx:423:89: warning: narrowing conversion of ‘outputWholeExtent[4]’ from ‘int’ to ‘double’ inside { } is ill-formed in C++11 [-Wnarrowing]

Tagshelp-wanted

Activities

fedorov

fedorov

2013-09-30 15:15

developer   ~0010106

fixed in r22528

fedorov

fedorov

2013-09-30 18:37

developer   ~0010109

reverted in r22532, since the fix did not compile on windows.

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file c1323ba7

2013-09-30 19:15:15

fedorov

Details Diff
COMP: convert to integer explicitly to avoid ambiguity

Fixes 0003420


git-svn-id: http://svn.slicer.org/Slicer4/trunk@22528 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Modules/Loadable/CropVolume/Logic/vtkSlicerCropVolumeLogic.cxx Diff File

Issue History

Date Modified Username Field Change
2013-09-24 17:37 jcfr New Issue
2013-09-24 17:41 jcfr Assigned To => fedorov
2013-09-24 17:41 jcfr Priority normal => low
2013-09-24 17:41 jcfr Status new => assigned
2013-09-24 17:41 jcfr Projection none => minor fix
2013-09-24 17:41 jcfr ETA none => < 1 day
2013-09-24 17:41 jcfr Build => 22484
2013-09-24 17:41 jcfr Target Version => Slicer 4.3.2
2013-09-30 15:15 fedorov Note Added: 0010106
2013-09-30 15:15 fedorov Status assigned => resolved
2013-09-30 15:15 fedorov Resolution open => fixed
2013-09-30 18:37 fedorov Note Added: 0010109
2013-09-30 18:37 fedorov Status resolved => assigned
2014-03-06 10:15 nicole Target Version Slicer 4.3.2 => Slicer 4.4.0
2014-05-13 09:56 jcfr Target Version Slicer 4.4.0 =>
2014-05-13 09:56 jcfr Tag Attached: help-wanted
2017-06-07 23:27 fedorov Changeset attached => Slicer 2145-support-for-installing-extension-from-file c1323ba7
2017-06-07 23:27 fedorov Status assigned => resolved