From david.froger.ml at mailoo.org Sun Mar 1 11:11:18 2015 From: david.froger.ml at mailoo.org (David Froger) Date: Sun, 01 Mar 2015 17:11:18 +0100 Subject: [ITK] ThresholdImageFilter on VectorImage Message-ID: <20150301161118.556.50386@otis.rocq.inria.fr> Hi, Modifying the example: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/NthElementImageAdaptor like this, to apply ThresholdImageFilter instead of BinomialBlurImageFilter on a VectorImage: @@ -2,6 +2,7 @@ #include "itkImageRegionIterator.h" #include "itkNthElementImageAdaptor.h" #include "itkBinomialBlurImageFilter.h" +#include typedef itk::Image, 2> VectorImageType; @@ -19,11 +20,13 @@ adaptor->SelectNthElement(0); adaptor->SetImage(image); - - typedef itk::BinomialBlurImageFilter > BlurFilterType; - BlurFilterType::Pointer blurFilter = BlurFilterType::New(); - blurFilter->SetInput(adaptor); - blurFilter->Update(); + + typedef itk::ThresholdImageFilter ThresholderType; + typename ThresholderType::Pointer thresholder = ThresholderType::New(); + thresholder->SetInput(adaptor); + thresholder->ThresholdAbove(255); + thresholder->SetOutsideValue(255); + thresholder->Update(); yield to the segmentation fault: (gdb) run Starting program: (...)/ProcessingNthImageElement [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff67a8700 (LWP 7751)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff67a8700 (LWP 7751)] 0x00000000004299f0 in itk::NthElementPixelAccessor >::Get (this=0x7ffff67a7d1c, input=...) at (...)/include/ITK-4.8/itkNthElementPixelAccessor.h:71 71 { return static_cast( DefaultConvertPixelTraits::GetNthComponent( m_ElementNumber, input ) ); } (gdb) bt #0 0x00000000004299f0 in itk::NthElementPixelAccessor >::Get (this=0x7ffff67a7d1c, input=...) at (...)/include/ITK-4.8/itkNthElementPixelAccessor.h:71 #1 0x0000000000428b37 in itk::DefaultPixelAccessorFunctor, 2u>, itk::NthElementPixelAccessor > > >::Get (this=0x7ffff67a7d1c, input=...) at (...)/include/ITK-4.8/itkDefaultPixelAccessorFunctor.h:105 #2 0x0000000000427223 in itk::ImageConstIterator, 2u>, float> >::Get (this=0x7ffff67a7cc0) at (...)/include/ITK-4.8/itkImageConstIterator.h:325 #3 0x000000000042224e in itk::ThresholdImageFilter, 2u>, float> >::ThreadedGenerateData (this=0x63a6b0, outputRegionForThread=..., threadId=1) at (...)/include/ITK-4.8/itkThresholdImageFilter.hxx:165 #4 0x0000000000426d87 in itk::ImageSource, 2u>, float> >::ThreaderCallback (arg=0x63a900) at (...)/include/ITK-4.8/itkImageSource.hxx:307 #5 0x00007ffff7454017 in ?? () from (...)/lib/libITKCommon-4.8.so.1 #6 0x0000003393607e9a in start_thread (arg=0x7ffff67a8700) at pthread_create.c:308 #7 0x0000003392ef43fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #8 0x0000000000000000 in ?? () Is there any way to apply ThresholdImageFilter on a VectorImage? Thanks, David From blowekamp at mail.nih.gov Mon Mar 2 10:19:50 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 2 Mar 2015 10:19:50 -0500 Subject: [ITK] ThresholdImageFilter on VectorImage In-Reply-To: <20150301161118.556.50386@otis.rocq.inria.fr> References: <20150301161118.556.50386@otis.rocq.inria.fr> Message-ID: <149D7733-C934-4779-9BE0-BE9083EA07CD@mail.nih.gov> Hello David, OK, you are using an Image of CovarientVectors not a VectorImage. There are different types and beats :) Confusing, I know. My first guess here it that there is a problem with the output type of the threshold ImageFilter: template< typename TImage > class ThresholdImageFilter:public InPlaceImageFilter< TImage, TImage > What to note here it that output type is the same as the input. That is the output is also an Adaptor image. You are not running the filter "inplace". Therefore the output is a new vector image, but there is an adaptor so only one component is being set. What are you expecting in the output? What are you trying to do? Thanks, Brad On Mar 1, 2015, at 11:11 AM, David Froger wrote: > Hi, > > Modifying the example: > http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/NthElementImageAdaptor > > like this, to apply ThresholdImageFilter instead of BinomialBlurImageFilter > on a VectorImage: > > @@ -2,6 +2,7 @@ > #include "itkImageRegionIterator.h" > #include "itkNthElementImageAdaptor.h" > #include "itkBinomialBlurImageFilter.h" > +#include > > typedef itk::Image, 2> VectorImageType; > > @@ -19,11 +20,13 @@ > > adaptor->SelectNthElement(0); > adaptor->SetImage(image); > - > - typedef itk::BinomialBlurImageFilter > BlurFilterType; > - BlurFilterType::Pointer blurFilter = BlurFilterType::New(); > - blurFilter->SetInput(adaptor); > - blurFilter->Update(); > + > + typedef itk::ThresholdImageFilter ThresholderType; > + typename ThresholderType::Pointer thresholder = ThresholderType::New(); > + thresholder->SetInput(adaptor); > + thresholder->ThresholdAbove(255); > + thresholder->SetOutsideValue(255); > + thresholder->Update(); > > yield to the segmentation fault: > > (gdb) run > Starting program: (...)/ProcessingNthImageElement > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". > [New Thread 0x7ffff67a8700 (LWP 7751)] > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0x7ffff67a8700 (LWP 7751)] > 0x00000000004299f0 in itk::NthElementPixelAccessor >::Get (this=0x7ffff67a7d1c, input=...) > at (...)/include/ITK-4.8/itkNthElementPixelAccessor.h:71 > 71 { return static_cast( DefaultConvertPixelTraits::GetNthComponent( m_ElementNumber, input ) ); } > > (gdb) bt > #0 0x00000000004299f0 in itk::NthElementPixelAccessor >::Get (this=0x7ffff67a7d1c, input=...) at (...)/include/ITK-4.8/itkNthElementPixelAccessor.h:71 > #1 0x0000000000428b37 in itk::DefaultPixelAccessorFunctor, 2u>, itk::NthElementPixelAccessor > > >::Get (this=0x7ffff67a7d1c, input=...) at (...)/include/ITK-4.8/itkDefaultPixelAccessorFunctor.h:105 > #2 0x0000000000427223 in itk::ImageConstIterator, 2u>, float> >::Get (this=0x7ffff67a7cc0) at (...)/include/ITK-4.8/itkImageConstIterator.h:325 > #3 0x000000000042224e in itk::ThresholdImageFilter, 2u>, float> >::ThreadedGenerateData (this=0x63a6b0, outputRegionForThread=..., threadId=1) at (...)/include/ITK-4.8/itkThresholdImageFilter.hxx:165 > #4 0x0000000000426d87 in itk::ImageSource, 2u>, float> >::ThreaderCallback (arg=0x63a900) at (...)/include/ITK-4.8/itkImageSource.hxx:307 > #5 0x00007ffff7454017 in ?? () from (...)/lib/libITKCommon-4.8.so.1 > #6 0x0000003393607e9a in start_thread (arg=0x7ffff67a8700) at pthread_create.c:308 > #7 0x0000003392ef43fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 > #8 0x0000000000000000 in ?? () > > > Is there any way to apply ThresholdImageFilter on a VectorImage? > > Thanks, > David > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From maudette at odu.edu Mon Mar 2 14:45:23 2015 From: maudette at odu.edu (Audette, Michel A.) Date: Mon, 2 Mar 2015 19:45:23 +0000 Subject: [ITK] [ITK-users] possible to get a closest-point map from a distance map in ITK? Message-ID: <22EC75E8215562428ACADFA35877A25A26187E3F@JANEWAY.ts.odu.edu> Dear ITK users, a student of mine would like to use the ITK implementation of distance maps in a way where the point label of the closest initial boundary is propagated throughout, i.e. a closest boundary point map. Is there something like this implemented already in ITK? I would like to use something like this to produce a spatially varying distance threshold. Thanks for your kind support. Michel Michel Audette, Ph.D. Assistant Professor, Department of Modeling, Simulation and Visualization Engineering, Old Dominion University, Norfolk, VA. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From richard.beare at gmail.com Mon Mar 2 15:37:06 2015 From: richard.beare at gmail.com (Richard Beare) Date: Tue, 3 Mar 2015 07:37:06 +1100 Subject: [ITK] [ITK-users] possible to get a closest-point map from a distance map in ITK? In-Reply-To: <22EC75E8215562428ACADFA35877A25A26187E3F@JANEWAY.ts.odu.edu> References: <22EC75E8215562428ACADFA35877A25A26187E3F@JANEWAY.ts.odu.edu> Message-ID: I've written a set of label erosion and dilation filters that might do what you're after. I've also got some spatially varying morphology filters, but have't put them on the insight journal. The label erode dilate filters aren't outputing the distance map, so they aren't exactly what you want, but they use the same kind of computation internally. Thus you could use them in conjunction with the parabolic distance transforms to get labels and distances. https://github.com/richardbeare/LabelErodeDilate.git https://github.com/richardbeare/parabolicMorphology.git The insight journal article. http://hdl.handle.net/10380/3399 I can provide more details about the spatially variant stuff if it is of interest. Note that it only works with binary images, and simply weights the input image. On Tue, Mar 3, 2015 at 6:45 AM, Audette, Michel A. wrote: > Dear ITK users, > > > > a student of mine would like to use the ITK implementation of distance > maps in a way where the point label of the closest initial boundary is > propagated throughout, i.e. a closest boundary point map. Is there > something like this implemented already in ITK? I would like to use > something like this to produce a spatially varying distance threshold. > > > > Thanks for your kind support. > > > > Michel > > > Michel Audette, Ph.D. > Assistant Professor, > Department of Modeling, Simulation and Visualization Engineering, > Old Dominion University, > Norfolk, VA. > > _____________________________________ > 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://www.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-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From 88.vikram at gmail.com Tue Mar 3 02:19:40 2015 From: 88.vikram at gmail.com (Vikram Venkatraghavan) Date: Tue, 3 Mar 2015 12:49:40 +0530 Subject: [ITK] [ITK-users] Reading a very large image Message-ID: Hello, I am relatively new to ITK. I am trying to read a very large TIFF image using the IO streaming functionality in ITK. I am reading a very small portion of the image and I still end up getting memory allocation error. I get the feeling, the code is trying to read the entire image at once, even after specifying the region to read. Can someone please tell what is wrong the following code snippet ? typedef itk::RGBPixel< unsigned char > RGBPixelType; typedef itk::Image< RGBPixelType, 2 > RGB2DImageType; typedef itk::ImageFileReader RGBReaderType; itk::TIFFImageIO::Pointer tiffIO = itk::TIFFImageIO::New(); tiffIO->SetPixelType(itk::ImageIOBase::RGBA); RGB2DImageType::SizeType sz; RGB2DImageType::IndexType idx; sz[0]=128; sz[1]=128; idx[0]=0; idx[1]=0; itk::ImageIORegion region(2); region.SetSize(0,sz[0]); region.SetSize(1,sz[1]); region.SetIndex(0,idx[0]); region.SetIndex(1,idx[1]); tiffIO->SetIORegion(region); RGBReaderType::Pointer reader = RGBReaderType::New(); reader->SetFileName("V:\\TiFF_Image.tiff"); reader->SetImageIO(tiffIO); reader->SetUseStreaming(1); reader->Update(); Thanks in advance. Regards, Vikram -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From lluna.nova at gmail.com Tue Mar 3 04:35:14 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Tue, 3 Mar 2015 10:35:14 +0100 Subject: [ITK] [ITK-users] Reading a very large image In-Reply-To: References: Message-ID: Hello Vikram, I followed the same road a few months ago, read the kind and insightful answer of Bradley here: http://public.kitware.com/pipermail/community/2014-November/007678.html tl; dr @Bradley is working on streaming the tiff reader, but it isn't ready yet (right? I apologize for not having had the time to test it). So indeed, your reader is reading the whole image. Try using mha instead if possible. 2015-03-03 8:19 GMT+01:00 Vikram Venkatraghavan <88.vikram at gmail.com>: > Hello, > > I am relatively new to ITK. I am trying to read a very large TIFF image > using the IO streaming functionality in ITK. I am reading a very small > portion of the image and I still end up getting memory allocation error. I > get the feeling, the code is trying to read the entire image at once, even > after specifying the region to read. Can someone please tell what is wrong > the following code snippet ? > > typedef itk::RGBPixel< unsigned char > RGBPixelType; > typedef itk::Image< RGBPixelType, 2 > RGB2DImageType; > typedef itk::ImageFileReader RGBReaderType; > > itk::TIFFImageIO::Pointer tiffIO = itk::TIFFImageIO::New(); > tiffIO->SetPixelType(itk::ImageIOBase::RGBA); > > RGB2DImageType::SizeType sz; > RGB2DImageType::IndexType idx; > sz[0]=128; sz[1]=128; > idx[0]=0; idx[1]=0; > > itk::ImageIORegion region(2); > region.SetSize(0,sz[0]); > region.SetSize(1,sz[1]); > region.SetIndex(0,idx[0]); > region.SetIndex(1,idx[1]); > tiffIO->SetIORegion(region); > > RGBReaderType::Pointer reader = RGBReaderType::New(); > reader->SetFileName("V:\\TiFF_Image.tiff"); > reader->SetImageIO(tiffIO); > reader->SetUseStreaming(1); > reader->Update(); > > Thanks in advance. > > Regards, > Vikram > > _____________________________________ > 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://www.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-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Tue Mar 3 09:27:11 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 3 Mar 2015 09:27:11 -0500 Subject: [ITK] [ITK-users] Reading a very large image In-Reply-To: References: Message-ID: Hello Vikram, Unfortunately TIFFImageIO doesn't support streaming. So your code will try to load the whole things. Perhaps you can find a machine with a large amount of memory and convert the TIFF to a mha file to perform ITK streaming processing on? However, even if TIFFImageIO supported streaming your code would still try to read the largest possible region. The ImageIORegion::SetIORegion is not a method that really should be used for IO streaming. For reading images the ITK pipeline architecture will take care of it automatically, by only reading the requested region. For writing the SetNumberOfStreamingDivisions methods can be set to sequentially write a region, and the ImageFileWriter::SetIORegion, can be use to only update a sub-region in the output. I would strongly urge to read Section 8.3 of the new ITK Software guide[1][2], a couple of times. You need to be comfortable processing images with the LargestPossibleRegion being different than the buffered region. As well as know that just calling Update, is the same thing as calling UpdateLargestPossibleRegion Consider the following changes: 1) Remove the manual setup of the ImageIO, just let the factory take care of it. 2) Replace the Update call with: SetRequestedRegion(region) followed by PropagateRequestedRegion(). ( This will not cause memory allocation or reading. It'll just determine what the ImageIO can read). 3) Print the output, of the image reader. Noting the LargestPossibleRegion, BufferedRegion and the RequestedRegion. Hope that gets you started, Brad [1] http://www.itk.org/ITK/resources/software.html [2] http://www.amazon.com/ITK-Software-Guide-Book-Introduction/dp/1930934270/ref=sr_1_1?ie=UTF8&qid=1425392002&sr=8-1&keywords=ITK+Software Pol, Yes, I did a bit of work on the TIFFImageIO for the 4.7 ITK release, to improve performance (~3-5X) and add support for the TIFF tags in the meta-data dictionary. This took a good bit of time, and just improving the read performance was sufficient for my project, and I didn't need streaming. It would certainly be nice to add streaming, but I haven't gotten around to it. Letting me know it's important to people certainly helps prioritize :) Brad On Mar 3, 2015, at 4:35 AM, Pol Mons? Purt? wrote: > Hello Vikram, > > > I followed the same road a few months ago, read the kind and insightful answer of Bradley here: http://public.kitware.com/pipermail/community/2014-November/007678.html > > tl; dr > @Bradley is working on streaming the tiff reader, but it isn't ready yet (right? I apologize for not having had the time to test it). So indeed, your reader is reading the whole image. Try using mha instead if possible. > > > 2015-03-03 8:19 GMT+01:00 Vikram Venkatraghavan <88.vikram at gmail.com>: > Hello, > > I am relatively new to ITK. I am trying to read a very large TIFF image using the IO streaming functionality in ITK. I am reading a very small portion of the image and I still end up getting memory allocation error. I get the feeling, the code is trying to read the entire image at once, even after specifying the region to read. Can someone please tell what is wrong the following code snippet ? > > typedef itk::RGBPixel< unsigned char > RGBPixelType; > typedef itk::Image< RGBPixelType, 2 > RGB2DImageType; > typedef itk::ImageFileReader RGBReaderType; > > itk::TIFFImageIO::Pointer tiffIO = itk::TIFFImageIO::New(); > tiffIO->SetPixelType(itk::ImageIOBase::RGBA); > > RGB2DImageType::SizeType sz; > RGB2DImageType::IndexType idx; > sz[0]=128; sz[1]=128; > idx[0]=0; idx[1]=0; > > itk::ImageIORegion region(2); > region.SetSize(0,sz[0]); > region.SetSize(1,sz[1]); > region.SetIndex(0,idx[0]); > region.SetIndex(1,idx[1]); > tiffIO->SetIORegion(region); > > RGBReaderType::Pointer reader = RGBReaderType::New(); > reader->SetFileName("V:\\TiFF_Image.tiff"); > reader->SetImageIO(tiffIO); > reader->SetUseStreaming(1); > reader->Update(); > > Thanks in advance. > > Regards, > Vikram > > _____________________________________ > 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://www.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-users > > > _____________________________________ > 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://www.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-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From majcjc at gmail.com Tue Mar 3 11:23:29 2015 From: majcjc at gmail.com (Lin M) Date: Tue, 3 Mar 2015 11:23:29 -0500 Subject: [ITK] [ITK-users] find_package(ITK) and find_package(VTK) problems in CMake Message-ID: Hi guys, I met a strange problem when I try to use ITK and VTK in my projects. If I only use find_package( VTK required ) cmake will find all the right .h and .lib files and add them to the project, but if I use both find_package(ITK) and find_package(VTK), then some of the .h and .lib of VTK just disappeared in my VS projects. Does anyone have some suggestions for that? Thank you very much! My CMakeLists.txt is written as below: ... ... # QT FILES FIND_PACKAGE( Qt5Widgets ) FIND_PACKAGE( Qt5Xml ) FIND_PACKAGE( Qt5Core ) # ITK FILES FIND_PACKAGE( ITK REQUIRED ) INCLUDE( ${ITK_USE_FILE} ) # VTK FILES FIND_PACKAGE( VTK REQUIRED ) NCLUDE( ${VTK_USE_FILE} ) ... ... TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${Qt5Widgets_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5Core_LIBRARIES} ${VTK_LIBRARIES} ${ITK_LIBRARIES} ) Best, Lin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From jlg145 at pitt.edu Tue Mar 3 17:00:36 2015 From: jlg145 at pitt.edu (Grimm, Jonathan Louis) Date: Tue, 3 Mar 2015 22:00:36 +0000 Subject: [ITK] [ITK-users] Position on Image Registration and Analysis Message-ID: <1425420037101.94853@pitt.edu> The Laboratory of Ocular Biomechanics at the University of Pittsburgh is seeking candidates for a position on image analysis and soft tissue biomechanics. Although our preference is for a post-doctoral fellow, strong candidates without a PhD will be considered.? More information provided in the link. http://ocularbiomechanics.org/pdfs/PostDocAd-ITK_WithImages_27Feb.pdf -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From zeinsalah at gmail.com Wed Mar 4 05:25:52 2015 From: zeinsalah at gmail.com (Zein Salah) Date: Wed, 4 Mar 2015 11:25:52 +0100 Subject: [ITK] Filling the region inside a closed contour Message-ID: Hi, I want to fill the region surrounded by a closed contour in a 2d itk image. I have been doing this using a reverse flood-filling procedure. I am wondering is itk has a more efficient/robust mechanism for doing this. BTW, 2d-coordinates of the point on the contour are also stored in a vector if this helps. thanks, Zeno From blowekamp at mail.nih.gov Wed Mar 4 09:28:44 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 4 Mar 2015 09:28:44 -0500 Subject: [ITK] [ITK-users] Filling the region inside a closed contour In-Reply-To: References: Message-ID: Hello, The turn-key solution would the to use the BinaryFillholeImageFilter[1]. There may be a solution which uses connected components and the LabelMap framework to determine the regions separated by the contour. Then there are a variety of conditional flood fill conditional iterators that could be used [2]. Lastly if I could make the assumption that the contour didn't touch the boarder, I'd write a threaded filter which uses a scan-line iterator which would alternate between an inside and outside state based on encountering the input contour and wrote the output image accordingly. You have options. The "best" or most "efficient" or most "robust" method can only be determine with experimentation and quantification for your problem. Brad [1] http://www.itk.org/Doxygen/html/classitk_1_1BinaryFillholeImageFilter.html [2] http://www.itk.org/Doxygen/html/classitk_1_1ShapedFloodFilledFunctionConditionalConstIterator.html On Mar 4, 2015, at 5:25 AM, Zein Salah wrote: > Hi, > > I want to fill the region surrounded by a closed contour in a 2d > itk image. I have been doing this using a reverse flood-filling procedure. > I am wondering is itk has a more efficient/robust mechanism for > doing this. > > BTW, 2d-coordinates of the point on the contour are also stored in a > vector if this helps. > > thanks, > Zeno > _____________________________________ > 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://www.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-users From blowekamp at mail.nih.gov Wed Mar 4 09:30:39 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 4 Mar 2015 09:30:39 -0500 Subject: [ITK] [ITK-users] possible to get a closest-point map from a distance map in ITK? In-Reply-To: References: <22EC75E8215562428ACADFA35877A25A26187E3F@JANEWAY.ts.odu.edu> Message-ID: <564311ED-2E71-4B12-919B-C36B78084AF8@mail.nih.gov> Richard, You have some nice additional morphological filters in those repositories. I have been meaning to give them a try. Given that you have Insight Journal articles for them, have you considered making them more readily available to the community by adding and converting them into Remote modules for ITK? Brad On Mar 2, 2015, at 3:37 PM, Richard Beare wrote: > I've written a set of label erosion and dilation filters that might do what you're after. I've also got some spatially varying morphology filters, but have't put them on the insight journal. The label erode dilate filters aren't outputing the distance map, so they aren't exactly what you want, but they use the same kind of computation internally. Thus you could use them in conjunction with the parabolic distance transforms to get labels and distances. > > https://github.com/richardbeare/LabelErodeDilate.git > https://github.com/richardbeare/parabolicMorphology.git > > The insight journal article. > > http://hdl.handle.net/10380/3399 > > > I can provide more details about the spatially variant stuff if it is of interest. Note that it only works with binary images, and simply weights the input image. > > On Tue, Mar 3, 2015 at 6:45 AM, Audette, Michel A. wrote: > Dear ITK users, > > > a student of mine would like to use the ITK implementation of distance maps in a way where the point label of the closest initial boundary is propagated throughout, i.e. a closest boundary point map. Is there something like this implemented already in ITK? I would like to use something like this to produce a spatially varying distance threshold. > > > Thanks for your kind support. > > > Michel > > > Michel Audette, Ph.D. > Assistant Professor, > Department of Modeling, Simulation and Visualization Engineering, > Old Dominion University, > Norfolk, VA. > > _____________________________________ > 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://www.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-users > > > _____________________________________ > 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://www.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-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From shtuk41 at hotmail.com Wed Mar 4 09:39:33 2015 From: shtuk41 at hotmail.com (Aleksander) Date: Wed, 4 Mar 2015 08:39:33 -0600 Subject: [ITK] Adding a module manually Message-ID: Hello, I've used ITKLabelMap module for segmentation, but turned out that our current build doesn't have it. Is it possible to add ITKLabelMap to the current build manually without rebuilding ITK? Thanks,Aleksander -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Mar 4 11:17:39 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 4 Mar 2015 11:17:39 -0500 Subject: [ITK] Adding a module manually In-Reply-To: References: Message-ID: Hi Aleksander, It will be necessary to rebuild ITK with the module turned on to use it. HTH, Matt On Wed, Mar 4, 2015 at 9:39 AM, Aleksander wrote: > Hello, > > I've used ITKLabelMap module for segmentation, but turned out that our > current build doesn't have it. Is it possible to add ITKLabelMap to the > current build manually without rebuilding ITK? > > Thanks, > Aleksander > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From lchauvin at bwh.harvard.edu Wed Mar 4 14:11:15 2015 From: lchauvin at bwh.harvard.edu (Laurent Chauvin) Date: Wed, 4 Mar 2015 14:11:15 -0500 Subject: [ITK] [ITK-users] 1 DOF Optimizer Message-ID: Hello, I'm trying to develop a registration algorithm, and in order to do that, I need an optimizer but I couldn't find this kind in ITK. I need to specificy a plane, and rotate this plane around one given axis, on 360 degrees (with a step of 1 degree for example), and calculate some energy function for each step and find the minimum. 360 degrees avoid to find local minima only. Do you know if such optimizer already exists ? Thank you very much. -Laurent -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Wed Mar 4 14:21:12 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 4 Mar 2015 14:21:12 -0500 Subject: [ITK] [ITK-users] 1 DOF Optimizer In-Reply-To: References: Message-ID: <210B4188-70F4-4E95-97D1-527CC3162EC8@mail.nih.gov> Hello Laurent, You can configure the ExhaustiveOptimizer to do that [1], [2]. Brad [1] http://www.itk.org/Doxygen46/html/classitk_1_1ExhaustiveOptimizer.html [2] http://www.itk.org/Doxygen46/html/classitk_1_1ExhaustiveOptimizerv4.html On Mar 4, 2015, at 2:11 PM, Laurent Chauvin wrote: > Hello, > > I'm trying to develop a registration algorithm, and in order to do that, I need an optimizer but I couldn't find this kind in ITK. > I need to specificy a plane, and rotate this plane around one given axis, on 360 degrees (with a step of 1 degree for example), and calculate some energy function for each step and find the minimum. > 360 degrees avoid to find local minima only. > > Do you know if such optimizer already exists ? > > Thank you very much. > -Laurent > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From lchauvin at bwh.harvard.edu Wed Mar 4 14:24:45 2015 From: lchauvin at bwh.harvard.edu (Laurent Chauvin) Date: Wed, 4 Mar 2015 14:24:45 -0500 Subject: [ITK] [ITK-users] 1 DOF Optimizer In-Reply-To: <210B4188-70F4-4E95-97D1-527CC3162EC8@mail.nih.gov> References: <210B4188-70F4-4E95-97D1-527CC3162EC8@mail.nih.gov> Message-ID: Thank you Bradley, I will have a look at it. -Laurent On Wed, Mar 4, 2015 at 2:21 PM, Bradley Lowekamp wrote: > Hello Laurent, > > You can configure the ExhaustiveOptimizer to do that [1], [2]. > > Brad > > [1] http://www.itk.org/Doxygen46/html/classitk_1_1ExhaustiveOptimizer.html > [2] > http://www.itk.org/Doxygen46/html/classitk_1_1ExhaustiveOptimizerv4.html > > On Mar 4, 2015, at 2:11 PM, Laurent Chauvin > wrote: > > > Hello, > > > > I'm trying to develop a registration algorithm, and in order to do that, > I need an optimizer but I couldn't find this kind in ITK. > > I need to specificy a plane, and rotate this plane around one given > axis, on 360 degrees (with a step of 1 degree for example), and calculate > some energy function for each step and find the minimum. > > 360 degrees avoid to find local minima only. > > > > Do you know if such optimizer already exists ? > > > > Thank you very much. > > -Laurent > > _____________________________________ > > 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://www.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-users > > > > The information in this e-mail is intended only for the person to whom it > is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > > -- Laurent Chauvin, MS Surgical Navigation and Robotics Laboratory, Radiology Department Brigham And Women's Hospital, Harvard Medical School http://wiki.ncigt.org/index.php/User:Lchauvin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From tejasm at gmail.com Wed Mar 4 14:40:33 2015 From: tejasm at gmail.com (tejas9090) Date: Wed, 4 Mar 2015 12:40:33 -0700 (MST) Subject: [ITK] [ITK-users] ITK Ver 4.5 memory leak in HDF5 library Message-ID: <1425498033934-7586961.post@n2.nabble.com> Hi, Apologies if this topic has been posted before but I could not find an answer for this. I am using Visual Leak Detector with my VC++/VS2012 code which uses ITK 4.5. The output shows some memory leaks at program exit in the HDF5 library. Sample memory leak output from VLD shown below. Does anyone know if this is a genuine leak and if there is way to fix this? Thank you in advance, TJ Visual Visual Leak Detector Version 2.4RC2 installed. Outputting the report to the debugger and to C:\MyProject\Algorithm\AlgorithmBuild\Driver\memory_leak_report.txt WARNING: Visual Leak Detector detected memory leaks! ---------- Block 1035319 at 0x0069C2C0: 8 bytes ---------- Leak Hash: 0x83CD32EA, Count: 1, Total 8 bytes Call Stack (TID 296): f:\dd\vctools\crt_bld\self_x86\crt\src\dbgmalloc.c (55): MSVCR110D.dll!malloc C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5fl.c (241): (Module name unavailable)!H5FL_reg_init + 0xA bytes C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5fl.c (382): (Module name unavailable)!H5FL_reg_malloc + 0x9 bytes C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5fl.c (458): (Module name unavailable)!H5FL_reg_calloc + 0x9 bytes C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5e.c (464): (Module name unavailable)!H5E_register_class + 0xA bytes C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5e.c (238): (Module name unavailable)!H5E_init_interface + 0x16 bytes C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5e.c (147): (Module name unavailable)!H5E_init + 0x1F bytes C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5.c (170): (Module name unavailable)!H5_init_library + 0x5 bytes C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5i.c (1131): (Module name unavailable)!H5Iget_type + 0x1F bytes C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\c++\src\h5idcomponent.cpp (317): (Module name unavailable)!H5::IdComponent::p_valid_id + 0x9 bytes C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\c++\src\h5dataspace.cpp (608): (Module name unavailable)!H5::DataSpace::close + 0xC bytes C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\c++\src\h5dataspace.cpp (633): (Module name unavailable)!H5::DataSpace::~DataSpace + 0x8 bytes 0x108DE98D (File and line number not available): (Module name unavailable)!`dynamic atexit destructor for 'H5::DataSpace::ALL'' + 0xD bytes f:\dd\vctools\crt_bld\self_x86\crt\src\crtdll.c (416): (Module name unavailable)!_CRT_INIT f:\dd\vctools\crt_bld\self_x86\crt\src\crtdll.c (522): (Module name unavailable)!__DllMainCRTStartup + 0x11 bytes f:\dd\vctools\crt_bld\self_x86\crt\src\crtdll.c (472): (Module name unavailable)!_DllMainCRTStartup + 0x11 bytes 0x772999A0 (File and line number not available): ntdll.dll!RtlQueryEnvironmentVariable + 0x241 bytes 0x772BAD1E (File and line number not available): ntdll.dll!LdrRemoveLoadAsDataTable + 0x5D5 bytes 0x772A12D1 (File and line number not available): ntdll.dll!LdrUnloadDll + 0x4A bytes 0x76CF2D2C (File and line number not available): KERNELBASE.dll!FreeLibrary + 0x15 bytes C:\MyProject\Algorithm\driver\loadccmdll_w.cpp (112): Driver.exe!ATMAlgo_W::FreeDll + 0x12 bytes C:\MyProject\Algorithm\driver\loadruncc_w.cpp (28): Driver.exe!Clean C:\MyProject\Algorithm\driver\main.cpp (207): Driver.exe!main f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (536): Driver.exe!__tmainCRTStartup + 0x19 bytes f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (377): Driver.exe!mainCRTStartup 0x764A338A (File and line number not available): kernel32.dll!BaseThreadInitThunk + 0x12 bytes 0x77299F72 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x63 bytes 0x77299F45 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x36 bytes Data: C0 CA BF 10 00 00 00 00 -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-Ver-4-5-memory-leak-in-HDF5-library-tp7586961.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Wed Mar 4 14:53:18 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 4 Mar 2015 14:53:18 -0500 Subject: [ITK] [ITK-users] ITK Ver 4.5 memory leak in HDF5 library In-Reply-To: <1425498033934-7586961.post@n2.nabble.com> References: <1425498033934-7586961.post@n2.nabble.com> Message-ID: Hello, Thanks for reporting this! We don't have any HDF5 suppressions for the valgrind memory defect checking we run each night. Is there a minimal program which exhibits this behavior on Windows? Brad On Mar 4, 2015, at 2:40 PM, tejas9090 wrote: > Hi, > > Apologies if this topic has been posted before but I could not find an > answer for this. > > I am using Visual Leak Detector with my VC++/VS2012 code which uses ITK 4.5. > The output shows some memory leaks at program exit in the HDF5 library. > Sample memory leak output from VLD shown below. > > Does anyone know if this is a genuine leak and if there is way to fix this? > > Thank you in advance, > TJ > > > Visual Visual Leak Detector Version 2.4RC2 installed. > Outputting the report to the debugger and to > C:\MyProject\Algorithm\AlgorithmBuild\Driver\memory_leak_report.txt > WARNING: Visual Leak Detector detected memory leaks! > ---------- Block 1035319 at 0x0069C2C0: 8 bytes ---------- > Leak Hash: 0x83CD32EA, Count: 1, Total 8 bytes > Call Stack (TID 296): > f:\dd\vctools\crt_bld\self_x86\crt\src\dbgmalloc.c (55): > MSVCR110D.dll!malloc > C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5fl.c > (241): (Module name unavailable)!H5FL_reg_init + 0xA bytes > C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5fl.c > (382): (Module name unavailable)!H5FL_reg_malloc + 0x9 bytes > C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5fl.c > (458): (Module name unavailable)!H5FL_reg_calloc + 0x9 bytes > C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5e.c > (464): (Module name unavailable)!H5E_register_class + 0xA bytes > C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5e.c > (238): (Module name unavailable)!H5E_init_interface + 0x16 bytes > C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5e.c > (147): (Module name unavailable)!H5E_init + 0x1F bytes > C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5.c > (170): (Module name unavailable)!H5_init_library + 0x5 bytes > C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\src\h5i.c > (1131): (Module name unavailable)!H5Iget_type + 0x1F bytes > > C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\c++\src\h5idcomponent.cpp > (317): (Module name unavailable)!H5::IdComponent::p_valid_id + 0x9 bytes > > C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\c++\src\h5dataspace.cpp > (608): (Module name unavailable)!H5::DataSpace::close + 0xC bytes > > C:\MyProject\tp\itk4_5\modules\thirdparty\hdf5\src\itkhdf5\c++\src\h5dataspace.cpp > (633): (Module name unavailable)!H5::DataSpace::~DataSpace + 0x8 bytes > 0x108DE98D (File and line number not available): (Module name > unavailable)!`dynamic atexit destructor for 'H5::DataSpace::ALL'' + 0xD > bytes > f:\dd\vctools\crt_bld\self_x86\crt\src\crtdll.c (416): (Module name > unavailable)!_CRT_INIT > f:\dd\vctools\crt_bld\self_x86\crt\src\crtdll.c (522): (Module name > unavailable)!__DllMainCRTStartup + 0x11 bytes > f:\dd\vctools\crt_bld\self_x86\crt\src\crtdll.c (472): (Module name > unavailable)!_DllMainCRTStartup + 0x11 bytes > 0x772999A0 (File and line number not available): > ntdll.dll!RtlQueryEnvironmentVariable + 0x241 bytes > 0x772BAD1E (File and line number not available): > ntdll.dll!LdrRemoveLoadAsDataTable + 0x5D5 bytes > 0x772A12D1 (File and line number not available): ntdll.dll!LdrUnloadDll > + 0x4A bytes > 0x76CF2D2C (File and line number not available): > KERNELBASE.dll!FreeLibrary + 0x15 bytes > C:\MyProject\Algorithm\driver\loadccmdll_w.cpp (112): > Driver.exe!ATMAlgo_W::FreeDll + 0x12 bytes > C:\MyProject\Algorithm\driver\loadruncc_w.cpp (28): Driver.exe!Clean > C:\MyProject\Algorithm\driver\main.cpp (207): Driver.exe!main > f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (536): > Driver.exe!__tmainCRTStartup + 0x19 bytes > f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (377): > Driver.exe!mainCRTStartup > 0x764A338A (File and line number not available): > kernel32.dll!BaseThreadInitThunk + 0x12 bytes > 0x77299F72 (File and line number not available): > ntdll.dll!RtlInitializeExceptionChain + 0x63 bytes > 0x77299F45 (File and line number not available): > ntdll.dll!RtlInitializeExceptionChain + 0x36 bytes > Data: > C0 CA BF 10 00 00 00 00 > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-Ver-4-5-memory-leak-in-HDF5-library-tp7586961.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From tejasm at gmail.com Wed Mar 4 15:01:55 2015 From: tejasm at gmail.com (tejas9090) Date: Wed, 4 Mar 2015 13:01:55 -0700 (MST) Subject: [ITK] [ITK-users] ITK Ver 4.5 memory leak in HDF5 library In-Reply-To: References: <1425498033934-7586961.post@n2.nabble.com> Message-ID: <1425499315444-7586963.post@n2.nabble.com> Hello Brad, Thank you for the quick response. Unfortunately I don't have a minimal program to reproduce this leak. To be honest I am new to ITK and am using some inherited code (which tends to be quite large). When I ran this program through Visual Leak Detector, I came across a whole bunch of these leaks in the same part of the ITK code. Was hoping somebody else would have come across the same and possibly new why this might be happening. Thank you, TJ -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-Ver-4-5-memory-leak-in-HDF5-library-tp7586961p7586963.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Wed Mar 4 15:07:20 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 4 Mar 2015 15:07:20 -0500 Subject: [ITK] [ITK-users] ITK Ver 4.5 memory leak in HDF5 library In-Reply-To: <1425499315444-7586963.post@n2.nabble.com> References: <1425498033934-7586961.post@n2.nabble.com> <1425499315444-7586963.post@n2.nabble.com> Message-ID: Hi TJ, I have experienced some reported memory leaks and memory errors from the valgrind tool using ITK's HDF5 library. However, this was with some custom code outside of the ITK image IO context. As far as I could tell, though, they were false positives. HTH, Matt On Wed, Mar 4, 2015 at 3:01 PM, tejas9090 wrote: > Hello Brad, > > Thank you for the quick response. Unfortunately I don't have a minimal > program to reproduce this leak. > To be honest I am new to ITK and am using some inherited code (which tends > to be quite large). When I ran this program through Visual Leak Detector, I > came across a whole bunch of these leaks in the same part of the ITK code. > Was hoping somebody else would have come across the same and possibly new > why this might be happening. > > Thank you, > TJ > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-Ver-4-5-memory-leak-in-HDF5-library-tp7586961p7586963.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community _____________________________________ 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://www.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-users From tejasm at gmail.com Wed Mar 4 16:02:48 2015 From: tejasm at gmail.com (tejas9090) Date: Wed, 4 Mar 2015 14:02:48 -0700 (MST) Subject: [ITK] [ITK-users] ITK Ver 4.5 memory leak in HDF5 library In-Reply-To: References: <1425498033934-7586961.post@n2.nabble.com> <1425499315444-7586963.post@n2.nabble.com> Message-ID: <1425502968082-7586965.post@n2.nabble.com> Matt, thanks! -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-Ver-4-5-memory-leak-in-HDF5-library-tp7586961p7586965.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Wed Mar 4 22:44:28 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 4 Mar 2015 22:44:28 -0500 Subject: [ITK] Opportunities to share, discuss, design, and learn with other ITK community members Message-ID: There are a couple of upcoming opportunities to share, discuss, design, and learn with your fellow ITK community members. On Thursday (tomorrow), 1:00 PM Eastern USA time, there will be a Google+ Hangout where we will be doing code reviews: https://plus.google.com/events/covpn37cs306pbu11gl42gdlo5c On Friday, 11:00 AM Eastern USA time, an ITK development conference, https://plus.google.com/events/cnbf68nke70rp5ttt6plcp232n0 For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423 To get regular invites to these events, join the ITK Bar Camp G+ Community: https://plus.google.com/u/0/communities/111375098792764998322 All are welcome. Hope to talk to you then! From matt.mccormick at kitware.com Wed Mar 4 23:31:10 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 4 Mar 2015 23:31:10 -0500 Subject: [ITK] [ITK-users] find_package(ITK) and find_package(VTK) problems in CMake In-Reply-To: References: Message-ID: Hi Lin, Please try using VTK 6.2rc1 or newer. Thanks, Matt On Tue, Mar 3, 2015 at 11:23 AM, Lin M wrote: > Hi guys, > > I met a strange problem when I try to use ITK and VTK in my projects. If I > only use find_package( VTK required ) cmake will find all the right .h and > .lib files and add them to the project, but if I use both find_package(ITK) > and find_package(VTK), then some of the .h and .lib of VTK just disappeared > in my VS projects. Does anyone have some suggestions for that? Thank you > very much! > > My CMakeLists.txt is written as below: > > ... > ... > # QT FILES > FIND_PACKAGE( Qt5Widgets ) > FIND_PACKAGE( Qt5Xml ) > FIND_PACKAGE( Qt5Core ) > > # ITK FILES > FIND_PACKAGE( ITK REQUIRED ) > INCLUDE( ${ITK_USE_FILE} ) > > # VTK FILES > FIND_PACKAGE( VTK REQUIRED ) > NCLUDE( ${VTK_USE_FILE} ) > > ... > ... > TARGET_LINK_LIBRARIES( ${PROJECT_NAME} > ${Qt5Widgets_LIBRARIES} > ${Qt5Xml_LIBRARIES} > ${Qt5Core_LIBRARIES} > ${VTK_LIBRARIES} > ${ITK_LIBRARIES} > ) > > > Best, > Lin > > _____________________________________ > 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://www.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-users > _____________________________________ 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://www.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-users From david.froger.ml at mailoo.org Fri Mar 6 04:22:08 2015 From: david.froger.ml at mailoo.org (David Froger) Date: Fri, 06 Mar 2015 10:22:08 +0100 Subject: [ITK] ThresholdImageFilter on VectorImage In-Reply-To: <149D7733-C934-4779-9BE0-BE9083EA07CD@mail.nih.gov> References: <20150301161118.556.50386@otis.rocq.inria.fr> <149D7733-C934-4779-9BE0-BE9083EA07CD@mail.nih.gov> Message-ID: <20150306092208.556.12598@otis.rocq.inria.fr> Hello Bradley > On Mar 1, 2015, at 11:11 AM, David Froger wrote: > > Modifying the example: > > http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/NthElementImageAdaptor I post the wrong link, the correct one was: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement > OK, you are using an Image of CovarientVectors not a VectorImage. There are different types and beats :) Confusing, I know. You're right! > My first guess here it that there is a problem with the output type of the threshold ImageFilter: > > template< typename TImage > > class ThresholdImageFilter:public InPlaceImageFilter< TImage, TImage > > > What to note here it that output type is the same as the input. That is the output is also an Adaptor image. > > You are not running the filter "inplace". Therefore the output is a new vector image, but there is an adaptor so only one component is being set. > > What are you expecting in the output? What are you trying to do? Thanks for the explanations. What I'm trying to to: I have a VectorImage, and I want to replace all pixel compoment values that are below a value TH with the value TH. I first tried to apply ThresholdImageFilter on the VectorImage, but I seems to accept only Image: https://github.com/dfroger/issue/blob/7d8ebbb/itk/main0.cxx#L86-L87 Then I tried to loop with NthElementImageAdaptor on the VectorImage and apply ThresholdImageFilter on each VectorImage component, and then re-crete the VectorImage using ComposeImageFilter (don't work for now): https://github.com/dfroger/issue/blob/master/itk/main1.cxx Thank you, David From david.froger.ml at mailoo.org Fri Mar 6 05:52:57 2015 From: david.froger.ml at mailoo.org (David Froger) Date: Fri, 06 Mar 2015 11:52:57 +0100 Subject: [ITK] ThresholdImageFilter on VectorImage In-Reply-To: <20150306092208.556.12598@otis.rocq.inria.fr> References: <20150301161118.556.50386@otis.rocq.inria.fr> <149D7733-C934-4779-9BE0-BE9083EA07CD@mail.nih.gov> <20150306092208.556.12598@otis.rocq.inria.fr> Message-ID: <20150306105257.556.19992@otis.rocq.inria.fr> Note: this is an example with a real VectorImage that segfault (first email): https://github.com/dfroger/issue/blob/53b2b44/itk/main2.cxx Quoting David Froger (2015-03-06 10:22:08) > Hello Bradley > > > On Mar 1, 2015, at 11:11 AM, David Froger wrote: > > > Modifying the example: > > > http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/NthElementImageAdaptor > I post the wrong link, the correct one was: > http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ProcessingNthImageElement > > > OK, you are using an Image of CovarientVectors not a VectorImage. There are different types and beats :) Confusing, I know. > You're right! > > > My first guess here it that there is a problem with the output type of the threshold ImageFilter: > > > > template< typename TImage > > > class ThresholdImageFilter:public InPlaceImageFilter< TImage, TImage > > > > > What to note here it that output type is the same as the input. That is the output is also an Adaptor image. > > > > You are not running the filter "inplace". Therefore the output is a new vector image, but there is an adaptor so only one component is being set. > > > > What are you expecting in the output? What are you trying to do? > Thanks for the explanations. > > What I'm trying to to: I have a VectorImage, and I want to replace all pixel > compoment values that are below a value TH with the value TH. > > I first tried to apply ThresholdImageFilter on the VectorImage, but I seems > to accept only Image: > https://github.com/dfroger/issue/blob/7d8ebbb/itk/main0.cxx#L86-L87 > > Then I tried to loop with NthElementImageAdaptor on the VectorImage and apply > ThresholdImageFilter on each VectorImage component, and then re-crete the > VectorImage using ComposeImageFilter (don't work for now): > https://github.com/dfroger/issue/blob/master/itk/main1.cxx > > Thank you, > David > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From david.froger.ml at mailoo.org Fri Mar 6 08:13:07 2015 From: david.froger.ml at mailoo.org (David Froger) Date: Fri, 06 Mar 2015 14:13:07 +0100 Subject: [ITK] ThresholdImageFilter on VectorImage In-Reply-To: <20150306105257.556.19992@otis.rocq.inria.fr> References: <20150301161118.556.50386@otis.rocq.inria.fr> <149D7733-C934-4779-9BE0-BE9083EA07CD@mail.nih.gov> <20150306092208.556.12598@otis.rocq.inria.fr> <20150306105257.556.19992@otis.rocq.inria.fr> Message-ID: <20150306131307.556.14899@otis.rocq.inria.fr> It works using a combination of: - VectorIndexSelectionCastImageFilter - ThresholdImageFilter - ImageDuplicator - ComposeImageFilter https://github.com/dfroger/issue/blob/66a6585/itk/main3.cxx But not simple nor efficient. From blowekamp at mail.nih.gov Fri Mar 6 08:41:28 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 06 Mar 2015 08:41:28 -0500 Subject: [ITK] ThresholdImageFilter on VectorImage In-Reply-To: <20150306131307.556.14899@otis.rocq.inria.fr> References: <20150301161118.556.50386@otis.rocq.inria.fr> <149D7733-C934-4779-9BE0-BE9083EA07CD@mail.nih.gov> <20150306092208.556.12598@otis.rocq.inria.fr> <20150306105257.556.19992@otis.rocq.inria.fr> <20150306131307.556.14899@otis.rocq.inria.fr> Message-ID: David, I don't think the ImageDuplicator is needed. Otherwise I have done something very similar in SimpleITK to generically get filter to run on a per-component basis. I have thought I should write a filter called ComponentByComponentImageFilter to be similar to the SliceBySliceImageFilter. For your problem though, if you want to do something better have a look at the UnaryImageFilter[1]. This class has a Functor template parameter, which allow a custom function to be called per pixel. Here is the first example of it I see [2], and it looks perfect for your case since is already is working with variable length vectors. Brad [1] http://www.itk.org/Doxygen/html/classitk_1_1UnaryFunctorImageFilter.html [2] http://www.itk.org/Doxygen/html/WikiExamples_2ImageProcessing_2UnaryFunctorImageFilter_8cxx-example.html#_a7 On Mar 6, 2015, at 8:13 AM, David Froger wrote: > It works using a combination of: > - VectorIndexSelectionCastImageFilter > - ThresholdImageFilter > - ImageDuplicator > - ComposeImageFilter > > https://github.com/dfroger/issue/blob/66a6585/itk/main3.cxx > > But not simple nor efficient. From lassi.paavolainen at jyu.fi Mon Mar 9 06:11:55 2015 From: lassi.paavolainen at jyu.fi (Paavolainen, Lassi) Date: Mon, 9 Mar 2015 10:11:55 +0000 Subject: [ITK] [ITK-users] Memory leak in Python wrapped Image GetPixel method? Message-ID: Hi, I noticed that GetPixel method in itk.Image object eats memory in Python wrapped code. I think I've seen some Python wrapping memory issues years ago but nothing as simple as this. Here is a simple test script: import sys import itk reader = itk.ImageFileReader.IUC2.New() reader.SetFileName(sys.argv[1]) reader.Update() img = reader.GetOutput() size = img.GetLargestPossibleRegion().GetSize() for i in range(100): for x in range(size[0]): for y in range(size[1]): value = img.GetPixel((x,y)) print "Done with iteration %d"%(i+1) When I run it with 1 MB image, it end up taking 1.5 GB of memory. After spending lots of time on debugging a bigger bunch of code I realized that the GetPixel method was to blame. Can anyone reproduce it? I'm using ITK 4.6.1 Cheers, Lassi _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Mon Mar 9 14:05:09 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 9 Mar 2015 14:05:09 -0400 Subject: [ITK] New Ubuntu 14.04 Python Wrapping Nightly Message-ID: Hi, Just a note that we have a new Ubuntu 14.04 Python Wrapping Nightly: https://open.cdash.org/buildSummary.php?buildid=3723919 and it is in the All Green Club! Hurrah! Matt From matt.mccormick at kitware.com Mon Mar 9 14:22:24 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 9 Mar 2015 14:22:24 -0400 Subject: [ITK] [ITK-users] Memory leak in Python wrapped Image GetPixel method? In-Reply-To: References: Message-ID: Hi Lassi, Thanks for investigating and reporting the issue! I have created an issue in the Issue Tracker to keep track of it: https://issues.itk.org/jira/browse/ITK-3352 Matt On Mon, Mar 9, 2015 at 6:11 AM, Paavolainen, Lassi wrote: > Hi, > > I noticed that GetPixel method in itk.Image object eats memory in Python wrapped code. I think I've seen some Python wrapping memory issues years ago but nothing as simple as this. Here is a simple test script: > import sys > import itk > reader = itk.ImageFileReader.IUC2.New() > reader.SetFileName(sys.argv[1]) > reader.Update() > img = reader.GetOutput() > size = img.GetLargestPossibleRegion().GetSize() > for i in range(100): > for x in range(size[0]): > for y in range(size[1]): > value = img.GetPixel((x,y)) > print "Done with iteration %d"%(i+1) > > When I run it with 1 MB image, it end up taking 1.5 GB of memory. After spending lots of time on debugging a bigger bunch of code I realized that the GetPixel method was to blame. Can anyone reproduce it? I'm using ITK 4.6.1 > > Cheers, > Lassi > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From lassi.paavolainen at jyu.fi Mon Mar 9 15:59:26 2015 From: lassi.paavolainen at jyu.fi (Paavolainen, Lassi) Date: Mon, 9 Mar 2015 19:59:26 +0000 Subject: [ITK] [ITK-users] Memory leak in Python wrapped Image GetPixel method? In-Reply-To: References: , Message-ID: Hi Matt, Seems its an issue with local environment. Here is also for the list what I replied to Gaetan: "This is interesting. I'm using ITK 4.6.1 with swig that comes with it. I now tested with 3.20 that has been built long time ago with swig 1.9 (if I remember correctly). The same thing. So the conclusion is that it must be something local as I'm sure I've done something similar over the years many times. Next is to try to find out what on my environment causes this." To add to that, I ran 30 iterations using valgrind. Here is the report: ==8603== HEAP SUMMARY: ==8603== in use at exit: 478,066,856 bytes in 483,719 blocks ==8603== total heap usage: 657,312 allocs, 173,593 frees, 787,087,705 bytes allocated ==8603== ==8603== LEAK SUMMARY: ==8603== definitely lost: 0 bytes in 0 blocks ==8603== indirectly lost: 0 bytes in 0 blocks ==8603== possibly lost: 20,224 bytes in 34 blocks ==8603== still reachable: 478,046,632 bytes in 483,685 blocks ==8603== suppressed: 0 bytes in 0 blocks So almost 500 MB is in heap but still reachable when the program exits. Lassi ________________________________________ From: Matt McCormick [matt.mccormick at kitware.com] Sent: Monday, March 09, 2015 20:22 To: Paavolainen, Lassi Cc: insight-users at itk.org; Ga?tan Lehmann; Michka Popoff Subject: Re: [ITK-users] Memory leak in Python wrapped Image GetPixel method? Hi Lassi, Thanks for investigating and reporting the issue! I have created an issue in the Issue Tracker to keep track of it: https://issues.itk.org/jira/browse/ITK-3352 Matt On Mon, Mar 9, 2015 at 6:11 AM, Paavolainen, Lassi wrote: > Hi, > > I noticed that GetPixel method in itk.Image object eats memory in Python wrapped code. I think I've seen some Python wrapping memory issues years ago but nothing as simple as this. Here is a simple test script: > import sys > import itk > reader = itk.ImageFileReader.IUC2.New() > reader.SetFileName(sys.argv[1]) > reader.Update() > img = reader.GetOutput() > size = img.GetLargestPossibleRegion().GetSize() > for i in range(100): > for x in range(size[0]): > for y in range(size[1]): > value = img.GetPixel((x,y)) > print "Done with iteration %d"%(i+1) > > When I run it with 1 MB image, it end up taking 1.5 GB of memory. After spending lots of time on debugging a bigger bunch of code I realized that the GetPixel method was to blame. Can anyone reproduce it? I'm using ITK 4.6.1 > > Cheers, > Lassi > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From michkapopoff at gmail.com Mon Mar 9 16:29:19 2015 From: michkapopoff at gmail.com (michkapopoff at gmail.com) Date: Mon, 9 Mar 2015 21:29:19 +0100 Subject: [ITK] [ITK-dev] New Ubuntu 14.04 Python Wrapping Nightly In-Reply-To: References: Message-ID: <5F7EC631-CFCB-4BC5-9258-2CD3F54EC714@gmail.com> Thanks for the addition of the 14.04 build system. Wrappings have never been so green :) Michka > On 09 Mar 2015, at 19:05, Matt McCormick wrote: > > Hi, > > Just a note that we have a new Ubuntu 14.04 Python Wrapping Nightly: > > https://open.cdash.org/buildSummary.php?buildid=3723919 > > and it is in the All Green Club! Hurrah! > > 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 From blowekamp at mail.nih.gov Mon Mar 9 16:36:05 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 9 Mar 2015 16:36:05 -0400 Subject: [ITK] [ITK-dev] New Ubuntu 14.04 Python Wrapping Nightly In-Reply-To: <5F7EC631-CFCB-4BC5-9258-2CD3F54EC714@gmail.com> References: <5F7EC631-CFCB-4BC5-9258-2CD3F54EC714@gmail.com> Message-ID: <3A138BC1-436B-4B48-AAEC-6AD2AE709ED3@mail.nih.gov> I just changed min6 to use CMAKE_OSX_DEPLOYMENT_TARGET:PATH=10.8, so that should avoid the libc++ issue with levelsets and green it up a bit more. Like the spring season :) Brad On Mar 9, 2015, at 4:29 PM, wrote: > Thanks for the addition of the 14.04 build system. > Wrappings have never been so green :) > > Michka > >> On 09 Mar 2015, at 19:05, Matt McCormick wrote: >> >> Hi, >> >> Just a note that we have a new Ubuntu 14.04 Python Wrapping Nightly: >> >> https://open.cdash.org/buildSummary.php?buildid=3723919 >> >> and it is in the All Green Club! Hurrah! >> >> 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 From matt.mccormick at kitware.com Mon Mar 9 16:41:09 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 9 Mar 2015 16:41:09 -0400 Subject: [ITK] [ITK-dev] New Ubuntu 14.04 Python Wrapping Nightly In-Reply-To: <3A138BC1-436B-4B48-AAEC-6AD2AE709ED3@mail.nih.gov> References: <5F7EC631-CFCB-4BC5-9258-2CD3F54EC714@gmail.com> <3A138BC1-436B-4B48-AAEC-6AD2AE709ED3@mail.nih.gov> Message-ID: Excellent! Thanks! I looked into the levelsets failures on dash5 after "upgrading" to the latest XCode. It looks like I am going to have to learn how to get lldb working, since gdb is not available :-Z. Also, I found a backup image for dash5win7x64.kitware, so that system should be reporting again, soon. Matt On Mon, Mar 9, 2015 at 4:36 PM, Bradley Lowekamp wrote: > I just changed min6 to use CMAKE_OSX_DEPLOYMENT_TARGET:PATH=10.8, so that should avoid the libc++ issue with levelsets and green it up a bit more. Like the spring season :) > > Brad > > On Mar 9, 2015, at 4:29 PM, wrote: > >> Thanks for the addition of the 14.04 build system. >> Wrappings have never been so green :) >> >> Michka >> >>> On 09 Mar 2015, at 19:05, Matt McCormick wrote: >>> >>> Hi, >>> >>> Just a note that we have a new Ubuntu 14.04 Python Wrapping Nightly: >>> >>> https://open.cdash.org/buildSummary.php?buildid=3723919 >>> >>> and it is in the All Green Club! Hurrah! >>> >>> 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 > From gabrielgimenez85 at gmail.com Mon Mar 9 19:40:48 2015 From: gabrielgimenez85 at gmail.com (=?UTF-8?Q?Gabriel_A=2E_Gim=C3=A9nez?=) Date: Mon, 9 Mar 2015 16:40:48 -0700 (MST) Subject: [ITK] [ITK-users] Mattes Mutual Information Speed with 3D Images Message-ID: <1425944448336-7586972.post@n2.nabble.com> Hello everyone... I'm working on a genetic optimizer for Rigid 3D Registration. The fitness of each individual is calculated using Mattes Mutual Information, the execution time of the metric is high ... (30 seconds on average). This makes the registration too slow. Any recommendations? could improve the performance metrics?other most appropriate metric? Regards! -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Mattes-Mutual-Information-Speed-with-3D-Images-tp7586972.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From gabrielgimenez85 at gmail.com Mon Mar 9 19:02:21 2015 From: gabrielgimenez85 at gmail.com (=?UTF-8?Q?Gabriel_A=2E_Gim=C3=A9nez?=) Date: Mon, 9 Mar 2015 16:02:21 -0700 (MST) Subject: [ITK] [ITK-users] Mattes Mutual Information Speed with 3D Images Message-ID: <1425942141529-7586971.post@n2.nabble.com> Hello everyone... I'm working on a genetic optimizer for Rigid 3D Registration. The fitness of each individual is calculated using Mattes Mutual Information, the execution time of the metric is high ... (30 seconds on average). This makes the registration too slow. Any recommendations? could improve the performance metrics? otherwise most appropriate metric? Regards! -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Mattes-Mutual-Information-Speed-with-3D-Images-tp7586971.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From arnaudgelas at gmail.com Tue Mar 10 05:30:01 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Tue, 10 Mar 2015 10:30:01 +0100 Subject: [ITK] [ITK-users] apply color map to a label map with overlapping label objects? Message-ID: Hi all, I would like to colorize one label map with overlapping label objects. I know there is itk::LabelMapOverlayImageFilter but would it work on such a case? (could be wrong, but based on the code it does not seem so) Thanks Arnaud _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Tue Mar 10 08:59:24 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 10 Mar 2015 08:59:24 -0400 Subject: [ITK] [ITK-users] Mattes Mutual Information Speed with 3D Images In-Reply-To: <1425942141529-7586971.post@n2.nabble.com> References: <1425942141529-7586971.post@n2.nabble.com> Message-ID: <6DB0A858-9B7D-4A6A-832A-2E86661C7611@mail.nih.gov> Hello, Unfortunately, I can help much because of lack of information. I can tell you I just wrote SimpleITK registration code which uses Mattes Mutual Information, Versor Rigid Transform, with a Regular Step Gradient Descent optimizer . The sampling percentage for the metric is 0.2, and the volumes are about 60^3 each. This is able to do the registration in about 8 iterations in 0.3 seconds. Brad On Mar 9, 2015, at 7:02 PM, Gabriel A. Gim?nez wrote: > Hello everyone... > > I'm working on a genetic optimizer for Rigid 3D Registration. > > The fitness of each individual is calculated using Mattes Mutual > Information, the execution time of the metric is high ... (30 seconds on > average). This makes the registration too slow. > > Any recommendations? could improve the performance metrics? otherwise most > appropriate metric? > > Regards! > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Mattes-Mutual-Information-Speed-with-3D-Images-tp7586971.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community _____________________________________ 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://www.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-users From gabrielgimenez85 at gmail.com Tue Mar 10 09:03:41 2015 From: gabrielgimenez85 at gmail.com (=?UTF-8?Q?Gabriel_A=2E_Gim=C3=A9nez?=) Date: Tue, 10 Mar 2015 10:03:41 -0300 Subject: [ITK] [ITK-users] Mattes Mutual Information Speed with 3D Images In-Reply-To: <6DB0A858-9B7D-4A6A-832A-2E86661C7611@mail.nih.gov> References: <1425942141529-7586971.post@n2.nabble.com> <6DB0A858-9B7D-4A6A-832A-2E86661C7611@mail.nih.gov> Message-ID: Hi! thanks for your answer... I use images of RIRE BD (http://www.insight-journal.org/rire/), my initial tests I make with package training_001 (CT - MR_PD). Following recommendation here is my configuration: metric->SetNumberOfHistogramBins( 50 ); double samplingPercentage = 0.002; registration->SetMetricSamplingPercentage( samplingPercentage ); RegistrationType::MetricSamplingStrategyType samplingStrategy = RegistrationType::REGULAR; Unfortunately, the results were not good ... the average execution time remains the same (25 ~ 30 seconds). With a population size equal to 50, the execution time of an iteration is in the order of 25 minutes, very slow for me ... These are the image data: Fixed Image: ObjectType = Image NDims = 3 BinaryDataByteOrderMSB = True AnatomicalOrientation = LPH ElementSpacing = 0.653595 0.653595 4.000000 *DimSize = 512 512 29* ElementType = MET_SHORT ElementDataFile = image.bin Moving Image: ObjectType = Image NDims = 3 BinaryDataByteOrderMSB = True AnatomicalOrientation = LPH ElementSpacing = 1.250000 1.250000 4.000000 *DimSize = 256 256 26* ElementType = MET_SHORT ElementDataFile = image.bin Thanks and regards! 2015-03-10 9:59 GMT-03:00 Bradley Lowekamp : > Hello, > > Unfortunately, I can help much because of lack of information. > > I can tell you I just wrote SimpleITK registration code which uses Mattes > Mutual Information, Versor Rigid Transform, with a Regular Step Gradient > Descent optimizer . The sampling percentage for the metric is 0.2, and the > volumes are about 60^3 each. This is able to do the registration in about 8 > iterations in 0.3 seconds. > > Brad > > On Mar 9, 2015, at 7:02 PM, Gabriel A. Gim?nez > wrote: > > > Hello everyone... > > > > I'm working on a genetic optimizer for Rigid 3D Registration. > > > > The fitness of each individual is calculated using Mattes Mutual > > Information, the execution time of the metric is high ... (30 seconds on > > average). This makes the registration too slow. > > > > Any recommendations? could improve the performance metrics? otherwise > most > > appropriate metric? > > > > Regards! > > > > > > > > -- > > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Mattes-Mutual-Information-Speed-with-3D-Images-tp7586971.html > > Sent from the ITK Insight Users mailing list archive at Nabble.com. > > _____________________________________ > > 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://www.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-users > > _______________________________________________ > > Community mailing list > > Community at itk.org > > http://public.kitware.com/mailman/listinfo/community > > -- *Gabriel Alberto Gim?nez.* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From bill.lorensen at gmail.com Tue Mar 10 09:09:54 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 10 Mar 2015 09:09:54 -0400 Subject: [ITK] [ITK-users] Mattes Mutual Information Speed with 3D Images In-Reply-To: References: <1425942141529-7586971.post@n2.nabble.com> <6DB0A858-9B7D-4A6A-832A-2E86661C7611@mail.nih.gov> Message-ID: Are ITK and your app built Release? On Tue, Mar 10, 2015 at 9:03 AM, Gabriel A. Gim?nez wrote: > Hi! thanks for your answer... > > I use images of RIRE BD (http://www.insight-journal.org/rire/), my initial > tests I make with package training_001 (CT - MR_PD). Following > recommendation here is my configuration: > > > metric->SetNumberOfHistogramBins( 50 ); > double samplingPercentage = 0.002; > registration->SetMetricSamplingPercentage( samplingPercentage ); > RegistrationType::MetricSamplingStrategyType samplingStrategy = > > RegistrationType::REGULAR; > > Unfortunately, the results were not good ... the average execution time > remains the same (25 ~ 30 seconds). With a population size equal to 50, the > execution time of an iteration is in the order of 25 minutes, very slow for > me ... > > These are the image data: > > Fixed Image: > > ObjectType = Image > > NDims = 3 > > BinaryDataByteOrderMSB = True > > AnatomicalOrientation = LPH > > ElementSpacing = 0.653595 0.653595 4.000000 > > DimSize = 512 512 29 > > ElementType = MET_SHORT > > ElementDataFile = image.bin > > > Moving Image: > > ObjectType = Image > > NDims = 3 > > BinaryDataByteOrderMSB = True > > AnatomicalOrientation = LPH > > ElementSpacing = 1.250000 1.250000 4.000000 > > DimSize = 256 256 26 > > ElementType = MET_SHORT > > ElementDataFile = image.bin > > > > Thanks and regards! > > > 2015-03-10 9:59 GMT-03:00 Bradley Lowekamp : > >> Hello, >> >> Unfortunately, I can help much because of lack of information. >> >> I can tell you I just wrote SimpleITK registration code which uses Mattes >> Mutual Information, Versor Rigid Transform, with a Regular Step Gradient >> Descent optimizer . The sampling percentage for the metric is 0.2, and the >> volumes are about 60^3 each. This is able to do the registration in about 8 >> iterations in 0.3 seconds. >> >> Brad >> >> On Mar 9, 2015, at 7:02 PM, Gabriel A. Gim?nez >> wrote: >> >> > Hello everyone... >> > >> > I'm working on a genetic optimizer for Rigid 3D Registration. >> > >> > The fitness of each individual is calculated using Mattes Mutual >> > Information, the execution time of the metric is high ... (30 seconds on >> > average). This makes the registration too slow. >> > >> > Any recommendations? could improve the performance metrics? otherwise >> > most >> > appropriate metric? >> > >> > Regards! >> > >> > >> > >> > -- >> > View this message in context: >> > http://itk-insight-users.2283740.n2.nabble.com/Mattes-Mutual-Information-Speed-with-3D-Images-tp7586971.html >> > Sent from the ITK Insight Users mailing list archive at Nabble.com. >> > _____________________________________ >> > 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://www.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-users >> > _______________________________________________ >> > Community mailing list >> > Community at itk.org >> > http://public.kitware.com/mailman/listinfo/community >> > > > > -- > Gabriel Alberto Gim?nez. > > _____________________________________ > 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://www.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-users > -- Unpaid intern in BillsBasement at noware dot com _____________________________________ 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://www.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-users From chiara.magliaro at googlemail.com Tue Mar 10 09:26:53 2015 From: chiara.magliaro at googlemail.com (Chiara Magliaro) Date: Tue, 10 Mar 2015 14:26:53 +0100 Subject: [ITK] [ITK-users] read an image stack .tif Message-ID: Hi all, i'd like to read a tiff file, stocking an image stack and see the different images composing the stack. Is there any irk class to do this? Thanks in advance Best regards Chiara -- Chiara Magliaro PhD Student Research Center "E. Piaggio" - University of Pisa Largo Lucio Lazzarino 1, 56122 Pisa, Italy Tel. 0039 0502217061 - Fax. 0039 0502217051 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From grothausmann.roman at mh-hannover.de Tue Mar 10 10:14:58 2015 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Tue, 10 Mar 2015 15:14:58 +0100 Subject: [ITK] [ITK-users] Help needed to implement 64-bit "label" image in ITK-Snap for global watershed segmentation mode In-Reply-To: <547C5A89.9090905@mh-hannover.de> References: <547C5A89.9090905@mh-hannover.de> Message-ID: <54FEFC62.7000105@mh-hannover.de> Dear mailing list members, To ease further development and possible help, my extensions to ITK-Snap (Click'n'Join and a global dynamic watershed segmentation mode) are now available on github: https://github.com/romangrothausmann/itksnap.git The branch rel_3.0+gdWS contains the changes needed for ITK-Snap v3.0, rel_3.2+gdWS for ITK-Snap v3.2 and master+gdWS for the newest development. For this branch there is also a PR (https://github.com/pyushkevich/itksnap/pull/1) with a short description and two screen shots, a documentation (article in the MIDAS journal) is on the way. One point on the ToDo list I would need help on is the realization of the join-srouce-image being 64-bit (itk::IdentifierType) and possibly coloured with itk::ScalarToRGBPixelFunctor. Other things I tried are those reported before/below. So if someone has any idea how to realize this or would like to take part in further development, please let me know. Thanks for any help or hints. Roman On 01/12/14 13:09, Dr. Roman Grothausmann wrote: > Dear mailing list members, > > > How can I modify the ColorLabelTableDisplayMappingPolicy to accept also images > containing labels of long unsigned int, i.e. the output of the > itkWatershedImageFilter? > It seems that this image type only causes problems for: > m_RGBAFilter[i]->SetInput(wrapper->GetSlice(i)); > i.e. m_RGBAFilter can only handle short but the slice from the output of a > itkWatershedImageFilter is of type long. > I tried to incorporate a CastImageFilter (see below, as the loss of precision > does not matter for the colouring), but that cannot be updated because the input > region size is [0,0] at that position of the pipeline: > > > typedef itk::Image JsrcImageType; > typedef itk::Image LabelInputSliceType; > typedef itk::CastImageFilter CIFType; > typename CIFType::Pointer cif; > cif = CIFType::New(); > wrapper->GetSlice(i)->Print(std::cerr); > cif->SetInput(dynamic_cast(wrapper->GetSlice(i))); > //cif->InPlaceOff(); > cif->Print(std::cerr); > std::cerr << "cif->Update" << std::endl; > //cif->UpdateLargestPossibleRegion(); > cif->Update(); ////crashes as input region size is [0,0] > cif->GetOutput()->Print(std::cerr); > m_RGBAFilter[i]->SetInput(cif->GetOutput()); > > > I wonder if there is a better place to do the casting but e.g. > Logic/Slicing/IRISSlicer.txx didn't seem more promising to me. > > Or how could I create a new ColorLabelTableDisplayMappingPolicy2 that would > handle long? > It seems that the typedef itk::Image InputSliceType; in > DisplayMappingPolicy.h is not used, i.e. changing it to use long for labels has > no effect. > > Setting the Label type globally to long in SNAPCommon.h: > typedef itk::IdentifierType LabelType; > confuses Qt. > > Any help or hints how I can handle this type mismatch are very welcome > Thanks, > Roman > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 _____________________________________ 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://www.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-users From lluna.nova at gmail.com Tue Mar 10 12:02:24 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Tue, 10 Mar 2015 17:02:24 +0100 Subject: [ITK] [ITK-users] read an image stack .tif In-Reply-To: References: Message-ID: Yes, there is. How are the images stacked? Are we talking about a volume? If so, read it normally with a reader with a dimension of 3. Check the reader example: http://itk.org/Wiki/ITK/Examples/IO/ImageFileReader You'll have to change the Dimension to 3 and remove the visualization part. If you only want to visualize, you could use Fiji for this. Pol 2015-03-10 14:26 GMT+01:00 Chiara Magliaro : > Hi all, > > i'd like to read a tiff file, stocking an image stack and see the > different images composing the stack. Is there any irk class to do this? > Thanks in advance > > Best regards > Chiara > > -- > Chiara Magliaro > PhD Student > Research Center "E. Piaggio" - University of Pisa > Largo Lucio Lazzarino 1, 56122 Pisa, Italy > Tel. 0039 0502217061 - Fax. 0039 0502217051 > > _____________________________________ > 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://www.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-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From janschepers1 at gmail.com Tue Mar 10 12:14:24 2015 From: janschepers1 at gmail.com (Jan Schepers) Date: Tue, 10 Mar 2015 17:14:24 +0100 Subject: [ITK] [ITK-users] Question about itkCenteredVersorTransformInitializer Message-ID: Hello, in the method InitializeTransform the rotation matrix is computed as follows: MovingMatrixType rotationMatrix = movingPrincipalAxis * fixedPrincipalAxis.GetInverse(); This doesn't work for me. If I change it to MovingMatrixType rotationMatrix = movingPrincipalAxis.GetInverse() * fixedPrincipalAxis; then I get the results that I expected. Strangely, both rotation matrices are not even each other's inverse. Did anyone experience the same problem? Best regards, Jan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Tue Mar 10 12:56:32 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 10 Mar 2015 12:56:32 -0400 Subject: [ITK] [ITK-users] Question about itkCenteredVersorTransformInitializer In-Reply-To: References: Message-ID: <9D59DDE4-7748-4804-95BD-D2244A2E9EC6@mail.nih.gov> Hello Jan, Please remember that the ITK registration framework ( and initializers ) produce a transform which maps points from the fixed image to the moving image. My first guess is that you are applying the transform in the wrong direction. Brad On Mar 10, 2015, at 12:14 PM, Jan Schepers wrote: > Hello, > > in the method InitializeTransform the rotation matrix is computed as follows: > MovingMatrixType rotationMatrix = movingPrincipalAxis * fixedPrincipalAxis.GetInverse(); > > This doesn't work for me. If I change it to > MovingMatrixType rotationMatrix = movingPrincipalAxis.GetInverse() * fixedPrincipalAxis; > then I get the results that I expected. Strangely, both rotation matrices are not even each other's inverse. > > Did anyone experience the same problem? > > Best regards, > Jan > _____________________________________ > 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://www.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-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From amghanem at gmail.com Tue Mar 10 16:18:25 2015 From: amghanem at gmail.com (amghanem) Date: Tue, 10 Mar 2015 13:18:25 -0700 (MST) Subject: [ITK] [ITK-users] error exception occurred during SingleMethodExecute Message-ID: <1426018705093-35316.post@n7.nabble.com> Hi, I am working on Osirix plugin and when the following code run, ITK generate the following runtime error itk::ERROR: MultiThreader(0x79f1400): Exception occurred during SingleMethodExecute ITK180/Modules/Core/Common/include/itkImageSource.hxx:300: itk::ERROR: ImageToImageFilter(0x126df1a0): Subclass should override this method!!! The signature of ThreadedGenerateData() has been changed in ITK v4 to use the new ThreadIdType. ImageToImageFilter::ThreadedGenerateData() might need to be updated to used it. the version of ITK that used by osirix is 4.1 thanks, const unsigned int Dimension = 3; typedef float PixelType; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::SymmetricSecondRankTensor< double, Dimension > HessianPixelType; typedef itk::Image< HessianPixelType, Dimension > HessianImageType; typedef itk::HessianToObjectnessMeasureImageFilter< HessianImageType, ImageType > ObjectnessFilterType; ObjectnessFilterType::Pointer objectnessFilter = ObjectnessFilterType::New(); //objectnessFilter->SetBrightObject( false ); objectnessFilter->SetBrightObject( true ); objectnessFilter->SetScaleObjectnessMeasure( false ); objectnessFilter->SetAlpha( 0.5 ); objectnessFilter->SetBeta( 1.0 ); objectnessFilter->SetGamma( 5.0 ); objectnessFilter->SetObjectDimension(1); //vessels typedef itk::MultiScaleHessianBasedMeasureImageFilter< ImageType, HessianImageType, ImageType > MultiScaleEnhancementFilterType; MultiScaleEnhancementFilterType::Pointer multiScaleEnhancementFilter = MultiScaleEnhancementFilterType::New(); multiScaleEnhancementFilter->SetInput( importFilter->GetOutput() ); multiScaleEnhancementFilter->SetHessianToMeasureFilter( objectnessFilter ); multiScaleEnhancementFilter->SetSigmaStepMethodToEquispaced(); multiScaleEnhancementFilter->SetSigmaMinimum( 0.2 ); multiScaleEnhancementFilter->SetSigmaMaximum( 2 ); multiScaleEnhancementFilter->SetNumberOfSigmaSteps( 2); multiScaleEnhancementFilter->SetGenerateHessianOutput(true); multiScaleEnhancementFilter->SetGenerateScalesOutput(false); try { multiScaleEnhancementFilter->Update(); } catch( itk::ExceptionObject & excep ) { NSString * erro = [[ NSString alloc] initWithCString:excep.GetDescription()]; NSLog(erro); return 1; } float* enhanceOutput=multiScaleEnhancementFilter->GetOutput()->GetBufferPointer(); -- View this message in context: http://itk-users.7.n7.nabble.com/error-exception-occurred-during-SingleMethodExecute-tp35316.html Sent from the ITK - Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Wed Mar 11 08:56:07 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 11 Mar 2015 08:56:07 -0400 Subject: [ITK] [ITK-users] error exception occurred during SingleMethodExecute In-Reply-To: <1426018705093-35316.post@n7.nabble.com> References: <1426018705093-35316.post@n7.nabble.com> Message-ID: <656320A1-1E8F-45B6-8C3D-1EE5168C0941@mail.nih.gov> Hello, I think you have a build and include path problem and are mixing up using different versions of ITK headers. Or perhaps some how using an old version of the these filters. Brad On Mar 10, 2015, at 4:18 PM, amghanem wrote: > Hi, > > I am working on Osirix plugin and when the following code run, ITK generate > the following runtime error > > > itk::ERROR: MultiThreader(0x79f1400): Exception occurred during > SingleMethodExecute > ITK180/Modules/Core/Common/include/itkImageSource.hxx:300: > itk::ERROR: ImageToImageFilter(0x126df1a0): Subclass should override this > method!!! > The signature of ThreadedGenerateData() has been changed in ITK v4 to use > the new ThreadIdType. > ImageToImageFilter::ThreadedGenerateData() might need to be updated to used > it. > > the version of ITK that used by osirix is 4.1 > > > > > thanks, > > > > const unsigned int Dimension = 3; > > > typedef float PixelType; > typedef itk::Image< PixelType, Dimension > ImageType; > > > typedef itk::SymmetricSecondRankTensor< double, Dimension > > HessianPixelType; > typedef itk::Image< HessianPixelType, Dimension > > HessianImageType; > typedef itk::HessianToObjectnessMeasureImageFilter< HessianImageType, > ImageType > ObjectnessFilterType; > ObjectnessFilterType::Pointer objectnessFilter = > ObjectnessFilterType::New(); > //objectnessFilter->SetBrightObject( false ); > objectnessFilter->SetBrightObject( true ); > objectnessFilter->SetScaleObjectnessMeasure( false ); > objectnessFilter->SetAlpha( 0.5 ); > objectnessFilter->SetBeta( 1.0 ); > objectnessFilter->SetGamma( 5.0 ); > objectnessFilter->SetObjectDimension(1); //vessels > > typedef itk::MultiScaleHessianBasedMeasureImageFilter< ImageType, > HessianImageType, ImageType > MultiScaleEnhancementFilterType; > MultiScaleEnhancementFilterType::Pointer multiScaleEnhancementFilter = > MultiScaleEnhancementFilterType::New(); > multiScaleEnhancementFilter->SetInput( importFilter->GetOutput() ); > multiScaleEnhancementFilter->SetHessianToMeasureFilter( objectnessFilter > ); > multiScaleEnhancementFilter->SetSigmaStepMethodToEquispaced(); > multiScaleEnhancementFilter->SetSigmaMinimum( 0.2 ); > multiScaleEnhancementFilter->SetSigmaMaximum( 2 ); > multiScaleEnhancementFilter->SetNumberOfSigmaSteps( 2); > multiScaleEnhancementFilter->SetGenerateHessianOutput(true); > multiScaleEnhancementFilter->SetGenerateScalesOutput(false); > > > > try > { > multiScaleEnhancementFilter->Update(); > } > catch( itk::ExceptionObject & excep ) > { > NSString * erro = [[ NSString alloc] > initWithCString:excep.GetDescription()]; > > NSLog(erro); > return 1; > } > > float* > enhanceOutput=multiScaleEnhancementFilter->GetOutput()->GetBufferPointer(); > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/error-exception-occurred-during-SingleMethodExecute-tp35316.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community _____________________________________ 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://www.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-users From amghanem at gmail.com Wed Mar 11 10:25:57 2015 From: amghanem at gmail.com (amghanem) Date: Wed, 11 Mar 2015 07:25:57 -0700 (MST) Subject: [ITK] [ITK-users] error exception occurred during SingleMethodExecute In-Reply-To: <656320A1-1E8F-45B6-8C3D-1EE5168C0941@mail.nih.gov> References: <1426018705093-35316.post@n7.nabble.com> <656320A1-1E8F-45B6-8C3D-1EE5168C0941@mail.nih.gov> Message-ID: <1426083957973-35318.post@n7.nabble.com> Thanks Brad, I used the ITK library which integrated with Osirix so I think, There is no headers library version conflict. -- View this message in context: http://itk-users.7.n7.nabble.com/error-exception-occurred-during-SingleMethodExecute-tp35316p35318.html Sent from the ITK - Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Wed Mar 11 13:21:21 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 11 Mar 2015 13:21:21 -0400 Subject: [ITK] [ITK-users] error exception occurred during SingleMethodExecute In-Reply-To: <1426083957973-35318.post@n7.nabble.com> References: <1426018705093-35316.post@n7.nabble.com> <656320A1-1E8F-45B6-8C3D-1EE5168C0941@mail.nih.gov> <1426083957973-35318.post@n7.nabble.com> Message-ID: Hi, You will need to run the code in a debugger to see which class is causing the issue. It is likely related to the use of "ThreadIdType" in the ThreadedGenerateData method signature. HTH, Matt On Wed, Mar 11, 2015 at 10:25 AM, amghanem wrote: > Thanks Brad, > I used the ITK library which integrated with Osirix so I think, There is no > headers library version conflict. > > > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/error-exception-occurred-during-SingleMethodExecute-tp35316p35318.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From jian.cheng.1983 at gmail.com Wed Mar 11 16:07:03 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Wed, 11 Mar 2015 16:07:03 -0400 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix Message-ID: <5500A067.5080507@gmail.com> Hi, My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. Thus the performance is actually mainly determined by the matrix library I used. Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is very inefficient because vnl matrix lib does not use blas and lapack. After I wrote my own matrix class which uses openblas and lapack, I got a hug gain of performance. I found there is a proposal to improve the efficiency of numerical libraries in ITK. http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries I am not sure how is the progress of the proposal. I wonder when the vnl matrix lib can internally support blas and lapack, or mkl, so that we can just use it without lose of the efficiency. Thanks. best, Jian Cheng _______________________________________________ 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 Wed Mar 11 16:39:51 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 11 Mar 2015 16:39:51 -0400 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: <5500A067.5080507@gmail.com> References: <5500A067.5080507@gmail.com> Message-ID: Hi Jian, Yes, it would be wonderful to improve the efficiency of these basic numerical operations. Funding for the Refactor Numerical Libraries has currently ended, and the effort is currently frozen. However, you are more than welcome to pick it up and we can help you get it into ITK. More information on the patch submission process can be found here [1] and in the ITK Software Guide. Thanks, Matt [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: > Hi, > > My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. > Thus the performance is actually mainly determined by the matrix library > I used. > Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is very > inefficient because vnl matrix lib does not use blas and lapack. > After I wrote my own matrix class which uses openblas and lapack, I got > a hug gain of performance. > > I found there is a proposal to improve the efficiency of numerical > libraries in ITK. > http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries > I am not sure how is the progress of the proposal. > I wonder when the vnl matrix lib can internally support blas and lapack, > or mkl, so that we can just use it without lose of the efficiency. > Thanks. > > best, > Jian Cheng > _______________________________________________ > 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 From jian.cheng.1983 at gmail.com Wed Mar 11 18:17:00 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Wed, 11 Mar 2015 18:17:00 -0400 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: References: <5500A067.5080507@gmail.com> Message-ID: <5500BEDC.40203@gmail.com> Hi Matt, Thanks for your help, and also for the ITK workshop in UNC last time. It is very unfortunate. The efficiency of these numerical math operators are very important for many applications. I recently released an ITK based toolbox, called dmritool, for diffusion MRI data processing. It has some files to add some supports of blas, lapack, mkl to vnl_matrix and vnl_vector. http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html Those functions are not internally for vnl_matrix class. They are operators for the data pointer stored in vnl_matrix object. Thus, later I made a N-dimensional array library which internally includes those functions, and also supports expression template to avoid temporary copies. http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html The efficiency comparison between vnl_vector/vnl_matrix and the vector/matrix using openblas, lapack, or mkl can be found by running those two tests https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx Maybe some codes can be used as patches in somewhere in ITK. I am not sure. Maybe we need more discussion on it. With your help and discussion, I will be very glad to make my first patch to ITK. Thanks. best, Jian Cheng On 03/11/2015 04:39 PM, Matt McCormick wrote: > Hi Jian, > > Yes, it would be wonderful to improve the efficiency of these basic > numerical operations. > > Funding for the Refactor Numerical Libraries has currently ended, and > the effort is currently frozen. However, you are more than welcome to > pick it up and we can help you get it into ITK. More information on > the patch submission process can be found here [1] and in the ITK > Software Guide. > > Thanks, > Matt > > [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html > > On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: >> Hi, >> >> My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. >> Thus the performance is actually mainly determined by the matrix library >> I used. >> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is very >> inefficient because vnl matrix lib does not use blas and lapack. >> After I wrote my own matrix class which uses openblas and lapack, I got >> a hug gain of performance. >> >> I found there is a proposal to improve the efficiency of numerical >> libraries in ITK. >> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >> I am not sure how is the progress of the proposal. >> I wonder when the vnl matrix lib can internally support blas and lapack, >> or mkl, so that we can just use it without lose of the efficiency. >> Thanks. >> >> best, >> Jian Cheng >> _______________________________________________ >> 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 From matimontg at gmail.com Wed Mar 11 18:32:17 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 11 Mar 2015 19:32:17 -0300 Subject: [ITK] [ITK-users] Registration in SimpleITK Message-ID: Hi, is it possible to do registration in SimpleITK? I mean, something like in this example: http://public.kitware.com/cgi-bin/viewcvs.cgi/Insight/Examples/Registration/ImageRegistration2.cxx?view=markup Thanks, Matias, -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Wed Mar 11 18:46:07 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 11 Mar 2015 18:46:07 -0400 Subject: [ITK] [ITK-users] Registration in SimpleITK In-Reply-To: References: Message-ID: Hello Matias, Currently there is SimpleITK 0.9b01 [1] out with the registration framework. With it you can do things like this: http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/56_VH_Registration1.html or http://www.itk.org/SimpleITKDoxygen/html/ImageRegistrationMethod2_8py-example.html Please give it a try and let us know how it work for you. Enjoy, Brad [1] http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#SimpleITK_-_Version_0.9.0_Release On Mar 11, 2015, at 6:32 PM, Matias Montroull wrote: > Hi, > > is it possible to do registration in SimpleITK? I mean, something like in this example: > http://public.kitware.com/cgi-bin/viewcvs.cgi/Insight/Examples/Registration/ImageRegistration2.cxx?view=markup > > Thanks, > > Matias, > _____________________________________ > 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://www.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-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matimontg at gmail.com Wed Mar 11 18:54:41 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 11 Mar 2015 19:54:41 -0300 Subject: [ITK] [ITK-users] Registration in SimpleITK In-Reply-To: References: Message-ID: Thanks Bradley, I'll give it a try. I downloaded version 0.8.1 but wasn't aware of this new Beta release Thanks, Matias. On Wed, Mar 11, 2015 at 7:46 PM, Bradley Lowekamp wrote: > Hello Matias, > > Currently there is SimpleITK 0.9b01 [1] out with the registration > framework. > > With it you can do things like this: > > http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/56_VH_Registration1.html > or > > http://www.itk.org/SimpleITKDoxygen/html/ImageRegistrationMethod2_8py-example.html > > Please give it a try and let us know how it work for you. > > Enjoy, > Brad > > [1] > http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#SimpleITK_-_Version_0.9.0_Release > > On Mar 11, 2015, at 6:32 PM, Matias Montroull wrote: > > Hi, > > is it possible to do registration in SimpleITK? I mean, something like in > this example: > > http://public.kitware.com/cgi-bin/viewcvs.cgi/Insight/Examples/Registration/ImageRegistration2.cxx?view=markup > > Thanks, > > Matias, > _____________________________________ > 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://www.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-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matimontg at gmail.com Wed Mar 11 19:31:48 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 11 Mar 2015 20:31:48 -0300 Subject: [ITK] [ITK-users] Registration in SimpleITK In-Reply-To: References: Message-ID: My project is using 64 bits and some DLL I use as well, I've ran into issues when using the beta version because is 32 bits. I guess I'll wait until the final release is done. Thanks, Matias. On Wed, Mar 11, 2015 at 7:54 PM, Matias Montroull wrote: > Thanks Bradley, I'll give it a try. I downloaded version 0.8.1 but wasn't > aware of this new Beta release > Thanks, > Matias. > > On Wed, Mar 11, 2015 at 7:46 PM, Bradley Lowekamp > wrote: > >> Hello Matias, >> >> Currently there is SimpleITK 0.9b01 [1] out with the registration >> framework. >> >> With it you can do things like this: >> >> http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/56_VH_Registration1.html >> or >> >> http://www.itk.org/SimpleITKDoxygen/html/ImageRegistrationMethod2_8py-example.html >> >> Please give it a try and let us know how it work for you. >> >> Enjoy, >> Brad >> >> [1] >> http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#SimpleITK_-_Version_0.9.0_Release >> >> On Mar 11, 2015, at 6:32 PM, Matias Montroull >> wrote: >> >> Hi, >> >> is it possible to do registration in SimpleITK? I mean, something like in >> this example: >> >> http://public.kitware.com/cgi-bin/viewcvs.cgi/Insight/Examples/Registration/ImageRegistration2.cxx?view=markup >> >> Thanks, >> >> Matias, >> _____________________________________ >> 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://www.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-users >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Wed Mar 11 19:56:56 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 11 Mar 2015 19:56:56 -0400 Subject: [ITK] [ITK-users] Registration in SimpleITK In-Reply-To: References: Message-ID: Hello, If you are willing to compile it yourself you can get it to work with just a little bit of effort. Compile the SimpleITK superbuild with shared libraries enabled. Do the usual installation of SimpleITK from the super build [1], this will install the SimpleITK python library into your site-packages. However, this libraries also depends on all the SimpleITK an ITK dlls (not installed or packaged), these should be in the superbuild's bin directory. These need to be in your run-time path when importing SimpleITK. This can be done either by modifying you PATH environment variable you copying them to the appropriate place ( which may depend on the python environment, and there are likely several alternatives). Brad [1] http://www.itk.org/Wiki/SimpleITK/GettingStarted#Python_installation On Mar 11, 2015, at 7:31 PM, Matias Montroull wrote: > > My project is using 64 bits and some DLL I use as well, I've ran into issues when using the beta version because is 32 bits. I guess I'll wait until the final release is done. > Thanks, > Matias. > > On Wed, Mar 11, 2015 at 7:54 PM, Matias Montroull wrote: > Thanks Bradley, I'll give it a try. I downloaded version 0.8.1 but wasn't aware of this new Beta release > Thanks, > Matias. > > On Wed, Mar 11, 2015 at 7:46 PM, Bradley Lowekamp wrote: > Hello Matias, > > Currently there is SimpleITK 0.9b01 [1] out with the registration framework. > > With it you can do things like this: > http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/56_VH_Registration1.html > or > http://www.itk.org/SimpleITKDoxygen/html/ImageRegistrationMethod2_8py-example.html > > Please give it a try and let us know how it work for you. > > Enjoy, > Brad > > [1] http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#SimpleITK_-_Version_0.9.0_Release > > On Mar 11, 2015, at 6:32 PM, Matias Montroull wrote: > >> Hi, >> >> is it possible to do registration in SimpleITK? I mean, something like in this example: >> http://public.kitware.com/cgi-bin/viewcvs.cgi/Insight/Examples/Registration/ImageRegistration2.cxx?view=markup >> >> Thanks, >> >> Matias, >> _____________________________________ >> 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://www.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-users >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From M.Staring at lumc.nl Thu Mar 12 05:15:14 2015 From: M.Staring at lumc.nl (M.Staring at lumc.nl) Date: Thu, 12 Mar 2015 09:15:14 +0000 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: <5500BEDC.40203@gmail.com> References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> Message-ID: <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> Hi, I think the eigen library is a mature and very fast library for these kind of things: http://eigen.tuxfamily.org/index.php?title=Main_Page You may want to check it out, to see if it offers what you need. It would be great to be able to use these within the itk. 2c Marius -----Original Message----- From: Insight-developers [mailto:insight-developers-bounces at itk.org] On Behalf Of Jian Cheng Sent: Wednesday, March 11, 2015 23:17 To: Matt McCormick Cc: Chuck Atkins; ITK Subject: Re: [ITK-dev] efficiency of vnl_matrix Hi Matt, Thanks for your help, and also for the ITK workshop in UNC last time. It is very unfortunate. The efficiency of these numerical math operators are very important for many applications. I recently released an ITK based toolbox, called dmritool, for diffusion MRI data processing. It has some files to add some supports of blas, lapack, mkl to vnl_matrix and vnl_vector. http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html Those functions are not internally for vnl_matrix class. They are operators for the data pointer stored in vnl_matrix object. Thus, later I made a N-dimensional array library which internally includes those functions, and also supports expression template to avoid temporary copies. http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html The efficiency comparison between vnl_vector/vnl_matrix and the vector/matrix using openblas, lapack, or mkl can be found by running those two tests https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx Maybe some codes can be used as patches in somewhere in ITK. I am not sure. Maybe we need more discussion on it. With your help and discussion, I will be very glad to make my first patch to ITK. Thanks. best, Jian Cheng On 03/11/2015 04:39 PM, Matt McCormick wrote: > Hi Jian, > > Yes, it would be wonderful to improve the efficiency of these basic > numerical operations. > > Funding for the Refactor Numerical Libraries has currently ended, and > the effort is currently frozen. However, you are more than welcome to > pick it up and we can help you get it into ITK. More information on > the patch submission process can be found here [1] and in the ITK > Software Guide. > > Thanks, > Matt > > [1] > https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo > ftwareProcess/SubmitAPatchToGerrit/index.html > > On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: >> Hi, >> >> My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. >> Thus the performance is actually mainly determined by the matrix >> library I used. >> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >> very inefficient because vnl matrix lib does not use blas and lapack. >> After I wrote my own matrix class which uses openblas and lapack, I >> got a hug gain of performance. >> >> I found there is a proposal to improve the efficiency of numerical >> libraries in ITK. >> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >> I am not sure how is the progress of the proposal. >> I wonder when the vnl matrix lib can internally support blas and >> lapack, or mkl, so that we can just use it without lose of the efficiency. >> Thanks. >> >> best, >> Jian Cheng >> _______________________________________________ >> 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 _______________________________________________ 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 blowekamp at mail.nih.gov Thu Mar 12 08:32:18 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 12 Mar 2015 08:32:18 -0400 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> Message-ID: <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> Hello, If I was writing my own ITK classes, and needed a fast matrix library I would likely pursue an additional dependency on an efficient numeric library for that project, such as eigen. However for the broad appeal of ITK I would think a flexible back end would be best. As I think there are a variety of BLAS and LAPACK libraries available ( commercial, open source, vender free ). It would be nice to pick one what has been optimized for the current architecture. I would think it would be most flexible to use this interface in the back end of a chosen numeric interface ( currently VNL ). Unfortunately, I don't have as much experience with these libraries as I'd like. Brad On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: > Hi, > > I think the eigen library is a mature and very fast library for these kind of things: > http://eigen.tuxfamily.org/index.php?title=Main_Page > > You may want to check it out, to see if it offers what you need. > > It would be great to be able to use these within the itk. > > 2c > Marius > > -----Original Message----- > From: Insight-developers [mailto:insight-developers-bounces at itk.org] On Behalf Of Jian Cheng > Sent: Wednesday, March 11, 2015 23:17 > To: Matt McCormick > Cc: Chuck Atkins; ITK > Subject: Re: [ITK-dev] efficiency of vnl_matrix > > Hi Matt, > > Thanks for your help, and also for the ITK workshop in UNC last time. > > It is very unfortunate. The efficiency of these numerical math operators are very important for many applications. > > I recently released an ITK based toolbox, called dmritool, for diffusion MRI data processing. > It has some files to add some supports of blas, lapack, mkl to vnl_matrix and vnl_vector. > http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html > http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html > > Those functions are not internally for vnl_matrix class. They are operators for the data pointer stored in vnl_matrix object. > Thus, later I made a N-dimensional array library which internally includes those functions, and also supports expression template to avoid temporary copies. > http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html > http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html > > The efficiency comparison between vnl_vector/vnl_matrix and the vector/matrix using openblas, lapack, or mkl can be found by running those two tests https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx > > Maybe some codes can be used as patches in somewhere in ITK. I am not sure. Maybe we need more discussion on it. > With your help and discussion, I will be very glad to make my first patch to ITK. > Thanks. > > best, > Jian Cheng > > > On 03/11/2015 04:39 PM, Matt McCormick wrote: >> Hi Jian, >> >> Yes, it would be wonderful to improve the efficiency of these basic >> numerical operations. >> >> Funding for the Refactor Numerical Libraries has currently ended, and >> the effort is currently frozen. However, you are more than welcome to >> pick it up and we can help you get it into ITK. More information on >> the patch submission process can be found here [1] and in the ITK >> Software Guide. >> >> Thanks, >> Matt >> >> [1] >> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >> ftwareProcess/SubmitAPatchToGerrit/index.html >> >> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: >>> Hi, >>> >>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. >>> Thus the performance is actually mainly determined by the matrix >>> library I used. >>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >>> very inefficient because vnl matrix lib does not use blas and lapack. >>> After I wrote my own matrix class which uses openblas and lapack, I >>> got a hug gain of performance. >>> >>> I found there is a proposal to improve the efficiency of numerical >>> libraries in ITK. >>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>> I am not sure how is the progress of the proposal. >>> I wonder when the vnl matrix lib can internally support blas and >>> lapack, or mkl, so that we can just use it without lose of the efficiency. >>> Thanks. >>> >>> best, >>> Jian Cheng >>> _______________________________________________ >>> 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 > _______________________________________________ > 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 From jian.cheng.1983 at gmail.com Thu Mar 12 10:01:47 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Thu, 12 Mar 2015 10:01:47 -0400 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> Message-ID: <55019C4B.6050502@gmail.com> Hi, I did test some mature matrix libs. Compared to eigen, I prefer armadillo http://arma.sourceforge.net/, because armadillo is more efficient for my task based on my experiments. Someone wrote did a numerical comparison on pseudo-inverse. http://nghiaho.com/?p=1726 Thus for picking a mature library, I vote for armadillo. I decided to write my own matrix class for the codes, because it does not need to add additional dependency and it just contains 2-3 header files for a light-wright matrix lib to support blas, lapack, mkl, and expression template. best, Jian Cheng On 03/12/2015 05:15 AM, M.Staring at lumc.nl wrote: > Hi, > > I think the eigen library is a mature and very fast library for these kind of things: > http://eigen.tuxfamily.org/index.php?title=Main_Page > > You may want to check it out, to see if it offers what you need. > > It would be great to be able to use these within the itk. > > 2c > Marius > > -----Original Message----- > From: Insight-developers [mailto:insight-developers-bounces at itk.org] On Behalf Of Jian Cheng > Sent: Wednesday, March 11, 2015 23:17 > To: Matt McCormick > Cc: Chuck Atkins; ITK > Subject: Re: [ITK-dev] efficiency of vnl_matrix > > Hi Matt, > > Thanks for your help, and also for the ITK workshop in UNC last time. > > It is very unfortunate. The efficiency of these numerical math operators are very important for many applications. > > I recently released an ITK based toolbox, called dmritool, for diffusion MRI data processing. > It has some files to add some supports of blas, lapack, mkl to vnl_matrix and vnl_vector. > http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html > http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html > > Those functions are not internally for vnl_matrix class. They are operators for the data pointer stored in vnl_matrix object. > Thus, later I made a N-dimensional array library which internally includes those functions, and also supports expression template to avoid temporary copies. > http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html > http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html > > The efficiency comparison between vnl_vector/vnl_matrix and the vector/matrix using openblas, lapack, or mkl can be found by running those two tests https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx > > Maybe some codes can be used as patches in somewhere in ITK. I am not sure. Maybe we need more discussion on it. > With your help and discussion, I will be very glad to make my first patch to ITK. > Thanks. > > best, > Jian Cheng > > > On 03/11/2015 04:39 PM, Matt McCormick wrote: >> Hi Jian, >> >> Yes, it would be wonderful to improve the efficiency of these basic >> numerical operations. >> >> Funding for the Refactor Numerical Libraries has currently ended, and >> the effort is currently frozen. However, you are more than welcome to >> pick it up and we can help you get it into ITK. More information on >> the patch submission process can be found here [1] and in the ITK >> Software Guide. >> >> Thanks, >> Matt >> >> [1] >> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >> ftwareProcess/SubmitAPatchToGerrit/index.html >> >> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: >>> Hi, >>> >>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. >>> Thus the performance is actually mainly determined by the matrix >>> library I used. >>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >>> very inefficient because vnl matrix lib does not use blas and lapack. >>> After I wrote my own matrix class which uses openblas and lapack, I >>> got a hug gain of performance. >>> >>> I found there is a proposal to improve the efficiency of numerical >>> libraries in ITK. >>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>> I am not sure how is the progress of the proposal. >>> I wonder when the vnl matrix lib can internally support blas and >>> lapack, or mkl, so that we can just use it without lose of the efficiency. >>> Thanks. >>> >>> best, >>> Jian Cheng >>> _______________________________________________ >>> 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 _______________________________________________ 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 hans-johnson at uiowa.edu Thu Mar 12 10:02:11 2015 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Thu, 12 Mar 2015 14:02:11 +0000 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: <5500BEDC.40203@gmail.com> References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> Message-ID: <77C1964E-8DB1-4BC9-9122-7983C484D076@healthcare.uiowa.edu> Jian, FYI: I have used Eigen for similar tasks to your dmritool. I have been very happy with it?s performance and feature set. Hans > On Mar 11, 2015, at 5:17 PM, Jian Cheng wrote: > > Hi Matt, > > Thanks for your help, and also for the ITK workshop in UNC last time. > > It is very unfortunate. The efficiency of these numerical math operators > are very important for many applications. > > I recently released an ITK based toolbox, called dmritool, for diffusion > MRI data processing. > It has some files to add some supports of blas, lapack, mkl to > vnl_matrix and vnl_vector. > http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html > http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html > > Those functions are not internally for vnl_matrix class. They are > operators for the data pointer stored in vnl_matrix object. > Thus, later I made a N-dimensional array library which internally > includes those functions, and also supports expression template to avoid > temporary copies. > http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html > http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html > > The efficiency comparison between vnl_vector/vnl_matrix and the > vector/matrix using openblas, lapack, or mkl can be found by running > those two tests > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx > > Maybe some codes can be used as patches in somewhere in ITK. I am not > sure. Maybe we need more discussion on it. > With your help and discussion, I will be very glad to make my first > patch to ITK. > Thanks. > > best, > Jian Cheng > > > On 03/11/2015 04:39 PM, Matt McCormick wrote: >> Hi Jian, >> >> Yes, it would be wonderful to improve the efficiency of these basic >> numerical operations. >> >> Funding for the Refactor Numerical Libraries has currently ended, and >> the effort is currently frozen. However, you are more than welcome to >> pick it up and we can help you get it into ITK. More information on >> the patch submission process can be found here [1] and in the ITK >> Software Guide. >> >> Thanks, >> Matt >> >> [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html >> >> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: >>> Hi, >>> >>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. >>> Thus the performance is actually mainly determined by the matrix library >>> I used. >>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is very >>> inefficient because vnl matrix lib does not use blas and lapack. >>> After I wrote my own matrix class which uses openblas and lapack, I got >>> a hug gain of performance. >>> >>> I found there is a proposal to improve the efficiency of numerical >>> libraries in ITK. >>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>> I am not sure how is the progress of the proposal. >>> I wonder when the vnl matrix lib can internally support blas and lapack, >>> or mkl, so that we can just use it without lose of the efficiency. >>> Thanks. >>> >>> best, >>> Jian Cheng >>> _______________________________________________ >>> 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 ________________________________ Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. ________________________________ _______________________________________________ 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 blowekamp at mail.nih.gov Thu Mar 12 10:20:53 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 12 Mar 2015 10:20:53 -0400 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> Message-ID: <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> Chuck, Thank you for giving us that important conclusion, under a quite difficult situations. I wonder if there is any distinction in the usage of vnl_matrix vs vnl_matrix_fixed. I would expect that operations done for pixel transforms should have there dimension know at run-time and should be able to use the vnl_matrix_fixed. I also have considered methods to transform a whole array of points at a time. I wonder if for 3x3*3*256 sized operations ( scan-line size ) if there would be benefit with the library based operations. Brad On Mar 12, 2015, at 10:02 AM, Chuck Atkins wrote: > I worked with Julie Langou, maintainer of LAPACK, on this project a few years ago. The funding situation ended up very strange and messy and we basically had to cram 3 months worth of effort into 3 weeks, so needless to say, we were not able to really achieve our goals. However, we spent a fair amount of time profiling ITK and analyzing it's hot spots from vnl to determine where to best spend the small ammount of time we had. The results were not as straight forward as we expected. It turns out that most of the use for vnl_matrix and vnl_vector was actually for an enourmous number of operations on very small sized vectors and matricies (dimensions of 2, 3, or 4), often for coordinate and geometry calculations or for small per-pixel operations that were not easily vectorized in the implementation at the time. In these cases, the overhead of calling out to a BLAS or LAPACK library was much too expensive and the existing use of VNL was far more optimal. This falls apart, however when trying to use vnl for more complex algorithms since the larger matrix operations will be where the benefit can be seen. So just re-implementing the vnl vector and matrix classes and operators with underlying BLAS and LAPACK routines turned out to not be the best solution for ITK as a whole. > > - Chuck > > On Thu, Mar 12, 2015 at 8:32 AM, Bradley Lowekamp wrote: > Hello, > > If I was writing my own ITK classes, and needed a fast matrix library I would likely pursue an additional dependency on an efficient numeric library for that project, such as eigen. > > However for the broad appeal of ITK I would think a flexible back end would be best. As I think there are a variety of BLAS and LAPACK libraries available ( commercial, open source, vender free ). It would be nice to pick one what has been optimized for the current architecture. I would think it would be most flexible to use this interface in the back end of a chosen numeric interface ( currently VNL ). Unfortunately, I don't have as much experience with these libraries as I'd like. > > Brad > > On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: > > > Hi, > > > > I think the eigen library is a mature and very fast library for these kind of things: > > http://eigen.tuxfamily.org/index.php?title=Main_Page > > > > You may want to check it out, to see if it offers what you need. > > > > It would be great to be able to use these within the itk. > > > > 2c > > Marius > > > > -----Original Message----- > > From: Insight-developers [mailto:insight-developers-bounces at itk.org] On Behalf Of Jian Cheng > > Sent: Wednesday, March 11, 2015 23:17 > > To: Matt McCormick > > Cc: Chuck Atkins; ITK > > Subject: Re: [ITK-dev] efficiency of vnl_matrix > > > > Hi Matt, > > > > Thanks for your help, and also for the ITK workshop in UNC last time. > > > > It is very unfortunate. The efficiency of these numerical math operators are very important for many applications. > > > > I recently released an ITK based toolbox, called dmritool, for diffusion MRI data processing. > > It has some files to add some supports of blas, lapack, mkl to vnl_matrix and vnl_vector. > > http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html > > http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html > > > > Those functions are not internally for vnl_matrix class. They are operators for the data pointer stored in vnl_matrix object. > > Thus, later I made a N-dimensional array library which internally includes those functions, and also supports expression template to avoid temporary copies. > > http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html > > http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html > > > > The efficiency comparison between vnl_vector/vnl_matrix and the vector/matrix using openblas, lapack, or mkl can be found by running those two tests https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx > > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx > > > > Maybe some codes can be used as patches in somewhere in ITK. I am not sure. Maybe we need more discussion on it. > > With your help and discussion, I will be very glad to make my first patch to ITK. > > Thanks. > > > > best, > > Jian Cheng > > > > > > On 03/11/2015 04:39 PM, Matt McCormick wrote: > >> Hi Jian, > >> > >> Yes, it would be wonderful to improve the efficiency of these basic > >> numerical operations. > >> > >> Funding for the Refactor Numerical Libraries has currently ended, and > >> the effort is currently frozen. However, you are more than welcome to > >> pick it up and we can help you get it into ITK. More information on > >> the patch submission process can be found here [1] and in the ITK > >> Software Guide. > >> > >> Thanks, > >> Matt > >> > >> [1] > >> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo > >> ftwareProcess/SubmitAPatchToGerrit/index.html > >> > >> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng wrote: > >>> Hi, > >>> > >>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, etc. > >>> Thus the performance is actually mainly determined by the matrix > >>> library I used. > >>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is > >>> very inefficient because vnl matrix lib does not use blas and lapack. > >>> After I wrote my own matrix class which uses openblas and lapack, I > >>> got a hug gain of performance. > >>> > >>> I found there is a proposal to improve the efficiency of numerical > >>> libraries in ITK. > >>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries > >>> I am not sure how is the progress of the proposal. > >>> I wonder when the vnl matrix lib can internally support blas and > >>> lapack, or mkl, so that we can just use it without lose of the efficiency. > >>> Thanks. > >>> > >>> best, > >>> Jian Cheng > >>> _______________________________________________ > >>> 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 > > _______________________________________________ > > 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: -------------- next part -------------- _______________________________________________ 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 Mar 12 10:41:09 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 12 Mar 2015 10:41:09 -0400 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> Message-ID: Hi, >From the discussion so far, it appears the following serious of steps could be taken to move forward on performance: 1) Replace vnl_vector and vnl_matrix with vnl_vector_fixed and vnl_matrix_fixed when possible. 2) Add Jian Cheng's BLAS and LAPACK backends for vnl_vector and vnl_matrix. 3) Add support for armadillo or eigen. 1) and 2) will be relatively easy to make, and will hopefully have an immediate impact on performance. 3) will take make work to happen, and it will take longer to impact the toolkit. We will need to have cross-platform builds of the libraries in the repository. Also, many ITK classes encapsulate their use of VNL very poorly, so it will not be as simple as swapping out or improving their backends. 2 cents, Matt On Thu, Mar 12, 2015 at 10:20 AM, Bradley Lowekamp wrote: > Chuck, > > Thank you for giving us that important conclusion, under a quite difficult > situations. > > I wonder if there is any distinction in the usage of vnl_matrix vs > vnl_matrix_fixed. I would expect that operations done for pixel transforms > should have there dimension know at run-time and should be able to use the > vnl_matrix_fixed. > > I also have considered methods to transform a whole array of points at a > time. I wonder if for 3x3*3*256 sized operations ( scan-line size ) if there > would be benefit with the library based operations. > > Brad > > > On Mar 12, 2015, at 10:02 AM, Chuck Atkins wrote: > > I worked with Julie Langou, maintainer of LAPACK, on this project a few > years ago. The funding situation ended up very strange and messy and we > basically had to cram 3 months worth of effort into 3 weeks, so needless to > say, we were not able to really achieve our goals. However, we spent a fair > amount of time profiling ITK and analyzing it's hot spots from vnl to > determine where to best spend the small ammount of time we had. The results > were not as straight forward as we expected. It turns out that most of the > use for vnl_matrix and vnl_vector was actually for an enourmous number of > operations on very small sized vectors and matricies (dimensions of 2, 3, or > 4), often for coordinate and geometry calculations or for small per-pixel > operations that were not easily vectorized in the implementation at the > time. In these cases, the overhead of calling out to a BLAS or LAPACK > library was much too expensive and the existing use of VNL was far more > optimal. This falls apart, however when trying to use vnl for more complex > algorithms since the larger matrix operations will be where the benefit can > be seen. So just re-implementing the vnl vector and matrix classes and > operators with underlying BLAS and LAPACK routines turned out to not be the > best solution for ITK as a whole. > > - Chuck > > On Thu, Mar 12, 2015 at 8:32 AM, Bradley Lowekamp > wrote: >> >> Hello, >> >> If I was writing my own ITK classes, and needed a fast matrix library I >> would likely pursue an additional dependency on an efficient numeric library >> for that project, such as eigen. >> >> However for the broad appeal of ITK I would think a flexible back end >> would be best. As I think there are a variety of BLAS and LAPACK libraries >> available ( commercial, open source, vender free ). It would be nice to pick >> one what has been optimized for the current architecture. I would think it >> would be most flexible to use this interface in the back end of a chosen >> numeric interface ( currently VNL ). Unfortunately, I don't have as much >> experience with these libraries as I'd like. >> >> Brad >> >> On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: >> >> > Hi, >> > >> > I think the eigen library is a mature and very fast library for these >> > kind of things: >> > http://eigen.tuxfamily.org/index.php?title=Main_Page >> > >> > You may want to check it out, to see if it offers what you need. >> > >> > It would be great to be able to use these within the itk. >> > >> > 2c >> > Marius >> > >> > -----Original Message----- >> > From: Insight-developers [mailto:insight-developers-bounces at itk.org] On >> > Behalf Of Jian Cheng >> > Sent: Wednesday, March 11, 2015 23:17 >> > To: Matt McCormick >> > Cc: Chuck Atkins; ITK >> > Subject: Re: [ITK-dev] efficiency of vnl_matrix >> > >> > Hi Matt, >> > >> > Thanks for your help, and also for the ITK workshop in UNC last time. >> > >> > It is very unfortunate. The efficiency of these numerical math operators >> > are very important for many applications. >> > >> > I recently released an ITK based toolbox, called dmritool, for diffusion >> > MRI data processing. >> > It has some files to add some supports of blas, lapack, mkl to >> > vnl_matrix and vnl_vector. >> > >> > http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html >> > >> > http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html >> > >> > Those functions are not internally for vnl_matrix class. They are >> > operators for the data pointer stored in vnl_matrix object. >> > Thus, later I made a N-dimensional array library which internally >> > includes those functions, and also supports expression template to avoid >> > temporary copies. >> > >> > http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html >> > >> > http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html >> > >> > The efficiency comparison between vnl_vector/vnl_matrix and the >> > vector/matrix using openblas, lapack, or mkl can be found by running those >> > two tests >> > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx >> > >> > https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx >> > >> > Maybe some codes can be used as patches in somewhere in ITK. I am not >> > sure. Maybe we need more discussion on it. >> > With your help and discussion, I will be very glad to make my first >> > patch to ITK. >> > Thanks. >> > >> > best, >> > Jian Cheng >> > >> > >> > On 03/11/2015 04:39 PM, Matt McCormick wrote: >> >> Hi Jian, >> >> >> >> Yes, it would be wonderful to improve the efficiency of these basic >> >> numerical operations. >> >> >> >> Funding for the Refactor Numerical Libraries has currently ended, and >> >> the effort is currently frozen. However, you are more than welcome to >> >> pick it up and we can help you get it into ITK. More information on >> >> the patch submission process can be found here [1] and in the ITK >> >> Software Guide. >> >> >> >> Thanks, >> >> Matt >> >> >> >> [1] >> >> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >> >> ftwareProcess/SubmitAPatchToGerrit/index.html >> >> >> >> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng >> >> wrote: >> >>> Hi, >> >>> >> >>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, >> >>> etc. >> >>> Thus the performance is actually mainly determined by the matrix >> >>> library I used. >> >>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >> >>> very inefficient because vnl matrix lib does not use blas and lapack. >> >>> After I wrote my own matrix class which uses openblas and lapack, I >> >>> got a hug gain of performance. >> >>> >> >>> I found there is a proposal to improve the efficiency of numerical >> >>> libraries in ITK. >> >>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >> >>> I am not sure how is the progress of the proposal. >> >>> I wonder when the vnl matrix lib can internally support blas and >> >>> lapack, or mkl, so that we can just use it without lose of the >> >>> efficiency. >> >>> Thanks. >> >>> >> >>> best, >> >>> Jian Cheng >> >>> _______________________________________________ >> >>> 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 >> > _______________________________________________ >> > 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 From arnaudgelas at gmail.com Thu Mar 12 10:57:46 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 12 Mar 2015 15:57:46 +0100 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> Message-ID: <775D92BE-57F5-4B8C-B277-5C7C0C678C63@gmail.com> Hi, For linear sparse system, we have been using Eigen (using OPENBLAS, CHOLMOD) in the ITK context, here: https://github.com/MiguelAlgaba/itkEigenSolverTraits Best Arnaud > On 12 Mar 2015, at 15:41, Matt McCormick wrote: > > Hi, > > From the discussion so far, it appears the following serious of steps > could be taken to move forward on performance: > > 1) Replace vnl_vector and vnl_matrix with vnl_vector_fixed and > vnl_matrix_fixed when possible. > > 2) Add Jian Cheng's BLAS and LAPACK backends for vnl_vector and vnl_matrix. > > 3) Add support for armadillo or eigen. > > 1) and 2) will be relatively easy to make, and will hopefully have an > immediate impact on performance. 3) will take make work to happen, > and it will take longer to impact the toolkit. We will need to have > cross-platform builds of the libraries in the repository. Also, many > ITK classes encapsulate their use of VNL very poorly, so it will not > be as simple as swapping out or improving their backends. > > 2 cents, > Matt > > On Thu, Mar 12, 2015 at 10:20 AM, Bradley Lowekamp > wrote: >> Chuck, >> >> Thank you for giving us that important conclusion, under a quite difficult >> situations. >> >> I wonder if there is any distinction in the usage of vnl_matrix vs >> vnl_matrix_fixed. I would expect that operations done for pixel transforms >> should have there dimension know at run-time and should be able to use the >> vnl_matrix_fixed. >> >> I also have considered methods to transform a whole array of points at a >> time. I wonder if for 3x3*3*256 sized operations ( scan-line size ) if there >> would be benefit with the library based operations. >> >> Brad >> >> >> On Mar 12, 2015, at 10:02 AM, Chuck Atkins wrote: >> >> I worked with Julie Langou, maintainer of LAPACK, on this project a few >> years ago. The funding situation ended up very strange and messy and we >> basically had to cram 3 months worth of effort into 3 weeks, so needless to >> say, we were not able to really achieve our goals. However, we spent a fair >> amount of time profiling ITK and analyzing it's hot spots from vnl to >> determine where to best spend the small ammount of time we had. The results >> were not as straight forward as we expected. It turns out that most of the >> use for vnl_matrix and vnl_vector was actually for an enourmous number of >> operations on very small sized vectors and matricies (dimensions of 2, 3, or >> 4), often for coordinate and geometry calculations or for small per-pixel >> operations that were not easily vectorized in the implementation at the >> time. In these cases, the overhead of calling out to a BLAS or LAPACK >> library was much too expensive and the existing use of VNL was far more >> optimal. This falls apart, however when trying to use vnl for more complex >> algorithms since the larger matrix operations will be where the benefit can >> be seen. So just re-implementing the vnl vector and matrix classes and >> operators with underlying BLAS and LAPACK routines turned out to not be the >> best solution for ITK as a whole. >> >> - Chuck >> >> On Thu, Mar 12, 2015 at 8:32 AM, Bradley Lowekamp >> wrote: >>> >>> Hello, >>> >>> If I was writing my own ITK classes, and needed a fast matrix library I >>> would likely pursue an additional dependency on an efficient numeric library >>> for that project, such as eigen. >>> >>> However for the broad appeal of ITK I would think a flexible back end >>> would be best. As I think there are a variety of BLAS and LAPACK libraries >>> available ( commercial, open source, vender free ). It would be nice to pick >>> one what has been optimized for the current architecture. I would think it >>> would be most flexible to use this interface in the back end of a chosen >>> numeric interface ( currently VNL ). Unfortunately, I don't have as much >>> experience with these libraries as I'd like. >>> >>> Brad >>> >>> On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: >>> >>>> Hi, >>>> >>>> I think the eigen library is a mature and very fast library for these >>>> kind of things: >>>> http://eigen.tuxfamily.org/index.php?title=Main_Page >>>> >>>> You may want to check it out, to see if it offers what you need. >>>> >>>> It would be great to be able to use these within the itk. >>>> >>>> 2c >>>> Marius >>>> >>>> -----Original Message----- >>>> From: Insight-developers [mailto:insight-developers-bounces at itk.org] On >>>> Behalf Of Jian Cheng >>>> Sent: Wednesday, March 11, 2015 23:17 >>>> To: Matt McCormick >>>> Cc: Chuck Atkins; ITK >>>> Subject: Re: [ITK-dev] efficiency of vnl_matrix >>>> >>>> Hi Matt, >>>> >>>> Thanks for your help, and also for the ITK workshop in UNC last time. >>>> >>>> It is very unfortunate. The efficiency of these numerical math operators >>>> are very important for many applications. >>>> >>>> I recently released an ITK based toolbox, called dmritool, for diffusion >>>> MRI data processing. >>>> It has some files to add some supports of blas, lapack, mkl to >>>> vnl_matrix and vnl_vector. >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html >>>> >>>> Those functions are not internally for vnl_matrix class. They are >>>> operators for the data pointer stored in vnl_matrix object. >>>> Thus, later I made a N-dimensional array library which internally >>>> includes those functions, and also supports expression template to avoid >>>> temporary copies. >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html >>>> >>>> The efficiency comparison between vnl_vector/vnl_matrix and the >>>> vector/matrix using openblas, lapack, or mkl can be found by running those >>>> two tests >>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx >>>> >>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx >>>> >>>> Maybe some codes can be used as patches in somewhere in ITK. I am not >>>> sure. Maybe we need more discussion on it. >>>> With your help and discussion, I will be very glad to make my first >>>> patch to ITK. >>>> Thanks. >>>> >>>> best, >>>> Jian Cheng >>>> >>>> >>>> On 03/11/2015 04:39 PM, Matt McCormick wrote: >>>>> Hi Jian, >>>>> >>>>> Yes, it would be wonderful to improve the efficiency of these basic >>>>> numerical operations. >>>>> >>>>> Funding for the Refactor Numerical Libraries has currently ended, and >>>>> the effort is currently frozen. However, you are more than welcome to >>>>> pick it up and we can help you get it into ITK. More information on >>>>> the patch submission process can be found here [1] and in the ITK >>>>> Software Guide. >>>>> >>>>> Thanks, >>>>> Matt >>>>> >>>>> [1] >>>>> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >>>>> ftwareProcess/SubmitAPatchToGerrit/index.html >>>>> >>>>> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng >>>>> wrote: >>>>>> Hi, >>>>>> >>>>>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, >>>>>> etc. >>>>>> Thus the performance is actually mainly determined by the matrix >>>>>> library I used. >>>>>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >>>>>> very inefficient because vnl matrix lib does not use blas and lapack. >>>>>> After I wrote my own matrix class which uses openblas and lapack, I >>>>>> got a hug gain of performance. >>>>>> >>>>>> I found there is a proposal to improve the efficiency of numerical >>>>>> libraries in ITK. >>>>>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>>>>> I am not sure how is the progress of the proposal. >>>>>> I wonder when the vnl matrix lib can internally support blas and >>>>>> lapack, or mkl, so that we can just use it without lose of the >>>>>> efficiency. >>>>>> Thanks. >>>>>> >>>>>> best, >>>>>> Jian Cheng >>>>>> _______________________________________________ >>>>>> 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 >>>> _______________________________________________ >>>> 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: -------------- next part -------------- _______________________________________________ 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 jian.cheng.1983 at gmail.com Thu Mar 12 11:39:03 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Thu, 12 Mar 2015 11:39:03 -0400 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> Message-ID: <5501B317.3020108@gmail.com> Hi, For (2), the attachment is a comparison I made. It adds additional tests on vnl to the code from the previous link http://nghiaho.com/?p=1726 . Some header files can be downloaded from https://github.com/DiffusionMRITool/dmritool/tree/master/Modules/HelperFunctions/include Then you can build and run // With eigen // g++ -DTEST_EIGEN test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse_vnl -lopencv_core -O3 -DNDEBUG // With ARMA OpenBLAS // g++ -DTEST_ARMA test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse -lopencv_core -larmadillo -lgomp -fopenmp -lopenblas -O3 -DNDEBUG -DHAVE_INLINE // with vnl // g++ -DTEST_VNL test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse -lopencv_core -lvnl -lvnl_algo -I/usr/include/vxl/core -I/usr/include/vxl/vcl -O3 -DNDEBUG -DUTL_USE_FASTLAPACK // with vnl + openblas // g++ -DTEST_VNL_BLAS test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse -lopencv_core -lopenblas -lvnl -lvnl_algo -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 -DUTL_USE_FASTLAPACK // with vnl + mkl // g++ -DTEST_VNL_BLAS test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse -lopencv_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lvnl -lvnl_algo -I/usr/include/vxl/core -I/usr/include/vxl/vcl -O3 -DNDEBUG -DUTL_USE_FASTLAPACK // with utl+openblas // g++ -DTEST_UTL test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse -lopencv_core -lopenblas -lvnl -lvnl_algo -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 -DUTL_USE_FASTLAPACK // with utl + mkl; // g++ -DTEST_UTL test_matrix_pseudoinverse.cpp -o test_matrix_pseudoinverse -lopencv_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lvnl -lvnl_algo -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 -DUTL_USE_FASTLAPACK In my experiments, using blas functions from mkl is the most efficient way. best, Jian Cheng On 03/12/2015 10:41 AM, Matt McCormick wrote: > Hi, > > From the discussion so far, it appears the following serious of steps > could be taken to move forward on performance: > > 1) Replace vnl_vector and vnl_matrix with vnl_vector_fixed and > vnl_matrix_fixed when possible. > > 2) Add Jian Cheng's BLAS and LAPACK backends for vnl_vector and vnl_matrix. > > 3) Add support for armadillo or eigen. > > 1) and 2) will be relatively easy to make, and will hopefully have an > immediate impact on performance. 3) will take make work to happen, > and it will take longer to impact the toolkit. We will need to have > cross-platform builds of the libraries in the repository. Also, many > ITK classes encapsulate their use of VNL very poorly, so it will not > be as simple as swapping out or improving their backends. > > 2 cents, > Matt > > On Thu, Mar 12, 2015 at 10:20 AM, Bradley Lowekamp > wrote: >> Chuck, >> >> Thank you for giving us that important conclusion, under a quite difficult >> situations. >> >> I wonder if there is any distinction in the usage of vnl_matrix vs >> vnl_matrix_fixed. I would expect that operations done for pixel transforms >> should have there dimension know at run-time and should be able to use the >> vnl_matrix_fixed. >> >> I also have considered methods to transform a whole array of points at a >> time. I wonder if for 3x3*3*256 sized operations ( scan-line size ) if there >> would be benefit with the library based operations. >> >> Brad >> >> >> On Mar 12, 2015, at 10:02 AM, Chuck Atkins wrote: >> >> I worked with Julie Langou, maintainer of LAPACK, on this project a few >> years ago. The funding situation ended up very strange and messy and we >> basically had to cram 3 months worth of effort into 3 weeks, so needless to >> say, we were not able to really achieve our goals. However, we spent a fair >> amount of time profiling ITK and analyzing it's hot spots from vnl to >> determine where to best spend the small ammount of time we had. The results >> were not as straight forward as we expected. It turns out that most of the >> use for vnl_matrix and vnl_vector was actually for an enourmous number of >> operations on very small sized vectors and matricies (dimensions of 2, 3, or >> 4), often for coordinate and geometry calculations or for small per-pixel >> operations that were not easily vectorized in the implementation at the >> time. In these cases, the overhead of calling out to a BLAS or LAPACK >> library was much too expensive and the existing use of VNL was far more >> optimal. This falls apart, however when trying to use vnl for more complex >> algorithms since the larger matrix operations will be where the benefit can >> be seen. So just re-implementing the vnl vector and matrix classes and >> operators with underlying BLAS and LAPACK routines turned out to not be the >> best solution for ITK as a whole. >> >> - Chuck >> tage of the performance gains of large block matrix and vector >> operations seen with optimized BLAS and LAPACK libraries, the >> computations needed to be re-worked to act in an SoA (struct of >> arrays) fashion instead. Given our limited time and resources, this >> was out of scope for what we could tackle. >> >> * Typically AoS and SoA refer to storage layout but I'm using it to >> refer to computation layout. The terminology may not be correct but >> I think you can understand what I mean. >> On Thu, Mar 12, 2015 at 8:32 AM, Bradley Lowekamp >> wrote: >>> Hello, >>> >>> If I was writing my own ITK classes, and needed a fast matrix library I >>> would likely pursue an additional dependency on an efficient numeric library >>> for that project, such as eigen. >>> >>> However for the broad appeal of ITK I would think a flexible back end >>> would be best. As I think there are a variety of BLAS and LAPACK libraries >>> available ( commercial, open source, vender free ). It would be nice to pick >>> one what has been optimized for the current architecture. I would think it >>> would be most flexible to use this interface in the back end of a chosen >>> numeric interface ( currently VNL ). Unfortunately, I don't have as much >>> experience with these libraries as I'd like. >>> >>> Brad >>> >>> On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: >>> >>>> Hi, >>>> >>>> I think the eigen library is a mature and very fast library for these >>>> kind of things: >>>> http://eigen.tuxfamily.org/index.php?title=Main_Page >>>> >>>> You may want to check it out, to see if it offers what you need. >>>> >>>> It would be great to be able to use these within the itk. >>>> >>>> 2c >>>> Marius >>>> >>>> -----Original Message----- >>>> From: Insight-developers [mailto:insight-developers-bounces at itk.org] On >>>> Behalf Of Jian Cheng >>>> Sent: Wednesday, March 11, 2015 23:17 >>>> To: Matt McCormick >>>> Cc: Chuck Atkins; ITK >>>> Subject: Re: [ITK-dev] efficiency of vnl_matrix >>>> >>>> Hi Matt, >>>> >>>> Thanks for your help, and also for the ITK workshop in UNC last time. >>>> >>>> It is very unfortunate. The efficiency of these numerical math operators >>>> are very important for many applications. >>>> >>>> I recently released an ITK based toolbox, called dmritool, for diffusion >>>> MRI data processing. >>>> It has some files to add some supports of blas, lapack, mkl to >>>> vnl_matrix and vnl_vector. >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html >>>> >>>> Those functions are not internally for vnl_matrix class. They are >>>> operators for the data pointer stored in vnl_matrix object. >>>> Thus, later I made a N-dimensional array library which internally >>>> includes those functions, and also supports expression template to avoid >>>> temporary copies. >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html >>>> >>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html >>>> >>>> The efficiency comparison between vnl_vector/vnl_matrix and the >>>> vector/matrix using openblas, lapack, or mkl can be found by running those >>>> two tests >>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx >>>> >>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx >>>> >>>> Maybe some codes can be used as patches in somewhere in ITK. I am not >>>> sure. Maybe we need more discussion on it. >>>> With your help and discussion, I will be very glad to make my first >>>> patch to ITK. >>>> Thanks. >>>> >>>> best, >>>> Jian Cheng >>>> >>>> >>>> On 03/11/2015 04:39 PM, Matt McCormick wrote: >>>>> Hi Jian, >>>>> >>>>> Yes, it would be wonderful to improve the efficiency of these basic >>>>> numerical operations. >>>>> >>>>> Funding for the Refactor Numerical Libraries has currently ended, and >>>>> the effort is currently frozen. However, you are more than welcome to >>>>> pick it up and we can help you get it into ITK. More information on >>>>> the patch submission process can be found here [1] and in the ITK >>>>> Software Guide. >>>>> >>>>> Thanks, >>>>> Matt >>>>> >>>>> [1] >>>>> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >>>>> ftwareProcess/SubmitAPatchToGerrit/index.html >>>>> >>>>> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng >>>>> wrote: >>>>>> Hi, >>>>>> >>>>>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, >>>>>> etc. >>>>>> Thus the performance is actually mainly determined by the matrix >>>>>> library I used. >>>>>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >>>>>> very inefficient because vnl matrix lib does not use blas and lapack. >>>>>> After I wrote my own matrix class which uses openblas and lapack, I >>>>>> got a hug gain of performance. >>>>>> >>>>>> I found there is a proposal to improve the efficiency of numerical >>>>>> libraries in ITK. >>>>>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>>>>> I am not sure how is the progress of the proposal. >>>>>> I wonder when the vnl matrix lib can internally support blas and >>>>>> lapack, or mkl, so that we can just use it without lose of the >>>>>> efficiency. >>>>>> Thanks. >>>>>> >>>>>> best, >>>>>> Jian Cheng >>>>>> _______________________________________________ >>>>>> 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 >>>> _______________________________________________ >>>> 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 -------------- A non-text attachment was scrubbed... Name: test_matrix_pseudoinverse.cpp Type: text/x-c++src Size: 11455 bytes Desc: not available URL: -------------- next part -------------- _______________________________________________ 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 camargo at lncc.br Thu Mar 12 14:56:53 2015 From: camargo at lncc.br (Eduardo - LNCC) Date: Thu, 12 Mar 2015 15:56:53 -0300 Subject: [ITK] [ITK-users] abs function ambigous in Mac OS X 10.9 Message-ID: Hi, I am trying compile ITK 3.20 in the Mac OS X 10.9.5 I received the erro below and I don't figure out what have happened. Someboy can help me? [ 1%] Built target itksys [ 6%] Built target itkjpeg8 [ 11%] Built target itkjpeg12 [ 16%] Built target itkjpeg16 [ 17%] Built target itkzlib [ 18%] Built target itkpng [ 18%] Built target itkmkg3states [ 21%] Built target itktiff [ 23%] Built target itkopenjpeg [ 25%] Built target ITKMetaIO [ 28%] Built target ITKNrrdIO [ 28%] Built target ITKEXPAT [ 28%] Built target ITKznz [ 28%] Built target ITKniftiio [ 29%] Built target ITKDICOMParser [ 30%] Built target itkvcl [ 51%] Built target itkv3p_netlib [ 51%] Built target itktestlib [ 69%] Built target itkvnl [ 74%] Built target itkvnl_algo [ 76%] Built target itkNetlibSlatec [ 80%] Built target itkgdcm [ 82%] Built target itkvnl_inst [ 88%] Built target ITKCommon [ 91%] Built target ITKNumerics [ 91%] Built target ITKBasicFilters [ 91%] Built target ITKStatistics [ 91%] Built target ITKAlgorithms [ 91%] Built target ITKSpatialObject [ 96%] Built target ITKIO [ 96%] Building CXX object Code/IO/CMakeFiles/itkTestDriver.dir/itkTestDriver.o In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkTestDriver.cxx:33: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkNumericTraits.h:20: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkMacro.h:42: /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:86:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double e VCL_STATIC_CONST_INIT_FLOAT_DECL(2.7182818284590452354); ^ ~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:87:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double log2e VCL_STATIC_CONST_INIT_FLOAT_DECL(1.4426950408889634074); ^ ~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:88:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double log10e VCL_STATIC_CONST_INIT_FLOAT_DECL(0.43429448190325182765); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:89:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double ln2 VCL_STATIC_CONST_INIT_FLOAT_DECL(0.69314718055994530942); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:90:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double ln10 VCL_STATIC_CONST_INIT_FLOAT_DECL(2.30258509299404568402); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:91:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double pi VCL_STATIC_CONST_INIT_FLOAT_DECL(3.14159265358979323846); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:92:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double pi_over_2 VCL_STATIC_CONST_INIT_FLOAT_DECL(1.57079632679489661923); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:93:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double pi_over_4 VCL_STATIC_CONST_INIT_FLOAT_DECL(0.78539816339744830962); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:94:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double one_over_pi VCL_STATIC_CONST_INIT_FLOAT_DECL(0.31830988618379067154); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:95:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double two_over_pi VCL_STATIC_CONST_INIT_FLOAT_DECL(0.63661977236758134308); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:96:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double two_over_sqrtpi VCL_STATIC_CONST_INIT_FLOAT_DECL(1.12837916709551257390); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:97:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double one_over_sqrt2pi VCL_STATIC_CONST_INIT_FLOAT_DECL(0.39894228040143267794); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:98:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double sqrt2 VCL_STATIC_CONST_INIT_FLOAT_DECL(1.41421356237309504880); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:99:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double sqrt1_2 VCL_STATIC_CONST_INIT_FLOAT_DECL(0.70710678118654752440); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:102:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double eps VCL_STATIC_CONST_INIT_FLOAT_DECL(2.2204460492503131e-16); ^ ~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:103:36: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const double sqrteps VCL_STATIC_CONST_INIT_FLOAT_DECL(1.490116119384766e-08); ^ ~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:105:35: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const float float_eps VCL_STATIC_CONST_INIT_FLOAT_DECL(1.192092896e-07f); ^ ~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:106:35: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init] static VNL_DLL_DATA const float float_sqrteps VCL_STATIC_CONST_INIT_FLOAT_DECL(3.4526698307e-4f); ^ ~~~~~~~~~~~~~~~~ In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkTestDriver.cxx:35: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkImage.h:20: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkImageBase.h:25: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkImageRegion.h:27: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkContinuousIndex.h:20: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkPoint.h:23: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkVector.h:23: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_vector_ref.h:20: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_vector.h:20: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_c_vector.h:25: /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:340:22: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init] static const float zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0F); ^ ~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:342:22: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init] static const float one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0F); ^ ~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:344:22: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init] static const float maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(3.40282346638528860e+38F); ^ ~~~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:363:23: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static const double zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0); ^ ~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:365:23: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static const double one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0); ^ ~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:367:23: warning: in-class initializer for static data member of type 'const double' is a GNU extension [-Wgnu-static-float-init] static const double maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308); ^ ~~~~~~~~~~~~~~~~~~~~~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:386:28: warning: in-class initializer for static data member of type 'const long double' is a GNU extension [-Wgnu-static-float-init] static const long double zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0); ^ ~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:388:28: warning: in-class initializer for static data member of type 'const long double' is a GNU extension [-Wgnu-static-float-init] static const long double one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0); ^ ~~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:390:28: warning: in-class initializer for static data member of type 'const long double' is a GNU extension [-Wgnu-static-float-init] static const long double maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308); ^ ~~~~~~~~~~~~~~~~~~~~~~~ In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkTestDriver.cxx:33: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkNumericTraits.h:32: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/complex:939:16: error: call to 'abs' is ambiguous return abs(__c.real()); ^~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkDefaultConvertPixelTraits.h:294:1: note: in instantiation of function template specialization 'std::__1::norm' requested here ITK_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(unsigned int); ^ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkDefaultConvertPixelTraits.h:287:17: note: expanded from macro 'ITK_DEFAULTCONVERTTRAITS_COMPLEX_TYPE' return std::norm(pixel); \ ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/stdlib.h:129:6: note: candidate function int abs(int) __pure2; ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:660:1: note: candidate function abs(float __x) _NOEXCEPT {return fabsf(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:664:1: note: candidate function abs(double __x) _NOEXCEPT {return fabs(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:668:1: note: candidate function abs(long double __x) _NOEXCEPT {return fabsl(__x);} ^ In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkTestDriver.cxx:33: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkNumericTraits.h:32: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/complex:941:16: error: call to 'abs' is ambiguous return abs(__c.imag()); ^~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/stdlib.h:129:6: note: candidate function int abs(int) __pure2; ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:660:1: note: candidate function abs(float __x) _NOEXCEPT {return fabsf(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:664:1: note: candidate function abs(double __x) _NOEXCEPT {return fabs(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:668:1: note: candidate function abs(long double __x) _NOEXCEPT {return fabsl(__x);} ^ In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkTestDriver.cxx:33: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkNumericTraits.h:32: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/complex:939:16: error: call to 'abs' is ambiguous return abs(__c.real()); ^~~ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkDefaultConvertPixelTraits.h:298:1: note: in instantiation of function template specialization 'std::__1::norm' requested here ITK_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(unsigned long); ^ /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkDefaultConvertPixelTraits.h:287:17: note: expanded from macro 'ITK_DEFAULTCONVERTTRAITS_COMPLEX_TYPE' return std::norm(pixel); \ ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/stdlib.h:129:6: note: candidate function int abs(int) __pure2; ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:660:1: note: candidate function abs(float __x) _NOEXCEPT {return fabsf(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:664:1: note: candidate function abs(double __x) _NOEXCEPT {return fabs(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:668:1: note: candidate function abs(long double __x) _NOEXCEPT {return fabsl(__x);} ^ In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkTestDriver.cxx:33: In file included from /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkNumericTraits.h:32: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/complex:941:16: error: call to 'abs' is ambiguous return abs(__c.imag()); ^~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/stdlib.h:129:6: note: candidate function int abs(int) __pure2; ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:660:1: note: candidate function abs(float __x) _NOEXCEPT {return fabsf(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:664:1: note: candidate function abs(double __x) _NOEXCEPT {return fabs(__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:668:1: note: candidate function abs(long double __x) _NOEXCEPT {return fabsl(__x);} ^ 27 warnings and 4 errors generated. make[2]: *** [Code/IO/CMakeFiles/itkTestDriver.dir/itkTestDriver.o] Error 1 make[1]: *** [Code/IO/CMakeFiles/itkTestDriver.dir/all] Error 2 make: *** [all] Error 2 Atenciosamente, Eduardo Camargo, M.Sc. Analista de Sistemas Instituto Nacional de Ci?ncia e Tecnologia em Medicina Assistida por Computa??o Cient?fica INCT-MACC http://macc.lncc.br Laborat?rio Nacional de Computa??o Cient?fica LNCC - http://www.lncc.br -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From gabrielgimenez85 at gmail.com Thu Mar 12 15:24:05 2015 From: gabrielgimenez85 at gmail.com (=?UTF-8?Q?Gabriel_A=2E_Gim=C3=A9nez?=) Date: Thu, 12 Mar 2015 16:24:05 -0300 Subject: [ITK] [ITK-users] Mattes Mutual Information Speed with 3D Images In-Reply-To: References: <1425942141529-7586971.post@n2.nabble.com> <069517FAB08E5D4C80ABEB86CB55A1AB4CEF83A8@BHMF314A.SIRONA.ORG> <069517FAB08E5D4C80ABEB86CB55A1AB4CEFB491@BHMF314A.SIRONA.ORG> <069517FAB08E5D4C80ABEB86CB55A1AB4CEFB4C3@BHMF314A.SIRONA.ORG> Message-ID: Hi! I debug the code of the MMI implementation and the bottleneck is in in this part: *itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx:* template< typename TImageToImageMetricv4 > void ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 > ::*ThreadedExecution* ( const DomainType & indexSubRange, const ThreadIdType threadId ) { //Initialize per thread buffers and variables. this->m_Associate->InitializeThread( threadId ); typename TImageToImageMetricv4::VirtualPointSetType::ConstPointer virtualSampledPointSet = this->m_Associate->GetVirtualSampledPointSet(); typedef typename TImageToImageMetricv4::VirtualPointSetType::MeshTraits::PointIdentifier ElementIdentifierType; const ElementIdentifierType begin = indexSubRange[0]; const ElementIdentifierType end = indexSubRange[1]; VirtualIndexType virtualIndex; typename VirtualImageType::ConstPointer virtualImage = this->m_Associate->GetVirtualImage(); * for( ElementIdentifierType i = begin; i <= end; ++i )* * {* * const VirtualPointType & virtualPoint = virtualSampledPointSet->GetPoint( i );* * virtualImage->TransformPhysicalPointToIndex( virtualPoint, virtualIndex );* * this->ProcessVirtualPoint( virtualIndex, virtualPoint, threadId );* * }* //Finalize per thread actions this->m_Associate->FinalizeThread( threadId ); } The "for" statement takes a long time to finish running... and I think the default multithreaded is 2...I tried to raise this value through seter "SetMaximumNumberOfThreads()" but did not notice substantial improvements in performance .. However, when set build-type to "release" instead "debug" the performance is much better (2 ~ 3 sec.) but without reaching to the order of milliseconds....would I like it to be. I could not do the test with the ITK 3D Slicer (my OS is of 32-bits only). What do you think? can further improve performance? Thanks and regards! 2015-03-11 9:37 GMT-03:00 Gabriel A. Gim?nez : > Ok...I understand...,I'll try...and I commented the results.... > > Thanks in advance! > > 2015-03-11 9:26 GMT-03:00 Braun Tim : > > Yes, exactly. If you compile ITK e.g. with Visual Studio, you can set >> the compile profile either to ?debug?, which is slow but allows the >> debugger to stop at breakpoints etc, and ?release?, which is much faster >> due to enabled optimizations but cannot be debugged easily.. If you have >> trouble compiling ITK, there are some good youtube tutorials around >> covering this topic. >> >> >> >> *Von:* Gabriel A. Gim?nez [mailto:gabrielgimenez85 at gmail.com] >> *Gesendet:* Mittwoch, 11. M?rz 2015 13:21 >> >> *An:* Braun Tim >> *Betreff:* Re: [ITK] [ITK-users] Mattes Mutual Information Speed with 3D >> Images >> >> >> >> Hi! thank you very much for your answer! >> >> I'll try the alternatives do you recommend me...,I do not understand the >> execution mode "Release" ? it is a compile option? >> >> >> >> Regards! >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> 2015-03-11 6:18 GMT-03:00 Braun Tim : >> >> Hi Gabriel, >> >> >> >> this is several orders of magnitude slower than it should be, so I assume >> there is something weird going on. Applying the metric should take a couple >> of milliseconds, not longer. Did you compile ITK from source yourself? Then >> you should be able to use the ?DEBUG? configuration to trace into the >> metric evaluation and find out what the performance bottleneck is ? that?s >> probably faster than empirical testing.. Running the algorithm must be done >> in release mode, of course. Another option would be to try the ITK Slicer >> program, which contains the Brainsfit algorithm which uses MMI for >> registration ? here, you can try different parameters and check the >> runtime.. >> >> >> >> cheers, Tim >> >> >> >> >> >> *Von:* Gabriel A. Gim?nez [mailto:gabrielgimenez85 at gmail.com] >> *Gesendet:* Dienstag, 10. M?rz 2015 13:33 >> *An:* Braun Tim >> *Betreff:* Re: [ITK] [ITK-users] Mattes Mutual Information Speed with 3D >> Images >> >> >> >> Hi Braun, thanks for your answer... >> >> >> >> I use images of RIRE BD (http://www.insight-journal.org/rire/), my >> initial tests I make with package training_001 (CT - MR_PD). Following your >> recommendation here is my configuration: >> >> >> >> >> >> metric->SetNumberOfHistogramBins( 50 ); >> >> double samplingPercentage = 0.002; >> >> registration->SetMetricSamplingPercentage( samplingPercentage ); >> >> RegistrationType::MetricSamplingStrategyType samplingStrategy = >> >> >> RegistrationType::REGULAR; >> >> >> >> Unfortunately, the results were not good ... the average execution time >> remains the same (25 ~ 30 seconds). With a population size equal to 50, the >> execution time of an iteration is in the order of 25 minutes, very slow for >> me ... >> >> >> >> These are the image data: >> >> >> >> Fixed Image: >> >> ObjectType = Image >> >> NDims = 3 >> >> BinaryDataByteOrderMSB = True >> >> AnatomicalOrientation = LPH >> >> ElementSpacing = 0.653595 0.653595 4.000000 >> >> *DimSize = 512 512 29* >> >> ElementType = MET_SHORT >> >> ElementDataFile = image.bin >> >> >> >> Moving Image: >> >> ObjectType = Image >> >> NDims = 3 >> >> BinaryDataByteOrderMSB = True >> >> AnatomicalOrientation = LPH >> >> ElementSpacing = 1.250000 1.250000 4.000000 >> >> *DimSize = 256 256 26* >> >> ElementType = MET_SHORT >> >> ElementDataFile = image.bin >> >> >> >> >> >> Thanks and regards! >> >> >> >> >> >> >> >> >> >> 2015-03-10 5:51 GMT-03:00 Braun Tim : >> >> Hi Gabriel, >> >> the easiest way to speed up the metric calculation I can think of >> (without having more detailed information about your setup) is to reduce >> the numbers of samples used to build the MMI histogram estimates. For 256^3 >> Voxel Volumes, we typically use a value of 0.002. You can set the sampling >> percentage in the registration method that manages the metric and the >> optimizer: >> >> >> registrationMethod->SetMetricSamplingStrategy(ImageRegistrationMethodTypev4::REGULAR); >> registrationMethod->SetMetricSamplingPercentage(0.002); >> >> Another way to speed up calculation would be to reduce the resolution of >> the registered volumes - which is somewhat similar to reducing the sampling >> percentage, but has memory benefits and might reduce aliasing.. >> >> >> Hope that helps! >> >> Cheers, >> Tim >> >> -----Urspr?ngliche Nachricht----- >> Von: Community [mailto:community-bounces at itk.org] Im Auftrag von Gabriel >> A. Gim?nez >> Gesendet: Dienstag, 10. M?rz 2015 00:02 >> An: insight-users at itk.org >> Betreff: [ITK] [ITK-users] Mattes Mutual Information Speed with 3D Images >> >> >> Hello everyone... >> >> I'm working on a genetic optimizer for Rigid 3D Registration. >> >> The fitness of each individual is calculated using Mattes Mutual >> Information, the execution time of the metric is high ... (30 seconds on >> average). This makes the registration too slow. >> >> Any recommendations? could improve the performance metrics? otherwise >> most appropriate metric? >> >> Regards! >> >> >> >> -- >> View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/Mattes-Mutual-Information-Speed-with-3D-Images-tp7586971.html >> Sent from the ITK Insight Users mailing list archive at Nabble.com. >> _____________________________________ >> 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://www.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-users >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> >> >> >> ----------------------------------------------------------------------------------------------------------- >> Sirona Dental Systems GmbH * HRB 24948 * >> Vorsitzender des Aufsichtsrats: Dr. Erich Blum * >> Sirona Dental Services GmbH * HRB 25817 * >> Geschaeftsfuehrung: Rainer Berthan * Michael Geil * >> Sitz der Gesellschaften: Bensheim * Registergericht: AG Darmstadt * >> >> ------------------------------------------------------------------------------------------------------------ >> Diese E-Mail ist ausschliesslich fuer den angesprochenen Adressaten >> bestimmt und kann vertrauliche Informationen beinhalten. >> -- >> This e-mail is intended only for the designated recipient(s). It may >> contain confidential or proprietary information. >> >> ------------------------------------------------------------------------------------------------------------ >> >> >> >> >> >> -- >> >> *Gabriel Alberto Gim?nez.* >> >> >> >> >> ----------------------------------------------------------------------------------------------------------- >> Sirona Dental Systems GmbH ? HRB 24948 ? >> >> Vorsitzender des Aufsichtsrats: Dr. Erich Blum ? >> Sirona Dental Services GmbH ? HRB 25817 ? >> Gesch?ftsf?hrung: Rainer Berthan ? Michael Geil ? >> Sitz der Gesellschaften: Bensheim ? Registergericht: AG Darmstadt ? >> >> ------------------------------------------------------------------------------------------------------------ >> Diese E-Mail ist ausschliesslich fuer den angesprochenen Adressaten >> bestimmt und kann vertrauliche Informationen beinhalten. >> -- >> This e-mail is intended only for the designated recipient(s). It may >> contain confidential or proprietary information. >> >> ------------------------------------------------------------------------------------------------------------ >> >> >> >> >> >> -- >> >> *Gabriel Alberto Gim?nez.* >> > > > > -- > *Gabriel Alberto Gim?nez.* > -- *Gabriel Alberto Gim?nez.* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Thu Mar 12 16:11:12 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 12 Mar 2015 16:11:12 -0400 Subject: [ITK] [ITK-users] abs function ambigous in Mac OS X 10.9 In-Reply-To: References: Message-ID: Hello, This issue has been addressed in ITKv4. Please use ITKv4 or backport a patch to the "release-3.20" Git branch and share it it with the list. Thanks, Matt On Thu, Mar 12, 2015 at 2:56 PM, Eduardo - LNCC wrote: > Hi, > > I am trying compile ITK 3.20 in the Mac OS X 10.9.5 I received the erro > below and I don't figure out what have happened. Someboy can help me? > > > [ 1%] Built target itksys > [ 6%] Built target itkjpeg8 > [ 11%] Built target itkjpeg12 > [ 16%] Built target itkjpeg16 > [ 17%] Built target itkzlib > [ 18%] Built target itkpng > [ 18%] Built target itkmkg3states > [ 21%] Built target itktiff > [ 23%] Built target itkopenjpeg > [ 25%] Built target ITKMetaIO > [ 28%] Built target ITKNrrdIO > [ 28%] Built target ITKEXPAT > [ 28%] Built target ITKznz > [ 28%] Built target ITKniftiio > [ 29%] Built target ITKDICOMParser > [ 30%] Built target itkvcl > [ 51%] Built target itkv3p_netlib > [ 51%] Built target itktestlib > [ 69%] Built target itkvnl > [ 74%] Built target itkvnl_algo > [ 76%] Built target itkNetlibSlatec > [ 80%] Built target itkgdcm > [ 82%] Built target itkvnl_inst > [ 88%] Built target ITKCommon > [ 91%] Built target ITKNumerics > [ 91%] Built target ITKBasicFilters > [ 91%] Built target ITKStatistics > [ 91%] Built target ITKAlgorithms > [ 91%] Built target ITKSpatialObject > [ 96%] Built target ITKIO > [ 96%] Building CXX object > Code/IO/CMakeFiles/itkTestDriver.dir/itkTestDriver.o > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkTestDriver.cxx:33: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkNumericTraits.h:20: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkMacro.h:42: > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:86:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double e > VCL_STATIC_CONST_INIT_FLOAT_DECL(2.7182818284590452354); > ^ > ~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:87:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double log2e > VCL_STATIC_CONST_INIT_FLOAT_DECL(1.4426950408889634074); > ^ > ~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:88:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double log10e > VCL_STATIC_CONST_INIT_FLOAT_DECL(0.43429448190325182765); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:89:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double ln2 > VCL_STATIC_CONST_INIT_FLOAT_DECL(0.69314718055994530942); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:90:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double ln10 > VCL_STATIC_CONST_INIT_FLOAT_DECL(2.30258509299404568402); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:91:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double pi > VCL_STATIC_CONST_INIT_FLOAT_DECL(3.14159265358979323846); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:92:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double pi_over_2 > VCL_STATIC_CONST_INIT_FLOAT_DECL(1.57079632679489661923); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:93:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double pi_over_4 > VCL_STATIC_CONST_INIT_FLOAT_DECL(0.78539816339744830962); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:94:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double one_over_pi > VCL_STATIC_CONST_INIT_FLOAT_DECL(0.31830988618379067154); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:95:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double two_over_pi > VCL_STATIC_CONST_INIT_FLOAT_DECL(0.63661977236758134308); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:96:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double two_over_sqrtpi > VCL_STATIC_CONST_INIT_FLOAT_DECL(1.12837916709551257390); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:97:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double one_over_sqrt2pi > VCL_STATIC_CONST_INIT_FLOAT_DECL(0.39894228040143267794); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:98:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double sqrt2 > VCL_STATIC_CONST_INIT_FLOAT_DECL(1.41421356237309504880); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:99:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double sqrt1_2 > VCL_STATIC_CONST_INIT_FLOAT_DECL(0.70710678118654752440); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:102:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double eps > VCL_STATIC_CONST_INIT_FLOAT_DECL(2.2204460492503131e-16); > ^ > ~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:103:36: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const double sqrteps > VCL_STATIC_CONST_INIT_FLOAT_DECL(1.490116119384766e-08); > ^ > ~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:105:35: > warning: in-class initializer for static data member of type 'const float' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const float float_eps > VCL_STATIC_CONST_INIT_FLOAT_DECL(1.192092896e-07f); > ^ > ~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_math.h:106:35: > warning: in-class initializer for static data member of type 'const float' > is a GNU extension [-Wgnu-static-float-init] > static VNL_DLL_DATA const float float_sqrteps > VCL_STATIC_CONST_INIT_FLOAT_DECL(3.4526698307e-4f); > ^ > ~~~~~~~~~~~~~~~~ > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkTestDriver.cxx:35: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkImage.h:20: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkImageBase.h:25: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkImageRegion.h:27: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkContinuousIndex.h:20: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkPoint.h:23: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkVector.h:23: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_vector_ref.h:20: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_vector.h:20: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_c_vector.h:25: > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:340:22: > warning: in-class initializer for static data member of type 'const float' > is a GNU extension [-Wgnu-static-float-init] > static const float zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0F); > ^ ~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:342:22: > warning: in-class initializer for static data member of type 'const float' > is a GNU extension [-Wgnu-static-float-init] > static const float one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0F); > ^ ~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:344:22: > warning: in-class initializer for static data member of type 'const float' > is a GNU extension [-Wgnu-static-float-init] > static const float maxval > VCL_STATIC_CONST_INIT_FLOAT_DECL(3.40282346638528860e+38F); > ^ > ~~~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:363:23: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static const double zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0); > ^ ~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:365:23: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static const double one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0); > ^ ~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:367:23: > warning: in-class initializer for static data member of type 'const double' > is a GNU extension [-Wgnu-static-float-init] > static const double maxval > VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308); > ^ > ~~~~~~~~~~~~~~~~~~~~~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:386:28: > warning: in-class initializer for static data member of type 'const long > double' is a GNU extension [-Wgnu-static-float-init] > static const long double zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0); > ^ ~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:388:28: > warning: in-class initializer for static data member of type 'const long > double' is a GNU extension [-Wgnu-static-float-init] > static const long double one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0); > ^ ~~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Utilities/vxl/core/vnl/vnl_numeric_traits.h:390:28: > warning: in-class initializer for static data member of type 'const long > double' is a GNU extension [-Wgnu-static-float-init] > static const long double maxval > VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308); > ^ > ~~~~~~~~~~~~~~~~~~~~~~~ > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkTestDriver.cxx:33: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkNumericTraits.h:32: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/complex:939:16: > error: call to 'abs' is ambiguous > return abs(__c.real()); > ^~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkDefaultConvertPixelTraits.h:294:1: > note: in instantiation of function template specialization > 'std::__1::norm' requested here > ITK_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(unsigned int); > ^ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkDefaultConvertPixelTraits.h:287:17: > note: expanded from macro 'ITK_DEFAULTCONVERTTRAITS_COMPLEX_TYPE' > return std::norm(pixel); \ > ^ > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/stdlib.h:129:6: > note: candidate function > int abs(int) __pure2; > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: > note: candidate function > inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT > {return labs(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: > note: candidate function > inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT > {return llabs(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:660:1: > note: candidate function > abs(float __x) _NOEXCEPT {return fabsf(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:664:1: > note: candidate function > abs(double __x) _NOEXCEPT {return fabs(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:668:1: > note: candidate function > abs(long double __x) _NOEXCEPT {return fabsl(__x);} > ^ > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkTestDriver.cxx:33: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkNumericTraits.h:32: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/complex:941:16: > error: call to 'abs' is ambiguous > return abs(__c.imag()); > ^~~ > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/stdlib.h:129:6: > note: candidate function > int abs(int) __pure2; > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: > note: candidate function > inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT > {return labs(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: > note: candidate function > inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT > {return llabs(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:660:1: > note: candidate function > abs(float __x) _NOEXCEPT {return fabsf(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:664:1: > note: candidate function > abs(double __x) _NOEXCEPT {return fabs(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:668:1: > note: candidate function > abs(long double __x) _NOEXCEPT {return fabsl(__x);} > ^ > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkTestDriver.cxx:33: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkNumericTraits.h:32: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/complex:939:16: > error: call to 'abs' is ambiguous > return abs(__c.real()); > ^~~ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkDefaultConvertPixelTraits.h:298:1: > note: in instantiation of function template specialization > 'std::__1::norm' requested here > ITK_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(unsigned long); > ^ > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkDefaultConvertPixelTraits.h:287:17: > note: expanded from macro 'ITK_DEFAULTCONVERTTRAITS_COMPLEX_TYPE' > return std::norm(pixel); \ > ^ > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/stdlib.h:129:6: > note: candidate function > int abs(int) __pure2; > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: > note: candidate function > inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT > {return labs(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: > note: candidate function > inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT > {return llabs(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:660:1: > note: candidate function > abs(float __x) _NOEXCEPT {return fabsf(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:664:1: > note: candidate function > abs(double __x) _NOEXCEPT {return fabs(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:668:1: > note: candidate function > abs(long double __x) _NOEXCEPT {return fabsl(__x);} > ^ > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/IO/itkTestDriver.cxx:33: > In file included from > /Users/hemolab/Documents/workspace/libs/InsightToolkit-3.16.0/Code/Common/itkNumericTraits.h:32: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/complex:941:16: > error: call to 'abs' is ambiguous > return abs(__c.imag()); > ^~~ > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/stdlib.h:129:6: > note: candidate function > int abs(int) __pure2; > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: > note: candidate function > inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT > {return labs(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: > note: candidate function > inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT > {return llabs(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:660:1: > note: candidate function > abs(float __x) _NOEXCEPT {return fabsf(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:664:1: > note: candidate function > abs(double __x) _NOEXCEPT {return fabs(__x);} > ^ > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:668:1: > note: candidate function > abs(long double __x) _NOEXCEPT {return fabsl(__x);} > ^ > 27 warnings and 4 errors generated. > make[2]: *** [Code/IO/CMakeFiles/itkTestDriver.dir/itkTestDriver.o] Error 1 > make[1]: *** [Code/IO/CMakeFiles/itkTestDriver.dir/all] Error 2 > make: *** [all] Error 2 > > Atenciosamente, > > > Eduardo Camargo, M.Sc. > > Analista de Sistemas > Instituto Nacional de Ci?ncia e Tecnologia em > Medicina Assistida por Computa??o Cient?fica > INCT-MACC http://macc.lncc.br > Laborat?rio Nacional de Computa??o Cient?fica > LNCC - http://www.lncc.br > > _____________________________________ > 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://www.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-users > _____________________________________ 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://www.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-users From jian.cheng.1983 at gmail.com Thu Mar 12 17:44:14 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Thu, 12 Mar 2015 17:44:14 -0400 Subject: [ITK] [ITK-dev] ITK changes VTK_LIBRARIES? Message-ID: <550208AE.8070100@gmail.com> Hi, The the recent release of ITK may changes VTK_LIBRARIES, when I build ITK with VTK, i.e. set on Module_ITKVtkGlue or Module_WikiExamples. Please see the attached toy example, and check if the issue can be reproduced on your side. Thanks. I am using ITK 4.7.1, VTK 6.1.0, cmake 2.8.12.2. If I build ITK with VTK, VTK_LIBRARIES will be changed to VTK_LIBRARIES=vtkCommonCore;vtksys , even if I find ITK first before I find VTK. If I build ITK without VTK, everything is fine. A workaround is to find VTK first, then copy VTK_LIBRARIES to a variable, then find ITK and copy VTK_LIBRARIES back. best, Jian Cheng -------------- next part -------------- project( itkEigenSolverTraits ) cmake_minimum_required( VERSION 2.8 ) find_package( VTK REQUIRED ) include( ${VTK_USE_FILE} ) set(VTK_LIBRARIES_back ${VTK_LIBRARIES}) message("VTK_LIBRARIES=${VTK_LIBRARIES}") find_package( ITK REQUIRED ) include( ${ITK_USE_FILE} ) # set(VTK_LIBRARIES ${VTK_LIBRARIES_back}) message("VTK_LIBRARIES=${VTK_LIBRARIES}") message("ITK_LIBRARIES=${ITK_LIBRARIES}") add_executable(main main.cxx) target_link_libraries(main ${ITK_LIBRARIES} ${VTK_LIBRARIES}) -------------- next part -------------- #include "itkImage.h" int main (int argc, char const* argv[]) { typedef itk::Image ImageType; ImageType::Pointer image = ImageType::New(); return 0; } -------------- next part -------------- _______________________________________________ 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 gaetan.lehmann at gmail.com Thu Mar 12 17:49:05 2015 From: gaetan.lehmann at gmail.com (Gaetan Lehmann) Date: Thu, 12 Mar 2015 22:49:05 +0100 Subject: [ITK] [ITK-users] apply color map to a label map with overlapping label objects? In-Reply-To: References: Message-ID: Hi Arnaud, Converting a label map with overlapping objects to an image usually works quite badly, and itk::LabelMapOverlayImageFilter is no exception. The overlapping zones must be removed first, for example with itk::UniqueLableMapFilter. This may not be what you want though. What would you expect as output for the overlapping objects? Regards, Ga?tan 2015-03-10 10:30 GMT+01:00 Arnaud Gelas : > Hi all, > > I would like to colorize one label map with overlapping label objects. I > know there is itk::LabelMapOverlayImageFilter but would it work on such a > case? (could be wrong, but based on the code it does not seem so) > > Thanks > Arnaud -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matimontg at gmail.com Thu Mar 12 19:26:47 2015 From: matimontg at gmail.com (Matias Montroull) Date: Thu, 12 Mar 2015 20:26:47 -0300 Subject: [ITK] [ITK-users] Registration in SimpleITK In-Reply-To: References: Message-ID: Hi Brad, thanks for the explanation. I'm using C#, would that be the same process? On Wed, Mar 11, 2015 at 8:56 PM, Bradley Lowekamp wrote: > Hello, > > If you are willing to compile it yourself you can get it to work with just > a little bit of effort. > > Compile the SimpleITK superbuild with shared libraries enabled. Do the > usual installation of SimpleITK from the super build [1], this will install > the SimpleITK python library into your site-packages. However, this > libraries also depends on all the SimpleITK an ITK dlls (not installed or > packaged), these should be in the superbuild's bin directory. These need to > be in your run-time path when importing SimpleITK. This can be done either > by modifying you PATH environment variable you copying them to the > appropriate place ( which may depend on the python environment, and there > are likely several alternatives). > > Brad > > [1] http://www.itk.org/Wiki/SimpleITK/GettingStarted#Python_installation > > On Mar 11, 2015, at 7:31 PM, Matias Montroull wrote: > > > My project is using 64 bits and some DLL I use as well, I've ran into > issues when using the beta version because is 32 bits. I guess I'll wait > until the final release is done. > Thanks, > Matias. > > On Wed, Mar 11, 2015 at 7:54 PM, Matias Montroull > wrote: > >> Thanks Bradley, I'll give it a try. I downloaded version 0.8.1 but wasn't >> aware of this new Beta release >> Thanks, >> Matias. >> >> On Wed, Mar 11, 2015 at 7:46 PM, Bradley Lowekamp > > wrote: >> >>> Hello Matias, >>> >>> Currently there is SimpleITK 0.9b01 [1] out with the registration >>> framework. >>> >>> With it you can do things like this: >>> >>> http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/56_VH_Registration1.html >>> or >>> >>> http://www.itk.org/SimpleITKDoxygen/html/ImageRegistrationMethod2_8py-example.html >>> >>> Please give it a try and let us know how it work for you. >>> >>> Enjoy, >>> Brad >>> >>> [1] >>> http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#SimpleITK_-_Version_0.9.0_Release >>> >>> On Mar 11, 2015, at 6:32 PM, Matias Montroull >>> wrote: >>> >>> Hi, >>> >>> is it possible to do registration in SimpleITK? I mean, something like >>> in this example: >>> >>> http://public.kitware.com/cgi-bin/viewcvs.cgi/Insight/Examples/Registration/ImageRegistration2.cxx?view=markup >>> >>> Thanks, >>> >>> Matias, >>> _____________________________________ >>> 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://www.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-users >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >>> >>> >>> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Thu Mar 12 19:30:47 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 12 Mar 2015 19:30:47 -0400 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: <5501B317.3020108@gmail.com> References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> <5501B317.3020108@gmail.com> Message-ID: Hi Jian, Thanks for sharing these performance testing coding. As Chuck also demonstrated, measuring performance is critical for real progress. Thanks, Matt On Thu, Mar 12, 2015 at 11:39 AM, Jian Cheng wrote: > Hi, > > For (2), the attachment is a comparison I made. > It adds additional tests on vnl to the code from the previous link > http://nghiaho.com/?p=1726 . > Some header files can be downloaded from > https://github.com/DiffusionMRITool/dmritool/tree/master/Modules/HelperFunctions/include > > Then you can build and run > // With eigen > // g++ -DTEST_EIGEN test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse_vnl -lopencv_core -O3 -DNDEBUG > > // With ARMA OpenBLAS > // g++ -DTEST_ARMA test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -larmadillo -lgomp -fopenmp > -lopenblas -O3 -DNDEBUG -DHAVE_INLINE > > // with vnl > // g++ -DTEST_VNL test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -O3 -DNDEBUG > -DUTL_USE_FASTLAPACK > > // with vnl + openblas > // g++ -DTEST_VNL_BLAS test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lopenblas -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 > -DUTL_USE_FASTLAPACK > // with vnl + mkl > // g++ -DTEST_VNL_BLAS test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lmkl_intel_lp64 > -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -O3 -DNDEBUG > -DUTL_USE_FASTLAPACK > > // with utl+openblas > // g++ -DTEST_UTL test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lopenblas -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 > -DUTL_USE_FASTLAPACK > // with utl + mkl; > // g++ -DTEST_UTL test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lmkl_intel_lp64 > -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 > -DUTL_USE_FASTLAPACK > > In my experiments, using blas functions from mkl is the most efficient way. > > best, > Jian Cheng > > On 03/12/2015 10:41 AM, Matt McCormick wrote: >> Hi, >> >> From the discussion so far, it appears the following serious of steps >> could be taken to move forward on performance: >> >> 1) Replace vnl_vector and vnl_matrix with vnl_vector_fixed and >> vnl_matrix_fixed when possible. >> >> 2) Add Jian Cheng's BLAS and LAPACK backends for vnl_vector and vnl_matrix. >> >> 3) Add support for armadillo or eigen. >> >> 1) and 2) will be relatively easy to make, and will hopefully have an >> immediate impact on performance. 3) will take make work to happen, >> and it will take longer to impact the toolkit. We will need to have >> cross-platform builds of the libraries in the repository. Also, many >> ITK classes encapsulate their use of VNL very poorly, so it will not >> be as simple as swapping out or improving their backends. >> >> 2 cents, >> Matt >> >> On Thu, Mar 12, 2015 at 10:20 AM, Bradley Lowekamp >> wrote: >>> Chuck, >>> >>> Thank you for giving us that important conclusion, under a quite difficult >>> situations. >>> >>> I wonder if there is any distinction in the usage of vnl_matrix vs >>> vnl_matrix_fixed. I would expect that operations done for pixel transforms >>> should have there dimension know at run-time and should be able to use the >>> vnl_matrix_fixed. >>> >>> I also have considered methods to transform a whole array of points at a >>> time. I wonder if for 3x3*3*256 sized operations ( scan-line size ) if there >>> would be benefit with the library based operations. >>> >>> Brad >>> >>> >>> On Mar 12, 2015, at 10:02 AM, Chuck Atkins wrote: >>> >>> I worked with Julie Langou, maintainer of LAPACK, on this project a few >>> years ago. The funding situation ended up very strange and messy and we >>> basically had to cram 3 months worth of effort into 3 weeks, so needless to >>> say, we were not able to really achieve our goals. However, we spent a fair >>> amount of time profiling ITK and analyzing it's hot spots from vnl to >>> determine where to best spend the small ammount of time we had. The results >>> were not as straight forward as we expected. It turns out that most of the >>> use for vnl_matrix and vnl_vector was actually for an enourmous number of >>> operations on very small sized vectors and matricies (dimensions of 2, 3, or >>> 4), often for coordinate and geometry calculations or for small per-pixel >>> operations that were not easily vectorized in the implementation at the >>> time. In these cases, the overhead of calling out to a BLAS or LAPACK >>> library was much too expensive and the existing use of VNL was far more >>> optimal. This falls apart, however when trying to use vnl for more complex >>> algorithms since the larger matrix operations will be where the benefit can >>> be seen. So just re-implementing the vnl vector and matrix classes and >>> operators with underlying BLAS and LAPACK routines turned out to not be the >>> best solution for ITK as a whole. >>> >>> - Chuck >>> tage of the performance gains of large block matrix and vector >>> operations seen with optimized BLAS and LAPACK libraries, the >>> computations needed to be re-worked to act in an SoA (struct of >>> arrays) fashion instead. Given our limited time and resources, this >>> was out of scope for what we could tackle. >>> >>> * Typically AoS and SoA refer to storage layout but I'm using it to >>> refer to computation layout. The terminology may not be correct but >>> I think you can understand what I mean. >>> On Thu, Mar 12, 2015 at 8:32 AM, Bradley Lowekamp >>> wrote: >>>> Hello, >>>> >>>> If I was writing my own ITK classes, and needed a fast matrix library I >>>> would likely pursue an additional dependency on an efficient numeric library >>>> for that project, such as eigen. >>>> >>>> However for the broad appeal of ITK I would think a flexible back end >>>> would be best. As I think there are a variety of BLAS and LAPACK libraries >>>> available ( commercial, open source, vender free ). It would be nice to pick >>>> one what has been optimized for the current architecture. I would think it >>>> would be most flexible to use this interface in the back end of a chosen >>>> numeric interface ( currently VNL ). Unfortunately, I don't have as much >>>> experience with these libraries as I'd like. >>>> >>>> Brad >>>> >>>> On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: >>>> >>>>> Hi, >>>>> >>>>> I think the eigen library is a mature and very fast library for these >>>>> kind of things: >>>>> http://eigen.tuxfamily.org/index.php?title=Main_Page >>>>> >>>>> You may want to check it out, to see if it offers what you need. >>>>> >>>>> It would be great to be able to use these within the itk. >>>>> >>>>> 2c >>>>> Marius >>>>> >>>>> -----Original Message----- >>>>> From: Insight-developers [mailto:insight-developers-bounces at itk.org] On >>>>> Behalf Of Jian Cheng >>>>> Sent: Wednesday, March 11, 2015 23:17 >>>>> To: Matt McCormick >>>>> Cc: Chuck Atkins; ITK >>>>> Subject: Re: [ITK-dev] efficiency of vnl_matrix >>>>> >>>>> Hi Matt, >>>>> >>>>> Thanks for your help, and also for the ITK workshop in UNC last time. >>>>> >>>>> It is very unfortunate. The efficiency of these numerical math operators >>>>> are very important for many applications. >>>>> >>>>> I recently released an ITK based toolbox, called dmritool, for diffusion >>>>> MRI data processing. >>>>> It has some files to add some supports of blas, lapack, mkl to >>>>> vnl_matrix and vnl_vector. >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html >>>>> >>>>> Those functions are not internally for vnl_matrix class. They are >>>>> operators for the data pointer stored in vnl_matrix object. >>>>> Thus, later I made a N-dimensional array library which internally >>>>> includes those functions, and also supports expression template to avoid >>>>> temporary copies. >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html >>>>> >>>>> The efficiency comparison between vnl_vector/vnl_matrix and the >>>>> vector/matrix using openblas, lapack, or mkl can be found by running those >>>>> two tests >>>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx >>>>> >>>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx >>>>> >>>>> Maybe some codes can be used as patches in somewhere in ITK. I am not >>>>> sure. Maybe we need more discussion on it. >>>>> With your help and discussion, I will be very glad to make my first >>>>> patch to ITK. >>>>> Thanks. >>>>> >>>>> best, >>>>> Jian Cheng >>>>> >>>>> >>>>> On 03/11/2015 04:39 PM, Matt McCormick wrote: >>>>>> Hi Jian, >>>>>> >>>>>> Yes, it would be wonderful to improve the efficiency of these basic >>>>>> numerical operations. >>>>>> >>>>>> Funding for the Refactor Numerical Libraries has currently ended, and >>>>>> the effort is currently frozen. However, you are more than welcome to >>>>>> pick it up and we can help you get it into ITK. More information on >>>>>> the patch submission process can be found here [1] and in the ITK >>>>>> Software Guide. >>>>>> >>>>>> Thanks, >>>>>> Matt >>>>>> >>>>>> [1] >>>>>> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >>>>>> ftwareProcess/SubmitAPatchToGerrit/index.html >>>>>> >>>>>> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng >>>>>> wrote: >>>>>>> Hi, >>>>>>> >>>>>>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, >>>>>>> etc. >>>>>>> Thus the performance is actually mainly determined by the matrix >>>>>>> library I used. >>>>>>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >>>>>>> very inefficient because vnl matrix lib does not use blas and lapack. >>>>>>> After I wrote my own matrix class which uses openblas and lapack, I >>>>>>> got a hug gain of performance. >>>>>>> >>>>>>> I found there is a proposal to improve the efficiency of numerical >>>>>>> libraries in ITK. >>>>>>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>>>>>> I am not sure how is the progress of the proposal. >>>>>>> I wonder when the vnl matrix lib can internally support blas and >>>>>>> lapack, or mkl, so that we can just use it without lose of the >>>>>>> efficiency. >>>>>>> Thanks. >>>>>>> >>>>>>> best, >>>>>>> Jian Cheng >>>>>>> _______________________________________________ >>>>>>> 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 >>>>> _______________________________________________ >>>>> 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 From matt.mccormick at kitware.com Thu Mar 12 19:31:21 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 12 Mar 2015 19:31:21 -0400 Subject: [ITK] [ITK-dev] ITK changes VTK_LIBRARIES? In-Reply-To: <550208AE.8070100@gmail.com> References: <550208AE.8070100@gmail.com> Message-ID: Hi Jian, Please use the recently released VTK 6.2.0 where this issue has been addressed. Thanks, Matt On Thu, Mar 12, 2015 at 5:44 PM, Jian Cheng wrote: > Hi, > > The the recent release of ITK may changes VTK_LIBRARIES, when I build > ITK with VTK, i.e. set on Module_ITKVtkGlue or Module_WikiExamples. > Please see the attached toy example, and check if the issue can be > reproduced on your side. Thanks. > I am using ITK 4.7.1, VTK 6.1.0, cmake 2.8.12.2. > If I build ITK with VTK, VTK_LIBRARIES will be changed to > VTK_LIBRARIES=vtkCommonCore;vtksys , even if I find ITK first before I > find VTK. > If I build ITK without VTK, everything is fine. > A workaround is to find VTK first, then copy VTK_LIBRARIES to a > variable, then find ITK and copy VTK_LIBRARIES back. > > best, > Jian Cheng > > _______________________________________________ > 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 > _______________________________________________ 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 jian.cheng.1983 at gmail.com Thu Mar 12 19:56:24 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Thu, 12 Mar 2015 19:56:24 -0400 Subject: [ITK] [ITK-dev] ITK changes VTK_LIBRARIES? In-Reply-To: References: <550208AE.8070100@gmail.com> Message-ID: <550227A8.6090105@gmail.com> Hi Matt, Great! I just tried VTK 6.2.0. It works now. Thank you for your help! best, Jian Cheng On 03/12/2015 07:31 PM, Matt McCormick wrote: > Hi Jian, > > Please use the recently released VTK 6.2.0 where this issue has been addressed. > > Thanks, > Matt > > On Thu, Mar 12, 2015 at 5:44 PM, Jian Cheng wrote: >> Hi, >> >> The the recent release of ITK may changes VTK_LIBRARIES, when I build >> ITK with VTK, i.e. set on Module_ITKVtkGlue or Module_WikiExamples. >> Please see the attached toy example, and check if the issue can be >> reproduced on your side. Thanks. >> I am using ITK 4.7.1, VTK 6.1.0, cmake 2.8.12.2. >> If I build ITK with VTK, VTK_LIBRARIES will be changed to >> VTK_LIBRARIES=vtkCommonCore;vtksys , even if I find ITK first before I >> find VTK. >> If I build ITK without VTK, everything is fine. >> A workaround is to find VTK first, then copy VTK_LIBRARIES to a >> variable, then find ITK and copy VTK_LIBRARIES back. >> >> best, >> Jian Cheng >> >> _______________________________________________ >> 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 >> _______________________________________________ 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 stnava at gmail.com Thu Mar 12 20:08:58 2015 From: stnava at gmail.com (brian avants) Date: Thu, 12 Mar 2015 20:08:58 -0400 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> <5501B317.3020108@gmail.com> Message-ID: All fantastic directions to explore. +We all could benefit from this fundamental improvement in numerics. my guess: (1) and (2) from Matt's previous email are likely to stick, with relatively low effort. Other stuff ... Only if some individual takes it personally. We at penn, uva, uiowa are (likely) to help on this. Keep us apprised. Hi Jian, Thanks for sharing these performance testing coding. As Chuck also demonstrated, measuring performance is critical for real progress. Thanks, Matt On Thu, Mar 12, 2015 at 11:39 AM, Jian Cheng wrote: > Hi, > > For (2), the attachment is a comparison I made. > It adds additional tests on vnl to the code from the previous link > http://nghiaho.com/?p=1726 . > Some header files can be downloaded from > https://github.com/DiffusionMRITool/dmritool/tree/master/Modules/HelperFunctions/include > > Then you can build and run > // With eigen > // g++ -DTEST_EIGEN test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse_vnl -lopencv_core -O3 -DNDEBUG > > // With ARMA OpenBLAS > // g++ -DTEST_ARMA test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -larmadillo -lgomp -fopenmp > -lopenblas -O3 -DNDEBUG -DHAVE_INLINE > > // with vnl > // g++ -DTEST_VNL test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -O3 -DNDEBUG > -DUTL_USE_FASTLAPACK > > // with vnl + openblas > // g++ -DTEST_VNL_BLAS test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lopenblas -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 > -DUTL_USE_FASTLAPACK > // with vnl + mkl > // g++ -DTEST_VNL_BLAS test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lmkl_intel_lp64 > -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -O3 -DNDEBUG > -DUTL_USE_FASTLAPACK > > // with utl+openblas > // g++ -DTEST_UTL test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lopenblas -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 > -DUTL_USE_FASTLAPACK > // with utl + mkl; > // g++ -DTEST_UTL test_matrix_pseudoinverse.cpp -o > test_matrix_pseudoinverse -lopencv_core -lmkl_intel_lp64 > -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lvnl -lvnl_algo > -I/usr/include/vxl/core -I/usr/include/vxl/vcl -DNDEBUG -O3 > -DUTL_USE_FASTLAPACK > > In my experiments, using blas functions from mkl is the most efficient way. > > best, > Jian Cheng > > On 03/12/2015 10:41 AM, Matt McCormick wrote: >> Hi, >> >> From the discussion so far, it appears the following serious of steps >> could be taken to move forward on performance: >> >> 1) Replace vnl_vector and vnl_matrix with vnl_vector_fixed and >> vnl_matrix_fixed when possible. >> >> 2) Add Jian Cheng's BLAS and LAPACK backends for vnl_vector and vnl_matrix. >> >> 3) Add support for armadillo or eigen. >> >> 1) and 2) will be relatively easy to make, and will hopefully have an >> immediate impact on performance. 3) will take make work to happen, >> and it will take longer to impact the toolkit. We will need to have >> cross-platform builds of the libraries in the repository. Also, many >> ITK classes encapsulate their use of VNL very poorly, so it will not >> be as simple as swapping out or improving their backends. >> >> 2 cents, >> Matt >> >> On Thu, Mar 12, 2015 at 10:20 AM, Bradley Lowekamp >> wrote: >>> Chuck, >>> >>> Thank you for giving us that important conclusion, under a quite difficult >>> situations. >>> >>> I wonder if there is any distinction in the usage of vnl_matrix vs >>> vnl_matrix_fixed. I would expect that operations done for pixel transforms >>> should have there dimension know at run-time and should be able to use the >>> vnl_matrix_fixed. >>> >>> I also have considered methods to transform a whole array of points at a >>> time. I wonder if for 3x3*3*256 sized operations ( scan-line size ) if there >>> would be benefit with the library based operations. >>> >>> Brad >>> >>> >>> On Mar 12, 2015, at 10:02 AM, Chuck Atkins wrote: >>> >>> I worked with Julie Langou, maintainer of LAPACK, on this project a few >>> years ago. The funding situation ended up very strange and messy and we >>> basically had to cram 3 months worth of effort into 3 weeks, so needless to >>> say, we were not able to really achieve our goals. However, we spent a fair >>> amount of time profiling ITK and analyzing it's hot spots from vnl to >>> determine where to best spend the small ammount of time we had. The results >>> were not as straight forward as we expected. It turns out that most of the >>> use for vnl_matrix and vnl_vector was actually for an enourmous number of >>> operations on very small sized vectors and matricies (dimensions of 2, 3, or >>> 4), often for coordinate and geometry calculations or for small per-pixel >>> operations that were not easily vectorized in the implementation at the >>> time. In these cases, the overhead of calling out to a BLAS or LAPACK >>> library was much too expensive and the existing use of VNL was far more >>> optimal. This falls apart, however when trying to use vnl for more complex >>> algorithms since the larger matrix operations will be where the benefit can >>> be seen. So just re-implementing the vnl vector and matrix classes and >>> operators with underlying BLAS and LAPACK routines turned out to not be the >>> best solution for ITK as a whole. >>> >>> - Chuck >>> tage of the performance gains of large block matrix and vector >>> operations seen with optimized BLAS and LAPACK libraries, the >>> computations needed to be re-worked to act in an SoA (struct of >>> arrays) fashion instead. Given our limited time and resources, this >>> was out of scope for what we could tackle. >>> >>> * Typically AoS and SoA refer to storage layout but I'm using it to >>> refer to computation layout. The terminology may not be correct but >>> I think you can understand what I mean. >>> On Thu, Mar 12, 2015 at 8:32 AM, Bradley Lowekamp < blowekamp at mail.nih.gov> >>> wrote: >>>> Hello, >>>> >>>> If I was writing my own ITK classes, and needed a fast matrix library I >>>> would likely pursue an additional dependency on an efficient numeric library >>>> for that project, such as eigen. >>>> >>>> However for the broad appeal of ITK I would think a flexible back end >>>> would be best. As I think there are a variety of BLAS and LAPACK libraries >>>> available ( commercial, open source, vender free ). It would be nice to pick >>>> one what has been optimized for the current architecture. I would think it >>>> would be most flexible to use this interface in the back end of a chosen >>>> numeric interface ( currently VNL ). Unfortunately, I don't have as much >>>> experience with these libraries as I'd like. >>>> >>>> Brad >>>> >>>> On Mar 12, 2015, at 5:15 AM, m.staring at lumc.nl wrote: >>>> >>>>> Hi, >>>>> >>>>> I think the eigen library is a mature and very fast library for these >>>>> kind of things: >>>>> http://eigen.tuxfamily.org/index.php?title=Main_Page >>>>> >>>>> You may want to check it out, to see if it offers what you need. >>>>> >>>>> It would be great to be able to use these within the itk. >>>>> >>>>> 2c >>>>> Marius >>>>> >>>>> -----Original Message----- >>>>> From: Insight-developers [mailto:insight-developers-bounces at itk.org] On >>>>> Behalf Of Jian Cheng >>>>> Sent: Wednesday, March 11, 2015 23:17 >>>>> To: Matt McCormick >>>>> Cc: Chuck Atkins; ITK >>>>> Subject: Re: [ITK-dev] efficiency of vnl_matrix >>>>> >>>>> Hi Matt, >>>>> >>>>> Thanks for your help, and also for the ITK workshop in UNC last time. >>>>> >>>>> It is very unfortunate. The efficiency of these numerical math operators >>>>> are very important for many applications. >>>>> >>>>> I recently released an ITK based toolbox, called dmritool, for diffusion >>>>> MRI data processing. >>>>> It has some files to add some supports of blas, lapack, mkl to >>>>> vnl_matrix and vnl_vector. >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlBlas_8h_source.html >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVNLBlas_8h_source.html >>>>> >>>>> Those functions are not internally for vnl_matrix class. They are >>>>> operators for the data pointer stored in vnl_matrix object. >>>>> Thus, later I made a N-dimensional array library which internally >>>>> includes those functions, and also supports expression template to avoid >>>>> temporary copies. >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlMatrix_8h_source.html >>>>> >>>>> http://diffusionmritool.github.io/dmritool_doxygen/utlVector_8h_source.html >>>>> >>>>> The efficiency comparison between vnl_vector/vnl_matrix and the >>>>> vector/matrix using openblas, lapack, or mkl can be found by running those >>>>> two tests >>>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLBlasGTest.cxx >>>>> >>>>> https://github.com/DiffusionMRITool/dmritool/blob/master/Modules/HelperFunctions/test/utlVNLLapackGTest.cxx >>>>> >>>>> Maybe some codes can be used as patches in somewhere in ITK. I am not >>>>> sure. Maybe we need more discussion on it. >>>>> With your help and discussion, I will be very glad to make my first >>>>> patch to ITK. >>>>> Thanks. >>>>> >>>>> best, >>>>> Jian Cheng >>>>> >>>>> >>>>> On 03/11/2015 04:39 PM, Matt McCormick wrote: >>>>>> Hi Jian, >>>>>> >>>>>> Yes, it would be wonderful to improve the efficiency of these basic >>>>>> numerical operations. >>>>>> >>>>>> Funding for the Refactor Numerical Libraries has currently ended, and >>>>>> the effort is currently frozen. However, you are more than welcome to >>>>>> pick it up and we can help you get it into ITK. More information on >>>>>> the patch submission process can be found here [1] and in the ITK >>>>>> Software Guide. >>>>>> >>>>>> Thanks, >>>>>> Matt >>>>>> >>>>>> [1] >>>>>> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySo >>>>>> ftwareProcess/SubmitAPatchToGerrit/index.html >>>>>> >>>>>> On Wed, Mar 11, 2015 at 4:07 PM, Jian Cheng < jian.cheng.1983 at gmail.com> >>>>>> wrote: >>>>>>> Hi, >>>>>>> >>>>>>> My task using ITK has intensive matrix-matrix product, pseudo-inverse, >>>>>>> etc. >>>>>>> Thus the performance is actually mainly determined by the matrix >>>>>>> library I used. >>>>>>> Firstly I use vnl_matrix and vnl_vector in ITK. Then I found it is >>>>>>> very inefficient because vnl matrix lib does not use blas and lapack. >>>>>>> After I wrote my own matrix class which uses openblas and lapack, I >>>>>>> got a hug gain of performance. >>>>>>> >>>>>>> I found there is a proposal to improve the efficiency of numerical >>>>>>> libraries in ITK. >>>>>>> http://www.itk.org/Wiki/ITK/Release_4/Refactor_Numerical_Libraries >>>>>>> I am not sure how is the progress of the proposal. >>>>>>> I wonder when the vnl matrix lib can internally support blas and >>>>>>> lapack, or mkl, so that we can just use it without lose of the >>>>>>> efficiency. >>>>>>> Thanks. >>>>>>> >>>>>>> best, >>>>>>> Jian Cheng >>>>>>> _______________________________________________ >>>>>>> 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 >>>>> _______________________________________________ >>>>> 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: -------------- next part -------------- _______________________________________________ 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 Brian.Nett at ge.com Thu Mar 12 17:45:20 2015 From: Brian.Nett at ge.com (Nett, Brian (GE Healthcare)) Date: Thu, 12 Mar 2015 21:45:20 +0000 Subject: [ITK] Internship Opportunity in Computed Tomography Message-ID: For those interested in an internship in applying state of the art registration technologies to medical imaging please see the attached flyer. Summer or Fall semester both an option currently. Thanks for your time, Brian Nett Senior Scientist, Advanced Algorithms GE Healthcare, Premium Computed Tomography -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ctRegIntern.pdf Type: application/pdf Size: 84615 bytes Desc: ctRegIntern.pdf URL: From blowekamp at mail.nih.gov Thu Mar 12 20:50:30 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 12 Mar 2015 20:50:30 -0400 Subject: [ITK] [ITK-users] Registration in SimpleITK In-Reply-To: References: Message-ID: Hello, Yes, it is more or less the same process. Grab all the ITK and SimpleITK dlls from the bin directories and place them in your path. The SimpleITK Superbuild INSTALL target will actually install ITK and SimpleITK's core libraries correctly in to the CMake specified path. The installation target for the superbuild project just doesn't install the target languages ( every language has at least one own way of doing things that CMake does not know about ). You could use this to install all the needed dlls into a defined path. Then just grab the CSharp dll for your project and that should work too. Also I worked on the explicit instantiation in SimpleITK today. I was able to reduce the size of the .o files on Linux by 30% by explicitly instantiating about 20 classes with their used templates. This is expected to resolve the linking and packaging issues on windows. So a solution is forth coming. Brad On Mar 12, 2015, at 7:26 PM, Matias Montroull wrote: > Hi Brad, thanks for the explanation. I'm using C#, would that be the same process? > > On Wed, Mar 11, 2015 at 8:56 PM, Bradley Lowekamp wrote: > Hello, > > If you are willing to compile it yourself you can get it to work with just a little bit of effort. > > Compile the SimpleITK superbuild with shared libraries enabled. Do the usual installation of SimpleITK from the super build [1], this will install the SimpleITK python library into your site-packages. However, this libraries also depends on all the SimpleITK an ITK dlls (not installed or packaged), these should be in the superbuild's bin directory. These need to be in your run-time path when importing SimpleITK. This can be done either by modifying you PATH environment variable you copying them to the appropriate place ( which may depend on the python environment, and there are likely several alternatives). > > Brad > > [1] http://www.itk.org/Wiki/SimpleITK/GettingStarted#Python_installation > > On Mar 11, 2015, at 7:31 PM, Matias Montroull wrote: > >> >> My project is using 64 bits and some DLL I use as well, I've ran into issues when using the beta version because is 32 bits. I guess I'll wait until the final release is done. >> Thanks, >> Matias. >> >> On Wed, Mar 11, 2015 at 7:54 PM, Matias Montroull wrote: >> Thanks Bradley, I'll give it a try. I downloaded version 0.8.1 but wasn't aware of this new Beta release >> Thanks, >> Matias. >> >> On Wed, Mar 11, 2015 at 7:46 PM, Bradley Lowekamp wrote: >> Hello Matias, >> >> Currently there is SimpleITK 0.9b01 [1] out with the registration framework. >> >> With it you can do things like this: >> http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/56_VH_Registration1.html >> or >> http://www.itk.org/SimpleITKDoxygen/html/ImageRegistrationMethod2_8py-example.html >> >> Please give it a try and let us know how it work for you. >> >> Enjoy, >> Brad >> >> [1] http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#SimpleITK_-_Version_0.9.0_Release >> >> On Mar 11, 2015, at 6:32 PM, Matias Montroull wrote: >> >>> Hi, >>> >>> is it possible to do registration in SimpleITK? I mean, something like in this example: >>> http://public.kitware.com/cgi-bin/viewcvs.cgi/Insight/Examples/Registration/ImageRegistration2.cxx?view=markup >>> >>> Thanks, >>> >>> Matias, >>> _____________________________________ >>> 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://www.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-users >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From jian.cheng.1983 at gmail.com Thu Mar 12 21:56:15 2015 From: jian.cheng.1983 at gmail.com (Jian Cheng) Date: Thu, 12 Mar 2015 21:56:15 -0400 Subject: [ITK] [ITK-dev] efficiency of vnl_matrix In-Reply-To: References: <5500A067.5080507@gmail.com> <5500BEDC.40203@gmail.com> <24D8AA23EC0DCB4498C35EC60401E76137FBF5AA@MAIL-MB3.lumcnet.prod.intern> <3C48E57C-427C-4D5F-ADEB-331CD5D32F0B@mail.nih.gov> <21EF984E-C5AF-47CB-A215-52B7E1EB8840@mail.nih.gov> <5501B317.3020108@gmail.com> Message-ID: <550243BF.7060607@gmail.com> Hi, I agree with Brian. Everyone who uses ITK with vnl_matrix will finally realize vnl_matrix is very inefficient, then will try to make it efficient, by using backend blas/lapack api, or using other efficient matrix libs. Thus it is better to make only one efficient way in ITK for everyone. This numerical lib is fundamental for many applications. Thus we need more discussions before doing anything. For (2), it is possible and needs less effort. We have two ways. a) Do not touch vnl_matrix class, just make some external functions using blas/lapack api to work on the data pointer stored in vnl_matrix objects. This is the way I have done. b) Put those functions into vnl_matrix member functions. Thus change the implementation of vnl_matrix, but do not change its api. For (3), we have two ways. a) remove vnl_matrix everywhere and replace it using eigen or armadillo. As we discussed in previous emails, some people already did this in their own ITK classes. b) Still use vnl_matrix, but change its implementation by using eigen/armadillo, without changing the api of vnl_matrix. best, Jian Cheng On 03/12/2015 08:08 PM, brian avants wrote: > > All fantastic directions to explore. +We all could benefit from this > fundamental improvement in numerics. my guess: (1) and (2) from > Matt's previous email are likely to stick, with relatively low > effort. Other stuff ... Only if some individual takes it personally. > We at penn, uva, uiowa are (likely) to help on this. Keep us apprised. > > _______________________________________________ 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 lassi.paavolainen at jyu.fi Fri Mar 13 07:42:54 2015 From: lassi.paavolainen at jyu.fi (Paavolainen, Lassi) Date: Fri, 13 Mar 2015 11:42:54 +0000 Subject: [ITK] [ITK-users] Memory leak in Python wrapped Image GetPixel method? In-Reply-To: References: , , Message-ID: In case it makes any difference, I can see the same issue with freshly installed another computer. Though both have pretty much the same environment (updated Ubuntu 14.04, Python 2.7.6). The freshly installed machine is using ITK 4.7.1, but as said I can see the same problem with ITK 4.6 and 3.20. Would be nice to hear if anyone with similar setup is able to reproduce the issue. Lassi ________________________________________ From: Insight-users [insight-users-bounces at itk.org] on behalf of Paavolainen, Lassi [lassi.paavolainen at jyu.fi] Sent: Monday, March 09, 2015 21:59 To: Matt McCormick Cc: insight-users at itk.org Subject: Re: [ITK-users] Memory leak in Python wrapped Image GetPixel method? Hi Matt, Seems its an issue with local environment. Here is also for the list what I replied to Gaetan: "This is interesting. I'm using ITK 4.6.1 with swig that comes with it. I now tested with 3.20 that has been built long time ago with swig 1.9 (if I remember correctly). The same thing. So the conclusion is that it must be something local as I'm sure I've done something similar over the years many times. Next is to try to find out what on my environment causes this." To add to that, I ran 30 iterations using valgrind. Here is the report: ==8603== HEAP SUMMARY: ==8603== in use at exit: 478,066,856 bytes in 483,719 blocks ==8603== total heap usage: 657,312 allocs, 173,593 frees, 787,087,705 bytes allocated ==8603== ==8603== LEAK SUMMARY: ==8603== definitely lost: 0 bytes in 0 blocks ==8603== indirectly lost: 0 bytes in 0 blocks ==8603== possibly lost: 20,224 bytes in 34 blocks ==8603== still reachable: 478,046,632 bytes in 483,685 blocks ==8603== suppressed: 0 bytes in 0 blocks So almost 500 MB is in heap but still reachable when the program exits. Lassi ________________________________________ From: Matt McCormick [matt.mccormick at kitware.com] Sent: Monday, March 09, 2015 20:22 To: Paavolainen, Lassi Cc: insight-users at itk.org; Ga?tan Lehmann; Michka Popoff Subject: Re: [ITK-users] Memory leak in Python wrapped Image GetPixel method? Hi Lassi, Thanks for investigating and reporting the issue! I have created an issue in the Issue Tracker to keep track of it: https://issues.itk.org/jira/browse/ITK-3352 Matt On Mon, Mar 9, 2015 at 6:11 AM, Paavolainen, Lassi wrote: > Hi, > > I noticed that GetPixel method in itk.Image object eats memory in Python wrapped code. I think I've seen some Python wrapping memory issues years ago but nothing as simple as this. Here is a simple test script: > import sys > import itk > reader = itk.ImageFileReader.IUC2.New() > reader.SetFileName(sys.argv[1]) > reader.Update() > img = reader.GetOutput() > size = img.GetLargestPossibleRegion().GetSize() > for i in range(100): > for x in range(size[0]): > for y in range(size[1]): > value = img.GetPixel((x,y)) > print "Done with iteration %d"%(i+1) > > When I run it with 1 MB image, it end up taking 1.5 GB of memory. After spending lots of time on debugging a bigger bunch of code I realized that the GetPixel method was to blame. Can anyone reproduce it? I'm using ITK 4.6.1 > > Cheers, > Lassi > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Fri Mar 13 08:48:26 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 13 Mar 2015 08:48:26 -0400 Subject: [ITK] [ITK-dev] We need a little remote module KWStyle rallying here Message-ID: Hello folks! We recently have modularized the KWStyle test. This has enabled style tests on remote, external and local module. So many of the remote modules now have a failing style tests on the dashboard. May of the failures are just a simple change in the header guarder. I am going to start with IOFDF today. What are you going to help with? Brad _______________________________________________ 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 bill.lorensen at gmail.com Fri Mar 13 13:13:22 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 13 Mar 2015 10:13:22 -0700 Subject: [ITK] [ITK-dev] We need a little remote module KWStyle rallying here In-Reply-To: References: Message-ID: I'll take care of the wiki examples and the skull stripper. On Fri, Mar 13, 2015 at 5:48 AM, Bradley Lowekamp wrote: > Hello folks! > > We recently have modularized the KWStyle test. This has enabled style tests on remote, external and local module. > > So many of the remote modules now have a failing style tests on the dashboard. May of the failures are just a simple change in the header guarder. > > I am going to start with IOFDF today. > > What are you going to help with? > > Brad > > _______________________________________________ > 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 -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ 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 blowekamp at mail.nih.gov Fri Mar 13 15:55:36 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 13 Mar 2015 15:55:36 -0400 Subject: [ITK] [ITK-dev] NLM dashboards down over the weekend Message-ID: <4CBCAA92-2978-4B16-80E2-2AE556F49512@mail.nih.gov> Our server room will be under going some maintenance of the weekend, so many of NLM dashboard builds will be down over the weekend. The machines will be turned again on Monday morning. Apologizes for the inconvenience, Brad _______________________________________________ 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 audrius at tomographix.com Mon Mar 16 02:58:37 2015 From: audrius at tomographix.com (Audrius Stundzia) Date: Mon, 16 Mar 2015 01:58:37 -0500 Subject: [ITK] ITK 4.7.1 | CMake error in ITKConfig.cmake Message-ID: <1426489117.1039512.240835561.2CE66E16@webmail.messagingengine.com> OS: WIndows 8.1 x64 ITK: 4.7.1 CMake: 3.2.1 The following CMake error occurred while running CMake for RTK. However, as it is located in ITKConfig.cmake, I thought that I should report it here. _____ CMake Error at F:/Program Files/itk/build/ITKConfig.cmake:70 (set): Syntax error in cmake code at F:/Program Files/itk/build/ITKConfig.cmake:70 when parsing string F:\Program Files\FFTW Invalid escape sequence \P Call Stack (most recent call first): CMakeLists.txt:75 (FIND_PACKAGE) _____ Changing the line from set(ITK_FFTW_INCLUDE_PATH "F:\Program Files\FFTW") to set(ITK_FFTW_INCLUDE_PATH "F:/Program Files/FFTW") fixed the problem. Regards, Audrius From lluna.nova at gmail.com Mon Mar 16 07:37:23 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Mon, 16 Mar 2015 12:37:23 +0100 Subject: [ITK] [ITK-users] Splitting and repasting a volume with overlap Message-ID: Hello everyone, We need to split a volume into pieces, overlaped by a certain amount, do some computation and then repaste them. The computation requires the pieces' region indexes to be set to zero. The original volume might not have index at zero, but be a subregion itself. What is the best way to achieve this? I've thought of the following pipeline: 1. imageRegionSplitterSlowDimension 2. Store the index and size of each region 3. manually increase the size of each region (and modify index) 4. crop with the largestPossibleRegion of the original volume (to prevent requesting more than available) iterate over regions: 5. extractImageFilter 6. disconnect pipeline for each region 7. reset indexes 8. perform computation 9. crop with the regions in step 1 to remove the added overlap 10. restore indexes 11. pasteImageFilter I'll have to think of a smart way to deal with the index restore/cropping of steps 9 and 10. I somehow feel somebody will have already dealt with this... And there's certainly a better way to do it. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From ds_prakash at rediffmail.com Mon Mar 16 08:48:44 2015 From: ds_prakash at rediffmail.com (Surya Prakash) Date: 16 Mar 2015 12:48:44 -0000 Subject: [ITK] =?utf-8?q?=5BITK-users=5D_big_image?= Message-ID: <20150316124844.23818.qmail@f4mail-235-154.rediffmail.com> hello, I have very large, 50k x 50k images assume. How I can read part of an image. Thanks & regards Prakash -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Mon Mar 16 09:00:00 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 16 Mar 2015 09:00:00 -0400 Subject: [ITK] [ITK-users] Splitting and repasting a volume with overlap In-Reply-To: References: Message-ID: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> Hello, The RegionOfInterestImageFilter[1] is very similar to the ExtractImageFilter, but returns an image whose starting index is always zeros. The process you described is remarkable close to what occur in each filter for the multi-threading process. Also what occurs in the StreamingImageFilter is very similar, but just copies the region. As you didn't mention you motivation for chunking the data this way be it for threading or memory requirements, I can't fully advise. Brad [1 ]http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html [2] https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? wrote: > Hello everyone, > > We need to split a volume into pieces, overlaped by a certain amount, do some computation and then repaste them. > > The computation requires the pieces' region indexes to be set to zero. The original volume might not have index at zero, but be a subregion itself. > > What is the best way to achieve this? > > I've thought of the following pipeline: > > 1. imageRegionSplitterSlowDimension > 2. Store the index and size of each region > 3. manually increase the size of each region (and modify index) > 4. crop with the largestPossibleRegion of the original volume (to prevent requesting more than available) > iterate over regions: > 5. extractImageFilter > 6. disconnect pipeline for each region > 7. reset indexes > 8. perform computation > 9. crop with the regions in step 1 to remove the added overlap > 10. restore indexes > 11. pasteImageFilter > > I'll have to think of a smart way to deal with the index restore/cropping of steps 9 and 10. > > I somehow feel somebody will have already dealt with this... And there's certainly a better way to do it. > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Mon Mar 16 09:05:02 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 16 Mar 2015 09:05:02 -0400 Subject: [ITK] [ITK-users] big image In-Reply-To: <20150316124844.23818.qmail@f4mail-235-154.rediffmail.com> References: <20150316124844.23818.qmail@f4mail-235-154.rediffmail.com> Message-ID: <26A3491B-B64F-43E8-9708-A366E27549D8@mail.nih.gov> Hello Surya, What file format do you have? You may find this article helpful: http://www.kitware.com/media/html/IOStreamingInITK.htm The currently support formats for streaming io input include HDF5, JPEG2000, MRC, SCIFIO, VTK, NIFTI and MetaIO. I myself have personally extensively used MetaImageIO, and MRC, and a little VTK. Brad On Mar 16, 2015, at 8:48 AM, Surya Prakash wrote: > hello, > I have very large, 50k x 50k images assume. How I can read part of an image. > > Thanks & regards > Prakash > > Get your own FREE website, FREE domain & FREE mobile app with Company email. > Know More > > _____________________________________ > 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://www.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-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From lluna.nova at gmail.com Mon Mar 16 09:25:49 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Mon, 16 Mar 2015 14:25:49 +0100 Subject: [ITK] [ITK-users] Splitting and repasting a volume with overlap In-Reply-To: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> Message-ID: Hello Bradley, Thank you for your answer and suggestion. Answering your question: It's not for multi-threading purposes, I have to split the image due to memory limitations. I would use extractImage directly and do streaming, but the client and the low-level libraries might not work correctly if I do that. I have to provide itk images disconnected from the pipeline and with proper indexes and sizes. The RegionOfInterestImageFilter would have the same memory footprint, and it would still be tricky to compute the regions of interest, due to the overlapping. 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : > Hello, > > The RegionOfInterestImageFilter[1] is very similar to the > ExtractImageFilter, but returns an image whose starting index is always > zeros. > > The process you described is remarkable close to what occur in each filter > for the multi-threading process. Also what occurs in the > StreamingImageFilter is very similar, but just copies the region. > > As you didn't mention you motivation for chunking the data this way be it > for threading or memory requirements, I can't fully advise. > > Brad > > > [1 ] > http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html > [2] > https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 > > > On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? wrote: > > > Hello everyone, > > > > We need to split a volume into pieces, overlaped by a certain amount, do > some computation and then repaste them. > > > > The computation requires the pieces' region indexes to be set to zero. > The original volume might not have index at zero, but be a subregion itself. > > > > What is the best way to achieve this? > > > > I've thought of the following pipeline: > > > > 1. imageRegionSplitterSlowDimension > > 2. Store the index and size of each region > > 3. manually increase the size of each region (and modify index) > > 4. crop with the largestPossibleRegion of the original volume (to > prevent requesting more than available) > > iterate over regions: > > 5. extractImageFilter > > 6. disconnect pipeline for each region > > 7. reset indexes > > 8. perform computation > > 9. crop with the regions in step 1 to remove the added overlap > > 10. restore indexes > > 11. pasteImageFilter > > > > I'll have to think of a smart way to deal with the index > restore/cropping of steps 9 and 10. > > > > I somehow feel somebody will have already dealt with this... And there's > certainly a better way to do it. > > _____________________________________ > > 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://www.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-users > > 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : > Hello, > > The RegionOfInterestImageFilter[1] is very similar to the > ExtractImageFilter, but returns an image whose starting index is always > zeros. > > The process you described is remarkable close to what occur in each filter > for the multi-threading process. Also what occurs in the > StreamingImageFilter is very similar, but just copies the region. > > As you didn't mention you motivation for chunking the data this way be it > for threading or memory requirements, I can't fully advise. > > Brad > > > [1 ] > http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html > [2] > https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 > > > On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? wrote: > > > Hello everyone, > > > > We need to split a volume into pieces, overlaped by a certain amount, do > some computation and then repaste them. > > > > The computation requires the pieces' region indexes to be set to zero. > The original volume might not have index at zero, but be a subregion itself. > > > > What is the best way to achieve this? > > > > I've thought of the following pipeline: > > > > 1. imageRegionSplitterSlowDimension > > 2. Store the index and size of each region > > 3. manually increase the size of each region (and modify index) > > 4. crop with the largestPossibleRegion of the original volume (to > prevent requesting more than available) > > iterate over regions: > > 5. extractImageFilter > > 6. disconnect pipeline for each region > > 7. reset indexes > > 8. perform computation > > 9. crop with the regions in step 1 to remove the added overlap > > 10. restore indexes > > 11. pasteImageFilter > > > > I'll have to think of a smart way to deal with the index > restore/cropping of steps 9 and 10. > > > > I somehow feel somebody will have already dealt with this... And there's > certainly a better way to do it. > > _____________________________________ > > 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://www.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-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From Gordian.Kabelitz at medma.uni-heidelberg.de Mon Mar 16 08:59:23 2015 From: Gordian.Kabelitz at medma.uni-heidelberg.de (Kabelitz, Gordian) Date: Mon, 16 Mar 2015 13:59:23 +0100 Subject: [ITK] [ITK-users] Examples for ITK-based 2D/3D registration Message-ID: <5E843F0B86B47846B72559B57A54F96217BE836658@MBX02.ad.uni-heidelberg.de> Hello, I am interested in 2D/3D medical image registration using ITK. Currently I am looking for some good examples for a 2D/3D registration based on CT and conventional x-ray images. Is there a recommended tutorial or framework in addition to ITK? I am familiar with the registration examples from [1]. IMHO these are not useful for my topic. I am interested in all the possibilities for optimizing the registration process the ITK can provide. I would appreciate it if someone can give me a hint. I already checked the documentation center for ITK [3]. Bonus question: Is the extended ITK-based Framework for Intensity-based 2D/3D-Registration [2] from 2009 included in the ITK? Thanks in advance. Regards, Gordian Kabelitz [1]: http://www.itk.org/Doxygen47/html/examples.html [2]: https://ibia.umit.at/ResearchGroup/Phil/web/Simple2D3DRegistrationFramework.html [3]: www.itk.org/Wiki/ITK/Documentation -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From ds_prakash at rediffmail.com Mon Mar 16 08:38:14 2015 From: ds_prakash at rediffmail.com (Surya Prakash) Date: 16 Mar 2015 12:38:14 -0000 Subject: [ITK] =?utf-8?q?=5BITK-users=5D_connected_threshold?= Message-ID: <20150316123814.27479.qmail@f4mail-235-189.rediffmail.com> Hello, I am making an interactive region growing application using connectedThreshold. Seed point etc I want to collect interactively. After collecting the inputs, I will execute something like this. smoothing->SetInput( reader->GetOutput() ); connectedThreshold->SetInput( smoothing->GetOutput() ); As it is not possible to read big images, I will read portion of the data and give it to 'smoothing', by passing the 'Reader'. Please help me with some sample. I am using the 'ConnectedThresholdImageFilter sample. Thanks & regards Prakash -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From ds_prakash at rediffmail.com Mon Mar 16 15:23:45 2015 From: ds_prakash at rediffmail.com (ds_prakash) Date: 16 Mar 2015 19:23:45 -0000 Subject: [ITK] =?utf-8?q?=5BITK-users=5D_multiple_seeds?= Message-ID: <20150316192345.1345.qmail@f4mail-235-145.rediffmail.com> hello ALL, Is it possible to give multiple seed pixels to ConnectedThresholdImageFilter? I also want the output of regions grown corresponding to all seeds in a single output file. Thanks Prakash -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From scapegoat.sarthak at gmail.com Mon Mar 16 10:15:03 2015 From: scapegoat.sarthak at gmail.com (Scapegoat Sarthak) Date: Mon, 16 Mar 2015 10:15:03 -0400 Subject: [ITK] [ITK-users] Error while reading Unknown Image Information Message-ID: Hi All, I am trying to read information from different images using the Unknown Image Type Example (http://itk.org/Wiki/ITK/Examples/IO/ReadUnknownImageType) but I am getting an Access violation error. The three main lines of code (which compile without issues) I am using are: itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO(argv[3], itk::ImageIOFactory::ReadMode ); imageIO->SetFileName(std::string(argv[3])); imageIO->ReadImageInformation(); I am getting the error in the second line. I am using CMake to generate project files as described in the example so the include directories and libraries are all taken care of. I tried to read different files (.nii, .dcm, .png, .jpg) but all of them give the same error. Any suggestions regarding what I am doing wrong? Thanks in advance, Sarthak -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From lluna.nova at gmail.com Mon Mar 16 10:16:05 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Mon, 16 Mar 2015 15:16:05 +0100 Subject: [ITK] [ITK-users] Splitting and repasting a volume with overlap In-Reply-To: References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> Message-ID: Mmh, I believe I misread the RegionOfInterestImageFilter documentation, confusing dimension with size. That should work. I still have the computation of the splitting regions problem to handle, but maybe with this filter is easier than with the ExtractImageFilter. Or maybe it just removes step 7? Is there a way to ease the repasting back to the original region with it? How should I use the physical space index? 2015-03-16 14:25 GMT+01:00 Pol Mons? Purt? : > Hello Bradley, > > Thank you for your answer and suggestion. > > Answering your question: It's not for multi-threading purposes, I have to > split the image due to memory limitations. > > I would use extractImage directly and do streaming, but the client and the > low-level libraries might not work correctly if I do that. I have to > provide itk images disconnected from the pipeline and with proper indexes > and sizes. > > The RegionOfInterestImageFilter would have the same memory footprint, and > it would still be tricky to compute the regions of interest, due to the > overlapping. > > > > 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : > >> Hello, >> >> The RegionOfInterestImageFilter[1] is very similar to the >> ExtractImageFilter, but returns an image whose starting index is always >> zeros. >> >> The process you described is remarkable close to what occur in each >> filter for the multi-threading process. Also what occurs in the >> StreamingImageFilter is very similar, but just copies the region. >> >> As you didn't mention you motivation for chunking the data this way be it >> for threading or memory requirements, I can't fully advise. >> >> Brad >> >> >> [1 ] >> http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html >> [2] >> https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 >> >> >> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? >> wrote: >> >> > Hello everyone, >> > >> > We need to split a volume into pieces, overlaped by a certain amount, >> do some computation and then repaste them. >> > >> > The computation requires the pieces' region indexes to be set to zero. >> The original volume might not have index at zero, but be a subregion itself. >> > >> > What is the best way to achieve this? >> > >> > I've thought of the following pipeline: >> > >> > 1. imageRegionSplitterSlowDimension >> > 2. Store the index and size of each region >> > 3. manually increase the size of each region (and modify index) >> > 4. crop with the largestPossibleRegion of the original volume (to >> prevent requesting more than available) >> > iterate over regions: >> > 5. extractImageFilter >> > 6. disconnect pipeline for each region >> > 7. reset indexes >> > 8. perform computation >> > 9. crop with the regions in step 1 to remove the added overlap >> > 10. restore indexes >> > 11. pasteImageFilter >> > >> > I'll have to think of a smart way to deal with the index >> restore/cropping of steps 9 and 10. >> > >> > I somehow feel somebody will have already dealt with this... And >> there's certainly a better way to do it. >> > _____________________________________ >> > 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://www.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-users >> >> > > 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : > >> Hello, >> >> The RegionOfInterestImageFilter[1] is very similar to the >> ExtractImageFilter, but returns an image whose starting index is always >> zeros. >> >> The process you described is remarkable close to what occur in each >> filter for the multi-threading process. Also what occurs in the >> StreamingImageFilter is very similar, but just copies the region. >> >> As you didn't mention you motivation for chunking the data this way be it >> for threading or memory requirements, I can't fully advise. >> >> Brad >> >> >> [1 ] >> http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html >> [2] >> https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 >> >> >> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? >> wrote: >> >> > Hello everyone, >> > >> > We need to split a volume into pieces, overlaped by a certain amount, >> do some computation and then repaste them. >> > >> > The computation requires the pieces' region indexes to be set to zero. >> The original volume might not have index at zero, but be a subregion itself. >> > >> > What is the best way to achieve this? >> > >> > I've thought of the following pipeline: >> > >> > 1. imageRegionSplitterSlowDimension >> > 2. Store the index and size of each region >> > 3. manually increase the size of each region (and modify index) >> > 4. crop with the largestPossibleRegion of the original volume (to >> prevent requesting more than available) >> > iterate over regions: >> > 5. extractImageFilter >> > 6. disconnect pipeline for each region >> > 7. reset indexes >> > 8. perform computation >> > 9. crop with the regions in step 1 to remove the added overlap >> > 10. restore indexes >> > 11. pasteImageFilter >> > >> > I'll have to think of a smart way to deal with the index >> restore/cropping of steps 9 and 10. >> > >> > I somehow feel somebody will have already dealt with this... And >> there's certainly a better way to do it. >> > _____________________________________ >> > 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://www.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-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Mon Mar 16 10:20:24 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 16 Mar 2015 10:20:24 -0400 Subject: [ITK] [ITK-users] Splitting and repasting a volume with overlap In-Reply-To: References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> Message-ID: You may find this method useful: http://www.itk.org/Doxygen/html/structitk_1_1ImageAlgorithm.html#a5ec5bcac992cb3b1302840636530ba20 Brad On Mar 16, 2015, at 10:16 AM, Pol Mons? Purt? wrote: > Mmh, I believe I misread the RegionOfInterestImageFilter documentation, confusing dimension with size. That should work. > > I still have the computation of the splitting regions problem to handle, but maybe with this filter is easier than with the ExtractImageFilter. Or maybe it just removes step 7? > > Is there a way to ease the repasting back to the original region with it? How should I use the physical space index? > > 2015-03-16 14:25 GMT+01:00 Pol Mons? Purt? : > Hello Bradley, > > Thank you for your answer and suggestion. > > Answering your question: It's not for multi-threading purposes, I have to split the image due to memory limitations. > > I would use extractImage directly and do streaming, but the client and the low-level libraries might not work correctly if I do that. I have to provide itk images disconnected from the pipeline and with proper indexes and sizes. > > The RegionOfInterestImageFilter would have the same memory footprint, and it would still be tricky to compute the regions of interest, due to the overlapping. > > > > 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : > Hello, > > The RegionOfInterestImageFilter[1] is very similar to the ExtractImageFilter, but returns an image whose starting index is always zeros. > > The process you described is remarkable close to what occur in each filter for the multi-threading process. Also what occurs in the StreamingImageFilter is very similar, but just copies the region. > > As you didn't mention you motivation for chunking the data this way be it for threading or memory requirements, I can't fully advise. > > Brad > > > [1 ]http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html > [2] https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 > > > On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? wrote: > > > Hello everyone, > > > > We need to split a volume into pieces, overlaped by a certain amount, do some computation and then repaste them. > > > > The computation requires the pieces' region indexes to be set to zero. The original volume might not have index at zero, but be a subregion itself. > > > > What is the best way to achieve this? > > > > I've thought of the following pipeline: > > > > 1. imageRegionSplitterSlowDimension > > 2. Store the index and size of each region > > 3. manually increase the size of each region (and modify index) > > 4. crop with the largestPossibleRegion of the original volume (to prevent requesting more than available) > > iterate over regions: > > 5. extractImageFilter > > 6. disconnect pipeline for each region > > 7. reset indexes > > 8. perform computation > > 9. crop with the regions in step 1 to remove the added overlap > > 10. restore indexes > > 11. pasteImageFilter > > > > I'll have to think of a smart way to deal with the index restore/cropping of steps 9 and 10. > > > > I somehow feel somebody will have already dealt with this... And there's certainly a better way to do it. > > _____________________________________ > > 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://www.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-users > > > > 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : > Hello, > > The RegionOfInterestImageFilter[1] is very similar to the ExtractImageFilter, but returns an image whose starting index is always zeros. > > The process you described is remarkable close to what occur in each filter for the multi-threading process. Also what occurs in the StreamingImageFilter is very similar, but just copies the region. > > As you didn't mention you motivation for chunking the data this way be it for threading or memory requirements, I can't fully advise. > > Brad > > > [1 ]http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html > [2] https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 > > > On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? wrote: > > > Hello everyone, > > > > We need to split a volume into pieces, overlaped by a certain amount, do some computation and then repaste them. > > > > The computation requires the pieces' region indexes to be set to zero. The original volume might not have index at zero, but be a subregion itself. > > > > What is the best way to achieve this? > > > > I've thought of the following pipeline: > > > > 1. imageRegionSplitterSlowDimension > > 2. Store the index and size of each region > > 3. manually increase the size of each region (and modify index) > > 4. crop with the largestPossibleRegion of the original volume (to prevent requesting more than available) > > iterate over regions: > > 5. extractImageFilter > > 6. disconnect pipeline for each region > > 7. reset indexes > > 8. perform computation > > 9. crop with the regions in step 1 to remove the added overlap > > 10. restore indexes > > 11. pasteImageFilter > > > > I'll have to think of a smart way to deal with the index restore/cropping of steps 9 and 10. > > > > I somehow feel somebody will have already dealt with this... And there's certainly a better way to do it. > > _____________________________________ > > 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://www.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-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Mon Mar 16 10:46:00 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 16 Mar 2015 10:46:00 -0400 Subject: [ITK] [ITK-users] Examples for ITK-based 2D/3D registration In-Reply-To: <5E843F0B86B47846B72559B57A54F96217BE836658@MBX02.ad.uni-heidelberg.de> References: <5E843F0B86B47846B72559B57A54F96217BE836658@MBX02.ad.uni-heidelberg.de> Message-ID: Hi Gordian, Hopefully you came across this example that uses the RayCastInterpolateImageFunction [1]. Regarding the reference from 2009, to the best of my knowledge it has not been integrated into the toolkit. To help that process along, first find its associated article in the Insight Journal [2]. Next, organize the code into an ITKv4 External module. Finally, submit it as a Remote Module [4]. Of course, adding documentation along the way will help others in your situation. Thanks, Matt [1] http://www.itk.org/Doxygen/html/Examples_2Filtering_2DigitallyReconstructedRadiograph1_8cxx-example.html [2] http://insight-journal.org [3] http://www.kitware.com/blog/home/post/557 [4] http://www.itk.org/Wiki/ITK/Policy_and_Procedures_for_Adding_Remote_Modules On Mon, Mar 16, 2015 at 8:59 AM, Kabelitz, Gordian wrote: > Hello, > > I am interested in 2D/3D medical image registration using ITK. Currently I > am looking for some good examples for a 2D/3D registration based on CT and > conventional x-ray images. > Is there a recommended tutorial or framework in addition to ITK? I am > familiar with the registration examples from [1]. IMHO these are not useful > for my topic. I am interested in all the possibilities for optimizing the > registration process the ITK can provide. > I would appreciate it if someone can give me a hint. I already checked the > documentation center for ITK [3]. > > Bonus question: > Is the extended ITK-based Framework for Intensity-based 2D/3D-Registration > [2] from 2009 included in the ITK? > > Thanks in advance. > > Regards, > Gordian Kabelitz > > [1]: http://www.itk.org/Doxygen47/html/examples.html > [2]: > https://ibia.umit.at/ResearchGroup/Phil/web/Simple2D3DRegistrationFramework.html > [3]: www.itk.org/Wiki/ITK/Documentation > > > > > > _____________________________________ > 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://www.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-users > _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Mon Mar 16 10:50:09 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 16 Mar 2015 10:50:09 -0400 Subject: [ITK] [ITK-users] Error while reading Unknown Image Information In-Reply-To: References: Message-ID: Hi Sarthak, You may also find this example [1] informative. To investigate the access violation error, use try{}catch{} statements as found in the examples (use it around your imageIO->ReadImageInformation; statement). Also, run the code in a debugger. Hope this helps, Matt [1] http://itk.org/ITKExamples/src/IO/ImageBase/ReadUnknownImageType/Documentation.html?highlight=read On Mon, Mar 16, 2015 at 10:15 AM, Scapegoat Sarthak wrote: > Hi All, > > I am trying to read information from different images using the Unknown > Image Type Example > (http://itk.org/Wiki/ITK/Examples/IO/ReadUnknownImageType) but I am getting > an Access violation error. The three main lines of code (which compile > without issues) I am using are: > > itk::ImageIOBase::Pointer imageIO = > itk::ImageIOFactory::CreateImageIO(argv[3], itk::ImageIOFactory::ReadMode ); > imageIO->SetFileName(std::string(argv[3])); > imageIO->ReadImageInformation(); > > I am getting the error in the second line. I am using CMake to generate > project files as described in the example so the include directories and > libraries are all taken care of. I tried to read different files (.nii, > .dcm, .png, .jpg) but all of them give the same error. > > Any suggestions regarding what I am doing wrong? > > Thanks in advance, > Sarthak > > _____________________________________ > 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://www.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-users > _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Mon Mar 16 11:05:30 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 16 Mar 2015 11:05:30 -0400 Subject: [ITK] [ITK-users] Splitting and repasting a volume with overlap In-Reply-To: References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> Message-ID: Hi Pol, As a side note, limitation of memory usage is built into the streaming pipeline design of ITK. All computation of appropriate regions should occur if the filters are implemented correctly. To take advantage of streaming, place the StreamingImageFilter [1] at the end of your pipeline. To use less memory, set the ReleaseDataFlagOn() [2] on the component filters. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html [2] http://www.itk.org/Doxygen/html/classitk_1_1ProcessObject.html#ae732e9163879ae559ccd0b5957141f97 On Mon, Mar 16, 2015 at 10:20 AM, Bradley Lowekamp wrote: > You may find this method useful: > > http://www.itk.org/Doxygen/html/structitk_1_1ImageAlgorithm.html#a5ec5bcac992cb3b1302840636530ba20 > > Brad > > On Mar 16, 2015, at 10:16 AM, Pol Mons? Purt? wrote: > > Mmh, I believe I misread the RegionOfInterestImageFilter documentation, > confusing dimension with size. That should work. > > I still have the computation of the splitting regions problem to handle, but > maybe with this filter is easier than with the ExtractImageFilter. Or maybe > it just removes step 7? > > Is there a way to ease the repasting back to the original region with it? > How should I use the physical space index? > > 2015-03-16 14:25 GMT+01:00 Pol Mons? Purt? : >> >> Hello Bradley, >> >> Thank you for your answer and suggestion. >> >> Answering your question: It's not for multi-threading purposes, I have to >> split the image due to memory limitations. >> >> I would use extractImage directly and do streaming, but the client and the >> low-level libraries might not work correctly if I do that. I have to provide >> itk images disconnected from the pipeline and with proper indexes and sizes. >> >> The RegionOfInterestImageFilter would have the same memory footprint, and >> it would still be tricky to compute the regions of interest, due to the >> overlapping. >> >> >> >> 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : >>> >>> Hello, >>> >>> The RegionOfInterestImageFilter[1] is very similar to the >>> ExtractImageFilter, but returns an image whose starting index is always >>> zeros. >>> >>> The process you described is remarkable close to what occur in each >>> filter for the multi-threading process. Also what occurs in the >>> StreamingImageFilter is very similar, but just copies the region. >>> >>> As you didn't mention you motivation for chunking the data this way be it >>> for threading or memory requirements, I can't fully advise. >>> >>> Brad >>> >>> >>> [1 >>> ]http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html >>> [2] >>> https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 >>> >>> >>> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? >>> wrote: >>> >>> > Hello everyone, >>> > >>> > We need to split a volume into pieces, overlaped by a certain amount, >>> > do some computation and then repaste them. >>> > >>> > The computation requires the pieces' region indexes to be set to zero. >>> > The original volume might not have index at zero, but be a subregion itself. >>> > >>> > What is the best way to achieve this? >>> > >>> > I've thought of the following pipeline: >>> > >>> > 1. imageRegionSplitterSlowDimension >>> > 2. Store the index and size of each region >>> > 3. manually increase the size of each region (and modify index) >>> > 4. crop with the largestPossibleRegion of the original volume (to >>> > prevent requesting more than available) >>> > iterate over regions: >>> > 5. extractImageFilter >>> > 6. disconnect pipeline for each region >>> > 7. reset indexes >>> > 8. perform computation >>> > 9. crop with the regions in step 1 to remove the added overlap >>> > 10. restore indexes >>> > 11. pasteImageFilter >>> > >>> > I'll have to think of a smart way to deal with the index >>> > restore/cropping of steps 9 and 10. >>> > >>> > I somehow feel somebody will have already dealt with this... And >>> > there's certainly a better way to do it. >>> > _____________________________________ >>> > 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://www.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-users >>> >> >> >> 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : >>> >>> Hello, >>> >>> The RegionOfInterestImageFilter[1] is very similar to the >>> ExtractImageFilter, but returns an image whose starting index is always >>> zeros. >>> >>> The process you described is remarkable close to what occur in each >>> filter for the multi-threading process. Also what occurs in the >>> StreamingImageFilter is very similar, but just copies the region. >>> >>> As you didn't mention you motivation for chunking the data this way be it >>> for threading or memory requirements, I can't fully advise. >>> >>> Brad >>> >>> >>> [1 >>> ]http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html >>> [2] >>> https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 >>> >>> >>> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? >>> wrote: >>> >>> > Hello everyone, >>> > >>> > We need to split a volume into pieces, overlaped by a certain amount, >>> > do some computation and then repaste them. >>> > >>> > The computation requires the pieces' region indexes to be set to zero. >>> > The original volume might not have index at zero, but be a subregion itself. >>> > >>> > What is the best way to achieve this? >>> > >>> > I've thought of the following pipeline: >>> > >>> > 1. imageRegionSplitterSlowDimension >>> > 2. Store the index and size of each region >>> > 3. manually increase the size of each region (and modify index) >>> > 4. crop with the largestPossibleRegion of the original volume (to >>> > prevent requesting more than available) >>> > iterate over regions: >>> > 5. extractImageFilter >>> > 6. disconnect pipeline for each region >>> > 7. reset indexes >>> > 8. perform computation >>> > 9. crop with the regions in step 1 to remove the added overlap >>> > 10. restore indexes >>> > 11. pasteImageFilter >>> > >>> > I'll have to think of a smart way to deal with the index >>> > restore/cropping of steps 9 and 10. >>> > >>> > I somehow feel somebody will have already dealt with this... And >>> > there's certainly a better way to do it. >>> > _____________________________________ >>> > 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://www.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-users >>> >> > > > > _____________________________________ > 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://www.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-users > _____________________________________ 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://www.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-users From scapegoat.sarthak at gmail.com Mon Mar 16 11:18:06 2015 From: scapegoat.sarthak at gmail.com (scap3y) Date: Mon, 16 Mar 2015 08:18:06 -0700 (MST) Subject: [ITK] [ITK-users] Error while reading Unknown Image Information In-Reply-To: References: Message-ID: <1426519086520-7587013.post@n2.nabble.com> Hi Matt, Thanks for your reply. I have been using VS 2012. The thing is, the first statement works, so try{}catch{} isn't able to find anything. As soon as the program hits imageIO->SetFileName() statement, everything breaks. In the debugger mode, it throws the Access violation error and the imageIO is basically an uninitialized pointer (see image). I have also tried with a raw image but I am getting the same error. Thanks, Sarthak Matt McCormick-2 wrote > Hi Sarthak, > > You may also find this example [1] informative. > > To investigate the access violation error, use try{}catch{} statements > as found in the examples (use it around your > imageIO->ReadImageInformation; statement). Also, run the code in a > debugger. > > Hope this helps, > Matt > > > [1] > http://itk.org/ITKExamples/src/IO/ImageBase/ReadUnknownImageType/Documentation.html?highlight=read > > On Mon, Mar 16, 2015 at 10:15 AM, Scapegoat Sarthak > < > scapegoat.sarthak@ > > wrote: >> Hi All, > [snip!] >> > _____________________________________ > 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://www.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-users -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Error-while-reading-Unknown-Image-Information-tp7587007p7587013.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Mon Mar 16 13:26:31 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 16 Mar 2015 13:26:31 -0400 Subject: [ITK] ITK 4.7.1 | CMake error in ITKConfig.cmake In-Reply-To: <1426489117.1039512.240835561.2CE66E16@webmail.messagingengine.com> References: <1426489117.1039512.240835561.2CE66E16@webmail.messagingengine.com> Message-ID: Hi Audrius, Thanks for discussing the issue on the list. Did you manually specify the FFTW_INCLUDE_PATH in your CMake configuration? Please review and test this patch [1]. I have not tested it on Windows. Some documentation for testing can be found here [2] [3]. Thanks, Matt [1] http://review.source.kitware.com/#/c/19511/ [2] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html [3] http://www.itk.org/Wiki/ITK/Git On Mon, Mar 16, 2015 at 2:58 AM, Audrius Stundzia wrote: > OS: WIndows 8.1 x64 > ITK: 4.7.1 > CMake: 3.2.1 > > The following CMake error occurred while running CMake for RTK. > However, as it is located in ITKConfig.cmake, I thought that I should > report it here. > > _____ > > CMake Error at F:/Program Files/itk/build/ITKConfig.cmake:70 (set): > Syntax error in cmake code at > > F:/Program Files/itk/build/ITKConfig.cmake:70 > > when parsing string > > F:\Program Files\FFTW > > Invalid escape sequence \P > Call Stack (most recent call first): > CMakeLists.txt:75 (FIND_PACKAGE) > > _____ > > Changing the line from > > set(ITK_FFTW_INCLUDE_PATH "F:\Program Files\FFTW") > > to > > set(ITK_FFTW_INCLUDE_PATH "F:/Program Files/FFTW") > > fixed the problem. > > Regards, > > Audrius > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From sebastian.ordas at gmail.com Mon Mar 16 15:03:31 2015 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Mon, 16 Mar 2015 16:03:31 -0300 Subject: [ITK] [ITK-users] multiple seeds In-Reply-To: <20150316192345.1345.qmail@f4mail-235-145.rediffmail.com> References: <20150316192345.1345.qmail@f4mail-235-145.rediffmail.com> Message-ID: <55072903.90108@gmail.com> Hi Prakash, sure, you can: use the method: AddSeed (const IndexType & seed); The output will correspond to the combined effect of all input seeds. hope that helps, sebastian On 16/03/2015 04:23 p.m., ds_prakash wrote: > hello ALL, > Is it possible to give multiple seed pixels to > ConnectedThresholdImageFilter? I also want the output of regions grown > corresponding to all seeds in a single output file. > > Thanks > Prakash > > > > Get your own *FREE* website, *FREE* domain & *FREE* mobile app with > Company email. > *Know More >* > > > > > > _____________________________________ > 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://www.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-users > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Mon Mar 16 16:33:00 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 16 Mar 2015 16:33:00 -0400 Subject: [ITK] [ITK-users] Error while reading Unknown Image Information In-Reply-To: <1426519086520-7587013.post@n2.nabble.com> References: <1426519086520-7587013.post@n2.nabble.com> Message-ID: Hi Sarthak, You will need to check that CreateImageIO does not generate a null pointer. If none of the registered ImageIO classes can read the given file path, it will return a null pointer [1]. HTH, Matt [1] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/IO/ImageBase/src/itkImageIOFactory.cxx;h=638775873847ad8c4017a85f0992de9f4dee7161;hb=HEAD#l63 On Mon, Mar 16, 2015 at 11:18 AM, scap3y wrote: > Hi Matt, > > Thanks for your reply. > > I have been using VS 2012. The thing is, the first statement works, so > try{}catch{} isn't able to find anything. As soon as the program hits > imageIO->SetFileName() statement, everything breaks. In the debugger mode, > it throws the Access violation error and the imageIO is basically an > uninitialized pointer (see image). > > > > I have also tried with a raw image but I am getting the same error. > > Thanks, > Sarthak > > > Matt McCormick-2 wrote >> Hi Sarthak, >> >> You may also find this example [1] informative. >> >> To investigate the access violation error, use try{}catch{} statements >> as found in the examples (use it around your >> imageIO->ReadImageInformation; statement). Also, run the code in a >> debugger. >> >> Hope this helps, >> Matt >> >> >> [1] >> http://itk.org/ITKExamples/src/IO/ImageBase/ReadUnknownImageType/Documentation.html?highlight=read >> >> On Mon, Mar 16, 2015 at 10:15 AM, Scapegoat Sarthak >> < > >> scapegoat.sarthak@ > >> > wrote: >>> Hi All, >> [snip!] >>> >> _____________________________________ >> 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://www.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-users > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Error-while-reading-Unknown-Image-Information-tp7587007p7587013.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From ds_prakash at rediffmail.com Tue Mar 17 06:54:22 2015 From: ds_prakash at rediffmail.com (Surya Prakash) Date: 17 Mar 2015 10:54:22 -0000 Subject: [ITK] =?utf-8?q?=5BITK-users=5D_providing_data?= Message-ID: <20150317105422.15641.qmail@f4mail-235-154.rediffmail.com> Hello, I am developing an application using ITK. I have data in an Arry pointed to by a 'float *'. I am aware of data sizes. How I can provide this array to 'ConnectedThresholdImageFilter' or for that matter to any filter. Thanks Prakash -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Tue Mar 17 07:01:50 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 17 Mar 2015 07:01:50 -0400 Subject: [ITK] [ITK-users] providing data In-Reply-To: <20150317105422.15641.qmail@f4mail-235-154.rediffmail.com> References: <20150317105422.15641.qmail@f4mail-235-154.rediffmail.com> Message-ID: Hi Prakash, The ImportImageFilter [1] can be used to import a pixel buffer into an itk::Image data structure. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1ImportImageFilter.html On Tue, Mar 17, 2015 at 6:54 AM, Surya Prakash wrote: > Hello, > I am developing an application using ITK. I have data in an Arry pointed > to by a 'float *'. I am aware of data sizes. How I can provide this array > to 'ConnectedThresholdImageFilter' or for that matter to any filter. > > Thanks > Prakash > > > Get your own *FREE* website, *FREE* domain & *FREE* mobile app with > Company email. > *Know More >* > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From scapegoat.sarthak at gmail.com Tue Mar 17 09:14:34 2015 From: scapegoat.sarthak at gmail.com (scap3y) Date: Tue, 17 Mar 2015 06:14:34 -0700 (MST) Subject: [ITK] [ITK-users] Error while reading Unknown Image Information In-Reply-To: References: <1426519086520-7587013.post@n2.nabble.com> Message-ID: <1426598074586-7587018.post@n2.nabble.com> Hi Matt, Thanks for your reply. I am checking for a null pointer like this: *if ( imageIO ) { imageIO->SetFileName(argv[3]); imageIO->ReadImageInformation(); } else { std::cout <<"Could not read the input image information from '" << argv[3] << "'\n"; } * And it is going into the "else" loop after the CreateImageIO step. What I am not able to understand is that why is this the case. Does CreateImageIO have restrictions? If so, what are they? I have tried reading 2D images in JPG, PNG, DCM, NII formats and 3D images in DCM and NII formats. It fails in all of them. Best, Sarthak Matt McCormick-2 wrote > Hi Sarthak, > > You will need to check that CreateImageIO does not generate a null > pointer. If none of the registered ImageIO classes can read the given > file path, it will return a null pointer [1]. > > HTH, > Matt > > [1] > http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/IO/ImageBase/src/itkImageIOFactory.cxx;h=638775873847ad8c4017a85f0992de9f4dee7161;hb=HEAD#l63 > > On Mon, Mar 16, 2015 at 11:18 AM, scap3y < > scapegoat.sarthak@ > > wrote: >> Hi Matt, >> >> Thanks for your reply. > [snip!] >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > _____________________________________ > 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://www.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-users -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Error-while-reading-Unknown-Image-Information-tp7587007p7587018.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Tue Mar 17 09:27:02 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 17 Mar 2015 09:27:02 -0400 Subject: [ITK] [ITK-users] Error while reading Unknown Image Information In-Reply-To: <1426598074586-7587018.post@n2.nabble.com> References: <1426519086520-7587013.post@n2.nabble.com> <1426598074586-7587018.post@n2.nabble.com> Message-ID: Hi Sarthak, It looks like a good improvement. The ImageIO's classes for the different file formats must be registered to the factory. When using CMake to configure your project, this is done automatically. When not using CMake, it must be done manually. Are you using CMake to configure your project? HTH, Matt On Tue, Mar 17, 2015 at 9:14 AM, scap3y wrote: > Hi Matt, > > Thanks for your reply. > > I am checking for a null pointer like this: > > *if ( imageIO ) > { > imageIO->SetFileName(argv[3]); > imageIO->ReadImageInformation(); > } > else > { > std::cout <<"Could not read the input image information from '" << argv[3] > << "'\n"; > } * > > And it is going into the "else" loop after the CreateImageIO step. What I am > not able to understand is that why is this the case. Does CreateImageIO have > restrictions? If so, what are they? I have tried reading 2D images in JPG, > PNG, DCM, NII formats and 3D images in DCM and NII formats. It fails in all > of them. > > Best, > Sarthak > > > Matt McCormick-2 wrote >> Hi Sarthak, >> >> You will need to check that CreateImageIO does not generate a null >> pointer. If none of the registered ImageIO classes can read the given >> file path, it will return a null pointer [1]. >> >> HTH, >> Matt >> >> [1] >> http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/IO/ImageBase/src/itkImageIOFactory.cxx;h=638775873847ad8c4017a85f0992de9f4dee7161;hb=HEAD#l63 >> >> On Mon, Mar 16, 2015 at 11:18 AM, scap3y < > >> scapegoat.sarthak@ > >> > wrote: >>> Hi Matt, >>> >>> Thanks for your reply. >> [snip!] >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> _____________________________________ >> 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://www.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-users > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Error-while-reading-Unknown-Image-Information-tp7587007p7587018.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From sebastian.ordas at gmail.com Tue Mar 17 09:28:46 2015 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Tue, 17 Mar 2015 10:28:46 -0300 Subject: [ITK] [ITK-users] providing data In-Reply-To: <20150317105422.15641.qmail@f4mail-235-154.rediffmail.com> References: <20150317105422.15641.qmail@f4mail-235-154.rediffmail.com> Message-ID: <55082C0E.7000508@gmail.com> you can interate over your array and set seeds to ConnectedThresholdImageFilter one by one On 17/03/2015 07:54 a.m., Surya Prakash wrote: > Hello, > I am developing an application using ITK. I have data in an Arry > pointed to by a 'float *'. I am aware of data sizes. How I can provide > this array to 'ConnectedThresholdImageFilter' or for that matter to > any filter. > > Thanks > Prakash > > > > Get your own *FREE* website, *FREE* domain & *FREE* mobile app with > Company email. > *Know More >* > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From sebastian.ordas at gmail.com Tue Mar 17 09:32:20 2015 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Tue, 17 Mar 2015 10:32:20 -0300 Subject: [ITK] [ITK-users] providing data In-Reply-To: <55082C0E.7000508@gmail.com> References: <20150317105422.15641.qmail@f4mail-235-154.rediffmail.com> <55082C0E.7000508@gmail.com> Message-ID: <55082CE4.8070202@gmail.com> sorry Prakash , I misunderstood your problem. do as Matt suggested using the ImportImageFilter On 17/03/2015 10:28 a.m., Sebastian Ordas wrote: > you can interate over your array and set seeds to > ConnectedThresholdImageFilter one by one > > On 17/03/2015 07:54 a.m., Surya Prakash wrote: >> Hello, >> I am developing an application using ITK. I have data in an Arry >> pointed to by a 'float *'. I am aware of data sizes. How I can >> provide this array to 'ConnectedThresholdImageFilter' or for that >> matter to any filter. >> >> Thanks >> Prakash >> >> >> >> Get your own *FREE* website, *FREE* domain & *FREE* mobile app with >> Company email. >> *Know More >* >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From scapegoat.sarthak at gmail.com Tue Mar 17 09:53:28 2015 From: scapegoat.sarthak at gmail.com (scap3y) Date: Tue, 17 Mar 2015 06:53:28 -0700 (MST) Subject: [ITK] [ITK-users] Error while reading Unknown Image Information In-Reply-To: References: <1426519086520-7587013.post@n2.nabble.com> <1426598074586-7587018.post@n2.nabble.com> Message-ID: <1426600408388-7587022.post@n2.nabble.com> Hi Matt, Thanks for your reply. I am indeed using CMake for configuring my project (I don't think I have used anything else since the past 3-odd years; I am a huge CMake fan). Could you give me the details on how to do the registration for the different file formats? Much appreciated, Sarthak Matt McCormick-2 wrote > Hi Sarthak, > > It looks like a good improvement. > > The ImageIO's classes for the different file formats must be > registered to the factory. When using CMake to configure your > project, this is done automatically. When not using CMake, it must be > done manually. Are you using CMake to configure your project? > > HTH, > Matt > > On Tue, Mar 17, 2015 at 9:14 AM, scap3y < > scapegoat.sarthak@ > > wrote: >> Hi Matt, > [snip!] > _____________________________________ > 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://www.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-users -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Error-while-reading-Unknown-Image-Information-tp7587007p7587022.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Tue Mar 17 10:44:39 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 17 Mar 2015 10:44:39 -0400 Subject: [ITK] [ITK-dev] Kents Work on Explicit instantiation of ITK In-Reply-To: <4CA4552A-CF59-4117-9E73-8473AA5591CA@uiowa.edu> References: <53264C14-1383-41F1-8FFE-B7AD116E0DDE@mail.nih.gov> <4CA4552A-CF59-4117-9E73-8473AA5591CA@uiowa.edu> Message-ID: <84728F69-ACF7-4F1D-B561-D3E2729473C0@mail.nih.gov> Hans, Thanks for sharing this work. I was able to utilize your script and methodology for SimpleITK to explicitly instantiate about 16 classes with their commonly used arguments as by SimpleITK [1]. I created a separate library in SimpleITK which contains these explicitly instantiated classes [2]. These instantiations reduced the size of the .o files for SimpleITK by ~30% (500MB), and enabled linking once again on Windows 64. Some systems seem to also gain significant performance in build time (over 2X), but there are many reasons for it including running into memory or IO limitations on the individual system. However I was not able to get it working with the explicitly instantiated library as shared. The mixtures of export specification of the initial ITK declaration and the explicit instantiation linking specification didn't appear to work. I think they need to be consistent? I followed the methodology that was done for the MetaDataObjects[3]. If I build ITK and SimpleITK as shared but with the Explicit library as static it appears to work. Any help on explicitly instantiation with shared libraries would be appreciated! Thanks, Brad [1] https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/include/sitkExplicitITK.h [2] https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/src/CMakeLists.txt [3] https://github.com/InsightSoftwareConsortium/ITK/blob/d195bfb21e8af086c67208c2b96d5fd5992c66ca/Modules/Core/Common/include/itkMetaDataObject.h#L191-L224 On Jan 28, 2015, at 12:16 PM, Johnson, Hans J wrote: > Yes! I?d love someone to investigate further: > > > https://github.com/hjmjohnson/ITK/tree/TryExplicitInstantiationTesting > > https://github.com/hjmjohnson/ITK/commit/0576c75c8a760f1cafcde3125210134a39502304 > > > Hans -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ 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 Tue Mar 17 10:49:21 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 17 Mar 2015 10:49:21 -0400 Subject: [ITK] [ITK-users] Error while reading Unknown Image Information In-Reply-To: <1426600408388-7587022.post@n2.nabble.com> References: <1426519086520-7587013.post@n2.nabble.com> <1426598074586-7587018.post@n2.nabble.com> <1426600408388-7587022.post@n2.nabble.com> Message-ID: Hi Sarthak, To perform manual registration call the static RegisterOneFactory() method on the ImageIO class. See, e.g., http://www.itk.org/Doxygen/html/classitk_1_1VTKImageIOFactory.html#abd26950373ca63c737794504f09bb18a HTH, Matt On Tue, Mar 17, 2015 at 9:53 AM, scap3y wrote: > Hi Matt, > > Thanks for your reply. > > I am indeed using CMake for configuring my project (I don't think I have > used anything else since the past 3-odd years; I am a huge CMake fan). Could > you give me the details on how to do the registration for the different file > formats? > > Much appreciated, > Sarthak > > > Matt McCormick-2 wrote >> Hi Sarthak, >> >> It looks like a good improvement. >> >> The ImageIO's classes for the different file formats must be >> registered to the factory. When using CMake to configure your >> project, this is done automatically. When not using CMake, it must be >> done manually. Are you using CMake to configure your project? >> >> HTH, >> Matt >> >> On Tue, Mar 17, 2015 at 9:14 AM, scap3y < > >> scapegoat.sarthak@ > >> > wrote: >>> Hi Matt, >> [snip!] >> _____________________________________ >> 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://www.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-users > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Error-while-reading-Unknown-Image-Information-tp7587007p7587022.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Tue Mar 17 11:00:45 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 17 Mar 2015 11:00:45 -0400 Subject: [ITK] [ITK-dev] Kents Work on Explicit instantiation of ITK In-Reply-To: <84728F69-ACF7-4F1D-B561-D3E2729473C0@mail.nih.gov> References: <53264C14-1383-41F1-8FFE-B7AD116E0DDE@mail.nih.gov> <4CA4552A-CF59-4117-9E73-8473AA5591CA@uiowa.edu> <84728F69-ACF7-4F1D-B561-D3E2729473C0@mail.nih.gov> Message-ID: Hi, Instead of maintaining a duplicate set of type instantiations, it may be worth exploiting the ITK_WRAP_EXPLICIT option (see Wrapping/Generators/Explicit). This will re-use all the wrapping type instantiation logic, which is also CMake configurable. 2 cents, Matt On Tue, Mar 17, 2015 at 10:44 AM, Bradley Lowekamp wrote: > Hans, > > Thanks for sharing this work. > > I was able to utilize your script and methodology for SimpleITK to > explicitly instantiate about 16 classes with their commonly used arguments > as by SimpleITK [1]. I created a separate library in SimpleITK which > contains these explicitly instantiated classes [2]. > > These instantiations reduced the size of the .o files for SimpleITK by ~30% > (500MB), and enabled linking once again on Windows 64. Some systems seem to > also gain significant performance in build time (over 2X), but there are > many reasons for it including running into memory or IO limitations on the > individual system. > > However I was not able to get it working with the explicitly instantiated > library as shared. The mixtures of export specification of the initial ITK > declaration and the explicit instantiation linking specification didn't > appear to work. I think they need to be consistent? I followed the > methodology that was done for the MetaDataObjects[3]. If I build ITK and > SimpleITK as shared but with the Explicit library as static it appears to > work. > > Any help on explicitly instantiation with shared libraries would be > appreciated! > > Thanks, > Brad > > [1] > https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/include/sitkExplicitITK.h > [2] > https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/src/CMakeLists.txt > [3] > https://github.com/InsightSoftwareConsortium/ITK/blob/d195bfb21e8af086c67208c2b96d5fd5992c66ca/Modules/Core/Common/include/itkMetaDataObject.h#L191-L224 > > On Jan 28, 2015, at 12:16 PM, Johnson, Hans J > wrote: > > Yes! I?d love someone to investigate further: > > > https://github.com/hjmjohnson/ITK/tree/TryExplicitInstantiationTesting > > https://github.com/hjmjohnson/ITK/commit/0576c75c8a760f1cafcde3125210134a39502304 > > > Hans > > > > _______________________________________________ > 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 From blowekamp at mail.nih.gov Tue Mar 17 11:05:37 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 17 Mar 2015 11:05:37 -0400 Subject: [ITK] [ITK-dev] Kents Work on Explicit instantiation of ITK In-Reply-To: References: <53264C14-1383-41F1-8FFE-B7AD116E0DDE@mail.nih.gov> <4CA4552A-CF59-4117-9E73-8473AA5591CA@uiowa.edu> <84728F69-ACF7-4F1D-B561-D3E2729473C0@mail.nih.gov> Message-ID: <8432D3F9-8A37-41B6-B3B7-13280C395B3B@mail.nih.gov> Matt, That part has need been working for a very long time, and many of the parts that it used have been removed from ITK. Do you know of people using that part of Wrapping? Also the goal of that project was to instantiate everything, not just the most frequently used components. Additionally having to build WrapITK, would not make the compilation of SimpleITK any quicker. Brad On Mar 17, 2015, at 11:00 AM, Matt McCormick wrote: > Hi, > > Instead of maintaining a duplicate set of type instantiations, it may > be worth exploiting the ITK_WRAP_EXPLICIT option (see > Wrapping/Generators/Explicit). This will re-use all the wrapping type > instantiation logic, which is also CMake configurable. > > 2 cents, > Matt > > > > On Tue, Mar 17, 2015 at 10:44 AM, Bradley Lowekamp > wrote: >> Hans, >> >> Thanks for sharing this work. >> >> I was able to utilize your script and methodology for SimpleITK to >> explicitly instantiate about 16 classes with their commonly used arguments >> as by SimpleITK [1]. I created a separate library in SimpleITK which >> contains these explicitly instantiated classes [2]. >> >> These instantiations reduced the size of the .o files for SimpleITK by ~30% >> (500MB), and enabled linking once again on Windows 64. Some systems seem to >> also gain significant performance in build time (over 2X), but there are >> many reasons for it including running into memory or IO limitations on the >> individual system. >> >> However I was not able to get it working with the explicitly instantiated >> library as shared. The mixtures of export specification of the initial ITK >> declaration and the explicit instantiation linking specification didn't >> appear to work. I think they need to be consistent? I followed the >> methodology that was done for the MetaDataObjects[3]. If I build ITK and >> SimpleITK as shared but with the Explicit library as static it appears to >> work. >> >> Any help on explicitly instantiation with shared libraries would be >> appreciated! >> >> Thanks, >> Brad >> >> [1] >> https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/include/sitkExplicitITK.h >> [2] >> https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/src/CMakeLists.txt >> [3] >> https://github.com/InsightSoftwareConsortium/ITK/blob/d195bfb21e8af086c67208c2b96d5fd5992c66ca/Modules/Core/Common/include/itkMetaDataObject.h#L191-L224 >> >> On Jan 28, 2015, at 12:16 PM, Johnson, Hans J >> wrote: >> >> Yes! I?d love someone to investigate further: >> >> >> https://github.com/hjmjohnson/ITK/tree/TryExplicitInstantiationTesting >> >> https://github.com/hjmjohnson/ITK/commit/0576c75c8a760f1cafcde3125210134a39502304 >> >> >> Hans >> >> >> >> _______________________________________________ >> 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 From scapegoat.sarthak at gmail.com Tue Mar 17 11:10:36 2015 From: scapegoat.sarthak at gmail.com (scap3y) Date: Tue, 17 Mar 2015 08:10:36 -0700 (MST) Subject: [ITK] [ITK-users] Error while reading Unknown Image Information In-Reply-To: References: <1426519086520-7587013.post@n2.nabble.com> <1426598074586-7587018.post@n2.nabble.com> <1426600408388-7587022.post@n2.nabble.com> Message-ID: <1426605036611-7587024.post@n2.nabble.com> Hi Matt, Thanks for your reply. I am hesitant to do this since I just want to read image properties automatically. Doing a manual registration seems like an overkill and to be honest seems to mitigate the main idea behind problem in the first place. In any case, this shouldn't be required if I am using CMake to configure the project, correct? I am using a pretty standard CMakeLists file for attaching ITK includes and libraries to my project (taken from the previously mentioned example). Since the ImageIOFactory should be automatically registered, I am confused regarding what I am doing wrong. Best, Sarthak Matt McCormick-2 wrote > Hi Sarthak, > > To perform manual registration call the static RegisterOneFactory() > method on the ImageIO class. See, e.g., > > > http://www.itk.org/Doxygen/html/classitk_1_1VTKImageIOFactory.html#abd26950373ca63c737794504f09bb18a > > HTH, > Matt > > On Tue, Mar 17, 2015 at 9:53 AM, scap3y < > scapegoat.sarthak@ > > wrote: > [snip!] > _____________________________________ > 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://www.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-users -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Error-while-reading-Unknown-Image-Information-tp7587007p7587024.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From scapegoat.sarthak at gmail.com Tue Mar 17 11:26:11 2015 From: scapegoat.sarthak at gmail.com (scap3y) Date: Tue, 17 Mar 2015 08:26:11 -0700 (MST) Subject: [ITK] [ITK-users] Error while reading Unknown Image Information In-Reply-To: <1426605036611-7587024.post@n2.nabble.com> References: <1426519086520-7587013.post@n2.nabble.com> <1426598074586-7587018.post@n2.nabble.com> <1426600408388-7587022.post@n2.nabble.com> <1426605036611-7587024.post@n2.nabble.com> Message-ID: <1426605971241-7587025.post@n2.nabble.com> Hi Matt, This is probably the stupidest thing. I solved the issue by removing "itkImageIOBase.h" and "itkImageIOFactory.h". No idea why this is the reason. Thanks for all the help, Sarthak -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Error-while-reading-Unknown-Image-Information-tp7587007p7587025.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Tue Mar 17 12:21:26 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 17 Mar 2015 12:21:26 -0400 Subject: [ITK] [ITK-dev] Kents Work on Explicit instantiation of ITK In-Reply-To: <8432D3F9-8A37-41B6-B3B7-13280C395B3B@mail.nih.gov> References: <53264C14-1383-41F1-8FFE-B7AD116E0DDE@mail.nih.gov> <4CA4552A-CF59-4117-9E73-8473AA5591CA@uiowa.edu> <84728F69-ACF7-4F1D-B561-D3E2729473C0@mail.nih.gov> <8432D3F9-8A37-41B6-B3B7-13280C395B3B@mail.nih.gov> Message-ID: Hi Brad, > That part has need been working for a very long time, and many of the parts that it used have been removed from ITK. Do you know of people using that part of Wrapping? No, the code base would need to be cleaned up. > Also the goal of that project was to instantiate everything, not just the most frequently used components. Additionally having to build WrapITK, would not make the compilation of SimpleITK any quicker. The modules that are built are instantiated, and only with the types specified. Eventually there should be a CastXML binary, so enabling should not take any longer. Matt > Brad > > On Mar 17, 2015, at 11:00 AM, Matt McCormick wrote: > >> Hi, >> >> Instead of maintaining a duplicate set of type instantiations, it may >> be worth exploiting the ITK_WRAP_EXPLICIT option (see >> Wrapping/Generators/Explicit). This will re-use all the wrapping type >> instantiation logic, which is also CMake configurable. >> >> 2 cents, >> Matt >> >> >> >> On Tue, Mar 17, 2015 at 10:44 AM, Bradley Lowekamp >> wrote: >>> Hans, >>> >>> Thanks for sharing this work. >>> >>> I was able to utilize your script and methodology for SimpleITK to >>> explicitly instantiate about 16 classes with their commonly used arguments >>> as by SimpleITK [1]. I created a separate library in SimpleITK which >>> contains these explicitly instantiated classes [2]. >>> >>> These instantiations reduced the size of the .o files for SimpleITK by ~30% >>> (500MB), and enabled linking once again on Windows 64. Some systems seem to >>> also gain significant performance in build time (over 2X), but there are >>> many reasons for it including running into memory or IO limitations on the >>> individual system. >>> >>> However I was not able to get it working with the explicitly instantiated >>> library as shared. The mixtures of export specification of the initial ITK >>> declaration and the explicit instantiation linking specification didn't >>> appear to work. I think they need to be consistent? I followed the >>> methodology that was done for the MetaDataObjects[3]. If I build ITK and >>> SimpleITK as shared but with the Explicit library as static it appears to >>> work. >>> >>> Any help on explicitly instantiation with shared libraries would be >>> appreciated! >>> >>> Thanks, >>> Brad >>> >>> [1] >>> https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/include/sitkExplicitITK.h >>> [2] >>> https://github.com/SimpleITK/SimpleITK/blob/a6e62785a9e8ebc41dfb3e15f72e1985a620bf22/Code/Explicit/src/CMakeLists.txt >>> [3] >>> https://github.com/InsightSoftwareConsortium/ITK/blob/d195bfb21e8af086c67208c2b96d5fd5992c66ca/Modules/Core/Common/include/itkMetaDataObject.h#L191-L224 >>> >>> On Jan 28, 2015, at 12:16 PM, Johnson, Hans J >>> wrote: >>> >>> Yes! I?d love someone to investigate further: >>> >>> >>> https://github.com/hjmjohnson/ITK/tree/TryExplicitInstantiationTesting >>> >>> https://github.com/hjmjohnson/ITK/commit/0576c75c8a760f1cafcde3125210134a39502304 >>> >>> >>> Hans >>> >>> >>> >>> _______________________________________________ >>> 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 From lluna.nova at gmail.com Tue Mar 17 12:33:29 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Tue, 17 Mar 2015 17:33:29 +0100 Subject: [ITK] [ITK-users] Splitting and repasting a volume with overlap In-Reply-To: References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> Message-ID: Indeed, that simplifies the pasting. Good suggestion! 2015-03-16 15:20 GMT+01:00 Bradley Lowekamp : > You may find this method useful: > > > http://www.itk.org/Doxygen/html/structitk_1_1ImageAlgorithm.html#a5ec5bcac992cb3b1302840636530ba20 > > Brad > > On Mar 16, 2015, at 10:16 AM, Pol Mons? Purt? > wrote: > > Mmh, I believe I misread the RegionOfInterestImageFilter documentation, > confusing dimension with size. That should work. > > I still have the computation of the splitting regions problem to handle, > but maybe with this filter is easier than with the ExtractImageFilter. Or > maybe it just removes step 7? > > Is there a way to ease the repasting back to the original region with it? > How should I use the physical space index? > > 2015-03-16 14:25 GMT+01:00 Pol Mons? Purt? : > >> Hello Bradley, >> >> Thank you for your answer and suggestion. >> >> Answering your question: It's not for multi-threading purposes, I have to >> split the image due to memory limitations. >> >> I would use extractImage directly and do streaming, but the client and >> the low-level libraries might not work correctly if I do that. I have to >> provide itk images disconnected from the pipeline and with proper indexes >> and sizes. >> >> The RegionOfInterestImageFilter would have the same memory footprint, and >> it would still be tricky to compute the regions of interest, due to the >> overlapping. >> >> >> >> 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : >> >>> Hello, >>> >>> The RegionOfInterestImageFilter[1] is very similar to the >>> ExtractImageFilter, but returns an image whose starting index is always >>> zeros. >>> >>> The process you described is remarkable close to what occur in each >>> filter for the multi-threading process. Also what occurs in the >>> StreamingImageFilter is very similar, but just copies the region. >>> >>> As you didn't mention you motivation for chunking the data this way be >>> it for threading or memory requirements, I can't fully advise. >>> >>> Brad >>> >>> >>> [1 ] >>> http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html >>> [2] >>> https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 >>> >>> >>> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? >>> wrote: >>> >>> > Hello everyone, >>> > >>> > We need to split a volume into pieces, overlaped by a certain amount, >>> do some computation and then repaste them. >>> > >>> > The computation requires the pieces' region indexes to be set to zero. >>> The original volume might not have index at zero, but be a subregion itself. >>> > >>> > What is the best way to achieve this? >>> > >>> > I've thought of the following pipeline: >>> > >>> > 1. imageRegionSplitterSlowDimension >>> > 2. Store the index and size of each region >>> > 3. manually increase the size of each region (and modify index) >>> > 4. crop with the largestPossibleRegion of the original volume (to >>> prevent requesting more than available) >>> > iterate over regions: >>> > 5. extractImageFilter >>> > 6. disconnect pipeline for each region >>> > 7. reset indexes >>> > 8. perform computation >>> > 9. crop with the regions in step 1 to remove the added overlap >>> > 10. restore indexes >>> > 11. pasteImageFilter >>> > >>> > I'll have to think of a smart way to deal with the index >>> restore/cropping of steps 9 and 10. >>> > >>> > I somehow feel somebody will have already dealt with this... And >>> there's certainly a better way to do it. >>> > _____________________________________ >>> > 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://www.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-users >>> >>> >> >> 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : >> >>> Hello, >>> >>> The RegionOfInterestImageFilter[1] is very similar to the >>> ExtractImageFilter, but returns an image whose starting index is always >>> zeros. >>> >>> The process you described is remarkable close to what occur in each >>> filter for the multi-threading process. Also what occurs in the >>> StreamingImageFilter is very similar, but just copies the region. >>> >>> As you didn't mention you motivation for chunking the data this way be >>> it for threading or memory requirements, I can't fully advise. >>> >>> Brad >>> >>> >>> [1 ] >>> http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html >>> [2] >>> https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 >>> >>> >>> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? >>> wrote: >>> >>> > Hello everyone, >>> > >>> > We need to split a volume into pieces, overlaped by a certain amount, >>> do some computation and then repaste them. >>> > >>> > The computation requires the pieces' region indexes to be set to zero. >>> The original volume might not have index at zero, but be a subregion itself. >>> > >>> > What is the best way to achieve this? >>> > >>> > I've thought of the following pipeline: >>> > >>> > 1. imageRegionSplitterSlowDimension >>> > 2. Store the index and size of each region >>> > 3. manually increase the size of each region (and modify index) >>> > 4. crop with the largestPossibleRegion of the original volume (to >>> prevent requesting more than available) >>> > iterate over regions: >>> > 5. extractImageFilter >>> > 6. disconnect pipeline for each region >>> > 7. reset indexes >>> > 8. perform computation >>> > 9. crop with the regions in step 1 to remove the added overlap >>> > 10. restore indexes >>> > 11. pasteImageFilter >>> > >>> > I'll have to think of a smart way to deal with the index >>> restore/cropping of steps 9 and 10. >>> > >>> > I somehow feel somebody will have already dealt with this... And >>> there's certainly a better way to do it. >>> > _____________________________________ >>> > 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://www.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-users >>> >>> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From lluna.nova at gmail.com Tue Mar 17 13:13:02 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Tue, 17 Mar 2015 18:13:02 +0100 Subject: [ITK] [ITK-users] Splitting and repasting a volume with overlap In-Reply-To: References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> Message-ID: Hello Matt, As I've told Bradley, I can't use streaming as-is because I need overlap between chunks and because the low-level library would need a proper itk image with correct size, region, etc. which I guess it wouldn't be provided by streaming. But most definetely, right now I use 'streaming' by using the ExtractFilter at the end. I believe that streams too. I was actually more interested in having a filter/object that computes the splits for me. I've implemented it, but it's far from perfect. For example, it broke when the input image had a non-zero index. (It's fixed now, but still, I'm sure the itk's Splitter filter does a better job, if only could I have overlap ;)) I guess the way to go would be to take the splitter (probably ImageRegionSplitterMultidimensional now that I look at it) and extend it to support overlap. If I do it, I'll let you know in case it is of interest to anyone. For now I'll stick to my class. Cheers, Pol 2015-03-16 16:05 GMT+01:00 Matt McCormick : > Hi Pol, > > As a side note, limitation of memory usage is built into the streaming > pipeline design of ITK. All computation of appropriate regions should > occur if the filters are implemented correctly. To take advantage of > streaming, place the StreamingImageFilter [1] at the end of your > pipeline. To use less memory, set the ReleaseDataFlagOn() [2] on the > component filters. > > HTH, > Matt > > [1] http://www.itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > [2] > http://www.itk.org/Doxygen/html/classitk_1_1ProcessObject.html#ae732e9163879ae559ccd0b5957141f97 > > On Mon, Mar 16, 2015 at 10:20 AM, Bradley Lowekamp > wrote: > > You may find this method useful: > > > > > http://www.itk.org/Doxygen/html/structitk_1_1ImageAlgorithm.html#a5ec5bcac992cb3b1302840636530ba20 > > > > Brad > > > > On Mar 16, 2015, at 10:16 AM, Pol Mons? Purt? > wrote: > > > > Mmh, I believe I misread the RegionOfInterestImageFilter documentation, > > confusing dimension with size. That should work. > > > > I still have the computation of the splitting regions problem to handle, > but > > maybe with this filter is easier than with the ExtractImageFilter. Or > maybe > > it just removes step 7? > > > > Is there a way to ease the repasting back to the original region with it? > > How should I use the physical space index? > > > > 2015-03-16 14:25 GMT+01:00 Pol Mons? Purt? : > >> > >> Hello Bradley, > >> > >> Thank you for your answer and suggestion. > >> > >> Answering your question: It's not for multi-threading purposes, I have > to > >> split the image due to memory limitations. > >> > >> I would use extractImage directly and do streaming, but the client and > the > >> low-level libraries might not work correctly if I do that. I have to > provide > >> itk images disconnected from the pipeline and with proper indexes and > sizes. > >> > >> The RegionOfInterestImageFilter would have the same memory footprint, > and > >> it would still be tricky to compute the regions of interest, due to the > >> overlapping. > >> > >> > >> > >> 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : > >>> > >>> Hello, > >>> > >>> The RegionOfInterestImageFilter[1] is very similar to the > >>> ExtractImageFilter, but returns an image whose starting index is always > >>> zeros. > >>> > >>> The process you described is remarkable close to what occur in each > >>> filter for the multi-threading process. Also what occurs in the > >>> StreamingImageFilter is very similar, but just copies the region. > >>> > >>> As you didn't mention you motivation for chunking the data this way be > it > >>> for threading or memory requirements, I can't fully advise. > >>> > >>> Brad > >>> > >>> > >>> [1 > >>> ] > http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html > >>> [2] > >>> > https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 > >>> > >>> > >>> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? > >>> wrote: > >>> > >>> > Hello everyone, > >>> > > >>> > We need to split a volume into pieces, overlaped by a certain amount, > >>> > do some computation and then repaste them. > >>> > > >>> > The computation requires the pieces' region indexes to be set to > zero. > >>> > The original volume might not have index at zero, but be a subregion > itself. > >>> > > >>> > What is the best way to achieve this? > >>> > > >>> > I've thought of the following pipeline: > >>> > > >>> > 1. imageRegionSplitterSlowDimension > >>> > 2. Store the index and size of each region > >>> > 3. manually increase the size of each region (and modify index) > >>> > 4. crop with the largestPossibleRegion of the original volume (to > >>> > prevent requesting more than available) > >>> > iterate over regions: > >>> > 5. extractImageFilter > >>> > 6. disconnect pipeline for each region > >>> > 7. reset indexes > >>> > 8. perform computation > >>> > 9. crop with the regions in step 1 to remove the added overlap > >>> > 10. restore indexes > >>> > 11. pasteImageFilter > >>> > > >>> > I'll have to think of a smart way to deal with the index > >>> > restore/cropping of steps 9 and 10. > >>> > > >>> > I somehow feel somebody will have already dealt with this... And > >>> > there's certainly a better way to do it. > >>> > _____________________________________ > >>> > 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://www.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-users > >>> > >> > >> > >> 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : > >>> > >>> Hello, > >>> > >>> The RegionOfInterestImageFilter[1] is very similar to the > >>> ExtractImageFilter, but returns an image whose starting index is always > >>> zeros. > >>> > >>> The process you described is remarkable close to what occur in each > >>> filter for the multi-threading process. Also what occurs in the > >>> StreamingImageFilter is very similar, but just copies the region. > >>> > >>> As you didn't mention you motivation for chunking the data this way be > it > >>> for threading or memory requirements, I can't fully advise. > >>> > >>> Brad > >>> > >>> > >>> [1 > >>> ] > http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html > >>> [2] > >>> > https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 > >>> > >>> > >>> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? > >>> wrote: > >>> > >>> > Hello everyone, > >>> > > >>> > We need to split a volume into pieces, overlaped by a certain amount, > >>> > do some computation and then repaste them. > >>> > > >>> > The computation requires the pieces' region indexes to be set to > zero. > >>> > The original volume might not have index at zero, but be a subregion > itself. > >>> > > >>> > What is the best way to achieve this? > >>> > > >>> > I've thought of the following pipeline: > >>> > > >>> > 1. imageRegionSplitterSlowDimension > >>> > 2. Store the index and size of each region > >>> > 3. manually increase the size of each region (and modify index) > >>> > 4. crop with the largestPossibleRegion of the original volume (to > >>> > prevent requesting more than available) > >>> > iterate over regions: > >>> > 5. extractImageFilter > >>> > 6. disconnect pipeline for each region > >>> > 7. reset indexes > >>> > 8. perform computation > >>> > 9. crop with the regions in step 1 to remove the added overlap > >>> > 10. restore indexes > >>> > 11. pasteImageFilter > >>> > > >>> > I'll have to think of a smart way to deal with the index > >>> > restore/cropping of steps 9 and 10. > >>> > > >>> > I somehow feel somebody will have already dealt with this... And > >>> > there's certainly a better way to do it. > >>> > _____________________________________ > >>> > 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://www.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-users > >>> > >> > > > > > > > > _____________________________________ > > 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://www.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-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Tue Mar 17 15:22:17 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 17 Mar 2015 15:22:17 -0400 Subject: [ITK] [ITK-users] Splitting and repasting a volume with overlap In-Reply-To: References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> Message-ID: Hi Pol, You may already be aware of this, but the chunks will overlap if you implement a GenerateInputRequestedRegion() method on your filter that pads the output RequestedRegion. HTH, Matt On Tue, Mar 17, 2015 at 1:13 PM, Pol Mons? Purt? wrote: > Hello Matt, > > As I've told Bradley, I can't use streaming as-is because I need overlap > between chunks and because the low-level library would need a proper itk > image with correct size, region, etc. > which I guess it wouldn't be provided by streaming. > > But most definetely, right now I use 'streaming' by using the ExtractFilter > at the end. I believe that streams too. I was actually more interested in > having a filter/object that computes the splits for me. I've implemented it, > but it's far from perfect. For example, it broke when the input image had a > non-zero index. (It's fixed now, but still, I'm sure the itk's Splitter > filter does a better job, if only could I have overlap ;)) > > I guess the way to go would be to take the splitter (probably > ImageRegionSplitterMultidimensional now that I look at it) and extend it to > support overlap. If I do it, I'll let you know in case it is of interest to > anyone. For now I'll stick to my class. > > Cheers, > > Pol > > 2015-03-16 16:05 GMT+01:00 Matt McCormick : >> >> Hi Pol, >> >> As a side note, limitation of memory usage is built into the streaming >> pipeline design of ITK. All computation of appropriate regions should >> occur if the filters are implemented correctly. To take advantage of >> streaming, place the StreamingImageFilter [1] at the end of your >> pipeline. To use less memory, set the ReleaseDataFlagOn() [2] on the >> component filters. >> >> HTH, >> Matt >> >> [1] http://www.itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> >> [2] >> http://www.itk.org/Doxygen/html/classitk_1_1ProcessObject.html#ae732e9163879ae559ccd0b5957141f97 >> >> On Mon, Mar 16, 2015 at 10:20 AM, Bradley Lowekamp >> wrote: >> > You may find this method useful: >> > >> > >> > http://www.itk.org/Doxygen/html/structitk_1_1ImageAlgorithm.html#a5ec5bcac992cb3b1302840636530ba20 >> > >> > Brad >> > >> > On Mar 16, 2015, at 10:16 AM, Pol Mons? Purt? >> > wrote: >> > >> > Mmh, I believe I misread the RegionOfInterestImageFilter documentation, >> > confusing dimension with size. That should work. >> > >> > I still have the computation of the splitting regions problem to handle, >> > but >> > maybe with this filter is easier than with the ExtractImageFilter. Or >> > maybe >> > it just removes step 7? >> > >> > Is there a way to ease the repasting back to the original region with >> > it? >> > How should I use the physical space index? >> > >> > 2015-03-16 14:25 GMT+01:00 Pol Mons? Purt? : >> >> >> >> Hello Bradley, >> >> >> >> Thank you for your answer and suggestion. >> >> >> >> Answering your question: It's not for multi-threading purposes, I have >> >> to >> >> split the image due to memory limitations. >> >> >> >> I would use extractImage directly and do streaming, but the client and >> >> the >> >> low-level libraries might not work correctly if I do that. I have to >> >> provide >> >> itk images disconnected from the pipeline and with proper indexes and >> >> sizes. >> >> >> >> The RegionOfInterestImageFilter would have the same memory footprint, >> >> and >> >> it would still be tricky to compute the regions of interest, due to the >> >> overlapping. >> >> >> >> >> >> >> >> 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : >> >>> >> >>> Hello, >> >>> >> >>> The RegionOfInterestImageFilter[1] is very similar to the >> >>> ExtractImageFilter, but returns an image whose starting index is >> >>> always >> >>> zeros. >> >>> >> >>> The process you described is remarkable close to what occur in each >> >>> filter for the multi-threading process. Also what occurs in the >> >>> StreamingImageFilter is very similar, but just copies the region. >> >>> >> >>> As you didn't mention you motivation for chunking the data this way be >> >>> it >> >>> for threading or memory requirements, I can't fully advise. >> >>> >> >>> Brad >> >>> >> >>> >> >>> [1 >> >>> >> >>> ]http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html >> >>> [2] >> >>> >> >>> https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 >> >>> >> >>> >> >>> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? >> >>> wrote: >> >>> >> >>> > Hello everyone, >> >>> > >> >>> > We need to split a volume into pieces, overlaped by a certain >> >>> > amount, >> >>> > do some computation and then repaste them. >> >>> > >> >>> > The computation requires the pieces' region indexes to be set to >> >>> > zero. >> >>> > The original volume might not have index at zero, but be a subregion >> >>> > itself. >> >>> > >> >>> > What is the best way to achieve this? >> >>> > >> >>> > I've thought of the following pipeline: >> >>> > >> >>> > 1. imageRegionSplitterSlowDimension >> >>> > 2. Store the index and size of each region >> >>> > 3. manually increase the size of each region (and modify index) >> >>> > 4. crop with the largestPossibleRegion of the original volume (to >> >>> > prevent requesting more than available) >> >>> > iterate over regions: >> >>> > 5. extractImageFilter >> >>> > 6. disconnect pipeline for each region >> >>> > 7. reset indexes >> >>> > 8. perform computation >> >>> > 9. crop with the regions in step 1 to remove the added overlap >> >>> > 10. restore indexes >> >>> > 11. pasteImageFilter >> >>> > >> >>> > I'll have to think of a smart way to deal with the index >> >>> > restore/cropping of steps 9 and 10. >> >>> > >> >>> > I somehow feel somebody will have already dealt with this... And >> >>> > there's certainly a better way to do it. >> >>> > _____________________________________ >> >>> > 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://www.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-users >> >>> >> >> >> >> >> >> 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : >> >>> >> >>> Hello, >> >>> >> >>> The RegionOfInterestImageFilter[1] is very similar to the >> >>> ExtractImageFilter, but returns an image whose starting index is >> >>> always >> >>> zeros. >> >>> >> >>> The process you described is remarkable close to what occur in each >> >>> filter for the multi-threading process. Also what occurs in the >> >>> StreamingImageFilter is very similar, but just copies the region. >> >>> >> >>> As you didn't mention you motivation for chunking the data this way be >> >>> it >> >>> for threading or memory requirements, I can't fully advise. >> >>> >> >>> Brad >> >>> >> >>> >> >>> [1 >> >>> >> >>> ]http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html >> >>> [2] >> >>> >> >>> https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 >> >>> >> >>> >> >>> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? >> >>> wrote: >> >>> >> >>> > Hello everyone, >> >>> > >> >>> > We need to split a volume into pieces, overlaped by a certain >> >>> > amount, >> >>> > do some computation and then repaste them. >> >>> > >> >>> > The computation requires the pieces' region indexes to be set to >> >>> > zero. >> >>> > The original volume might not have index at zero, but be a subregion >> >>> > itself. >> >>> > >> >>> > What is the best way to achieve this? >> >>> > >> >>> > I've thought of the following pipeline: >> >>> > >> >>> > 1. imageRegionSplitterSlowDimension >> >>> > 2. Store the index and size of each region >> >>> > 3. manually increase the size of each region (and modify index) >> >>> > 4. crop with the largestPossibleRegion of the original volume (to >> >>> > prevent requesting more than available) >> >>> > iterate over regions: >> >>> > 5. extractImageFilter >> >>> > 6. disconnect pipeline for each region >> >>> > 7. reset indexes >> >>> > 8. perform computation >> >>> > 9. crop with the regions in step 1 to remove the added overlap >> >>> > 10. restore indexes >> >>> > 11. pasteImageFilter >> >>> > >> >>> > I'll have to think of a smart way to deal with the index >> >>> > restore/cropping of steps 9 and 10. >> >>> > >> >>> > I somehow feel somebody will have already dealt with this... And >> >>> > there's certainly a better way to do it. >> >>> > _____________________________________ >> >>> > 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://www.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-users >> >>> >> >> >> > >> > >> > >> > _____________________________________ >> > 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://www.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-users >> > > > _____________________________________ 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://www.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-users From audrius at tomographix.com Tue Mar 17 23:42:37 2015 From: audrius at tomographix.com (Audrius Stundzia) Date: Tue, 17 Mar 2015 22:42:37 -0500 Subject: [ITK] ITK 4.7.1 | CMake error in ITKConfig.cmake In-Reply-To: References: <1426489117.1039512.240835561.2CE66E16@webmail.messagingengine.com> Message-ID: <1426650157.1928738.241841153.57DFF05E@webmail.messagingengine.com> Hi Matt, Thank you for your prompt response. On Mon, Mar 16, 2015, at 12:26, Matt McCormick wrote: > Hi Audrius, > > Thanks for discussing the issue on the list. > > Did you manually specify the FFTW_INCLUDE_PATH in your CMake > configuration? Yes, I did. > Please review and test this patch [1]. I have not tested it on > Windows. The problem line in F:/Program Files/itk/build/ITKConfig.cmake:70 now appears as set(ITK_FFTW_INCLUDE_PATH "FFTW_INCLUDE_PATH") so now the ITK build fails where FFTW is required. > Some documentation for testing can be found here [2] [3]. Thanks for the info. Will set that up now and provide a review. Regards, Audrius > > Thanks, > Matt > > [1] http://review.source.kitware.com/#/c/19511/ > > [2] > https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html > > [3] http://www.itk.org/Wiki/ITK/Git > > On Mon, Mar 16, 2015 at 2:58 AM, Audrius Stundzia > wrote: > > OS: WIndows 8.1 x64 > > ITK: 4.7.1 > > CMake: 3.2.1 > > > > The following CMake error occurred while running CMake for RTK. > > However, as it is located in ITKConfig.cmake, I thought that I should > > report it here. > > > > _____ > > > > CMake Error at F:/Program Files/itk/build/ITKConfig.cmake:70 (set): > > Syntax error in cmake code at > > > > F:/Program Files/itk/build/ITKConfig.cmake:70 > > > > when parsing string > > > > F:\Program Files\FFTW > > > > Invalid escape sequence \P > > Call Stack (most recent call first): > > CMakeLists.txt:75 (FIND_PACKAGE) > > > > _____ > > > > Changing the line from > > > > set(ITK_FFTW_INCLUDE_PATH "F:\Program Files\FFTW") > > > > to > > > > set(ITK_FFTW_INCLUDE_PATH "F:/Program Files/FFTW") > > > > fixed the problem. > > > > Regards, > > > > Audrius > > _______________________________________________ > > Community mailing list > > Community at itk.org > > http://public.kitware.com/mailman/listinfo/community From aamundarain at ceit.es Wed Mar 18 07:43:49 2015 From: aamundarain at ceit.es (Amundarain, Aiert) Date: Wed, 18 Mar 2015 11:43:49 +0000 Subject: [ITK] [ITK-users] ITK dicom reader wrong spacing Message-ID: I have a DICOM Image serie that itk does not read properly. The x,y,z spacing are incorrect and the return value is the default one (1,1,1). If I read this DICOM Image serie using vtk (vtkDICOMImageReader), the reading is correct. Both softwares are developed by kitware but the results are different. Is is possible to read the dicom files using ITK without using the gdcm library? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Wed Mar 18 08:55:05 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 18 Mar 2015 08:55:05 -0400 Subject: [ITK] ITK 4.7.1 | CMake error in ITKConfig.cmake In-Reply-To: <1426650157.1928738.241841153.57DFF05E@webmail.messagingengine.com> References: <1426489117.1039512.240835561.2CE66E16@webmail.messagingengine.com> <1426650157.1928738.241841153.57DFF05E@webmail.messagingengine.com> Message-ID: Hi Andrius, >> Please review and test this patch [1]. I have not tested it on >> Windows. > > The problem line in F:/Program Files/itk/build/ITKConfig.cmake:70 > now appears as > > set(ITK_FFTW_INCLUDE_PATH "FFTW_INCLUDE_PATH") > > so now the ITK build fails where FFTW is required. Thanks for testing. I have uploaded a second patch set. Please review and test patch set #2. Thanks, Matt From lluna.nova at gmail.com Wed Mar 18 08:58:06 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Wed, 18 Mar 2015 13:58:06 +0100 Subject: [ITK] [ITK-users] Splitting and repasting a volume with overlap In-Reply-To: References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> Message-ID: Hello matt, I wasn't aware of that possibility, thanks for the heads up!It doesn't apply to our case becaues I haven't created a filter but rather a class that takes a region and gives me the splitted regions that later on I feed to an extract filter (or the copy algorithm Bradley pointed out to repaste the results back). Creating a filter doesn't really fit well, the 'low-level' is based on machine learning so it trains and then predicts, and it requires several minutes depending on the size of the image etc. I didn't judge appropriate to create a Filter out of it. Could you elaborate a little bit on what you were proposing? Let's say I have a set of preprocessing filters, my processing and a set of postprocessing filters. The output would be a set of connected components. The volume doesn't necessarily fit in memory (specially the processing) so we have to stream. Because the chunks need to overlap, are you saying that I could place, in the pipeline, a Filter that is derived from the StreamingImageFilter that re-implements GeneratInputRequestedRegion() to have an overlap of 30 voxels, and that would should do it? where should I place such a filter and how does interact with the pre/post-processing? I will re-read the article on streaming, but maybe it would help me if you pinpoint the particularities of the approach you suggested. Cheers, Pol 2015-03-17 20:22 GMT+01:00 Matt McCormick : > Hi Pol, > > You may already be aware of this, but the chunks will overlap if you > implement a GenerateInputRequestedRegion() method on your filter that > pads the output RequestedRegion. > > HTH, > Matt > > On Tue, Mar 17, 2015 at 1:13 PM, Pol Mons? Purt? > wrote: > > Hello Matt, > > > > As I've told Bradley, I can't use streaming as-is because I need overlap > > between chunks and because the low-level library would need a proper itk > > image with correct size, region, etc. > > which I guess it wouldn't be provided by streaming. > > > > But most definetely, right now I use 'streaming' by using the > ExtractFilter > > at the end. I believe that streams too. I was actually more interested in > > having a filter/object that computes the splits for me. I've implemented > it, > > but it's far from perfect. For example, it broke when the input image > had a > > non-zero index. (It's fixed now, but still, I'm sure the itk's Splitter > > filter does a better job, if only could I have overlap ;)) > > > > I guess the way to go would be to take the splitter (probably > > ImageRegionSplitterMultidimensional now that I look at it) and extend it > to > > support overlap. If I do it, I'll let you know in case it is of interest > to > > anyone. For now I'll stick to my class. > > > > Cheers, > > > > Pol > > > > 2015-03-16 16:05 GMT+01:00 Matt McCormick : > >> > >> Hi Pol, > >> > >> As a side note, limitation of memory usage is built into the streaming > >> pipeline design of ITK. All computation of appropriate regions should > >> occur if the filters are implemented correctly. To take advantage of > >> streaming, place the StreamingImageFilter [1] at the end of your > >> pipeline. To use less memory, set the ReleaseDataFlagOn() [2] on the > >> component filters. > >> > >> HTH, > >> Matt > >> > >> [1] > http://www.itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >> > >> [2] > >> > http://www.itk.org/Doxygen/html/classitk_1_1ProcessObject.html#ae732e9163879ae559ccd0b5957141f97 > >> > >> On Mon, Mar 16, 2015 at 10:20 AM, Bradley Lowekamp > >> wrote: > >> > You may find this method useful: > >> > > >> > > >> > > http://www.itk.org/Doxygen/html/structitk_1_1ImageAlgorithm.html#a5ec5bcac992cb3b1302840636530ba20 > >> > > >> > Brad > >> > > >> > On Mar 16, 2015, at 10:16 AM, Pol Mons? Purt? > >> > wrote: > >> > > >> > Mmh, I believe I misread the RegionOfInterestImageFilter > documentation, > >> > confusing dimension with size. That should work. > >> > > >> > I still have the computation of the splitting regions problem to > handle, > >> > but > >> > maybe with this filter is easier than with the ExtractImageFilter. Or > >> > maybe > >> > it just removes step 7? > >> > > >> > Is there a way to ease the repasting back to the original region with > >> > it? > >> > How should I use the physical space index? > >> > > >> > 2015-03-16 14:25 GMT+01:00 Pol Mons? Purt? : > >> >> > >> >> Hello Bradley, > >> >> > >> >> Thank you for your answer and suggestion. > >> >> > >> >> Answering your question: It's not for multi-threading purposes, I > have > >> >> to > >> >> split the image due to memory limitations. > >> >> > >> >> I would use extractImage directly and do streaming, but the client > and > >> >> the > >> >> low-level libraries might not work correctly if I do that. I have to > >> >> provide > >> >> itk images disconnected from the pipeline and with proper indexes and > >> >> sizes. > >> >> > >> >> The RegionOfInterestImageFilter would have the same memory footprint, > >> >> and > >> >> it would still be tricky to compute the regions of interest, due to > the > >> >> overlapping. > >> >> > >> >> > >> >> > >> >> 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp >: > >> >>> > >> >>> Hello, > >> >>> > >> >>> The RegionOfInterestImageFilter[1] is very similar to the > >> >>> ExtractImageFilter, but returns an image whose starting index is > >> >>> always > >> >>> zeros. > >> >>> > >> >>> The process you described is remarkable close to what occur in each > >> >>> filter for the multi-threading process. Also what occurs in the > >> >>> StreamingImageFilter is very similar, but just copies the region. > >> >>> > >> >>> As you didn't mention you motivation for chunking the data this way > be > >> >>> it > >> >>> for threading or memory requirements, I can't fully advise. > >> >>> > >> >>> Brad > >> >>> > >> >>> > >> >>> [1 > >> >>> > >> >>> ] > http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html > >> >>> [2] > >> >>> > >> >>> > https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 > >> >>> > >> >>> > >> >>> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? > >> >>> wrote: > >> >>> > >> >>> > Hello everyone, > >> >>> > > >> >>> > We need to split a volume into pieces, overlaped by a certain > >> >>> > amount, > >> >>> > do some computation and then repaste them. > >> >>> > > >> >>> > The computation requires the pieces' region indexes to be set to > >> >>> > zero. > >> >>> > The original volume might not have index at zero, but be a > subregion > >> >>> > itself. > >> >>> > > >> >>> > What is the best way to achieve this? > >> >>> > > >> >>> > I've thought of the following pipeline: > >> >>> > > >> >>> > 1. imageRegionSplitterSlowDimension > >> >>> > 2. Store the index and size of each region > >> >>> > 3. manually increase the size of each region (and modify index) > >> >>> > 4. crop with the largestPossibleRegion of the original volume (to > >> >>> > prevent requesting more than available) > >> >>> > iterate over regions: > >> >>> > 5. extractImageFilter > >> >>> > 6. disconnect pipeline for each region > >> >>> > 7. reset indexes > >> >>> > 8. perform computation > >> >>> > 9. crop with the regions in step 1 to remove the added > overlap > >> >>> > 10. restore indexes > >> >>> > 11. pasteImageFilter > >> >>> > > >> >>> > I'll have to think of a smart way to deal with the index > >> >>> > restore/cropping of steps 9 and 10. > >> >>> > > >> >>> > I somehow feel somebody will have already dealt with this... And > >> >>> > there's certainly a better way to do it. > >> >>> > _____________________________________ > >> >>> > 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://www.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-users > >> >>> > >> >> > >> >> > >> >> 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp >: > >> >>> > >> >>> Hello, > >> >>> > >> >>> The RegionOfInterestImageFilter[1] is very similar to the > >> >>> ExtractImageFilter, but returns an image whose starting index is > >> >>> always > >> >>> zeros. > >> >>> > >> >>> The process you described is remarkable close to what occur in each > >> >>> filter for the multi-threading process. Also what occurs in the > >> >>> StreamingImageFilter is very similar, but just copies the region. > >> >>> > >> >>> As you didn't mention you motivation for chunking the data this way > be > >> >>> it > >> >>> for threading or memory requirements, I can't fully advise. > >> >>> > >> >>> Brad > >> >>> > >> >>> > >> >>> [1 > >> >>> > >> >>> ] > http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html > >> >>> [2] > >> >>> > >> >>> > https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 > >> >>> > >> >>> > >> >>> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? > >> >>> wrote: > >> >>> > >> >>> > Hello everyone, > >> >>> > > >> >>> > We need to split a volume into pieces, overlaped by a certain > >> >>> > amount, > >> >>> > do some computation and then repaste them. > >> >>> > > >> >>> > The computation requires the pieces' region indexes to be set to > >> >>> > zero. > >> >>> > The original volume might not have index at zero, but be a > subregion > >> >>> > itself. > >> >>> > > >> >>> > What is the best way to achieve this? > >> >>> > > >> >>> > I've thought of the following pipeline: > >> >>> > > >> >>> > 1. imageRegionSplitterSlowDimension > >> >>> > 2. Store the index and size of each region > >> >>> > 3. manually increase the size of each region (and modify index) > >> >>> > 4. crop with the largestPossibleRegion of the original volume (to > >> >>> > prevent requesting more than available) > >> >>> > iterate over regions: > >> >>> > 5. extractImageFilter > >> >>> > 6. disconnect pipeline for each region > >> >>> > 7. reset indexes > >> >>> > 8. perform computation > >> >>> > 9. crop with the regions in step 1 to remove the added > overlap > >> >>> > 10. restore indexes > >> >>> > 11. pasteImageFilter > >> >>> > > >> >>> > I'll have to think of a smart way to deal with the index > >> >>> > restore/cropping of steps 9 and 10. > >> >>> > > >> >>> > I somehow feel somebody will have already dealt with this... And > >> >>> > there's certainly a better way to do it. > >> >>> > _____________________________________ > >> >>> > 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://www.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-users > >> >>> > >> >> > >> > > >> > > >> > > >> > _____________________________________ > >> > 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://www.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-users > >> > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Wed Mar 18 09:14:53 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 18 Mar 2015 09:14:53 -0400 Subject: [ITK] [ITK-users] Splitting and repasting a volume with overlap In-Reply-To: References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> Message-ID: <01DFDABC-9640-47CF-A2EA-4019A1C8A5F4@mail.nih.gov> Hello Pol, I believe I have already suggested reading the latest ITK Software Guide, and the section "How To Write a Filter" which details how the pipeline works. This will cover the GenerateInputRequestedRegion method and how it interacts with the Pipeline and it critical for understanding the pipeline. Your case really does sound like the ITK pipeline, and would benefit as being a filter. You described your output as "connected components", I am not sure if that is a image or another reduced structure. Does the output represent the whole thing in a compact fashion or does it represent a small part which can also be streamed? The may add more complications to your situation but it may be the right fit. I have written a external module "itkStreamingSinc"[1], which provides a base class for algorithms which are both streamed and threaded. I have used it for things like computing bounding boxes and image statistics on images which are hundreds of gigabytes in an out of core fashion. I have also wanted to write one which produces a an itk RLE LabelObject. It works good for algorithms that can consume a chunk and produce a reduced structure. Hope that helps, Brad [1] https://github.com/blowekamp/itkStreamingSinc On Mar 18, 2015, at 8:58 AM, Pol Mons? Purt? wrote: > Hello matt, > > I wasn't aware of that possibility, thanks for the heads up!It doesn't apply to our case becaues I haven't created a filter but rather a class that takes a region and gives me the splitted regions that later on I feed to an extract filter (or the copy algorithm Bradley pointed out to repaste the results back). Creating a filter doesn't really fit well, the 'low-level' is based on machine learning so it trains and then predicts, and it requires several minutes depending on the size of the image etc. I didn't judge appropriate to create a Filter out of it. > > Could you elaborate a little bit on what you were proposing? Let's say I have a set of preprocessing filters, my processing and a set of postprocessing filters. The output would be a set of connected components. The volume doesn't necessarily fit in memory (specially the processing) so we have to stream. Because the chunks need to overlap, are you saying that I could place, in the pipeline, a Filter that is derived from the StreamingImageFilter that re-implements GeneratInputRequestedRegion() to have an overlap of 30 voxels, and that would should do it? where should I place such a filter and how does interact with the pre/post-processing? > > I will re-read the article on streaming, but maybe it would help me if you pinpoint the particularities of the approach you suggested. > > Cheers, > > Pol > > > > > 2015-03-17 20:22 GMT+01:00 Matt McCormick : > Hi Pol, > > You may already be aware of this, but the chunks will overlap if you > implement a GenerateInputRequestedRegion() method on your filter that > pads the output RequestedRegion. > > HTH, > Matt > > On Tue, Mar 17, 2015 at 1:13 PM, Pol Mons? Purt? wrote: > > Hello Matt, > > > > As I've told Bradley, I can't use streaming as-is because I need overlap > > between chunks and because the low-level library would need a proper itk > > image with correct size, region, etc. > > which I guess it wouldn't be provided by streaming. > > > > But most definetely, right now I use 'streaming' by using the ExtractFilter > > at the end. I believe that streams too. I was actually more interested in > > having a filter/object that computes the splits for me. I've implemented it, > > but it's far from perfect. For example, it broke when the input image had a > > non-zero index. (It's fixed now, but still, I'm sure the itk's Splitter > > filter does a better job, if only could I have overlap ;)) > > > > I guess the way to go would be to take the splitter (probably > > ImageRegionSplitterMultidimensional now that I look at it) and extend it to > > support overlap. If I do it, I'll let you know in case it is of interest to > > anyone. For now I'll stick to my class. > > > > Cheers, > > > > Pol > > > > 2015-03-16 16:05 GMT+01:00 Matt McCormick : > >> > >> Hi Pol, > >> > >> As a side note, limitation of memory usage is built into the streaming > >> pipeline design of ITK. All computation of appropriate regions should > >> occur if the filters are implemented correctly. To take advantage of > >> streaming, place the StreamingImageFilter [1] at the end of your > >> pipeline. To use less memory, set the ReleaseDataFlagOn() [2] on the > >> component filters. > >> > >> HTH, > >> Matt > >> > >> [1] http://www.itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >> > >> [2] > >> http://www.itk.org/Doxygen/html/classitk_1_1ProcessObject.html#ae732e9163879ae559ccd0b5957141f97 > >> > >> On Mon, Mar 16, 2015 at 10:20 AM, Bradley Lowekamp > >> wrote: > >> > You may find this method useful: > >> > > >> > > >> > http://www.itk.org/Doxygen/html/structitk_1_1ImageAlgorithm.html#a5ec5bcac992cb3b1302840636530ba20 > >> > > >> > Brad > >> > > >> > On Mar 16, 2015, at 10:16 AM, Pol Mons? Purt? > >> > wrote: > >> > > >> > Mmh, I believe I misread the RegionOfInterestImageFilter documentation, > >> > confusing dimension with size. That should work. > >> > > >> > I still have the computation of the splitting regions problem to handle, > >> > but > >> > maybe with this filter is easier than with the ExtractImageFilter. Or > >> > maybe > >> > it just removes step 7? > >> > > >> > Is there a way to ease the repasting back to the original region with > >> > it? > >> > How should I use the physical space index? > >> > > >> > 2015-03-16 14:25 GMT+01:00 Pol Mons? Purt? : > >> >> > >> >> Hello Bradley, > >> >> > >> >> Thank you for your answer and suggestion. > >> >> > >> >> Answering your question: It's not for multi-threading purposes, I have > >> >> to > >> >> split the image due to memory limitations. > >> >> > >> >> I would use extractImage directly and do streaming, but the client and > >> >> the > >> >> low-level libraries might not work correctly if I do that. I have to > >> >> provide > >> >> itk images disconnected from the pipeline and with proper indexes and > >> >> sizes. > >> >> > >> >> The RegionOfInterestImageFilter would have the same memory footprint, > >> >> and > >> >> it would still be tricky to compute the regions of interest, due to the > >> >> overlapping. > >> >> > >> >> > >> >> > >> >> 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : > >> >>> > >> >>> Hello, > >> >>> > >> >>> The RegionOfInterestImageFilter[1] is very similar to the > >> >>> ExtractImageFilter, but returns an image whose starting index is > >> >>> always > >> >>> zeros. > >> >>> > >> >>> The process you described is remarkable close to what occur in each > >> >>> filter for the multi-threading process. Also what occurs in the > >> >>> StreamingImageFilter is very similar, but just copies the region. > >> >>> > >> >>> As you didn't mention you motivation for chunking the data this way be > >> >>> it > >> >>> for threading or memory requirements, I can't fully advise. > >> >>> > >> >>> Brad > >> >>> > >> >>> > >> >>> [1 > >> >>> > >> >>> ]http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html > >> >>> [2] > >> >>> > >> >>> https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 > >> >>> > >> >>> > >> >>> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? > >> >>> wrote: > >> >>> > >> >>> > Hello everyone, > >> >>> > > >> >>> > We need to split a volume into pieces, overlaped by a certain > >> >>> > amount, > >> >>> > do some computation and then repaste them. > >> >>> > > >> >>> > The computation requires the pieces' region indexes to be set to > >> >>> > zero. > >> >>> > The original volume might not have index at zero, but be a subregion > >> >>> > itself. > >> >>> > > >> >>> > What is the best way to achieve this? > >> >>> > > >> >>> > I've thought of the following pipeline: > >> >>> > > >> >>> > 1. imageRegionSplitterSlowDimension > >> >>> > 2. Store the index and size of each region > >> >>> > 3. manually increase the size of each region (and modify index) > >> >>> > 4. crop with the largestPossibleRegion of the original volume (to > >> >>> > prevent requesting more than available) > >> >>> > iterate over regions: > >> >>> > 5. extractImageFilter > >> >>> > 6. disconnect pipeline for each region > >> >>> > 7. reset indexes > >> >>> > 8. perform computation > >> >>> > 9. crop with the regions in step 1 to remove the added overlap > >> >>> > 10. restore indexes > >> >>> > 11. pasteImageFilter > >> >>> > > >> >>> > I'll have to think of a smart way to deal with the index > >> >>> > restore/cropping of steps 9 and 10. > >> >>> > > >> >>> > I somehow feel somebody will have already dealt with this... And > >> >>> > there's certainly a better way to do it. > >> >>> > _____________________________________ > >> >>> > 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://www.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-users > >> >>> > >> >> > >> >> > >> >> 2015-03-16 14:00 GMT+01:00 Bradley Lowekamp : > >> >>> > >> >>> Hello, > >> >>> > >> >>> The RegionOfInterestImageFilter[1] is very similar to the > >> >>> ExtractImageFilter, but returns an image whose starting index is > >> >>> always > >> >>> zeros. > >> >>> > >> >>> The process you described is remarkable close to what occur in each > >> >>> filter for the multi-threading process. Also what occurs in the > >> >>> StreamingImageFilter is very similar, but just copies the region. > >> >>> > >> >>> As you didn't mention you motivation for chunking the data this way be > >> >>> it > >> >>> for threading or memory requirements, I can't fully advise. > >> >>> > >> >>> Brad > >> >>> > >> >>> > >> >>> [1 > >> >>> > >> >>> ]http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html > >> >>> [2] > >> >>> > >> >>> https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213 > >> >>> > >> >>> > >> >>> On Mar 16, 2015, at 7:37 AM, Pol Mons? Purt? > >> >>> wrote: > >> >>> > >> >>> > Hello everyone, > >> >>> > > >> >>> > We need to split a volume into pieces, overlaped by a certain > >> >>> > amount, > >> >>> > do some computation and then repaste them. > >> >>> > > >> >>> > The computation requires the pieces' region indexes to be set to > >> >>> > zero. > >> >>> > The original volume might not have index at zero, but be a subregion > >> >>> > itself. > >> >>> > > >> >>> > What is the best way to achieve this? > >> >>> > > >> >>> > I've thought of the following pipeline: > >> >>> > > >> >>> > 1. imageRegionSplitterSlowDimension > >> >>> > 2. Store the index and size of each region > >> >>> > 3. manually increase the size of each region (and modify index) > >> >>> > 4. crop with the largestPossibleRegion of the original volume (to > >> >>> > prevent requesting more than available) > >> >>> > iterate over regions: > >> >>> > 5. extractImageFilter > >> >>> > 6. disconnect pipeline for each region > >> >>> > 7. reset indexes > >> >>> > 8. perform computation > >> >>> > 9. crop with the regions in step 1 to remove the added overlap > >> >>> > 10. restore indexes > >> >>> > 11. pasteImageFilter > >> >>> > > >> >>> > I'll have to think of a smart way to deal with the index > >> >>> > restore/cropping of steps 9 and 10. > >> >>> > > >> >>> > I somehow feel somebody will have already dealt with this... And > >> >>> > there's certainly a better way to do it. > >> >>> > _____________________________________ > >> >>> > 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://www.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-users > >> >>> > >> >> > >> > > >> > > >> > > >> > _____________________________________ > >> > 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://www.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-users > >> > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From audrius at tomographix.com Wed Mar 18 21:11:00 2015 From: audrius at tomographix.com (Audrius Stundzia) Date: Wed, 18 Mar 2015 20:11:00 -0500 Subject: [ITK] ITK 4.7.1 | CMake error in ITKConfig.cmake In-Reply-To: References: <1426489117.1039512.240835561.2CE66E16@webmail.messagingengine.com> <1426650157.1928738.241841153.57DFF05E@webmail.messagingengine.com> Message-ID: <1426727460.2366355.242302569.52462A26@webmail.messagingengine.com> Hi Matt, Patch set #2 test: the formerly problem line F:/Program Files/itk/build/ITKConfig.cmake:70 is now created correctly as set(ITK_FFTW_INCLUDE_PATH "F:/Program Files/FFTW") So ITK builds now on Window 8.1 x64 | VS 2010 x64 without any failures related to FFTW (or other modules) in my current CMake configuration. Thank you for your prompt response and patch. Regards, Audrius On Wed, Mar 18, 2015, at 07:55, Matt McCormick wrote: > Hi Audrius, > > >> Please review and test this patch [1]. I have not tested it on > >> Windows. > > > > The problem line in F:/Program Files/itk/build/ITKConfig.cmake:70 > > now appears as > > > > set(ITK_FFTW_INCLUDE_PATH "FFTW_INCLUDE_PATH") > > > > so now the ITK build fails where FFTW is required. > > Thanks for testing. I have uploaded a second patch set. Please review > and test patch set #2. > > Thanks, > Matt From blowekamp at mail.nih.gov Thu Mar 19 09:17:44 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 19 Mar 2015 09:17:44 -0400 Subject: [ITK] [ITK-users] Registration in SimpleITK In-Reply-To: References: Message-ID: Hello, Binaries for the current master are on the dashboard and now include the CSharp for windows 64. You can find more information about downloading nightly binaries here: http://www.itk.org/Wiki/SimpleITK/GettingStarted#Nightly_binaries Brad On Mar 12, 2015, at 8:50 PM, Bradley Lowekamp wrote: > Hello, > > Yes, it is more or less the same process. Grab all the ITK and SimpleITK dlls from the bin directories and place them in your path. > > The SimpleITK Superbuild INSTALL target will actually install ITK and SimpleITK's core libraries correctly in to the CMake specified path. The installation target for the superbuild project just doesn't install the target languages ( every language has at least one own way of doing things that CMake does not know about ). You could use this to install all the needed dlls into a defined path. Then just grab the CSharp dll for your project and that should work too. > > Also I worked on the explicit instantiation in SimpleITK today. I was able to reduce the size of the .o files on Linux by 30% by explicitly instantiating about 20 classes with their used templates. This is expected to resolve the linking and packaging issues on windows. So a solution is forth coming. > > Brad > > On Mar 12, 2015, at 7:26 PM, Matias Montroull wrote: > >> Hi Brad, thanks for the explanation. I'm using C#, would that be the same process? >> >> On Wed, Mar 11, 2015 at 8:56 PM, Bradley Lowekamp wrote: >> Hello, >> >> If you are willing to compile it yourself you can get it to work with just a little bit of effort. >> >> Compile the SimpleITK superbuild with shared libraries enabled. Do the usual installation of SimpleITK from the super build [1], this will install the SimpleITK python library into your site-packages. However, this libraries also depends on all the SimpleITK an ITK dlls (not installed or packaged), these should be in the superbuild's bin directory. These need to be in your run-time path when importing SimpleITK. This can be done either by modifying you PATH environment variable you copying them to the appropriate place ( which may depend on the python environment, and there are likely several alternatives). >> >> Brad >> >> [1] http://www.itk.org/Wiki/SimpleITK/GettingStarted#Python_installation >> >> On Mar 11, 2015, at 7:31 PM, Matias Montroull wrote: >> >>> >>> My project is using 64 bits and some DLL I use as well, I've ran into issues when using the beta version because is 32 bits. I guess I'll wait until the final release is done. >>> Thanks, >>> Matias. >>> >>> On Wed, Mar 11, 2015 at 7:54 PM, Matias Montroull wrote: >>> Thanks Bradley, I'll give it a try. I downloaded version 0.8.1 but wasn't aware of this new Beta release >>> Thanks, >>> Matias. >>> >>> On Wed, Mar 11, 2015 at 7:46 PM, Bradley Lowekamp wrote: >>> Hello Matias, >>> >>> Currently there is SimpleITK 0.9b01 [1] out with the registration framework. >>> >>> With it you can do things like this: >>> http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/56_VH_Registration1.html >>> or >>> http://www.itk.org/SimpleITKDoxygen/html/ImageRegistrationMethod2_8py-example.html >>> >>> Please give it a try and let us know how it work for you. >>> >>> Enjoy, >>> Brad >>> >>> [1] http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#SimpleITK_-_Version_0.9.0_Release >>> >>> On Mar 11, 2015, at 6:32 PM, Matias Montroull wrote: >>> >>>> Hi, >>>> >>>> is it possible to do registration in SimpleITK? I mean, something like in this example: >>>> http://public.kitware.com/cgi-bin/viewcvs.cgi/Insight/Examples/Registration/ImageRegistration2.cxx?view=markup >>>> >>>> Thanks, >>>> >>>> Matias, >>>> _____________________________________ >>>> 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://www.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-users >>>> _______________________________________________ >>>> Community mailing list >>>> Community at itk.org >>>> http://public.kitware.com/mailman/listinfo/community >>> >>> >>> >> >> > > _____________________________________ > 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://www.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-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From 1549917255 at qq.com Thu Mar 19 11:44:59 2015 From: 1549917255 at qq.com (=?gb18030?B?16rJ7deqy7I=?=) Date: Thu, 19 Mar 2015 23:44:59 +0800 Subject: [ITK] when using itkImageFileReader to read dicom image , it occurs assertion failure:pixeltype_debug==pixeltype. Message-ID: Hi,everyone, I'm using ITK to read CTA image(it's a kind of dicom image),and when it runs to the update ,the following error happens: in command line:Assertion failed:pixeltype_debug==pixeltype. file..\..\..\..\..\InsightToolkit-4.4.0\Modules\IO\GDCM\src\itkGDCMImageIO.cxx,line 287 in a window: Debug Error! Program:F:\..\..\..\helloworld7.exe R6010 -abort() has been called (Press Retry to debug the application) My code is as follows: #include"itkImage.h" #include"itkImageFileReader.h" #include"itkImageToVTKImageFilter.h" #include #include"vtkImageViewer.h" #include"vtkRenderWindowInteractor.h" #include"vtkSmartPointer.h" #include"vtkImageFlip.h" #include"vtkRenderer.h" #include"vtkImageActor.h" #include"vtkCamera.h" #include"vtkImageMapper.h" using namespace std; int main() { typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader=ReaderType::New(); //??DICOM?????? typedef itk::GDCMImageIO ImageIOType; ImageIOType::Pointer gdcmImageIO=ImageIOType::New(); //Filter of itk image data to vtk image data; typedef itk::ImageToVTKImageFilter FilterType; FilterType::Pointer connector=FilterType::New(); //??DICOM??????DICOM??; char*DICOMName="F://c++projects//helloworld6//1.3.12.2.1107.5.1.4.60540.30000013102023122056200010862"; reader->SetFileName(DICOMName); reader->SetImageIO(gdcmImageIO); cout<<"done0"<SetInput(reader->GetOutput()); cout<<"done1"<Update();//This is the place where error occurs! cout<<"done2"<flip=vtkSmartPointer::New(); //vtkSmartPointer flip->SetInput(connector->GetOutput()); flip->SetFilteredAxis(1); //??????????????; flip->Update(); vtkSmartPointeractor=vtkSmartPointer::New(); actor->SetInput(flip->GetOutput()); actor->InterpolateOff(); vtkSmartPointerrenderer=vtkSmartPointer::New(); renderer->AddActor(actor); vtkSmartPointerrenderWindow=vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkRenderWindowInteractor*iren=vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renderWindow); iren->Initialize(); iren->Start(); return 0; } If anyone know how to fix this, could you please just help me? Thanks a lot. Guirong Liu -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhlegarreta at vicomtech.org Thu Mar 19 12:11:28 2015 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Thu, 19 Mar 2015 17:11:28 +0100 Subject: [ITK] when using itkImageFileReader to read dicom image , it occurs assertion failure:pixeltype_debug==pixeltype. In-Reply-To: References: Message-ID: Dear Guirong, DICOM images most commonly use short pixel types. The error says that there is some problem with the pixel type you specified. HTH, JON HAITZ On 19 March 2015 at 16:44, ???? <1549917255 at qq.com> wrote: > Hi,everyone, > I'm using ITK to read CTA image(it's a kind of dicom image),and when > it runs to the update ,the following error happens: > in command line:Assertion failed:pixeltype_debug==pixeltype. > file..\..\..\..\..\InsightToolkit-4.4.0\Modules\IO\GDCM\src\itkGDCMImageIO.cxx,line > 287 > > in a window: > Debug Error! > Program:F:\..\..\..\helloworld7.exe > R6010 > -abort() has been called > (Press Retry to debug the application) > > > My code is as follows: > #include"itkImage.h" > #include"itkImageFileReader.h" > #include"itkImageToVTKImageFilter.h" > #include > #include"vtkImageViewer.h" > #include"vtkRenderWindowInteractor.h" > #include"vtkSmartPointer.h" > #include"vtkImageFlip.h" > #include"vtkRenderer.h" > #include"vtkImageActor.h" > #include"vtkCamera.h" > #include"vtkImageMapper.h" > using namespace std; > int main() > { > typedef itk::Image ImageType; > typedef itk::ImageFileReader ReaderType; > ReaderType::Pointer reader=ReaderType::New(); > //??DICOM?????? > typedef itk::GDCMImageIO ImageIOType; > ImageIOType::Pointer gdcmImageIO=ImageIOType::New(); > //Filter of itk image data to vtk image data; > typedef itk::ImageToVTKImageFilter FilterType; > FilterType::Pointer connector=FilterType::New(); > //??DICOM??????DICOM??; > > char*DICOMName="F://c++projects//helloworld6//1.3.12.2.1107.5.1.4.60540.30000013102023122056200010862"; > reader->SetFileName(DICOMName); > reader->SetImageIO(gdcmImageIO); > cout<<"done0"< //ITK?VTK?? > connector->SetInput(reader->GetOutput()); > cout<<"done1"< *connector->Update();//This is the place where error occurs!* > cout<<"done2"< vtkSmartPointerflip=vtkSmartPointer::New(); > //vtkSmartPointer > flip->SetInput(connector->GetOutput()); > flip->SetFilteredAxis(1); > //??????????????; > flip->Update(); > > vtkSmartPointeractor=vtkSmartPointer::New(); > actor->SetInput(flip->GetOutput()); > actor->InterpolateOff(); > vtkSmartPointerrenderer=vtkSmartPointer::New(); > renderer->AddActor(actor); > > > vtkSmartPointerrenderWindow=vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > vtkRenderWindowInteractor*iren=vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renderWindow); > iren->Initialize(); > iren->Start(); > return 0; > } > If anyone know how to fix this, could you please just help me? > Thanks a lot. > > Guirong Liu > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Mar 19 16:20:06 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 19 Mar 2015 16:20:06 -0400 Subject: [ITK] [ITK-users] ITK dicom reader wrong spacing In-Reply-To: References: Message-ID: Hi Aiert, It is possible to use DCMTK instead of GDCM. Turn on Module_ITKIODCMTK in your CMake configuration. See the itkDCMTKSeriesReadImageWriter.cxx test for example usage. HTH, Matt On Wed, Mar 18, 2015 at 7:43 AM, Amundarain, Aiert wrote: > I have a DICOM Image serie that itk does not read properly. The x,y,z > spacing are incorrect and the return value is the default one (1,1,1). > > If I read this DICOM Image serie using vtk (vtkDICOMImageReader), the > reading is correct. > > Both softwares are developed by kitware but the results are different. > > > > Is is possible to read the dicom files using ITK without using the gdcm > library? > > > > Thank you. > > > > > _____________________________________ > 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://www.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-users > _____________________________________ 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://www.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-users From zeinsalah at gmail.com Fri Mar 20 11:47:09 2015 From: zeinsalah at gmail.com (Zein Salah) Date: Fri, 20 Mar 2015 16:47:09 +0100 Subject: [ITK] How itk and vtk images are stored Message-ID: Hi, I am wandering about the way itk and vtk images are stored in memory. Is actually a contiguous block allocated for the image and the data is simply stored in slice order? In other words, if I have an itk and a vtk images of the same attributes (dimensions, spacings, pixel type, etc.), would a memcpy safely copy the contents of one to the other? Much thanks, Zeno From tossin at gmail.com Sat Mar 21 03:17:45 2015 From: tossin at gmail.com (Evan Kao) Date: Sat, 21 Mar 2015 00:17:45 -0700 Subject: [ITK] Query about building ITK on Windows 64-bit with Python Wrapping Message-ID: Hello itk-users, I'd like to use ITK features in python that don't seem to be implemented in the latest stable release of SimpleITK, like image registration and quadmesh filters. However, looking around the internet, several sources (like the Wiki , this thread from about 5 months ago, or this site ) seem to suggest building WrapITK isn't possible on a 64-bit machine due to conflict between GCCXML and any Visual Studio beyond 2008 (and VS2008 64-bit apparently only comes with the professional edition, which I'm not even sure is available or worth obtaining). The Wiki also suggests mingw64 is also not viable. Is this still the case? Is there anyway to use ITK with python on a 64-bit machine? If I have to resort to the latest nightly binary of SimpleITK for image registration, does it include all the registration methods available in ITK? Thanks, Evan Kao -------------- next part -------------- An HTML attachment was scrubbed... URL: From 1549917255 at qq.com Sat Mar 21 04:22:39 2015 From: 1549917255 at qq.com (=?gb18030?B?16rJ7deqy7I=?=) Date: Sat, 21 Mar 2015 16:22:39 +0800 Subject: [ITK] =?gb18030?q?=BB=D8=B8=B4=A3=BA__when_using_itkImageFileRead?= =?gb18030?q?er_to_read_dicom_image_=2C_itoccurs_assertion_failure=3Apixel?= =?gb18030?q?type=5Fdebug=3D=3Dpixeltype=2E?= In-Reply-To: References: Message-ID: Dear Jon, Thanks for your reply. I only specified pixel type in the this line(typedef itk::Image ImageType;),and after receiving your reply, I changed it to unsigned short, short, and signed short which was not working unfortunately. Have any other thoughts about it? Guirong Liu ------------------ ???? ------------------ ???: "Jon Haitz Legarreta";; ????: 2015?3?20?(???) ??0:11 ???: "????"<1549917255 at qq.com>; ??: "community"; ??: Re: [ITK] when using itkImageFileReader to read dicom image , itoccurs assertion failure:pixeltype_debug==pixeltype. Dear Guirong, DICOM images most commonly use short pixel types. The error says that there is some problem with the pixel type you specified. HTH, JON HAITZ On 19 March 2015 at 16:44, ???? <1549917255 at qq.com> wrote: Hi,everyone, I'm using ITK to read CTA image(it's a kind of dicom image),and when it runs to the update ,the following error happens: in command line:Assertion failed:pixeltype_debug==pixeltype. file..\..\..\..\..\InsightToolkit-4.4.0\Modules\IO\GDCM\src\itkGDCMImageIO.cxx,line 287 in a window: Debug Error! Program:F:\..\..\..\helloworld7.exe R6010 -abort() has been called (Press Retry to debug the application) My code is as follows: #include"itkImage.h" #include"itkImageFileReader.h" #include"itkImageToVTKImageFilter.h" #include #include"vtkImageViewer.h" #include"vtkRenderWindowInteractor.h" #include"vtkSmartPointer.h" #include"vtkImageFlip.h" #include"vtkRenderer.h" #include"vtkImageActor.h" #include"vtkCamera.h" #include"vtkImageMapper.h" using namespace std; int main() { typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader=ReaderType::New(); //??DICOM?????? typedef itk::GDCMImageIO ImageIOType; ImageIOType::Pointer gdcmImageIO=ImageIOType::New(); //Filter of itk image data to vtk image data; typedef itk::ImageToVTKImageFilter FilterType; FilterType::Pointer connector=FilterType::New(); //??DICOM??????DICOM??; char*DICOMName="F://c++projects//helloworld6//1.3.12.2.1107.5.1.4.60540.30000013102023122056200010862"; reader->SetFileName(DICOMName); reader->SetImageIO(gdcmImageIO); cout<<"done0"<SetInput(reader->GetOutput()); cout<<"done1"<Update();//This is the place where error occurs! cout<<"done2"<flip=vtkSmartPointer::New(); //vtkSmartPointer flip->SetInput(connector->GetOutput()); flip->SetFilteredAxis(1); //??????????????; flip->Update(); vtkSmartPointeractor=vtkSmartPointer::New(); actor->SetInput(flip->GetOutput()); actor->InterpolateOff(); vtkSmartPointerrenderer=vtkSmartPointer::New(); renderer->AddActor(actor); vtkSmartPointerrenderWindow=vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkRenderWindowInteractor*iren=vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renderWindow); iren->Initialize(); iren->Start(); return 0; } If anyone know how to fix this, could you please just help me? Thanks a lot. Guirong Liu _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sat Mar 21 05:14:46 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sat, 21 Mar 2015 09:14:46 +0000 Subject: [ITK] How itk and vtk images are stored In-Reply-To: References: Message-ID: An ITK image is stored in a contiguous block. I'm not sure about VTK - why not just try it? Gib ________________________________________ From: Community [community-bounces at itk.org] on behalf of Zein Salah [zeinsalah at gmail.com] Sent: Saturday, 21 March 2015 4:47 a.m. To: VTK Users; community at itk.org Subject: [ITK] How itk and vtk images are stored Hi, I am wandering about the way itk and vtk images are stored in memory. Is actually a contiguous block allocated for the image and the data is simply stored in slice order? In other words, if I have an itk and a vtk images of the same attributes (dimensions, spacings, pixel type, etc.), would a memcpy safely copy the contents of one to the other? Much thanks, Zeno _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From jhlegarreta at vicomtech.org Sat Mar 21 11:29:49 2015 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Sat, 21 Mar 2015 16:29:49 +0100 Subject: [ITK] when using itkImageFileReader to read dicom image , itoccurs assertion failure:pixeltype_debug==pixeltype. In-Reply-To: References: Message-ID: Hi Guirong, I'd try updating the reader before getting its output and surrounding it with a try/catch [1], so that you can be sure that it's (not) the reader which is producing the error. I'd then do the same with the next filter. In addition, that will give you a better description of the error. HTH, JON HAITZ [1] http://itk.org/Wiki/ITK/Examples/SimpleOperations/TryCatch On 21 March 2015 at 09:22, ???? <1549917255 at qq.com> wrote: > Dear Jon, > Thanks for your reply. > I only specified pixel type in the this line(typedef > itk::Image ImageType;),and after receiving your reply, I > changed it to unsigned short, short, and signed short which was not working > unfortunately. > Have any other thoughts about it? > > Guirong Liu > > ------------------ ???? ------------------ > *???:* "Jon Haitz Legarreta";; > *????:* 2015?3?20?(???) ??0:11 > *???:* "????"<1549917255 at qq.com>; > *??:* "community"; > *??:* Re: [ITK] when using itkImageFileReader to read dicom image , > itoccurs assertion failure:pixeltype_debug==pixeltype. > > Dear Guirong, > DICOM images most commonly use short pixel types. > > The error says that there is some problem with the pixel type you > specified. > > HTH, > JON HAITZ > > > > On 19 March 2015 at 16:44, ???? <1549917255 at qq.com> wrote: > >> Hi,everyone, >> I'm using ITK to read CTA image(it's a kind of dicom image),and when >> it runs to the update ,the following error happens: >> in command line:Assertion failed:pixeltype_debug==pixeltype. >> file..\..\..\..\..\InsightToolkit-4.4.0\Modules\IO\GDCM\src\itkGDCMImageIO.cxx,line >> 287 >> >> in a window: >> Debug Error! >> Program:F:\..\..\..\helloworld7.exe >> R6010 >> -abort() has been called >> (Press Retry to debug the application) >> >> >> My code is as follows: >> #include"itkImage.h" >> #include"itkImageFileReader.h" >> #include"itkImageToVTKImageFilter.h" >> #include >> #include"vtkImageViewer.h" >> #include"vtkRenderWindowInteractor.h" >> #include"vtkSmartPointer.h" >> #include"vtkImageFlip.h" >> #include"vtkRenderer.h" >> #include"vtkImageActor.h" >> #include"vtkCamera.h" >> #include"vtkImageMapper.h" >> using namespace std; >> int main() >> { >> typedef itk::Image ImageType; >> typedef itk::ImageFileReader ReaderType; >> ReaderType::Pointer reader=ReaderType::New(); >> //??DICOM?????? >> typedef itk::GDCMImageIO ImageIOType; >> ImageIOType::Pointer gdcmImageIO=ImageIOType::New(); >> //Filter of itk image data to vtk image data; >> typedef itk::ImageToVTKImageFilter FilterType; >> FilterType::Pointer connector=FilterType::New(); >> //??DICOM??????DICOM??; >> >> char*DICOMName="F://c++projects//helloworld6//1.3.12.2.1107.5.1.4.60540.30000013102023122056200010862"; >> reader->SetFileName(DICOMName); >> reader->SetImageIO(gdcmImageIO); >> cout<<"done0"<> //ITK?VTK?? >> connector->SetInput(reader->GetOutput()); >> cout<<"done1"<> *connector->Update();//This is the place where error occurs!* >> cout<<"done2"<> vtkSmartPointerflip=vtkSmartPointer::New(); >> //vtkSmartPointer >> flip->SetInput(connector->GetOutput()); >> flip->SetFilteredAxis(1); >> //??????????????; >> flip->Update(); >> >> >> vtkSmartPointeractor=vtkSmartPointer::New(); >> actor->SetInput(flip->GetOutput()); >> actor->InterpolateOff(); >> vtkSmartPointerrenderer=vtkSmartPointer::New(); >> renderer->AddActor(actor); >> >> >> vtkSmartPointerrenderWindow=vtkSmartPointer::New(); >> renderWindow->AddRenderer(renderer); >> vtkRenderWindowInteractor*iren=vtkRenderWindowInteractor::New(); >> iren->SetRenderWindow(renderWindow); >> iren->Initialize(); >> iren->Start(); >> return 0; >> } >> If anyone know how to fix this, could you please just help me? >> Thanks a lot. >> >> Guirong Liu >> >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Sat Mar 21 11:29:34 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sat, 21 Mar 2015 11:29:34 -0400 Subject: [ITK] Query about building ITK on Windows 64-bit with Python Wrapping In-Reply-To: References: Message-ID: Hello, WrapITK has recently been upgraded to use CastXML ( clang based ), instead of GCCXML. This appears to now be working MS VS12 ( aka Visual Studio 2013?) windows compiler[1]. This is relatively new and it would be great if you can checkout ITK master and try to build it and report how it works for you. The wiki hasn't been updated with this latest bit of information. However please keep in mind that WrapITK does not contain 100% of ITK and not 100% of Registration. For example it does contain the ITKv3 ImageRegistationMethod however it doest not contain the new ITKv4 ImageRegistration method or frame work. With effort this thing can be wrapped. If you have to resort to SimpleITK, you will find the binaries for window64 readily available from the nightly dashboard[2]. The best place to check if SimpleITK has the registration methods you need would be the doxygen[3]. It contains the ITKv4 Registration framework, as well as some legacy image registration filter. The frame work is capable of affines, bspline, and displacement transforms and many nice feature of the ITKv4 framework. Do you have a specific registration method you are looking to do? or just explore some options? Brad [1] https://open.cdash.org/buildSummary.php?buildid=3738598 [2] http://www.itk.org/Wiki/SimpleITK/GettingStarted#Nightly_binaries [3] http://www.itk.org/SimpleITKDoxygen/html/classes.html On Mar 21, 2015, at 3:17 AM, Evan Kao wrote: > Hello itk-users, > > I'd like to use ITK features in python that don't seem to be implemented in the latest stable release of SimpleITK, like image registration and quadmesh filters. However, looking around the internet, several sources (like the Wiki, this thread from about 5 months ago, or this site) seem to suggest building WrapITK isn't possible on a 64-bit machine due to conflict between GCCXML and any Visual Studio beyond 2008 (and VS2008 64-bit apparently only comes with the professional edition, which I'm not even sure is available or worth obtaining). The Wiki also suggests mingw64 is also not viable. Is this still the case? Is there anyway to use ITK with python on a 64-bit machine? > > If I have to resort to the latest nightly binary of SimpleITK for image registration, does it include all the registration methods available in ITK? > > Thanks, > Evan Kao > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Sun Mar 22 03:19:21 2015 From: tossin at gmail.com (Evan Kao) Date: Sun, 22 Mar 2015 00:19:21 -0700 Subject: [ITK] Query about building ITK on Windows 64-bit with Python Wrapping In-Reply-To: References: Message-ID: Hello Bradley, Regarding registration, I'm just exploring options right now. It seems like SimpleITK 0.9b is the way to go then. I still attempted to build ITK 4.8 with python-wrapping on and a few additional optional modules that I turned on mainly because they sounded interesting (ITKConfig.cmake attached for reference) with Visual Studio 2013/ver 12. The build took about 12 hours (is that normal?) and seems to have mostly succeeded other than a few errors in the optional modules (I think they were in BridgeNumpy and VariationalRegistration). However I'm having some trouble using itk in python (same as the one described here ). I've tried adding the WrapITK.pth file to site-packages as well as directly adding both of the paths specified in WrapITK.pth directly to the PYTHONPATH, but keep getting "AttributeError: 'module' object has no attribute 'swig' " every time I attempt to use a filter. Do you know how to fix the issue? Thanks, Evan Kao On Sat, Mar 21, 2015 at 8:29 AM, Bradley Lowekamp wrote: > Hello, > > WrapITK has recently been upgraded to use CastXML ( clang based ), instead > of GCCXML. This appears to now be working MS VS12 ( aka Visual Studio > 2013?) windows compiler[1]. This is relatively new and it would be great if > you can checkout ITK master and try to build it and report how it works for > you. The wiki hasn't been updated with this latest bit of information. > > However please keep in mind that WrapITK does not contain 100% of ITK and > not 100% of Registration. For example it does contain the ITKv3 > ImageRegistationMethod however it doest not contain the new ITKv4 > ImageRegistration method or frame work. With effort this thing can be > wrapped. > > If you have to resort to SimpleITK, you will find the binaries for > window64 readily available from the nightly dashboard[2]. The best place to > check if SimpleITK has the registration methods you need would be the > doxygen[3]. It contains the ITKv4 Registration framework, as well as some > legacy image registration filter. The frame work is capable of affines, > bspline, and displacement transforms and many nice feature of the ITKv4 > framework. > > Do you have a specific registration method you are looking to do? or just > explore some options? > > Brad > > [1] https://open.cdash.org/buildSummary.php?buildid=3738598 > [2] http://www.itk.org/Wiki/SimpleITK/GettingStarted#Nightly_binaries > [3] http://www.itk.org/SimpleITKDoxygen/html/classes.html > > On Mar 21, 2015, at 3:17 AM, Evan Kao wrote: > > Hello itk-users, > > I'd like to use ITK features in python that don't seem to be implemented > in the latest stable release of SimpleITK, like image registration and > quadmesh filters. However, looking around the internet, several sources > (like the Wiki , this thread > > from about 5 months ago, or this site > ) > seem to suggest building WrapITK isn't possible on a 64-bit machine due to > conflict between GCCXML and any Visual Studio beyond 2008 (and VS2008 > 64-bit apparently only comes with the professional edition, which I'm not > even sure is available or worth obtaining). The Wiki also suggests mingw64 > is also not viable. Is this still the case? Is there anyway to use ITK > with python on a 64-bit machine? > > If I have to resort to the latest nightly binary of SimpleITK for image > registration, does it include all the registration methods available in ITK? > > Thanks, > Evan Kao > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ITKConfig.cmake Type: application/octet-stream Size: 4747 bytes Desc: not available URL: From audrey.istace at imavie.fr Mon Mar 23 11:11:13 2015 From: audrey.istace at imavie.fr (AI) Date: Mon, 23 Mar 2015 08:11:13 -0700 (MST) Subject: [ITK] [ITK-users] itk - Writing dicom files from single 3D file Message-ID: <1427123473731-7587034.post@n2.nabble.com> Hello, I would like to write Dicom files from a nifti image files using DCMTKImageIO. In the code below, I read a nifti file using itkImageFileReader, and then try to write dicom files using itkImageSeriesWriter. I was not able to do it, probably because of the SetMetaDataDictionaryArray method, that I don?t know how to use since I don?t read dicom series as input. Can you help me with that ? Thank you very much, Audrey #include "itkDCMTKImageIO.h" #include "itkNumericSeriesFileNames.h" #include "itkImageFileReader.h" #include "itkImageSeriesWriter.h" int main(int argc, char *argv[]) { typedef signed short PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::Image< PixelType, 2 > OutputImageType; typedef itk::ImageFileReader< ImageType > ReaderType; typedef itk::DCMTKImageIO ImageIOType; typedef itk::NumericSeriesFileNames NamesGeneratorType; typedef itk::ImageSeriesWriter< ImageType, OutputImageType > WriterType; ImageIOType::Pointer dcmtkIO = ImageIOType::New(); NamesGeneratorType::Pointer namesGenerator = NamesGeneratorType::New(); ReaderType::Pointer reader = ReaderType::New(); WriterType::Pointer writer = WriterType::New(); reader->SetFileName( "../../out.nii" ); reader->Update(); itksys::SystemTools::MakeDirectory( "../../OutputDicom/" ); std::string seriesFormat = "../../OutputDicom/IM%d.dcm"; namesGenerator->SetSeriesFormat (seriesFormat.c_str()); namesGenerator->SetStartIndex (1); namesGenerator->SetEndIndex (166); writer->SetInput( reader->GetOutput() ); writer->SetImageIO( dcmtkIO ); writer->SetFileNames( namesGenerator->GetFileNames() ); // writer->SetMetaDataDictionaryArray( reader->GetMetaDataDictionaryArray() ); writer->Update(); } -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From majcjc at gmail.com Mon Mar 23 12:10:43 2015 From: majcjc at gmail.com (Lin M) Date: Mon, 23 Mar 2015 12:10:43 -0400 Subject: [ITK] [ITK-users] Computational time of fast marching Message-ID: Hi guys. I'm using fast marching to compute the distance map, but the time of computation is much slower than I expected. Is it normal to cost about 250secs for a 512*512*365 image? I'm using the released mode. My process is like this: 1. initialize a binary image (alive image) where segmented target is set to 1, the rest is set to 0 2. initialize the trial image where the neighbourhood of alive image is set to 1, the rest is set to 0 3. give the two images to the adaptor and set the alive value and the trial value both to 1 4. run fast marching Do you have any ideas about that or some suggestions to improve the performance. Thank you very much! Best, Lin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From majcjc at gmail.com Mon Mar 23 12:18:44 2015 From: majcjc at gmail.com (Lin M) Date: Mon, 23 Mar 2015 12:18:44 -0400 Subject: [ITK] [ITK-users] Computational time of fast marching In-Reply-To: References: Message-ID: I'm using a i7-4650U 8G machine. On Mon, Mar 23, 2015 at 12:10 PM, Lin M wrote: > Hi guys. > > I'm using fast marching to compute the distance map, but the time of > computation is much slower than I expected. Is it normal to cost about > 250secs for a 512*512*365 image? I'm using the released mode. > > My process is like this: > 1. initialize a binary image (alive image) where segmented target is set > to 1, the rest is set to 0 > 2. initialize the trial image where the neighbourhood of alive image is > set to 1, the rest is set to 0 > 3. give the two images to the adaptor and set the alive value and the > trial value both to 1 > 4. run fast marching > > Do you have any ideas about that or some suggestions to improve the > performance. Thank you very much! > > Best, > Lin > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matimontg at gmail.com Tue Mar 24 11:10:32 2015 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 24 Mar 2015 12:10:32 -0300 Subject: [ITK] [ITK-users] itk - Writing dicom files from single 3D file In-Reply-To: <1427123473731-7587034.post@n2.nabble.com> References: <1427123473731-7587034.post@n2.nabble.com> Message-ID: I'm able to write individual slices from a mha or mhd file, is that the same as nifti file? if so, I can send you the code, I think it's a copy/paste from one of the examples out there. On Mon, Mar 23, 2015 at 12:11 PM, AI wrote: > Hello, > > I would like to write Dicom files from a nifti image files using > DCMTKImageIO. In the code below, I read a nifti file using > itkImageFileReader, and then try to write dicom files using > itkImageSeriesWriter. I was not able to do it, probably because of the > SetMetaDataDictionaryArray method, that I don?t know how to use since I > don?t read dicom series as input. Can you help me with that ? > > Thank you very much, > > Audrey > > #include "itkDCMTKImageIO.h" > #include "itkNumericSeriesFileNames.h" > #include "itkImageFileReader.h" > #include "itkImageSeriesWriter.h" > > int main(int argc, char *argv[]) > { > typedef signed short > PixelType; > const unsigned int > Dimension = 3; > typedef itk::Image< PixelType, Dimension > > ImageType; > typedef itk::Image< PixelType, 2 > > OutputImageType; > typedef itk::ImageFileReader< ImageType > > ReaderType; > typedef itk::DCMTKImageIO > ImageIOType; > typedef itk::NumericSeriesFileNames > NamesGeneratorType; > typedef itk::ImageSeriesWriter< ImageType, OutputImageType > > WriterType; > > ImageIOType::Pointer dcmtkIO = ImageIOType::New(); > NamesGeneratorType::Pointer namesGenerator = > NamesGeneratorType::New(); > ReaderType::Pointer reader = ReaderType::New(); > WriterType::Pointer writer = WriterType::New(); > > reader->SetFileName( "../../out.nii" ); > reader->Update(); > > > > itksys::SystemTools::MakeDirectory( "../../OutputDicom/" ); > > std::string seriesFormat = "../../OutputDicom/IM%d.dcm"; > namesGenerator->SetSeriesFormat (seriesFormat.c_str()); > namesGenerator->SetStartIndex (1); > namesGenerator->SetEndIndex (166); > > > writer->SetInput( reader->GetOutput() ); > writer->SetImageIO( dcmtkIO ); > writer->SetFileNames( namesGenerator->GetFileNames() ); > // writer->SetMetaDataDictionaryArray( > reader->GetMetaDataDictionaryArray() ); > writer->Update(); > } > > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matimontg at gmail.com Tue Mar 24 11:17:43 2015 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 24 Mar 2015 12:17:43 -0300 Subject: [ITK] [ITK-users] Registration in SimpleITK In-Reply-To: References: Message-ID: Hi Bradley, so if I would like to download the Csharp DLL files, I need to go to the link you posted? for example, I can download: VS9-Win32-pkg-py2.7-csharp-java-master [image: Files] [image: info] ? Thanks, I'm new to the dashboard. Matias. On Thu, Mar 19, 2015 at 10:17 AM, Bradley Lowekamp wrote: > Hello, > > Binaries for the current master are on the dashboard and now include the > CSharp for windows 64. You can find more information about downloading > nightly binaries here: > http://www.itk.org/Wiki/SimpleITK/GettingStarted#Nightly_binaries > > Brad > > On Mar 12, 2015, at 8:50 PM, Bradley Lowekamp > wrote: > > Hello, > > Yes, it is more or less the same process. Grab all the ITK and SimpleITK > dlls from the bin directories and place them in your path. > > The SimpleITK Superbuild INSTALL target will actually install ITK and > SimpleITK's core libraries correctly in to the CMake specified path. The > installation target for the superbuild project just doesn't install the > target languages ( every language has at least one own way of doing things > that CMake does not know about ). You could use this to install all the > needed dlls into a defined path. Then just grab the CSharp dll for your > project and that should work too. > > Also I worked on the explicit instantiation in SimpleITK today. I was able > to reduce the size of the .o files on Linux by 30% by explicitly > instantiating about 20 classes with their used templates. This is expected > to resolve the linking and packaging issues on windows. So a solution is > forth coming. > > Brad > > On Mar 12, 2015, at 7:26 PM, Matias Montroull wrote: > > Hi Brad, thanks for the explanation. I'm using C#, would that be the same > process? > > On Wed, Mar 11, 2015 at 8:56 PM, Bradley Lowekamp > wrote: > >> Hello, >> >> If you are willing to compile it yourself you can get it to work with >> just a little bit of effort. >> >> Compile the SimpleITK superbuild with shared libraries enabled. Do the >> usual installation of SimpleITK from the super build [1], this will install >> the SimpleITK python library into your site-packages. However, this >> libraries also depends on all the SimpleITK an ITK dlls (not installed or >> packaged), these should be in the superbuild's bin directory. These need to >> be in your run-time path when importing SimpleITK. This can be done either >> by modifying you PATH environment variable you copying them to the >> appropriate place ( which may depend on the python environment, and there >> are likely several alternatives). >> >> Brad >> >> [1] http://www.itk.org/Wiki/SimpleITK/GettingStarted#Python_installation >> >> On Mar 11, 2015, at 7:31 PM, Matias Montroull >> wrote: >> >> >> My project is using 64 bits and some DLL I use as well, I've ran into >> issues when using the beta version because is 32 bits. I guess I'll wait >> until the final release is done. >> Thanks, >> Matias. >> >> On Wed, Mar 11, 2015 at 7:54 PM, Matias Montroull >> wrote: >> >>> Thanks Bradley, I'll give it a try. I downloaded version 0.8.1 but >>> wasn't aware of this new Beta release >>> Thanks, >>> Matias. >>> >>> On Wed, Mar 11, 2015 at 7:46 PM, Bradley Lowekamp < >>> blowekamp at mail.nih.gov> wrote: >>> >>>> Hello Matias, >>>> >>>> Currently there is SimpleITK 0.9b01 [1] out with the registration >>>> framework. >>>> >>>> With it you can do things like this: >>>> >>>> http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/56_VH_Registration1.html >>>> or >>>> >>>> http://www.itk.org/SimpleITKDoxygen/html/ImageRegistrationMethod2_8py-example.html >>>> >>>> Please give it a try and let us know how it work for you. >>>> >>>> Enjoy, >>>> Brad >>>> >>>> [1] >>>> http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#SimpleITK_-_Version_0.9.0_Release >>>> >>>> On Mar 11, 2015, at 6:32 PM, Matias Montroull >>>> wrote: >>>> >>>> Hi, >>>> >>>> is it possible to do registration in SimpleITK? I mean, something like >>>> in this example: >>>> >>>> http://public.kitware.com/cgi-bin/viewcvs.cgi/Insight/Examples/Registration/ImageRegistration2.cxx?view=markup >>>> >>>> Thanks, >>>> >>>> Matias, >>>> _____________________________________ >>>> 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://www.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-users >>>> _______________________________________________ >>>> Community mailing list >>>> Community at itk.org >>>> http://public.kitware.com/mailman/listinfo/community >>>> >>>> >>>> >>> >> >> > > _____________________________________ > 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://www.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-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Tue Mar 24 11:22:06 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 24 Mar 2015 11:22:06 -0400 Subject: [ITK] [ITK-users] Registration in SimpleITK In-Reply-To: References: Message-ID: <1AB9A9D9-03DC-4478-9EC1-B6682B5581B5@mail.nih.gov> The link you provided is for windows 32. You said you wanted windows 64, its here: https://open.cdash.org/viewFiles.php?buildid=3741847 Brad On Mar 24, 2015, at 11:17 AM, Matias Montroull wrote: > Hi Bradley, so if I would like to download the Csharp DLL files, I need to go to the link you posted? for example, I can download: > VS9-Win32-pkg-py2.7-csharp-java-master > ? > Thanks, I'm new to the dashboard. > Matias. > > On Thu, Mar 19, 2015 at 10:17 AM, Bradley Lowekamp wrote: > Hello, > > Binaries for the current master are on the dashboard and now include the CSharp for windows 64. You can find more information about downloading nightly binaries here: > http://www.itk.org/Wiki/SimpleITK/GettingStarted#Nightly_binaries > > Brad > > On Mar 12, 2015, at 8:50 PM, Bradley Lowekamp wrote: > >> Hello, >> >> Yes, it is more or less the same process. Grab all the ITK and SimpleITK dlls from the bin directories and place them in your path. >> >> The SimpleITK Superbuild INSTALL target will actually install ITK and SimpleITK's core libraries correctly in to the CMake specified path. The installation target for the superbuild project just doesn't install the target languages ( every language has at least one own way of doing things that CMake does not know about ). You could use this to install all the needed dlls into a defined path. Then just grab the CSharp dll for your project and that should work too. >> >> Also I worked on the explicit instantiation in SimpleITK today. I was able to reduce the size of the .o files on Linux by 30% by explicitly instantiating about 20 classes with their used templates. This is expected to resolve the linking and packaging issues on windows. So a solution is forth coming. >> >> Brad >> >> On Mar 12, 2015, at 7:26 PM, Matias Montroull wrote: >> >>> Hi Brad, thanks for the explanation. I'm using C#, would that be the same process? >>> >>> On Wed, Mar 11, 2015 at 8:56 PM, Bradley Lowekamp wrote: >>> Hello, >>> >>> If you are willing to compile it yourself you can get it to work with just a little bit of effort. >>> >>> Compile the SimpleITK superbuild with shared libraries enabled. Do the usual installation of SimpleITK from the super build [1], this will install the SimpleITK python library into your site-packages. However, this libraries also depends on all the SimpleITK an ITK dlls (not installed or packaged), these should be in the superbuild's bin directory. These need to be in your run-time path when importing SimpleITK. This can be done either by modifying you PATH environment variable you copying them to the appropriate place ( which may depend on the python environment, and there are likely several alternatives). >>> >>> Brad >>> >>> [1] http://www.itk.org/Wiki/SimpleITK/GettingStarted#Python_installation >>> >>> On Mar 11, 2015, at 7:31 PM, Matias Montroull wrote: >>> >>>> >>>> My project is using 64 bits and some DLL I use as well, I've ran into issues when using the beta version because is 32 bits. I guess I'll wait until the final release is done. >>>> Thanks, >>>> Matias. >>>> >>>> On Wed, Mar 11, 2015 at 7:54 PM, Matias Montroull wrote: >>>> Thanks Bradley, I'll give it a try. I downloaded version 0.8.1 but wasn't aware of this new Beta release >>>> Thanks, >>>> Matias. >>>> >>>> On Wed, Mar 11, 2015 at 7:46 PM, Bradley Lowekamp wrote: >>>> Hello Matias, >>>> >>>> Currently there is SimpleITK 0.9b01 [1] out with the registration framework. >>>> >>>> With it you can do things like this: >>>> http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/56_VH_Registration1.html >>>> or >>>> http://www.itk.org/SimpleITKDoxygen/html/ImageRegistrationMethod2_8py-example.html >>>> >>>> Please give it a try and let us know how it work for you. >>>> >>>> Enjoy, >>>> Brad >>>> >>>> [1] http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#SimpleITK_-_Version_0.9.0_Release >>>> >>>> On Mar 11, 2015, at 6:32 PM, Matias Montroull wrote: >>>> >>>>> Hi, >>>>> >>>>> is it possible to do registration in SimpleITK? I mean, something like in this example: >>>>> http://public.kitware.com/cgi-bin/viewcvs.cgi/Insight/Examples/Registration/ImageRegistration2.cxx?view=markup >>>>> >>>>> Thanks, >>>>> >>>>> Matias, >>>>> _____________________________________ >>>>> 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://www.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-users >>>>> _______________________________________________ >>>>> Community mailing list >>>>> Community at itk.org >>>>> http://public.kitware.com/mailman/listinfo/community >>>> >>>> >>>> >>> >>> >> >> _____________________________________ >> 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://www.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-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From audrey.istace at imavie.fr Tue Mar 24 11:57:35 2015 From: audrey.istace at imavie.fr (AI) Date: Tue, 24 Mar 2015 08:57:35 -0700 (MST) Subject: [ITK] [ITK-users] itk - Writing dicom files from single 3D file In-Reply-To: References: <1427123473731-7587034.post@n2.nabble.com> Message-ID: Hi Matias, Thank you for your answer. If your code is working with DCMTKImageIO and not GDCMImageIO, I would be happy to see it. For me it works using gdcm but not using dcmtk (compilation is ok, but no dicom is written in my output directory after execution), and I would like to use dcmtk. De : Matias Montroull [via ITK Insight Users] [mailto:ml-node+s2283740n7587037h21 at n2.nabble.com] Envoy? : mardi 24 mars 2015 16:11 ? : Audrey Istace Objet : Re: [ITK-users] itk - Writing dicom files from single 3D file I'm able to write individual slices from a mha or mhd file, is that the same as nifti file? if so, I can send you the code, I think it's a copy/paste from one of the examples out there. On Mon, Mar 23, 2015 at 12:11 PM, AI <[hidden email]> wrote: Hello, I would like to write Dicom files from a nifti image files using DCMTKImageIO. In the code below, I read a nifti file using itkImageFileReader, and then try to write dicom files using itkImageSeriesWriter. I was not able to do it, probably because of the SetMetaDataDictionaryArray method, that I don?t know how to use since I don?t read dicom series as input. Can you help me with that ? Thank you very much, Audrey #include "itkDCMTKImageIO.h" #include "itkNumericSeriesFileNames.h" #include "itkImageFileReader.h" #include "itkImageSeriesWriter.h" int main(int argc, char *argv[]) { typedef signed short PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::Image< PixelType, 2 > OutputImageType; typedef itk::ImageFileReader< ImageType > ReaderType; typedef itk::DCMTKImageIO ImageIOType; typedef itk::NumericSeriesFileNames NamesGeneratorType; typedef itk::ImageSeriesWriter< ImageType, OutputImageType > WriterType; ImageIOType::Pointer dcmtkIO = ImageIOType::New(); NamesGeneratorType::Pointer namesGenerator = NamesGeneratorType::New(); ReaderType::Pointer reader = ReaderType::New(); WriterType::Pointer writer = WriterType::New(); reader->SetFileName( "../../out.nii" ); reader->Update(); itksys::SystemTools::MakeDirectory( "../../OutputDicom/" ); std::string seriesFormat = "../../OutputDicom/IM%d.dcm"; namesGenerator->SetSeriesFormat (seriesFormat.c_str()); namesGenerator->SetStartIndex (1); namesGenerator->SetEndIndex (166); writer->SetInput( reader->GetOutput() ); writer->SetImageIO( dcmtkIO ); writer->SetFileNames( namesGenerator->GetFileNames() ); // writer->SetMetaDataDictionaryArray( reader->GetMetaDataDictionaryArray() ); writer->Update(); } -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users _____________________________________ 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://www.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-users ________________________________ If you reply to this email, your message will be added to the discussion below: http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034p7587037.html To unsubscribe from itk - Writing dicom files from single 3D file, click here. NAML -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034p7587040.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From matimontg at gmail.com Tue Mar 24 12:08:13 2015 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 24 Mar 2015 13:08:13 -0300 Subject: [ITK] [ITK-users] itk - Writing dicom files from single 3D file In-Reply-To: References: <1427123473731-7587034.post@n2.nabble.com> Message-ID: Al, the code I have is using GDCM: typedef itk::GDCMImageIO ImageIOType; On Tue, Mar 24, 2015 at 12:57 PM, AI wrote: > Hi Matias, > > Thank you for your answer. > If your code is working with DCMTKImageIO and not GDCMImageIO, I would be > happy to see it. > For me it works using gdcm but not using dcmtk (compilation is ok, but no > dicom is written in my output directory after execution), and I would like > to use dcmtk. > > De : Matias Montroull [via ITK Insight Users] [mailto: > ml-node+s2283740n7587037h21 at n2.nabble.com] > Envoy? : mardi 24 mars 2015 16:11 > ? : Audrey Istace > Objet : Re: [ITK-users] itk - Writing dicom files from single 3D file > > I'm able to write individual slices from a mha or mhd file, is that the > same as nifti file? if so, I can send you the code, I think it's a > copy/paste from one of the examples out there. > > On Mon, Mar 23, 2015 at 12:11 PM, AI <[hidden > email]> wrote: > Hello, > > I would like to write Dicom files from a nifti image files using > DCMTKImageIO. In the code below, I read a nifti file using > itkImageFileReader, and then try to write dicom files using > itkImageSeriesWriter. I was not able to do it, probably because of the > SetMetaDataDictionaryArray method, that I don?t know how to use since I > don?t read dicom series as input. Can you help me with that ? > > Thank you very much, > > Audrey > > #include "itkDCMTKImageIO.h" > #include "itkNumericSeriesFileNames.h" > #include "itkImageFileReader.h" > #include "itkImageSeriesWriter.h" > > int main(int argc, char *argv[]) > { > typedef signed short > PixelType; > const unsigned int > Dimension = 3; > typedef itk::Image< PixelType, Dimension > > ImageType; > typedef itk::Image< PixelType, 2 > > OutputImageType; > typedef itk::ImageFileReader< ImageType > > ReaderType; > typedef itk::DCMTKImageIO > ImageIOType; > typedef itk::NumericSeriesFileNames > NamesGeneratorType; > typedef itk::ImageSeriesWriter< ImageType, OutputImageType > > WriterType; > > ImageIOType::Pointer dcmtkIO = ImageIOType::New(); > NamesGeneratorType::Pointer namesGenerator = > NamesGeneratorType::New(); > ReaderType::Pointer reader = ReaderType::New(); > WriterType::Pointer writer = WriterType::New(); > > reader->SetFileName( "../../out.nii" ); > reader->Update(); > > > > itksys::SystemTools::MakeDirectory( "../../OutputDicom/" ); > > std::string seriesFormat = "../../OutputDicom/IM%d.dcm"; > namesGenerator->SetSeriesFormat (seriesFormat.c_str()); > namesGenerator->SetStartIndex (1); > namesGenerator->SetEndIndex (166); > > > writer->SetInput( reader->GetOutput() ); > writer->SetImageIO( dcmtkIO ); > writer->SetFileNames( namesGenerator->GetFileNames() ); > // writer->SetMetaDataDictionaryArray( > reader->GetMetaDataDictionaryArray() ); > writer->Update(); > } > > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users > > > _____________________________________ > 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://www.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-users > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > > http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034p7587037.html > To unsubscribe from itk - Writing dicom files from single 3D file, click > here< > http://itk-insight-users.2283740.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7587034&code=YXVkcmV5LmlzdGFjZUBpbWF2aWUuZnJ8NzU4NzAzNHw4NzExNjY2MzA= > >. > NAML< > http://itk-insight-users.2283740.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml > > > > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034p7587040.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From audrey.istace at imavie.fr Tue Mar 24 12:12:38 2015 From: audrey.istace at imavie.fr (AI) Date: Tue, 24 Mar 2015 09:12:38 -0700 (MST) Subject: [ITK] [ITK-users] itk - Writing dicom files from single 3D file In-Reply-To: References: <1427123473731-7587034.post@n2.nabble.com> Message-ID: Thank you. If someone has already writen dicom files using itkDCMTKImageIO.h, please help me ! De : Matias Montroull [via ITK Insight Users] [mailto:ml-node+s2283740n7587041h45 at n2.nabble.com] Envoy? : mardi 24 mars 2015 17:09 ? : Audrey Istace Objet : Re: [ITK-users] itk - Writing dicom files from single 3D file Al, the code I have is using GDCM: typedef itk::GDCMImageIO ImageIOType; On Tue, Mar 24, 2015 at 12:57 PM, AI <[hidden email]> wrote: Hi Matias, Thank you for your answer. If your code is working with DCMTKImageIO and not GDCMImageIO, I would be happy to see it. For me it works using gdcm but not using dcmtk (compilation is ok, but no dicom is written in my output directory after execution), and I would like to use dcmtk. De : Matias Montroull [via ITK Insight Users] [mailto:[hidden email]] Envoy? : mardi 24 mars 2015 16:11 ? : Audrey Istace Objet : Re: [ITK-users] itk - Writing dicom files from single 3D file I'm able to write individual slices from a mha or mhd file, is that the same as nifti file? if so, I can send you the code, I think it's a copy/paste from one of the examples out there. On Mon, Mar 23, 2015 at 12:11 PM, AI <[hidden email]> wrote: Hello, I would like to write Dicom files from a nifti image files using DCMTKImageIO. In the code below, I read a nifti file using itkImageFileReader, and then try to write dicom files using itkImageSeriesWriter. I was not able to do it, probably because of the SetMetaDataDictionaryArray method, that I don?t know how to use since I don?t read dicom series as input. Can you help me with that ? Thank you very much, Audrey #include "itkDCMTKImageIO.h" #include "itkNumericSeriesFileNames.h" #include "itkImageFileReader.h" #include "itkImageSeriesWriter.h" int main(int argc, char *argv[]) { typedef signed short PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::Image< PixelType, 2 > OutputImageType; typedef itk::ImageFileReader< ImageType > ReaderType; typedef itk::DCMTKImageIO ImageIOType; typedef itk::NumericSeriesFileNames NamesGeneratorType; typedef itk::ImageSeriesWriter< ImageType, OutputImageType > WriterType; ImageIOType::Pointer dcmtkIO = ImageIOType::New(); NamesGeneratorType::Pointer namesGenerator = NamesGeneratorType::New(); ReaderType::Pointer reader = ReaderType::New(); WriterType::Pointer writer = WriterType::New(); reader->SetFileName( "../../out.nii" ); reader->Update(); itksys::SystemTools::MakeDirectory( "../../OutputDicom/" ); std::string seriesFormat = "../../OutputDicom/IM%d.dcm"; namesGenerator->SetSeriesFormat (seriesFormat.c_str()); namesGenerator->SetStartIndex (1); namesGenerator->SetEndIndex (166); writer->SetInput( reader->GetOutput() ); writer->SetImageIO( dcmtkIO ); writer->SetFileNames( namesGenerator->GetFileNames() ); // writer->SetMetaDataDictionaryArray( reader->GetMetaDataDictionaryArray() ); writer->Update(); } -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users _____________________________________ 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://www.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-users ________________________________ If you reply to this email, your message will be added to the discussion below: http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034p7587037.html To unsubscribe from itk - Writing dicom files from single 3D file, click here< NAML -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034p7587040.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users _____________________________________ 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://www.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-users ________________________________ If you reply to this email, your message will be added to the discussion below: http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034p7587041.html To unsubscribe from itk - Writing dicom files from single 3D file, click here. NAML -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034p7587042.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From manuel.grizonnet at gmail.com Tue Mar 24 12:16:57 2015 From: manuel.grizonnet at gmail.com (Manuel Grizonnet) Date: Tue, 24 Mar 2015 17:16:57 +0100 Subject: [ITK] [ITK-dev] Size of ITK source package? Message-ID: Hi, I've just downloaded ITK source package from sourceforge and we're surprised by the size of the source tarball (more than 250Mo). Looking at the contain, it is due to a hidden directory (ExternalData) which contains only md5 sums. I don't think if it is really mandatory to compile the project from source and it would drastically decrease the size of the archive. Regards, -- Manuel Grizonnet -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ 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 Tue Mar 24 12:43:50 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 24 Mar 2015 12:43:50 -0400 Subject: [ITK] [ITK-users] itk - Writing dicom files from single 3D file In-Reply-To: <1427123473731-7587034.post@n2.nabble.com> References: <1427123473731-7587034.post@n2.nabble.com> Message-ID: Hi, DCMTKImageIO not serialize or de-serialize DICOM tags to / from its MetaDataDictionaryArray currently like GDCM does. HTH, Matt On Mon, Mar 23, 2015 at 11:11 AM, AI wrote: > Hello, > > I would like to write Dicom files from a nifti image files using > DCMTKImageIO. In the code below, I read a nifti file using > itkImageFileReader, and then try to write dicom files using > itkImageSeriesWriter. I was not able to do it, probably because of the > SetMetaDataDictionaryArray method, that I don?t know how to use since I > don?t read dicom series as input. Can you help me with that ? > > Thank you very much, > > Audrey > > #include "itkDCMTKImageIO.h" > #include "itkNumericSeriesFileNames.h" > #include "itkImageFileReader.h" > #include "itkImageSeriesWriter.h" > > int main(int argc, char *argv[]) > { > typedef signed short > PixelType; > const unsigned int > Dimension = 3; > typedef itk::Image< PixelType, Dimension > > ImageType; > typedef itk::Image< PixelType, 2 > > OutputImageType; > typedef itk::ImageFileReader< ImageType > > ReaderType; > typedef itk::DCMTKImageIO > ImageIOType; > typedef itk::NumericSeriesFileNames > NamesGeneratorType; > typedef itk::ImageSeriesWriter< ImageType, OutputImageType > > WriterType; > > ImageIOType::Pointer dcmtkIO = ImageIOType::New(); > NamesGeneratorType::Pointer namesGenerator = > NamesGeneratorType::New(); > ReaderType::Pointer reader = ReaderType::New(); > WriterType::Pointer writer = WriterType::New(); > > reader->SetFileName( "../../out.nii" ); > reader->Update(); > > > > itksys::SystemTools::MakeDirectory( "../../OutputDicom/" ); > > std::string seriesFormat = "../../OutputDicom/IM%d.dcm"; > namesGenerator->SetSeriesFormat (seriesFormat.c_str()); > namesGenerator->SetStartIndex (1); > namesGenerator->SetEndIndex (166); > > > writer->SetInput( reader->GetOutput() ); > writer->SetImageIO( dcmtkIO ); > writer->SetFileNames( namesGenerator->GetFileNames() ); > // writer->SetMetaDataDictionaryArray( > reader->GetMetaDataDictionaryArray() ); > writer->Update(); > } > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Tue Mar 24 12:57:56 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 24 Mar 2015 12:57:56 -0400 Subject: [ITK] [ITK-dev] Size of ITK source package? In-Reply-To: References: Message-ID: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> Hello, The ExteranalData directory contains all the testing data both inputs and baselines. It's needed to run the testing suit to test your build. Brad On Mar 24, 2015, at 12:16 PM, Manuel Grizonnet wrote: > Hi, > > I've just downloaded ITK source package from sourceforge and we're surprised by the size of the source tarball (more than 250Mo). > > Looking at the contain, it is due to a hidden directory (ExternalData) which contains only md5 sums. > > I don't think if it is really mandatory to compile the project from source and it would drastically decrease the size of the archive. > > Regards, > > -- > Manuel Grizonnet > _______________________________________________ > 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 _______________________________________________ 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 dave.demarle at kitware.com Tue Mar 24 13:18:12 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 24 Mar 2015 13:18:12 -0400 Subject: [ITK] [ITK-dev] Size of ITK source package? In-Reply-To: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> References: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> Message-ID: VTK provides External data as an optional download that expands into the right place in the source tree. If the user doesn't enable testing in cmake it isn't used, and if the user does enable testing but doesn't download the data tarball then the files are downloaded piecemeal. Some clever person could probably do the same thing for ITK. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Mar 24, 2015 at 12:57 PM, Bradley Lowekamp wrote: > Hello, > > The ExteranalData directory contains all the testing data both inputs and > baselines. It's needed to run the testing suit to test your build. > > Brad > > On Mar 24, 2015, at 12:16 PM, Manuel Grizonnet > wrote: > > > Hi, > > > > I've just downloaded ITK source package from sourceforge and we're > surprised by the size of the source tarball (more than 250Mo). > > > > Looking at the contain, it is due to a hidden directory (ExternalData) > which contains only md5 sums. > > > > I don't think if it is really mandatory to compile the project from > source and it would drastically decrease the size of the archive. > > > > Regards, > > > > -- > > Manuel Grizonnet > > _______________________________________________ > > 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 > > _______________________________________________ > 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: -------------- next part -------------- _______________________________________________ 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 Tue Mar 24 13:24:58 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 24 Mar 2015 13:24:58 -0400 Subject: [ITK] [ITK-dev] Size of ITK source package? In-Reply-To: References: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> Message-ID: Hi, Since BUILD_TESTING is currently ON by default, we would want to change it to be OFF by default so default options work out-of-the-box. This change can be made, but it will require wrangling of dashboard build maintainers to add BUILD_TESTING=ON to their CTest scripts. Thanks, Matt On Tue, Mar 24, 2015 at 1:18 PM, David E DeMarle wrote: > VTK provides External data as an optional download that expands into the > right place in the source tree. If the user doesn't enable testing in cmake > it isn't used, and if the user does enable testing but doesn't download the > data tarball then the files are downloaded piecemeal. > > Some clever person could probably do the same thing for ITK. > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Tue, Mar 24, 2015 at 12:57 PM, Bradley Lowekamp > wrote: >> >> Hello, >> >> The ExteranalData directory contains all the testing data both inputs and >> baselines. It's needed to run the testing suit to test your build. >> >> Brad >> >> On Mar 24, 2015, at 12:16 PM, Manuel Grizonnet >> wrote: >> >> > Hi, >> > >> > I've just downloaded ITK source package from sourceforge and we're >> > surprised by the size of the source tarball (more than 250Mo). >> > >> > Looking at the contain, it is due to a hidden directory (ExternalData) >> > which contains only md5 sums. >> > >> > I don't think if it is really mandatory to compile the project from >> > source and it would drastically decrease the size of the archive. >> > >> > Regards, >> > >> > -- >> > Manuel Grizonnet >> > _______________________________________________ >> > 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 >> >> _______________________________________________ >> 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 > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > _______________________________________________ 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 brad.king at kitware.com Tue Mar 24 13:32:17 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 24 Mar 2015 13:32:17 -0400 Subject: [ITK] [ITK-dev] Size of ITK source package? In-Reply-To: References: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> Message-ID: <55119FA1.7040700@kitware.com> On 03/24/2015 01:24 PM, Matt McCormick wrote: > Since BUILD_TESTING is currently ON by default, we would want to > change it to be OFF by default so default options work out-of-the-box. > This change can be made, but it will require wrangling of dashboard > build maintainers to add BUILD_TESTING=ON to their CTest scripts. VTK solves this here: https://gitlab.kitware.com/vtk/vtk/blob/45af6f59/CMakeLists.txt#L267-276 BUILD_TESTING defaults to ON in version-controlled trees and defaults to OFF in tarball-extracted trees unless the data tarball has been extracted too. See the commit that added this behavior here: https://gitlab.kitware.com/vtk/vtk/commit/bf5cf3cf8f -Brad _______________________________________________ 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 jchris.fillionr at kitware.com Tue Mar 24 13:38:39 2015 From: jchris.fillionr at kitware.com (Jean-Christophe Fillion-Robin) Date: Tue, 24 Mar 2015 13:38:39 -0400 Subject: [ITK] [ITK-dev] Size of ITK source package? In-Reply-To: References: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> Message-ID: Hi Matt, If you would have every machine specific dashboard script downloading a common driver script, you could simply ensure the BUILD_TESTING is set if not already defined ... Hth Jc On Tue, Mar 24, 2015 at 1:24 PM, Matt McCormick wrote: > Hi, > > Since BUILD_TESTING is currently ON by default, we would want to > change it to be OFF by default so default options work out-of-the-box. > This change can be made, but it will require wrangling of dashboard > build maintainers to add BUILD_TESTING=ON to their CTest scripts. > > Thanks, > Matt > > On Tue, Mar 24, 2015 at 1:18 PM, David E DeMarle > wrote: > > VTK provides External data as an optional download that expands into the > > right place in the source tree. If the user doesn't enable testing in > cmake > > it isn't used, and if the user does enable testing but doesn't download > the > > data tarball then the files are downloaded piecemeal. > > > > Some clever person could probably do the same thing for ITK. > > > > > > > > David E DeMarle > > Kitware, Inc. > > R&D Engineer > > 21 Corporate Drive > > Clifton Park, NY 12065-8662 > > Phone: 518-881-4909 > > > > On Tue, Mar 24, 2015 at 12:57 PM, Bradley Lowekamp < > blowekamp at mail.nih.gov> > > wrote: > >> > >> Hello, > >> > >> The ExteranalData directory contains all the testing data both inputs > and > >> baselines. It's needed to run the testing suit to test your build. > >> > >> Brad > >> > >> On Mar 24, 2015, at 12:16 PM, Manuel Grizonnet > >> wrote: > >> > >> > Hi, > >> > > >> > I've just downloaded ITK source package from sourceforge and we're > >> > surprised by the size of the source tarball (more than 250Mo). > >> > > >> > Looking at the contain, it is due to a hidden directory (ExternalData) > >> > which contains only md5 sums. > >> > > >> > I don't think if it is really mandatory to compile the project from > >> > source and it would drastically decrease the size of the archive. > >> > > >> > Regards, > >> > > >> > -- > >> > Manuel Grizonnet > >> > _______________________________________________ > >> > 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 > >> > >> _______________________________________________ > >> 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 > > > > _______________________________________________ > > Community mailing list > > Community at itk.org > > http://public.kitware.com/mailman/listinfo/community > > > _______________________________________________ > 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 > -- +1 919 869 8849 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ 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 matimontg at gmail.com Tue Mar 24 13:45:16 2015 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 24 Mar 2015 14:45:16 -0300 Subject: [ITK] [ITK-users] ImageSeriesWriter | SimpleITK Message-ID: Hi, I'm looking for an example on how to convert an mhd or mha image into slices. I downloaded SimpleITK V0.9 Beta and was playing around with the new ImageSeriesWriter class but can't figure out how to do it. Do I need to declare a VectorString? Thanks, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Tue Mar 24 13:49:40 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 24 Mar 2015 13:49:40 -0400 Subject: [ITK] [ITK-dev] Size of ITK source package? In-Reply-To: <55119FA1.7040700@kitware.com> References: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> <55119FA1.7040700@kitware.com> Message-ID: Dave and Brad, Thanks for the suggestion! That looks like a great suggestion. I've created an issue as a reminder to implement for the next release: https://issues.itk.org/jira/browse/ITK-3355 Thanks, Matt On Tue, Mar 24, 2015 at 1:32 PM, Brad King wrote: > On 03/24/2015 01:24 PM, Matt McCormick wrote: >> Since BUILD_TESTING is currently ON by default, we would want to >> change it to be OFF by default so default options work out-of-the-box. >> This change can be made, but it will require wrangling of dashboard >> build maintainers to add BUILD_TESTING=ON to their CTest scripts. > > VTK solves this here: > > https://gitlab.kitware.com/vtk/vtk/blob/45af6f59/CMakeLists.txt#L267-276 > > BUILD_TESTING defaults to ON in version-controlled trees and > defaults to OFF in tarball-extracted trees unless the data > tarball has been extracted too. See the commit that added > this behavior here: > > https://gitlab.kitware.com/vtk/vtk/commit/bf5cf3cf8f > > -Brad > _______________________________________________ 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 blowekamp at mail.nih.gov Tue Mar 24 13:50:43 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 24 Mar 2015 13:50:43 -0400 Subject: [ITK] [ITK-users] ImageSeriesWriter | SimpleITK In-Reply-To: References: Message-ID: <0ED4F886-5DA7-408C-A834-E372D8C77564@mail.nih.gov> Yes, it you should use the VectorString SimpleITK for CSharp has for the fileNames argument. If you are having trouble please provide a small example, and what the error/problem is. Brad On Mar 24, 2015, at 1:45 PM, Matias Montroull wrote: > Hi, > > I'm looking for an example on how to convert an mhd or mha image into slices. I downloaded SimpleITK V0.9 Beta and was playing around with the new ImageSeriesWriter class but can't figure out how to do it. > Do I need to declare a VectorString? > Thanks, > > Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Tue Mar 24 13:52:28 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 24 Mar 2015 13:52:28 -0400 Subject: [ITK] [ITK-dev] Size of ITK source package? In-Reply-To: References: <729D2994-3305-47B9-B23A-B01CCA3665CB@mail.nih.gov> Message-ID: Hi Jc, Yes, that is a good point. Unfortunately, our CTest script do not yet automatically update a driver script. I started to schedule dashboards with Jenkins, and the driver scripts automatically update in this case. After more testing, I will document this configuration so others can use this system, which is easier to set-up and maintain. Thanks, Matt On Tue, Mar 24, 2015 at 1:38 PM, Jean-Christophe Fillion-Robin wrote: > Hi Matt, > > If you would have every machine specific dashboard script downloading a > common driver script, you could simply ensure the BUILD_TESTING is set if > not already defined ... > > Hth > Jc > > > On Tue, Mar 24, 2015 at 1:24 PM, Matt McCormick > wrote: >> >> Hi, >> >> Since BUILD_TESTING is currently ON by default, we would want to >> change it to be OFF by default so default options work out-of-the-box. >> This change can be made, but it will require wrangling of dashboard >> build maintainers to add BUILD_TESTING=ON to their CTest scripts. >> >> Thanks, >> Matt >> >> On Tue, Mar 24, 2015 at 1:18 PM, David E DeMarle >> wrote: >> > VTK provides External data as an optional download that expands into the >> > right place in the source tree. If the user doesn't enable testing in >> > cmake >> > it isn't used, and if the user does enable testing but doesn't download >> > the >> > data tarball then the files are downloaded piecemeal. >> > >> > Some clever person could probably do the same thing for ITK. >> > >> > >> > >> > David E DeMarle >> > Kitware, Inc. >> > R&D Engineer >> > 21 Corporate Drive >> > Clifton Park, NY 12065-8662 >> > Phone: 518-881-4909 >> > >> > On Tue, Mar 24, 2015 at 12:57 PM, Bradley Lowekamp >> > >> > wrote: >> >> >> >> Hello, >> >> >> >> The ExteranalData directory contains all the testing data both inputs >> >> and >> >> baselines. It's needed to run the testing suit to test your build. >> >> >> >> Brad >> >> >> >> On Mar 24, 2015, at 12:16 PM, Manuel Grizonnet >> >> wrote: >> >> >> >> > Hi, >> >> > >> >> > I've just downloaded ITK source package from sourceforge and we're >> >> > surprised by the size of the source tarball (more than 250Mo). >> >> > >> >> > Looking at the contain, it is due to a hidden directory >> >> > (ExternalData) >> >> > which contains only md5 sums. >> >> > >> >> > I don't think if it is really mandatory to compile the project from >> >> > source and it would drastically decrease the size of the archive. >> >> > >> >> > Regards, >> >> > >> >> > -- >> >> > Manuel Grizonnet >> >> > _______________________________________________ >> >> > 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 >> >> >> >> _______________________________________________ >> >> 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 >> > >> > _______________________________________________ >> > Community mailing list >> > Community at itk.org >> > http://public.kitware.com/mailman/listinfo/community >> > >> _______________________________________________ >> 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 > > > > > -- > +1 919 869 8849 _______________________________________________ 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 matimontg at gmail.com Tue Mar 24 13:56:12 2015 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 24 Mar 2015 14:56:12 -0300 Subject: [ITK] [ITK-users] ImageSeriesWriter | SimpleITK In-Reply-To: <0ED4F886-5DA7-408C-A834-E372D8C77564@mail.nih.gov> References: <0ED4F886-5DA7-408C-A834-E372D8C77564@mail.nih.gov> Message-ID: Bradley, Here's what I'm testing now (I'm trying to write a series of slices from a mha file) ImageFileReader imgreader = new ImageFileReader(); imgreader.SetFileName(path_pacientes + nombre_paciente + @"\Fusion\" + "resultado.mha"); itk.simple.Image imgtest = imgreader.Execute(); ImageSeriesWriter SeriesWriter = new ImageSeriesWriter(); VectorString vs = new VectorString(); //Here's where I struggle... vs.Add(path_pacientes + nombre_paciente + @"\Fusion\SalidaTest\imagen%03d.dcm"); //Is this rthe right way to include a vector of strings? SeriesWriter.SetFileNames(vs); On Tue, Mar 24, 2015 at 2:50 PM, Bradley Lowekamp wrote: > Yes, it you should use the VectorString SimpleITK for CSharp has for the > fileNames argument. > > If you are having trouble please provide a small example, and what the > error/problem is. > > Brad > > On Mar 24, 2015, at 1:45 PM, Matias Montroull wrote: > > Hi, > > I'm looking for an example on how to convert an mhd or mha image into > slices. I downloaded SimpleITK V0.9 Beta and was playing around with the > new ImageSeriesWriter class but can't figure out how to do it. > Do I need to declare a VectorString? > Thanks, > > Matias. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Tue Mar 24 13:56:30 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 24 Mar 2015 13:56:30 -0400 Subject: [ITK] Gerrit Upgrade Downtime Thursday, March 24th Message-ID: Hi, We will be upgrading the Gerrit instance on Thursday March, 24th starting at 10 AM Eastern US Time. The server will be unavailable for multiple hours while the upgrade is performed. Thank you for your patience. Matt From blowekamp at mail.nih.gov Tue Mar 24 14:12:47 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 24 Mar 2015 14:12:47 -0400 Subject: [ITK] [ITK-users] ImageSeriesWriter | SimpleITK In-Reply-To: References: <0ED4F886-5DA7-408C-A834-E372D8C77564@mail.nih.gov> Message-ID: <1C0358A6-56D5-4D38-B21F-A875F85E09E3@mail.nih.gov> Hello, On Mar 24, 2015, at 1:56 PM, Matias Montroull wrote: > //Here's where I struggle... > vs.Add(path_pacientes + nombre_paciente + @"\Fusion\SalidaTest\imagen%03d.dcm"); //Is this rthe right way to include a vector of strings No that is not the write way. You actually need to create the list for file names. You needs something closer to what's here in the C++ test [1] but converted to CSharp. The length of the list must match the z size of the images. Many languages have convenient generator expressions or list comprehensions, which seems more natural than C printf formatting and the perils associated with it. The long way to do it is just write a little for loop, something like: for (i=0; i < img.GetSize()[2], ++i) vs.Add( "name {0}.ext".Format(i)) Brad [1] https://github.com/SimpleITK/SimpleITK/blob/master/Testing/Unit/IOTests.cxx#L123-L152 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matimontg at gmail.com Tue Mar 24 17:19:04 2015 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 24 Mar 2015 18:19:04 -0300 Subject: [ITK] [ITK-users] ImageSeriesWriter | SimpleITK In-Reply-To: <1C0358A6-56D5-4D38-B21F-A875F85E09E3@mail.nih.gov> References: <0ED4F886-5DA7-408C-A834-E372D8C77564@mail.nih.gov> <1C0358A6-56D5-4D38-B21F-A875F85E09E3@mail.nih.gov> Message-ID: Thanks Bradley, So, I did this: ImageFileReader imgreader = new ImageFileReader(); imgreader.SetFileName(path_pacientes + nombre_paciente + @"\Fusion\" + "resultado.mha"); itk.simple.Image imgtest = imgreader.Execute(); ImageSeriesWriter SeriesWriter = new ImageSeriesWriter(); VectorString vs = new VectorString(); for (int i=0; i < imgtest.GetSize()[2]; ++i) { vs.Add("imagen {0}.dcm"); } SeriesWriter.SetFileNames(vs); SeriesWriter.Execute(imgtest, vs, false); And I only get one file name (imagen {0}.dcm), am I missing something? (I wasn't able to do this: "name {0}.ext".Format(i)) Thanks, Matias. On Tue, Mar 24, 2015 at 3:12 PM, Bradley Lowekamp wrote: > Hello, > > On Mar 24, 2015, at 1:56 PM, Matias Montroull wrote: > > //Here's where I struggle... > vs.Add(path_pacientes + nombre_paciente + > @"\Fusion\SalidaTest\imagen%03d.dcm"); //Is this rthe right way to include > a vector of strings > > > > No that is not the write way. You actually need to create the list for > file names. You needs something closer to what's here in the C++ test [1] > but converted to CSharp. The length of the list must match the z size of > the images. > > Many languages have convenient generator expressions or list > comprehensions, which seems more natural than C printf formatting and the > perils associated with it. > > The long way to do it is just write a little for loop, something like: > > for (i=0; i < img.GetSize()[2], ++i) > vs.Add( "name {0}.ext".Format(i)) > > Brad > > [1] > https://github.com/SimpleITK/SimpleITK/blob/master/Testing/Unit/IOTests.cxx#L123-L152 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matimontg at gmail.com Tue Mar 24 17:25:20 2015 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 24 Mar 2015 18:25:20 -0300 Subject: [ITK] [ITK-users] ImageSeriesWriter | SimpleITK In-Reply-To: References: <0ED4F886-5DA7-408C-A834-E372D8C77564@mail.nih.gov> <1C0358A6-56D5-4D38-B21F-A875F85E09E3@mail.nih.gov> Message-ID: Sorry... I figured out: here's the code that works, I missed to add the images using "i" as the variable that changes in every iteration as well as specifying the full path to the directory in the Add method ImageFileReader imgreader = new ImageFileReader(); imgreader.SetFileName(path_pacientes + nombre_paciente + @"\Fusion\" + "resultado.mha"); itk.simple.Image imgtest = imgreader.Execute(); ImageSeriesWriter SeriesWriter = new ImageSeriesWriter(); VectorString vs = new VectorString(); for (int i=0; i < imgtest.GetSize()[2]; ++i) { vs.Add(path_pacientes + nombre_paciente + @"\Fusion\Test\" + "imagen" + i + ".dcm"); } SeriesWriter.SetFileNames(vs); SeriesWriter.Execute(imgtest, vs, false); Thanks for all your help! Matias. On Tue, Mar 24, 2015 at 6:19 PM, Matias Montroull wrote: > Thanks Bradley, > > So, I did this: > > ImageFileReader imgreader = new ImageFileReader(); > imgreader.SetFileName(path_pacientes + nombre_paciente + > @"\Fusion\" + "resultado.mha"); > itk.simple.Image imgtest = imgreader.Execute(); > ImageSeriesWriter SeriesWriter = new ImageSeriesWriter(); > VectorString vs = new VectorString(); > for (int i=0; i < imgtest.GetSize()[2]; ++i) > { > vs.Add("imagen {0}.dcm"); > } > > SeriesWriter.SetFileNames(vs); > SeriesWriter.Execute(imgtest, vs, false); > > And I only get one file name (imagen {0}.dcm), am I missing something? (I > wasn't able to do this: "name {0}.ext".Format(i)) > > Thanks, > > Matias. > > On Tue, Mar 24, 2015 at 3:12 PM, Bradley Lowekamp > wrote: > >> Hello, >> >> On Mar 24, 2015, at 1:56 PM, Matias Montroull >> wrote: >> >> //Here's where I struggle... >> vs.Add(path_pacientes + nombre_paciente + >> @"\Fusion\SalidaTest\imagen%03d.dcm"); //Is this rthe right way to include >> a vector of strings >> >> >> >> No that is not the write way. You actually need to create the list for >> file names. You needs something closer to what's here in the C++ test [1] >> but converted to CSharp. The length of the list must match the z size of >> the images. >> >> Many languages have convenient generator expressions or list >> comprehensions, which seems more natural than C printf formatting and the >> perils associated with it. >> >> The long way to do it is just write a little for loop, something like: >> >> for (i=0; i < img.GetSize()[2], ++i) >> vs.Add( "name {0}.ext".Format(i)) >> >> Brad >> >> [1] >> https://github.com/SimpleITK/SimpleITK/blob/master/Testing/Unit/IOTests.cxx#L123-L152 >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From guhurp at student.ethz.ch Tue Mar 24 18:15:57 2015 From: guhurp at student.ethz.ch (Guhur Pierre-Louis) Date: Tue, 24 Mar 2015 22:15:57 +0000 Subject: [ITK] [Insight-users] Problems with ITK installation Message-ID: <996981453AC13A4A83931573004FBB440B31ADF4@MBX114.d.ethz.ch> Hi, I have already installed ITK4.7 once for a first project and I have been doing this again, when an unexpected error comes in Eclipse: *** No rule to make target `/scratch/guhurp/bin/ITK/lib/libitkdouble-conversion-4.7.so.1', needed by `tracker'. Stop. ("tracker" is the name of my new project). I can send you the whole Console messages if you might find it interesting. I don't know from when it could come. Some researches on Internet advices to put ON to ITK_REVIEW and OFF to ITK_EXAMPLE and ITK_TESTING but it doesn't change anything in my case. Do you have any idea? I am unfortunately just a beginner with CMake. Many thanks, Pierre-Louis -------------- next part -------------- An HTML attachment was scrubbed... URL: From audrey.istace at imavie.fr Wed Mar 25 03:49:59 2015 From: audrey.istace at imavie.fr (Audrey Istace) Date: Wed, 25 Mar 2015 07:49:59 +0000 Subject: [ITK] [ITK-users] itk - Writing dicom files from single 3D file In-Reply-To: References: <1427123473731-7587034.post@n2.nabble.com> Message-ID: Hi Matt, Thank you for answering. I am not sure to understand. Does that mean that I cannot write dicom files using DCMTKImageIO (or any other itk DCMTK class) ? -----Message d'origine----- De?: Matt McCormick [mailto:matt.mccormick at kitware.com] Envoy??: mardi 24 mars 2015 17:44 ??: Audrey Istace Cc?: insight-users at itk.org Objet?: Re: [ITK-users] itk - Writing dicom files from single 3D file Hi, DCMTKImageIO not serialize or de-serialize DICOM tags to / from its MetaDataDictionaryArray currently like GDCM does. HTH, Matt On Mon, Mar 23, 2015 at 11:11 AM, AI wrote: > Hello, > > I would like to write Dicom files from a nifti image files using > DCMTKImageIO. In the code below, I read a nifti file using > itkImageFileReader, and then try to write dicom files using > itkImageSeriesWriter. I was not able to do it, probably because of the > SetMetaDataDictionaryArray method, that I don?t know how to use since > I don?t read dicom series as input. Can you help me with that ? > > Thank you very much, > > Audrey > > #include "itkDCMTKImageIO.h" > #include "itkNumericSeriesFileNames.h" > #include "itkImageFileReader.h" > #include "itkImageSeriesWriter.h" > > int main(int argc, char *argv[]) > { > typedef signed short > PixelType; > const unsigned int > Dimension = 3; > typedef itk::Image< PixelType, Dimension > ImageType; > typedef itk::Image< PixelType, 2 > OutputImageType; > typedef itk::ImageFileReader< ImageType > ReaderType; > typedef itk::DCMTKImageIO ImageIOType; > typedef itk::NumericSeriesFileNames NamesGeneratorType; > typedef itk::ImageSeriesWriter< ImageType, > OutputImageType > WriterType; > > ImageIOType::Pointer dcmtkIO = ImageIOType::New(); > NamesGeneratorType::Pointer namesGenerator = > NamesGeneratorType::New(); > ReaderType::Pointer reader = ReaderType::New(); > WriterType::Pointer writer = WriterType::New(); > > reader->SetFileName( "../../out.nii" ); > reader->Update(); > > > > itksys::SystemTools::MakeDirectory( > "../../OutputDicom/" ); > > std::string seriesFormat = "../../OutputDicom/IM%d.dcm"; > namesGenerator->SetSeriesFormat (seriesFormat.c_str()); > namesGenerator->SetStartIndex (1); > namesGenerator->SetEndIndex (166); > > > writer->SetInput( reader->GetOutput() ); > writer->SetImageIO( dcmtkIO ); > writer->SetFileNames( namesGenerator->GetFileNames() ); > // writer->SetMetaDataDictionaryArray( > reader->GetMetaDataDictionaryArray() ); > writer->Update(); > } > > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files > -from-single-3D-file-tp7587034.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Wed Mar 25 08:30:24 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 25 Mar 2015 08:30:24 -0400 Subject: [ITK] [ITK-dev] Gerrit Upgrade Downtime Thursday, March 24th In-Reply-To: References: Message-ID: <2ECFD95E-B3E2-45E8-ADE3-B0AB3629FF34@mail.nih.gov> Matt, Great news! Sounds like something exciting and new is coming... Brad On Mar 24, 2015, at 1:56 PM, Matt McCormick wrote: > Hi, > > We will be upgrading the Gerrit instance on Thursday March, 24th > starting at 10 AM Eastern US Time. The server will be unavailable for > multiple hours while the upgrade is performed. > > Thank you for your patience. > > 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 From s1471978 at sms.ed.ac.uk Wed Mar 25 07:59:44 2015 From: s1471978 at sms.ed.ac.uk (Tim Beattie) Date: Wed, 25 Mar 2015 11:59:44 +0000 Subject: [ITK] [ITK-dev] Benchmarks for ITK Message-ID: <20161A87-1936-41C0-9EB0-07DACCCAAED5@sms.ed.ac.uk> Hi folks. Are there any readily-available benchmarks for the ITK project? I?m interested in porting some of the parallelised parts of ITK to SYCL in order to see how SYCL performs when compared to other parallel programming frameworks. I?ve had a brief look at the ITK code and some of the mailing list archives, but I haven?t found anything called a benchmark or which mentions performance. I know there are extensive unit tests and plenty of examples, but what I?m really looking for is a ?this is how we all benchmark it? program. Just in case anyone?s interested, this is for a masters dissertation in High Performance Computing at the University of Edinburgh. I?ll be running several medical imaging and robotic vision benchmarks on Xeon Phi hardware and possibly on AMD GPUs as well. Thanks in advance, Tim -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. _______________________________________________ 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 Wed Mar 25 09:45:00 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 25 Mar 2015 09:45:00 -0400 Subject: [ITK] [ITK-dev] ITK Dashboard failed In-Reply-To: <5512B705.1060208@ohio.edu> References: <5512B705.1060208@ohio.edu> Message-ID: Hi Kevin, Thanks for the note! This issue should be fixed with tomorrow's build: http://itk.org/gitweb?p=ITK.git;a=commit;h=5413fa6d13033ba586c16d08a912b7d4ed008585 Thanks, Matt On Wed, Mar 25, 2015 at 9:24 AM, Kevin H. Hobbs wrote: > My crontab script on bubbles does : > > # Update ITKScripts > cd /home/kevin/kitware/ITKScripts > git pull origin > > # Update ITK > echo "Update ITK" > cd /home/kevin/kitware/ > time $CTEST -S itk.cmake > date > > $CTEST is the nightly ctest > > Last night the output was : > > > >From git://itk.org/ITK > b1ff2b2..3426f95 dashboard -> origin/dashboard > Updating b1ff2b2..3426f95 > Fast-forward > itk_common.cmake | 8 +++++--- > jenkins_dashboard.cmake | 1 + > 2 files changed, 6 insertions(+), 3 deletions(-) > Update ITK > Dashboard script configuration: > CTEST_SITE=[bubbles.hooperlab] > CTEST_BUILD_NAME=[Fedora-19-x86_64_WrapITK] > CTEST_SOURCE_DIRECTORY=[/home/kevin/kitware/ITK] > CTEST_BINARY_DIRECTORY=[/home/kevin/kitware/ITK_Build] > ExternalData_OBJECT_STORES=[/home/kevin/kitware/ExternalData] > CTEST_CMAKE_GENERATOR=[Unix Makefiles] > CTEST_BUILD_CONFIGURATION=[Release] > CTEST_GIT_COMMAND=[/usr/bin/git] > CTEST_CHECKOUT_COMMAND=[] > CTEST_SCRIPT_DIRECTORY=[/home/kevin/kitware] > CTEST_USE_LAUNCHERS=[1] > CTEST_TEST_TIMEOUT=[1500] > CTEST_COVERAGE_ARGS=[] > CTEST_TEST_ARGS=[PARALLEL_LEVEL;8] > CTEST_MEMCHECK_ARGS=[PARALLEL_LEVEL;8] > > > Clearing build tree... > CMake Error at ITKScripts/itk_common.cmake:415 (if): > if given arguments: > > "NOT" "EXISTS" "/home/kevin/kitware/ITK_Build/CMakeCache.txt" "OR" > > Unknown arguments specified > Call Stack (most recent call first): > itk.cmake:48 (include) > > > > real 0m18.173s > user 0m0.120s > sys 0m2.112s > Wed Mar 25 00:16:02 EDT 2015 > _______________________________________________ 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 hobbsk at ohio.edu Wed Mar 25 09:24:21 2015 From: hobbsk at ohio.edu (Kevin H. Hobbs) Date: Wed, 25 Mar 2015 09:24:21 -0400 Subject: [ITK] [ITK-dev] ITK Dashboard failed Message-ID: <5512B705.1060208@ohio.edu> My crontab script on bubbles does : # Update ITKScripts cd /home/kevin/kitware/ITKScripts git pull origin # Update ITK echo "Update ITK" cd /home/kevin/kitware/ time $CTEST -S itk.cmake date $CTEST is the nightly ctest Last night the output was : >From git://itk.org/ITK b1ff2b2..3426f95 dashboard -> origin/dashboard Updating b1ff2b2..3426f95 Fast-forward itk_common.cmake | 8 +++++--- jenkins_dashboard.cmake | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) Update ITK Dashboard script configuration: CTEST_SITE=[bubbles.hooperlab] CTEST_BUILD_NAME=[Fedora-19-x86_64_WrapITK] CTEST_SOURCE_DIRECTORY=[/home/kevin/kitware/ITK] CTEST_BINARY_DIRECTORY=[/home/kevin/kitware/ITK_Build] ExternalData_OBJECT_STORES=[/home/kevin/kitware/ExternalData] CTEST_CMAKE_GENERATOR=[Unix Makefiles] CTEST_BUILD_CONFIGURATION=[Release] CTEST_GIT_COMMAND=[/usr/bin/git] CTEST_CHECKOUT_COMMAND=[] CTEST_SCRIPT_DIRECTORY=[/home/kevin/kitware] CTEST_USE_LAUNCHERS=[1] CTEST_TEST_TIMEOUT=[1500] CTEST_COVERAGE_ARGS=[] CTEST_TEST_ARGS=[PARALLEL_LEVEL;8] CTEST_MEMCHECK_ARGS=[PARALLEL_LEVEL;8] Clearing build tree... CMake Error at ITKScripts/itk_common.cmake:415 (if): if given arguments: "NOT" "EXISTS" "/home/kevin/kitware/ITK_Build/CMakeCache.txt" "OR" Unknown arguments specified Call Stack (most recent call first): itk.cmake:48 (include) real 0m18.173s user 0m0.120s sys 0m2.112s Wed Mar 25 00:16:02 EDT 2015 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 173 bytes Desc: OpenPGP digital signature URL: -------------- next part -------------- _______________________________________________ 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 Wed Mar 25 10:00:36 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 25 Mar 2015 10:00:36 -0400 Subject: [ITK] [ITK-dev] Benchmarks for ITK In-Reply-To: <20161A87-1936-41C0-9EB0-07DACCCAAED5@sms.ed.ac.uk> References: <20161A87-1936-41C0-9EB0-07DACCCAAED5@sms.ed.ac.uk> Message-ID: Hi Tim, Thanks for reaching out to the list. Improvements in ITK's support for parallel processing and architectures would be greatly welcome. We currently have some support for OpenCL-based computing. However, if appropriate, addition of SYCL or better C++ programming capabilities would be welcome. Also, a port of the VTK SMPTools (see 'git grep SMPTools' within the VTK tree) would be a good way to allow better parallel computing in ITK. If you want to do a comparison for your thesis, there are a few backends there that could be compared to the ones you propose. Since ITK and VTK have a common ancestry in the multi-threading code, a similar update could be possible in the codebase. For benchmarks, I am hoping to try Air Speed Velocity [1] to track performance. We started a repository to add performance benchmarks [2] with real-world use cases, but it has yet to be populated. A good start for performance benchmarks may be some of the slower tests that currently exist in the test suite [3]. Thanks, Matt [1] https://spacetelescope.github.io/asv/index.html [2] https://github.com/InsightSoftwareConsortium/ITKPerformanceTests [3] http://kitware.com/blog/posts/view/556 On Wed, Mar 25, 2015 at 7:59 AM, Tim Beattie wrote: > Hi folks. > > Are there any readily-available benchmarks for the ITK project? I?m interested in porting some of the parallelised parts of ITK to SYCL in order to see how SYCL performs when compared to other parallel programming frameworks. I?ve had a brief look at the ITK code and some of the mailing list archives, but I haven?t found anything called a benchmark or which mentions performance. I know there are extensive unit tests and plenty of examples, but what I?m really looking for is a ?this is how we all benchmark it? program. > > Just in case anyone?s interested, this is for a masters dissertation in High Performance Computing at the University of Edinburgh. I?ll be running several medical imaging and robotic vision benchmarks on Xeon Phi hardware and possibly on AMD GPUs as well. > > Thanks in advance, > > Tim > > > -- > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > > _______________________________________________ > 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 _______________________________________________ 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 Wed Mar 25 10:01:33 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 25 Mar 2015 10:01:33 -0400 Subject: [ITK] [ITK-dev] Gerrit Upgrade Downtime Thursday, March 24th In-Reply-To: <2ECFD95E-B3E2-45E8-ADE3-B0AB3629FF34@mail.nih.gov> References: <2ECFD95E-B3E2-45E8-ADE3-B0AB3629FF34@mail.nih.gov> Message-ID: Yes! Very exciting improvements are coming! More details will follow, soon. On Wed, Mar 25, 2015 at 8:30 AM, Bradley Lowekamp wrote: > Matt, > > Great news! Sounds like something exciting and new is coming... > > Brad > > On Mar 24, 2015, at 1:56 PM, Matt McCormick wrote: > >> Hi, >> >> We will be upgrading the Gerrit instance on Thursday March, 24th >> starting at 10 AM Eastern US Time. The server will be unavailable for >> multiple hours while the upgrade is performed. >> >> Thank you for your patience. >> >> 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 > From matt.mccormick at kitware.com Wed Mar 25 10:02:38 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 25 Mar 2015 10:02:38 -0400 Subject: [ITK] [ITK-users] itk - Writing dicom files from single 3D file In-Reply-To: References: <1427123473731-7587034.post@n2.nabble.com> Message-ID: Hi Audrey, It means that it is more difficult (than usual) to write DICOM images with the correct metadata. HTH, Matt On Wed, Mar 25, 2015 at 3:49 AM, Audrey Istace wrote: > Hi Matt, > > Thank you for answering. > I am not sure to understand. Does that mean that I cannot write dicom files using DCMTKImageIO (or any other itk DCMTK class) ? > > -----Message d'origine----- > De : Matt McCormick [mailto:matt.mccormick at kitware.com] > Envoy? : mardi 24 mars 2015 17:44 > ? : Audrey Istace > Cc : insight-users at itk.org > Objet : Re: [ITK-users] itk - Writing dicom files from single 3D file > > Hi, > > DCMTKImageIO not serialize or de-serialize DICOM tags to / from its MetaDataDictionaryArray currently like GDCM does. > > HTH, > Matt > > On Mon, Mar 23, 2015 at 11:11 AM, AI wrote: >> Hello, >> >> I would like to write Dicom files from a nifti image files using >> DCMTKImageIO. In the code below, I read a nifti file using >> itkImageFileReader, and then try to write dicom files using >> itkImageSeriesWriter. I was not able to do it, probably because of the >> SetMetaDataDictionaryArray method, that I don?t know how to use since >> I don?t read dicom series as input. Can you help me with that ? >> >> Thank you very much, >> >> Audrey >> >> #include "itkDCMTKImageIO.h" >> #include "itkNumericSeriesFileNames.h" >> #include "itkImageFileReader.h" >> #include "itkImageSeriesWriter.h" >> >> int main(int argc, char *argv[]) >> { >> typedef signed short >> PixelType; >> const unsigned int >> Dimension = 3; >> typedef itk::Image< PixelType, Dimension > ImageType; >> typedef itk::Image< PixelType, 2 > OutputImageType; >> typedef itk::ImageFileReader< ImageType > ReaderType; >> typedef itk::DCMTKImageIO ImageIOType; >> typedef itk::NumericSeriesFileNames NamesGeneratorType; >> typedef itk::ImageSeriesWriter< ImageType, >> OutputImageType > WriterType; >> >> ImageIOType::Pointer dcmtkIO = ImageIOType::New(); >> NamesGeneratorType::Pointer namesGenerator = >> NamesGeneratorType::New(); >> ReaderType::Pointer reader = ReaderType::New(); >> WriterType::Pointer writer = WriterType::New(); >> >> reader->SetFileName( "../../out.nii" ); >> reader->Update(); >> >> >> >> itksys::SystemTools::MakeDirectory( >> "../../OutputDicom/" ); >> >> std::string seriesFormat = "../../OutputDicom/IM%d.dcm"; >> namesGenerator->SetSeriesFormat (seriesFormat.c_str()); >> namesGenerator->SetStartIndex (1); >> namesGenerator->SetEndIndex (166); >> >> >> writer->SetInput( reader->GetOutput() ); >> writer->SetImageIO( dcmtkIO ); >> writer->SetFileNames( namesGenerator->GetFileNames() ); >> // writer->SetMetaDataDictionaryArray( >> reader->GetMetaDataDictionaryArray() ); >> writer->Update(); >> } >> >> >> >> >> -- >> View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files >> -from-single-3D-file-tp7587034.html >> Sent from the ITK Insight Users mailing list archive at Nabble.com. >> _____________________________________ >> 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://www.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-users _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Wed Mar 25 11:21:22 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 25 Mar 2015 11:21:22 -0400 Subject: [ITK] [Insight-users] Problems with ITK installation In-Reply-To: <996981453AC13A4A83931573004FBB440B31ADF4@MBX114.d.ethz.ch> References: <996981453AC13A4A83931573004FBB440B31ADF4@MBX114.d.ethz.ch> Message-ID: Hello Pierre-Louis, Does the file /scratch/guhurp/bin/ITK/lib/libitkdouble-conversion-4.7.so.1 exist? If not, ITK will need to be rebuilt at /scratch/guhurp/bin/ITK. HTH, Matt On Tue, Mar 24, 2015 at 6:15 PM, Guhur Pierre-Louis wrote: > Hi, > > I have already installed ITK4.7 once for a first project and I have been > doing this again, when an unexpected error comes in Eclipse: > > *** No rule to make target > `/scratch/guhurp/bin/ITK/lib/libitkdouble-conversion-4.7.so.1', needed by > `tracker'. Stop. > > ("tracker" is the name of my new project). > > I can send you the whole Console messages if you might find it interesting. > > I don't know from when it could come. Some researches on Internet advices to > put ON to ITK_REVIEW and OFF to ITK_EXAMPLE and ITK_TESTING but it doesn't > change anything in my case. > > Do you have any idea? > > I am unfortunately just a beginner with CMake. > > > Many thanks, > > Pierre-Louis > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From matimontg at gmail.com Wed Mar 25 18:17:51 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 25 Mar 2015 19:17:51 -0300 Subject: [ITK] [ITK-users] SimpleITK | ImagePositionPatient and origins Message-ID: Hi, I was testing the new ImageSeriesWriter in the new SimpleITK 0.9 Beta and for some reason it's not copying the Image Position Patient information when writing the slices. any ideas why this happens? Here's my code: ImageFileReader imgreader_resultado = new ImageFileReader(); imgreader_resultado.SetFileName(path_pacientes + nombre_paciente + @"\Fusion\" + "resultado.mha"); itk.simple.Image imgresultado = imgreader_resultado.Execute(); ImageSeriesWriter SeriesWriter_resultado = new ImageSeriesWriter(); VectorString vs_resultado = new VectorString(); for (int i = 0; i < imgresultado.GetSize()[2]; ++i) { vs_resultado.Add(path_pacientes + nombre_paciente + @"\Fusion\Resultado\" + "imagen" + i + ".dcm"); } SeriesWriter_resultado.SetFileNames(vs_resultado); if (!Directory.Exists(path_pacientes + nombre_paciente + @"\Fusion\Resultado")) //Si se abri? el plan y nunca se hizo registraci?n previamente, se crea el directorio Registraci?n { Directory.CreateDirectory(path_pacientes + nombre_paciente + @"\Fusion\Resultado"); } SeriesWriter_resultado.Execute(imgresultado, vs_resultado, false); Thank you, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From JohannesWeber at gmx.at Thu Mar 26 05:24:22 2015 From: JohannesWeber at gmx.at (JohannesWeber at gmx.at) Date: Thu, 26 Mar 2015 10:24:22 +0100 Subject: [ITK] [ITK-users] setting big spherical neighborhoods to center voxel value Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Thu Mar 26 08:36:27 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 26 Mar 2015 08:36:27 -0400 Subject: [ITK] [ITK-users] setting big spherical neighborhoods to center voxel value In-Reply-To: References: Message-ID: <6E34D00A-F187-4E5E-A2E4-6F490D8CE87C@mail.nih.gov> Hello, If you have a 3D image and you are visiting a neighborhood of size 20^3, you are doing 8000 visits per pixel there is no way to make this efficient. You have a big O algorithm problem. The Neighborhood iterator would be a the more ITK way of doing what you are trying to do [1] [2]. But that's is not the order of efficiency improvement you need. You need to revise your algorithm so you only visit each pixel once. Perhaps with region growing and queues, or auxiliary images to keep track of the current distance or other data. Hope that helps, Brad [1] http://www.itk.org/Doxygen/html/classitk_1_1NeighborhoodIterator.html [2] http://itk.org/Wiki/ITK/Examples/Iterators/NeighborhoodIterator On Mar 26, 2015, at 5:24 AM, JohannesWeber at gmx.at wrote: > Hello everyone, > > I have the following problem: after calculating the distance map (e.g. with DanielssonDistanceMapImageFilter) I am getting rid of most of the voxels (= setting 0) after calculating a so called distance ridge (kind of a skeleton). Now I want for every voxel of this distance ridge that it is a center voxel for a spherical neighborhood with the radius equal to the distance value of the voxel, and all voxels included in this sphere are set to the distance value of the voxel of the distance ridge (the center voxel of the sphere). So that means the neighborhoods can become big, e.g. radius of 10, or 20 voxels. The problem is here the performance... I implemented it somehow, but the performance nowhere near it should be. > e.g. going through the image with a neighborhood iterator and vor every voxel bigger than 0 creating a neighborhood with the radius with the distance value of this voxel that seems to take very long alone to create and indexing the neighborhood. > another approach I tried is to extract all the voxels of the distance ridge, iterate through them and calculate for every ridge voxel the region and iterate through the region doing proper calculations: > > for (int rp = 0; rp < nRidgePoints; rp++) > { > ImageType::IndexType s1Index; > const int i = ridgePointsIndex[0][rp]; > const int j = ridgePointsIndex[1][rp]; > const int k = ridgePointsIndex[2][rp]; > const float r = ridgePointsValues[rp]; > > rSquared = (int) ((r * r) + 0.5f); > rInt = (int) r; > if(rInt < r) rInt++; > iStart = i - rInt; > if(iStart < 0) iStart = 0; > iStop = i + rInt; > if(iStop >= imageSize[0]) iStop = imageSize[0] - 1; > jStart = j - rInt; > if(jStart < 0) jStart = 0; > jStop = j + rInt; > if(jStop >= imageSize[1]) jStop = imageSize[1] - 1; > kStart = k - rInt; > if(kStart < 0) kStart = 0; > kStop = k + rInt; > if(kStop >= imageSize[2]) kStop = imageSize[2] - 1; > ImageType::IndexType index; > ImageType::SizeType size; > index[0] = iStart; > index[1] = jStart; > index[2] = kStart; > size[0] = iStop - iStart + 1; > size[1] = jStop - jStart + 1; > size[2] = kStop - kStart + 1; > ImageType::RegionType region; > region.SetIndex(index); > region.SetSize(size); > ImageRegionIteratorWithIndexType iteratorWithIndex (distanceRidge, region); > > for (iteratorWithIndex.GoToBegin(); !iteratorWithIndex.IsAtEnd(); iteratorWithIndex++) > { > s1Index = iteratorWithIndex.GetIndex(); > r1SquaredK = (s1Index[0] - i) * (s1Index[0] - i); > r1SquaredJK = r1SquaredK + (s1Index[1] - j) * (s1Index[1] - j); > if(r1SquaredJK <= rSquared) > { > r1Squared = r1SquaredJK + (s1Index[2] - k) * (s1Index[2] - k); > if (r1Squared <= rSquared) > { > s1 = iteratorWithIndex.Get(); > if (rSquared > s1) > { > iteratorWithIndex.Set(rSquared); > } > } > } > } > > } > > so every approach I tried until now is very slow comparing to other implementations of the algorithm I want to do... would maybe spatial objects help me somehow? But I do not really understand how they work... > thanks for your help! > > greetings, > Johannes > _____________________________________ > 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://www.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-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Thu Mar 26 08:47:13 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 26 Mar 2015 08:47:13 -0400 Subject: [ITK] [ITK-users] ITK dicom reader wrong spacing In-Reply-To: References: Message-ID: Hi Aiert, VolView uses a different, custom method for loading DICOM series than ITK-SNAP and Slicer. Spacing in DICOM is tricky -- spacing and spacing-like information is specified in many different tags. To find the tag that you are looking for gdcmdump and similar tools can be used to inspect the tags. HTH, Matt On Thu, Mar 26, 2015 at 8:18 AM, Amundarain, Aiert wrote: > Hi Matt. > > I have tried the solution you suggested but the final result is the same. I tried opening the dicom series in ITK-SNAP and Slicer with similar result. However, Volview loads the DICOM series properly. Do you know the difference among those programs when they load DICOM Series? all the programs are based in ITK. > > Thank you > > -----Original Message----- > From: Matt McCormick [mailto:matt.mccormick at kitware.com] > Sent: jueves, 19 de marzo de 2015 21:20 > To: Amundarain, Aiert > Cc: Insight-users at itk.org > Subject: Re: [ITK-users] ITK dicom reader wrong spacing > > Hi Aiert, > > It is possible to use DCMTK instead of GDCM. Turn on Module_ITKIODCMTK in your CMake configuration. See the itkDCMTKSeriesReadImageWriter.cxx test for example usage. > > HTH, > Matt > > On Wed, Mar 18, 2015 at 7:43 AM, Amundarain, Aiert wrote: >> I have a DICOM Image serie that itk does not read properly. The x,y,z >> spacing are incorrect and the return value is the default one (1,1,1). >> >> If I read this DICOM Image serie using vtk (vtkDICOMImageReader), the >> reading is correct. >> >> Both softwares are developed by kitware but the results are different. >> >> >> >> Is is possible to read the dicom files using ITK without using the >> gdcm library? >> >> >> >> Thank you. >> >> >> >> >> _____________________________________ >> 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://www.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-users >> _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Thu Mar 26 09:12:28 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 26 Mar 2015 09:12:28 -0400 Subject: [ITK] [ITK-users] SimpleITK | ImagePositionPatient and origins In-Reply-To: References: Message-ID: <369AD1DD-ABBC-4F3B-BFD7-0ECAB831EC94@mail.nih.gov> Hello, Can you please create a JIRA ticket to track this issue? https://issues.itk.org/jira/browse/SIMPLEITK Thank you, Brad On Mar 25, 2015, at 6:17 PM, Matias Montroull wrote: > Hi, > > I was testing the new ImageSeriesWriter in the new SimpleITK 0.9 Beta and for some reason it's not copying the Image Position Patient information when writing the slices. > > any ideas why this happens? > > Here's my code: > ImageFileReader imgreader_resultado = new ImageFileReader(); > imgreader_resultado.SetFileName(path_pacientes + nombre_paciente + @"\Fusion\" + "resultado.mha"); > itk.simple.Image imgresultado = imgreader_resultado.Execute(); > ImageSeriesWriter SeriesWriter_resultado = new ImageSeriesWriter(); > VectorString vs_resultado = new VectorString(); > for (int i = 0; i < imgresultado.GetSize()[2]; ++i) > { > vs_resultado.Add(path_pacientes + nombre_paciente + @"\Fusion\Resultado\" + "imagen" + i + ".dcm"); > } > > SeriesWriter_resultado.SetFileNames(vs_resultado); > > if (!Directory.Exists(path_pacientes + nombre_paciente + @"\Fusion\Resultado")) //Si se abri? el plan y nunca se hizo registraci?n previamente, se crea el directorio Registraci?n > { > Directory.CreateDirectory(path_pacientes + nombre_paciente + @"\Fusion\Resultado"); > } > > SeriesWriter_resultado.Execute(imgresultado, vs_resultado, false); > > Thank you, > > Matias. > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From matimontg at gmail.com Thu Mar 26 09:38:12 2015 From: matimontg at gmail.com (Matias Montroull) Date: Thu, 26 Mar 2015 10:38:12 -0300 Subject: [ITK] [ITK-users] SimpleITK | ImagePositionPatient and origins In-Reply-To: <369AD1DD-ABBC-4F3B-BFD7-0ECAB831EC94@mail.nih.gov> References: <369AD1DD-ABBC-4F3B-BFD7-0ECAB831EC94@mail.nih.gov> Message-ID: Hi Brad, I just created a JIRA issue: https://issues.itk.org/jira/browse/SIMPLEITK-627 Regards, Matias. On Thu, Mar 26, 2015 at 10:12 AM, Bradley Lowekamp wrote: > Hello, > > Can you please create a JIRA ticket to track this issue? > > https://issues.itk.org/jira/browse/SIMPLEITK > > Thank you, > Brad > > On Mar 25, 2015, at 6:17 PM, Matias Montroull wrote: > > > Hi, > > > > I was testing the new ImageSeriesWriter in the new SimpleITK 0.9 Beta > and for some reason it's not copying the Image Position Patient information > when writing the slices. > > > > any ideas why this happens? > > > > Here's my code: > > ImageFileReader imgreader_resultado = new ImageFileReader(); > > imgreader_resultado.SetFileName(path_pacientes + > nombre_paciente + @"\Fusion\" + "resultado.mha"); > > itk.simple.Image imgresultado = > imgreader_resultado.Execute(); > > ImageSeriesWriter SeriesWriter_resultado = new > ImageSeriesWriter(); > > VectorString vs_resultado = new VectorString(); > > for (int i = 0; i < imgresultado.GetSize()[2]; ++i) > > { > > vs_resultado.Add(path_pacientes + nombre_paciente + > @"\Fusion\Resultado\" + "imagen" + i + ".dcm"); > > } > > > > SeriesWriter_resultado.SetFileNames(vs_resultado); > > > > if (!Directory.Exists(path_pacientes + nombre_paciente + > @"\Fusion\Resultado")) //Si se abri? el plan y nunca se hizo registraci?n > previamente, se crea el directorio Registraci?n > > { > > Directory.CreateDirectory(path_pacientes + > nombre_paciente + @"\Fusion\Resultado"); > > } > > > > SeriesWriter_resultado.Execute(imgresultado, vs_resultado, > false); > > > > Thank you, > > > > Matias. > > _____________________________________ > > 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://www.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-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From mihail.isakov at googlemail.com Thu Mar 26 15:30:32 2015 From: mihail.isakov at googlemail.com (Mihail Isakov) Date: Thu, 26 Mar 2015 20:30:32 +0100 Subject: [ITK] [ITK-users] SimpleITK | ImagePositionPatient and origins In-Reply-To: References: <369AD1DD-ABBC-4F3B-BFD7-0ECAB831EC94@mail.nih.gov> Message-ID: Hi, just guessing ... and it is also applicable to many other DICOM read/write questions here ...There are dozens of DICOM media storage classes (secondary capture, MR, CT, enhanced MR, US and so on ) and they have different sets of tags, many of them are conditional, it is very very complicated with DICOM... so complicated that 100% compliant files are rare .. most likely by default "secondary capture" is taken and it doesn't have image postion patient and image orientation patient... Check 0002|0002 (MediaStorageSOPClassUID) and 0008|0016 (SOPClassUID). To set particular IOD something like this can work (with GDCM, don't know how does it work with ITK metadata dictionary, i gave it up and did it with pure GDCM for a while) gdcm::ImageWriter writer; gdcm::Image & image = writer.GetImage(); gdcm::DataSet & ds = writer.GetFile().GetDataSet(); gdcm::Attribute<0x0008,0x0016, gdcm::VR::UI> asop; asop.SetValue("1.2.840.10008.5.1.4.1.1.4"); // MR Image IOD Modules ds.Replace(asop.GetAsDataElement()); without warranty, try to ask GDCM developers and DICOM people So far GDCM is trying the best to be DICOM correct.. Regards, Mihail "1.2.840.10008.1.3.10" , "Basic Directory IOD Modules" "1.2.840.10008.5.1.4.1.1.1" , "CR Image IOD Modules" "1.2.840.10008.5.1.4.1.1.1.1" , "Digital X Ray Image IOD Modules" // DX IOD (see B.5.1.1) "1.2.840.10008.5.1.4.1.1.1.1.1" , "Digital X Ray Image IOD Modules" // DX IOD (see B.5.1.1) "1.2.840.10008.5.1.4.1.1.1.2" , "Digital Mammography X Ray Image IOD Modules" // (see B.5.1.2) "1.2.840.10008.5.1.4.1.1.1.2.1" , "Digital Mammography X Ray Image IOD Modules"// (see B.5.1.2) "1.2.840.10008.5.1.4.1.1.1.3" , "Digital Intra Oral X Ray Image IOD Modules" // (see B.5.1.3) "1.2.840.10008.5.1.4.1.1.1.3.1" , "Digital Intra Oral X Ray Image IOD Modules" // (see B.5.1.3) "1.2.840.10008.5.1.4.1.1.2" , "CT Image IOD Modules" "1.2.840.10008.5.1.4.1.1.2.1" , "Enhanced CT Image IOD Modules" // (see B.5.1.7) "1.2.840.10008.5.1.4.1.1.3.1" , "US Multi Frame Image IOD Modules" "1.2.840.10008.5.1.4.1.1.4" , "MR Image IOD Modules" "1.2.840.10008.5.1.4.1.1.4.1" , "Enhanced MR Image IOD Modules" // (see B.5.1.6) "1.2.840.10008.5.1.4.1.1.4.2" , "MR Spectroscopy IOD Modules" "1.2.840.10008.5.1.4.1.1.4.3" , "Enhanced MR Color Image" "1.2.840.10008.5.1.4.1.1.6.1" , "US Image IOD Modules" "1.2.840.10008.5.1.4.1.1.6.2" , "Enhanced US Volume" "1.2.840.10008.5.1.4.1.1.7" , "SC Image IOD Modules" "1.2.840.10008.5.1.4.1.1.7.1" , "Multi Frame Single Bit SC Image IOD Modules" "1.2.840.10008.5.1.4.1.1.7.2" , "Multi Frame Grayscale Byte SC Image IOD Modules" "1.2.840.10008.5.1.4.1.1.7.3" , "Multi Frame Grayscale Word SC Image IOD Modules" "1.2.840.10008.5.1.4.1.1.7.4" , "Multi Frame True Color SC Image IOD Modules" "1.2.840.10008.5.1.4.1.1.9.1.1" , "12 Lead ECG IOD Modules" "1.2.840.10008.5.1.4.1.1.9.1.2" , "General ECG IOD Modules" "1.2.840.10008.5.1.4.1.1.9.1.3" , "Ambulatory ECG IOD Modules" "1.2.840.10008.5.1.4.1.1.9.2.1" , "Hemodynamic IOD Modules" "1.2.840.10008.5.1.4.1.1.9.3.1" , "Basic Cardiac EP IOD Modules" // Cardiac Electrophysiology Waveform "1.2.840.10008.5.1.4.1.1.9.4.1" , "Basic Voice Audio IOD Modules" "1.2.840.10008.5.1.4.1.1.9.4.2" , "General Audio Waveform" "1.2.840.10008.5.1.4.1.1.9.5.1" , "Arterial Pulse Waveform" "1.2.840.10008.5.1.4.1.1.9.6.1" , "Respiratory Waveform" "1.2.840.10008.5.1.4.1.1.11.1" , "Grayscale Softcopy Presentation State IOD Modules" "1.2.840.10008.5.1.4.1.1.11.2" , "Color Softcopy Presentation State" "1.2.840.10008.5.1.4.1.1.11.3" , "Pseudo-Color Softcopy Presentation State" "1.2.840.10008.5.1.4.1.1.11.4" , "Blending Softcopy Presentation State" "1.2.840.10008.5.1.4.1.1.11.5" , "IOD defined in PS 3.3" "1.2.840.10008.5.1.4.1.1.12.1" , "X Ray Angiographic Image IOD Modules" "1.2.840.10008.5.1.4.1.1.12.1.1" , "Enhanced X Ray Angiographic Image IOD Modules" "1.2.840.10008.5.1.4.1.1.12.2" , "XRF Image IOD Modules" "1.2.840.10008.5.1.4.1.1.12.2.1" , "Enhanced X Ray RF Image IOD Modules" "1.2.840.10008.5.1.4.1.1.13.1.1" , "X Ray 3D Angiographic Image IOD Modules" "1.2.840.10008.5.1.4.1.1.13.1.2" , "X-Ray 3D Craniofacial Image" "1.2.840.10008.5.1.4.1.1.13.1.3" , "IOD defined in PS 3.3" "1.2.840.10008.5.1.4.1.1.20" , "NM Image IOD Modules" "1.2.840.10008.5.1.4.1.1.66" , "Raw Data IOD Modules" "1.2.840.10008.5.1.4.1.1.66.1" , "Spatial Registration IOD Modules" "1.2.840.10008.5.1.4.1.1.66.2" , "Spatial Fiducials IOD Modules" "1.2.840.10008.5.1.4.1.1.66.3" , "Deformable Spatial Registration" "1.2.840.10008.5.1.4.1.1.66.4" , "Segmentation IOD Modules" "1.2.840.10008.5.1.4.1.1.66.5" , "Surface Segmentation" "1.2.840.10008.5.1.4.1.1.67" , "Real World Value Mapping" "1.2.840.10008.5.1.4.1.1.77.1.1" , "VL Endoscopic Image IOD Modules" "1.2.840.10008.5.1.4.1.1.77.1.1.1" , "Video Endoscopic Image IOD Modules" "1.2.840.10008.5.1.4.1.1.77.1.2" , "VL Microscopic Image" "1.2.840.10008.5.1.4.1.1.77.1.2.1" , "Video Microscopic Image" "1.2.840.10008.5.1.4.1.1.77.1.3" , "VL Slide-Coordinates Microscopic Image" "1.2.840.10008.5.1.4.1.1.77.1.4" , "VL Photographic Image IOD Modules" "1.2.840.10008.5.1.4.1.1.77.1.4.1" , "Video Photographic Image" "1.2.840.10008.5.1.4.1.1.77.1.5.1" , "Ophthalmic Photography 8 Bit Image" "1.2.840.10008.5.1.4.1.1.77.1.5.2" , "Ophthalmic Photography 16 Bit Image" "1.2.840.10008.5.1.4.1.1.77.1.5.3" , "Stereometric Relationship" "1.2.840.10008.5.1.4.1.1.77.1.5.4" , "Ophthalmic Tomography Image" "1.2.840.10008.5.1.4.1.1.78.1" , "Lensometry Measurements" "1.2.840.10008.5.1.4.1.1.78.2" , "Autorefraction Measurements" "1.2.840.10008.5.1.4.1.1.78.3" , "Keratometry Measurements" "1.2.840.10008.5.1.4.1.1.78.4" , "Subjective Refraction Measurements" "1.2.840.10008.5.1.4.1.1.78.5" , "Visual Acuity Measurements" "1.2.840.10008.5.1.4.1.1.78.6" , "Spectacle Prescription Report" "1.2.840.10008.5.1.4.1.1.79.1" , "Macular Grid Thickness and Volume Report" "1.2.840.10008.5.1.4.1.1.88.11" , "Basic Text SR IOD Modules" "1.2.840.10008.5.1.4.1.1.88.22" , "Enhanced SR IOD Modules" "1.2.840.10008.5.1.4.1.1.88.33" , "Comprehensive SR IOD Modules" "1.2.840.10008.5.1.4.1.1.88.40" , "Procedure Log" "1.2.840.10008.5.1.4.1.1.88.50" , "Mammography CAD SR IOD Modules" "1.2.840.10008.5.1.4.1.1.88.59" , "Key Object Selection Document IOD Modules" "1.2.840.10008.5.1.4.1.1.88.65" , "Chest CAD SR IOD" "1.2.840.10008.5.1.4.1.1.88.67" , "X Ray Radiation Dose SR IOD Modules" "1.2.840.10008.5.1.4.1.1.88.69" , "Colon CAD SR IOD" "1.2.840.10008.5.1.4.1.1.104.1" , "Encapsulated PDF IOD Modules" "1.2.840.10008.5.1.4.1.1.104.2" , "Encapsulated CDA IOD Modules" "1.2.840.10008.5.1.4.1.1.128" , "PET Image IOD Modules" "1.2.840.10008.5.1.4.1.1.130" , "IOD defined in PS 3.3" "1.2.840.10008.5.1.4.1.1.131" , "Basic Structured Display IOD" "1.2.840.10008.5.1.4.1.1.481.1" , "RT Image IOD Modules" "1.2.840.10008.5.1.4.1.1.481.2" , "RT Dose IOD Modules" "1.2.840.10008.5.1.4.1.1.481.3" , "RT Structure Set IOD Modules" "1.2.840.10008.5.1.4.1.1.481.4" , "RT Beams Treatment Record IOD Modules" "1.2.840.10008.5.1.4.1.1.481.5" , "RT Plan IOD Modules" "1.2.840.10008.5.1.4.1.1.481.6" , "RT Brachy Treatment Record IOD Modules" "1.2.840.10008.5.1.4.1.1.481.7" , "RT Treatment Summary Record IOD Modules" "1.2.840.10008.5.1.4.1.1.481.8" , "RT Ion Plan IOD Modules" "1.2.840.10008.5.1.4.1.1.481.9" , "RT Ion Beams Treatment Record IOD Modules" "1.2.840.10008.5.1.4.38.1" , "Hanging Protocol IOD Modules" "1.2.840.10008.5.1.4.39.1" , "Color Palette IOD" // Deprecated: "1.2.840.10008.3.1.2.3.3" , "Modality Performed Procedure Step IOD Modules" "1.2.840.10008.5.1.4.1.1.5" , "NM Image IOD Modules" "1.2.840.10008.5.1.4.1.1.6" , "US Image IOD Modules" "1.2.840.10008.5.1.4.1.1.3" , "US Multi Frame Image IOD Modules" "1.2.840.10008.5.1.4.1.1.12.3" , "" // XRayAngiographicBiplaneImageStorage // private: "1.3.12.2.1107.5.9.1" , "Siemens Non-image IOD Modules" // CSA Non-Image Storage On Thu, Mar 26, 2015 at 2:38 PM, Matias Montroull wrote: > Hi Brad, I just created a JIRA issue: > https://issues.itk.org/jira/browse/SIMPLEITK-627 > Regards, > Matias. > > On Thu, Mar 26, 2015 at 10:12 AM, Bradley Lowekamp > wrote: >> >> Hello, >> >> Can you please create a JIRA ticket to track this issue? >> >> https://issues.itk.org/jira/browse/SIMPLEITK >> >> Thank you, >> Brad >> >> On Mar 25, 2015, at 6:17 PM, Matias Montroull wrote: >> >> > Hi, >> > >> > I was testing the new ImageSeriesWriter in the new SimpleITK 0.9 Beta >> > and for some reason it's not copying the Image Position Patient information >> > when writing the slices. >> > >> > any ideas why this happens? >> > >> > Here's my code: >> > ImageFileReader imgreader_resultado = new ImageFileReader(); >> > imgreader_resultado.SetFileName(path_pacientes + >> > nombre_paciente + @"\Fusion\" + "resultado.mha"); >> > itk.simple.Image imgresultado = >> > imgreader_resultado.Execute(); >> > ImageSeriesWriter SeriesWriter_resultado = new >> > ImageSeriesWriter(); >> > VectorString vs_resultado = new VectorString(); >> > for (int i = 0; i < imgresultado.GetSize()[2]; ++i) >> > { >> > vs_resultado.Add(path_pacientes + nombre_paciente + >> > @"\Fusion\Resultado\" + "imagen" + i + ".dcm"); >> > } >> > >> > SeriesWriter_resultado.SetFileNames(vs_resultado); >> > >> > if (!Directory.Exists(path_pacientes + nombre_paciente + >> > @"\Fusion\Resultado")) //Si se abri? el plan y nunca se hizo registraci?n >> > previamente, se crea el directorio Registraci?n >> > { >> > Directory.CreateDirectory(path_pacientes + >> > nombre_paciente + @"\Fusion\Resultado"); >> > } >> > >> > SeriesWriter_resultado.Execute(imgresultado, vs_resultado, >> > false); >> > >> > Thank you, >> > >> > Matias. >> > _____________________________________ >> > 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://www.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-users >> > > > _____________________________________ > 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://www.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-users > _____________________________________ 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://www.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-users From michkapopoff at gmail.com Thu Mar 26 16:46:57 2015 From: michkapopoff at gmail.com (michkapopoff at gmail.com) Date: Thu, 26 Mar 2015 21:46:57 +0100 Subject: [ITK] [ITK-dev] Gerrit Upgrade Downtime Thursday, March 24th In-Reply-To: References: <2ECFD95E-B3E2-45E8-ADE3-B0AB3629FF34@mail.nih.gov> Message-ID: <1FDD819B-4093-4E51-BF58-3E7474C499CA@gmail.com> The new Gerrit is there ! Nice work ! Michka > On 25 Mar 2015, at 15:01, Matt McCormick wrote: > > Yes! Very exciting improvements are coming! > > More details will follow, soon. > > On Wed, Mar 25, 2015 at 8:30 AM, Bradley Lowekamp > wrote: >> Matt, >> >> Great news! Sounds like something exciting and new is coming... >> >> Brad >> >> On Mar 24, 2015, at 1:56 PM, Matt McCormick wrote: >> >>> Hi, >>> >>> We will be upgrading the Gerrit instance on Thursday March, 24th >>> starting at 10 AM Eastern US Time. The server will be unavailable for >>> multiple hours while the upgrade is performed. >>> >>> Thank you for your patience. >>> >>> 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 From richard.beare at gmail.com Thu Mar 26 17:02:54 2015 From: richard.beare at gmail.com (Richard Beare) Date: Fri, 27 Mar 2015 08:02:54 +1100 Subject: [ITK] [ITK-users] setting big spherical neighborhoods to center voxel value In-Reply-To: <6E34D00A-F187-4E5E-A2E4-6F490D8CE87C@mail.nih.gov> References: <6E34D00A-F187-4E5E-A2E4-6F490D8CE87C@mail.nih.gov> Message-ID: This isn't a complete solution, but might give you some ideas. The part about using the skeleton points, which are distance transform voxels, as the source for the radius, can be implemented using spatially variant morphology. I have a short publication about doing this efficiently with parabolic functions. However this doesn't propagate the voxel value, only producing a mask. I have thought about combining with label dilation, to propagate a label value, but haven't done it yet. A queue based approach to something similar is discussed in: "Labelled reconstruction of binary objects: a vector propagation algorithm", buckley and lagerstrom On Thu, Mar 26, 2015 at 11:36 PM, Bradley Lowekamp wrote: > Hello, > > If you have a 3D image and you are visiting a neighborhood of size 20^3, > you are doing 8000 visits per pixel there is no way to make this efficient. > You have a big O algorithm problem. > > The Neighborhood iterator would be a the more ITK way of doing what you > are trying to do [1] [2]. But that's is not the order of efficiency > improvement you need. > > You need to revise your algorithm so you only visit each pixel once. > Perhaps with region growing and queues, or auxiliary images to keep track > of the current distance or other data. > > Hope that helps, > Brad > > [1] http://www.itk.org/Doxygen/html/classitk_1_1NeighborhoodIterator.html > [2] http://itk.org/Wiki/ITK/Examples/Iterators/NeighborhoodIterator > > On Mar 26, 2015, at 5:24 AM, JohannesWeber at gmx.at wrote: > > Hello everyone, > > I have the following problem: after calculating the distance map (e.g. > with DanielssonDistanceMapImageFilter) I am getting rid of most of the > voxels (= setting 0) after calculating a so called distance ridge (kind of > a skeleton). Now I want for every voxel of this distance ridge that it is a > center voxel for a spherical neighborhood with the radius equal to the > distance value of the voxel, and all voxels included in this sphere are set > to the distance value of the voxel of the distance ridge (the center voxel > of the sphere). So that means the neighborhoods can become big, e.g. radius > of 10, or 20 voxels. The problem is here the performance... I implemented > it somehow, but the performance nowhere near it should be. > e.g. going through the image with a neighborhood iterator and vor every > voxel bigger than 0 creating a neighborhood with the radius with the > distance value of this voxel that seems to take very long alone to create > and indexing the neighborhood. > another approach I tried is to extract all the voxels of the distance > ridge, iterate through them and calculate for every ridge voxel the region > and iterate through the region doing proper calculations: > > for (int rp = 0; rp < nRidgePoints; rp++) > { > ImageType::IndexType s1Index; > const int i = ridgePointsIndex[0][rp]; > const int j = ridgePointsIndex[1][rp]; > const int k = ridgePointsIndex[2][rp]; > const float r = ridgePointsValues[rp]; > > rSquared = (int) ((r * r) + 0.5f); > rInt = (int) r; > if(rInt < r) rInt++; > iStart = i - rInt; > if(iStart < 0) iStart = 0; > iStop = i + rInt; > if(iStop >= imageSize[0]) iStop = imageSize[0] - 1; > jStart = j - rInt; > if(jStart < 0) jStart = 0; > jStop = j + rInt; > if(jStop >= imageSize[1]) jStop = imageSize[1] - 1; > kStart = k - rInt; > if(kStart < 0) kStart = 0; > kStop = k + rInt; > if(kStop >= imageSize[2]) kStop = imageSize[2] - 1; > ImageType::IndexType index; > ImageType::SizeType size; > index[0] = iStart; > index[1] = jStart; > index[2] = kStart; > size[0] = iStop - iStart + 1; > size[1] = jStop - jStart + 1; > size[2] = kStop - kStart + 1; > ImageType::RegionType region; > region.SetIndex(index); > region.SetSize(size); > ImageRegionIteratorWithIndexType iteratorWithIndex (distanceRidge, > region); > > for (iteratorWithIndex.GoToBegin(); !iteratorWithIndex.IsAtEnd(); > iteratorWithIndex++) > { > s1Index = iteratorWithIndex.GetIndex(); > r1SquaredK = (s1Index[0] - i) * (s1Index[0] - i); > r1SquaredJK = r1SquaredK + (s1Index[1] - j) * (s1Index[1] - j); > if(r1SquaredJK <= rSquared) > { > r1Squared = r1SquaredJK + (s1Index[2] - k) * (s1Index[2] - > k); > if (r1Squared <= rSquared) > { > s1 = iteratorWithIndex.Get(); > if (rSquared > s1) > { > iteratorWithIndex.Set(rSquared); > > } > } > } > } > > } > > so every approach I tried until now is very slow comparing to other > implementations of the algorithm I want to do... would maybe spatial > objects help me somehow? But I do not really understand how they work... > thanks for your help! > > greetings, > Johannes > _____________________________________ > 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://www.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-users > > > > _____________________________________ > 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://www.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-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From richard.beare at gmail.com Thu Mar 26 18:47:10 2015 From: richard.beare at gmail.com (Richard Beare) Date: Fri, 27 Mar 2015 09:47:10 +1100 Subject: [ITK] [ITK-users] setting big spherical neighborhoods to center voxel value In-Reply-To: References: <6E34D00A-F187-4E5E-A2E4-6F490D8CE87C@mail.nih.gov> Message-ID: Here's another option - I haven't thought it through completely so could be far from the mark, but I think it is close. consider the following: A - input mask B - distance transform of mask (positive values inside the mask) C - ridge lines in B (sort of skeleton) You are aiming to create an image of spheres, centres on voxels in C, with size set by the "brightness" at centre location in C. Suppose you can create the spatially variant dilation by a sphere using the parabolic tools I mentioned in the previous message - that gives you another mask: D - spatially variant dilation of C Now invert C and take the distance transform to give E. take a distance transform of D and add to E, then mask by D. The idea here is that if you add two distance transforms together you end up with a flat surface, at least in the case where the second DT is computed from peaks in the first. The result should be a sort of tube, of varying thickness, where the voxel value corresponds to the tube thickness (possibly with a uniform offset). Note that I don't think you will see sphere corresponding to the brightest skeleton points using this approach, but the result may be useful for your application. Also, a couple of notes regarding the direct approach. If you use neighbourhoods, which is the appropriate ITK structure, then avoid visiting all voxels with the neighbourhood iterator. Use a standard single voxel iterator to find the skeleton voxels, then move the neighbourhood iterator to that location. There are also some optimizations you can use if you do some checks of the change in sphere size between neighbours. If the spheres were all identically sized then it is feasible to construct lists of voxels that are not in common between neighbouring spheres, and just visit those, which is a big saving. Much trickier when the sizes aren't the same, but I'd guess that for a given skeleton there'd be a relatively small number of combinations of neighbouring sizes. On Fri, Mar 27, 2015 at 8:02 AM, Richard Beare wrote: > This isn't a complete solution, but might give you some ideas. > > The part about using the skeleton points, which are distance transform > voxels, as the source for the radius, can be implemented using spatially > variant morphology. I have a short publication about doing this efficiently > with parabolic functions. However this doesn't propagate the voxel value, > only producing a mask. I have thought about combining with label dilation, > to propagate a label value, but haven't done it yet. > > A queue based approach to something similar is discussed in: > "Labelled reconstruction of binary objects: a vector propagation > algorithm", buckley and lagerstrom > > On Thu, Mar 26, 2015 at 11:36 PM, Bradley Lowekamp > wrote: > >> Hello, >> >> If you have a 3D image and you are visiting a neighborhood of size 20^3, >> you are doing 8000 visits per pixel there is no way to make this efficient. >> You have a big O algorithm problem. >> >> The Neighborhood iterator would be a the more ITK way of doing what you >> are trying to do [1] [2]. But that's is not the order of efficiency >> improvement you need. >> >> You need to revise your algorithm so you only visit each pixel once. >> Perhaps with region growing and queues, or auxiliary images to keep track >> of the current distance or other data. >> >> Hope that helps, >> Brad >> >> [1] http://www.itk.org/Doxygen/html/classitk_1_1NeighborhoodIterator.html >> [2] http://itk.org/Wiki/ITK/Examples/Iterators/NeighborhoodIterator >> >> On Mar 26, 2015, at 5:24 AM, JohannesWeber at gmx.at wrote: >> >> Hello everyone, >> >> I have the following problem: after calculating the distance map (e.g. >> with DanielssonDistanceMapImageFilter) I am getting rid of most of the >> voxels (= setting 0) after calculating a so called distance ridge (kind of >> a skeleton). Now I want for every voxel of this distance ridge that it is a >> center voxel for a spherical neighborhood with the radius equal to the >> distance value of the voxel, and all voxels included in this sphere are set >> to the distance value of the voxel of the distance ridge (the center voxel >> of the sphere). So that means the neighborhoods can become big, e.g. radius >> of 10, or 20 voxels. The problem is here the performance... I implemented >> it somehow, but the performance nowhere near it should be. >> e.g. going through the image with a neighborhood iterator and vor every >> voxel bigger than 0 creating a neighborhood with the radius with the >> distance value of this voxel that seems to take very long alone to create >> and indexing the neighborhood. >> another approach I tried is to extract all the voxels of the distance >> ridge, iterate through them and calculate for every ridge voxel the region >> and iterate through the region doing proper calculations: >> >> for (int rp = 0; rp < nRidgePoints; rp++) >> { >> ImageType::IndexType s1Index; >> const int i = ridgePointsIndex[0][rp]; >> const int j = ridgePointsIndex[1][rp]; >> const int k = ridgePointsIndex[2][rp]; >> const float r = ridgePointsValues[rp]; >> >> rSquared = (int) ((r * r) + 0.5f); >> rInt = (int) r; >> if(rInt < r) rInt++; >> iStart = i - rInt; >> if(iStart < 0) iStart = 0; >> iStop = i + rInt; >> if(iStop >= imageSize[0]) iStop = imageSize[0] - 1; >> jStart = j - rInt; >> if(jStart < 0) jStart = 0; >> jStop = j + rInt; >> if(jStop >= imageSize[1]) jStop = imageSize[1] - 1; >> kStart = k - rInt; >> if(kStart < 0) kStart = 0; >> kStop = k + rInt; >> if(kStop >= imageSize[2]) kStop = imageSize[2] - 1; >> ImageType::IndexType index; >> ImageType::SizeType size; >> index[0] = iStart; >> index[1] = jStart; >> index[2] = kStart; >> size[0] = iStop - iStart + 1; >> size[1] = jStop - jStart + 1; >> size[2] = kStop - kStart + 1; >> ImageType::RegionType region; >> region.SetIndex(index); >> region.SetSize(size); >> ImageRegionIteratorWithIndexType iteratorWithIndex >> (distanceRidge, region); >> >> for (iteratorWithIndex.GoToBegin(); !iteratorWithIndex.IsAtEnd(); >> iteratorWithIndex++) >> { >> s1Index = iteratorWithIndex.GetIndex(); >> r1SquaredK = (s1Index[0] - i) * (s1Index[0] - i); >> r1SquaredJK = r1SquaredK + (s1Index[1] - j) * (s1Index[1] - >> j); >> if(r1SquaredJK <= rSquared) >> { >> r1Squared = r1SquaredJK + (s1Index[2] - k) * (s1Index[2] >> - k); >> if (r1Squared <= rSquared) >> { >> s1 = iteratorWithIndex.Get(); >> if (rSquared > s1) >> { >> iteratorWithIndex.Set(rSquared); >> >> } >> } >> } >> } >> >> } >> >> so every approach I tried until now is very slow comparing to other >> implementations of the algorithm I want to do... would maybe spatial >> objects help me somehow? But I do not really understand how they work... >> thanks for your help! >> >> greetings, >> Johannes >> _____________________________________ >> 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://www.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-users >> >> >> >> _____________________________________ >> 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://www.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-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Fri Mar 27 00:43:51 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 27 Mar 2015 00:43:51 -0400 Subject: [ITK] Updated Gerrit Code Review! Message-ID: As previously noted, we now have an updated Gerrit Code Review instance! See http://review.source.kitware.com This was a major upgrade from version 2.2.2 to version 2.10.1. This update was required for a change in authentication mechanism. Our Gerrit instance previously only had support for OpenID authentication. However, Google has dropped support for OpenID. The updated instance uses GitHub OAuth2 authentication. Community members now login with their GitHub account [1]. If an existing user's GitHub account has one of their email addresses registered with their previous Gerrit account, their old Gerrit account will automatically be associated with their GitHub login. In the future, we will also add support for patch submission via GitHub pull requests. The upgraded Gerrit instance also bring brings many new features. Here are some highlights: - There is a new user interface. When existing users log in, they will be presented with the option to stay with the old user interface or migrate to the new user interface. Interface choice can be changed in Settings -> Preferences. The new interface contains a number of usability and presentation improvements. For example, it is now easier to see and step through patches in a branch. - There are now a number of ways to download a change including patch files and archives. Note that the "Checkout" line has changed slightly in that it checks out 'FETCH_HEAD' instead of a named branch with '-b topic-name'. It is still possible to modify the line pasted in your terminal by replacing 'FETCH_HEAD' with '-b topic-name'. This new default prevents the proliferation of branches in a reviewer's repository and it prevents confusion of new reviewers when they try to checkout a branch with the same name as an existing branch. - A number of new preferences are available for the diff view. - There are many other user interface enhancements. We have also greatly improved how our patch robots builds occur and their capabilities. This will be discussed in another thread. To discuss more about Gerrit and learn more about how to participate in ITK, join us tomorrow on the Hangout [2] [1] http://www.itk.org/Wiki/ITK/Git/Account [2] https://plus.google.com/u/1/events/cv779d1fdghhko68eef25a9e30c From audrey.istace at imavie.fr Fri Mar 27 08:57:18 2015 From: audrey.istace at imavie.fr (AI) Date: Fri, 27 Mar 2015 05:57:18 -0700 (MST) Subject: [ITK] [ITK-users] itk - Writing dicom files from single 3D file In-Reply-To: References: <1427123473731-7587034.post@n2.nabble.com> Message-ID: <1427461038272-7587063.post@n2.nabble.com> Hi Matt, I saw in the source code that MetaData was not handled at all in itkDCMTKImageIO, whereas it is handled in itkGDCMImageIO. Is that why I can't write dicom files with DCMTK as easily as I can using GDCM ? Do you know if itkDCMTKImageIO will be improved in future itk versions ? Thank you, Audrey -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/itk-Writing-dicom-files-from-single-3D-file-tp7587034p7587063.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Fri Mar 27 09:33:34 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 27 Mar 2015 09:33:34 -0400 Subject: [ITK] [ITK-users] possible to get a closest-point map from a distance map in ITK? In-Reply-To: References: <22EC75E8215562428ACADFA35877A25A26187E3F@JANEWAY.ts.odu.edu> <564311ED-2E71-4B12-919B-C36B78084AF8@mail.nih.gov> Message-ID: Hello, Sorry for the delay in following up with this! Here is some information about how to create a module for your code: http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/ITK/ConstructITKModule/index.html Please note that for a remote module it should not begin with the "ITK" prefix. Here is also some policy related info to: http://www.itk.org/Wiki/ITK/Policy_and_Procedures_for_Adding_Remote_Modules Please let us know if you need help. I think many people would appreciate getting easier access to these advanced morphology algorithms. Brad On Mar 4, 2015, at 3:19 PM, Richard Beare wrote: > Good thought - I haven't looked into that. Is it easy to do? My ITK efforts are lagging due to lack of time at present, I'm afraid. > > On Thu, Mar 5, 2015 at 1:30 AM, Bradley Lowekamp wrote: > Richard, > > You have some nice additional morphological filters in those repositories. I have been meaning to give them a try. > > Given that you have Insight Journal articles for them, have you considered making them more readily available to the community by adding and converting them into Remote modules for ITK? > > Brad > > On Mar 2, 2015, at 3:37 PM, Richard Beare wrote: > >> I've written a set of label erosion and dilation filters that might do what you're after. I've also got some spatially varying morphology filters, but have't put them on the insight journal. The label erode dilate filters aren't outputing the distance map, so they aren't exactly what you want, but they use the same kind of computation internally. Thus you could use them in conjunction with the parabolic distance transforms to get labels and distances. >> >> https://github.com/richardbeare/LabelErodeDilate.git >> https://github.com/richardbeare/parabolicMorphology.git >> >> The insight journal article. >> >> http://hdl.handle.net/10380/3399 >> >> >> I can provide more details about the spatially variant stuff if it is of interest. Note that it only works with binary images, and simply weights the input image. >> >> On Tue, Mar 3, 2015 at 6:45 AM, Audette, Michel A. wrote: >> Dear ITK users, >> >> >> a student of mine would like to use the ITK implementation of distance maps in a way where the point label of the closest initial boundary is propagated throughout, i.e. a closest boundary point map. Is there something like this implemented already in ITK? I would like to use something like this to produce a spatially varying distance threshold. >> >> >> Thanks for your kind support. >> >> >> Michel >> >> >> Michel Audette, Ph.D. >> Assistant Professor, >> Department of Modeling, Simulation and Visualization Engineering, >> Old Dominion University, >> Norfolk, VA. >> >> _____________________________________ >> 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://www.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-users >> >> >> _____________________________________ >> 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://www.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-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From drcjaudet at gmail.com Fri Mar 27 09:52:57 2015 From: drcjaudet at gmail.com (Cyril Jaudet) Date: Fri, 27 Mar 2015 14:52:57 +0100 Subject: [ITK] SimpleITK optimize memory management for 4d image registration Message-ID: Hello itk community, i use a python code to extract, crop, register and export 4d image. This code interact with 3Dslicer. Do you know how optimize the memory management because it use more then 15Gb of memory when running ? Thank you, ------------------------------ *Cyril Jaudet *Medical physicist, phd cyril.jaudet at uzbrussel.be ------------------------------ def CropAndRegister(multi,reference,label): multiNode=slicer.util.getNode(multi) refNode=slicer.util.getNode(reference) multiImage=multiNode.GetImageData() N=multiNode.GetNumberOfFrames() for i in range (N): #extract image im=vtk.vtkImageExtractComponents() im.SetInputData(multiImage) im.SetComponents(i) im.Update() frame=slicer.modules.volumes.logic().CloneVolume(slicer.mrmlScene,refNode,'frame_'+str(i)) frame.SetAndObserveImageData(im.GetOutput()) label=su.PullFromSlicer(label) Image_size=label.GetSize() #get distance between the label map and the image border xl_min=Image_size[0] xl_max=0 yl_min=Image_size[1] yl_max=0 zl_min=Image_size[2] zl_max=0 for i in range(Image_size[0]): for j in range(Image_size[1]): for k in range(Image_size[2]): if (label.GetPixel(i,j,k)!=0): if( xl_min>i): xl_min=i if( xl_maxj): yl_min=j if( yl_maxk): zl_min=k if( zl_max From matt.mccormick at kitware.com Fri Mar 27 09:59:51 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 27 Mar 2015 09:59:51 -0400 Subject: [ITK] [ITK-users] itk - Writing dicom files from single 3D file In-Reply-To: <1427461038272-7587063.post@n2.nabble.com> References: <1427123473731-7587034.post@n2.nabble.com> <1427461038272-7587063.post@n2.nabble.com> Message-ID: Hi Audrey, > I saw in the source code that MetaData was not handled at all in > itkDCMTKImageIO, whereas it is handled in itkGDCMImageIO. Is that why I > can't write dicom files with DCMTK as easily as I can using GDCM ? Yes. > Do you know if itkDCMTKImageIO will be improved in future itk versions ? There are not any active plans of which I am aware. However, contributions are welcome [1]. Thanks, Matt [1] http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Fri Mar 27 10:05:15 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 27 Mar 2015 10:05:15 -0400 Subject: [ITK] SimpleITK optimize memory management for 4d image registration In-Reply-To: References: Message-ID: <90A486B7-4991-4450-98A2-09F5861ECBB4@mail.nih.gov> Hello, It's a bit hard to follow the code with how you have formatted. How big are your images? 1) Consider using LabelStatisticImageFilter to compute the bounding box. 2) You have a lot of Slicer, VTK, and SimpleITK code going on here. Frequently with Python code the expense of keeping images on the can build up, so sometimes you need to explicitly "del" them when finished. I don't see too many extras going on here however. 3) I think you need to narrow down the memory problem. You are pushing a lot of images to slicer and not removing them. I am not sure if this is really an SimpleITK usage issue or a Slicer MRML usage issue. Hope that helps, Brad On Mar 27, 2015, at 9:52 AM, Cyril Jaudet wrote: > Hello itk community, > > i use a python code to extract, crop, register and export 4d image. This code interact with 3Dslicer. > Do you know how optimize the memory management because it use more then 15Gb of memory when running ? > > Thank you, > > > Cyril Jaudet > Medical physicist, phd > > > cyril.jaudet at uzbrussel.be > > > > > > > > def CropAndRegister(multi,reference,label): > multiNode=slicer.util.getNode(multi) > refNode=slicer.util.getNode(reference) > multiImage=multiNode.GetImageData() > N=multiNode.GetNumberOfFrames() > for i in range (N): #extract image > im=vtk.vtkImageExtractComponents() > im.SetInputData(multiImage) > im.SetComponents(i) > im.Update() > frame=slicer.modules.volumes.logic().CloneVolume(slicer.mrmlScene,refNode,'frame_'+str(i)) > frame.SetAndObserveImageData(im.GetOutput()) > label=su.PullFromSlicer(label) > Image_size=label.GetSize() #get distance between the label map and the image border > xl_min=Image_size[0] > xl_max=0 > yl_min=Image_size[1] > yl_max=0 > zl_min=Image_size[2] > zl_max=0 > for i in range(Image_size[0]): > for j in range(Image_size[1]): > for k in range(Image_size[2]): > if (label.GetPixel(i,j,k)!=0): > if( xl_min>i): > xl_min=i > if( xl_max xl_max=i > if( yl_min>j): > yl_min=j > if( yl_max yl_max=j > if( zl_min>k): > zl_min=k > if( zl_max zl_max=k > for i in range(N): #crop the image > im=su.PullFromSlicer('frame_'+str(i)) > im_Crop=sitk.Crop(im,[ xl_min,yl_min,zl_min ],[Image_size[0]-xl_max, Image_size[1]-yl_max, Image_size[2]-zl_max ]) > su.PushToSlicer(im_Crop,"frame_crop_"+str(i),1) > im=su.PullFromSlicer('frame_crop_'+str(N-1)) #register > su.PushToSlicer(im,"frame_recal_"+str(N-1),1) > for f in range(N-1): > f0=slicer.util.getNode('frame_crop_'+str(N-1-f)) > f1=slicer.util.getNode('frame_crop_'+str(N-2-f)) > parameters = {} > parameters["fixedVolume"] = f0 > parameters["movingVolume"] = f1 > #parameters["useRigid"] = True > parameters["useScaleSkewVersor3D"]=True > parameters["useAffine"]=True > parameters["useBSpline"]=True > parameters["samplingPercentage"]=0.1 > #parameters["initializeTransformMode"] = "useMomentsAlign" > parameters["backgroundFillValue"] = 0 > registeredObiNode = slicer.vtkMRMLScalarVolumeNode() > slicer.mrmlScene.AddNode(registeredObiNode) > registeredObiNode.SetName('frame_recal_'+str(multiNode.GetNumberOfFrames()-2-f)) > parameters["outputVolume"] = registeredObiNode.GetID() > brainsFit = slicer.modules.brainsfit > cliBrainsFitRigidNode = None > cliBrainsFitRigidNode = slicer.cli.run(brainsFit, None, parameters) > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Mar 27 10:45:11 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 27 Mar 2015 10:45:11 -0400 Subject: [ITK] SimpleITK optimize memory management for 4d image registration In-Reply-To: References: <90A486B7-4991-4450-98A2-09F5861ECBB4@mail.nih.gov> Message-ID: <44512397-C247-438C-80F5-E20560D59151@mail.nih.gov> Hello Cyril, On Mar 27, 2015, at 10:23 AM, Cyril Jaudet wrote: > Thank for you fast reply. > > Image size are 512x512x224x22 voxels... OK so your data is 1.2GB? maybe 2.4GB if short? or 4.8 if converted to float? > > 1) This is a good idea but i don't know how to use SimpleITK crop image filter with a bounding box as input? The format of the bounding box is defined here: http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1LabelStatisticsImageFilter.html#ae117448f17ba708a7364e90bfaaa44af Should be straight forward enough to convert that info to the parameters for CropImageFilter or ExtractImageFilter. > > 2) You're right but i don't know how delete the image i don't need any more. For SimpleITK just use 'del': https://docs.python.org/2/tutorial/datastructures.html?highlight=del#the-del-statement > > 3)Indeed the problem come from a mixing of vtk image to go from 4d to 3d, simple itk to crop them and vtk to use slicer module to register them. Maybe you could use SimpleITK registration to avoid the pushing to slicer and evoking the slicer module, if your registration problem is simple enough? > > Do you have a clue to transform the vtk image in simple itk format? In the forum a convert option suggested was to pass by numpy but i think it's really an indirect/ no efficient way. I would think going through numpy would be better than pushing into Slicer MRML. But those are currently the two ways to do it. I have been hoping some one would implement a more efficient way. > > Also i would like to keep the convertion to simple itk format before calling the slicer module beacause it allow to use another itk filter for denoising or change format purpose. > > Thank for your help, > Cyril > > > > > 2015-03-27 15:05 GMT+01:00 Bradley Lowekamp : > Hello, > > It's a bit hard to follow the code with how you have formatted. How big are your images? > > 1) Consider using LabelStatisticImageFilter to compute the bounding box. > > 2) You have a lot of Slicer, VTK, and SimpleITK code going on here. Frequently with Python code the expense of keeping images on the can build up, so sometimes you need to explicitly "del" them when finished. I don't see too many extras going on here however. > > 3) I think you need to narrow down the memory problem. You are pushing a lot of images to slicer and not removing them. I am not sure if this is really an SimpleITK usage issue or a Slicer MRML usage issue. > > Hope that helps, > Brad > > On Mar 27, 2015, at 9:52 AM, Cyril Jaudet wrote: > >> Hello itk community, >> >> i use a python code to extract, crop, register and export 4d image. This code interact with 3Dslicer. >> Do you know how optimize the memory management because it use more then 15Gb of memory when running ? >> >> Thank you, >> >> >> Cyril Jaudet >> Medical physicist, phd >> >> >> cyril.jaudet at uzbrussel.be >> >> >> >> >> >> >> >> def CropAndRegister(multi,reference,label): >> multiNode=slicer.util.getNode(multi) >> refNode=slicer.util.getNode(reference) >> multiImage=multiNode.GetImageData() >> N=multiNode.GetNumberOfFrames() >> for i in range (N): #extract image >> im=vtk.vtkImageExtractComponents() >> im.SetInputData(multiImage) >> im.SetComponents(i) >> im.Update() >> frame=slicer.modules.volumes.logic().CloneVolume(slicer.mrmlScene,refNode,'frame_'+str(i)) >> frame.SetAndObserveImageData(im.GetOutput()) >> label=su.PullFromSlicer(label) >> Image_size=label.GetSize() #get distance between the label map and the image border >> xl_min=Image_size[0] >> xl_max=0 >> yl_min=Image_size[1] >> yl_max=0 >> zl_min=Image_size[2] >> zl_max=0 >> for i in range(Image_size[0]): >> for j in range(Image_size[1]): >> for k in range(Image_size[2]): >> if (label.GetPixel(i,j,k)!=0): >> if( xl_min>i): >> xl_min=i >> if( xl_max> xl_max=i >> if( yl_min>j): >> yl_min=j >> if( yl_max> yl_max=j >> if( zl_min>k): >> zl_min=k >> if( zl_max> zl_max=k >> for i in range(N): #crop the image >> im=su.PullFromSlicer('frame_'+str(i)) >> im_Crop=sitk.Crop(im,[ xl_min,yl_min,zl_min ],[Image_size[0]-xl_max, Image_size[1]-yl_max, Image_size[2]-zl_max ]) >> su.PushToSlicer(im_Crop,"frame_crop_"+str(i),1) >> im=su.PullFromSlicer('frame_crop_'+str(N-1)) #register >> su.PushToSlicer(im,"frame_recal_"+str(N-1),1) >> for f in range(N-1): >> f0=slicer.util.getNode('frame_crop_'+str(N-1-f)) >> f1=slicer.util.getNode('frame_crop_'+str(N-2-f)) >> parameters = {} >> parameters["fixedVolume"] = f0 >> parameters["movingVolume"] = f1 >> #parameters["useRigid"] = True >> parameters["useScaleSkewVersor3D"]=True >> parameters["useAffine"]=True >> parameters["useBSpline"]=True >> parameters["samplingPercentage"]=0.1 >> #parameters["initializeTransformMode"] = "useMomentsAlign" >> parameters["backgroundFillValue"] = 0 >> registeredObiNode = slicer.vtkMRMLScalarVolumeNode() >> slicer.mrmlScene.AddNode(registeredObiNode) >> registeredObiNode.SetName('frame_recal_'+str(multiNode.GetNumberOfFrames()-2-f)) >> parameters["outputVolume"] = registeredObiNode.GetID() >> brainsFit = slicer.modules.brainsfit >> cliBrainsFitRigidNode = None >> cliBrainsFitRigidNode = slicer.cli.run(brainsFit, None, parameters) >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From seidel at cvrti.utah.edu Fri Mar 27 10:16:12 2015 From: seidel at cvrti.utah.edu (Thomas Seidel) Date: Fri, 27 Mar 2015 08:16:12 -0600 Subject: [ITK] [ITK-users] How to Calculate Hessian Matrix from Gradient Image? Message-ID: Hi all, I would like to calculate the hessian matrix and get an output of type SymmetricSecondRankTensor pixel from a gradient image. The irk HessianRecursiveGaussianImageFilter uses as input an intensity image. However, I would like to implement a method for vessel detection based on the following algorithm: 1. GradientImageFilter 2. GradientVectorFlowImageFilter 3. get the hessian Matrix from 2. (this is my problem) 4. Hessian3DToVesselnessImageFilter How can I get from the vector field in 2. to the hessian matrix I need for 3.? Thanks for your help, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Fri Mar 27 11:02:46 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 27 Mar 2015 11:02:46 -0400 Subject: [ITK] [ITK-users] How to Calculate Hessian Matrix from Gradient Image? In-Reply-To: References: Message-ID: <99977733-F928-4D49-AF1D-F86EDA34612D@mail.nih.gov> Hello, I don't think there is going to be anything turnkey to do what you want. I'd looking to writing a custom filter for this specialized task. You can either base it off the the HessianRecursiveGaussianImageFilter [1] , which utilizes filters per-component and adaptors. Or do a discrite approach along the lines of something I have done here [2]. Hope that helps, Brad [1] https://github.com/InsightSoftwareConsortium/ITK/blob/1ce0e5dd3b2d9c7a7a9353dfb8b728ada8d71320/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx#L187-L368 [2] https://github.com/blowekamp/itkLocalDiscreteHessian/blob/30aa775494c20eaf9e085781ae233e0511773758/include/itkHessianImageFilter.hxx#L132-L174 On Mar 27, 2015, at 10:16 AM, Thomas Seidel wrote: > Hi all, > > I would like to calculate the hessian matrix and get an output of type SymmetricSecondRankTensor pixel from a gradient image. > > The irk HessianRecursiveGaussianImageFilter uses as input an intensity image. > However, I would like to implement a method for vessel detection based on the following algorithm: > > 1. GradientImageFilter > 2. GradientVectorFlowImageFilter > 3. get the hessian Matrix from 2. (this is my problem) > 4. Hessian3DToVesselnessImageFilter > > > How can I get from the vector field in 2. to the hessian matrix I need for 3.? > > Thanks for your help, > Thomas > _____________________________________ > 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://www.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-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From zivrafael.yaniv at nih.gov Fri Mar 27 15:24:21 2015 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Fri, 27 Mar 2015 19:24:21 +0000 Subject: [ITK] [ITK-users] NLM Pill Image Recognition - Request for Information Message-ID: Dear colleagues, Please excuse this slightly off topic mail. I would like to bring to your attention the following request for information which may be of interest to some in the community. The National Library of Medicine (NLM) has issued a call for participation in a Pill Image Recognition (PIR) Request for Information (RFI). Unidentified and misidentified prescription pills present challenges for individuals and professionals. Unidentified pills can be found by family members, health professionals, educators, and law enforcement. The nine out of 10 US citizens over age 65 who take more than one prescription pill can be prone to misidentifying those pills. This PIR RFI is a pilot for a forthcoming PIR Challenge whose goal is to develop smart phone apps that individuals can use to take pictures of prescription pills and then search for and retrieve pill images and associated data of likely matches in an NLM database. NLM anticipates that respondents will include professionals and students, individually or in teams, in computer vision and computer graphics working on content-based image retrieval. Instructions for responding to the RFI are at http://pir.nlm.nih.gov/pilot/instructions.html The deadline for submissions to this RFI is Friday, May 15, 2015. Questions and comments are welcome at pir at nlm.nih.gov. best regards Ziv -- Ziv Yaniv, PhD, Office of High Performance Computing and Communications National Library of Medicine National Institutes of Health Bldg. 38A, Room B1N30D 8600 Rockville Pike, Bethesda, MD, 20894 Phone:+1-301-435-6633 Email: zivyaniv at nih.gov _____________________________________ 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://www.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-users From wumengda at gmail.com Fri Mar 27 22:45:28 2015 From: wumengda at gmail.com (Wei Xiong) Date: Sat, 28 Mar 2015 03:45:28 +0100 Subject: [ITK] [ITK-users] from: Wei Xiong Message-ID: Hi http://ARMOIRIES-BOIS.COM/hunt.php?greatest=y68cvbe7b7pzkc wumengda at gmail.com Sent from my iPhone _____________________________________ 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://www.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-users From matimontg at gmail.com Sat Mar 28 08:57:00 2015 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 28 Mar 2015 09:57:00 -0300 Subject: [ITK] [ITK-users] SimpleITK | chnage Window Levels on an image Message-ID: Hi, I would like to change the window width and window center of an image using ITK. I guess it may be simple but I can't find the filter that would do that. Thanks, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From zivrafael.yaniv at nih.gov Sat Mar 28 10:47:50 2015 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Sat, 28 Mar 2015 14:47:50 +0000 Subject: [ITK] [ITK-users] SimpleITK | chnage Window Levels on an image In-Reply-To: References: Message-ID: The filter is: itk::IntensityWindowingImageFilter Ziv ________________________________ From: Matias Montroull [matimontg at gmail.com] Sent: Saturday, March 28, 2015 8:57 AM To: insight-users at itk.org Users Subject: [ITK-users] SimpleITK | chnage Window Levels on an image Hi, I would like to change the window width and window center of an image using ITK. I guess it may be simple but I can't find the filter that would do that. Thanks, Matias. _____________________________________ 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://www.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-users From matimontg at gmail.com Sat Mar 28 10:55:18 2015 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 28 Mar 2015 11:55:18 -0300 Subject: [ITK] [ITK-users] SimpleITK | chnage Window Levels on an image In-Reply-To: References: Message-ID: Thanks Yaniv, So if I would like to set the Levels of an image to let's say: WC 120 and WW 40, how should I use the variables below to do so? filter->SetWindowMinimum(?); filter->SetWindowMaximum(?); I guess the above sentence just defines the range of the levels and not the actual level Thank you, Matias. On Sat, Mar 28, 2015 at 11:47 AM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] < zivrafael.yaniv at nih.gov> wrote: > The filter is: > > itk::IntensityWindowingImageFilter > > > Ziv > ________________________________ > From: Matias Montroull [matimontg at gmail.com] > Sent: Saturday, March 28, 2015 8:57 AM > To: insight-users at itk.org Users > Subject: [ITK-users] SimpleITK | chnage Window Levels on an image > > Hi, > > I would like to change the window width and window center of an image > using ITK. > > I guess it may be simple but I can't find the filter that would do that. > > Thanks, > > Matias. > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From zivrafael.yaniv at nih.gov Sat Mar 28 11:22:32 2015 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Sat, 28 Mar 2015 15:22:32 +0000 Subject: [ITK] [ITK-users] SimpleITK | chnage Window Levels on an image In-Reply-To: References: , Message-ID: My understanding is that you want to set the window and level. You can do this directly using the SetWindowLevel method: http://www.itk.org/Doxygen/html/classitk_1_1IntensityWindowingImageFilter.html#ad99d5bd667dd23391ff3e2b2db1ce92d Ziv ________________________________ From: Matias Montroull [matimontg at gmail.com] Sent: Saturday, March 28, 2015 10:55 AM To: Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] Cc: insight-users at itk.org Users Subject: Re: [ITK-users] SimpleITK | chnage Window Levels on an image Thanks Yaniv, So if I would like to set the Levels of an image to let's say: WC 120 and WW 40, how should I use the variables below to do so? filter->SetWindowMinimum(?); filter->SetWindowMaximum(?); I guess the above sentence just defines the range of the levels and not the actual level Thank you, Matias. On Sat, Mar 28, 2015 at 11:47 AM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] > wrote: The filter is: itk::IntensityWindowingImageFilter Ziv ________________________________ From: Matias Montroull [matimontg at gmail.com] Sent: Saturday, March 28, 2015 8:57 AM To: insight-users at itk.org Users Subject: [ITK-users] SimpleITK | chnage Window Levels on an image Hi, I would like to change the window width and window center of an image using ITK. I guess it may be simple but I can't find the filter that would do that. Thanks, Matias. _____________________________________ 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://www.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-users From gabrielgimenez85 at gmail.com Sat Mar 28 19:09:59 2015 From: gabrielgimenez85 at gmail.com (=?UTF-8?Q?Gabriel_A=2E_Gim=C3=A9nez?=) Date: Sat, 28 Mar 2015 16:09:59 -0700 (MST) Subject: [ITK] [ITK-users] Resample and Directions in Image Registration Message-ID: <1427584199821-7587074.post@n2.nabble.com> Hello everyone, I am confused with some concepts ... In the munual (version 4.6) of ITK it is mentioned about ResamplingFilter (page 129): *"Probably the most important thing to keep in mind when resampling images is that the transform is used to map points from the output image space into the input image space."* This mean that the parameters are passed to filter mapped points from the output image to the input image, right? Then in the chapter about registration mentioned (page 174) : *"The Transform that is optimized in the ITK registration framework is the one that maps points from the physical space of the fixed image into the physical space of the moving image"* This indicates that the transformation parameters mapped points from the fixed image to moving image ( In the example ?Hello World Registration" this is observed ), right ? During the resampling, at the end of registration for the resulting image, this is done: *resampler->SetTransform( registration->GetOutput()->Get() );* *Why this? should not be pass to the filter the opposite transformation?* I've read much... but I still very confusing concepts like these... (physical spaces, grid/pixel spaces, directions of the transformations, etc...) Thanks in advance ... -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Resample-and-Directions-in-Image-Registration-tp7587074.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From lluna.nova at gmail.com Sat Mar 28 19:44:14 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Sun, 29 Mar 2015 00:44:14 +0100 Subject: [ITK] [ITK-users] itk and const-correctness Message-ID: Hello all, What is the preferred way to achieve const-correctness in ITK? I've stumbled with this 2010 post: http://itk-insight-users.2283740.n2.nabble.com/itk-SmartPointer-problem-making-code-const-correct-td5109890.html which suggests using raw pointers as arguments and pass ::Pointer in practice. Like the first function of http://www.itk.org/Wiki/ITK/Examples/Utilities/PassImageToFunction with myStandardPointer(image); Is that still the case in 2014? Cheers, Pol -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Sat Mar 28 22:49:23 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sat, 28 Mar 2015 22:49:23 -0400 Subject: [ITK] [ITK-users] itk and const-correctness In-Reply-To: References: Message-ID: <041919CE-D608-4D99-B7EC-2FA83841E278@mail.nih.gov> Hello Pol, I don't think anything has changed on this front [1]. So this is still the case for 2014 and 2015. ITK's style is to be more explicit with conversions than implicit and this is consistent with that philosophy. Brad [1] https://github.com/InsightSoftwareConsortium/ITK/commits/master/Modules/Core/Common/include/itkSmartPointer.h On Mar 28, 2015, at 7:44 PM, Pol Mons? Purt? wrote: > Hello all, > > What is the preferred way to achieve const-correctness in ITK? > > I've stumbled with this 2010 post: http://itk-insight-users.2283740.n2.nabble.com/itk-SmartPointer-problem-making-code-const-correct-td5109890.html > > which suggests using raw pointers as arguments and pass ::Pointer in practice. Like the first function of http://www.itk.org/Wiki/ITK/Examples/Utilities/PassImageToFunction with > myStandardPointer(image); > > Is that still the case in 2014? > > Cheers, > > Pol > > > _____________________________________ > 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://www.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-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Sun Mar 29 10:47:02 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 29 Mar 2015 10:47:02 -0400 Subject: [ITK] [ITK-users] Resample and Directions in Image Registration In-Reply-To: <1427584199821-7587074.post@n2.nabble.com> References: <1427584199821-7587074.post@n2.nabble.com> Message-ID: Hi Gabriel, > In the munual (version 4.6) of ITK it is mentioned about ResamplingFilter > (page 129): > > *"Probably the most important thing to keep in mind when resampling images > is that the transform > is used to map points from the output image space into the input image > space."* > > This mean that the parameters are passed to filter mapped points from the > output image to the input image, right? Correct. > Then in the chapter about registration mentioned (page 174) : > > *"The Transform that is optimized in the ITK registration framework is the > one that maps points > from the physical space of the fixed image into the physical space of the > moving image"* > > This indicates that the transformation parameters mapped points from the > fixed image to moving image ( In the example ?Hello World Registration" this > is observed ), right ? Yes. These are consistent. The resampled output image is sampled on the grid of points in physical space where the fixed image is sampled. HTH, 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://www.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-users From gabrielgimenez85 at gmail.com Sun Mar 29 17:25:58 2015 From: gabrielgimenez85 at gmail.com (=?UTF-8?Q?Gabriel_A=2E_Gim=C3=A9nez?=) Date: Sun, 29 Mar 2015 14:25:58 -0700 (MST) Subject: [ITK] [ITK-users] Resample and Directions in Image Registration In-Reply-To: References: <1427584199821-7587074.post@n2.nabble.com> Message-ID: <1427664358535-7587078.post@n2.nabble.com> Hi Matt, thanks for your answer...It is now clear to me ... Matt! another question please ... what is the normal runtime of Mattes Mutual Information Metric with 3D images? It is normal to be in the range of 2.5 to 4 seconds? I use CT and MR images ... and this is my configuration: samplingPercentage = 0.002; samplingStrategy = RegistrationType::REGULAR; NumberOfHistogramBins = 50 thank you very much! -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Resample-and-Directions-in-Image-Registration-tp7587074p7587078.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Sun Mar 29 18:07:09 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 29 Mar 2015 18:07:09 -0400 Subject: [ITK] [ITK-users] Resample and Directions in Image Registration In-Reply-To: <1427664358535-7587078.post@n2.nabble.com> References: <1427584199821-7587074.post@n2.nabble.com> <1427664358535-7587078.post@n2.nabble.com> Message-ID: Hi Gabriel, > Hi Matt, thanks for your answer...It is now clear to me ... Great! > Matt! another question please ... what is the normal runtime of Mattes > Mutual Information Metric with 3D images? It is normal to be in the range of > 2.5 to 4 seconds? I use CT and MR images ... and this is my configuration: > > samplingPercentage = 0.002; > samplingStrategy = RegistrationType::REGULAR; > NumberOfHistogramBins = 50 I do not know offhand what the expected computation time is, but I would not be surprised if it was that slow on 3D images. 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://www.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-users From JohannesWeber at gmx.at Mon Mar 30 03:51:42 2015 From: JohannesWeber at gmx.at (Johannes Weber) Date: Mon, 30 Mar 2015 09:51:42 +0200 Subject: [ITK] [ITK-users] setting big spherical neighborhoods to center voxel value In-Reply-To: References: <6E34D00A-F187-4E5E-A2E4-6F490D8CE87C@mail.nih.gov> , Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From richard.beare at gmail.com Mon Mar 30 04:52:03 2015 From: richard.beare at gmail.com (Richard Beare) Date: Mon, 30 Mar 2015 19:52:03 +1100 Subject: [ITK] [ITK-users] setting big spherical neighborhoods to center voxel value In-Reply-To: References: <6E34D00A-F187-4E5E-A2E4-6F490D8CE87C@mail.nih.gov> Message-ID: I guess the obvious common traps need to be checked - confirm you are in Release mode. Things like neighbourhood iterators can be very expensive in debug mode. Also, the neighbourhood iterator will be doing some sort of edge of image safety check, which your other code may not be doing (I haven't checked). The neighbourhood iterator isn't, I guess, really designed to be resized every time it is used. Normally you set it up once and apply it lots of times. I've no clue as to how expensive the initialisation is, but it may pay to keep a structure containing iterators that you've already allocated so that you can pick the right one and move it. It may turn out that the design is really bad for your problem, with performance being destroyed by the creation phase, that isn't an issue in the normal use case. Continuing to use it will give you edge safety and dimension independence, but I guess you'll need to address the issue of initialization by being clever about the reuse of iterators. One way to do that would be to use a pass to record the location and value of all of the skeleton points, sort them by brightness, then visit in order so that neighbourhoods can be reused without resizing. This assumes, of course that the skeletons contain much fewer voxels than the image. On Mon, Mar 30, 2015 at 6:51 PM, Johannes Weber wrote: > thank you for your answers! > > I tried out following idea of yours: "If you use neighbourhoods, which is > the appropriate ITK structure, then avoid visiting all voxels with the > neighbourhood iterator. Use a standard single voxel iterator to find the > skeleton voxels, then move the neighbourhood iterator to that location." > this is fast until I use the SetRadius method of the neighborhood > iterator... it goes up form about 2 seconds to 1 minute. > for(iterator.GoToBegin(); !iterator.IsAtEnd(); iterator++) > { > if(iterator.Get() > 0) > { > neighborhoodIterator.SetLocation(iterator.GetIndex()); > radius.Fill( (int) iterator.Get()); > neighborhoodIterator.SetRadius(radius); > } > } > > Than I implemented what I want to do by direct accessing the image array: > float * imgArray = distanceRidge->GetBufferPointer(); > > and for every ridge point (value > 0) in the image I go through the > desired region with 3 for loops: > > for (int i1 = iStart; i1 <= iStop; i1++) > { > r1SquaredK = (i1 - i) * (i1 - i); > for (int j1 = jStart; j1 <= jStop; j1++) > { > r1SquaredJK = r1SquaredK + (j1 - j) * (j1 - j); > if(r1SquaredJK <= rSquared) > { > for (int k1 = kStart; k1 <= kStop; k1++) > { > r1Squared = r1SquaredJK + (k1 - k) * (k1 - k); > if (r1Squared <= rSquared) > { > s1 = imgArray[i1 + imageSize[0] * (j1 + > imageSize[1] * k1)]; > if(rSquared > s1) > { > imgArray[i1 + imageSize[0] * (j1 + > imageSize[1] * k1)] = rSquared; > } > } > } > } > } > } > > and this works fine! and it is really fast! with this approach I am > getting there where I want to be. > I am doing the same with the neighborhood iterator, or I also tried out > doing it with a image region iterator and instead of going through the > desired region with 3 for loops I always set the region of the iterator > (see my first email). > So what I am asking myself is now, if it is so much faster using directly > the flat array where the image data is saved... is it also a proper way to > do it like this? and is there a different way of implementing this, which > is as fast as with flat array but using iterators from ITK or other > functions/options from ITK? > > *Gesendet:* Freitag, 27. M?rz 2015 um 00:47 Uhr > *Von:* "Richard Beare" > *An:* Richard.Beare at ieee.org > *Cc:* "Johannes Weber" , "Insight Users" < > insight-users at itk.org> > *Betreff:* Re: [ITK-users] setting big spherical neighborhoods to center > voxel value > Here's another option - I haven't thought it through completely so > could be far from the mark, but I think it is close. > > consider the following: > > A - input mask > B - distance transform of mask (positive values inside the mask) > C - ridge lines in B (sort of skeleton) > > You are aiming to create an image of spheres, centres on voxels in C, with > size set by the "brightness" at centre location in C. > > Suppose you can create the spatially variant dilation by a sphere using > the parabolic tools I mentioned in the previous message - that gives you > another mask: > > D - spatially variant dilation of C > > Now invert C and take the distance transform to give E. > take a distance transform of D and add to E, then mask by D. The idea here > is that if you add two distance transforms together you end up with a flat > surface, at least in the case where the second DT is computed from peaks in > the first. > > The result should be a sort of tube, of varying thickness, where the voxel > value corresponds to the tube thickness (possibly with a uniform offset). > Note that I don't think you will see sphere corresponding to the brightest > skeleton points using this approach, but the result may be useful for your > application. > > > Also, a couple of notes regarding the direct approach. > > If you use neighbourhoods, which is the appropriate ITK structure, then > avoid visiting all voxels with the neighbourhood iterator. Use a standard > single voxel iterator to find the skeleton voxels, then move the > neighbourhood iterator to that location. > > > There are also some optimizations you can use if you do some checks of > the change in sphere size between neighbours. If the spheres were all > identically sized then it is feasible to construct lists of voxels that are > not in common between neighbouring spheres, and just visit those, which is > a big saving. Much trickier when the sizes aren't the same, but I'd guess > that for a given skeleton there'd be a relatively small number of > combinations of neighbouring sizes. > > > > On Fri, Mar 27, 2015 at 8:02 AM, Richard Beare > wrote: >> >> This isn't a complete solution, but might give you some ideas. >> >> The part about using the skeleton points, which are distance transform >> voxels, as the source for the radius, can be implemented using spatially >> variant morphology. I have a short publication about doing this efficiently >> with parabolic functions. However this doesn't propagate the voxel value, >> only producing a mask. I have thought about combining with label dilation, >> to propagate a label value, but haven't done it yet. >> >> A queue based approach to something similar is discussed in: >> "Labelled reconstruction of binary objects: a vector propagation >> algorithm", buckley and lagerstrom >> >> On Thu, Mar 26, 2015 at 11:36 PM, Bradley Lowekamp < >> blowekamp at mail.nih.gov> wrote: >>> >>> Hello, >>> >>> If you have a 3D image and you are visiting a neighborhood of size 20^3, >>> you are doing 8000 visits per pixel there is no way to make this efficient. >>> You have a big O algorithm problem. >>> >>> The Neighborhood iterator would be a the more ITK way of doing what you >>> are trying to do [1] [2]. But that's is not the order of efficiency >>> improvement you need. >>> >>> You need to revise your algorithm so you only visit each pixel once. >>> Perhaps with region growing and queues, or auxiliary images to keep track >>> of the current distance or other data. >>> >>> Hope that helps, >>> Brad >>> >>> [1] >>> http://www.itk.org/Doxygen/html/classitk_1_1NeighborhoodIterator.html >>> [2] http://itk.org/Wiki/ITK/Examples/Iterators/NeighborhoodIterator >>> >>> On Mar 26, 2015, at 5:24 AM, JohannesWeber at gmx.at wrote: >>> >>> >>> Hello everyone, >>> >>> I have the following problem: after calculating the distance map (e.g. >>> with DanielssonDistanceMapImageFilter) I am getting rid of most of the >>> voxels (= setting 0) after calculating a so called distance ridge (kind of >>> a skeleton). Now I want for every voxel of this distance ridge that it is a >>> center voxel for a spherical neighborhood with the radius equal to the >>> distance value of the voxel, and all voxels included in this sphere are set >>> to the distance value of the voxel of the distance ridge (the center voxel >>> of the sphere). So that means the neighborhoods can become big, e.g. radius >>> of 10, or 20 voxels. The problem is here the performance... I implemented >>> it somehow, but the performance nowhere near it should be. >>> e.g. going through the image with a neighborhood iterator and vor every >>> voxel bigger than 0 creating a neighborhood with the radius with the >>> distance value of this voxel that seems to take very long alone to create >>> and indexing the neighborhood. >>> another approach I tried is to extract all the voxels of the distance >>> ridge, iterate through them and calculate for every ridge voxel the region >>> and iterate through the region doing proper calculations: >>> >>> for (int rp = 0; rp < nRidgePoints; rp++) >>> { >>> ImageType::IndexType s1Index; >>> const int i = ridgePointsIndex[0][rp]; >>> const int j = ridgePointsIndex[1][rp]; >>> const int k = ridgePointsIndex[2][rp]; >>> const float r = ridgePointsValues[rp]; >>> >>> rSquared = (int) ((r * r) + 0.5f); >>> rInt = (int) r; >>> if(rInt < r) rInt++; >>> iStart = i - rInt; >>> if(iStart < 0) iStart = 0; >>> iStop = i + rInt; >>> if(iStop >= imageSize[0]) iStop = imageSize[0] - 1; >>> jStart = j - rInt; >>> if(jStart < 0) jStart = 0; >>> jStop = j + rInt; >>> if(jStop >= imageSize[1]) jStop = imageSize[1] - 1; >>> kStart = k - rInt; >>> if(kStart < 0) kStart = 0; >>> kStop = k + rInt; >>> if(kStop >= imageSize[2]) kStop = imageSize[2] - 1; >>> ImageType::IndexType index; >>> ImageType::SizeType size; >>> index[0] = iStart; >>> index[1] = jStart; >>> index[2] = kStart; >>> size[0] = iStop - iStart + 1; >>> size[1] = jStop - jStart + 1; >>> size[2] = kStop - kStart + 1; >>> ImageType::RegionType region; >>> region.SetIndex(index); >>> region.SetSize(size); >>> ImageRegionIteratorWithIndexType iteratorWithIndex >>> (distanceRidge, region); >>> >>> for (iteratorWithIndex.GoToBegin(); >>> !iteratorWithIndex.IsAtEnd(); iteratorWithIndex++) >>> { >>> s1Index = iteratorWithIndex.GetIndex(); >>> r1SquaredK = (s1Index[0] - i) * (s1Index[0] - i); >>> r1SquaredJK = r1SquaredK + (s1Index[1] - j) * (s1Index[1] - >>> j); >>> if(r1SquaredJK <= rSquared) >>> { >>> r1Squared = r1SquaredJK + (s1Index[2] - k) * (s1Index[2] >>> - k); >>> if (r1Squared <= rSquared) >>> { >>> s1 = iteratorWithIndex.Get(); >>> if (rSquared > s1) >>> { >>> iteratorWithIndex.Set(rSquared); >>> >>> } >>> } >>> } >>> } >>> >>> } >>> >>> so every approach I tried until now is very slow comparing to other >>> implementations of the algorithm I want to do... would maybe spatial >>> objects help me somehow? But I do not really understand how they work... >>> thanks for your help! >>> >>> greetings, >>> Johannes >>> _____________________________________ >>> 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://www.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-users >>> >>> >>> _____________________________________ >>> 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://www.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-users >>> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From grothausmann.roman at mh-hannover.de Mon Mar 30 05:25:25 2015 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Mon, 30 Mar 2015 11:25:25 +0200 Subject: [ITK] [ITK-users] automated splitting and pasting of volumes for use in external programs In-Reply-To: References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> Message-ID: <55191685.9020706@mh-hannover.de> Dear mailing list members, A dataset I work on is too big to load completely into itksnap for manual adjustment of the automatic pre-segementation with watersheds. The full resolution is needed, so I cannot work with a re-sampled version. The only possible easy solution I see at the moment is to split up the 3D image into smaller blocks of sizes as equal as possible, do the itsnap interaction, and finally paste all blocks of the resulting segmentation back together. Would itkImageRegionSplitterMultidimensional be the right filter for the splitting of blocks as equal in size as possible? Is there a "logger" like e.g. itkXMLFileOutputWindow (as used in itkStreamingImageFilterTest2.cxx) that could be used to store the regions corresponding to each block-file to use that for itkPasteImageFilter to combine these blocks later again? Not needed now, but perhaps lager: Is there some nice way to handle overlaps in this case that is already implemented in itk, something like itkImageRegionSplitterMultidimensional::SetOverlap()? Many thanks for any help or hints. Roman On 17/03/15 18:13, Pol Mons? Purt? wrote: > I guess the way to go would be to take the splitter (probably > ImageRegionSplitterMultidimensional now that I look at it) and extend it to > support overlap. If I do it, I'll let you know in case it is of interest to > anyone. For now I'll stick to my class. -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 _____________________________________ 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://www.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-users From lluna.nova at gmail.com Mon Mar 30 05:50:39 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Mon, 30 Mar 2015 11:50:39 +0200 Subject: [ITK] [ITK-users] registering ROI Message-ID: Hello all, tl; dr How can I reset the index of two labelObjects' bounding box generated from a ROIExtractor output to the original image's LargestPossibleRegion() coordinate system? -- I need to apply a series of (non-itk) operations on a ShapeLabelObject present in a small ROI of the image with the purpose of dividing it in two. I was using ROI filter because among other things I want the Indexes to be referred to the ROI so it is less complex to refer to the voxels' coordinates. But afterwards I need the original Index so that the GetBoundingBox() of the two generated label objects returns a region that refers to the original image repectively, while maintaining the size (probably index offset shift) of the new labelobject. I could do as for now and store the roi and then do something like (roi.getIndex() + obj->GetBoudingBox().GetIndex() ) to create a shifted bounding box, but maybe there is a better way to do it, as read in the documentation: The origin coordinates of the output images will be computed in such a way that if mapped to physical space, the output image will overlay the input image with perfect registration. In other words, a registration process between the output image and the input image will return an identity transform. So how could I remap to the original "physical space"? I don't know to what does that phrase refer to, but it sounds like it's exactly what I am trying to do. I've looked into SetRequestedRegion also as an alternative, but that would not give me indexes relative to roi, so I would have to substract them right before the operations, which might be an option too, but I believe things get complicated if I do that. Cheers, Pol -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From Ivan.Kubarev at materialise.kiev.ua Mon Mar 30 05:58:45 2015 From: Ivan.Kubarev at materialise.kiev.ua (Ivan Kubarev) Date: Mon, 30 Mar 2015 09:58:45 +0000 Subject: [ITK] ImageIO::CanReadFile() fix Message-ID: Hi guys! Recently I found a bug into ImageIO::CanReadFile() method for several ImageIOs (BMP, JPEG, NRRD). These methods check not only the header of the image for conformance to the corresponding standard but also the file extension. So it's impossible to check files without extension, despite it's often being the case. So I made a patch. I would very glad if you find a time to review it and merge to the ITK main branch, if it looks reasonable not only for me :) Best regards, Ivan Kubarev -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patch.txt URL: From blowekamp at mail.nih.gov Mon Mar 30 07:15:19 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 30 Mar 2015 07:15:19 -0400 Subject: [ITK] [ITK-users] registering ROI In-Reply-To: References: Message-ID: Hello, Since you have done the ROI extraction with ITK, then the physical location of each pixel has been maintained. Use the ROI Image's TransformIndexToPhysicalPoint method[1], then use your original image's TransformPhysicalPointToIndex method[2]. This would be the most generalized and robust method which the documentation refers too. You could use it to validate your optimized approach. Yes, alternatively you can use the RegionOfInterestImageFilter ( I believe ) to extract a region which has a non-zero starting index, and is the same indexing and the input image. Alternatively you can use the pipeline and rely on the streaming to produce the regions, but then you have to deal with the fact that the buffered region is different than the largest possible region. There are many possibilities on what to do here. Hope that helps, Brad [1] http://www.itk.org/Doxygen/html/classitk_1_1ImageBase.html#ab003313ba1a078d89a832dc0a35d2efa [2] http://www.itk.org/Doxygen/html/classitk_1_1ImageBase.html#af4a7c9c3787e9fdafbaaade2e02efa25 On Mar 30, 2015, at 5:50 AM, Pol Mons? Purt? wrote: > Hello all, > > tl; dr > > How can I reset the index of two labelObjects' bounding box generated from a ROIExtractor output to the original image's LargestPossibleRegion() coordinate system? > > -- > > I need to apply a series of (non-itk) operations on a ShapeLabelObject present in a small ROI of the image with the purpose of dividing it in two. I was using ROI filter because among other things I want the Indexes to be referred to the ROI so it is less complex to refer to the voxels' coordinates. > > But afterwards I need the original Index so that the GetBoundingBox() of the two generated label objects returns a region that refers to the original image repectively, while maintaining the size (probably index offset shift) of the new labelobject. > > I could do as for now and store the roi and then do something like (roi.getIndex() + obj->GetBoudingBox().GetIndex() ) to create a shifted bounding box, but maybe there is a better way to do it, as read in the documentation: > > The origin coordinates of the output images will be computed in such a way that if mapped to physical space, the output image will overlay the input image with perfect registration. In other words, a registration process between the output image and the input image will return an identity transform. > > So how could I remap to the original "physical space"? I don't know to what does that phrase refer to, but it sounds like it's exactly what I am trying to do. > > I've looked into SetRequestedRegion also as an alternative, but that would not give me indexes relative to roi, so I would have to substract them right before the operations, which might be an option too, but I believe things get complicated if I do that. > > Cheers, > > Pol > > > > > _____________________________________ > 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://www.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-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Mon Mar 30 09:06:55 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 30 Mar 2015 09:06:55 -0400 Subject: [ITK] [ITK-users] setting big spherical neighborhoods to center voxel value In-Reply-To: References: <6E34D00A-F187-4E5E-A2E4-6F490D8CE87C@mail.nih.gov> Message-ID: <4F13082D-A19A-4BF2-B720-9418E39C2510@mail.nih.gov> Hello, Yes please check the obvious things first. Recently I had similar requirements for an algorithm; I needed to iterate over a sparse set of neighborhoods. I ended up creating ImageScanlineImageIterators for each neighborhood. You may want to try the approach here [1] ( apologize of not having more comments there). If it works for you, I'd be quite interested if the performance comparison. HTH, Brad [1] https://github.com/blowekamp/itkSuperPixel/blob/d63741c87067376f0a1e5651a7f96964974c724b/include/itkSLICImageFilter.hxx#L238-L277 On Mar 30, 2015, at 4:52 AM, Richard Beare wrote: > I guess the obvious common traps need to be checked - confirm you are in Release mode. Things like neighbourhood iterators can be very expensive in debug mode. Also, the neighbourhood iterator will be doing some sort of edge of image safety check, which your other code may not be doing (I haven't checked). The neighbourhood iterator isn't, I guess, really designed to be resized every time it is used. Normally you set it up once and apply it lots of times. I've no clue as to how expensive the initialisation is, but it may pay to keep a structure containing iterators that you've already allocated so that you can pick the right one and move it. > > It may turn out that the design is really bad for your problem, with performance being destroyed by the creation phase, that isn't an issue in the normal use case. Continuing to use it will give you edge safety and dimension independence, but I guess you'll need to address the issue of initialization by being clever about the reuse of iterators. > > One way to do that would be to use a pass to record the location and value of all of the skeleton points, sort them by brightness, then visit in order so that neighbourhoods can be reused without resizing. This assumes, of course that the skeletons contain much fewer voxels than the image. > > > On Mon, Mar 30, 2015 at 6:51 PM, Johannes Weber wrote: > thank you for your answers! > > I tried out following idea of yours: "If you use neighbourhoods, which is the appropriate ITK structure, then avoid visiting all voxels with the neighbourhood iterator. Use a standard single voxel iterator to find the skeleton voxels, then move the neighbourhood iterator to that location." > this is fast until I use the SetRadius method of the neighborhood iterator... it goes up form about 2 seconds to 1 minute. > for(iterator.GoToBegin(); !iterator.IsAtEnd(); iterator++) > { > if(iterator.Get() > 0) > { > neighborhoodIterator.SetLocation(iterator.GetIndex()); > radius.Fill( (int) iterator.Get()); > neighborhoodIterator.SetRadius(radius); > } > } > > Than I implemented what I want to do by direct accessing the image array: > float * imgArray = distanceRidge->GetBufferPointer(); > > and for every ridge point (value > 0) in the image I go through the desired region with 3 for loops: > > for (int i1 = iStart; i1 <= iStop; i1++) > { > r1SquaredK = (i1 - i) * (i1 - i); > for (int j1 = jStart; j1 <= jStop; j1++) > { > r1SquaredJK = r1SquaredK + (j1 - j) * (j1 - j); > if(r1SquaredJK <= rSquared) > { > for (int k1 = kStart; k1 <= kStop; k1++) > { > r1Squared = r1SquaredJK + (k1 - k) * (k1 - k); > if (r1Squared <= rSquared) > { > s1 = imgArray[i1 + imageSize[0] * (j1 + imageSize[1] * k1)]; > if(rSquared > s1) > { > imgArray[i1 + imageSize[0] * (j1 + imageSize[1] * k1)] = rSquared; > } > } > } > } > } > } > > and this works fine! and it is really fast! with this approach I am getting there where I want to be. > I am doing the same with the neighborhood iterator, or I also tried out doing it with a image region iterator and instead of going through the desired region with 3 for loops I always set the region of the iterator (see my first email). > So what I am asking myself is now, if it is so much faster using directly the flat array where the image data is saved... is it also a proper way to do it like this? and is there a different way of implementing this, which is as fast as with flat array but using iterators from ITK or other functions/options from ITK? > > Gesendet: Freitag, 27. M?rz 2015 um 00:47 Uhr > Von: "Richard Beare" > An: Richard.Beare at ieee.org > Cc: "Johannes Weber" , "Insight Users" > Betreff: Re: [ITK-users] setting big spherical neighborhoods to center voxel value > Here's another option - I haven't thought it through completely so could be far from the mark, but I think it is close. > > consider the following: > > A - input mask > B - distance transform of mask (positive values inside the mask) > C - ridge lines in B (sort of skeleton) > > You are aiming to create an image of spheres, centres on voxels in C, with size set by the "brightness" at centre location in C. > > Suppose you can create the spatially variant dilation by a sphere using the parabolic tools I mentioned in the previous message - that gives you another mask: > > D - spatially variant dilation of C > > Now invert C and take the distance transform to give E. > take a distance transform of D and add to E, then mask by D. The idea here is that if you add two distance transforms together you end up with a flat surface, at least in the case where the second DT is computed from peaks in the first. > > The result should be a sort of tube, of varying thickness, where the voxel value corresponds to the tube thickness (possibly with a uniform offset). Note that I don't think you will see sphere corresponding to the brightest skeleton points using this approach, but the result may be useful for your application. > > > Also, a couple of notes regarding the direct approach. > > If you use neighbourhoods, which is the appropriate ITK structure, then avoid visiting all voxels with the neighbourhood iterator. Use a standard single voxel iterator to find the skeleton voxels, then move the neighbourhood iterator to that location. > > > There are also some optimizations you can use if you do some checks of the change in sphere size between neighbours. If the spheres were all identically sized then it is feasible to construct lists of voxels that are not in common between neighbouring spheres, and just visit those, which is a big saving. Much trickier when the sizes aren't the same, but I'd guess that for a given skeleton there'd be a relatively small number of combinations of neighbouring sizes. > > > > On Fri, Mar 27, 2015 at 8:02 AM, Richard Beare wrote: > This isn't a complete solution, but might give you some ideas. > > The part about using the skeleton points, which are distance transform voxels, as the source for the radius, can be implemented using spatially variant morphology. I have a short publication about doing this efficiently with parabolic functions. However this doesn't propagate the voxel value, only producing a mask. I have thought about combining with label dilation, to propagate a label value, but haven't done it yet. > > A queue based approach to something similar is discussed in: > "Labelled reconstruction of binary objects: a vector propagation algorithm", buckley and lagerstrom > > On Thu, Mar 26, 2015 at 11:36 PM, Bradley Lowekamp wrote: > Hello, > > If you have a 3D image and you are visiting a neighborhood of size 20^3, you are doing 8000 visits per pixel there is no way to make this efficient. You have a big O algorithm problem. > > The Neighborhood iterator would be a the more ITK way of doing what you are trying to do [1] [2]. But that's is not the order of efficiency improvement you need. > > You need to revise your algorithm so you only visit each pixel once. Perhaps with region growing and queues, or auxiliary images to keep track of the current distance or other data. > > Hope that helps, > Brad > > [1] http://www.itk.org/Doxygen/html/classitk_1_1NeighborhoodIterator.html > [2] http://itk.org/Wiki/ITK/Examples/Iterators/NeighborhoodIterator > > On Mar 26, 2015, at 5:24 AM, JohannesWeber at gmx.at wrote: > > Hello everyone, > > I have the following problem: after calculating the distance map (e.g. with DanielssonDistanceMapImageFilter) I am getting rid of most of the voxels (= setting 0) after calculating a so called distance ridge (kind of a skeleton). Now I want for every voxel of this distance ridge that it is a center voxel for a spherical neighborhood with the radius equal to the distance value of the voxel, and all voxels included in this sphere are set to the distance value of the voxel of the distance ridge (the center voxel of the sphere). So that means the neighborhoods can become big, e.g. radius of 10, or 20 voxels. The problem is here the performance... I implemented it somehow, but the performance nowhere near it should be. > e.g. going through the image with a neighborhood iterator and vor every voxel bigger than 0 creating a neighborhood with the radius with the distance value of this voxel that seems to take very long alone to create and indexing the neighborhood. > another approach I tried is to extract all the voxels of the distance ridge, iterate through them and calculate for every ridge voxel the region and iterate through the region doing proper calculations: > > for (int rp = 0; rp < nRidgePoints; rp++) > { > ImageType::IndexType s1Index; > const int i = ridgePointsIndex[0][rp]; > const int j = ridgePointsIndex[1][rp]; > const int k = ridgePointsIndex[2][rp]; > const float r = ridgePointsValues[rp]; > > rSquared = (int) ((r * r) + 0.5f); > rInt = (int) r; > if(rInt < r) rInt++; > iStart = i - rInt; > if(iStart < 0) iStart = 0; > iStop = i + rInt; > if(iStop >= imageSize[0]) iStop = imageSize[0] - 1; > jStart = j - rInt; > if(jStart < 0) jStart = 0; > jStop = j + rInt; > if(jStop >= imageSize[1]) jStop = imageSize[1] - 1; > kStart = k - rInt; > if(kStart < 0) kStart = 0; > kStop = k + rInt; > if(kStop >= imageSize[2]) kStop = imageSize[2] - 1; > ImageType::IndexType index; > ImageType::SizeType size; > index[0] = iStart; > index[1] = jStart; > index[2] = kStart; > size[0] = iStop - iStart + 1; > size[1] = jStop - jStart + 1; > size[2] = kStop - kStart + 1; > ImageType::RegionType region; > region.SetIndex(index); > region.SetSize(size); > ImageRegionIteratorWithIndexType iteratorWithIndex (distanceRidge, region); > > for (iteratorWithIndex.GoToBegin(); !iteratorWithIndex.IsAtEnd(); iteratorWithIndex++) > { > s1Index = iteratorWithIndex.GetIndex(); > r1SquaredK = (s1Index[0] - i) * (s1Index[0] - i); > r1SquaredJK = r1SquaredK + (s1Index[1] - j) * (s1Index[1] - j); > if(r1SquaredJK <= rSquared) > { > r1Squared = r1SquaredJK + (s1Index[2] - k) * (s1Index[2] - k); > if (r1Squared <= rSquared) > { > s1 = iteratorWithIndex.Get(); > if (rSquared > s1) > { > iteratorWithIndex.Set(rSquared); > } > } > } > } > > } > > so every approach I tried until now is very slow comparing to other implementations of the algorithm I want to do... would maybe spatial objects help me somehow? But I do not really understand how they work... > thanks for your help! > > greetings, > Johannes > _____________________________________ > 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://www.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-users > > _____________________________________ > 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://www.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-users > > > _____________________________________ > 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://www.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-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From lesolorzanov at gmail.com Mon Mar 30 09:09:56 2015 From: lesolorzanov at gmail.com (Leslie Solorzano) Date: Mon, 30 Mar 2015 15:09:56 +0200 Subject: [ITK] Small gaussian sphere iterator over 3D image Message-ID: I am aware of the existance of ShapedNeighborhoodIterator . But I don't understand how to use it. I have a 3D image and I would like to iterate trought it and calculate a value according to a guassian sphere centered at each voxel. I don't understand if the shaped iterator makes a box with given radii (or offsets), or it makes an ellipse with given offsets. My sphere is very small, a 4 voxel raidus (7 maximum), and I'd like the values farthest from the center weight less in my sum, thus the gaussian. So it is pretty simple, make a shapedneighborhooditerator to be a sphere, iterate and keep each value as the weighted sum of the values in its neighbors in a 3D image, can some point me in the right direction? Thankyou -------------- next part -------------- An HTML attachment was scrubbed... URL: From lesolorzanov at gmail.com Mon Mar 30 09:15:38 2015 From: lesolorzanov at gmail.com (Leslie Solorzano) Date: Mon, 30 Mar 2015 15:15:38 +0200 Subject: [ITK] [ITK-users] Small gaussian sphere iterator over 3D image Message-ID: I am aware of the existance of ShapedNeighborhoodIterator. But I don't understand how to use it. I have a 3D image and I would like to iterate trought it and calculate a value according to a guassian sphere centered at each voxel. I don't understand if the shaped iterator makes a box with given radii (or offsets), or it makes an ellipse with given offsets. My sphere is very small, a 4 voxel raidus (7 maximum), and I'd like the values farthest from the center weight less in my sum, thus the gaussian. So it is pretty simple, make a shapedneighborhooditerator to be a sphere, iterate and keep each value as the weighted sum of the values in its neighbors in a 3D image, can some point me in the right direction? Thankyou -------------- next part -------------- An HTML attachment was scrubbed... URL: From lluna.nova at gmail.com Mon Mar 30 09:53:20 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Mon, 30 Mar 2015 15:53:20 +0200 Subject: [ITK] [ITK-users] registering ROI In-Reply-To: References: Message-ID: Hello Bradley, Great, I'll try out the first approach you suggested. Alternativelly, if I still have the RegionType roi at hand, how could I use it to my advantatge using setRegions of the output image? Something that does the reverse of RegionOfInterestImageFilter. And what about the approach of changing the BoundingBox's index of the labelObject? -- On a side note, I am confused by your second paragraph, in my case: Since you have done the ROI extraction with ITK and > you can use the RegionOfInterestImageFilter > are the same thing. I indeed used the filter to extract the ROI, the indices are re-computed so they start to [0,0,0], not with the same indexing as the first image as you said (and that's what I want, so all good here ;)). Maybe you were referring to the physical point? Cheers, Pol 2015-03-30 13:15 GMT+02:00 Bradley Lowekamp : > Hello, > > Since you have done the ROI extraction with ITK, then the physical > location of each pixel has been maintained. Use the ROI Image's > TransformIndexToPhysicalPoint method[1], then use your original image's > TransformPhysicalPointToIndex method[2]. This would be the most generalized > and robust method which the documentation refers too. You could use it to > validate your optimized approach. > > Yes, alternatively you can use the RegionOfInterestImageFilter ( I believe > ) to extract a region which has a non-zero starting index, and is the same > indexing and the input image. Alternatively you can use the pipeline and > rely on the streaming to produce the regions, but then you have to deal > with the fact that the buffered region is different than the largest > possible region. There are many possibilities on what to do here. > > Hope that helps, > Brad > > [1] > http://www.itk.org/Doxygen/html/classitk_1_1ImageBase.html#ab003313ba1a078d89a832dc0a35d2efa > [2] > http://www.itk.org/Doxygen/html/classitk_1_1ImageBase.html#af4a7c9c3787e9fdafbaaade2e02efa25 > > On Mar 30, 2015, at 5:50 AM, Pol Mons? Purt? wrote: > > > Hello all, > > > > tl; dr > > > > How can I reset the index of two labelObjects' bounding box generated > from a ROIExtractor output to the original image's LargestPossibleRegion() > coordinate system? > > > > -- > > > > I need to apply a series of (non-itk) operations on a ShapeLabelObject > present in a small ROI of the image with the purpose of dividing it in two. > I was using ROI filter because among other things I want the Indexes to be > referred to the ROI so it is less complex to refer to the voxels' > coordinates. > > > > But afterwards I need the original Index so that the GetBoundingBox() of > the two generated label objects returns a region that refers to the > original image repectively, while maintaining the size (probably index > offset shift) of the new labelobject. > > > > I could do as for now and store the roi and then do something like > (roi.getIndex() + obj->GetBoudingBox().GetIndex() ) to create a shifted > bounding box, but maybe there is a better way to do it, as read in the > documentation: > > > > The origin coordinates of the output images will be computed in such a > way that if mapped to physical space, the output image will overlay the > input image with perfect registration. In other words, a registration > process between the output image and the input image will return an > identity transform. > > > > So how could I remap to the original "physical space"? I don't know to > what does that phrase refer to, but it sounds like it's exactly what I am > trying to do. > > > > I've looked into SetRequestedRegion also as an alternative, but that > would not give me indexes relative to roi, so I would have to substract > them right before the operations, which might be an option too, but I > believe things get complicated if I do that. > > > > Cheers, > > > > Pol > > > > > > > > > > _____________________________________ > > 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://www.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-users > > _______________________________________________ > > Community mailing list > > Community at itk.org > > http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Mon Mar 30 09:58:25 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 30 Mar 2015 09:58:25 -0400 Subject: [ITK] [ITK-users] Small gaussian sphere iterator over 3D image In-Reply-To: References: Message-ID: Hi Leslie, The ShapedNeighborhoodIterator allows activations of a box of voxels within a given radii. For your operation, you may want to investigate the NeighborhoodOperator and related classes [1]. More information on how to use neighborhood classes can be found in the ITK Software Guide (see itk.org for links to both the electronic and hard copy versions). Hope this helps, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1NeighborhoodOperator.html On Mon, Mar 30, 2015 at 9:15 AM, Leslie Solorzano wrote: > I am aware of the existance of ShapedNeighborhoodIterator. But I don't > understand how to use it. > I have a 3D image and I would like to iterate trought it and calculate a > value according to a guassian sphere centered at each voxel. > > I don't understand if the shaped iterator makes a box with given radii (or > offsets), or it makes an ellipse with given offsets. > > My sphere is very small, a 4 voxel raidus (7 maximum), and I'd like the > values farthest from the center weight less in my sum, thus the gaussian. > > So it is pretty simple, make a shapedneighborhooditerator to be a sphere, > iterate and keep each value as the weighted sum of the values in its > neighbors in a 3D image, can some point me in the right direction? > > Thankyou > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From matt.mccormick at kitware.com Mon Mar 30 10:02:27 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 30 Mar 2015 10:02:27 -0400 Subject: [ITK] [ITK-users] automated splitting and pasting of volumes for use in external programs In-Reply-To: <55191685.9020706@mh-hannover.de> References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> <55191685.9020706@mh-hannover.de> Message-ID: Hi Roman, You probably want to use the streaming capabilities of the ITK pipeline. This is covered in more detailed in the ITK Software Guide. The pipeline internally uses ImageRegionSplitter classes. Overlaps are handled by propagation of the RequestedRegion throughout the pipeline. To monitor the changes in the regions, use the PipelineMonitorImageFilter [1]. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1PipelineMonitorImageFilter.html On Mon, Mar 30, 2015 at 5:25 AM, Dr. Roman Grothausmann wrote: > Dear mailing list members, > > > A dataset I work on is too big to load completely into itksnap for manual > adjustment of the automatic pre-segementation with watersheds. The full > resolution is needed, so I cannot work with a re-sampled version. The only > possible easy solution I see at the moment is to split up the 3D image into > smaller blocks of sizes as equal as possible, do the itsnap interaction, and > finally paste all blocks of the resulting segmentation back together. > Would itkImageRegionSplitterMultidimensional be the right filter for the > splitting of blocks as equal in size as possible? > Is there a "logger" like e.g. itkXMLFileOutputWindow (as used in > itkStreamingImageFilterTest2.cxx) that could be used to store the regions > corresponding to each block-file to use that for itkPasteImageFilter to > combine these blocks later again? > Not needed now, but perhaps lager: Is there some nice way to handle overlaps > in this case that is already implemented in itk, something like > itkImageRegionSplitterMultidimensional::SetOverlap()? > > Many thanks for any help or hints. > Roman > > On 17/03/15 18:13, Pol Mons? Purt? wrote: >> >> I guess the way to go would be to take the splitter (probably >> ImageRegionSplitterMultidimensional now that I look at it) and extend it >> to >> support overlap. If I do it, I'll let you know in case it is of interest >> to >> anyone. For now I'll stick to my class. > > > > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-9574 > _____________________________________ > 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://www.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-users _____________________________________ 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://www.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-users From matt.mccormick at kitware.com Mon Mar 30 10:06:22 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 30 Mar 2015 10:06:22 -0400 Subject: [ITK] ImageIO::CanReadFile() fix In-Reply-To: References: Message-ID: Hi Ivan, Thanks for contributing this improvement! Please submit your patch through the code review process [1]. You will want to also add new tests for the new functionality. In this case, take some of the existing BMP files, etc., and rename them without their extension. Also, add tests that properly reject files without extensions that are not readable. Please let us know if you have any questions. Thanks, Matt [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html On Mon, Mar 30, 2015 at 5:58 AM, Ivan Kubarev wrote: > Hi guys! > > > > Recently I found a bug into ImageIO::CanReadFile() method for several > ImageIOs (BMP, JPEG, NRRD). These methods check not only the header of the > image for conformance to the corresponding standard but also the file > extension. So it?s impossible to check files without extension, despite it?s > often being the case. So I made a patch. I would very glad if you find a > time to review it and merge to the ITK main branch, if it looks reasonable > not only for me J > > > > Best regards, > > Ivan Kubarev > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From matt.mccormick at kitware.com Mon Mar 30 10:49:03 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 30 Mar 2015 10:49:03 -0400 Subject: [ITK] Updates to Gerrit Robot Builds Message-ID: Hi folks, Along with our recent Gerrit upgrade, we have also re-worked and greatly improved the robot builds for proposed patches. The new system uses the Gerrit Trigger plugin for Jenkins. Two Jenkins instances currently will create robot builds, one on the Azure cloud for Linux and Windows builds [1] and one at Kitware for MacOSX builds. Improvements include: - More builds executors with a more reliable uptime. The Azure builds will now spin up and spin down on demand, and they stay up more reliably. We now have two full-time MacOSX build executors. - MacOSX builds are now running the latest version of XCode and generating fully green build results. - Remote Module submissions will have their module enabled during submission. - Builds report when they are finished and add a +1 or -1 Verified status automatically. It is much more useful to know when the builds finish as opposed to when the builds start. The notification makes is easier to know at a glance whether a patch builds cleanly. Links are included to filtered CDash build results. Links are also included to the Jenkins jobs on Azure, which has a useful link to the full console output. - New and more extensive build controls. The following comments will initiate builds: request build: all request build: windows request build: osx request build: linux request build: python The 'request build: all' comment will generate Windows, MacOSX, and Linux builds. The 'request build: python' comment will initiate builds with Python wrapping. These commands have been added and will be updated on the Git development wiki page [2] Happy testing :-), Matt [1] http://itkjenkins.cloudapp.net [2] http://www.itk.org/Wiki/ITK/Git/Develop From majcjc at gmail.com Mon Mar 30 12:24:48 2015 From: majcjc at gmail.com (Lin M) Date: Mon, 30 Mar 2015 12:24:48 -0400 Subject: [ITK] [ITK-users] What's the difference between itkFastMarchingImageFilterBase and itkFastMarchingImageFilter? Message-ID: Hi all, I'm wondering what's the difference between itkFastMarchingImageFilterBase and itkFastMarchingImageFilter. I'm currently using itkFastMarchingImageFilterBase on a 3D image (512*512*365) whose computational time is much slower than I expected (about 250secs). I'm trying to find a way to improve that but I really don't have a clue now. Can you give me some suggestions about that? Thank you very much! Best, Lin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Mon Mar 30 13:15:31 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 30 Mar 2015 13:15:31 -0400 Subject: [ITK] [ITK-users] What's the difference between itkFastMarchingImageFilterBase and itkFastMarchingImageFilter? In-Reply-To: References: Message-ID: <5377FDCD-B8C2-475A-9E6E-80FAC10A05FF@mail.nih.gov> Hello, The itkFastMarchingImageFilterBase, is new and more generalized with a support for generalized stopping criteria and a base infrastructure that can run on quad-edge meshes. The plain itkFastMarchingImageFilter is a bit faster but missing some features and flexibility. HTH, Brad On Mar 30, 2015, at 12:24 PM, Lin M wrote: > Hi all, > > I'm wondering what's the difference between itkFastMarchingImageFilterBase and itkFastMarchingImageFilter. > > I'm currently using itkFastMarchingImageFilterBase on a 3D image (512*512*365) whose computational time is much slower than I expected (about 250secs). I'm trying to find a way to improve that but I really don't have a clue now. Can you give me some suggestions about that? Thank you very much! > > Best, > Lin > _____________________________________ > 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://www.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-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From majcjc at gmail.com Mon Mar 30 13:47:38 2015 From: majcjc at gmail.com (Lin M) Date: Mon, 30 Mar 2015 13:47:38 -0400 Subject: [ITK] [ITK-users] What's the difference between itkFastMarchingImageFilterBase and itkFastMarchingImageFilter? In-Reply-To: <5377FDCD-B8C2-475A-9E6E-80FAC10A05FF@mail.nih.gov> References: <5377FDCD-B8C2-475A-9E6E-80FAC10A05FF@mail.nih.gov> Message-ID: Hi Brad, Thank you for your reply! Do you think it's normal to take about 250 secs on a 512*512*365 image to compute the result? I followed the example from here http://www.itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2FastMarching_2CreateDistanceMapFromSeeds_2Code_8cxx-example.html#_a2 I'm using a i7-860 16G 64bit win8 machine. Best, Lin On Mon, Mar 30, 2015 at 1:15 PM, Bradley Lowekamp wrote: > Hello, > > The itkFastMarchingImageFilterBase, is new and more generalized with a > support for generalized stopping criteria and a base infrastructure that > can run on quad-edge meshes. The plain itkFastMarchingImageFilter is a bit > faster but missing some features and flexibility. > > HTH, > Brad > > > On Mar 30, 2015, at 12:24 PM, Lin M wrote: > > Hi all, > > I'm wondering what's the difference between itkFastMarchingImageFilterBase > and itkFastMarchingImageFilter. > > I'm currently using itkFastMarchingImageFilterBase on a 3D image > (512*512*365) whose computational time is much slower than I expected > (about 250secs). I'm trying to find a way to improve that but I really > don't have a clue now. Can you give me some suggestions about that? Thank > you very much! > > Best, > Lin > _____________________________________ > 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://www.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-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From bill.lorensen at gmail.com Mon Mar 30 13:57:05 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 30 Mar 2015 10:57:05 -0700 Subject: [ITK] [ITK-users] What's the difference between itkFastMarchingImageFilterBase and itkFastMarchingImageFilter? In-Reply-To: References: <5377FDCD-B8C2-475A-9E6E-80FAC10A05FF@mail.nih.gov> Message-ID: Is your windows build a Release build or Debug build? On Mon, Mar 30, 2015 at 10:47 AM, Lin M wrote: > Hi Brad, > > Thank you for your reply! Do you think it's normal to take about 250 secs on > a 512*512*365 image to compute the result? > > I followed the example from here > http://www.itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2FastMarching_2CreateDistanceMapFromSeeds_2Code_8cxx-example.html#_a2 > > I'm using a i7-860 16G 64bit win8 machine. > > Best, > Lin > > On Mon, Mar 30, 2015 at 1:15 PM, Bradley Lowekamp > wrote: >> >> Hello, >> >> The itkFastMarchingImageFilterBase, is new and more generalized with a >> support for generalized stopping criteria and a base infrastructure that can >> run on quad-edge meshes. The plain itkFastMarchingImageFilter is a bit >> faster but missing some features and flexibility. >> >> HTH, >> Brad >> >> >> On Mar 30, 2015, at 12:24 PM, Lin M wrote: >> >> Hi all, >> >> I'm wondering what's the difference between itkFastMarchingImageFilterBase >> and itkFastMarchingImageFilter. >> >> I'm currently using itkFastMarchingImageFilterBase on a 3D image >> (512*512*365) whose computational time is much slower than I expected (about >> 250secs). I'm trying to find a way to improve that but I really don't have a >> clue now. Can you give me some suggestions about that? Thank you very much! >> >> Best, >> Lin >> _____________________________________ >> 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://www.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-users >> >> > > > _____________________________________ > 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://www.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-users > -- Unpaid intern in BillsBasement at noware dot com _____________________________________ 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://www.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-users From bill.lorensen at gmail.com Mon Mar 30 13:59:58 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 30 Mar 2015 10:59:58 -0700 Subject: [ITK] [ITK-users] Small gaussian sphere iterator over 3D image In-Reply-To: References: Message-ID: These examples may help: http://itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIterator http://itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIteratorManual On Mon, Mar 30, 2015 at 6:58 AM, Matt McCormick wrote: > Hi Leslie, > > The ShapedNeighborhoodIterator allows activations of a box of voxels > within a given radii. > > For your operation, you may want to investigate the > NeighborhoodOperator and related classes [1]. > > More information on how to use neighborhood classes can be found in > the ITK Software Guide (see itk.org for links to both the electronic > and hard copy versions). > > Hope this helps, > Matt > > > [1] http://www.itk.org/Doxygen/html/classitk_1_1NeighborhoodOperator.html > > On Mon, Mar 30, 2015 at 9:15 AM, Leslie Solorzano > wrote: >> I am aware of the existance of ShapedNeighborhoodIterator. But I don't >> understand how to use it. >> I have a 3D image and I would like to iterate trought it and calculate a >> value according to a guassian sphere centered at each voxel. >> >> I don't understand if the shaped iterator makes a box with given radii (or >> offsets), or it makes an ellipse with given offsets. >> >> My sphere is very small, a 4 voxel raidus (7 maximum), and I'd like the >> values farthest from the center weight less in my sum, thus the gaussian. >> >> So it is pretty simple, make a shapedneighborhooditerator to be a sphere, >> iterate and keep each value as the weighted sum of the values in its >> neighbors in a 3D image, can some point me in the right direction? >> >> Thankyou >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -- Unpaid intern in BillsBasement at noware dot com From majcjc at gmail.com Mon Mar 30 14:00:49 2015 From: majcjc at gmail.com (Lin M) Date: Mon, 30 Mar 2015 14:00:49 -0400 Subject: [ITK] [ITK-users] What's the difference between itkFastMarchingImageFilterBase and itkFastMarchingImageFilter? In-Reply-To: References: <5377FDCD-B8C2-475A-9E6E-80FAC10A05FF@mail.nih.gov> Message-ID: Hi Bill, It's a Release build. Best, Lin On Mon, Mar 30, 2015 at 1:57 PM, Bill Lorensen wrote: > Is your windows build a Release build or Debug build? > > On Mon, Mar 30, 2015 at 10:47 AM, Lin M wrote: > > Hi Brad, > > > > Thank you for your reply! Do you think it's normal to take about 250 > secs on > > a 512*512*365 image to compute the result? > > > > I followed the example from here > > > http://www.itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2FastMarching_2CreateDistanceMapFromSeeds_2Code_8cxx-example.html#_a2 > > > > I'm using a i7-860 16G 64bit win8 machine. > > > > Best, > > Lin > > > > On Mon, Mar 30, 2015 at 1:15 PM, Bradley Lowekamp < > blowekamp at mail.nih.gov> > > wrote: > >> > >> Hello, > >> > >> The itkFastMarchingImageFilterBase, is new and more generalized with a > >> support for generalized stopping criteria and a base infrastructure > that can > >> run on quad-edge meshes. The plain itkFastMarchingImageFilter is a bit > >> faster but missing some features and flexibility. > >> > >> HTH, > >> Brad > >> > >> > >> On Mar 30, 2015, at 12:24 PM, Lin M wrote: > >> > >> Hi all, > >> > >> I'm wondering what's the difference between > itkFastMarchingImageFilterBase > >> and itkFastMarchingImageFilter. > >> > >> I'm currently using itkFastMarchingImageFilterBase on a 3D image > >> (512*512*365) whose computational time is much slower than I expected > (about > >> 250secs). I'm trying to find a way to improve that but I really don't > have a > >> clue now. Can you give me some suggestions about that? Thank you very > much! > >> > >> Best, > >> Lin > >> _____________________________________ > >> 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://www.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-users > >> > >> > > > > > > _____________________________________ > > 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://www.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-users > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From blowekamp at mail.nih.gov Mon Mar 30 14:32:02 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 30 Mar 2015 14:32:02 -0400 Subject: [ITK] [ITK-users] What's the difference between itkFastMarchingImageFilterBase and itkFastMarchingImageFilter? In-Reply-To: References: <5377FDCD-B8C2-475A-9E6E-80FAC10A05FF@mail.nih.gov> Message-ID: Hello, I just completed a quick performance test in SimpleITK: In [1]: import SimpleITK as sitk In [2]: print sitk.Version() SimpleITK Version: 0.9.0b01 Compiled: Feb 19 2015 00:47:16 In [3]: img = sitk.Image(512,515,365,sitk.sitkFloat32) In [4]: img += 1 In [5]: %timeit -n 1 -r 1 sitk.FastMarchingBase( img, [[10,10,10]]) 1 loops, best of 1: 4min 1s per loop In [6]: %timeit -n 1 -r 1 sitk.FastMarching( img, [[10,10,10]]) 1 loops, best of 1: 5min per loop Your time does strike me as slow but it is on par with what I got on my i7 MacBook Pro. I recall previous experiments yielding the non-Base as the clear winner. This constant image is a convoluted example and may not reflect real world performance. Perhaps you can improve the stopping citera, so as to not compute more that needed. HTH, Brad On Mar 30, 2015, at 2:00 PM, Lin M wrote: > Hi Bill, > > It's a Release build. > > Best, > Lin > > On Mon, Mar 30, 2015 at 1:57 PM, Bill Lorensen wrote: > Is your windows build a Release build or Debug build? > > On Mon, Mar 30, 2015 at 10:47 AM, Lin M wrote: > > Hi Brad, > > > > Thank you for your reply! Do you think it's normal to take about 250 secs on > > a 512*512*365 image to compute the result? > > > > I followed the example from here > > http://www.itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2FastMarching_2CreateDistanceMapFromSeeds_2Code_8cxx-example.html#_a2 > > > > I'm using a i7-860 16G 64bit win8 machine. > > > > Best, > > Lin > > > > On Mon, Mar 30, 2015 at 1:15 PM, Bradley Lowekamp > > wrote: > >> > >> Hello, > >> > >> The itkFastMarchingImageFilterBase, is new and more generalized with a > >> support for generalized stopping criteria and a base infrastructure that can > >> run on quad-edge meshes. The plain itkFastMarchingImageFilter is a bit > >> faster but missing some features and flexibility. > >> > >> HTH, > >> Brad > >> > >> > >> On Mar 30, 2015, at 12:24 PM, Lin M wrote: > >> > >> Hi all, > >> > >> I'm wondering what's the difference between itkFastMarchingImageFilterBase > >> and itkFastMarchingImageFilter. > >> > >> I'm currently using itkFastMarchingImageFilterBase on a 3D image > >> (512*512*365) whose computational time is much slower than I expected (about > >> 250secs). I'm trying to find a way to improve that but I really don't have a > >> clue now. Can you give me some suggestions about that? Thank you very much! > >> > >> Best, > >> Lin > >> _____________________________________ > >> 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://www.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-users > >> > >> > > > > > > _____________________________________ > > 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://www.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-users > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From lluna.nova at gmail.com Mon Mar 30 17:02:38 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Mon, 30 Mar 2015 23:02:38 +0200 Subject: [ITK] [ITK-users] Region of two labelObjects Message-ID: Hello all, I have two label objects, how can I merge the two BoundingBoxes together so I know the necessary size of the image? (other than creating it myself by searching max/min of each dimension) How come LabelMap doesn't resize automatically when objects are added? It could. template< typename TImageType > void labelObjects2Image(ShapeLabelObjectType* labelObject1, ShapeLabelObjectType* labelObject2, typename TImageType::Pointer& labelMapImage){ typedef itk::ShapeLabelObject< typename TImageType::PixelType, TImageType::ImageDimension > ShapeLabelObjectType; typedef itk::LabelMap< ShapeLabelObjectType > LabelMapType; typedef itk::LabelMapToLabelImageFilter< LabelMapType, TImageType > Label2VolumeFilter; *--> region = labelObject1->GetBoundingBox() "+" labelObject2->GetBoundingBox()* auto segLabelMap = LabelMapType::New(); segLabelMap->SetRegions(region); segLabelMap->Allocate(); segLabelMap->AddLabelObject(labelObject1); segLabelMap->AddLabelObject(labelObject2); auto label2volume = Label2VolumeFilter::New(); label2volume->SetInput(segLabelMap); label2volume->Update(); labelMapImage = label2volume->GetOutput(); } Cheers, Pol -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From gabrielgimenez85 at gmail.com Mon Mar 30 20:05:49 2015 From: gabrielgimenez85 at gmail.com (=?UTF-8?Q?Gabriel_A=2E_Gim=C3=A9nez?=) Date: Mon, 30 Mar 2015 20:05:49 -0400 Subject: [ITK] [ITK-users] Resample and Directions in Image Registration In-Reply-To: References: <1427584199821-7587074.post@n2.nabble.com> <1427664358535-7587078.post@n2.nabble.com> Message-ID: Thanks Matt!! ;-) El 29/03/2015 18:07, "Matt McCormick" escribi?: > Hi Gabriel, > > > Hi Matt, thanks for your answer...It is now clear to me ... > > Great! > > > Matt! another question please ... what is the normal runtime of Mattes > > Mutual Information Metric with 3D images? It is normal to be in the > range of > > 2.5 to 4 seconds? I use CT and MR images ... and this is my > configuration: > > > > samplingPercentage = 0.002; > > samplingStrategy = RegistrationType::REGULAR; > > NumberOfHistogramBins = 50 > > I do not know offhand what the expected computation time is, but I > would not be surprised if it was that slow on 3D images. > > Matt > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From audrius at tomographix.com Mon Mar 30 23:29:39 2015 From: audrius at tomographix.com (Audrius Stundzia) Date: Mon, 30 Mar 2015 22:29:39 -0500 Subject: [ITK] ITK: "BUILD_SHARED_LIBS" set? In-Reply-To: References: Message-ID: <1427772579.1109115.247357449.5295E93F@webmail.messagingengine.com> Hello, OS: Windows 8.1 x64 CMake: 3.2.1 ITK: 4.7.1 IDE: MS VS 2010 x64 In either ITK Debug or Release build, I'm puzzled by the following: In CMAKE -> Build -> BUILD_SHARED_LIBS is selected to be "ON" [a check mark in the check box]. CMake Configure and Generate are run. The build directory and it's contents are created. In ../ITK/build/, I check ITKConfig.cmake and find the following lines 35 and 36: # Whether ITK was built with shared libraries. set(ITK_BUILD_SHARED "OFF") Two questions: 1/ Why the past tense in the comment? At this stage I have not yet run "BUILD_ALL" in VS 2010 IDE. 2/ Why is ITK_BUILD_SHARED set to "OFF"? Should it not be set to "ON" given that I have selected BUILD_SHARED_LIBS to be "ON" in CMake. (Anyways, trying to find a bug in RTK that occurs when linking ITK.) Any insight would be appreciated. Audrius From blowekamp at mail.nih.gov Tue Mar 31 09:48:39 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 31 Mar 2015 09:48:39 -0400 Subject: [ITK] ITK: "BUILD_SHARED_LIBS" set? In-Reply-To: <1427772579.1109115.247357449.5295E93F@webmail.messagingengine.com> References: <1427772579.1109115.247357449.5295E93F@webmail.messagingengine.com> Message-ID: <0A903AA5-EC7A-4EE6-87CC-9A3CAFEB2210@mail.nih.gov> Hello, The ITKConfig.cmake file is generated by the ITK build and utilized by projects which use ITK ( by CMake's find_package and include( ${ITK_USE_FILE}) ). So the files comments are in the past tense because when it's used ITK has already been built. HTH, Brad On Mar 30, 2015, at 11:29 PM, Audrius Stundzia wrote: > Hello, > > OS: Windows 8.1 x64 > CMake: 3.2.1 > ITK: 4.7.1 > IDE: MS VS 2010 x64 > > In either ITK Debug or Release build, I'm puzzled by the following: > > In CMAKE -> Build -> BUILD_SHARED_LIBS is selected to be "ON" [a check > mark in the check box]. > > CMake Configure and Generate are run. The build directory and it's > contents are created. > > In ../ITK/build/, I check ITKConfig.cmake > > and find the following lines 35 and 36: > > # Whether ITK was built with shared libraries. > set(ITK_BUILD_SHARED "OFF") > > Two questions: > > 1/ Why the past tense in the comment? At this stage I have not yet run > "BUILD_ALL" in VS 2010 IDE. > > 2/ Why is ITK_BUILD_SHARED set to "OFF"? > Should it not be set to "ON" given that I have selected > BUILD_SHARED_LIBS to be "ON" in CMake. > > (Anyways, trying to find a bug in RTK that occurs when linking ITK.) Any > insight would be appreciated. > > Audrius > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From lchauvin at bwh.harvard.edu Tue Mar 31 10:21:50 2015 From: lchauvin at bwh.harvard.edu (Laurent Chauvin) Date: Tue, 31 Mar 2015 10:21:50 -0400 Subject: [ITK] [ITK-users] Constrain a transform for optimizer Message-ID: Hello ITK users, I'm trying to use a Levenberg-Marquardt optimizer to find a point in a plane (based on a cost function). For now I create a itk::TranslationTransform< double, 3 > and set it to the Levenberg-Marquardt optmizer. However, I know the point I'm looking for is included in a plane. I was wondering if there is a way to constrain the transform to only check points in the plane (to avoid looking for points out of the plane to speed up the optimization process) ? Thank you very much. -- Laurent Chauvin, MS Surgical Navigation and Robotics Laboratory, Radiology Department Brigham And Women's Hospital, Harvard Medical School http://wiki.ncigt.org/index.php/User:Lchauvin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ 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://www.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-users From lesolorzanov at gmail.com Tue Mar 31 11:58:32 2015 From: lesolorzanov at gmail.com (Leslie Solorzano) Date: Tue, 31 Mar 2015 17:58:32 +0200 Subject: [ITK] [ITK-users] Small gaussian sphere iterator over 3D image In-Reply-To: References: Message-ID: Thank you. I investigated a lot these days and played with different things. I read the Software guide for ITK 4.7 and found interesting things and I will leave them here and also give the solution to my problem but in 2D. Firstly I thought of making the sphere discretization myself and use a simple ImageIterator as in section 4.1 in the software guide. Then I got to the spatial objects and I had fun tweaking around with EllipseSpatialObject and GaussianSpatialObjects and learned how to save them to an image. SpatialObjects have a pretty neat feature that lets you calculate simple statistics inside it using SpatialObjectToImageStatisticsCalculator. The code that helped me the most is here http://www.itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIterator I uploaded code I've been playing with here: https://github.com/zloysmiertniy/itk-arena/blob/master/GaussianToImage.cxx https://github.com/zloysmiertniy/itk-arena/blob/master/ShapedNeighborhoodIterator.cxx Finally I guess I will be using ShapedNeighborhoodIterator and change its location everytime, calculate, and set the value in the output image. Thankyou very much Matt and Bill for the links. Leslie 2015-03-30 19:59 GMT+02:00 Bill Lorensen : > These examples may help: > http://itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIterator > http://itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIteratorManual > > > On Mon, Mar 30, 2015 at 6:58 AM, Matt McCormick > wrote: > > Hi Leslie, > > > > The ShapedNeighborhoodIterator allows activations of a box of voxels > > within a given radii. > > > > For your operation, you may want to investigate the > > NeighborhoodOperator and related classes [1]. > > > > More information on how to use neighborhood classes can be found in > > the ITK Software Guide (see itk.org for links to both the electronic > > and hard copy versions). > > > > Hope this helps, > > Matt > > > > > > [1] > http://www.itk.org/Doxygen/html/classitk_1_1NeighborhoodOperator.html > > > > On Mon, Mar 30, 2015 at 9:15 AM, Leslie Solorzano > > wrote: > >> I am aware of the existance of ShapedNeighborhoodIterator. But I don't > >> understand how to use it. > >> I have a 3D image and I would like to iterate trought it and calculate a > >> value according to a guassian sphere centered at each voxel. > >> > >> I don't understand if the shaped iterator makes a box with given radii > (or > >> offsets), or it makes an ellipse with given offsets. > >> > >> My sphere is very small, a 4 voxel raidus (7 maximum), and I'd like the > >> values farthest from the center weight less in my sum, thus the > gaussian. > >> > >> So it is pretty simple, make a shapedneighborhooditerator to be a > sphere, > >> iterate and keep each value as the weighted sum of the values in its > >> neighbors in a 3D image, can some point me in the right direction? > >> > >> Thankyou > >> > >> _______________________________________________ > >> Community mailing list > >> Community at itk.org > >> http://public.kitware.com/mailman/listinfo/community > >> > > _______________________________________________ > > Community mailing list > > Community at itk.org > > http://public.kitware.com/mailman/listinfo/community > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From todd.jensen at ieee.org Tue Mar 31 12:07:45 2015 From: todd.jensen at ieee.org (Todd Jensen) Date: Tue, 31 Mar 2015 11:07:45 -0500 Subject: [ITK] [ITK-users] Constrain a transform for optimizer (Laurent Chauvin) In-Reply-To: References: Message-ID: Hello, Laurent, Have you tried having your cost function return the max value allowed when a trial point falls outside the plane? Todd Jensen, PhD Jensen Informatics LLC http://www.linkedin.com/in/toddjensen +1 (262) 682-0143 todd at jenseninformatics.com > From: Laurent Chauvin > > Hello ITK users, > > I'm trying to use a Levenberg-Marquardt optimizer to find a point in a > plane (based on a cost function). > For now I create a itk::TranslationTransform< double, 3 > and set it to the > Levenberg-Marquardt optmizer. > > However, I know the point I'm looking for is included in a plane. > > I was wondering if there is a way to constrain the transform to only check > points in the plane (to avoid looking for points out of the plane to speed > up the optimization process) ? > > Thank you very much. > > -- > Laurent Chauvin, MS > Surgical Navigation and Robotics Laboratory, Radiology Department > Brigham And Women's Hospital, Harvard Medical School > http://wiki.ncigt.org/index.php/User:Lchauvin -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Tue Mar 31 15:10:44 2015 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Tue, 31 Mar 2015 21:10:44 +0200 Subject: [ITK] [ITK-users] automated splitting and pasting of volumes for use in external programs In-Reply-To: References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> <55191685.9020706@mh-hannover.de> Message-ID: <551AF134.4080804@mh-hannover.de> Dear Matt, Thanks for Your quick reply. If I got Your hint right, You suggest writing my own filter (that e.g. does the writing of the chunk to a file) and put an itkStreamingImageFilter after it supplying it with the # of chunks and the type of splitter. If I understand the ITK Software Guide correctly, such a filter needs to be threaded, i.e. have a ThreadedGenerateData. I tried that with a simple AddFilter that should just add a constant according to the chunk number to the region it is supposed to process (files attached). However it stops due to region miss-matches. I can't see why. With just GenerateData it seems like it is not streaming, according to the PipelineMonitorImageFilter. What would be the correct way to go? Many thanks for looking into this. Roman On 30/03/15 16:02, Matt McCormick wrote: > Hi Roman, > > You probably want to use the streaming capabilities of the ITK > pipeline. This is covered in more detailed in the ITK Software Guide. > The pipeline internally uses ImageRegionSplitter classes. Overlaps are > handled by propagation of the RequestedRegion throughout the pipeline. > To monitor the changes in the regions, use the > PipelineMonitorImageFilter [1]. > > HTH, > Matt > > [1] http://www.itk.org/Doxygen/html/classitk_1_1PipelineMonitorImageFilter.html > > On Mon, Mar 30, 2015 at 5:25 AM, Dr. Roman Grothausmann > wrote: >> Dear mailing list members, >> >> >> A dataset I work on is too big to load completely into itksnap for manual >> adjustment of the automatic pre-segementation with watersheds. The full >> resolution is needed, so I cannot work with a re-sampled version. The only >> possible easy solution I see at the moment is to split up the 3D image into >> smaller blocks of sizes as equal as possible, do the itsnap interaction, and >> finally paste all blocks of the resulting segmentation back together. >> Would itkImageRegionSplitterMultidimensional be the right filter for the >> splitting of blocks as equal in size as possible? >> Is there a "logger" like e.g. itkXMLFileOutputWindow (as used in >> itkStreamingImageFilterTest2.cxx) that could be used to store the regions >> corresponding to each block-file to use that for itkPasteImageFilter to >> combine these blocks later again? >> Not needed now, but perhaps lager: Is there some nice way to handle overlaps >> in this case that is already implemented in itk, something like >> itkImageRegionSplitterMultidimensional::SetOverlap()? >> >> Many thanks for any help or hints. >> Roman >> >> On 17/03/15 18:13, Pol Mons? Purt? wrote: >>> >>> I guess the way to go would be to take the splitter (probably >>> ImageRegionSplitterMultidimensional now that I look at it) and extend it >>> to >>> support overlap. If I do it, I'll let you know in case it is of interest >>> to >>> anyone. For now I'll stick to my class. >> >> >> >> -- >> Dr. Roman Grothausmann >> >> Tomographie und Digitale Bildverarbeitung >> Tomography and Digital Image Analysis >> >> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >> Medizinische Hochschule Hannover >> Carl-Neuberg-Str. 1 >> D-30625 Hannover >> >> Tel. +49 511 532-9574 >> _____________________________________ >> 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://www.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-users -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 -------------- next part -------------- A non-text attachment was scrubbed... Name: LabelShiftImageFilter.cxx Type: text/x-c++src Size: 11003 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: itkLabelShiftImageFilter.h Type: text/x-chdr Size: 2235 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: itkLabelShiftImageFilter.hxx Type: text/x-c++hdr Size: 1501 bytes Desc: not available URL: -------------- next part -------------- _____________________________________ 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://www.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-users From gabrielgimenez85 at gmail.com Tue Mar 31 23:52:03 2015 From: gabrielgimenez85 at gmail.com (=?UTF-8?Q?Gabriel_A=2E_Gim=C3=A9nez?=) Date: Tue, 31 Mar 2015 20:52:03 -0700 (MST) Subject: [ITK] [ITK-users] Working with RIRE Datasets Message-ID: <1427860323074-7587099.post@n2.nabble.com> Hi! how are you? I'm trying to use RIRE datasets..., for example: In the RIRE terminology we say "From CT to MR", this means that the "moving image" is the CT image and the fixed image is the MR image. Then, I need a transformation "T" to apply to the CT test points for the comparison with the "ground truth"...I'm not wrong about this? But my problem is that the ITK provides a transformation that maps poins of the fixed (MR) image on the moving image (CT) , I guess I need to get the inverse transformation...is that possible? I'm misunderstanding something? I hope you can help me...I need to test my implementation, thank you in advance. Regards, -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Working-with-RIRE-Datasets-tp7587099.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ 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://www.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-users