From matt.mccormick at kitware.com Fri Sep 1 14:51:01 2017 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 1 Sep 2017 14:51:01 -0400 Subject: [ITK-dev] Patches for 4.12.2 release Message-ID: Hi folks, Let's release 4.12.2 next week. This will be a patch release that fixes critical issues, regressions, documentation, and compiler support. Patches currently on the release branch are: Edwin Bennink (1): BUG: Fixed cylinder bbox, fixed and enhanced IsInside func Jean-Christophe Fillion-Robin (2): COMP: Update MINC to set MACOSX_RPATH property based on CMAKE_MACOSX_RPATH COMP: Update KWsys to set MACOSX_RPATH property based on CMAKE_MACOSX_RPATH Niels Dekker (1): COMP: Fixed leak into user code To be added: - AnisotropicDiffusionLBR example build fix: http://review.source.kitware.com/#/c/22567/ Possibly also the GPU fixes: http://review.source.kitware.com/#/q/status:open+project:ITK+branch:master+topic:gpu-mean-filters Are there any other patches we are missing? Thanks, Matt From niels-xtk at xs4all.nl Tue Sep 5 11:29:05 2017 From: niels-xtk at xs4all.nl (Niels Dekker) Date: Tue, 05 Sep 2017 17:29:05 +0200 Subject: [ITK-dev] [ITK] Patches for 4.12.2 release In-Reply-To: References: Message-ID: Hi Matt, Thank you very much for including my fix, "Fixed leak into user code"! Can you please also include the following one? Floris Berendsen: COMP: add symbol name mangling for niftilib in ITK https://github.com/InsightSoftwareConsortium/ITK/commit/b33d9978a2864aaf7c58de3c51e181bb7ef757e7 You already merged this fix to the master on June 20: https://github.com/InsightSoftwareConsortium/ITK/commit/370c3116d3edac3a3bc36e03e1b1b655df0f04af Kind regards, Niels On 2017-09-01 20:51, Matt McCormick wrote: > Hi folks, > > Let's release 4.12.2 next week. This will be a patch release that > fixes critical issues, regressions, documentation, and compiler > support. Patches currently on the release branch are: > > > Edwin Bennink (1): > BUG: Fixed cylinder bbox, fixed and enhanced IsInside func > > Jean-Christophe Fillion-Robin (2): > COMP: Update MINC to set MACOSX_RPATH property based on > CMAKE_MACOSX_RPATH > COMP: Update KWsys to set MACOSX_RPATH property based on > CMAKE_MACOSX_RPATH > > Niels Dekker (1): > COMP: Fixed leak into user code > > > To be added: > > - AnisotropicDiffusionLBR example build fix: > http://review.source.kitware.com/#/c/22567/ > > Possibly also the GPU fixes: > > > http://review.source.kitware.com/#/q/status:open+project:ITK+branch:master+topic:gpu-mean-filters > > > Are there any other patches we are missing? > > > Thanks, > Matt > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -- Niels Dekker Scientific programmer LKEB, Leiden University Medical Center, Netherlands From matt.mccormick at kitware.com Tue Sep 5 12:48:54 2017 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 5 Sep 2017 12:48:54 -0400 Subject: [ITK-dev] [ITK] Patches for 4.12.2 release In-Reply-To: References: Message-ID: Dear Niels, Thanks for the note! The patch has been added to the release branch for 4.12.2. Thanks, Matt On Tue, Sep 5, 2017 at 11:29 AM, Niels Dekker wrote: > Hi Matt, > > Thank you very much for including my fix, "Fixed leak into > user code"! Can you please also include the following one? > > Floris Berendsen: > COMP: add symbol name mangling for niftilib in ITK > > https://github.com/InsightSoftwareConsortium/ITK/commit/b33d9978a2864aaf7c58de3c51e181bb7ef757e7 > > You already merged this fix to the master on June 20: > https://github.com/InsightSoftwareConsortium/ITK/commit/370c3116d3edac3a3bc36e03e1b1b655df0f04af > > Kind regards, Niels > > > On 2017-09-01 20:51, Matt McCormick wrote: >> >> Hi folks, >> >> Let's release 4.12.2 next week. This will be a patch release that >> fixes critical issues, regressions, documentation, and compiler >> support. Patches currently on the release branch are: >> >> >> Edwin Bennink (1): >> BUG: Fixed cylinder bbox, fixed and enhanced IsInside func >> >> Jean-Christophe Fillion-Robin (2): >> COMP: Update MINC to set MACOSX_RPATH property based on >> CMAKE_MACOSX_RPATH >> COMP: Update KWsys to set MACOSX_RPATH property based on >> CMAKE_MACOSX_RPATH >> >> Niels Dekker (1): >> COMP: Fixed leak into user code >> >> >> To be added: >> >> - AnisotropicDiffusionLBR example build fix: >> http://review.source.kitware.com/#/c/22567/ >> >> Possibly also the GPU fixes: >> >> >> >> http://review.source.kitware.com/#/q/status:open+project:ITK+branch:master+topic:gpu-mean-filters >> >> >> Are there any other patches we are missing? >> >> >> Thanks, >> Matt >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-developers >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community > > > -- > Niels Dekker > Scientific programmer > LKEB, Leiden University Medical Center, Netherlands > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From e.a.g.pfaehler at umcg.nl Fri Sep 8 08:32:57 2017 From: e.a.g.pfaehler at umcg.nl (Pfaehler, EAG (ngmb)) Date: Fri, 8 Sep 2017 12:32:57 +0000 Subject: [ITK-dev] problems itk resample filter Message-ID: Dear all, I would need some help to resample so that it has isotropic voxels in the end. For this, I wanted to use the Nearest Neighbor Interpolator and the ResampleFilterType. My code is running, but the output of the filter has always the dimensions [0 0 0], so is not existent. What am I doing wrong? (see code below) Thanks in advance! Elli typedef itk::NearestNeighborInterpolateImageFunction NearestNeighborInterpolatorType; typedef itk::ResampleImageFilter ResampleFilterType; typedef itk::AffineTransform TransformType; //use nearest neighbor interpolation typename NearestNeighborInterpolatorType::Pointer nearestNeighborInterpolator = NearestNeighborInterpolatorType::New(); typename ImageType::DirectionType direction; typename TransformType::Pointer transform = TransformType::New(); //transform->SetIdentity(); typedef itk::NearestNeighborInterpolateImageFunction InterpolatorType; //typedef itk::LinearInterpolateImageFunction InterpolatorType; typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); typename ResampleFilterType::Pointer resizeFilter2 = ResampleFilterType::New(); resizeFilter2->SetTransform(transform); resizeFilter2->SetInterpolator( interpolator ); resizeFilter2->SetDefaultPixelValue(0); //resizeFilter2->SetInterpolator(); const typename ImageType::SpacingType& inputSpacing = image->GetSpacing(); //sampling double outputSpacing[3]; // Fetch original image size const typename ImageType::RegionType& inputRegion = image->GetLargestPossibleRegion(); const typename ImageType::SizeType& inputSize = inputRegion.GetSize(); unsigned int oldWidth = inputSize[0]; unsigned int oldHeight = inputSize[1]; unsigned int oldDepth = inputSize[2]; unsigned int newWidth; unsigned int newHeight; unsigned int newDepth; //get the new height etc of image double minimum = inputSpacing[0]; if (inputSpacing[1]SetOutputSpacing(outputSpacing); // Set the computed size itk::Size<3> outputSize = { {newWidth, newHeight, newDepth} }; resizeFilter2->SetSize(outputSize); // Specify the input for the resamplers resizeFilter2->SetInput(image); ImageType::Pointer imageNew = resizeFilter2->GetOutput(); const typename ImageType::RegionType& outputRegion = imageNew->GetLargestPossibleRegion(); const typename ImageType::SizeType& outputSize2 = outputRegion.GetSize(); ________________________________ De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.a.g.pfaehler at umcg.nl Fri Sep 8 09:13:34 2017 From: e.a.g.pfaehler at umcg.nl (Pfaehler, EAG (ngmb)) Date: Fri, 8 Sep 2017 13:13:34 +0000 Subject: [ITK-dev] [ITK] problems itk resample filter In-Reply-To: References: Message-ID: Thanks, I did this. Now I get an image, with the desired size, but there all image values are 0. I get the same when I use linear interpolation? Does someone know, what could be the reason? Thanks in advance, Regards Elli Van: Samuel Gerber [mailto:samuel.gerber at kitware.com] Verzonden: vrijdag 8 september 2017 14:51 Aan: Pfaehler, EAG (ngmb) CC: insight-developers at itk.org Onderwerp: Re: [ITK] [ITK-dev] problems itk resample filter I believe you might need to call resizeFilter2->Update() On Fri, Sep 8, 2017 at 8:32 AM, Pfaehler, EAG (ngmb) > wrote: Dear all, I would need some help to resample so that it has isotropic voxels in the end. For this, I wanted to use the Nearest Neighbor Interpolator and the ResampleFilterType. My code is running, but the output of the filter has always the dimensions [0 0 0], so is not existent. What am I doing wrong? (see code below) Thanks in advance! Elli typedef itk::NearestNeighborInterpolateImageFunction NearestNeighborInterpolatorType; typedef itk::ResampleImageFilter ResampleFilterType; typedef itk::AffineTransform TransformType; //use nearest neighbor interpolation typename NearestNeighborInterpolatorType::Pointer nearestNeighborInterpolator = NearestNeighborInterpolatorType::New(); typename ImageType::DirectionType direction; typename TransformType::Pointer transform = TransformType::New(); //transform->SetIdentity(); typedef itk::NearestNeighborInterpolateImageFunction InterpolatorType; //typedef itk::LinearInterpolateImageFunction InterpolatorType; typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); typename ResampleFilterType::Pointer resizeFilter2 = ResampleFilterType::New(); resizeFilter2->SetTransform(transform); resizeFilter2->SetInterpolator( interpolator ); resizeFilter2->SetDefaultPixelValue(0); //resizeFilter2->SetInterpolator(); const typename ImageType::SpacingType& inputSpacing = image->GetSpacing(); //sampling double outputSpacing[3]; // Fetch original image size const typename ImageType::RegionType& inputRegion = image->GetLargestPossibleRegion(); const typename ImageType::SizeType& inputSize = inputRegion.GetSize(); unsigned int oldWidth = inputSize[0]; unsigned int oldHeight = inputSize[1]; unsigned int oldDepth = inputSize[2]; unsigned int newWidth; unsigned int newHeight; unsigned int newDepth; //get the new height etc of image double minimum = inputSpacing[0]; if (inputSpacing[1]SetOutputSpacing(outputSpacing); // Set the computed size itk::Size<3> outputSize = { {newWidth, newHeight, newDepth} }; resizeFilter2->SetSize(outputSize); // Specify the input for the resamplers resizeFilter2->SetInput(image); ImageType::Pointer imageNew = resizeFilter2->GetOutput(); const typename ImageType::RegionType& outputRegion = imageNew->GetLargestPossibleRegion(); const typename ImageType::SizeType& outputSize2 = outputRegion.GetSize(); ________________________________ De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community -- Samuel Gerber R&D Engineer Kitware, Inc. ________________________________ De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Fri Sep 8 09:32:13 2017 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 8 Sep 2017 09:32:13 -0400 Subject: [ITK-dev] [ITK] problems itk resample filter In-Reply-To: References: Message-ID: Hi Elli, The OutputOrigin and OutputDirection may need to be set so the sampling grids overlap. HTH, Matt On Fri, Sep 8, 2017 at 9:13 AM, Pfaehler, EAG (ngmb) wrote: > Thanks, I did this. Now I get an image, with the desired size, but there all > image values are 0. I get the same when I use linear interpolation? > > Does someone know, what could be the reason? > > > > Thanks in advance, > > > > Regards > > > > Elli > > > > Van: Samuel Gerber [mailto:samuel.gerber at kitware.com] > Verzonden: vrijdag 8 september 2017 14:51 > Aan: Pfaehler, EAG (ngmb) > CC: insight-developers at itk.org > Onderwerp: Re: [ITK] [ITK-dev] problems itk resample filter > > > > I believe you might need to call resizeFilter2->Update() > > > > > > > > On Fri, Sep 8, 2017 at 8:32 AM, Pfaehler, EAG (ngmb) > wrote: > > Dear all, > > > > I would need some help to resample so that it has isotropic voxels in the > end. > > For this, I wanted to use the Nearest Neighbor Interpolator and the > ResampleFilterType. > > My code is running, but the output of the filter has always the dimensions > [0 0 0], so is not existent. > > What am I doing wrong? (see code below) > > > > Thanks in advance! > > Elli > > > > typedef itk::NearestNeighborInterpolateImageFunction > NearestNeighborInterpolatorType; > > typedef itk::ResampleImageFilter > ResampleFilterType; > > typedef itk::AffineTransform TransformType; > > //use nearest neighbor interpolation > > typename NearestNeighborInterpolatorType::Pointer > nearestNeighborInterpolator = NearestNeighborInterpolatorType::New(); > > typename ImageType::DirectionType direction; > > typename TransformType::Pointer transform = TransformType::New(); > > //transform->SetIdentity(); > > typedef itk::NearestNeighborInterpolateImageFunction > InterpolatorType; > > //typedef itk::LinearInterpolateImageFunction > InterpolatorType; > > typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); > > > > typename ResampleFilterType::Pointer resizeFilter2 = > ResampleFilterType::New(); > > resizeFilter2->SetTransform(transform); > > > > resizeFilter2->SetInterpolator( interpolator ); > > resizeFilter2->SetDefaultPixelValue(0); > > //resizeFilter2->SetInterpolator(); > > > > const typename ImageType::SpacingType& inputSpacing = image->GetSpacing(); > > //sampling > > double outputSpacing[3]; > > // Fetch original image size > > const typename ImageType::RegionType& inputRegion = > image->GetLargestPossibleRegion(); > > const typename ImageType::SizeType& inputSize = inputRegion.GetSize(); > > unsigned int oldWidth = inputSize[0]; > > unsigned int oldHeight = inputSize[1]; > > unsigned int oldDepth = inputSize[2]; > > unsigned int newWidth; > > unsigned int newHeight; > > unsigned int newDepth; > > //get the new height etc of image > > double minimum = inputSpacing[0]; > > if (inputSpacing[1] > minimum = inputSpacing[1]; > > } > > if (inputSpacing[2] < minimum){ > > minimum = inputSpacing[2]; > > } > > outputSpacing[0] = minimum; > > outputSpacing[1] = minimum; > > outputSpacing[2] = minimum; > > newWidth = (double) oldWidth * inputSpacing[0]/minimum; > > ewHeight = (double) oldHeight * inputSpacing[1]/minimum; > > newDepth = (double) oldDepth * inputSpacing[2]/minimum; > > // Set the output spacing as specified on the command line > > resizeFilter2->SetOutputSpacing(outputSpacing); > > // Set the computed size > > itk::Size<3> outputSize = { {newWidth, newHeight, newDepth} }; > > resizeFilter2->SetSize(outputSize); > > // Specify the input for the resamplers > > resizeFilter2->SetInput(image); > > ImageType::Pointer imageNew = resizeFilter2->GetOutput(); > > const typename ImageType::RegionType& outputRegion = > imageNew->GetLargestPossibleRegion(); > > const typename ImageType::SizeType& outputSize2 = > outputRegion.GetSize(); > > > > ________________________________ > > De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de > geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken > van dit bericht, het niet openbaar maken of op enige wijze verspreiden of > vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een > incomplete aankomst of vertraging van dit verzonden bericht. > > The contents of this message are confidential and only intended for the eyes > of the addressee(s). Others than the addressee(s) are not allowed to use > this message, to make it public or to distribute or multiply this message in > any way. The UMCG cannot be held responsible for incomplete reception or > delay of this transferred message. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > > > > > -- > > Samuel Gerber > R&D Engineer > Kitware, Inc. > > ________________________________ > De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de > geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken > van dit bericht, het niet openbaar maken of op enige wijze verspreiden of > vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een > incomplete aankomst of vertraging van dit verzonden bericht. > > The contents of this message are confidential and only intended for the eyes > of the addressee(s). Others than the addressee(s) are not allowed to use > this message, to make it public or to distribute or multiply this message in > any way. The UMCG cannot be held responsible for incomplete reception or > delay of this transferred message. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > From e.a.g.pfaehler at umcg.nl Fri Sep 8 15:12:30 2017 From: e.a.g.pfaehler at umcg.nl (Pfaehler, EAG (ngmb)) Date: Fri, 8 Sep 2017 19:12:30 +0000 Subject: [ITK-dev] [ITK] problems itk resample filter In-Reply-To: References: , Message-ID: Thanks Samuel and Matt for the help. However, it is unfortunatly still not working. I deleted the line resizeFilter->SetTransform, but unfortunately it did not change anything. Then I tried to set the direction and the origin. But maybe here is the problem. I set as direction the same direction as in the original image because I do not want to have any rotation. But I am a bit insecure how to set the origin. First I set the origin in the resampled image to the same as in the original image, what did not work. Then I tried different things, e.g origin[0] = origin[0] + inputSpacing[0] * (newWidth - oldWidth); origin[1] = origin[1] + inputSpacing[1] * (newHeight - oldHeight); origin[2] = origin[2] + inputSpacing[2] * (newDepth - oldDepth); where newWidth etc is the width of the new image and oldWidth of the original image. And origin[0] is the x value of the original origin etc. But this was also not working. ( In all of these cases I get an image full of zeros. If I make originalImage->Print(std::cout) I get the following: Image (000000000282A800) RTTI typeinfo: class itk::Image Reference Count: 3 Modified Time: 705 Debug: Off Object Name: Observers: none Source: (none) Source output name: (none) Release Data: Off Data Released: False Global Release Data: Off PipelineMTime: 692 UpdateMTime: 704 RealTimeStamp: 0 seconds LargestPossibleRegion: Dimension: 3 Index: [0, 0, 0] Size: [11, 11, 19] BufferedRegion: Dimension: 3 Index: [0, 0, 0] Size: [11, 11, 19] RequestedRegion: Dimension: 3 Index: [0, 0, 0] Size: [11, 11, 19] Spacing: [3.1819, 3.1819, 2] Origin: [48.5757, -171.979, 20.5] Direction: 1 0 0 0 1 0 0 0 1 IndexToPointMatrix: 3.1819 0 0 0 3.1819 0 0 0 2 PointToIndexMatrix: 0.314278 0 0 0 0.314278 0 0 0 0.5 Inverse Direction: 1 0 0 0 1 0 0 0 1 PixelContainer: ImportImageContainer (00000000027B59F0) RTTI typeinfo: class itk::ImportImageContainer Reference Count: 1 Modified Time: 701 Debug: Off Object Name: Observers: none Pointer: 00000000028542E0 Container manages memory: true Size: 2299 Capacity: 2299 If I do the same for the resampled image I get: Image (000000000282B100) RTTI typeinfo: class itk::Image Reference Count: 2 Modified Time: 11626 Debug: Off Object Name: Observers: none Source: (000000000282BB80) Source output name: Primary Release Data: Off Data Released: False Global Release Data: Off PipelineMTime: 11614 UpdateMTime: 11627 RealTimeStamp: 0 seconds LargestPossibleRegion: Dimension: 3 Index: [0, 0, 0] Size: [17, 17, 19] BufferedRegion: Dimension: 3 Index: [0, 0, 0] Size: [17, 17, 19] RequestedRegion: Dimension: 3 Index: [0, 0, 0] Size: [17, 17, 19] Spacing: [2, 2, 2] Origin: [67.6671, -152.888, 20.5] Direction: 1 0 0 0 1 0 0 0 1 IndexToPointMatrix: 2 0 0 0 2 0 0 0 2 PointToIndexMatrix: 0.5 0 0 0 0.5 0 0 0 0.5 Inverse Direction: 1 0 0 0 1 0 0 0 1 PixelContainer: ImportImageContainer (00000000027B5EC0) RTTI typeinfo: class itk::ImportImageContainer Reference Count: 1 Modified Time: 11625 Debug: Off Object Name: Observers: none Pointer: 0000000002A8D520 Container manages memory: true Size: 5491 Capacity: 5491 Does that maybe help to find out whats going wrong? Thanks in advance ________________________________________ Van: Matt McCormick [matt.mccormick at kitware.com] Verzonden: vrijdag 8 september 2017 15:32 Aan: Pfaehler, EAG (ngmb) CC: Samuel Gerber; insight-developers at itk.org Onderwerp: Re: [ITK-dev] [ITK] problems itk resample filter Hi Elli, The OutputOrigin and OutputDirection may need to be set so the sampling grids overlap. HTH, Matt On Fri, Sep 8, 2017 at 9:13 AM, Pfaehler, EAG (ngmb) wrote: > Thanks, I did this. Now I get an image, with the desired size, but there all > image values are 0. I get the same when I use linear interpolation? > > Does someone know, what could be the reason? > > > > Thanks in advance, > > > > Regards > > > > Elli > > > > Van: Samuel Gerber [mailto:samuel.gerber at kitware.com] > Verzonden: vrijdag 8 september 2017 14:51 > Aan: Pfaehler, EAG (ngmb) > CC: insight-developers at itk.org > Onderwerp: Re: [ITK] [ITK-dev] problems itk resample filter > > > > I believe you might need to call resizeFilter2->Update() > > > > > > > > On Fri, Sep 8, 2017 at 8:32 AM, Pfaehler, EAG (ngmb) > wrote: > > Dear all, > > > > I would need some help to resample so that it has isotropic voxels in the > end. > > For this, I wanted to use the Nearest Neighbor Interpolator and the > ResampleFilterType. > > My code is running, but the output of the filter has always the dimensions > [0 0 0], so is not existent. > > What am I doing wrong? (see code below) > > > > Thanks in advance! > > Elli > > > > typedef itk::NearestNeighborInterpolateImageFunction > NearestNeighborInterpolatorType; > > typedef itk::ResampleImageFilter > ResampleFilterType; > > typedef itk::AffineTransform TransformType; > > //use nearest neighbor interpolation > > typename NearestNeighborInterpolatorType::Pointer > nearestNeighborInterpolator = NearestNeighborInterpolatorType::New(); > > typename ImageType::DirectionType direction; > > typename TransformType::Pointer transform = TransformType::New(); > > //transform->SetIdentity(); > > typedef itk::NearestNeighborInterpolateImageFunction > InterpolatorType; > > //typedef itk::LinearInterpolateImageFunction > InterpolatorType; > > typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); > > > > typename ResampleFilterType::Pointer resizeFilter2 = > ResampleFilterType::New(); > > resizeFilter2->SetTransform(transform); > > > > resizeFilter2->SetInterpolator( interpolator ); > > resizeFilter2->SetDefaultPixelValue(0); > > //resizeFilter2->SetInterpolator(); > > > > const typename ImageType::SpacingType& inputSpacing = image->GetSpacing(); > > //sampling > > double outputSpacing[3]; > > // Fetch original image size > > const typename ImageType::RegionType& inputRegion = > image->GetLargestPossibleRegion(); > > const typename ImageType::SizeType& inputSize = inputRegion.GetSize(); > > unsigned int oldWidth = inputSize[0]; > > unsigned int oldHeight = inputSize[1]; > > unsigned int oldDepth = inputSize[2]; > > unsigned int newWidth; > > unsigned int newHeight; > > unsigned int newDepth; > > //get the new height etc of image > > double minimum = inputSpacing[0]; > > if (inputSpacing[1] > minimum = inputSpacing[1]; > > } > > if (inputSpacing[2] < minimum){ > > minimum = inputSpacing[2]; > > } > > outputSpacing[0] = minimum; > > outputSpacing[1] = minimum; > > outputSpacing[2] = minimum; > > newWidth = (double) oldWidth * inputSpacing[0]/minimum; > > ewHeight = (double) oldHeight * inputSpacing[1]/minimum; > > newDepth = (double) oldDepth * inputSpacing[2]/minimum; > > // Set the output spacing as specified on the command line > > resizeFilter2->SetOutputSpacing(outputSpacing); > > // Set the computed size > > itk::Size<3> outputSize = { {newWidth, newHeight, newDepth} }; > > resizeFilter2->SetSize(outputSize); > > // Specify the input for the resamplers > > resizeFilter2->SetInput(image); > > ImageType::Pointer imageNew = resizeFilter2->GetOutput(); > > const typename ImageType::RegionType& outputRegion = > imageNew->GetLargestPossibleRegion(); > > const typename ImageType::SizeType& outputSize2 = > outputRegion.GetSize(); > > > > ________________________________ > > De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de > geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken > van dit bericht, het niet openbaar maken of op enige wijze verspreiden of > vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een > incomplete aankomst of vertraging van dit verzonden bericht. > > The contents of this message are confidential and only intended for the eyes > of the addressee(s). Others than the addressee(s) are not allowed to use > this message, to make it public or to distribute or multiply this message in > any way. The UMCG cannot be held responsible for incomplete reception or > delay of this transferred message. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > > > > > -- > > Samuel Gerber > R&D Engineer > Kitware, Inc. > > ________________________________ > De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de > geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken > van dit bericht, het niet openbaar maken of op enige wijze verspreiden of > vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een > incomplete aankomst of vertraging van dit verzonden bericht. > > The contents of this message are confidential and only intended for the eyes > of the addressee(s). Others than the addressee(s) are not allowed to use > this message, to make it public or to distribute or multiply this message in > any way. The UMCG cannot be held responsible for incomplete reception or > delay of this transferred message. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > ________________________________ De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message. From matt.mccormick at kitware.com Fri Sep 8 15:27:16 2017 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 8 Sep 2017 15:27:16 -0400 Subject: [ITK-dev] [ITK] problems itk resample filter In-Reply-To: References: Message-ID: Hi, The Origin should be the same in the resampled image. HTH, Matt On Fri, Sep 8, 2017 at 3:12 PM, Pfaehler, EAG (ngmb) wrote: > Thanks Samuel and Matt for the help. However, it is unfortunatly still not working. > > I deleted the line resizeFilter->SetTransform, but unfortunately it did not change anything. > > Then I tried to set the direction and the origin. But maybe here is the problem. I set as direction the same direction as in the original image because I do not want to have any rotation. > > But I am a bit insecure how to set the origin. First I set the origin in the resampled image to the same as in the original image, what did not work. > Then I tried different things, e.g > > origin[0] = origin[0] + inputSpacing[0] * (newWidth - oldWidth); > origin[1] = origin[1] + inputSpacing[1] * (newHeight - oldHeight); > origin[2] = origin[2] + inputSpacing[2] * (newDepth - oldDepth); > > where newWidth etc is the width of the new image and oldWidth of the original image. And origin[0] is the x value of the original origin etc. > > But this was also not working. ( In all of these cases I get an image full of zeros. > > If I make originalImage->Print(std::cout) I get the following: > > Image (000000000282A800) > RTTI typeinfo: class itk::Image > Reference Count: 3 > Modified Time: 705 > Debug: Off > Object Name: > Observers: > none > Source: (none) > Source output name: (none) > Release Data: Off > Data Released: False > Global Release Data: Off > PipelineMTime: 692 > UpdateMTime: 704 > RealTimeStamp: 0 seconds > LargestPossibleRegion: > Dimension: 3 > Index: [0, 0, 0] > Size: [11, 11, 19] > BufferedRegion: > Dimension: 3 > Index: [0, 0, 0] > Size: [11, 11, 19] > RequestedRegion: > Dimension: 3 > Index: [0, 0, 0] > Size: [11, 11, 19] > Spacing: [3.1819, 3.1819, 2] > Origin: [48.5757, -171.979, 20.5] > Direction: > 1 0 0 > 0 1 0 > 0 0 1 > > IndexToPointMatrix: > 3.1819 0 0 > 0 3.1819 0 > 0 0 2 > > PointToIndexMatrix: > 0.314278 0 0 > 0 0.314278 0 > 0 0 0.5 > > Inverse Direction: > 1 0 0 > 0 1 0 > 0 0 1 > > PixelContainer: > ImportImageContainer (00000000027B59F0) > RTTI typeinfo: class itk::ImportImageContainer > Reference Count: 1 > Modified Time: 701 > Debug: Off > Object Name: > Observers: > none > Pointer: 00000000028542E0 > Container manages memory: true > Size: 2299 > Capacity: 2299 > > If I do the same for the resampled image I get: > > Image (000000000282B100) > RTTI typeinfo: class itk::Image > Reference Count: 2 > Modified Time: 11626 > Debug: Off > Object Name: > Observers: > none > Source: (000000000282BB80) > Source output name: Primary > Release Data: Off > Data Released: False > Global Release Data: Off > PipelineMTime: 11614 > UpdateMTime: 11627 > RealTimeStamp: 0 seconds > LargestPossibleRegion: > Dimension: 3 > Index: [0, 0, 0] > Size: [17, 17, 19] > BufferedRegion: > Dimension: 3 > Index: [0, 0, 0] > Size: [17, 17, 19] > RequestedRegion: > Dimension: 3 > Index: [0, 0, 0] > Size: [17, 17, 19] > Spacing: [2, 2, 2] > Origin: [67.6671, -152.888, 20.5] > Direction: > 1 0 0 > 0 1 0 > 0 0 1 > > IndexToPointMatrix: > 2 0 0 > 0 2 0 > 0 0 2 > > PointToIndexMatrix: > 0.5 0 0 > 0 0.5 0 > 0 0 0.5 > > Inverse Direction: > 1 0 0 > 0 1 0 > 0 0 1 > > PixelContainer: > ImportImageContainer (00000000027B5EC0) > RTTI typeinfo: class itk::ImportImageContainer > Reference Count: 1 > Modified Time: 11625 > Debug: Off > Object Name: > Observers: > none > Pointer: 0000000002A8D520 > Container manages memory: true > Size: 5491 > Capacity: 5491 > > Does that maybe help to find out whats going wrong? > > Thanks in advance > > > > ________________________________________ > Van: Matt McCormick [matt.mccormick at kitware.com] > Verzonden: vrijdag 8 september 2017 15:32 > Aan: Pfaehler, EAG (ngmb) > CC: Samuel Gerber; insight-developers at itk.org > Onderwerp: Re: [ITK-dev] [ITK] problems itk resample filter > > Hi Elli, > > The OutputOrigin and OutputDirection may need to be set so the > sampling grids overlap. > > HTH, > Matt > > On Fri, Sep 8, 2017 at 9:13 AM, Pfaehler, EAG (ngmb) > wrote: >> Thanks, I did this. Now I get an image, with the desired size, but there all >> image values are 0. I get the same when I use linear interpolation? >> >> Does someone know, what could be the reason? >> >> >> >> Thanks in advance, >> >> >> >> Regards >> >> >> >> Elli >> >> >> >> Van: Samuel Gerber [mailto:samuel.gerber at kitware.com] >> Verzonden: vrijdag 8 september 2017 14:51 >> Aan: Pfaehler, EAG (ngmb) >> CC: insight-developers at itk.org >> Onderwerp: Re: [ITK] [ITK-dev] problems itk resample filter >> >> >> >> I believe you might need to call resizeFilter2->Update() >> >> >> >> >> >> >> >> On Fri, Sep 8, 2017 at 8:32 AM, Pfaehler, EAG (ngmb) >> wrote: >> >> Dear all, >> >> >> >> I would need some help to resample so that it has isotropic voxels in the >> end. >> >> For this, I wanted to use the Nearest Neighbor Interpolator and the >> ResampleFilterType. >> >> My code is running, but the output of the filter has always the dimensions >> [0 0 0], so is not existent. >> >> What am I doing wrong? (see code below) >> >> >> >> Thanks in advance! >> >> Elli >> >> >> >> typedef itk::NearestNeighborInterpolateImageFunction >> NearestNeighborInterpolatorType; >> >> typedef itk::ResampleImageFilter >> ResampleFilterType; >> >> typedef itk::AffineTransform TransformType; >> >> //use nearest neighbor interpolation >> >> typename NearestNeighborInterpolatorType::Pointer >> nearestNeighborInterpolator = NearestNeighborInterpolatorType::New(); >> >> typename ImageType::DirectionType direction; >> >> typename TransformType::Pointer transform = TransformType::New(); >> >> //transform->SetIdentity(); >> >> typedef itk::NearestNeighborInterpolateImageFunction >> InterpolatorType; >> >> //typedef itk::LinearInterpolateImageFunction >> InterpolatorType; >> >> typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); >> >> >> >> typename ResampleFilterType::Pointer resizeFilter2 = >> ResampleFilterType::New(); >> >> resizeFilter2->SetTransform(transform); >> >> >> >> resizeFilter2->SetInterpolator( interpolator ); >> >> resizeFilter2->SetDefaultPixelValue(0); >> >> //resizeFilter2->SetInterpolator(); >> >> >> >> const typename ImageType::SpacingType& inputSpacing = image->GetSpacing(); >> >> //sampling >> >> double outputSpacing[3]; >> >> // Fetch original image size >> >> const typename ImageType::RegionType& inputRegion = >> image->GetLargestPossibleRegion(); >> >> const typename ImageType::SizeType& inputSize = inputRegion.GetSize(); >> >> unsigned int oldWidth = inputSize[0]; >> >> unsigned int oldHeight = inputSize[1]; >> >> unsigned int oldDepth = inputSize[2]; >> >> unsigned int newWidth; >> >> unsigned int newHeight; >> >> unsigned int newDepth; >> >> //get the new height etc of image >> >> double minimum = inputSpacing[0]; >> >> if (inputSpacing[1]> >> minimum = inputSpacing[1]; >> >> } >> >> if (inputSpacing[2] < minimum){ >> >> minimum = inputSpacing[2]; >> >> } >> >> outputSpacing[0] = minimum; >> >> outputSpacing[1] = minimum; >> >> outputSpacing[2] = minimum; >> >> newWidth = (double) oldWidth * inputSpacing[0]/minimum; >> >> ewHeight = (double) oldHeight * inputSpacing[1]/minimum; >> >> newDepth = (double) oldDepth * inputSpacing[2]/minimum; >> >> // Set the output spacing as specified on the command line >> >> resizeFilter2->SetOutputSpacing(outputSpacing); >> >> // Set the computed size >> >> itk::Size<3> outputSize = { {newWidth, newHeight, newDepth} }; >> >> resizeFilter2->SetSize(outputSize); >> >> // Specify the input for the resamplers >> >> resizeFilter2->SetInput(image); >> >> ImageType::Pointer imageNew = resizeFilter2->GetOutput(); >> >> const typename ImageType::RegionType& outputRegion = >> imageNew->GetLargestPossibleRegion(); >> >> const typename ImageType::SizeType& outputSize2 = >> outputRegion.GetSize(); >> >> >> >> ________________________________ >> >> De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de >> geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken >> van dit bericht, het niet openbaar maken of op enige wijze verspreiden of >> vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een >> incomplete aankomst of vertraging van dit verzonden bericht. >> >> The contents of this message are confidential and only intended for the eyes >> of the addressee(s). Others than the addressee(s) are not allowed to use >> this message, to make it public or to distribute or multiply this message in >> any way. The UMCG cannot be held responsible for incomplete reception or >> delay of this transferred message. >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-developers >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> >> >> >> >> >> -- >> >> Samuel Gerber >> R&D Engineer >> Kitware, Inc. >> >> ________________________________ >> De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de >> geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken >> van dit bericht, het niet openbaar maken of op enige wijze verspreiden of >> vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een >> incomplete aankomst of vertraging van dit verzonden bericht. >> >> The contents of this message are confidential and only intended for the eyes >> of the addressee(s). Others than the addressee(s) are not allowed to use >> this message, to make it public or to distribute or multiply this message in >> any way. The UMCG cannot be held responsible for incomplete reception or >> delay of this transferred message. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-developers >> > ________________________________ > De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. > > The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message. From e.a.g.pfaehler at umcg.nl Sat Sep 9 01:49:05 2017 From: e.a.g.pfaehler at umcg.nl (Pfaehler, EAG (ngmb)) Date: Sat, 9 Sep 2017 05:49:05 +0000 Subject: [ITK-dev] [ITK] problems itk resample filter In-Reply-To: References: , Message-ID: Hey, thanks. I did this, but it did not change anything. However, I used another image (with some higher intensity values) and then I got an image with only 1s. Can it be the problem that my images have only values from 0-5? I also tried an image with only 0 and 1, but als here I get only zeros after interpolation. ________________________________________ Van: Matt McCormick [matt.mccormick at kitware.com] Verzonden: vrijdag 8 september 2017 21:27 Aan: Pfaehler, EAG (ngmb) CC: Samuel Gerber; insight-developers at itk.org Onderwerp: Re: [ITK-dev] [ITK] problems itk resample filter Hi, The Origin should be the same in the resampled image. HTH, Matt On Fri, Sep 8, 2017 at 3:12 PM, Pfaehler, EAG (ngmb) wrote: > Thanks Samuel and Matt for the help. However, it is unfortunatly still not working. > > I deleted the line resizeFilter->SetTransform, but unfortunately it did not change anything. > > Then I tried to set the direction and the origin. But maybe here is the problem. I set as direction the same direction as in the original image because I do not want to have any rotation. > > But I am a bit insecure how to set the origin. First I set the origin in the resampled image to the same as in the original image, what did not work. > Then I tried different things, e.g > > origin[0] = origin[0] + inputSpacing[0] * (newWidth - oldWidth); > origin[1] = origin[1] + inputSpacing[1] * (newHeight - oldHeight); > origin[2] = origin[2] + inputSpacing[2] * (newDepth - oldDepth); > > where newWidth etc is the width of the new image and oldWidth of the original image. And origin[0] is the x value of the original origin etc. > > But this was also not working. ( In all of these cases I get an image full of zeros. > > If I make originalImage->Print(std::cout) I get the following: > > Image (000000000282A800) > RTTI typeinfo: class itk::Image > Reference Count: 3 > Modified Time: 705 > Debug: Off > Object Name: > Observers: > none > Source: (none) > Source output name: (none) > Release Data: Off > Data Released: False > Global Release Data: Off > PipelineMTime: 692 > UpdateMTime: 704 > RealTimeStamp: 0 seconds > LargestPossibleRegion: > Dimension: 3 > Index: [0, 0, 0] > Size: [11, 11, 19] > BufferedRegion: > Dimension: 3 > Index: [0, 0, 0] > Size: [11, 11, 19] > RequestedRegion: > Dimension: 3 > Index: [0, 0, 0] > Size: [11, 11, 19] > Spacing: [3.1819, 3.1819, 2] > Origin: [48.5757, -171.979, 20.5] > Direction: > 1 0 0 > 0 1 0 > 0 0 1 > > IndexToPointMatrix: > 3.1819 0 0 > 0 3.1819 0 > 0 0 2 > > PointToIndexMatrix: > 0.314278 0 0 > 0 0.314278 0 > 0 0 0.5 > > Inverse Direction: > 1 0 0 > 0 1 0 > 0 0 1 > > PixelContainer: > ImportImageContainer (00000000027B59F0) > RTTI typeinfo: class itk::ImportImageContainer > Reference Count: 1 > Modified Time: 701 > Debug: Off > Object Name: > Observers: > none > Pointer: 00000000028542E0 > Container manages memory: true > Size: 2299 > Capacity: 2299 > > If I do the same for the resampled image I get: > > Image (000000000282B100) > RTTI typeinfo: class itk::Image > Reference Count: 2 > Modified Time: 11626 > Debug: Off > Object Name: > Observers: > none > Source: (000000000282BB80) > Source output name: Primary > Release Data: Off > Data Released: False > Global Release Data: Off > PipelineMTime: 11614 > UpdateMTime: 11627 > RealTimeStamp: 0 seconds > LargestPossibleRegion: > Dimension: 3 > Index: [0, 0, 0] > Size: [17, 17, 19] > BufferedRegion: > Dimension: 3 > Index: [0, 0, 0] > Size: [17, 17, 19] > RequestedRegion: > Dimension: 3 > Index: [0, 0, 0] > Size: [17, 17, 19] > Spacing: [2, 2, 2] > Origin: [67.6671, -152.888, 20.5] > Direction: > 1 0 0 > 0 1 0 > 0 0 1 > > IndexToPointMatrix: > 2 0 0 > 0 2 0 > 0 0 2 > > PointToIndexMatrix: > 0.5 0 0 > 0 0.5 0 > 0 0 0.5 > > Inverse Direction: > 1 0 0 > 0 1 0 > 0 0 1 > > PixelContainer: > ImportImageContainer (00000000027B5EC0) > RTTI typeinfo: class itk::ImportImageContainer > Reference Count: 1 > Modified Time: 11625 > Debug: Off > Object Name: > Observers: > none > Pointer: 0000000002A8D520 > Container manages memory: true > Size: 5491 > Capacity: 5491 > > Does that maybe help to find out whats going wrong? > > Thanks in advance > > > > ________________________________________ > Van: Matt McCormick [matt.mccormick at kitware.com] > Verzonden: vrijdag 8 september 2017 15:32 > Aan: Pfaehler, EAG (ngmb) > CC: Samuel Gerber; insight-developers at itk.org > Onderwerp: Re: [ITK-dev] [ITK] problems itk resample filter > > Hi Elli, > > The OutputOrigin and OutputDirection may need to be set so the > sampling grids overlap. > > HTH, > Matt > > On Fri, Sep 8, 2017 at 9:13 AM, Pfaehler, EAG (ngmb) > wrote: >> Thanks, I did this. Now I get an image, with the desired size, but there all >> image values are 0. I get the same when I use linear interpolation? >> >> Does someone know, what could be the reason? >> >> >> >> Thanks in advance, >> >> >> >> Regards >> >> >> >> Elli >> >> >> >> Van: Samuel Gerber [mailto:samuel.gerber at kitware.com] >> Verzonden: vrijdag 8 september 2017 14:51 >> Aan: Pfaehler, EAG (ngmb) >> CC: insight-developers at itk.org >> Onderwerp: Re: [ITK] [ITK-dev] problems itk resample filter >> >> >> >> I believe you might need to call resizeFilter2->Update() >> >> >> >> >> >> >> >> On Fri, Sep 8, 2017 at 8:32 AM, Pfaehler, EAG (ngmb) >> wrote: >> >> Dear all, >> >> >> >> I would need some help to resample so that it has isotropic voxels in the >> end. >> >> For this, I wanted to use the Nearest Neighbor Interpolator and the >> ResampleFilterType. >> >> My code is running, but the output of the filter has always the dimensions >> [0 0 0], so is not existent. >> >> What am I doing wrong? (see code below) >> >> >> >> Thanks in advance! >> >> Elli >> >> >> >> typedef itk::NearestNeighborInterpolateImageFunction >> NearestNeighborInterpolatorType; >> >> typedef itk::ResampleImageFilter >> ResampleFilterType; >> >> typedef itk::AffineTransform TransformType; >> >> //use nearest neighbor interpolation >> >> typename NearestNeighborInterpolatorType::Pointer >> nearestNeighborInterpolator = NearestNeighborInterpolatorType::New(); >> >> typename ImageType::DirectionType direction; >> >> typename TransformType::Pointer transform = TransformType::New(); >> >> //transform->SetIdentity(); >> >> typedef itk::NearestNeighborInterpolateImageFunction >> InterpolatorType; >> >> //typedef itk::LinearInterpolateImageFunction >> InterpolatorType; >> >> typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); >> >> >> >> typename ResampleFilterType::Pointer resizeFilter2 = >> ResampleFilterType::New(); >> >> resizeFilter2->SetTransform(transform); >> >> >> >> resizeFilter2->SetInterpolator( interpolator ); >> >> resizeFilter2->SetDefaultPixelValue(0); >> >> //resizeFilter2->SetInterpolator(); >> >> >> >> const typename ImageType::SpacingType& inputSpacing = image->GetSpacing(); >> >> //sampling >> >> double outputSpacing[3]; >> >> // Fetch original image size >> >> const typename ImageType::RegionType& inputRegion = >> image->GetLargestPossibleRegion(); >> >> const typename ImageType::SizeType& inputSize = inputRegion.GetSize(); >> >> unsigned int oldWidth = inputSize[0]; >> >> unsigned int oldHeight = inputSize[1]; >> >> unsigned int oldDepth = inputSize[2]; >> >> unsigned int newWidth; >> >> unsigned int newHeight; >> >> unsigned int newDepth; >> >> //get the new height etc of image >> >> double minimum = inputSpacing[0]; >> >> if (inputSpacing[1]> >> minimum = inputSpacing[1]; >> >> } >> >> if (inputSpacing[2] < minimum){ >> >> minimum = inputSpacing[2]; >> >> } >> >> outputSpacing[0] = minimum; >> >> outputSpacing[1] = minimum; >> >> outputSpacing[2] = minimum; >> >> newWidth = (double) oldWidth * inputSpacing[0]/minimum; >> >> ewHeight = (double) oldHeight * inputSpacing[1]/minimum; >> >> newDepth = (double) oldDepth * inputSpacing[2]/minimum; >> >> // Set the output spacing as specified on the command line >> >> resizeFilter2->SetOutputSpacing(outputSpacing); >> >> // Set the computed size >> >> itk::Size<3> outputSize = { {newWidth, newHeight, newDepth} }; >> >> resizeFilter2->SetSize(outputSize); >> >> // Specify the input for the resamplers >> >> resizeFilter2->SetInput(image); >> >> ImageType::Pointer imageNew = resizeFilter2->GetOutput(); >> >> const typename ImageType::RegionType& outputRegion = >> imageNew->GetLargestPossibleRegion(); >> >> const typename ImageType::SizeType& outputSize2 = >> outputRegion.GetSize(); >> >> >> >> ________________________________ >> >> De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de >> geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken >> van dit bericht, het niet openbaar maken of op enige wijze verspreiden of >> vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een >> incomplete aankomst of vertraging van dit verzonden bericht. >> >> The contents of this message are confidential and only intended for the eyes >> of the addressee(s). Others than the addressee(s) are not allowed to use >> this message, to make it public or to distribute or multiply this message in >> any way. The UMCG cannot be held responsible for incomplete reception or >> delay of this transferred message. >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-developers >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> >> >> >> >> >> -- >> >> Samuel Gerber >> R&D Engineer >> Kitware, Inc. >> >> ________________________________ >> De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de >> geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken >> van dit bericht, het niet openbaar maken of op enige wijze verspreiden of >> vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een >> incomplete aankomst of vertraging van dit verzonden bericht. >> >> The contents of this message are confidential and only intended for the eyes >> of the addressee(s). Others than the addressee(s) are not allowed to use >> this message, to make it public or to distribute or multiply this message in >> any way. The UMCG cannot be held responsible for incomplete reception or >> delay of this transferred message. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-developers >> > ________________________________ > De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. > > The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message. ________________________________ De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message. From matt.mccormick at kitware.com Mon Sep 11 14:23:13 2017 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 11 Sep 2017 14:23:13 -0400 Subject: [ITK-dev] [ITK] problems itk resample filter In-Reply-To: References: Message-ID: Hi, One possible issue - make sure that the image viewer applied is displaying the correct dynamic range so it does just not appear that there are only zeros after interpolation. 3D Slicer, ITK-SNAP, etc. support this. HTH, Matt On Sat, Sep 9, 2017 at 1:49 AM, Pfaehler, EAG (ngmb) wrote: > Hey, > > thanks. I did this, but it did not change anything. However, I used another image (with some higher intensity values) and then I got an image with only 1s. > > Can it be the problem that my images have only values from 0-5? > I also tried an image with only 0 and 1, but als here I get only zeros after interpolation. > > ________________________________________ > Van: Matt McCormick [matt.mccormick at kitware.com] > Verzonden: vrijdag 8 september 2017 21:27 > Aan: Pfaehler, EAG (ngmb) > CC: Samuel Gerber; insight-developers at itk.org > Onderwerp: Re: [ITK-dev] [ITK] problems itk resample filter > > Hi, > > The Origin should be the same in the resampled image. > > HTH, > Matt > > On Fri, Sep 8, 2017 at 3:12 PM, Pfaehler, EAG (ngmb) > wrote: >> Thanks Samuel and Matt for the help. However, it is unfortunatly still not working. >> >> I deleted the line resizeFilter->SetTransform, but unfortunately it did not change anything. >> >> Then I tried to set the direction and the origin. But maybe here is the problem. I set as direction the same direction as in the original image because I do not want to have any rotation. >> >> But I am a bit insecure how to set the origin. First I set the origin in the resampled image to the same as in the original image, what did not work. >> Then I tried different things, e.g >> >> origin[0] = origin[0] + inputSpacing[0] * (newWidth - oldWidth); >> origin[1] = origin[1] + inputSpacing[1] * (newHeight - oldHeight); >> origin[2] = origin[2] + inputSpacing[2] * (newDepth - oldDepth); >> >> where newWidth etc is the width of the new image and oldWidth of the original image. And origin[0] is the x value of the original origin etc. >> >> But this was also not working. ( In all of these cases I get an image full of zeros. >> >> If I make originalImage->Print(std::cout) I get the following: >> >> Image (000000000282A800) >> RTTI typeinfo: class itk::Image >> Reference Count: 3 >> Modified Time: 705 >> Debug: Off >> Object Name: >> Observers: >> none >> Source: (none) >> Source output name: (none) >> Release Data: Off >> Data Released: False >> Global Release Data: Off >> PipelineMTime: 692 >> UpdateMTime: 704 >> RealTimeStamp: 0 seconds >> LargestPossibleRegion: >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [11, 11, 19] >> BufferedRegion: >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [11, 11, 19] >> RequestedRegion: >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [11, 11, 19] >> Spacing: [3.1819, 3.1819, 2] >> Origin: [48.5757, -171.979, 20.5] >> Direction: >> 1 0 0 >> 0 1 0 >> 0 0 1 >> >> IndexToPointMatrix: >> 3.1819 0 0 >> 0 3.1819 0 >> 0 0 2 >> >> PointToIndexMatrix: >> 0.314278 0 0 >> 0 0.314278 0 >> 0 0 0.5 >> >> Inverse Direction: >> 1 0 0 >> 0 1 0 >> 0 0 1 >> >> PixelContainer: >> ImportImageContainer (00000000027B59F0) >> RTTI typeinfo: class itk::ImportImageContainer >> Reference Count: 1 >> Modified Time: 701 >> Debug: Off >> Object Name: >> Observers: >> none >> Pointer: 00000000028542E0 >> Container manages memory: true >> Size: 2299 >> Capacity: 2299 >> >> If I do the same for the resampled image I get: >> >> Image (000000000282B100) >> RTTI typeinfo: class itk::Image >> Reference Count: 2 >> Modified Time: 11626 >> Debug: Off >> Object Name: >> Observers: >> none >> Source: (000000000282BB80) >> Source output name: Primary >> Release Data: Off >> Data Released: False >> Global Release Data: Off >> PipelineMTime: 11614 >> UpdateMTime: 11627 >> RealTimeStamp: 0 seconds >> LargestPossibleRegion: >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [17, 17, 19] >> BufferedRegion: >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [17, 17, 19] >> RequestedRegion: >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [17, 17, 19] >> Spacing: [2, 2, 2] >> Origin: [67.6671, -152.888, 20.5] >> Direction: >> 1 0 0 >> 0 1 0 >> 0 0 1 >> >> IndexToPointMatrix: >> 2 0 0 >> 0 2 0 >> 0 0 2 >> >> PointToIndexMatrix: >> 0.5 0 0 >> 0 0.5 0 >> 0 0 0.5 >> >> Inverse Direction: >> 1 0 0 >> 0 1 0 >> 0 0 1 >> >> PixelContainer: >> ImportImageContainer (00000000027B5EC0) >> RTTI typeinfo: class itk::ImportImageContainer >> Reference Count: 1 >> Modified Time: 11625 >> Debug: Off >> Object Name: >> Observers: >> none >> Pointer: 0000000002A8D520 >> Container manages memory: true >> Size: 5491 >> Capacity: 5491 >> >> Does that maybe help to find out whats going wrong? >> >> Thanks in advance >> >> >> >> ________________________________________ >> Van: Matt McCormick [matt.mccormick at kitware.com] >> Verzonden: vrijdag 8 september 2017 15:32 >> Aan: Pfaehler, EAG (ngmb) >> CC: Samuel Gerber; insight-developers at itk.org >> Onderwerp: Re: [ITK-dev] [ITK] problems itk resample filter >> >> Hi Elli, >> >> The OutputOrigin and OutputDirection may need to be set so the >> sampling grids overlap. >> >> HTH, >> Matt >> >> On Fri, Sep 8, 2017 at 9:13 AM, Pfaehler, EAG (ngmb) >> wrote: >>> Thanks, I did this. Now I get an image, with the desired size, but there all >>> image values are 0. I get the same when I use linear interpolation? >>> >>> Does someone know, what could be the reason? >>> >>> >>> >>> Thanks in advance, >>> >>> >>> >>> Regards >>> >>> >>> >>> Elli >>> >>> >>> >>> Van: Samuel Gerber [mailto:samuel.gerber at kitware.com] >>> Verzonden: vrijdag 8 september 2017 14:51 >>> Aan: Pfaehler, EAG (ngmb) >>> CC: insight-developers at itk.org >>> Onderwerp: Re: [ITK] [ITK-dev] problems itk resample filter >>> >>> >>> >>> I believe you might need to call resizeFilter2->Update() >>> >>> >>> >>> >>> >>> >>> >>> On Fri, Sep 8, 2017 at 8:32 AM, Pfaehler, EAG (ngmb) >>> wrote: >>> >>> Dear all, >>> >>> >>> >>> I would need some help to resample so that it has isotropic voxels in the >>> end. >>> >>> For this, I wanted to use the Nearest Neighbor Interpolator and the >>> ResampleFilterType. >>> >>> My code is running, but the output of the filter has always the dimensions >>> [0 0 0], so is not existent. >>> >>> What am I doing wrong? (see code below) >>> >>> >>> >>> Thanks in advance! >>> >>> Elli >>> >>> >>> >>> typedef itk::NearestNeighborInterpolateImageFunction >>> NearestNeighborInterpolatorType; >>> >>> typedef itk::ResampleImageFilter >>> ResampleFilterType; >>> >>> typedef itk::AffineTransform TransformType; >>> >>> //use nearest neighbor interpolation >>> >>> typename NearestNeighborInterpolatorType::Pointer >>> nearestNeighborInterpolator = NearestNeighborInterpolatorType::New(); >>> >>> typename ImageType::DirectionType direction; >>> >>> typename TransformType::Pointer transform = TransformType::New(); >>> >>> //transform->SetIdentity(); >>> >>> typedef itk::NearestNeighborInterpolateImageFunction >>> InterpolatorType; >>> >>> //typedef itk::LinearInterpolateImageFunction >>> InterpolatorType; >>> >>> typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); >>> >>> >>> >>> typename ResampleFilterType::Pointer resizeFilter2 = >>> ResampleFilterType::New(); >>> >>> resizeFilter2->SetTransform(transform); >>> >>> >>> >>> resizeFilter2->SetInterpolator( interpolator ); >>> >>> resizeFilter2->SetDefaultPixelValue(0); >>> >>> //resizeFilter2->SetInterpolator(); >>> >>> >>> >>> const typename ImageType::SpacingType& inputSpacing = image->GetSpacing(); >>> >>> //sampling >>> >>> double outputSpacing[3]; >>> >>> // Fetch original image size >>> >>> const typename ImageType::RegionType& inputRegion = >>> image->GetLargestPossibleRegion(); >>> >>> const typename ImageType::SizeType& inputSize = inputRegion.GetSize(); >>> >>> unsigned int oldWidth = inputSize[0]; >>> >>> unsigned int oldHeight = inputSize[1]; >>> >>> unsigned int oldDepth = inputSize[2]; >>> >>> unsigned int newWidth; >>> >>> unsigned int newHeight; >>> >>> unsigned int newDepth; >>> >>> //get the new height etc of image >>> >>> double minimum = inputSpacing[0]; >>> >>> if (inputSpacing[1]>> >>> minimum = inputSpacing[1]; >>> >>> } >>> >>> if (inputSpacing[2] < minimum){ >>> >>> minimum = inputSpacing[2]; >>> >>> } >>> >>> outputSpacing[0] = minimum; >>> >>> outputSpacing[1] = minimum; >>> >>> outputSpacing[2] = minimum; >>> >>> newWidth = (double) oldWidth * inputSpacing[0]/minimum; >>> >>> ewHeight = (double) oldHeight * inputSpacing[1]/minimum; >>> >>> newDepth = (double) oldDepth * inputSpacing[2]/minimum; >>> >>> // Set the output spacing as specified on the command line >>> >>> resizeFilter2->SetOutputSpacing(outputSpacing); >>> >>> // Set the computed size >>> >>> itk::Size<3> outputSize = { {newWidth, newHeight, newDepth} }; >>> >>> resizeFilter2->SetSize(outputSize); >>> >>> // Specify the input for the resamplers >>> >>> resizeFilter2->SetInput(image); >>> >>> ImageType::Pointer imageNew = resizeFilter2->GetOutput(); >>> >>> const typename ImageType::RegionType& outputRegion = >>> imageNew->GetLargestPossibleRegion(); >>> >>> const typename ImageType::SizeType& outputSize2 = >>> outputRegion.GetSize(); >>> >>> >>> >>> ________________________________ >>> >>> De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de >>> geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken >>> van dit bericht, het niet openbaar maken of op enige wijze verspreiden of >>> vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een >>> incomplete aankomst of vertraging van dit verzonden bericht. >>> >>> The contents of this message are confidential and only intended for the eyes >>> of the addressee(s). Others than the addressee(s) are not allowed to use >>> this message, to make it public or to distribute or multiply this message in >>> any way. The UMCG cannot be held responsible for incomplete reception or >>> delay of this transferred message. >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-developers >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >>> >>> >>> >>> >>> >>> -- >>> >>> Samuel Gerber >>> R&D Engineer >>> Kitware, Inc. >>> >>> ________________________________ >>> De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de >>> geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken >>> van dit bericht, het niet openbaar maken of op enige wijze verspreiden of >>> vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een >>> incomplete aankomst of vertraging van dit verzonden bericht. >>> >>> The contents of this message are confidential and only intended for the eyes >>> of the addressee(s). Others than the addressee(s) are not allowed to use >>> this message, to make it public or to distribute or multiply this message in >>> any way. The UMCG cannot be held responsible for incomplete reception or >>> delay of this transferred message. >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-developers >>> >> ________________________________ >> De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. >> >> The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message. > ________________________________ > De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. > > The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message. From francois.budin at kitware.com Thu Sep 14 14:48:08 2017 From: francois.budin at kitware.com (Francois Budin) Date: Thu, 14 Sep 2017 14:48:08 -0400 Subject: [ITK-dev] Coding Style guide added to the ITKSoftwareGuide Message-ID: Dear ITK developers, I am happy to announce that the ITK Coding Style Guide has been added to the book 1 of the ITKSoftwareGuide as a new appendix (B). You can access the guide in the HTML version of the ITKSoftwareGuide here [1] or download the new ITKSoftwareGuide PDF here [2]. This is the result of the hard work frome by Jon Haitz Legarreta Gorro?o. This addition will be extremely useful not only to new developers but also to experimented developers. The coding style documents all the aspects of the code style: philosophy, naming conventions, error message conventions, tests, and documentation. Enjoy the read and thanks for the wonderful contribution! Francois [1] https://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch12.html#x51-188000B [2] http://www.itk.org/ItkSoftwareGuide.pdf -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Sep 14 14:54:02 2017 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 14 Sep 2017 14:54:02 -0400 Subject: [ITK-dev] Coding Style guide added to the ITKSoftwareGuide In-Reply-To: References: Message-ID: Hats off to Jon! There may be omissions or corrections to make as we migrate the content from the wiki and source tree PDF. If you find any areas for improvement, please consider submitting a patch: https://github.com/InsightSoftwareConsortium/ITKSoftwareGuide/blob/b202452cb7f9ad85f471d5acd036bb3bd79a8b18/README.md#how-to-contribute-to-the-itk-software-guide On Thu, Sep 14, 2017 at 2:48 PM, Francois Budin wrote: > Dear ITK developers, > > > I am happy to announce that the ITK Coding Style Guide has been added to the > book 1 of the ITKSoftwareGuide as a new appendix (B). You can access the > guide in the HTML version of the ITKSoftwareGuide here [1] or download the > new ITKSoftwareGuide PDF here [2]. This is the result of the hard work frome > by Jon Haitz Legarreta Gorro?o. > This addition will be extremely useful not only to new developers but also > to experimented developers. The coding style documents all the aspects of > the code style: philosophy, naming conventions, error message conventions, > tests, and documentation. > > Enjoy the read and thanks for the wonderful contribution! > Francois > > [1] > https://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch12.html#x51-188000B > [2] http://www.itk.org/ItkSoftwareGuide.pdf > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > From matt.mccormick at kitware.com Thu Sep 14 15:15:14 2017 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 14 Sep 2017 15:15:14 -0400 Subject: [ITK-dev] [ANN] ITK 4.12.2 has been released! Message-ID: On behalf of the Insight Segmentation and Registration Toolkit (ITK) Community, we are happy to announce the release of ITK 4.12.2! ITK is an open-source, cross-platform library for multidimensional image analysis. Release files can be downloaded from http://itk.org/ITK/resources/software.html. This is a patch release that fixes critical issues, regressions, documentation, and compiler support. This release includes better compatibility when building an application that includes additional NIFTI libraries and also fixes for GPGPU build support. Contributions from the 3D Slicer community improve packaging on macOS. The release also includes an update to the ITK Software Guide that adds the coding style guide among other updates and additions. The next feature release, 4.13.0, is scheduled for mid-December. Enjoy ITK! ITK changes from v4.12.1 to v4.12.2: Edwin Bennink (1): BUG: Fixed cylinder bbox, fixed and enhanced IsInside func Floris Berendsen (1): COMP: add symbol name mangling for niftilib in ITK Jean-Christophe Fillion-Robin (2): COMP: Update MINC to set MACOSX_RPATH property based on CMAKE_MACOSX_RPATH COMP: Update KWsys to set MACOSX_RPATH property based on CMAKE_MACOSX_RPATH Matthew McCormick (6): BUG: Correct GPUMeanImageFilter Superclass BUG: Remove debug code from GPUMeanImageFilter BUG: Do not use static_cast, SmartPointer in GPUImage::GetGPUDataManager BUG: Remove debug code in itkGPUImage.hxx COMP: Fix AnisotropicDiffusionLBR example build ENH: Bump CMakeLists.txt version to 4.12.2 Niels Dekker (1): COMP: Fixed leak into user code ITK Software Guide changes: Jon Haitz Legarreta Gorro?o (8): DOC: Add and reference Coding Style appendix. DOC: Fix typo in Registration chapter files headers. STYLE: Replace tabs with white spaces. DOC: Fix typos in the SW guide LaTeX files. ENH: Add the link to the SW Guide PDF compilation version. DOC: Add missing wrap types to Wrapping section. STYLE: Rework the folder structure and rename files. ENH: Remove \ifitkFullVersion artifact switch. Matt McCormick (2): DOC: Add instructions on how to install the stable Python packages ENH: Bump ITK ExternalProject version to 4.12.2 From e.a.g.pfaehler at umcg.nl Fri Sep 15 03:34:13 2017 From: e.a.g.pfaehler at umcg.nl (Pfaehler, EAG (ngmb)) Date: Fri, 15 Sep 2017 07:34:13 +0000 Subject: [ITK-dev] [ITK] problems itk resample filter In-Reply-To: References: , Message-ID: Thanks a lot, that was the problem. Its working now. ________________________________________ Van: Matt McCormick [matt.mccormick at kitware.com] Verzonden: maandag 11 september 2017 20:23 Aan: Pfaehler, EAG (ngmb) CC: Samuel Gerber; insight-developers at itk.org Onderwerp: Re: [ITK-dev] [ITK] problems itk resample filter Hi, One possible issue - make sure that the image viewer applied is displaying the correct dynamic range so it does just not appear that there are only zeros after interpolation. 3D Slicer, ITK-SNAP, etc. support this. HTH, Matt On Sat, Sep 9, 2017 at 1:49 AM, Pfaehler, EAG (ngmb) wrote: > Hey, > > thanks. I did this, but it did not change anything. However, I used another image (with some higher intensity values) and then I got an image with only 1s. > > Can it be the problem that my images have only values from 0-5? > I also tried an image with only 0 and 1, but als here I get only zeros after interpolation. > > ________________________________________ > Van: Matt McCormick [matt.mccormick at kitware.com] > Verzonden: vrijdag 8 september 2017 21:27 > Aan: Pfaehler, EAG (ngmb) > CC: Samuel Gerber; insight-developers at itk.org > Onderwerp: Re: [ITK-dev] [ITK] problems itk resample filter > > Hi, > > The Origin should be the same in the resampled image. > > HTH, > Matt > > On Fri, Sep 8, 2017 at 3:12 PM, Pfaehler, EAG (ngmb) > wrote: >> Thanks Samuel and Matt for the help. However, it is unfortunatly still not working. >> >> I deleted the line resizeFilter->SetTransform, but unfortunately it did not change anything. >> >> Then I tried to set the direction and the origin. But maybe here is the problem. I set as direction the same direction as in the original image because I do not want to have any rotation. >> >> But I am a bit insecure how to set the origin. First I set the origin in the resampled image to the same as in the original image, what did not work. >> Then I tried different things, e.g >> >> origin[0] = origin[0] + inputSpacing[0] * (newWidth - oldWidth); >> origin[1] = origin[1] + inputSpacing[1] * (newHeight - oldHeight); >> origin[2] = origin[2] + inputSpacing[2] * (newDepth - oldDepth); >> >> where newWidth etc is the width of the new image and oldWidth of the original image. And origin[0] is the x value of the original origin etc. >> >> But this was also not working. ( In all of these cases I get an image full of zeros. >> >> If I make originalImage->Print(std::cout) I get the following: >> >> Image (000000000282A800) >> RTTI typeinfo: class itk::Image >> Reference Count: 3 >> Modified Time: 705 >> Debug: Off >> Object Name: >> Observers: >> none >> Source: (none) >> Source output name: (none) >> Release Data: Off >> Data Released: False >> Global Release Data: Off >> PipelineMTime: 692 >> UpdateMTime: 704 >> RealTimeStamp: 0 seconds >> LargestPossibleRegion: >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [11, 11, 19] >> BufferedRegion: >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [11, 11, 19] >> RequestedRegion: >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [11, 11, 19] >> Spacing: [3.1819, 3.1819, 2] >> Origin: [48.5757, -171.979, 20.5] >> Direction: >> 1 0 0 >> 0 1 0 >> 0 0 1 >> >> IndexToPointMatrix: >> 3.1819 0 0 >> 0 3.1819 0 >> 0 0 2 >> >> PointToIndexMatrix: >> 0.314278 0 0 >> 0 0.314278 0 >> 0 0 0.5 >> >> Inverse Direction: >> 1 0 0 >> 0 1 0 >> 0 0 1 >> >> PixelContainer: >> ImportImageContainer (00000000027B59F0) >> RTTI typeinfo: class itk::ImportImageContainer >> Reference Count: 1 >> Modified Time: 701 >> Debug: Off >> Object Name: >> Observers: >> none >> Pointer: 00000000028542E0 >> Container manages memory: true >> Size: 2299 >> Capacity: 2299 >> >> If I do the same for the resampled image I get: >> >> Image (000000000282B100) >> RTTI typeinfo: class itk::Image >> Reference Count: 2 >> Modified Time: 11626 >> Debug: Off >> Object Name: >> Observers: >> none >> Source: (000000000282BB80) >> Source output name: Primary >> Release Data: Off >> Data Released: False >> Global Release Data: Off >> PipelineMTime: 11614 >> UpdateMTime: 11627 >> RealTimeStamp: 0 seconds >> LargestPossibleRegion: >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [17, 17, 19] >> BufferedRegion: >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [17, 17, 19] >> RequestedRegion: >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [17, 17, 19] >> Spacing: [2, 2, 2] >> Origin: [67.6671, -152.888, 20.5] >> Direction: >> 1 0 0 >> 0 1 0 >> 0 0 1 >> >> IndexToPointMatrix: >> 2 0 0 >> 0 2 0 >> 0 0 2 >> >> PointToIndexMatrix: >> 0.5 0 0 >> 0 0.5 0 >> 0 0 0.5 >> >> Inverse Direction: >> 1 0 0 >> 0 1 0 >> 0 0 1 >> >> PixelContainer: >> ImportImageContainer (00000000027B5EC0) >> RTTI typeinfo: class itk::ImportImageContainer >> Reference Count: 1 >> Modified Time: 11625 >> Debug: Off >> Object Name: >> Observers: >> none >> Pointer: 0000000002A8D520 >> Container manages memory: true >> Size: 5491 >> Capacity: 5491 >> >> Does that maybe help to find out whats going wrong? >> >> Thanks in advance >> >> >> >> ________________________________________ >> Van: Matt McCormick [matt.mccormick at kitware.com] >> Verzonden: vrijdag 8 september 2017 15:32 >> Aan: Pfaehler, EAG (ngmb) >> CC: Samuel Gerber; insight-developers at itk.org >> Onderwerp: Re: [ITK-dev] [ITK] problems itk resample filter >> >> Hi Elli, >> >> The OutputOrigin and OutputDirection may need to be set so the >> sampling grids overlap. >> >> HTH, >> Matt >> >> On Fri, Sep 8, 2017 at 9:13 AM, Pfaehler, EAG (ngmb) >> wrote: >>> Thanks, I did this. Now I get an image, with the desired size, but there all >>> image values are 0. I get the same when I use linear interpolation? >>> >>> Does someone know, what could be the reason? >>> >>> >>> >>> Thanks in advance, >>> >>> >>> >>> Regards >>> >>> >>> >>> Elli >>> >>> >>> >>> Van: Samuel Gerber [mailto:samuel.gerber at kitware.com] >>> Verzonden: vrijdag 8 september 2017 14:51 >>> Aan: Pfaehler, EAG (ngmb) >>> CC: insight-developers at itk.org >>> Onderwerp: Re: [ITK] [ITK-dev] problems itk resample filter >>> >>> >>> >>> I believe you might need to call resizeFilter2->Update() >>> >>> >>> >>> >>> >>> >>> >>> On Fri, Sep 8, 2017 at 8:32 AM, Pfaehler, EAG (ngmb) >>> wrote: >>> >>> Dear all, >>> >>> >>> >>> I would need some help to resample so that it has isotropic voxels in the >>> end. >>> >>> For this, I wanted to use the Nearest Neighbor Interpolator and the >>> ResampleFilterType. >>> >>> My code is running, but the output of the filter has always the dimensions >>> [0 0 0], so is not existent. >>> >>> What am I doing wrong? (see code below) >>> >>> >>> >>> Thanks in advance! >>> >>> Elli >>> >>> >>> >>> typedef itk::NearestNeighborInterpolateImageFunction >>> NearestNeighborInterpolatorType; >>> >>> typedef itk::ResampleImageFilter >>> ResampleFilterType; >>> >>> typedef itk::AffineTransform TransformType; >>> >>> //use nearest neighbor interpolation >>> >>> typename NearestNeighborInterpolatorType::Pointer >>> nearestNeighborInterpolator = NearestNeighborInterpolatorType::New(); >>> >>> typename ImageType::DirectionType direction; >>> >>> typename TransformType::Pointer transform = TransformType::New(); >>> >>> //transform->SetIdentity(); >>> >>> typedef itk::NearestNeighborInterpolateImageFunction >>> InterpolatorType; >>> >>> //typedef itk::LinearInterpolateImageFunction >>> InterpolatorType; >>> >>> typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); >>> >>> >>> >>> typename ResampleFilterType::Pointer resizeFilter2 = >>> ResampleFilterType::New(); >>> >>> resizeFilter2->SetTransform(transform); >>> >>> >>> >>> resizeFilter2->SetInterpolator( interpolator ); >>> >>> resizeFilter2->SetDefaultPixelValue(0); >>> >>> //resizeFilter2->SetInterpolator(); >>> >>> >>> >>> const typename ImageType::SpacingType& inputSpacing = image->GetSpacing(); >>> >>> //sampling >>> >>> double outputSpacing[3]; >>> >>> // Fetch original image size >>> >>> const typename ImageType::RegionType& inputRegion = >>> image->GetLargestPossibleRegion(); >>> >>> const typename ImageType::SizeType& inputSize = inputRegion.GetSize(); >>> >>> unsigned int oldWidth = inputSize[0]; >>> >>> unsigned int oldHeight = inputSize[1]; >>> >>> unsigned int oldDepth = inputSize[2]; >>> >>> unsigned int newWidth; >>> >>> unsigned int newHeight; >>> >>> unsigned int newDepth; >>> >>> //get the new height etc of image >>> >>> double minimum = inputSpacing[0]; >>> >>> if (inputSpacing[1]>> >>> minimum = inputSpacing[1]; >>> >>> } >>> >>> if (inputSpacing[2] < minimum){ >>> >>> minimum = inputSpacing[2]; >>> >>> } >>> >>> outputSpacing[0] = minimum; >>> >>> outputSpacing[1] = minimum; >>> >>> outputSpacing[2] = minimum; >>> >>> newWidth = (double) oldWidth * inputSpacing[0]/minimum; >>> >>> ewHeight = (double) oldHeight * inputSpacing[1]/minimum; >>> >>> newDepth = (double) oldDepth * inputSpacing[2]/minimum; >>> >>> // Set the output spacing as specified on the command line >>> >>> resizeFilter2->SetOutputSpacing(outputSpacing); >>> >>> // Set the computed size >>> >>> itk::Size<3> outputSize = { {newWidth, newHeight, newDepth} }; >>> >>> resizeFilter2->SetSize(outputSize); >>> >>> // Specify the input for the resamplers >>> >>> resizeFilter2->SetInput(image); >>> >>> ImageType::Pointer imageNew = resizeFilter2->GetOutput(); >>> >>> const typename ImageType::RegionType& outputRegion = >>> imageNew->GetLargestPossibleRegion(); >>> >>> const typename ImageType::SizeType& outputSize2 = >>> outputRegion.GetSize(); >>> >>> >>> >>> ________________________________ >>> >>> De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de >>> geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken >>> van dit bericht, het niet openbaar maken of op enige wijze verspreiden of >>> vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een >>> incomplete aankomst of vertraging van dit verzonden bericht. >>> >>> The contents of this message are confidential and only intended for the eyes >>> of the addressee(s). Others than the addressee(s) are not allowed to use >>> this message, to make it public or to distribute or multiply this message in >>> any way. The UMCG cannot be held responsible for incomplete reception or >>> delay of this transferred message. >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-developers >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >>> >>> >>> >>> >>> >>> -- >>> >>> Samuel Gerber >>> R&D Engineer >>> Kitware, Inc. >>> >>> ________________________________ >>> De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de >>> geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken >>> van dit bericht, het niet openbaar maken of op enige wijze verspreiden of >>> vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een >>> incomplete aankomst of vertraging van dit verzonden bericht. >>> >>> The contents of this message are confidential and only intended for the eyes >>> of the addressee(s). Others than the addressee(s) are not allowed to use >>> this message, to make it public or to distribute or multiply this message in >>> any way. The UMCG cannot be held responsible for incomplete reception or >>> delay of this transferred message. >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-developers >>> >> ________________________________ >> De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. >> >> The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message. > ________________________________ > De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. > > The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message. ________________________________ De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message. From niels-xtk at xs4all.nl Fri Sep 15 10:54:13 2017 From: niels-xtk at xs4all.nl (Niels Dekker) Date: Fri, 15 Sep 2017 16:54:13 +0200 Subject: [ITK-dev] [ITK] [ANN] ITK 4.12.2 has been released! In-Reply-To: References: Message-ID: <1a4b0fa6dd288fc7f2b6188d6aabc7b2@xs4all.nl> Thank you very much, Matt! Two very small nitpicks: https://itk.org/ITK/resources/software.html still says "The current release is version 4.12.1". And the last commit at https://github.com/Kitware/ITK/tree/v4.12.2 mistakenly says: "ENH: Bump CMakeLists.txt version to 4.12.1" But it doesn't matter, as the tag itself is correctly tagging v4.12.2. And I'm very happy to see that the NIFTI fixes that I asked for are in there :-) Kind regards, Niels On 2017-09-14 21:15, Matt McCormick wrote: > On behalf of the Insight Segmentation and Registration Toolkit (ITK) > Community, we are happy to announce the release of ITK 4.12.2! > > ITK is an open-source, cross-platform library for multidimensional > image analysis. > > Release files can be downloaded from > > http://itk.org/ITK/resources/software.html. > > This is a patch release that fixes critical issues, regressions, > documentation, and compiler support. This release includes better > compatibility when building an application that includes additional > NIFTI libraries and also fixes for GPGPU build support. Contributions > from the 3D Slicer community improve packaging on macOS. > > The release also includes an update to the ITK Software Guide that > adds the coding style guide among other updates and additions. > > The next feature release, 4.13.0, is scheduled for mid-December. > > Enjoy ITK! > > > ITK changes from v4.12.1 to v4.12.2: > > Edwin Bennink (1): > BUG: Fixed cylinder bbox, fixed and enhanced IsInside func > > Floris Berendsen (1): > COMP: add symbol name mangling for niftilib in ITK > > Jean-Christophe Fillion-Robin (2): > COMP: Update MINC to set MACOSX_RPATH property based on > CMAKE_MACOSX_RPATH > COMP: Update KWsys to set MACOSX_RPATH property based on > CMAKE_MACOSX_RPATH > > Matthew McCormick (6): > BUG: Correct GPUMeanImageFilter Superclass > BUG: Remove debug code from GPUMeanImageFilter > BUG: Do not use static_cast, SmartPointer in > GPUImage::GetGPUDataManager > BUG: Remove debug code in itkGPUImage.hxx > COMP: Fix AnisotropicDiffusionLBR example build > ENH: Bump CMakeLists.txt version to 4.12.2 > > Niels Dekker (1): > COMP: Fixed leak into user code > > > ITK Software Guide changes: > > Jon Haitz Legarreta Gorro?o (8): > DOC: Add and reference Coding Style appendix. > DOC: Fix typo in Registration chapter files headers. > STYLE: Replace tabs with white spaces. > DOC: Fix typos in the SW guide LaTeX files. > ENH: Add the link to the SW Guide PDF compilation version. > DOC: Add missing wrap types to Wrapping section. > STYLE: Rework the folder structure and rename files. > ENH: Remove \ifitkFullVersion artifact switch. > > Matt McCormick (2): > DOC: Add instructions on how to install the stable Python > packages > ENH: Bump ITK ExternalProject version to 4.12.2 -- Niels Dekker Scientific programmer LKEB, Leiden University Medical Center, Netherlands From matt.mccormick at kitware.com Fri Sep 15 11:00:20 2017 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 15 Sep 2017 11:00:20 -0400 Subject: [ITK-dev] [ITK] [ANN] ITK 4.12.2 has been released! In-Reply-To: <1a4b0fa6dd288fc7f2b6188d6aabc7b2@xs4all.nl> References: <1a4b0fa6dd288fc7f2b6188d6aabc7b2@xs4all.nl> Message-ID: On Fri, Sep 15, 2017 at 10:54 AM, Niels Dekker wrote: > Thank you very much, Matt! > > Two very small nitpicks: > > https://itk.org/ITK/resources/software.html still says "The current release > is version 4.12.1". Thanks for the note. We'll correct that. > And the last commit at https://github.com/Kitware/ITK/tree/v4.12.2 > mistakenly says: "ENH: Bump CMakeLists.txt version to 4.12.1" But it doesn't > matter, as the tag itself is correctly tagging v4.12.2. Yes, the commit message is wrong, but the tag is correct. I also moved the previous v4.12.1 tag so it points to the correct commit. > And I'm very happy to see that the NIFTI fixes that I asked for are in there > :-) Thanks again for the contribution, and sorry we did not get it in the first time around. From jhlegarreta at vicomtech.org Sat Sep 16 04:14:49 2017 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Sat, 16 Sep 2017 10:14:49 +0200 Subject: [ITK-dev] Coding Style guide added to the ITKSoftwareGuide In-Reply-To: References: Message-ID: Thanks for the release ! The addition was based on previous work by the community, and it's been the result of the review process where many developers have taken part. Hope developers find it useful, and find answers to the style questions they may have when contributing to ITK. Best, JON HAITZ -- On 14 September 2017 at 20:54, Matt McCormick wrote: > Hats off to Jon! > > There may be omissions or corrections to make as we migrate the > content from the wiki and source tree PDF. If you find any areas for > improvement, please consider submitting a patch: > > https://github.com/InsightSoftwareConsortium/ITKSoftwareGuide/blob/ > b202452cb7f9ad85f471d5acd036bb3bd79a8b18/README.md#how-to- > contribute-to-the-itk-software-guide > > > On Thu, Sep 14, 2017 at 2:48 PM, Francois Budin > wrote: > > Dear ITK developers, > > > > > > I am happy to announce that the ITK Coding Style Guide has been added to > the > > book 1 of the ITKSoftwareGuide as a new appendix (B). You can access the > > guide in the HTML version of the ITKSoftwareGuide here [1] or download > the > > new ITKSoftwareGuide PDF here [2]. This is the result of the hard work > frome > > by Jon Haitz Legarreta Gorro?o. > > This addition will be extremely useful not only to new developers but > also > > to experimented developers. The coding style documents all the aspects of > > the code style: philosophy, naming conventions, error message > conventions, > > tests, and documentation. > > > > Enjoy the read and thanks for the wonderful contribution! > > Francois > > > > [1] > > https://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch12. > html#x51-188000B > > [2] http://www.itk.org/ItkSoftwareGuide.pdf > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-developers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Tue Sep 19 10:57:18 2017 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 19 Sep 2017 10:57:18 -0400 Subject: [ITK-dev] Module cookiecutter template Message-ID: Hi folks, To make ITK module creation easier, we now have a cookiecutter template. To create a new external module in your current directory, run: python -m pip install cookiecutter python -m cookiecutter gh:InsightSoftwareConsortium/ITKModuleTemplate # Fill in the information requested at the prompts For more information, see: https://github.com/InsightSoftwareConsortium/ITKModuleTemplate Matt From matt.mccormick at kitware.com Thu Sep 21 17:37:44 2017 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 21 Sep 2017 17:37:44 -0400 Subject: [ITK-dev] Discourse Message-ID: Hi folks, Following requests from the community, Kitware has graciously hosted a Discourse instance for the community to try as a communication platform. Created by the people behind Stack Overflow, Discourse is a next generation, open source discussion platform that functions as a mailing list, discussion forum, and long-form chat room. Discourse is a simple, modern, and fun platform that facilitates civilized discussions. It has been adopted with great success by open source projects like 3D Slicer and the Julia Language. Please give it a try: https://discourse.itk.org/ There is a Getting Started Guide: https://discourse.itk.org/t/getting-started-with-discourse/22 And a Guide to Using Discourse as Mailing List: https://discourse.itk.org/t/using-discourse-as-a-mailing-list/32 From sean at rogue-research.com Mon Sep 25 13:40:21 2017 From: sean at rogue-research.com (Sean McBride) Date: Mon, 25 Sep 2017 13:40:21 -0400 Subject: [ITK-dev] Proper ThirdParty (GDCM specifically) update procedure? Message-ID: <20170925174021.217863588@mail.rogue-research.com> Hi all, I'm going to try to update ITK's GDCM... are there docs for this procedure? I know about the ITK/Modules/ThirdParty/GDCM/UpdateFromUpstream.sh script, but I'm wondering things like: - do I run it on the master branch, or should I first create a branch of my own? - running the script creates a branch called 'upstream-gdcm'. After the script runs, there are conflicts. After I just resolve them manually, which branch do I commit to? Thanks, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From mathieu.malaterre at gmail.com Mon Sep 25 14:19:03 2017 From: mathieu.malaterre at gmail.com (Mathieu Malaterre) Date: Mon, 25 Sep 2017 20:19:03 +0200 Subject: [ITK-dev] Proper ThirdParty (GDCM specifically) update procedure? In-Reply-To: <20170925174021.217863588@mail.rogue-research.com> References: <20170925174021.217863588@mail.rogue-research.com> Message-ID: Hi Sean, On Mon, Sep 25, 2017 at 7:40 PM, Sean McBride wrote: > Hi all, > > I'm going to try to update ITK's GDCM... are there docs for this procedure? > > I know about the ITK/Modules/ThirdParty/GDCM/UpdateFromUpstream.sh script, but I'm wondering things like: > - do I run it on the master branch, or should I first create a branch of my own? > - running the script creates a branch called 'upstream-gdcm'. After the script runs, there are conflicts. After I just resolve them manually, which branch do I commit to? Thanks for being very brave. If I have one comment: please upgrade from the release branch instead of the default master branch. I vaguely remember the script tracks git/master. Thanks, -- Mathieu From sean at rogue-research.com Mon Sep 25 14:25:00 2017 From: sean at rogue-research.com (Sean McBride) Date: Mon, 25 Sep 2017 14:25:00 -0400 Subject: [ITK-dev] Proper ThirdParty (GDCM specifically) update procedure? In-Reply-To: References: <20170925174021.217863588@mail.rogue-research.com> Message-ID: <20170925182500.772037963@mail.rogue-research.com> On Mon, 25 Sep 2017 20:19:03 +0200, Mathieu Malaterre said: >Hi Sean, > >On Mon, Sep 25, 2017 at 7:40 PM, Sean McBride wrote: >> Hi all, >> >> I'm going to try to update ITK's GDCM... are there docs for this procedure? >> >> I know about the ITK/Modules/ThirdParty/GDCM/UpdateFromUpstream.sh >script, but I'm wondering things like: >> - do I run it on the master branch, or should I first create a branch >of my own? >> - running the script creates a branch called 'upstream-gdcm'. After >the script runs, there are conflicts. After I just resolve them >manually, which branch do I commit to? > >Thanks for being very brave. :) There are about 30 conflicted files, so indeed it's going to be at least a little painful. :) That's why I want to be sure I do the git stuff right, as I don't want to have to manually unconflict dozens of files twice. >If I have one comment: please upgrade >from the release branch instead of the default master branch. I >vaguely remember the script tracks git/master. It's pointing to this currently: upstream_git_url='http://git.code.sf.net/p/gdcm/gdcm.git' upstream_git_branch='release' That correct? Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From matt.mccormick at kitware.com Mon Sep 25 16:32:53 2017 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 25 Sep 2017 16:32:53 -0400 Subject: [ITK-dev] Proper ThirdParty (GDCM specifically) update procedure? In-Reply-To: <20170925174021.217863588@mail.rogue-research.com> References: <20170925174021.217863588@mail.rogue-research.com> Message-ID: Hi Sean, Thanks for helping to update these third party libraries. > I'm going to try to update ITK's GDCM... are there docs for this procedure? Essentially, run the UpdateFromUpstream.sh script, but we should add some instructions in comments at the top of that file to address your questions. > I know about the ITK/Modules/ThirdParty/GDCM/UpdateFromUpstream.sh script, but I'm wondering things like: > - do I run it on the master branch, or should I first create a branch of my own? Yes, a local branch can be created first, like GDCMUpdate. > - running the script creates a branch called 'upstream-gdcm'. After the script runs, there are conflicts. After I just resolve them manually, which branch do I commit to? After the merge conflicts are resolved, run git add file/with/conflict git commit git gerrit-push Thanks, Matt From mathieu.malaterre at gmail.com Tue Sep 26 02:09:35 2017 From: mathieu.malaterre at gmail.com (Mathieu Malaterre) Date: Tue, 26 Sep 2017 08:09:35 +0200 Subject: [ITK-dev] Proper ThirdParty (GDCM specifically) update procedure? In-Reply-To: <20170925182500.772037963@mail.rogue-research.com> References: <20170925174021.217863588@mail.rogue-research.com> <20170925182500.772037963@mail.rogue-research.com> Message-ID: Sean, On Mon, Sep 25, 2017 at 8:25 PM, Sean McBride wrote: > On Mon, 25 Sep 2017 20:19:03 +0200, Mathieu Malaterre said: > >>Hi Sean, >> >>On Mon, Sep 25, 2017 at 7:40 PM, Sean McBride wrote: >>> Hi all, >>> >>> I'm going to try to update ITK's GDCM... are there docs for this procedure? >>> >>> I know about the ITK/Modules/ThirdParty/GDCM/UpdateFromUpstream.sh >>script, but I'm wondering things like: >>> - do I run it on the master branch, or should I first create a branch >>of my own? >>> - running the script creates a branch called 'upstream-gdcm'. After >>the script runs, there are conflicts. After I just resolve them >>manually, which branch do I commit to? >> >>Thanks for being very brave. > > :) > > There are about 30 conflicted files, so indeed it's going to be at least a little painful. :) That's why I want to be sure I do the git stuff right, as I don't want to have to manually unconflict dozens of files twice. Feel free to fwd any conflict on gdcm-dev. I tried to cherry-pick all upstream'able patches, but some needed some tweaking (were too ITK specific). >>If I have one comment: please upgrade >>from the release branch instead of the default master branch. I >>vaguely remember the script tracks git/master. > > It's pointing to this currently: > > upstream_git_url='http://git.code.sf.net/p/gdcm/gdcm.git' > upstream_git_branch='release' > > That correct? Looks correct ! Someone must have updated the script since. thanks From sean at rogue-research.com Fri Sep 29 11:39:39 2017 From: sean at rogue-research.com (Sean McBride) Date: Fri, 29 Sep 2017 11:39:39 -0400 Subject: [ITK-dev] Patches for 4.12.2 release In-Reply-To: References: Message-ID: <20170929153939.2106354230@mail.rogue-research.com> On Fri, 1 Sep 2017 14:51:01 -0400, Matt McCormick said: >Let's release 4.12.2 next week. This will be a patch release that >fixes critical issues, regressions, documentation, and compiler >support. Patches currently on the release branch are: > > *snip* > >Niels Dekker (1): > COMP: Fixed leak into user code Hi all, This change has broken compilation of my app. I use the nifti_quatern_to_mat44() API that ITK used to provide (accidentally apparently?). So now I'm looking for a solution... It's a pure function, so I could of course copy-paste it into my own app, and thus preserve exact behaviour. But that would be a shame. Could we expose it as an API in NiftiImageIO? Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From dzenanz at gmail.com Fri Sep 29 13:24:04 2017 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 29 Sep 2017 13:24:04 -0400 Subject: [ITK-dev] Patches for 4.12.2 release In-Reply-To: <20170929153939.2106354230@mail.rogue-research.com> References: <20170929153939.2106354230@mail.rogue-research.com> Message-ID: Hi Sean, I guess your use case is close to one-of-a-kind. And if we expose just one function, that makes little to no sense. Unless others have a different opinion, I think it is best if you copy-pasted it into your app. Regards, D?enan On Fri, Sep 29, 2017 at 11:39 AM, Sean McBride wrote: > On Fri, 1 Sep 2017 14:51:01 -0400, Matt McCormick said: > > >Let's release 4.12.2 next week. This will be a patch release that > >fixes critical issues, regressions, documentation, and compiler > >support. Patches currently on the release branch are: > > > > *snip* > > > >Niels Dekker (1): > > COMP: Fixed leak into user code > > Hi all, > > This change has broken compilation of my app. I use the > nifti_quatern_to_mat44() API that ITK used to provide (accidentally > apparently?). So now I'm looking for a solution... > > It's a pure function, so I could of course copy-paste it into my own app, > and thus preserve exact behaviour. But that would be a shame. > > Could we expose it as an API in NiftiImageIO? > > Cheers, > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Sep 29 13:28:36 2017 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Fri, 29 Sep 2017 17:28:36 +0000 Subject: [ITK-dev] [ITK] Patches for 4.12.2 release In-Reply-To: <20170929153939.2106354230@mail.rogue-research.com> References: <20170929153939.2106354230@mail.rogue-research.com> Message-ID: <1C12646C-C41C-4B67-9692-8FA6295E27AA@mail.nih.gov> Sean, Could you explicitly include nigti1_io.h in you code? Brad On 9/29/17, 11:40 AM, "Sean McBride" wrote: On Fri, 1 Sep 2017 14:51:01 -0400, Matt McCormick said: >Let's release 4.12.2 next week. This will be a patch release that >fixes critical issues, regressions, documentation, and compiler >support. Patches currently on the release branch are: > > *snip* > >Niels Dekker (1): > COMP: Fixed leak into user code Hi all, This change has broken compilation of my app. I use the nifti_quatern_to_mat44() API that ITK used to provide (accidentally apparently?). So now I'm looking for a solution... It's a pure function, so I could of course copy-paste it into my own app, and thus preserve exact behaviour. But that would be a shame. Could we expose it as an API in NiftiImageIO? Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community