[Insight-users] Porting from itk 2.4 to itk 3.0

Massimo Esposito mass.esposito at gmail.com
Thu Mar 15 02:46:05 EST 2007


If i comment the update member no memory leaks are generated.
Below i inserted the report of memory leaks generated by visual studio.

{63335} normal block at 0x0D6C4DF8, 12 bytes long.

Data: < Ml Ml > F8 4D 6C 0D F8 4D 6C 0D CD CD CD CD

{63334} normal block at 0x0D72E4D0, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{62184} normal block at 0x0D6CDBA0, 12 bytes long.

Data: < l l > A0 DB 6C 0D A0 DB 6C 0D CD CD CD CD

{62183} normal block at 0x0D6C98C0, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{61033} normal block at 0x0D6C4740, 12 bytes long.

Data: <@Gl @Gl > 40 47 6C 0D 40 47 6C 0D CD CD CD CD

{61032} normal block at 0x0D6E7B90, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{59882} normal block at 0x0D6CCF08, 12 bytes long.

Data: < l l > 08 CF 6C 0D 08 CF 6C 0D CD CD CD CD

{59881} normal block at 0x0D6C53B0, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{58731} normal block at 0x0D6CF880, 12 bytes long.

Data: < l l > 80 F8 6C 0D 80 F8 6C 0D CD CD CD CD

{58730} normal block at 0x0D720BB0, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{57580} normal block at 0x0D6CCD38, 12 bytes long.

Data: <8 l 8 l > 38 CD 6C 0D 38 CD 6C 0D CD CD CD CD

{57579} normal block at 0x0D6CB7F0, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{56428} normal block at 0x0D6CC0E0, 12 bytes long.

Data: < l l > E0 C0 6C 0D E0 C0 6C 0D CD CD CD CD

{56427} normal block at 0x0D6E7438, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{55277} normal block at 0x0D6AF4C0, 12 bytes long.

Data: < j j > C0 F4 6A 0D C0 F4 6A 0D CD CD CD CD

{55276} normal block at 0x0D6BE998, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{54126} normal block at 0x0D6C5598, 12 bytes long.

Data: < Ul Ul > 98 55 6C 0D 98 55 6C 0D CD CD CD CD

{54125} normal block at 0x0D70CA38, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{52975} normal block at 0x0D6C52D8, 12 bytes long.

Data: < Rl Rl > D8 52 6C 0D D8 52 6C 0D CD CD CD CD

{52974} normal block at 0x0D6C9830, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{51824} normal block at 0x0D704DD0, 12 bytes long.

Data: < Mp Mp > D0 4D 70 0D D0 4D 70 0D CD CD CD CD

{51823} normal block at 0x0D6D07A8, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{50673} normal block at 0x0D6D0598, 12 bytes long.

Data: < m m > 98 05 6D 0D 98 05 6D 0D CD CD CD CD

{50672} normal block at 0x0D6B17D8, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{49521} normal block at 0x0D6CFE50, 12 bytes long.

Data: <P l P l > 50 FE 6C 0D 50 FE 6C 0D CD CD CD CD

{49520} normal block at 0x0D705000, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{48370} normal block at 0x0D6BD1D0, 12 bytes long.

Data: < k k > D0 D1 6B 0D D0 D1 6B 0D CD CD CD CD

{48369} normal block at 0x0D6C9410, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{47219} normal block at 0x0D6B1070, 12 bytes long.

Data: <p k p k > 70 10 6B 0D 70 10 6B 0D CD CD CD CD

{47218} normal block at 0x0D6C9BD0, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{46068} normal block at 0x0D6C4FC8, 12 bytes long.

Data: < Ol Ol > C8 4F 6C 0D C8 4F 6C 0D CD CD CD CD

{46067} normal block at 0x0D6F6000, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{44916} normal block at 0x0D6E12D8, 12 bytes long.

Data: < n n > D8 12 6E 0D D8 12 6E 0D CD CD CD CD

{44915} normal block at 0x0D6B1748, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{43765} normal block at 0x0D6CF6B0, 12 bytes long.

Data: < l l > B0 F6 6C 0D B0 F6 6C 0D CD CD CD CD

{43764} normal block at 0x0D6BF0E8, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{42614} normal block at 0x0D6CFF38, 12 bytes long.

Data: <8 l 8 l > 38 FF 6C 0D 38 FF 6C 0D CD CD CD CD

{42613} normal block at 0x0D6C9C60, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{41462} normal block at 0x0D6CD6B8, 12 bytes long.

Data: < l l > B8 D6 6C 0D B8 D6 6C 0D CD CD CD CD

{41461} normal block at 0x0D6D0838, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{40311} normal block at 0x0D6D08C8, 12 bytes long.

