View Issue Details

IDProjectCategoryView StatusLast Update
0003419Slicer4Module EMSegmentpublic2017-06-10 08:51
Reporterjcfr Assigned Topohl  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.4.0Fixed in VersionSlicer 4.4.0 
Summary0003419: Mismatch between vtkIdType and int - Fix warnings
Description

This could be "solved" by doing some explicit "static_cast" .... or by updating the type that used by EMSegment internally from int to "vtkIdType" ...

EDIT: simplified the following description by removing the multiple occurrences associated with templates types ...

/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/vtkImageEMLocalSegmenter.cxx: In instantiation of ‘void vtkImageEMLocalSegmenterExecute(vtkImageEMLocalSegmenter*, float, vtkImageData, TOut, int) [with TOut = double]’:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/vtkImageEMLocalSegmenter.cxx:830:5: required from here
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/vtkImageEMLocalSegmenter.cxx:663:45: warning: narrowing conversion of ‘outIncX’ from ‘vtkIdType {aka long long int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/vtkImageEMLocalSegmenter.cxx:663:45: warning: narrowing conversion of ‘outIncY’ from ‘vtkIdType {aka long long int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/vtkImageEMLocalSegmenter.cxx:663:45: warning: narrowing conversion of ‘outIncZ’ from ‘vtkIdType {aka long long int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/vtkImageEMLocalSegmenter.cxx: In instantiation of ‘void vtkImageEMLocalSegmenterExecute(vtkImageEMLocalSegmenter
, float
, vtkImageData, TOut, int*) [with TOut = float]’:

[ 67%] In file included from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm.txx:43:0,
from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm.h:439,
from /home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/vtkImageEMLocalSegmenter.cxx:18:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm_Print.txx: In instantiation of ‘void EMLocalAlgorithm<T>::Print_E_StepResultsToFile(int) [with T = double]’:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm.txx:805:5: required from ‘void EMLocalAlgorithm<T>::Expectation_Step(int) [with T = double]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm.txx:2052:5: required from ‘void EMLocalAlgorithm<T>::RunAlgorithm(EMTriVolume&, EMVolume, int&) [with T = double]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/vtkImageEMLocalSegmenter.cxx:408:35: required from ‘void vtkImageEMLocalSegment_RunEMAlgorithm(vtkImageEMLocalSegmenter
, T, int, int, float, short int, char, float, float, int, EMTriVolume&, EMVolume, short int, int, int&) [with T = double]’
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/vtkImageEMLocalSegmenter.cxx:536:7: required from here
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm_Print.txx:356:47: warning: narrowing conversion of ‘outIncX’ from ‘vtkIdType {aka long long int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm_Print.txx:356:47: warning: narrowing conversion of ‘outIncY’ from ‘vtkIdType {aka long long int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm_Print.txx:356:47: warning: narrowing conversion of ‘outIncZ’ from ‘vtkIdType {aka long long int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
Building CXX object Modules/Remote/EMSegment/Qt/Logic/CMakeFiles/vtkSlicerEMSegmentModuleLogic.dir///ImageFilters/vtkImageMeanIntensityNormalization.cxx.o
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm_Print.txx:379:47: warning: narrowing conversion of ‘outIncX’ from ‘vtkIdType {aka long long int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm_Print.txx:379:47: warning: narrowing conversion of ‘outIncY’ from ‘vtkIdType {aka long long int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm_Print.txx:379:47: warning: narrowing conversion of ‘outIncZ’ from ‘vtkIdType {aka long long int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm_Print.txx:444:47: warning: narrowing conversion of ‘outIncX’ from ‘vtkIdType {aka long long int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm_Print.txx:444:47: warning: narrowing conversion of ‘outIncY’ from ‘vtkIdType {aka long long int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/Algorithm/EMLocalAlgorithm_Print.txx:444:47: warning: narrowing conversion of ‘outIncZ’ from ‘vtkIdType {aka long long int}’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]

Tagshelp-wanted

Activities

jcfr

jcfr

2013-09-24 17:21

administrator   ~0010086

And also ..

/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/AMF/vtkLevelSets.cxx: In member function ‘unsigned char vtkLevelSets::CheckConvergence()’:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/AMF/vtkLevelSets.cxx:1192:24: warning: ordered comparison of pointer with integer zero [-Wextra]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/AMF/vtkLevelSets.cxx:1197:65: warning: ordered comparison of pointer with integer zero [-Wextra]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/AMF/vtkLevelSets.cxx:1200:66: warning: ordered comparison of pointer with integer zero [-Wextra]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/AMF/vtkLevelSets.cxx:1204:24: warning: ordered comparison of pointer with integer zero [-Wextra]

/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/vtkEMSegmentLogic.cxx: In static member function ‘static void vtkEMSegmentLogic::TransferIJKToRAS(vtkMRMLVolumeNode, int, double)’:
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/vtkEMSegmentLogic.cxx:1408:10: warning: narrowing conversion of ‘
ijk’ from ‘int’ to ‘float’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/vtkEMSegmentLogic.cxx:1408:18: warning: narrowing conversion of ‘(ijk + 4u)’ from ‘int’ to ‘float’ inside { } is ill-formed in C++11 [-Wnarrowing]
/home/jchris/Projects/Slicer-SuperBuild-Debug-Qt485/EMSegment/vtkEMSegmentLogic.cxx:1408:26: warning: narrowing conversion of ‘
(ijk + 8u)’ from ‘int’ to ‘float’ inside { } is ill-formed in C++11 [-Wnarrowing]

jcfr

jcfr

2014-06-07 08:12

administrator   ~0012036

Thanks to Matt W., this has been fixed in r23314
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=23314

Related Changesets

Import 2017-06-07 23:51:09: master e26da411

2014-06-07 12:04:44

jcfr

Details Diff
COMP: Update EMSegment to fix narrowing and non virtual dtor warnings.

Issue 0003419

------------------------------------------------------------------------
r17052 | jcfr | 2014-06-06 21:29:01 -0400 (Fri, 06 Jun 2014) | 3 lines

COMP: Avoid implicit narrowing casts

Explicitly cast initializers in {} array initializer where the assigned
type is smaller than the value type. This avoids implicit narrowing in a
{} initializer, which is ill-formed in C++11.

------------------------------------------------------------------------
r17051 | jcfr | 2014-06-06 21:21:39 -0400 (Fri, 06 Jun 2014) | 3 lines

COMP: Remove gratuitous virtual

Remove 'virtual' specifier of private class in source file, where said
class is not and (due to being in a source file) never will be derived.
This avoids needing an explicit (virtual) dtor in order to avo
id a -Wnon-virtual-dtor warning.

From: Matthew Woehlke <matthew.woehlke@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23314 3bd1e089-480b-0410-8dfb-8563597acbee
mod - SuperBuild.cmake Diff File

Issue History

Date Modified Username Field Change
2013-09-24 17:16 jcfr New Issue
2013-09-24 17:16 jcfr Status new => assigned
2013-09-24 17:16 jcfr Assigned To => pohl
2013-09-24 17:18 jcfr Target Version => Slicer 4.3.2
2013-09-24 17:18 jcfr Description Updated
2013-09-24 17:21 jcfr Note Added: 0010086
2013-09-24 17:24 jcfr Description Updated
2013-09-24 17:25 jcfr Description Updated
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
2014-06-07 08:12 jcfr Note Added: 0012036
2014-06-07 08:12 jcfr Status assigned => resolved
2014-06-07 08:12 jcfr Fixed in Version => Slicer 4.4.0
2014-06-07 08:12 jcfr Resolution open => fixed
2014-06-07 08:12 jcfr Status resolved => closed
2014-06-07 08:13 jcfr Target Version => Slicer 4.4.0
2017-06-10 08:51 jcfr Changeset attached => Slicer master e26da411