Data: < m m > C8 08 6D 0D C8 08 6D 0D CD CD CD CD

{40310} normal block at 0x0D6C7E88, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{39159} normal block at 0x0D6D8A48, 12 bytes long.

Data: <H m H m > 48 8A 6D 0D 48 8A 6D 0D CD CD CD CD

{39158} normal block at 0x0D6C9AB0, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{38007} normal block at 0x0D6CC258, 12 bytes long.

Data: <X l X l > 58 C2 6C 0D 58 C2 6C 0D CD CD CD CD

{38006} normal block at 0x0D6C7410, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{36855} normal block at 0x0D6CC5E0, 12 bytes long.

Data: < l l > E0 C5 6C 0D E0 C5 6C 0D CD CD CD CD

{36854} normal block at 0x0D6C55E0, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{35703} normal block at 0x0D6CC3B0, 12 bytes long.

Data: < l l > B0 C3 6C 0D B0 C3 6C 0D CD CD CD CD

{35702} normal block at 0x0D6C5320, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{34549} normal block at 0x0D6CCA40, 12 bytes long.

Data: <@ l @ l > 40 CA 6C 0D 40 CA 6C 0D CD CD CD CD

{34548} normal block at 0x0D6C5700, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{33514} normal block at 0x0D6C5478, 12 bytes long.

Data: <xTl xTl > 78 54 6C 0D 78 54 6C 0D CD CD CD CD

{33513} normal block at 0x0D6C5FC8, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00

{32375} normal block at 0x0D6C6150, 12 bytes long.

Data: <Pal Pal > 50 61 6C 0D 50 61 6C 0D CD CD CD CD

{32374} normal block at 0x0D6C7380, 84 bytes long.

Data: < [ > C8 5B CA 00 00 00 00 00 A8 99 1B 02 00 00 00 00


2007/3/14, Bill Lorensen <bill.lorensen at gmail.com>:
>
> Massimo
> Can you provide the locations of the leaks that you are getting?
>
> Bill
>
>
>  On 3/14/07, Massimo Esposito <mass.esposito at gmail.com> wrote:
>
> >  Hi,
> > i have some problems to port my code form itk 2.4 to itk 3.0 or
> > higher. My code simply reads a dicom series by using the class
> > itkGDCMImageIO. It is part of a class of an MFC application.
> > I am
> > using
> > visual stuidio .Net 2003. I have compiled the version 3.0.1 of
> > itk and
> > linked it in my project. I don't have compilation or execution
> > problem,
> > but after closing my MFC application many memory leaks are
> > detected. I
> > executed my application in debug mode. The strange thing
> > is that when i
> > open some dicom series no memory leaks are generated
> > whereas in other
> > cases a number of memory leaks appears. This number
> > is the same of the
> > dicom slices i try to open. But using itk 2.4 i
> > didn't have any
> > problems!!
> > My code is reported below:
> >
> > typedef short
> > PixelType;
> > const
> > unsigned int Dimension = 3;
> > typedef itk::
> > Image<PixelType, Dimension>
> > ImageType;
> > typedef itk::
> > ImageSeriesReader<ImageType> SeriesReaderType;
> >
> > typedef itk::
> > GDCMImageIO ImageIOType;
> > typedef itk::DICOMSeriesFileNames
> > DicomNamesGeneratorType;
> >
> > SeriesReaderType::Pointer itkReader =
> > SeriesReaderType::New();
> > ImageIOType::Pointer itkDicomIO =
> > ImageIOType::New();
> >
> > DicomNamesGeneratorType::Pointer seriesSort =
> > DicomNamesGeneratorType::New();
> > seriesSort-
> > >SetFileNameSortingOrderToSortByImageNumber();
> > seriesSort-
> > >SetDirectory
> > (dicomDirectory);
> >
> > if (seriesSort->GetFileNames().size())
> > {
> >
> > itkReader->SetFileNames(seriesSort->GetFileNames());
> > itkReader-
> > >SetImageIO(itkDicomIO);
> >
> > try {
> > itkReader-
> > >UpdateLargestPossibleRegion();
> > }
> > catch (itk::ExceptionObject) {
> >
> >
> > return false;
> > }
> > }
> >
> > I have tried to use GDCMSeriesFileNames instead
> > of DICOMSeriesFileNames but the result is the same. If i use
> > DICOMImageIO2 no memory leaks are generated but the header dicom is
> > not
> > fully read (only a part of it can be accessed by using members of
> > this
> > class).
> > If i call updateoutputinformation instead of
> > UpdateLargestPossibleRegion the number of memory leack gets lower.
> > Can
> > someone help me?
> >
> > Thanks in advance,
> > Massimo
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070315/a7c3051a/attachment-0001.html


More information about the Insight-users mailing list