From donelron at web.de Fri Aug 1 04:27:22 2014 From: donelron at web.de (donelron) Date: Fri, 1 Aug 2014 01:27:22 -0700 (PDT) Subject: [ITK] [ITK-users] Inconsistent results for same histogram on same image when PixelType of image is different In-Reply-To: <1406833109934-34366.post@n7.nabble.com> References: <1406833109934-34366.post@n7.nabble.com> Message-ID: <1406881642374-34367.post@n7.nabble.com> Just one short addition / correction to my post: If I was able to use for example that would also be more than enough. Basically, I just need up to around 1000 different gray values in the image in which I have to calculate the histogram. So, unsigned char with 256 different values is obviously not enough... -- View this message in context: http://itk-users.7.n7.nabble.com/Inconsistent-results-for-same-histogram-on-same-image-when-PixelType-of-image-is-different-tp34366p34367.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 mallikarjun49 at gmail.com Fri Aug 1 07:06:12 2014 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Fri, 1 Aug 2014 16:36:12 +0530 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: Message-ID: Thanks Bill for your answer. The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. Thanks for your help On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: > If you have it in vtk, I suggest using the vtk pipeline to smooth the data. > > On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K > wrote: > > Hi Bill, > > Thanks for the replay. > > > > Yes,I built both ITK and my app with Release ,I forgot to mention it in > the > > previous post.Actually the data set is the output of > > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I > saved > > this marching cube's output as .vtk file and read it using > > itkVTKPolyDataReader and then I am giving this reader's output to > > itkSmoothingQuadEdgeMeshFilter's input. > > > > I checked the execution time of each step in the pipeline ,after > > SmothingQEMeshFilter has got it's input ,it is taking time to process the > > data. > > > > Thank you > > > > > > > > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen > > wrote: > >> > >> First, make sure you are building ITK and your app with Release. A > >> Debug build can be 10-50 times slower. > >> > >> > >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K < > mallikarjun49 at gmail.com> > >> wrote: > >> > Hi All, > >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh > >> > smoothing.This > >> > filter is giving good results what I expected but taking more > execution > >> > time.can any one suggest me to reduce the execution time( multi > >> > threading > >> > or any parameters to add/remove )? > >> > > >> > Below is the code snippet > >> > /////// > >> > typedef itk::QuadEdgeMeshTraits double,double > >> > > > >> > qetraits; > >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > > MeshType; > >> > > >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; > >> > > >> > itk::OnesMatrixCoefficients< MeshType > coeff0; > >> > > >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > > >> > SmoothingQuadEdgeMeshFilter; > >> > > >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = > >> > SmoothingQuadEdgeMeshFilter::New(); > >> > > >> > QEMeshSmoother->SetInput("abc.vtk"); > >> > QEMeshSmoother->SetNumberOfIterations(5 ); > >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); > >> > QEMeshSmoother->SetDelaunayConforming(true ); > >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); > >> > QEMeshSmoother->Update(); > >> > //// > >> > > >> > -- > >> > Regards: > >> > Mallik > >> > > >> > > >> > _____________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Kitware offers ITK Training Courses, for more information visit: > >> > http://www.kitware.com/products/protraining.php > >> > > >> > Please keep messages on-topic and check the 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 > > > > > > > > > > -- > > Regards: > > Mallik > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -- *Regards:* Mallik -------------- 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 Aug 1 09:36:09 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 1 Aug 2014 09:36:09 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <8C9CCC8B-5379-4A6A-902F-ACAE609F5789@gmail.com> <8727A959-8F80-471A-9E24-04C0E564D8DC@mail.nih.gov> Message-ID: Nick, I hope you can make it to today's TCON. I can demo that notebook I linked too. It should clarify things. Brad On Jul 30, 2014, at 1:57 PM, Nicholas Tustison wrote: >> To try to summaries... sorry if have not been clear enough in my explanations. > > No, I blame me?I?m consistently distracted by the scenery outside here in > California and it?s definitely affecting my ability to concentrate on code > questions. > >> INITIAL QUESTION >> >> How does composite transform and the "Center" parameter interact? How does this relate to the virtual domain? > > The composite transform is agnostic with respect to whether or not a > transform has a center or any other fixed parameter set. The only > distinction we make is typology with respect to linear/deformable. To > be clear, we?re not discussing any of the ?Centered? transforms: > > * CenteredAffineTransform > * CenteredEuler3DTransform > * CenteredEuler2DTransform > * CenteredSimilarity2DTransform > > None of those transforms are used in ANTs but I don?t think > their optimization would be an issue in the new ITKv4 registration > framework. > > The virtual domain is simply defined in terms of standard image > geometry (origin, spacing, etc.) and is currently set in terms of the > fixed image geometry. > >> MY UNDERSTANDING >> >> 1) Using a "Center" initialized transform only works correctly for a single transform and directly with a composite. ( This is with the current center initializers, a different approach could be done which takes into consideration the composition ) > > I don?t see why it would only work correctly for a single transform. Suppose > I optimize a translation transform to get it?s optimal parameters for a given > registration problem. It?s not clear to me why it would be a problem to follow > that with optimizing an Euler3D transform (which we do all the time in ANTs). > Obviously, we have to specify a staring point for the second transform (which > is identity by default) and perhaps it would be better to have a different > starting point but I don?t see why starting with the default parameters is a > problem. > > If the ?Center initialized transform? is one of the transforms listed above > then we don?t use those. If it?s simply the result of using the > CenteredTransformInitializer, then we just pull the itk::TranslationTransform > part from the result and push that translation transform into the composite > transform queue. I don?t see why it would be a problem to then optimize, > for example, the Euler3DTransform which just has 3 translation parameters > and 3 angle parameters to optimize where the center is implicitly defined > (unlike the CenteredEuler3DTransform which does have additional Center > parameters). > >> 2) The virtual domain should be initialized such that the two images "Center"s are at the origin. This an alternative to using the "Center" transform parameters, and better works with composite transforms. > > Yes, that would probably be a better initialization but I don?t know why it would > be a problem for the current framework to optimize with the origin elsewhere. > Right now, each transform within the composite transform queue is > optimized starting from its identity parameters but perhaps the initializer > idea that you propose would improve optimization. > >> I was not aware that 2 was the best practice with the ITKv4 framework. Do we have any examples/test/documentation to indicate this? Further more using the current CenterTransformInitalizers to initialize the virtual domain is not readily apparent[1] how to map the parameters. >> PROPOSAL >> >> Perhaps we need a new Initializer filter to assist with initializing the virtual domain to initialize this practice? >> >> 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 rg.bumpy at gmail.com Fri Aug 1 09:47:48 2014 From: rg.bumpy at gmail.com (Bumpy RG) Date: Fri, 1 Aug 2014 15:47:48 +0200 Subject: [ITK] [ITK-users] Whole body Segmentation-Identification Message-ID: Dear All, I have a dicom series having whole body image sequences, starting from head up to legs. My aim is to write an algorithm to automatically identify the body parts (lungs, spines, head etc.) from the dicom sequence. Although I am very new to the ITK world, I am following these steps in ITK (*I would appreciate if you comment whether I am following correct idea or not* ): 1. Read dicom series using 'DicomSeriesReadImageWrite2.cxx ' to create a 3D volume and save the result in mhd format. 2. Use 'ImageReadRegionOfInterestWrite.cxx' for separating various parts (like left lung, right lung, spines, head etc.) and save them in respective 3D volumes in mhd format. 3. Pick the various body parts prepared above, one by one and segment them using robust algorithm (say ThresholdSegmentationLevelSetImageFilter.cxx). 4. Use Mathematical Morphology to get better results. 5. Using the various results from above, form an algorithm for identifying the various body parts. Currently I am stuck in the second step because it is so hard to choose the co-ordinates for selecting proper region of interest. For example, I chose these points for ROI of right lung (I checked the co-ordinates using 3D slicer visualizer) and it does not give me good results : start[0] = 255; start[1] =165; start[2] = 0; *However I do not understand how to choose the points properly in ITK.* I would be really glad to have your response. Thanking you in advance. Kind Regards, Bumpy. -------------- 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 ntustison at gmail.com Fri Aug 1 10:15:19 2014 From: ntustison at gmail.com (Nick Tustison) Date: Fri, 1 Aug 2014 08:15:19 -0600 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <8C9CCC8B-5379-4A6A-902F-ACAE609F5789@gmail.com> <8727A959-8F80-471A-9E24-04C0E564D8DC@mail.nih.gov> Message-ID: <6D8816B7-9BE5-494A-BAE8-81057667632E@gmail.com> Sorry, Brad, but I'm currently in Salt Lake at a funeral. I'd really like to understand better so, if you're available, I can do it anytime during the week on another call. Sent from Howling Fantods > On Aug 1, 2014, at 7:36 AM, Bradley Lowekamp wrote: > > Nick, > > I hope you can make it to today's TCON. I can demo that notebook I linked too. It should clarify things. > > Brad > > On Jul 30, 2014, at 1:57 PM, Nicholas Tustison wrote: > >>> To try to summaries... sorry if have not been clear enough in my explanations. >> >> No, I blame me?I?m consistently distracted by the scenery outside here in >> California and it?s definitely affecting my ability to concentrate on code >> questions. >> >>> INITIAL QUESTION >>> >>> How does composite transform and the "Center" parameter interact? How does this relate to the virtual domain? >> >> The composite transform is agnostic with respect to whether or not a >> transform has a center or any other fixed parameter set. The only >> distinction we make is typology with respect to linear/deformable. To >> be clear, we?re not discussing any of the ?Centered? transforms: >> >> * CenteredAffineTransform >> * CenteredEuler3DTransform >> * CenteredEuler2DTransform >> * CenteredSimilarity2DTransform >> >> None of those transforms are used in ANTs but I don?t think >> their optimization would be an issue in the new ITKv4 registration >> framework. >> >> The virtual domain is simply defined in terms of standard image >> geometry (origin, spacing, etc.) and is currently set in terms of the >> fixed image geometry. >> >>> MY UNDERSTANDING >>> >>> 1) Using a "Center" initialized transform only works correctly for a single transform and directly with a composite. ( This is with the current center initializers, a different approach could be done which takes into consideration the composition ) >> >> I don?t see why it would only work correctly for a single transform. Suppose >> I optimize a translation transform to get it?s optimal parameters for a given >> registration problem. It?s not clear to me why it would be a problem to follow >> that with optimizing an Euler3D transform (which we do all the time in ANTs). >> Obviously, we have to specify a staring point for the second transform (which >> is identity by default) and perhaps it would be better to have a different >> starting point but I don?t see why starting with the default parameters is a >> problem. >> >> If the ?Center initialized transform? is one of the transforms listed above >> then we don?t use those. If it?s simply the result of using the >> CenteredTransformInitializer, then we just pull the itk::TranslationTransform >> part from the result and push that translation transform into the composite >> transform queue. I don?t see why it would be a problem to then optimize, >> for example, the Euler3DTransform which just has 3 translation parameters >> and 3 angle parameters to optimize where the center is implicitly defined >> (unlike the CenteredEuler3DTransform which does have additional Center >> parameters). >> >>> 2) The virtual domain should be initialized such that the two images "Center"s are at the origin. This an alternative to using the "Center" transform parameters, and better works with composite transforms. >> >> Yes, that would probably be a better initialization but I don?t know why it would >> be a problem for the current framework to optimize with the origin elsewhere. >> Right now, each transform within the composite transform queue is >> optimized starting from its identity parameters but perhaps the initializer >> idea that you propose would improve optimization. >> >>> I was not aware that 2 was the best practice with the ITKv4 framework. Do we have any examples/test/documentation to indicate this? Further more using the current CenterTransformInitalizers to initialize the virtual domain is not readily apparent[1] how to map the parameters. >>> PROPOSAL >>> >>> Perhaps we need a new Initializer filter to assist with initializing the virtual domain to initialize this practice? >>> >>> 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 Fri Aug 1 10:17:46 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 1 Aug 2014 10:17:46 -0400 Subject: [ITK] [ITK-dev] Google Hangout TCON now Message-ID: Hello, I set up a google hangout TCON for now: https://plus.google.com/hangouts/_/event/cn8hv391boek27j8c7blph7igho 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 matt at mmmccormick.com Fri Aug 1 10:48:29 2014 From: matt at mmmccormick.com (Matthew McCormick (thewtex)) Date: Fri, 1 Aug 2014 10:48:29 -0400 Subject: [ITK] [ITK-dev] Google Hangout TCON now In-Reply-To: References: Message-ID: Thanks for setting this up. I am traveling again this week, but I will be resuming a more normal schedule next week and should be able to join. Matt On Fri, Aug 1, 2014 at 10:17 AM, Bradley Lowekamp wrote: > Hello, > > I set up a google hangout TCON for now: > https://plus.google.com/hangouts/_/event/cn8hv391boek27j8c7blph7igho > > 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 _______________________________________________ Powered by www.kitware.com 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 Aug 1 11:31:54 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 1 Aug 2014 11:31:54 -0400 Subject: [ITK] [ITK-dev] Move ITK TCONs to Google Hangout? Message-ID: Hello, Should we move the weekly ITK TCONs to Google hangouts? Using Google hangouts would be more visible and public along with having an automatic process to start the event. Additionally there is the ability to phone in people to the hang out? 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 stnava at gmail.com Fri Aug 1 12:06:42 2014 From: stnava at gmail.com (brian avants) Date: Fri, 1 Aug 2014 12:06:42 -0400 Subject: [ITK] [ITK-dev] Move ITK TCONs to Google Hangout? In-Reply-To: References: Message-ID: +1 brian On Fri, Aug 1, 2014 at 11:31 AM, Bradley Lowekamp wrote: > Hello, > > Should we move the weekly ITK TCONs to Google hangouts? > > Using Google hangouts would be more visible and public along with having an automatic process to start the event. Additionally there is the ability to phone in people to the hang out? > > 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 _______________________________________________ Powered by www.kitware.com 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 michkapopoff at gmail.com Sat Aug 2 09:07:01 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Sat, 2 Aug 2014 15:07:01 +0200 Subject: [ITK] SSE2 errors on dashboard Message-ID: Hi Some SSE2 errors appeared on the dashboard on the 31 of July, see http://open.cdash.org/buildSummary.php?buildid=3431994 The errors appear also on the wrapping machines. Any clue what is causing this ? I was not able to determine the origin of it. /home/kevin/kitware/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:49:5: error: #error "Required file emmintrin.h for SSE2 not found" # error "Required file emmintrin.h for SSE2 not found? Michka -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Sat Aug 2 08:39:25 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sat, 02 Aug 2014 08:39:25 -0400 Subject: [ITK] [ITK-dev] Upgraded factory.kitware Mac compiler Message-ID: <96995EF3-CB2E-4DBD-9360-A7D3909D25E6@mail.nih.gov> Hello, Hello there is recently some regular failing tests on the factory.kitware Mac robot build: http://open.cdash.org/viewTest.php?onlyfailed&buildid=3433716 What specific compiler, Xcode, and os version is the system now running? Was it recently upgraded? These failures look vaguely familiar to me, not sure quite why. May have been at some point in the GNU gcc->llvm-gcc transition when things didn't work too good... 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 Sat Aug 2 11:03:59 2014 From: jchris.fillionr at kitware.com (Jean-Christophe Fillion-Robin) Date: Sat, 2 Aug 2014 11:03:59 -0400 Subject: [ITK] [ITK-dev] Upgraded factory.kitware Mac compiler In-Reply-To: <96995EF3-CB2E-4DBD-9360-A7D3909D25E6@mail.nih.gov> References: <96995EF3-CB2E-4DBD-9360-A7D3909D25E6@mail.nih.gov> Message-ID: Hi Brad, All details are captured here: http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=23528 XCode before: * Xcode: 3.2.6 - uildVersion: 10M2518 * gcc-4.0: i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5494) * gcc-4.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) * llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.6) * clang: Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn XCode after: * Xcode: 4.2 - Build version 4C199 * gcc-4.0: i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5494) * gcc-4.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) * llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) * clang: Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn) Hth Jc On Sat, Aug 2, 2014 at 8:39 AM, Bradley Lowekamp wrote: > Hello, > > Hello there is recently some regular failing tests on the factory.kitware > Mac robot build: > http://open.cdash.org/viewTest.php?onlyfailed&buildid=3433716 > > What specific compiler, Xcode, and os version is the system now running? > Was it recently upgraded? > > These failures look vaguely familiar to me, not sure quite why. May have > been at some point in the GNU gcc->llvm-gcc transition when things didn't > work too good... > > Brad > > > -- +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 blowekamp at mail.nih.gov Sat Aug 2 11:25:49 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sat, 02 Aug 2014 11:25:49 -0400 Subject: [ITK] [ITK-dev] Upgraded factory.kitware Mac compiler In-Reply-To: References: <96995EF3-CB2E-4DBD-9360-A7D3909D25E6@mail.nih.gov> Message-ID: OK, I think the compiler being used on the system is not a winner. Something need to be changes on the system to make this more identifiable, perhaps changing the build name to be llvm-gcc-4.2. As it's not apparent in the configuration: The C compiler identification is GNU 4.2.1 -- The CXX compiler identification is GNU 4.2.1 -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works Digging into the system information test[1] we can find the following: sing built-in specs. Target: i686-apple-darwin10 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~3/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~3/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) /usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/collect2 -dynamic -arch x86_64 -macosx_version_min 10.6.8 -weak_reference_mismatches non-weak -o cmTryCompileExec885700192 -lcrt1.10.6.o -L/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -L/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -L/usr/lib/i686-apple-darwin10/4.2.1 -L/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/llvm-gcc-4.2/bin/../lib/gcc -L/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1/../../.. -L/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/../../.. -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTryCompileExec885700192.dir/CMakeCCompilerABI.c.o -lSystem -lgcc -lSystem collect2 version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) (i686 Darwin) But the GCC masquerading version is not too helpful. [1] http://open.cdash.org/testDetails.php?test=272099142&build=3433750 On Aug 2, 2014, at 11:03 AM, Jean-Christophe Fillion-Robin wrote: > Hi Brad, > > All details are captured here: > > http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=23528 > > > XCode before: > > * Xcode: 3.2.6 - uildVersion: 10M2518 > * gcc-4.0: i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5494) > * gcc-4.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) > * llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.6) > * clang: Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn > > XCode after: > > * Xcode: 4.2 - Build version 4C199 > * gcc-4.0: i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5494) > * gcc-4.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) > * llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) > * clang: Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn) > > > Hth > Jc > > > On Sat, Aug 2, 2014 at 8:39 AM, Bradley Lowekamp wrote: > Hello, > > Hello there is recently some regular failing tests on the factory.kitware Mac robot build: > http://open.cdash.org/viewTest.php?onlyfailed&buildid=3433716 > > What specific compiler, Xcode, and os version is the system now running? Was it recently upgraded? > > These failures look vaguely familiar to me, not sure quite why. May have been at some point in the GNU gcc->llvm-gcc transition when things didn't work too good... > > Brad > > > > > > -- > +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 blowekamp at mail.nih.gov Sat Aug 2 19:48:53 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sat, 02 Aug 2014 19:48:53 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov>, Message-ID: <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> Hello Ali, I created a notebook to try to demonstrate the problem you are describing: http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb If the center of an Affine transformation isn't correctly initialized then the optimization is not speedy or robust. I think it's best illustrated with these two graphs: Notice that with the Center being the origin, all 1000 iterations are exhausted, and the metric is slowing decreasing. And this is with the translation path being around the length to 10. If the spacing was bigger or more offset from the origin the situation would be worse. I don't think this is a bug with the registration framework. I think new initializers for composite transforms are needed, along with documentation how the 2 good ways to initialize the registration methods transforms. Brad On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali wrote: > Brad, > > I have exactly the same issue. I wrote a simple registration program that is run in two stages: > -Translation > -Affine > > My fixed and moving images are in 2D, and the moving image is created from the fixed image by > rotation of 10 degree and translation of [13,17] in X and Y directions. > > The first stage does a translation registration and the result transform is added to a composite transform > that is used as the initial moving transform of the second stage. > > After the registration the result transform of the second stage is also added to the composite transform > to be used by the resampler. > > I have printed the composite transform to the screen: > > 2481: CompositeTransform (0x7fa359a18b00) > 2481: RTTI typeinfo: itk::CompositeTransform > 2481: Reference Count: 2 > 2481: Modified Time: 20949 > 2481: Debug: Off > 2481: Object Name: > 2481: Observers: > 2481: none > 2481: Transforms in queue, from begin to end: > 2481: >>>>>>>>> > 2481: TranslationTransform (0x7fa359a199b0) > 2481: RTTI typeinfo: itk::TranslationTransform > 2481: Reference Count: 7 > 2481: Modified Time: 1648 > 2481: Debug: Off > 2481: Object Name: > 2481: Observers: > 2481: none > 2481: Offset: [12.801, 15.8578] > 2481: >>>>>>>>> > 2481: AffineTransform (0x7fa359d095a0) > 2481: RTTI typeinfo: itk::AffineTransform > 2481: Reference Count: 5 > 2481: Modified Time: 20946 > 2481: Debug: Off > 2481: Object Name: > 2481: Observers: > 2481: none > 2481: Matrix: > 2481: 1.01593 -0.0100051 > 2481: -0.00835669 1.01113 > 2481: Offset: [-0.358829, -0.290093] > 2481: Center: [0, 0] > 2481: Translation: [-0.358829, -0.290093] > 2481: Inverse: > 2481: 0.984397 0.00974056 > 2481: 0.00813575 0.989073 > 2481: Singular: 0 > 2481: End of MultiTransform. > 2481: <<<<<<<<<< > > As it can be seen, the translation transform provides a good initialization since its offset (Offset: [12.801, 15.8578]) is close to the shift parameters. > > However, the Affine transform fails to rotate the moving image since its Matrix is almost identity. > Possible reason can be the improper Center of Affine transform that is fixed to [0,0], and not at geometrical center or center of mass. > > To make sure that I have not made any crazy mistake in my example, I simulated my example parameters in ANTs, and ANTs returned > the same results and failed to register the images!! > >>>>>> ANTs command line <<<<<<<<<<< > > PROGPATH=/scratch/ANTS/release-new/bin > fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png > mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png > > time ${PROGPATH}/antsRegistration -d 2 \ > --float \ > --output [test1, warpedMoving.nii.gz] \ > --transform "Translation[16]" \ > --metric MI[${fi},${mi},1,32,None,1] \ > --convergence [100,1e-2,5] \ > --shrink-factors 3 \ > --smoothing-sigmas 2 \ > --use-histogram-matching 1 \ > \ > --transform "Affine[1]" \ > --metric MI[${fi},${mi},1,32] \ > --convergence [100x100,1e-2,2] \ > --shrink-factors 2x1 \ > --smoothing-sigmas 1x0 \ > --use-histogram-matching 1 > > <<<<<<<<<<<<<<<<<<<<<<<< > > Fixed and moving images can be loaded from the ITK data files. What do you think about this example? Is it a bug in ITK or just the parameters are not tuned finely? > > Thanks, > Ali > > ________________________________________ > From: Johnson, Hans J > Sent: Tuesday, July 29, 2014 6:19 PM > To: Ghayoor, Ali > Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of transform > > Ali, > > You need to follow this discussion. > > Hans > > On 7/29/14, 6:16 PM, "Bradley Lowekamp" wrote: > >> Hello, >> >> Ok, to further explore this problem, and hopeful help other people too: I >> created an IPython Notebook viewable here: >> http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl >> ob/master/Transform%20Composition%20And%20Order.ipynb >> >> It doesn't come through on the static page, but I added some nifty >> interactive slider widgets to change the rotation parameter. Which is >> really the point to enable understanding of the parameters for the >> transform and how they should be best optimized. The notebook should work >> with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one >> to try it out :) IPython Notebooks widget are very cool! >> >> EXPLANATION: >> >> The the order of the composite transform is that the new transforms are >> applied first. >> >> BUT they map from the virtual domain ( fixed ) to the moving image. >> Therefore if your first transform moves the center of mass to the origin >> then the second added transform's space will be centered on the mass, >> which is good for optimizing rotation and affine parameters. >> >> QUESTION: >> >> Therefore I am inclined to conclude that its best practices to map the >> fixed and moving image to the virtual domain such that the center of mass >> ( or some other "center feature" ) are at the origin. This would then the >> scale, rotation and other affine parameters around the center, with out >> having to used the "Center" parameter the transforms currently have. >> >> Is this what others are doing in their registration? For general best >> practices should this be recommend? >> >> @Brian I know I have seen this multi-domain description many time, but I >> think I may have just gotten it... Is the well describe in the literature >> some place? I think this may be an important part add the software guide. >> >> Thanks, >> Brad >> >> >> >> >> On Jul 29, 2014, at 5:38 PM, Matt McCormick >> wrote: >> >>> Hi Brad, >>> >>> Your assessment that the fixed center is important is correct. >>> >>> In most cases, a transform with a Center is the first transform in a >>> Composite transform. There not any issues here. However, if the >>> transform with a Center is further along the chain, then a >>> CenteredTransformInitializer that was applied before the registration >>> is started will not generate the desired result. In this case, we >>> would have to respond to an Event in the registration process and >>> estimated the center on the imaged after the other transforms have >>> been applied. It is more work, but it is a more unusual case. >>> >>> HTH, >>> Matt >>> >>> >>> >>> On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp >>> wrote: >>>> Helloo Nick! >>>> >>>> I am glad you got back to me. >>>> >>>> I suspect that I have spent more time this past week looking at the >>>> ITK affine transforms than anyone else[1] this week. With that here is >>>> my current understanding... >>>> >>>> 1) The CenterTransformInitializers estimates an initial "Center" and >>>> an initial "Translation" parameter from either the geometry or the >>>> first moments. From my problematic experiences, getting the initial >>>> transform which is a "good" guess is been critical for the optimizer to >>>> head to the correct solution. >>>> >>>> 2) The Center parameter of a transform can either be "Fixed" or an >>>> optimizable parameter. The transforms with the "Centered" monkier are >>>> the the ones with the Center parameter optimizable. This issue seems to >>>> be what you were referring to in to message. >>>> >>>> In many ways the point I am trying to make is independent of #2. I >>>> have observed that it's important to have the "Center" of an affine >>>> transform ( or sub parameterization thereof ) at the center of the >>>> object you are trying to register. That is the coordinate space of the >>>> optimizable parameters' point 0 is near the center. This enables >>>> rotation to easily rotate around the center, as well as scaling to >>>> maintain the same relative center when "zooming". This issue is >>>> independent of wether that center point can be optimized. >>>> >>>> For example, consider changing the origin of an image for alignment by >>>> say 500, and compensating with just an initial translation and not >>>> setting the "Center" parameter. If we are trying to optimize rotation >>>> and translation, then the optimization path would be very difficult to >>>> traverse with these inter-dependent parameters to force it to rotate >>>> around the center of the object. This scenario may be more common in >>>> microscopy then medical imaging, due to microscopy frequently having >>>> multiple subjects across large images. I could write up a IPython >>>> Notebook to illustrate the case. >>>> >>>> So that is my understanding of why using a fixed center is important. >>>> I thought this may have been shared knowledge, but perhaps is not or is >>>> incorrect... >>>> >>>> Now I am trying to understand how this interacts with all the >>>> coordinate frames involved with the ITKv4 registration framework, and >>>> the composite transforms. Specifically the composite transform apply >>>> the transforms in "reverse order"[2]. As I understand that that means >>>> that the newest transform get applied first. So that transform >>>> parameters are being optimized in the images space not in the virtual >>>> domains we are working towards. Therefore the center of our transforms >>>> is still important as we composite transforms? >>>> >>>> I hope I explained that clearly, a white board may really be needed.... >>>> >>>> Thanks, >>>> Brad >>>> >>>> >>>> [1] >>>> https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94 >>>> 099d3519eb23bcc16c7cf015 >>>> [2] http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html >>>> >>>> On Jul 28, 2014, at 8:57 PM, Nicholas Tustison >>>> wrote: >>>> >>>>> Hi Brad, >>>>> >>>>> I apologize for the delayed response. I?m still catching up on my >>>>> workload after moving to CA. We might want to talk to Luis as it >>>>> was my understanding that the ?center? component of the linear >>>>> transforms might be a carry-over from all the ?Centered? transforms, >>>>> e.g., >>>>> >>>>> >>>>> http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm >>>>> l >>>>> >>>>> which, if I remember correctly, Luis said were somewhat sub optimally >>>>> conceived but this was such a long time ago that I might be completely >>>>> misremembering. However, fixing the center for all transforms within >>>>> a composite transform is certainly not necessary within the specified >>>>> framework. Rather, the matrix and offset are updated with the >>>>> ?Center? >>>>> being updated implicitly. >>>>> >>>>> Nick >>>>> >>>>> >>>>> >>>>> On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp >>>>> wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> There are a lot of transforms involved in the new registration >>>>>> framework. >>>>>> >>>>>> I am trying to figure out what the implications for the fix >>>>>> parameters of the transform "Center" ( ie center of rotation/scaling >>>>>> ) are when combined with composite transforms and the >>>>>> fixed/moving/registration coordinate frames... >>>>>> >>>>>> Based on how the transforms are composed it seems necessary to set >>>>>> the fix "Center" for subsequent transformations. Additionally, I am >>>>>> unsure how one would "improve" ( poorly defined? ) the center for a >>>>>> subsequent transform ie Affine after a similarity... >>>>>> >>>>>> Are there some documented guidance or figures to help with this >>>>>> issue? >>>>>> Do we have a comprehensive diagram of these transforms? >>>>>> >>>>>> Thanks, >>>>>> 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 >>>> _______________________________________________ >>>> 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 > > > > ________________________________ > 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. > ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: unknown.png Type: image/png Size: 15787 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: unknown.png Type: image/png Size: 15016 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 michkapopoff at gmail.com Sun Aug 3 06:08:04 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Sun, 3 Aug 2014 12:08:04 +0200 Subject: [ITK] SSE2 errors on dashboard In-Reply-To: References: Message-ID: <8185AF24-9C31-405B-8CD6-CCCB57A6BC6C@gmail.com> Hi answering to myself, this is related to this Jira ticket: https://issues.itk.org/jira/browse/ITK-3299 I?ll look at the provided patches and push them to gerrit so that we can fix this. Michka On 2 ao?t 2014, at 15:07, Michka Popoff wrote: > Hi > Some SSE2 errors appeared on the dashboard on the 31 of July, see http://open.cdash.org/buildSummary.php?buildid=3431994 > The errors appear also on the wrapping machines. > Any clue what is causing this ? I was not able to determine the origin of it. > /home/kevin/kitware/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:49:5: error: #error "Required file emmintrin.h for SSE2 not found" > # error "Required file emmintrin.h for SSE2 not found? > Michka -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Sun Aug 3 10:21:10 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Sun, 3 Aug 2014 16:21:10 +0200 Subject: [ITK] SSE2 errors on dashboard In-Reply-To: <4EB827D9-070D-403E-9607-25306A768C9D@mail.nih.gov> References: <8185AF24-9C31-405B-8CD6-CCCB57A6BC6C@gmail.com> <4EB827D9-070D-403E-9607-25306A768C9D@mail.nih.gov> Message-ID: MMh, I may have been a little bit too fast here. The dashboard is failing on vnl_math.h, and Gert?s patch is for itkMathDetail.h. Gert?s patch is on gerrit (http://review.source.kitware.com/#/c/16499/) and it?s a different story, so we can keep the discussion for this specific patch in the gerrit topic. What I can not understand is why all the Python dashboard and the Fedora-19-x86_64 machine suddenly started to have this error. Michka On 3 ao?t 2014, at 16:05, Bradley Lowekamp wrote: > Michka, > > I am not sure what that patch has to do with VNL. It's looks different. > > The patch in that JIRA issue was fixed by adding support that that version of GCC to gcc_xml.. > > On Aug 3, 2014, at 6:08 AM, Michka Popoff wrote: > >> Hi >> >> answering to myself, this is related to this Jira ticket: https://issues.itk.org/jira/browse/ITK-3299 >> I?ll look at the provided patches and push them to gerrit so that we can fix this. >> >> Michka >> >> On 2 ao?t 2014, at 15:07, Michka Popoff wrote: >> >>> Hi >>> Some SSE2 errors appeared on the dashboard on the 31 of July, see http://open.cdash.org/buildSummary.php?buildid=3431994 >>> The errors appear also on the wrapping machines. >>> Any clue what is causing this ? I was not able to determine the origin of it. >>> /home/kevin/kitware/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:49:5: error: #error "Required file emmintrin.h for SSE2 not found" >>> # error "Required file emmintrin.h for SSE2 not found? >>> Michka >> >> _______________________________________________ >> 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 Sun Aug 3 10:05:12 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sun, 03 Aug 2014 10:05:12 -0400 Subject: [ITK] SSE2 errors on dashboard In-Reply-To: <8185AF24-9C31-405B-8CD6-CCCB57A6BC6C@gmail.com> References: <8185AF24-9C31-405B-8CD6-CCCB57A6BC6C@gmail.com> Message-ID: <4EB827D9-070D-403E-9607-25306A768C9D@mail.nih.gov> Michka, I am not sure what that patch has to do with VNL. It's looks different. The patch in that JIRA issue was fixed by adding support that that version of GCC to gcc_xml.. On Aug 3, 2014, at 6:08 AM, Michka Popoff wrote: > Hi > > answering to myself, this is related to this Jira ticket: https://issues.itk.org/jira/browse/ITK-3299 > I?ll look at the provided patches and push them to gerrit so that we can fix this. > > Michka > > On 2 ao?t 2014, at 15:07, Michka Popoff wrote: > >> Hi >> Some SSE2 errors appeared on the dashboard on the 31 of July, see http://open.cdash.org/buildSummary.php?buildid=3431994 >> The errors appear also on the wrapping machines. >> Any clue what is causing this ? I was not able to determine the origin of it. >> /home/kevin/kitware/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:49:5: error: #error "Required file emmintrin.h for SSE2 not found" >> # error "Required file emmintrin.h for SSE2 not found? >> Michka > > _______________________________________________ > 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 Mon Aug 4 09:13:53 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 4 Aug 2014 09:13:53 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: <6D8816B7-9BE5-494A-BAE8-81057667632E@gmail.com> References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <8C9CCC8B-5379-4A6A-902F-ACAE609F5789@gmail.com> <8727A959-8F80-471A-9E24-04C0E564D8DC@mail.nih.gov> <6D8816B7-9BE5-494A-BAE8-81057667632E@gmail.com> Message-ID: <2BBBE077-9880-4FAC-9873-DC265CFD7C35@mail.nih.gov> Nick, Would 2pm EST on day this week for you for a google hang out? Let's plan on review these points I've made along with the notebooks. I'd think the likely output is going to be some initial requirements for a new transform optimizer for composite transforms and the v4 framework. Brad On Aug 1, 2014, at 10:15 AM, Nick Tustison wrote: > Sorry, Brad, but I'm currently in Salt Lake at a funeral. I'd really like to understand better so, if you're available, I can do it anytime during the week on another call. > > Sent from Howling Fantods > >> On Aug 1, 2014, at 7:36 AM, Bradley Lowekamp wrote: >> >> Nick, >> >> I hope you can make it to today's TCON. I can demo that notebook I linked too. It should clarify things. >> >> Brad >> >> On Jul 30, 2014, at 1:57 PM, Nicholas Tustison wrote: >> >>>> To try to summaries... sorry if have not been clear enough in my explanations. >>> >>> No, I blame me?I?m consistently distracted by the scenery outside here in >>> California and it?s definitely affecting my ability to concentrate on code >>> questions. >>> >>>> INITIAL QUESTION >>>> >>>> How does composite transform and the "Center" parameter interact? How does this relate to the virtual domain? >>> >>> The composite transform is agnostic with respect to whether or not a >>> transform has a center or any other fixed parameter set. The only >>> distinction we make is typology with respect to linear/deformable. To >>> be clear, we?re not discussing any of the ?Centered? transforms: >>> >>> * CenteredAffineTransform >>> * CenteredEuler3DTransform >>> * CenteredEuler2DTransform >>> * CenteredSimilarity2DTransform >>> >>> None of those transforms are used in ANTs but I don?t think >>> their optimization would be an issue in the new ITKv4 registration >>> framework. >>> >>> The virtual domain is simply defined in terms of standard image >>> geometry (origin, spacing, etc.) and is currently set in terms of the >>> fixed image geometry. >>> >>>> MY UNDERSTANDING >>>> >>>> 1) Using a "Center" initialized transform only works correctly for a single transform and directly with a composite. ( This is with the current center initializers, a different approach could be done which takes into consideration the composition ) >>> >>> I don?t see why it would only work correctly for a single transform. Suppose >>> I optimize a translation transform to get it?s optimal parameters for a given >>> registration problem. It?s not clear to me why it would be a problem to follow >>> that with optimizing an Euler3D transform (which we do all the time in ANTs). >>> Obviously, we have to specify a staring point for the second transform (which >>> is identity by default) and perhaps it would be better to have a different >>> starting point but I don?t see why starting with the default parameters is a >>> problem. >>> >>> If the ?Center initialized transform? is one of the transforms listed above >>> then we don?t use those. If it?s simply the result of using the >>> CenteredTransformInitializer, then we just pull the itk::TranslationTransform >>> part from the result and push that translation transform into the composite >>> transform queue. I don?t see why it would be a problem to then optimize, >>> for example, the Euler3DTransform which just has 3 translation parameters >>> and 3 angle parameters to optimize where the center is implicitly defined >>> (unlike the CenteredEuler3DTransform which does have additional Center >>> parameters). >>> >>>> 2) The virtual domain should be initialized such that the two images "Center"s are at the origin. This an alternative to using the "Center" transform parameters, and better works with composite transforms. >>> >>> Yes, that would probably be a better initialization but I don?t know why it would >>> be a problem for the current framework to optimize with the origin elsewhere. >>> Right now, each transform within the composite transform queue is >>> optimized starting from its identity parameters but perhaps the initializer >>> idea that you propose would improve optimization. >>> >>>> I was not aware that 2 was the best practice with the ITKv4 framework. Do we have any examples/test/documentation to indicate this? Further more using the current CenterTransformInitalizers to initialize the virtual domain is not readily apparent[1] how to map the parameters. >>>> PROPOSAL >>>> >>>> Perhaps we need a new Initializer filter to assist with initializing the virtual domain to initialize this practice? >>>> >>>> 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 ntustison at gmail.com Mon Aug 4 09:36:37 2014 From: ntustison at gmail.com (Nick Tustison) Date: Mon, 4 Aug 2014 06:36:37 -0700 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: <2BBBE077-9880-4FAC-9873-DC265CFD7C35@mail.nih.gov> References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <8C9CCC8B-5379-4A6A-902F-ACAE609F5789@gmail.com> <8727A959-8F80-471A-9E24-04C0E564D8DC@mail.nih.gov> <6D8816B7-9BE5-494A-BAE8-81057667632E@gmail.com> <2BBBE077-9880-4FAC-9873-DC265CFD7C35@mail.nih.gov> Message-ID: <51C874C8-7984-4C5C-B53B-F08D10B6BC6D@gmail.com> Hi Brad, Yes, 2 pm EST would work for me any day this week. Nick > On Aug 4, 2014, at 6:13 AM, Bradley Lowekamp wrote: > > Nick, > > Would 2pm EST on day this week for you for a google hang out? > > Let's plan on review these points I've made along with the notebooks. I'd think the likely output is going to be some initial requirements for a new transform optimizer for composite transforms and the v4 framework. > > Brad > >> On Aug 1, 2014, at 10:15 AM, Nick Tustison wrote: >> >> Sorry, Brad, but I'm currently in Salt Lake at a funeral. I'd really like to understand better so, if you're available, I can do it anytime during the week on another call. >> >> Sent from Howling Fantods >> >>> On Aug 1, 2014, at 7:36 AM, Bradley Lowekamp wrote: >>> >>> Nick, >>> >>> I hope you can make it to today's TCON. I can demo that notebook I linked too. It should clarify things. >>> >>> Brad >>> >>> On Jul 30, 2014, at 1:57 PM, Nicholas Tustison wrote: >>> >>>>> To try to summaries... sorry if have not been clear enough in my explanations. >>>> >>>> No, I blame me?I?m consistently distracted by the scenery outside here in >>>> California and it?s definitely affecting my ability to concentrate on code >>>> questions. >>>> >>>>> INITIAL QUESTION >>>>> >>>>> How does composite transform and the "Center" parameter interact? How does this relate to the virtual domain? >>>> >>>> The composite transform is agnostic with respect to whether or not a >>>> transform has a center or any other fixed parameter set. The only >>>> distinction we make is typology with respect to linear/deformable. To >>>> be clear, we?re not discussing any of the ?Centered? transforms: >>>> >>>> * CenteredAffineTransform >>>> * CenteredEuler3DTransform >>>> * CenteredEuler2DTransform >>>> * CenteredSimilarity2DTransform >>>> >>>> None of those transforms are used in ANTs but I don?t think >>>> their optimization would be an issue in the new ITKv4 registration >>>> framework. >>>> >>>> The virtual domain is simply defined in terms of standard image >>>> geometry (origin, spacing, etc.) and is currently set in terms of the >>>> fixed image geometry. >>>> >>>>> MY UNDERSTANDING >>>>> >>>>> 1) Using a "Center" initialized transform only works correctly for a single transform and directly with a composite. ( This is with the current center initializers, a different approach could be done which takes into consideration the composition ) >>>> >>>> I don?t see why it would only work correctly for a single transform. Suppose >>>> I optimize a translation transform to get it?s optimal parameters for a given >>>> registration problem. It?s not clear to me why it would be a problem to follow >>>> that with optimizing an Euler3D transform (which we do all the time in ANTs). >>>> Obviously, we have to specify a staring point for the second transform (which >>>> is identity by default) and perhaps it would be better to have a different >>>> starting point but I don?t see why starting with the default parameters is a >>>> problem. >>>> >>>> If the ?Center initialized transform? is one of the transforms listed above >>>> then we don?t use those. If it?s simply the result of using the >>>> CenteredTransformInitializer, then we just pull the itk::TranslationTransform >>>> part from the result and push that translation transform into the composite >>>> transform queue. I don?t see why it would be a problem to then optimize, >>>> for example, the Euler3DTransform which just has 3 translation parameters >>>> and 3 angle parameters to optimize where the center is implicitly defined >>>> (unlike the CenteredEuler3DTransform which does have additional Center >>>> parameters). >>>> >>>>> 2) The virtual domain should be initialized such that the two images "Center"s are at the origin. This an alternative to using the "Center" transform parameters, and better works with composite transforms. >>>> >>>> Yes, that would probably be a better initialization but I don?t know why it would >>>> be a problem for the current framework to optimize with the origin elsewhere. >>>> Right now, each transform within the composite transform queue is >>>> optimized starting from its identity parameters but perhaps the initializer >>>> idea that you propose would improve optimization. >>>> >>>>> I was not aware that 2 was the best practice with the ITKv4 framework. Do we have any examples/test/documentation to indicate this? Further more using the current CenterTransformInitalizers to initialize the virtual domain is not readily apparent[1] how to map the parameters. >>>>> PROPOSAL >>>>> >>>>> Perhaps we need a new Initializer filter to assist with initializing the virtual domain to initialize this practice? >>>>> >>>>> 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 Mon Aug 4 10:50:54 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 4 Aug 2014 10:50:54 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: <51C874C8-7984-4C5C-B53B-F08D10B6BC6D@gmail.com> References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <8C9CCC8B-5379-4A6A-902F-ACAE609F5789@gmail.com> <8727A959-8F80-471A-9E24-04C0E564D8DC@mail.nih.gov> <6D8816B7-9BE5-494A-BAE8-81057667632E@gmail.com> <2BBBE077-9880-4FAC-9873-DC265CFD7C35@mail.nih.gov> <51C874C8-7984-4C5C-B53B-F08D10B6BC6D@gmail.com> Message-ID: Hello, I have created an Google Hangout event, it should be shared with the ITKBarCamp Google+ group if others are interested in attending. Thanks, Brad On Aug 4, 2014, at 9:36 AM, Nick Tustison wrote: > Hi Brad, > > Yes, 2 pm EST would work for me any day this week. > > Nick > >> On Aug 4, 2014, at 6:13 AM, Bradley Lowekamp wrote: >> >> Nick, >> >> Would 2pm EST on day this week for you for a google hang out? >> >> Let's plan on review these points I've made along with the notebooks. I'd think the likely output is going to be some initial requirements for a new transform optimizer for composite transforms and the v4 framework. >> >> Brad >> >>> On Aug 1, 2014, at 10:15 AM, Nick Tustison wrote: >>> >>> Sorry, Brad, but I'm currently in Salt Lake at a funeral. I'd really like to understand better so, if you're available, I can do it anytime during the week on another call. >>> >>> Sent from Howling Fantods >>> >>>> On Aug 1, 2014, at 7:36 AM, Bradley Lowekamp wrote: >>>> >>>> Nick, >>>> >>>> I hope you can make it to today's TCON. I can demo that notebook I linked too. It should clarify things. >>>> >>>> Brad >>>> >>>> On Jul 30, 2014, at 1:57 PM, Nicholas Tustison wrote: >>>> >>>>>> To try to summaries... sorry if have not been clear enough in my explanations. >>>>> >>>>> No, I blame me?I?m consistently distracted by the scenery outside here in >>>>> California and it?s definitely affecting my ability to concentrate on code >>>>> questions. >>>>> >>>>>> INITIAL QUESTION >>>>>> >>>>>> How does composite transform and the "Center" parameter interact? How does this relate to the virtual domain? >>>>> >>>>> The composite transform is agnostic with respect to whether or not a >>>>> transform has a center or any other fixed parameter set. The only >>>>> distinction we make is typology with respect to linear/deformable. To >>>>> be clear, we?re not discussing any of the ?Centered? transforms: >>>>> >>>>> * CenteredAffineTransform >>>>> * CenteredEuler3DTransform >>>>> * CenteredEuler2DTransform >>>>> * CenteredSimilarity2DTransform >>>>> >>>>> None of those transforms are used in ANTs but I don?t think >>>>> their optimization would be an issue in the new ITKv4 registration >>>>> framework. >>>>> >>>>> The virtual domain is simply defined in terms of standard image >>>>> geometry (origin, spacing, etc.) and is currently set in terms of the >>>>> fixed image geometry. >>>>> >>>>>> MY UNDERSTANDING >>>>>> >>>>>> 1) Using a "Center" initialized transform only works correctly for a single transform and directly with a composite. ( This is with the current center initializers, a different approach could be done which takes into consideration the composition ) >>>>> >>>>> I don?t see why it would only work correctly for a single transform. Suppose >>>>> I optimize a translation transform to get it?s optimal parameters for a given >>>>> registration problem. It?s not clear to me why it would be a problem to follow >>>>> that with optimizing an Euler3D transform (which we do all the time in ANTs). >>>>> Obviously, we have to specify a staring point for the second transform (which >>>>> is identity by default) and perhaps it would be better to have a different >>>>> starting point but I don?t see why starting with the default parameters is a >>>>> problem. >>>>> >>>>> If the ?Center initialized transform? is one of the transforms listed above >>>>> then we don?t use those. If it?s simply the result of using the >>>>> CenteredTransformInitializer, then we just pull the itk::TranslationTransform >>>>> part from the result and push that translation transform into the composite >>>>> transform queue. I don?t see why it would be a problem to then optimize, >>>>> for example, the Euler3DTransform which just has 3 translation parameters >>>>> and 3 angle parameters to optimize where the center is implicitly defined >>>>> (unlike the CenteredEuler3DTransform which does have additional Center >>>>> parameters). >>>>> >>>>>> 2) The virtual domain should be initialized such that the two images "Center"s are at the origin. This an alternative to using the "Center" transform parameters, and better works with composite transforms. >>>>> >>>>> Yes, that would probably be a better initialization but I don?t know why it would >>>>> be a problem for the current framework to optimize with the origin elsewhere. >>>>> Right now, each transform within the composite transform queue is >>>>> optimized starting from its identity parameters but perhaps the initializer >>>>> idea that you propose would improve optimization. >>>>> >>>>>> I was not aware that 2 was the best practice with the ITKv4 framework. Do we have any examples/test/documentation to indicate this? Further more using the current CenterTransformInitalizers to initialize the virtual domain is not readily apparent[1] how to map the parameters. >>>>>> PROPOSAL >>>>>> >>>>>> Perhaps we need a new Initializer filter to assist with initializing the virtual domain to initialize this practice? >>>>>> >>>>>> 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 stnava at gmail.com Mon Aug 4 10:53:00 2014 From: stnava at gmail.com (brian avants) Date: Mon, 4 Aug 2014 10:53:00 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <8C9CCC8B-5379-4A6A-902F-ACAE609F5789@gmail.com> <8727A959-8F80-471A-9E24-04C0E564D8DC@mail.nih.gov> <6D8816B7-9BE5-494A-BAE8-81057667632E@gmail.com> <2BBBE077-9880-4FAC-9873-DC265CFD7C35@mail.nih.gov> <51C874C8-7984-4C5C-B53B-F08D10B6BC6D@gmail.com> Message-ID: what day? On Aug 4, 2014 10:50 AM, "Bradley Lowekamp" wrote: > Hello, > > I have created an Google Hangout event, it should be shared with the > ITKBarCamp Google+ group if others are interested in attending. > > Thanks, > Brad > > On Aug 4, 2014, at 9:36 AM, Nick Tustison wrote: > > > Hi Brad, > > > > Yes, 2 pm EST would work for me any day this week. > > > > Nick > > > >> On Aug 4, 2014, at 6:13 AM, Bradley Lowekamp > wrote: > >> > >> Nick, > >> > >> Would 2pm EST on day this week for you for a google hang out? > >> > >> Let's plan on review these points I've made along with the notebooks. > I'd think the likely output is going to be some initial requirements for a > new transform optimizer for composite transforms and the v4 framework. > >> > >> Brad > >> > >>> On Aug 1, 2014, at 10:15 AM, Nick Tustison > wrote: > >>> > >>> Sorry, Brad, but I'm currently in Salt Lake at a funeral. I'd really > like to understand better so, if you're available, I can do it anytime > during the week on another call. > >>> > >>> Sent from Howling Fantods > >>> > >>>> On Aug 1, 2014, at 7:36 AM, Bradley Lowekamp > wrote: > >>>> > >>>> Nick, > >>>> > >>>> I hope you can make it to today's TCON. I can demo that notebook I > linked too. It should clarify things. > >>>> > >>>> Brad > >>>> > >>>> On Jul 30, 2014, at 1:57 PM, Nicholas Tustison > wrote: > >>>> > >>>>>> To try to summaries... sorry if have not been clear enough in my > explanations. > >>>>> > >>>>> No, I blame me?I?m consistently distracted by the scenery outside > here in > >>>>> California and it?s definitely affecting my ability to concentrate > on code > >>>>> questions. > >>>>> > >>>>>> INITIAL QUESTION > >>>>>> > >>>>>> How does composite transform and the "Center" parameter interact? > How does this relate to the virtual domain? > >>>>> > >>>>> The composite transform is agnostic with respect to whether or not a > >>>>> transform has a center or any other fixed parameter set. The only > >>>>> distinction we make is typology with respect to linear/deformable. To > >>>>> be clear, we?re not discussing any of the ?Centered? transforms: > >>>>> > >>>>> * CenteredAffineTransform > >>>>> * CenteredEuler3DTransform > >>>>> * CenteredEuler2DTransform > >>>>> * CenteredSimilarity2DTransform > >>>>> > >>>>> None of those transforms are used in ANTs but I don?t think > >>>>> their optimization would be an issue in the new ITKv4 registration > >>>>> framework. > >>>>> > >>>>> The virtual domain is simply defined in terms of standard image > >>>>> geometry (origin, spacing, etc.) and is currently set in terms of the > >>>>> fixed image geometry. > >>>>> > >>>>>> MY UNDERSTANDING > >>>>>> > >>>>>> 1) Using a "Center" initialized transform only works correctly for > a single transform and directly with a composite. ( This is with the > current center initializers, a different approach could be done which takes > into consideration the composition ) > >>>>> > >>>>> I don?t see why it would only work correctly for a single transform. > Suppose > >>>>> I optimize a translation transform to get it?s optimal parameters > for a given > >>>>> registration problem. It?s not clear to me why it would be a > problem to follow > >>>>> that with optimizing an Euler3D transform (which we do all the time > in ANTs). > >>>>> Obviously, we have to specify a staring point for the second > transform (which > >>>>> is identity by default) and perhaps it would be better to have a > different > >>>>> starting point but I don?t see why starting with the default > parameters is a > >>>>> problem. > >>>>> > >>>>> If the ?Center initialized transform? is one of the transforms > listed above > >>>>> then we don?t use those. If it?s simply the result of using the > >>>>> CenteredTransformInitializer, then we just pull the > itk::TranslationTransform > >>>>> part from the result and push that translation transform into the > composite > >>>>> transform queue. I don?t see why it would be a problem to then > optimize, > >>>>> for example, the Euler3DTransform which just has 3 translation > parameters > >>>>> and 3 angle parameters to optimize where the center is implicitly > defined > >>>>> (unlike the CenteredEuler3DTransform which does have additional > Center > >>>>> parameters). > >>>>> > >>>>>> 2) The virtual domain should be initialized such that the two > images "Center"s are at the origin. This an alternative to using the > "Center" transform parameters, and better works with composite transforms. > >>>>> > >>>>> Yes, that would probably be a better initialization but I don?t know > why it would > >>>>> be a problem for the current framework to optimize with the origin > elsewhere. > >>>>> Right now, each transform within the composite transform queue is > >>>>> optimized starting from its identity parameters but perhaps the > initializer > >>>>> idea that you propose would improve optimization. > >>>>> > >>>>>> I was not aware that 2 was the best practice with the ITKv4 > framework. Do we have any examples/test/documentation to indicate this? > Further more using the current CenterTransformInitalizers to initialize > the virtual domain is not readily apparent[1] how to map the parameters. > >>>>>> PROPOSAL > >>>>>> > >>>>>> Perhaps we need a new Initializer filter to assist with > initializing the virtual domain to initialize this practice? > >>>>>> > >>>>>> 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 > -------------- 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 fttfzzx227 at 126.com Mon Aug 4 14:02:32 2014 From: fttfzzx227 at 126.com (tina) Date: Tue, 5 Aug 2014 02:02:32 +0800 Subject: [ITK] [ITK-users] [Insight-users] Principal Axes pre-registration Message-ID: <000001cfb00e$448ce9b0$cda6bd10$@126.com> Hi, Can anybody tell me about how to implement a principal axes registration use ITK? I use itkCenteredVersorTransformInitializer.txx to initialize the VersorRigid3DTransform,but this function didn't implement the rotation,so I try to compute the angle of rotation from the fixedPrincipalAxes and the movingPrincipalAxes, is there any way else to get the rotation matrix? Another problem is does the rotation matrix only specify one axis of the coordinate? I mean: in order to registrate two coordinates(x,y,z;x',y',z'),we should implement the VersorRigid3DTransform 3 times? Any help would be greatly appreciated! Best regards, Tina -------------- 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 Aug 4 14:12:59 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 4 Aug 2014 14:12:59 -0400 Subject: [ITK] [ITK-users] [Insight-users] Principal Axes pre-registration In-Reply-To: <000001cfb00e$448ce9b0$cda6bd10$@126.com> References: <000001cfb00e$448ce9b0$cda6bd10$@126.com> Message-ID: <5F66F56B-AB5F-491D-91C4-E60A83770043@mail.nih.gov> Hello, I just wrapped this class for SimpleITK. I found it odd that by default the "ComputeRotation" parameter is set to off. With turing this parameter on I got good initialization for some anisotropic blobs. Did you turn this on? Regarding you other question regarding the VersorTransfrom. The "versor" representation for rotation an represent an arbitrary rotation about the origin. So one is quite sufficient. Brad On Aug 4, 2014, at 2:02 PM, tina wrote: > Hi, > Can anybody tell me about how to implement a principal axes registration use ITK? I use itkCenteredVersorTransformInitializer.txx to initialize the VersorRigid3DTransform,but this function didn?t implement the rotation,so I try to compute the angle of rotation from the fixedPrincipalAxes and the movingPrincipalAxes, is there any way else to get the rotation matrix? > Another problem is does the rotation matrix only specify one axis of the coordinate? I mean: in order to registrate two coordinates(x,y,z;x?,y?,z?),we should implement the VersorRigid3DTransform 3 times? > Any help would be greatly appreciated! > Best regards, > Tina > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 ctrueden at wisc.edu Mon Aug 4 15:35:38 2014 From: ctrueden at wisc.edu (Curtis Rueden) Date: Mon, 4 Aug 2014 14:35:38 -0500 Subject: [ITK] [ITK-users] Extensions to the MetaImage (MHDs) IO-plugin to support compression and MHAs In-Reply-To: References: <27272_1406557413_s6SENUxH012254_53D65CD8.4080305@mh-hannover.de> Message-ID: Hi Roman, > I've extended the MetaImage (used by e.g. ITK/VTK) IO-plugin from > Kang Li (http://www.kangli.org/code/MetaImage_Reader_Writer.html) to > also support compression and local data storage, i.e. MHAs. The > MetaImage Reader/Writer from > (http://ij-plugins.sourceforge.net/plugins/3d-io/) seems not to > support this either. Reading and writing in Fiji was tested with MHDs > and MHAs created/read by ITK-4.5.1. While the plugin handles files > bigger than 4GB correctly, (for unknown reasons my) ITK seems to have > problems with MHDs/MHAs bigger than 4GB (in general). Interesting work. If you would like to get it upstream into Fiji, I suggest filing a Pull Request [1] against the IO repository [2]. Please also be aware that ImageJ is moving away from HandleExtraFileTypes hacks in favor of a unified Java library for image I/O known as SCIFIO [3]. There is already a SCIFIO/ITK bridge project [4, 5] that allows reading and writing SCIFIO formats within ITK. Regards, Curtis [1] https://help.github.com/articles/using-pull-requests [2] https://github.com/fiji/IO [3] http://imagej.net/SCIFIO [4] https://github.com/scifio/scifio-imageio [5] https://github.com/scifio/scifio-itk-bridge On Mon, Jul 28, 2014 at 12:34 PM, Williams, Norman K < norman-k-williams at uiowa.edu> wrote: > This is a good thing to submit to ITK proper; it would require conversion > to C++, though. > > On 7/28/14, 9:23 AM, "Dr. Roman Grothausmann" > wrote: > > >Dear mailing list members, > > > > > >I've extended the MetaImage (used by e.g. ITK/VTK) IO-plugin from Kang > >Li > >(http://www.kangli.org/code/MetaImage_Reader_Writer.html) to also support > >compression and local data storage, i.e. MHAs. The MetaImage > >Reader/Writer from > >(http://ij-plugins.sourceforge.net/plugins/3d-io/) seems not to support > >this > >either. > >Reading and writing in Fiji was tested with MHDs and MHAs created/read by > >ITK-4.5.1. While the plugin handles files bigger than 4GB correctly, (for > >unknown reasons my) ITK seems to have problems with MHDs/MHAs bigger than > >4GB > >(in general). > >The plugin does not check whether the size of the compressed data is > >correct, > >ITK however does. If the header lacks an entry of CompressedDataSize, ITK > >throws > >an error when reading/loading such a file. If the size specified with > >CompressedDataSize is too big, ITK just issues a warning. This was used > >as a > >workaround because I did not find an easy way in Java to put the correct > >value > >for CompressedDataSize without using extra temporary files (which might > >be quite > >big). > > > >Attached are the modified files (java-files, plugins.config and a > >repacked > >IO_-2.0.0-SNAPSHOT.jar). > >A modified HandleExtraFileTypes.java (based on: > >https://github.com/fiji/IO/blob/master/src/main/java/HandleExtraFileTypes > . > >java) > >is also included. > >Togehter with the modified Plugin it allows opening MHDs and MHAs > >directly. > > > > > >The repacked IO_-2.0.0-SNAPSHOT.jar was generated with: > > > >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. MetaImage_Reader.java > >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. MetaImage_Writer.java > >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. MetaImage_CWriter.java > > > >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. HandleExtraFileTypes.java > > > >The compiled Class-files were moved to a subfolder named io/: > >ExtendedFileOpener.class MetaImage_CWriter.class MetaImage_Writer.class > >ExtendedFileSaver.class MetaImage_Reader.class > >ReplacingInputStream.class > > > >And then included/replaced with zip: > >zip -r IO_-2.0.0-SNAPSHOT.jar plugins.config HandleExtraFileTypes.class > >io/ > > > >Feel free to add these extensions to the Plugin-Page or the ImageJ/Fiji > >repository. > >Any suggestions concerning improvements are very welcome. > > > > > >Many thanks for ImageJ/Fiji and the initial Metaimage IO-plugin. > >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 > > > > > > > >====================================================================== > >A potentially unsafe attachment has been removed from this email > >message. See http://its.uiowa.edu/support/article/100806 for further > >information. > > > >Removed attachment name(s): > >IO_-2.0.0-SNAPSHOT.jar > >====================================================================== > > > > > > ________________________________ > 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://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 ali-ghayoor at uiowa.edu Mon Aug 4 23:56:52 2014 From: ali-ghayoor at uiowa.edu (Ghayoor, Ali) Date: Tue, 5 Aug 2014 03:56:52 +0000 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> Message-ID: Hello Brad, It is an awesome way for demonstration, and thanks for verification of my example. It seems that this email is sent on Saturday, but unfortunately I got that this morning! And I should inspect the reason! Anyway, over the weekend I ran almost the same experiment in ITK and got close results to you. Also, today I tried to make the registration process work when Affine Transform is used in a multi stage structure, and here is my suggestion: I think we do not need to bother ourselves to think about a new optimizer or a new initializer for the composite transform since we can initialize the fixed parameters of each transform individually at the beginning of each stage. Remember how we run a BSpline registration stage after some linear registrations. At the beginning of the BSpline stage, we should instantiate a BSpline transform object and define its fixed parameters (grid size, etc). Then, we pass this initialized transform to the registration filter using ?SetInitialTransform()?, yet we can initialize this stage by passing a composite transform, resultant from the previous stages, to the registration filter by ?SetMovingInitialTransform()?. The same condition holds for all other transform types with fixed unoptimizable parameters like the center of rotation in our Affine transform case. Attachment file includes a multi stage registration example that I have created for the new software guide. In this example, we use a simple 2 stages registration process for a multi modal problem that moving image is misaligned from the fixed image by a translation shift and rotation. In registration process, a translation transform is followed by an affine transform. Also, an initial transform is used at the beginning. If I do not set the center of the affine transform, the registration fails as you have shown in your Ipython example. However, if at the beginning of the second stage, I compute the geometrical center (or center of the mass) of the fixed image, and pass that to the affine transform using ?SetCenter()? or ?SetFixedParameters()?, the registration succeeds. Please take a quick look in the attached file that also includes lots of explanations. Therefore, we can follow the same procedure for all other transform types that their fixed parameters are important in the optimization, but those fixed parameters cannot be set explicitly inside a composite transform. Please let me know with you think about this. Thank you, Ali From: Bradley Lowekamp > Date: Saturday, August 2, 2014 at 6:48 PM To: Ali Ghayoor > Cc: Hans Johnson >, Insight Developers List > Subject: Re: [ITK-dev] [ITK] Optimizing composite transforms and center of transform Hello Ali, I created a notebook to try to demonstrate the problem you are describing: http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb If the center of an Affine transformation isn't correctly initialized then the optimization is not speedy or robust. I think it's best illustrated with these two graphs: [unknown.png] [unknown.png] Notice that with the Center being the origin, all 1000 iterations are exhausted, and the metric is slowing decreasing. And this is with the translation path being around the length to 10. If the spacing was bigger or more offset from the origin the situation would be worse. I don't think this is a bug with the registration framework. I think new initializers for composite transforms are needed, along with documentation how the 2 good ways to initialize the registration methods transforms. Brad On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali > wrote: Brad, I have exactly the same issue. I wrote a simple registration program that is run in two stages: -Translation -Affine My fixed and moving images are in 2D, and the moving image is created from the fixed image by rotation of 10 degree and translation of [13,17] in X and Y directions. The first stage does a translation registration and the result transform is added to a composite transform that is used as the initial moving transform of the second stage. After the registration the result transform of the second stage is also added to the composite transform to be used by the resampler. I have printed the composite transform to the screen: 2481: CompositeTransform (0x7fa359a18b00) 2481: RTTI typeinfo: itk::CompositeTransform 2481: Reference Count: 2 2481: Modified Time: 20949 2481: Debug: Off 2481: Object Name: 2481: Observers: 2481: none 2481: Transforms in queue, from begin to end: 2481: >>>>>>>>> 2481: TranslationTransform (0x7fa359a199b0) 2481: RTTI typeinfo: itk::TranslationTransform 2481: Reference Count: 7 2481: Modified Time: 1648 2481: Debug: Off 2481: Object Name: 2481: Observers: 2481: none 2481: Offset: [12.801, 15.8578] 2481: >>>>>>>>> 2481: AffineTransform (0x7fa359d095a0) 2481: RTTI typeinfo: itk::AffineTransform 2481: Reference Count: 5 2481: Modified Time: 20946 2481: Debug: Off 2481: Object Name: 2481: Observers: 2481: none 2481: Matrix: 2481: 1.01593 -0.0100051 2481: -0.00835669 1.01113 2481: Offset: [-0.358829, -0.290093] 2481: Center: [0, 0] 2481: Translation: [-0.358829, -0.290093] 2481: Inverse: 2481: 0.984397 0.00974056 2481: 0.00813575 0.989073 2481: Singular: 0 2481: End of MultiTransform. 2481: <<<<<<<<<< As it can be seen, the translation transform provides a good initialization since its offset (Offset: [12.801, 15.8578]) is close to the shift parameters. However, the Affine transform fails to rotate the moving image since its Matrix is almost identity. Possible reason can be the improper Center of Affine transform that is fixed to [0,0], and not at geometrical center or center of mass. To make sure that I have not made any crazy mistake in my example, I simulated my example parameters in ANTs, and ANTs returned the same results and failed to register the images!! ANTs command line <<<<<<<<<<< PROGPATH=/scratch/ANTS/release-new/bin fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png time ${PROGPATH}/antsRegistration -d 2 \ --float \ --output [test1, warpedMoving.nii.gz] \ --transform "Translation[16]" \ --metric MI[${fi},${mi},1,32,None,1] \ --convergence [100,1e-2,5] \ --shrink-factors 3 \ --smoothing-sigmas 2 \ --use-histogram-matching 1 \ \ --transform "Affine[1]" \ --metric MI[${fi},${mi},1,32] \ --convergence [100x100,1e-2,2] \ --shrink-factors 2x1 \ --smoothing-sigmas 1x0 \ --use-histogram-matching 1 <<<<<<<<<<<<<<<<<<<<<<<< Fixed and moving images can be loaded from the ITK data files. What do you think about this example? Is it a bug in ITK or just the parameters are not tuned finely? Thanks, Ali ________________________________________ From: Johnson, Hans J Sent: Tuesday, July 29, 2014 6:19 PM To: Ghayoor, Ali Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of transform Ali, You need to follow this discussion. Hans On 7/29/14, 6:16 PM, "Bradley Lowekamp" > wrote: Hello, Ok, to further explore this problem, and hopeful help other people too: I created an IPython Notebook viewable here: http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl ob/master/Transform%20Composition%20And%20Order.ipynb It doesn't come through on the static page, but I added some nifty interactive slider widgets to change the rotation parameter. Which is really the point to enable understanding of the parameters for the transform and how they should be best optimized. The notebook should work with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one to try it out :) IPython Notebooks widget are very cool! EXPLANATION: The the order of the composite transform is that the new transforms are applied first. BUT they map from the virtual domain ( fixed ) to the moving image. Therefore if your first transform moves the center of mass to the origin then the second added transform's space will be centered on the mass, which is good for optimizing rotation and affine parameters. QUESTION: Therefore I am inclined to conclude that its best practices to map the fixed and moving image to the virtual domain such that the center of mass ( or some other "center feature" ) are at the origin. This would then the scale, rotation and other affine parameters around the center, with out having to used the "Center" parameter the transforms currently have. Is this what others are doing in their registration? For general best practices should this be recommend? @Brian I know I have seen this multi-domain description many time, but I think I may have just gotten it... Is the well describe in the literature some place? I think this may be an important part add the software guide. Thanks, Brad On Jul 29, 2014, at 5:38 PM, Matt McCormick > wrote: Hi Brad, Your assessment that the fixed center is important is correct. In most cases, a transform with a Center is the first transform in a Composite transform. There not any issues here. However, if the transform with a Center is further along the chain, then a CenteredTransformInitializer that was applied before the registration is started will not generate the desired result. In this case, we would have to respond to an Event in the registration process and estimated the center on the imaged after the other transforms have been applied. It is more work, but it is a more unusual case. HTH, Matt On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp > wrote: Helloo Nick! I am glad you got back to me. I suspect that I have spent more time this past week looking at the ITK affine transforms than anyone else[1] this week. With that here is my current understanding... 1) The CenterTransformInitializers estimates an initial "Center" and an initial "Translation" parameter from either the geometry or the first moments. From my problematic experiences, getting the initial transform which is a "good" guess is been critical for the optimizer to head to the correct solution. 2) The Center parameter of a transform can either be "Fixed" or an optimizable parameter. The transforms with the "Centered" monkier are the the ones with the Center parameter optimizable. This issue seems to be what you were referring to in to message. In many ways the point I am trying to make is independent of #2. I have observed that it's important to have the "Center" of an affine transform ( or sub parameterization thereof ) at the center of the object you are trying to register. That is the coordinate space of the optimizable parameters' point 0 is near the center. This enables rotation to easily rotate around the center, as well as scaling to maintain the same relative center when "zooming". This issue is independent of wether that center point can be optimized. For example, consider changing the origin of an image for alignment by say 500, and compensating with just an initial translation and not setting the "Center" parameter. If we are trying to optimize rotation and translation, then the optimization path would be very difficult to traverse with these inter-dependent parameters to force it to rotate around the center of the object. This scenario may be more common in microscopy then medical imaging, due to microscopy frequently having multiple subjects across large images. I could write up a IPython Notebook to illustrate the case. So that is my understanding of why using a fixed center is important. I thought this may have been shared knowledge, but perhaps is not or is incorrect... Now I am trying to understand how this interacts with all the coordinate frames involved with the ITKv4 registration framework, and the composite transforms. Specifically the composite transform apply the transforms in "reverse order"[2]. As I understand that that means that the newest transform get applied first. So that transform parameters are being optimized in the images space not in the virtual domains we are working towards. Therefore the center of our transforms is still important as we composite transforms? I hope I explained that clearly, a white board may really be needed.... Thanks, Brad [1] https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94 099d3519eb23bcc16c7cf015 [2] http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html On Jul 28, 2014, at 8:57 PM, Nicholas Tustison > wrote: Hi Brad, I apologize for the delayed response. I?m still catching up on my workload after moving to CA. We might want to talk to Luis as it was my understanding that the ?center? component of the linear transforms might be a carry-over from all the ?Centered? transforms, e.g., http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm l which, if I remember correctly, Luis said were somewhat sub optimally conceived but this was such a long time ago that I might be completely misremembering. However, fixing the center for all transforms within a composite transform is certainly not necessary within the specified framework. Rather, the matrix and offset are updated with the ?Center? being updated implicitly. Nick On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp > wrote: Hello, There are a lot of transforms involved in the new registration framework. I am trying to figure out what the implications for the fix parameters of the transform "Center" ( ie center of rotation/scaling ) are when combined with composite transforms and the fixed/moving/registration coordinate frames... Based on how the transforms are composed it seems necessary to set the fix "Center" for subsequent transformations. Additionally, I am unsure how one would "improve" ( poorly defined? ) the center for a subsequent transform ie Affine after a similarity... Are there some documented guidance or figures to help with this issue? Do we have a comprehensive diagram of these transforms? Thanks, 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 _______________________________________________ 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 ________________________________ 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. ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: unknown.png Type: image/png Size: 15787 bytes Desc: unknown.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: unknown.png Type: image/png Size: 15016 bytes Desc: unknown.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MultiStageImageRegistration1.cxx Type: application/octet-stream Size: 35511 bytes Desc: MultiStageImageRegistration1.cxx 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 michkapopoff at gmail.com Tue Aug 5 05:02:55 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Tue, 5 Aug 2014 11:02:55 +0200 Subject: [ITK] SSE2 errors on dashboard In-Reply-To: References: <8185AF24-9C31-405B-8CD6-CCCB57A6BC6C@gmail.com> <4EB827D9-070D-403E-9607-25306A768C9D@mail.nih.gov> Message-ID: <1B557792-9A5F-4B26-BD5B-B53F0C365AE3@gmail.com> The errors on the WrapITK dashboard are gone for all the machines, except the Fedora 19 one. The failings on the other machines were due to the bug in the new FTT filters which I fixed yesterday, so the build is green again :) These errors were not related to the SSE2 errors, I was confused as they appeared the same day ... Remain the SSE2 errors: - The Fedora 19 machine is failing on vnl_math.h, so I suppose that needs to be fixed first - Then we need to add the new gccxml to ITK, I am waiting on Matt?s return so he can upload a new tarball - Then we can look at Gert Wollny's patch for itkMathDetail.h, I want to see how this plays out with the new gccxml Michka On 3 ao?t 2014, at 16:21, Michka Popoff wrote: > MMh, I may have been a little bit too fast here. > The dashboard is failing on vnl_math.h, and Gert?s patch is for itkMathDetail.h. > > Gert?s patch is on gerrit (http://review.source.kitware.com/#/c/16499/) and it?s a different story, > so we can keep the discussion for this specific patch in the gerrit topic. > > What I can not understand is why all the Python dashboard and the Fedora-19-x86_64 machine suddenly started to have this error. > > Michka > > On 3 ao?t 2014, at 16:05, Bradley Lowekamp wrote: > >> Michka, >> >> I am not sure what that patch has to do with VNL. It's looks different. >> >> The patch in that JIRA issue was fixed by adding support that that version of GCC to gcc_xml.. >> >> On Aug 3, 2014, at 6:08 AM, Michka Popoff wrote: >> >>> Hi >>> >>> answering to myself, this is related to this Jira ticket: https://issues.itk.org/jira/browse/ITK-3299 >>> I?ll look at the provided patches and push them to gerrit so that we can fix this. >>> >>> Michka >>> >>> On 2 ao?t 2014, at 15:07, Michka Popoff wrote: >>> >>>> Hi >>>> Some SSE2 errors appeared on the dashboard on the 31 of July, see http://open.cdash.org/buildSummary.php?buildid=3431994 >>>> The errors appear also on the wrapping machines. >>>> Any clue what is causing this ? I was not able to determine the origin of it. >>>> /home/kevin/kitware/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:49:5: error: #error "Required file emmintrin.h for SSE2 not found" >>>> # error "Required file emmintrin.h for SSE2 not found? >>>> Michka >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent.ngai at gmail.com Tue Aug 5 05:26:31 2014 From: vincent.ngai at gmail.com (vincent ngai) Date: Tue, 5 Aug 2014 17:26:31 +0800 Subject: [ITK] [ITK-users] AffineTransform to 4x4 matrix...again maybe Message-ID: Hi all, apologies if this has been asked before, I googled the above but only got 4x4 -> AffineTransform and not the other way around. I need to get the output of an AffineTransform after registration to my OpenGL renderer. >From what I understand, the AffineTransform is composed of a Rotation, Center of Rotation and Translation. So would the following sequence of 4x4 transformation be correct? OGLM = InvCRM * Rot * CRM * TM where CRM = 4x4 identity matrix with indices [ 12, 13, 14] set to XYZ value of GetCenter() InvCRM = Inverse of CRM Rot = 4x4 Identity matrix with 3x3 set to the rotation parameters TM = 4x4 identity matrix with indicies[ 12, 13, 14 ] set to the translation parameters Essentially: 1) translate center to origin 2) perform rotation 3) translate back to where we were 4) slap on translation I am doing the above, but for some reason the translation does not match up. The rotation seems fine. -- Regards, Vincent -------------- 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 DotanG at azimutherapy.com Tue Aug 5 06:50:10 2014 From: DotanG at azimutherapy.com (Dotan Goberman) Date: Tue, 5 Aug 2014 12:50:10 +0200 Subject: [ITK] [ITK-users] ContourExtractor2DImageFilter Message-ID: Hello itk users. I saw the ContourExtractor2DImageFilter in the itkreview module, is there another filter that get as input Image and extract the isocontour as Polyline? Thanx in advance. Dotan -------------- 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 Aug 5 09:12:25 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 5 Aug 2014 09:12:25 -0400 Subject: [ITK] [ITK-users] AffineTransform to 4x4 matrix...again maybe In-Reply-To: References: Message-ID: <4D7F2AA9-48DF-4C78-BC5E-B8609CBF45E0@mail.nih.gov> Hello, That looks pretty close, but I think CRM[12,13,14] should be -GetCenter(), with the negative there. Then the TM should be applied last, using your original notation with the previously mentioned correction I'd expect this to be correct: OGLM = TM * InvCRM * Rot * CRM Hope that helps, Brad [1] http://www.itk.org/Doxygen/html/classitk_1_1MatrixOffsetTransformBase.html On Aug 5, 2014, at 5:26 AM, vincent ngai wrote: > Hi all, apologies if this has been asked before, I googled the above but only got 4x4 -> AffineTransform and not the other way around. > > I need to get the output of an AffineTransform after registration to my OpenGL renderer. > > From what I understand, the AffineTransform is composed of a Rotation, Center of Rotation and Translation. > > So would the following sequence of 4x4 transformation be correct? > > OGLM = InvCRM * Rot * CRM * TM > > where > > CRM = 4x4 identity matrix with indices [ 12, 13, 14] set to XYZ value of GetCenter() > InvCRM = Inverse of CRM > Rot = 4x4 Identity matrix with 3x3 set to the rotation parameters > TM = 4x4 identity matrix with indicies[ 12, 13, 14 ] set to the translation parameters > > Essentially: > > 1) translate center to origin > 2) perform rotation > 3) translate back to where we were > 4) slap on translation > > I am doing the above, but for some reason the translation does not match up. The rotation seems fine. > -- > Regards, > Vincent > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Aug 5 09:03:11 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 5 Aug 2014 09:03:11 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> Message-ID: <85D2068C-A0FC-46EE-8CF8-3F44CDB40E5D@mail.nih.gov> Ali, Glad to hear the registration iteration graphs where effective. Yes, you are right you can initialize the parameters of the second stage affine registration. Specifically the Center. However, it not readily apparent ( no example, no filter/initializer ) how that center fixed parameter should be initialized. And the "CenteredTransformInitializer" is not the correct way. For a Composite transformed defined as ?=T0(T1(x)) where ?:?fixed??moving then if C such that C??moving is the correct center initialization for T1, then the correct center initialization for T0 when in the composite transform is C?=T?10(C). Cool pasting from the IPython Notebook with inline latex appears to have worked :) While it is easy to do this with the MomentsCaluclator and manually doing the transform inverse, I think to make it more readily apparent and easier to use it should be available as a filter/initializer. There are several things that are done manually in the examples that I would think should be updated to use the latest filters and initializers. For example The BSplines are manually initialized instead of using the BSplineTransform Initializer[1]. Additionally, conversion of BSpline to a deformation field[2], and the the upsampling of the BSpine[3], though that last one still looks like ITKv3 framework, so maybe it'll be updated to the adaptors with v4. However I am after simple functions for these common tasks for SimpleITK, so I have a bit different perspective then one who is OK with implementing a 50 line solution in C++ and being OK with the interface. We'll discuss these initialization issue further this afternoon. Brad [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L215-L235 [2] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L401-L430 [3] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration6.cxx#L273-L330 On Aug 4, 2014, at 11:56 PM, Ghayoor, Ali wrote: > Hello Brad, > > It is an awesome way for demonstration, and thanks for verification of my example. It seems that this email is sent on Saturday, but unfortunately I got that this morning! And I should inspect the reason! > Anyway, over the weekend I ran almost the same experiment in ITK and got close results to you. > > Also, today I tried to make the registration process work when Affine Transform is used in a multi stage structure, and here is my suggestion: > > I think we do not need to bother ourselves to think about a new optimizer or a new initializer for the composite transform since we can initialize the fixed parameters of each transform individually at the beginning of each stage. > > Remember how we run a BSpline registration stage after some linear registrations. At the beginning of the BSpline stage, we should instantiate a BSpline transform object and define its fixed parameters (grid size, etc). Then, we pass this initialized transform to the registration filter using ?SetInitialTransform()?, yet we can initialize this stage by passing a composite transform, resultant from the previous stages, to the registration filter by ?SetMovingInitialTransform()?. > > The same condition holds for all other transform types with fixed unoptimizable parameters like the center of rotation in our Affine transform case. Attachment file includes a multi stage registration example that I have created for the new software guide. In this example, we use a simple 2 stages registration process for a multi modal problem that moving image is misaligned from the fixed image by a translation shift and rotation. In registration process, a translation transform is followed by an affine transform. Also, an initial transform is used at the beginning. > > If I do not set the center of the affine transform, the registration fails as you have shown in your Ipython example. However, if at the beginning of the second stage, I compute the geometrical center (or center of the mass) of the fixed image, and pass that to the affine transform using ?SetCenter()? or ?SetFixedParameters()?, the registration succeeds. Please take a quick look in the attached file that also includes lots of explanations. > > Therefore, we can follow the same procedure for all other transform types that their fixed parameters are important in the optimization, but those fixed parameters cannot be set explicitly inside a composite transform. Please let me know with you think about this. > > Thank you, > Ali > > > From: Bradley Lowekamp > Date: Saturday, August 2, 2014 at 6:48 PM > To: Ali Ghayoor > Cc: Hans Johnson , Insight Developers List > Subject: Re: [ITK-dev] [ITK] Optimizing composite transforms and center of transform > > Hello Ali, > > I created a notebook to try to demonstrate the problem you are describing: > http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb > > If the center of an Affine transformation isn't correctly initialized then the optimization is not speedy or robust. I think it's best illustrated with these two graphs: > > > > > Notice that with the Center being the origin, all 1000 iterations are exhausted, and the metric is slowing decreasing. And this is with the translation path being around the length to 10. If the spacing was bigger or more offset from the origin the situation would be worse. > > I don't think this is a bug with the registration framework. I think new initializers for composite transforms are needed, along with documentation how the 2 good ways to initialize the registration methods transforms. > > > Brad > > On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali wrote: > >> Brad, >> >> I have exactly the same issue. I wrote a simple registration program that is run in two stages: >> -Translation >> -Affine >> >> My fixed and moving images are in 2D, and the moving image is created from the fixed image by >> rotation of 10 degree and translation of [13,17] in X and Y directions. >> >> The first stage does a translation registration and the result transform is added to a composite transform >> that is used as the initial moving transform of the second stage. >> >> After the registration the result transform of the second stage is also added to the composite transform >> to be used by the resampler. >> >> I have printed the composite transform to the screen: >> >> 2481: CompositeTransform (0x7fa359a18b00) >> 2481: RTTI typeinfo: itk::CompositeTransform >> 2481: Reference Count: 2 >> 2481: Modified Time: 20949 >> 2481: Debug: Off >> 2481: Object Name: >> 2481: Observers: >> 2481: none >> 2481: Transforms in queue, from begin to end: >> 2481: >>>>>>>>> >> 2481: TranslationTransform (0x7fa359a199b0) >> 2481: RTTI typeinfo: itk::TranslationTransform >> 2481: Reference Count: 7 >> 2481: Modified Time: 1648 >> 2481: Debug: Off >> 2481: Object Name: >> 2481: Observers: >> 2481: none >> 2481: Offset: [12.801, 15.8578] >> 2481: >>>>>>>>> >> 2481: AffineTransform (0x7fa359d095a0) >> 2481: RTTI typeinfo: itk::AffineTransform >> 2481: Reference Count: 5 >> 2481: Modified Time: 20946 >> 2481: Debug: Off >> 2481: Object Name: >> 2481: Observers: >> 2481: none >> 2481: Matrix: >> 2481: 1.01593 -0.0100051 >> 2481: -0.00835669 1.01113 >> 2481: Offset: [-0.358829, -0.290093] >> 2481: Center: [0, 0] >> 2481: Translation: [-0.358829, -0.290093] >> 2481: Inverse: >> 2481: 0.984397 0.00974056 >> 2481: 0.00813575 0.989073 >> 2481: Singular: 0 >> 2481: End of MultiTransform. >> 2481: <<<<<<<<<< >> >> As it can be seen, the translation transform provides a good initialization since its offset (Offset: [12.801, 15.8578]) is close to the shift parameters. >> >> However, the Affine transform fails to rotate the moving image since its Matrix is almost identity. >> Possible reason can be the improper Center of Affine transform that is fixed to [0,0], and not at geometrical center or center of mass. >> >> To make sure that I have not made any crazy mistake in my example, I simulated my example parameters in ANTs, and ANTs returned >> the same results and failed to register the images!! >> >>>>>>> ANTs command line <<<<<<<<<<< >> >> PROGPATH=/scratch/ANTS/release-new/bin >> fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png >> mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png >> >> time ${PROGPATH}/antsRegistration -d 2 \ >> --float \ >> --output [test1, warpedMoving.nii.gz] \ >> --transform "Translation[16]" \ >> --metric MI[${fi},${mi},1,32,None,1] \ >> --convergence [100,1e-2,5] \ >> --shrink-factors 3 \ >> --smoothing-sigmas 2 \ >> --use-histogram-matching 1 \ >> \ >> --transform "Affine[1]" \ >> --metric MI[${fi},${mi},1,32] \ >> --convergence [100x100,1e-2,2] \ >> --shrink-factors 2x1 \ >> --smoothing-sigmas 1x0 \ >> --use-histogram-matching 1 >> >> <<<<<<<<<<<<<<<<<<<<<<<< >> >> Fixed and moving images can be loaded from the ITK data files. What do you think about this example? Is it a bug in ITK or just the parameters are not tuned finely? >> >> Thanks, >> Ali >> >> ________________________________________ >> From: Johnson, Hans J >> Sent: Tuesday, July 29, 2014 6:19 PM >> To: Ghayoor, Ali >> Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of transform >> >> Ali, >> >> You need to follow this discussion. >> >> Hans >> >> On 7/29/14, 6:16 PM, "Bradley Lowekamp" wrote: >> >>> Hello, >>> >>> Ok, to further explore this problem, and hopeful help other people too: I >>> created an IPython Notebook viewable here: >>> http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl >>> ob/master/Transform%20Composition%20And%20Order.ipynb >>> >>> It doesn't come through on the static page, but I added some nifty >>> interactive slider widgets to change the rotation parameter. Which is >>> really the point to enable understanding of the parameters for the >>> transform and how they should be best optimized. The notebook should work >>> with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one >>> to try it out :) IPython Notebooks widget are very cool! >>> >>> EXPLANATION: >>> >>> The the order of the composite transform is that the new transforms are >>> applied first. >>> >>> BUT they map from the virtual domain ( fixed ) to the moving image. >>> Therefore if your first transform moves the center of mass to the origin >>> then the second added transform's space will be centered on the mass, >>> which is good for optimizing rotation and affine parameters. >>> >>> QUESTION: >>> >>> Therefore I am inclined to conclude that its best practices to map the >>> fixed and moving image to the virtual domain such that the center of mass >>> ( or some other "center feature" ) are at the origin. This would then the >>> scale, rotation and other affine parameters around the center, with out >>> having to used the "Center" parameter the transforms currently have. >>> >>> Is this what others are doing in their registration? For general best >>> practices should this be recommend? >>> >>> @Brian I know I have seen this multi-domain description many time, but I >>> think I may have just gotten it... Is the well describe in the literature >>> some place? I think this may be an important part add the software guide. >>> >>> Thanks, >>> Brad >>> >>> >>> >>> >>> On Jul 29, 2014, at 5:38 PM, Matt McCormick >>> wrote: >>> >>>> Hi Brad, >>>> >>>> Your assessment that the fixed center is important is correct. >>>> >>>> In most cases, a transform with a Center is the first transform in a >>>> Composite transform. There not any issues here. However, if the >>>> transform with a Center is further along the chain, then a >>>> CenteredTransformInitializer that was applied before the registration >>>> is started will not generate the desired result. In this case, we >>>> would have to respond to an Event in the registration process and >>>> estimated the center on the imaged after the other transforms have >>>> been applied. It is more work, but it is a more unusual case. >>>> >>>> HTH, >>>> Matt >>>> >>>> >>>> >>>> On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp >>>> wrote: >>>>> Helloo Nick! >>>>> >>>>> I am glad you got back to me. >>>>> >>>>> I suspect that I have spent more time this past week looking at the >>>>> ITK affine transforms than anyone else[1] this week. With that here is >>>>> my current understanding... >>>>> >>>>> 1) The CenterTransformInitializers estimates an initial "Center" and >>>>> an initial "Translation" parameter from either the geometry or the >>>>> first moments. From my problematic experiences, getting the initial >>>>> transform which is a "good" guess is been critical for the optimizer to >>>>> head to the correct solution. >>>>> >>>>> 2) The Center parameter of a transform can either be "Fixed" or an >>>>> optimizable parameter. The transforms with the "Centered" monkier are >>>>> the the ones with the Center parameter optimizable. This issue seems to >>>>> be what you were referring to in to message. >>>>> >>>>> In many ways the point I am trying to make is independent of #2. I >>>>> have observed that it's important to have the "Center" of an affine >>>>> transform ( or sub parameterization thereof ) at the center of the >>>>> object you are trying to register. That is the coordinate space of the >>>>> optimizable parameters' point 0 is near the center. This enables >>>>> rotation to easily rotate around the center, as well as scaling to >>>>> maintain the same relative center when "zooming". This issue is >>>>> independent of wether that center point can be optimized. >>>>> >>>>> For example, consider changing the origin of an image for alignment by >>>>> say 500, and compensating with just an initial translation and not >>>>> setting the "Center" parameter. If we are trying to optimize rotation >>>>> and translation, then the optimization path would be very difficult to >>>>> traverse with these inter-dependent parameters to force it to rotate >>>>> around the center of the object. This scenario may be more common in >>>>> microscopy then medical imaging, due to microscopy frequently having >>>>> multiple subjects across large images. I could write up a IPython >>>>> Notebook to illustrate the case. >>>>> >>>>> So that is my understanding of why using a fixed center is important. >>>>> I thought this may have been shared knowledge, but perhaps is not or is >>>>> incorrect... >>>>> >>>>> Now I am trying to understand how this interacts with all the >>>>> coordinate frames involved with the ITKv4 registration framework, and >>>>> the composite transforms. Specifically the composite transform apply >>>>> the transforms in "reverse order"[2]. As I understand that that means >>>>> that the newest transform get applied first. So that transform >>>>> parameters are being optimized in the images space not in the virtual >>>>> domains we are working towards. Therefore the center of our transforms >>>>> is still important as we composite transforms? >>>>> >>>>> I hope I explained that clearly, a white board may really be needed.... >>>>> >>>>> Thanks, >>>>> Brad >>>>> >>>>> >>>>> [1] >>>>> https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94 >>>>> 099d3519eb23bcc16c7cf015 >>>>> [2] http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html >>>>> >>>>> On Jul 28, 2014, at 8:57 PM, Nicholas Tustison >>>>> wrote: >>>>> >>>>>> Hi Brad, >>>>>> >>>>>> I apologize for the delayed response. I?m still catching up on my >>>>>> workload after moving to CA. We might want to talk to Luis as it >>>>>> was my understanding that the ?center? component of the linear >>>>>> transforms might be a carry-over from all the ?Centered? transforms, >>>>>> e.g., >>>>>> >>>>>> >>>>>> http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm >>>>>> l >>>>>> >>>>>> which, if I remember correctly, Luis said were somewhat sub optimally >>>>>> conceived but this was such a long time ago that I might be completely >>>>>> misremembering. However, fixing the center for all transforms within >>>>>> a composite transform is certainly not necessary within the specified >>>>>> framework. Rather, the matrix and offset are updated with the >>>>>> ?Center? >>>>>> being updated implicitly. >>>>>> >>>>>> Nick >>>>>> >>>>>> >>>>>> >>>>>> On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp >>>>>> wrote: >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> There are a lot of transforms involved in the new registration >>>>>>> framework. >>>>>>> >>>>>>> I am trying to figure out what the implications for the fix >>>>>>> parameters of the transform "Center" ( ie center of rotation/scaling >>>>>>> ) are when combined with composite transforms and the >>>>>>> fixed/moving/registration coordinate frames... >>>>>>> >>>>>>> Based on how the transforms are composed it seems necessary to set >>>>>>> the fix "Center" for subsequent transformations. Additionally, I am >>>>>>> unsure how one would "improve" ( poorly defined? ) the center for a >>>>>>> subsequent transform ie Affine after a similarity... >>>>>>> >>>>>>> Are there some documented guidance or figures to help with this >>>>>>> issue? >>>>>>> Do we have a comprehensive diagram of these transforms? >>>>>>> >>>>>>> Thanks, >>>>>>> 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 >>>>> _______________________________________________ >>>>> 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 >> >> >> >> ________________________________ >> 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. >> ________________________________ > > -------------- 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 skalexander at gmail.com Tue Aug 5 09:34:40 2014 From: skalexander at gmail.com (Simon Alexander) Date: Tue, 5 Aug 2014 09:34:40 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: <85D2068C-A0FC-46EE-8CF8-3F44CDB40E5D@mail.nih.gov> References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> <85D2068C-A0FC-46EE-8CF8-3F44CDB40E5D@mail.nih.gov> Message-ID: Hi all, I have recently been playing around with this issue also. Has your hangout happened already? Is there a summary of conclusions planned or existing? Thanks! On Tue, Aug 5, 2014 at 9:03 AM, Bradley Lowekamp wrote: > Ali, > > Glad to hear the registration iteration graphs where effective. > > Yes, you are right you can initialize the parameters of the second stage > affine registration. Specifically the Center. However, it not readily > apparent ( no example, no filter/initializer ) how that center fixed > parameter should be initialized. And the "CenteredTransformInitializer" is > not the correct way. > > For a Composite transformed defined as ?=T0(T1(x)) where ?:?fixed??moving then > if C such that C??moving is the correct center initialization for T1, > then the correct center initialization for T0 when in the composite > transform is C?=T?10(C). > > Cool pasting from the IPython Notebook with inline latex appears to have > worked :) > > While it is easy to do this with the MomentsCaluclator and manually doing > the transform inverse, I think to make it more readily apparent and easier > to use it should be available as a filter/initializer. > > There are several things that are done manually in the examples that I > would think should be updated to use the latest filters and initializers. > For example The BSplines are manually initialized instead of using the > BSplineTransform Initializer[1]. Additionally, conversion of BSpline to a > deformation field[2], and the the upsampling of the BSpine[3], though that > last one still looks like ITKv3 framework, so maybe it'll be updated to the > adaptors with v4. However I am after simple functions for these common > tasks for SimpleITK, so I have a bit different perspective then one who is > OK with implementing a 50 line solution in C++ and being OK with the > interface. > > We'll discuss these initialization issue further this afternoon. > > Brad > > [1] > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L215-L235 > [2] > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L401-L430 > [3] > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration6.cxx#L273-L330 > > On Aug 4, 2014, at 11:56 PM, Ghayoor, Ali wrote: > > Hello Brad, > > It is an awesome way for demonstration, and thanks for verification of > my example. It seems that this email is sent on Saturday, but unfortunately > I got that this morning! And I should inspect the reason! > Anyway, over the weekend I ran almost the same experiment in ITK and got > close results to you. > > Also, today I tried to make the registration process work when Affine > Transform is used in a multi stage structure, and here is my suggestion: > > I think we do not need to bother ourselves to think about a new > optimizer or a new initializer for the composite transform since we can > initialize the fixed parameters of each transform individually at the > beginning of each stage. > > Remember how we run a BSpline registration stage after some linear > registrations. At the beginning of the BSpline stage, we should instantiate > a BSpline transform object and define its fixed parameters (grid size, > etc). Then, we pass this initialized transform to the registration filter > using ?SetInitialTransform()?, yet we can initialize this stage by passing > a composite transform, resultant from the previous stages, to the > registration filter by ?SetMovingInitialTransform()?. > > The same condition holds for all other transform types with fixed > unoptimizable parameters like the center of rotation in our Affine > transform case. Attachment file includes a multi stage registration example > that I have created for the new software guide. In this example, we use a > simple 2 stages registration process for a multi modal problem that moving > image is misaligned from the fixed image by a translation shift and > rotation. In registration process, a translation transform is followed by > an affine transform. Also, an initial transform is used at the beginning. > > If I do not set the center of the affine transform, the registration > fails as you have shown in your Ipython example. However, if at the > beginning of the second stage, I compute the geometrical center (or center > of the mass) of the fixed image, and pass that to the affine transform > using ?SetCenter()? or ?SetFixedParameters()?, the registration succeeds. > Please take a quick look in the attached file that also includes lots of > explanations. > > Therefore, we can follow the same procedure for all other transform > types that their fixed parameters are important in the optimization, but > those fixed parameters cannot be set explicitly inside a composite > transform. Please let me know with you think about this. > > Thank you, > Ali > > > From: Bradley Lowekamp > Date: Saturday, August 2, 2014 at 6:48 PM > To: Ali Ghayoor > Cc: Hans Johnson , Insight Developers List < > insight-developers at public.kitware.com> > Subject: Re: [ITK-dev] [ITK] Optimizing composite transforms and center > of transform > > Hello Ali, > > I created a notebook to try to demonstrate the problem you are > describing: > > http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb > > If the center of an Affine transformation isn't correctly initialized > then the optimization is not speedy or robust. I think it's best > illustrated with these two graphs: > > > > > Notice that with the Center being the origin, all 1000 iterations are > exhausted, and the metric is slowing decreasing. And this is with the > translation path being around the length to 10. If the spacing was bigger > or more offset from the origin the situation would be worse. > > I don't think this is a bug with the registration framework. I think new > initializers for composite transforms are needed, along with documentation > how the 2 good ways to initialize the registration methods transforms. > > > Brad > > On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali wrote: > > Brad, > > I have exactly the same issue. I wrote a simple registration program that > is run in two stages: > -Translation > -Affine > > My fixed and moving images are in 2D, and the moving image is created from > the fixed image by > rotation of 10 degree and translation of [13,17] in X and Y directions. > > The first stage does a translation registration and the result transform > is added to a composite transform > that is used as the initial moving transform of the second stage. > > After the registration the result transform of the second stage is also > added to the composite transform > to be used by the resampler. > > I have printed the composite transform to the screen: > > 2481: CompositeTransform (0x7fa359a18b00) > 2481: RTTI typeinfo: itk::CompositeTransform > 2481: Reference Count: 2 > 2481: Modified Time: 20949 > 2481: Debug: Off > 2481: Object Name: > 2481: Observers: > 2481: none > 2481: Transforms in queue, from begin to end: > 2481: >>>>>>>>> > 2481: TranslationTransform (0x7fa359a199b0) > 2481: RTTI typeinfo: itk::TranslationTransform > 2481: Reference Count: 7 > 2481: Modified Time: 1648 > 2481: Debug: Off > 2481: Object Name: > 2481: Observers: > 2481: none > 2481: Offset: [12.801, 15.8578] > 2481: >>>>>>>>> > 2481: AffineTransform (0x7fa359d095a0) > 2481: RTTI typeinfo: itk::AffineTransform > 2481: Reference Count: 5 > 2481: Modified Time: 20946 > 2481: Debug: Off > 2481: Object Name: > 2481: Observers: > 2481: none > 2481: Matrix: > 2481: 1.01593 -0.0100051 > 2481: -0.00835669 1.01113 > 2481: Offset: [-0.358829, -0.290093] > 2481: Center: [0, 0] > 2481: Translation: [-0.358829, -0.290093] > 2481: Inverse: > 2481: 0.984397 0.00974056 > 2481: 0.00813575 0.989073 > 2481: Singular: 0 > 2481: End of MultiTransform. > 2481: <<<<<<<<<< > > As it can be seen, the translation transform provides a good > initialization since its offset (Offset: [12.801, 15.8578]) is close to the > shift parameters. > > However, the Affine transform fails to rotate the moving image since its > Matrix is almost identity. > Possible reason can be the improper Center of Affine transform that is > fixed to [0,0], and not at geometrical center or center of mass. > > To make sure that I have not made any crazy mistake in my example, I > simulated my example parameters in ANTs, and ANTs returned > the same results and failed to register the images!! > > ANTs command line <<<<<<<<<<< > > > PROGPATH=/scratch/ANTS/release-new/bin > > fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png > > mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png > > time ${PROGPATH}/antsRegistration -d 2 \ > --float \ > --output [test1, warpedMoving.nii.gz] \ > --transform "Translation[16]" \ > --metric MI[${fi},${mi},1,32,None,1] \ > --convergence [100,1e-2,5] \ > --shrink-factors 3 \ > --smoothing-sigmas 2 \ > --use-histogram-matching 1 \ > \ > --transform "Affine[1]" \ > --metric MI[${fi},${mi},1,32] \ > --convergence [100x100,1e-2,2] \ > --shrink-factors 2x1 \ > --smoothing-sigmas 1x0 \ > --use-histogram-matching 1 > > <<<<<<<<<<<<<<<<<<<<<<<< > > Fixed and moving images can be loaded from the ITK data files. What do you > think about this example? Is it a bug in ITK or just the parameters are not > tuned finely? > > Thanks, > Ali > > ________________________________________ > From: Johnson, Hans J > Sent: Tuesday, July 29, 2014 6:19 PM > To: Ghayoor, Ali > Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of > transform > > Ali, > > You need to follow this discussion. > > Hans > > On 7/29/14, 6:16 PM, "Bradley Lowekamp" wrote: > > Hello, > > Ok, to further explore this problem, and hopeful help other people too: I > created an IPython Notebook viewable here: > http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl > ob/master/Transform%20Composition%20And%20Order.ipynb > > It doesn't come through on the static page, but I added some nifty > interactive slider widgets to change the rotation parameter. Which is > really the point to enable understanding of the parameters for the > transform and how they should be best optimized. The notebook should work > with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one > to try it out :) IPython Notebooks widget are very cool! > > EXPLANATION: > > The the order of the composite transform is that the new transforms are > applied first. > > BUT they map from the virtual domain ( fixed ) to the moving image. > Therefore if your first transform moves the center of mass to the origin > then the second added transform's space will be centered on the mass, > which is good for optimizing rotation and affine parameters. > > QUESTION: > > Therefore I am inclined to conclude that its best practices to map the > fixed and moving image to the virtual domain such that the center of mass > ( or some other "center feature" ) are at the origin. This would then the > scale, rotation and other affine parameters around the center, with out > having to used the "Center" parameter the transforms currently have. > > Is this what others are doing in their registration? For general best > practices should this be recommend? > > @Brian I know I have seen this multi-domain description many time, but I > think I may have just gotten it... Is the well describe in the literature > some place? I think this may be an important part add the software guide. > > Thanks, > Brad > > > > > On Jul 29, 2014, at 5:38 PM, Matt McCormick > wrote: > > Hi Brad, > > Your assessment that the fixed center is important is correct. > > In most cases, a transform with a Center is the first transform in a > Composite transform. There not any issues here. However, if the > transform with a Center is further along the chain, then a > CenteredTransformInitializer that was applied before the registration > is started will not generate the desired result. In this case, we > would have to respond to an Event in the registration process and > estimated the center on the imaged after the other transforms have > been applied. It is more work, but it is a more unusual case. > > HTH, > Matt > > > > On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp > wrote: > > Helloo Nick! > > I am glad you got back to me. > > I suspect that I have spent more time this past week looking at the > ITK affine transforms than anyone else[1] this week. With that here is > my current understanding... > > 1) The CenterTransformInitializers estimates an initial "Center" and > an initial "Translation" parameter from either the geometry or the > first moments. From my problematic experiences, getting the initial > transform which is a "good" guess is been critical for the optimizer to > head to the correct solution. > > 2) The Center parameter of a transform can either be "Fixed" or an > optimizable parameter. The transforms with the "Centered" monkier are > the the ones with the Center parameter optimizable. This issue seems to > be what you were referring to in to message. > > In many ways the point I am trying to make is independent of #2. I > have observed that it's important to have the "Center" of an affine > transform ( or sub parameterization thereof ) at the center of the > object you are trying to register. That is the coordinate space of the > optimizable parameters' point 0 is near the center. This enables > rotation to easily rotate around the center, as well as scaling to > maintain the same relative center when "zooming". This issue is > independent of wether that center point can be optimized. > > For example, consider changing the origin of an image for alignment by > say 500, and compensating with just an initial translation and not > setting the "Center" parameter. If we are trying to optimize rotation > and translation, then the optimization path would be very difficult to > traverse with these inter-dependent parameters to force it to rotate > around the center of the object. This scenario may be more common in > microscopy then medical imaging, due to microscopy frequently having > multiple subjects across large images. I could write up a IPython > Notebook to illustrate the case. > > So that is my understanding of why using a fixed center is important. > I thought this may have been shared knowledge, but perhaps is not or is > incorrect... > > Now I am trying to understand how this interacts with all the > coordinate frames involved with the ITKv4 registration framework, and > the composite transforms. Specifically the composite transform apply > the transforms in "reverse order"[2]. As I understand that that means > that the newest transform get applied first. So that transform > parameters are being optimized in the images space not in the virtual > domains we are working towards. Therefore the center of our transforms > is still important as we composite transforms? > > I hope I explained that clearly, a white board may really be needed.... > > Thanks, > Brad > > > [1] > https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94 > 099d3519eb23bcc16c7cf015 > [2] http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html > > On Jul 28, 2014, at 8:57 PM, Nicholas Tustison > wrote: > > Hi Brad, > > I apologize for the delayed response. I?m still catching up on my > workload after moving to CA. We might want to talk to Luis as it > was my understanding that the ?center? component of the linear > transforms might be a carry-over from all the ?Centered? transforms, > e.g., > > > http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm > l > > which, if I remember correctly, Luis said were somewhat sub optimally > conceived but this was such a long time ago that I might be completely > misremembering. However, fixing the center for all transforms within > a composite transform is certainly not necessary within the specified > framework. Rather, the matrix and offset are updated with the > ?Center? > being updated implicitly. > > Nick > > > > On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp > wrote: > > Hello, > > There are a lot of transforms involved in the new registration > framework. > > I am trying to figure out what the implications for the fix > parameters of the transform "Center" ( ie center of rotation/scaling > ) are when combined with composite transforms and the > fixed/moving/registration coordinate frames... > > Based on how the transforms are composed it seems necessary to set > the fix "Center" for subsequent transformations. Additionally, I am > unsure how one would "improve" ( poorly defined? ) the center for a > subsequent transform ie Affine after a similarity... > > Are there some documented guidance or figures to help with this > issue? > Do we have a comprehensive diagram of these transforms? > > Thanks, > 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 > _______________________________________________ > 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 > > > > > ________________________________ > 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 > > -------------- 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 Aug 5 11:37:46 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 5 Aug 2014 11:37:46 -0400 Subject: [ITK] [ITK-dev] Upgraded factory.kitware Mac compiler In-Reply-To: References: <96995EF3-CB2E-4DBD-9360-A7D3909D25E6@mail.nih.gov> Message-ID: Hi, I have updated the CDash at Home client configuration to use Clang instead of GCC. Clang will hopefully be more reliable with this new version of XCode. Thanks, Matt On Sat, Aug 2, 2014 at 11:25 AM, Bradley Lowekamp wrote: > OK, > > I think the compiler being used on the system is not a winner. > > Something need to be changes on the system to make this more identifiable, > perhaps changing the build name to be llvm-gcc-4.2. As it's not apparent in > the configuration: > > The C compiler identification is GNU 4.2.1 > -- The CXX compiler identification is GNU 4.2.1 > -- Checking whether C compiler has -isysroot > -- Checking whether C compiler has -isysroot - yes > -- Checking whether C compiler supports OSX deployment target flag > -- Checking whether C compiler supports OSX deployment target flag - yes > -- Check for working C compiler: /usr/bin/cc > -- Check for working C compiler: /usr/bin/cc -- works > -- Detecting C compiler ABI info > -- Detecting C compiler ABI info - done > -- Checking whether CXX compiler has -isysroot > -- Checking whether CXX compiler has -isysroot - yes > -- Checking whether CXX compiler supports OSX deployment target flag > -- Checking whether CXX compiler supports OSX deployment target flag - yes > -- Check for working CXX compiler: /usr/bin/c++ > -- Check for working CXX compiler: /usr/bin/c++ -- works > > Digging into the system information test[1] we can find the following: > > sing built-in specs. > Target: i686-apple-darwin10 > Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~3/src/configure > --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 > --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ > --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ > --with-slibdir=/usr/lib --build=i686-apple-darwin10 > --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~3/dst-llvmCore/Developer/usr/local > --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 > --target=i686-apple-darwin10 --with-gxx-include-dir=/usr/include/c++/4.2.1 > Thread model: posix > gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) > /usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/collect2 > -dynamic -arch x86_64 -macosx_version_min 10.6.8 -weak_reference_mismatches > non-weak -o cmTryCompileExec885700192 -lcrt1.10.6.o > -L/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1/x86_64 > -L/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 > -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 > -L/usr/lib/i686-apple-darwin10/4.2.1 > -L/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1 > -L/usr/llvm-gcc-4.2/bin/../lib/gcc > -L/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1 > -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 > -L/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1/../../.. > -L/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/../../.. > -search_paths_first -headerpad_max_install_names -v > CMakeFiles/cmTryCompileExec885700192.dir/CMakeCCompilerABI.c.o -lSystem > -lgcc -lSystem > collect2 version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build > 2336.1.00) (i686 Darwin) > > > But the GCC masquerading version is not too helpful. > > [1] http://open.cdash.org/testDetails.php?test=272099142&build=3433750 > On Aug 2, 2014, at 11:03 AM, Jean-Christophe Fillion-Robin > wrote: > > Hi Brad, > > All details are captured here: > > http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=23528 > > > XCode before: > > * Xcode: 3.2.6 - uildVersion: 10M2518 > * gcc-4.0: i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build > 5494) > * gcc-4.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build > 5666) (dot 3) > * llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple > Inc. build 5658) (LLVM build 2335.6) > * clang: Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM > 2.9svn > > XCode after: > > * Xcode: 4.2 - Build version 4C199 > * gcc-4.0: i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build > 5494) > * gcc-4.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build > 5666) (dot 3) > * llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple > Inc. build 5658) (LLVM build 2336.1.00) > * clang: Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM > 3.0svn) > > > > Hth > Jc > > > On Sat, Aug 2, 2014 at 8:39 AM, Bradley Lowekamp > wrote: >> >> Hello, >> >> Hello there is recently some regular failing tests on the factory.kitware >> Mac robot build: >> http://open.cdash.org/viewTest.php?onlyfailed&buildid=3433716 >> >> What specific compiler, Xcode, and os version is the system now running? >> Was it recently upgraded? >> >> These failures look vaguely familiar to me, not sure quite why. May have >> been at some point in the GNU gcc->llvm-gcc transition when things didn't >> work too good... >> >> Brad >> >> > > > > -- > +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 mercikd at thomas.edu Tue Aug 5 14:34:06 2014 From: mercikd at thomas.edu (Dan Mercik) Date: Tue, 5 Aug 2014 18:34:06 +0000 Subject: [ITK] [ITK-users] MultiThreader? Message-ID: <2ceb68bacb674825b2ca5e795c48800c@T9.tcnet.thomas.edu> Hey, After running my code I caught an exception trying to write deconstructing output. The error occurred during single method execute. I also got an error That the DownSampleImageFilter subclass should override this method. I took a snippet of error output I received which is located attached to this email. Do you have any idea on how to solve this issue? Daniel Mercik Computer Science Major Service Desk Technician Thomas College -------------- next part -------------- A non-text attachment was scrubbed... Name: Multithreader.JPG Type: image/jpeg Size: 56571 bytes Desc: Multithreader.JPG 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 Aug 5 15:04:45 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 5 Aug 2014 15:04:45 -0400 Subject: [ITK] [ITK-users] MultiThreader? In-Reply-To: <2ceb68bacb674825b2ca5e795c48800c@T9.tcnet.thomas.edu> References: <2ceb68bacb674825b2ca5e795c48800c@T9.tcnet.thomas.edu> Message-ID: Hi Dan, Does your DownSampleImageFilter have a ThreadedGenerateData method? If so, its method may need to be updated to use "ThreadIdType" as indicated in the error message. Hope this helps, Matt On Tue, Aug 5, 2014 at 2:34 PM, Dan Mercik wrote: > Hey, > > After running my code I caught an exception trying to write deconstructing output. The error occurred > > during single method execute. I also got an error That the DownSampleImageFilter subclass should override this method. I took a snippet of error output I received which is located attached to this email. Do you have any idea on how to solve this issue? > > Daniel Mercik > > Computer Science Major > > Service Desk Technician > > Thomas College > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 vincent.ngai at gmail.com Tue Aug 5 22:08:13 2014 From: vincent.ngai at gmail.com (vincent ngai) Date: Wed, 6 Aug 2014 10:08:13 +0800 Subject: [ITK] [ITK-users] AffineTransform to 4x4 matrix...again maybe In-Reply-To: <4D7F2AA9-48DF-4C78-BC5E-B8609CBF45E0@mail.nih.gov> References: <4D7F2AA9-48DF-4C78-BC5E-B8609CBF45E0@mail.nih.gov> Message-ID: Hi Bradley, Hmm, GetCenter() negated should be the same as InvCRM. I'll flip the order of the multiplication and see what happens, it could be the C++ operator*() order being different from the way its written. Its so annoying to get the results close but not exact :( Thanks On Tue, Aug 5, 2014 at 9:12 PM, Bradley Lowekamp wrote: > Hello, > > That looks pretty close, but I think CRM[12,13,14] should be -GetCenter(), > with the negative there. Then the TM should be applied last, using your > original notation with the previously mentioned correction I'd expect this > to be correct: > > OGLM = TM * InvCRM * Rot * CRM > > Hope that helps, > Brad > > [1] > http://www.itk.org/Doxygen/html/classitk_1_1MatrixOffsetTransformBase.html > > On Aug 5, 2014, at 5:26 AM, vincent ngai wrote: > > > Hi all, apologies if this has been asked before, I googled the above but > only got 4x4 -> AffineTransform and not the other way around. > > > > I need to get the output of an AffineTransform after registration to my > OpenGL renderer. > > > > From what I understand, the AffineTransform is composed of a Rotation, > Center of Rotation and Translation. > > > > So would the following sequence of 4x4 transformation be correct? > > > > OGLM = InvCRM * Rot * CRM * TM > > > > where > > > > CRM = 4x4 identity matrix with indices [ 12, 13, 14] set to XYZ > value of GetCenter() > > InvCRM = Inverse of CRM > > Rot = 4x4 Identity matrix with 3x3 set to the rotation parameters > > TM = 4x4 identity matrix with indicies[ 12, 13, 14 ] set to the > translation parameters > > > > Essentially: > > > > 1) translate center to origin > > 2) perform rotation > > 3) translate back to where we were > > 4) slap on translation > > > > I am doing the above, but for some reason the translation does not match > up. The rotation seems fine. > > -- > > Regards, > > Vincent > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > -- Regards, Vincent -------------- 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 Aug 6 00:10:56 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 6 Aug 2014 00:10:56 -0400 Subject: [ITK] [ITK-users] AffineTransform to 4x4 matrix...again maybe In-Reply-To: References: <4D7F2AA9-48DF-4C78-BC5E-B8609CBF45E0@mail.nih.gov> Message-ID: Hi Vincent, The values can also be used directly in the matrix as demonstrated here [1]. HTH, Matt [1] https://gist.github.com/thewtex/8712205 On Tue, Aug 5, 2014 at 10:08 PM, vincent ngai wrote: > Hi Bradley, > > Hmm, GetCenter() negated should be the same as InvCRM. I'll flip the order > of the multiplication and see what happens, it could be the C++ operator*() > order being different from the way its written. Its so annoying to get the > results close but not exact :( > > Thanks > > > On Tue, Aug 5, 2014 at 9:12 PM, Bradley Lowekamp > wrote: >> >> Hello, >> >> That looks pretty close, but I think CRM[12,13,14] should be -GetCenter(), >> with the negative there. Then the TM should be applied last, using your >> original notation with the previously mentioned correction I'd expect this >> to be correct: >> >> OGLM = TM * InvCRM * Rot * CRM >> >> Hope that helps, >> Brad >> >> [1] >> http://www.itk.org/Doxygen/html/classitk_1_1MatrixOffsetTransformBase.html >> >> On Aug 5, 2014, at 5:26 AM, vincent ngai wrote: >> >> > Hi all, apologies if this has been asked before, I googled the above but >> > only got 4x4 -> AffineTransform and not the other way around. >> > >> > I need to get the output of an AffineTransform after registration to my >> > OpenGL renderer. >> > >> > From what I understand, the AffineTransform is composed of a Rotation, >> > Center of Rotation and Translation. >> > >> > So would the following sequence of 4x4 transformation be correct? >> > >> > OGLM = InvCRM * Rot * CRM * TM >> > >> > where >> > >> > CRM = 4x4 identity matrix with indices [ 12, 13, 14] set to XYZ >> > value of GetCenter() >> > InvCRM = Inverse of CRM >> > Rot = 4x4 Identity matrix with 3x3 set to the rotation parameters >> > TM = 4x4 identity matrix with indicies[ 12, 13, 14 ] set to the >> > translation parameters >> > >> > Essentially: >> > >> > 1) translate center to origin >> > 2) perform rotation >> > 3) translate back to where we were >> > 4) slap on translation >> > >> > I am doing the above, but for some reason the translation does not match >> > up. The rotation seems fine. >> > -- >> > Regards, >> > Vincent >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > > > > -- > Regards, > Vincent > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 vincent.ngai at gmail.com Wed Aug 6 02:51:28 2014 From: vincent.ngai at gmail.com (vincent ngai) Date: Wed, 6 Aug 2014 14:51:28 +0800 Subject: [ITK] [ITK-users] AffineTransform to 4x4 matrix...again maybe In-Reply-To: References: <4D7F2AA9-48DF-4C78-BC5E-B8609CBF45E0@mail.nih.gov> Message-ID: Thanks Matt for the link. On Wed, Aug 6, 2014 at 12:10 PM, Matt McCormick wrote: > Hi Vincent, > > The values can also be used directly in the matrix as demonstrated here > [1]. > > HTH, > Matt > > [1] https://gist.github.com/thewtex/8712205 > > On Tue, Aug 5, 2014 at 10:08 PM, vincent ngai > wrote: > > Hi Bradley, > > > > Hmm, GetCenter() negated should be the same as InvCRM. I'll flip the > order > > of the multiplication and see what happens, it could be the C++ > operator*() > > order being different from the way its written. Its so annoying to get > the > > results close but not exact :( > > > > Thanks > > > > > > On Tue, Aug 5, 2014 at 9:12 PM, Bradley Lowekamp > > > wrote: > >> > >> Hello, > >> > >> That looks pretty close, but I think CRM[12,13,14] should be > -GetCenter(), > >> with the negative there. Then the TM should be applied last, using your > >> original notation with the previously mentioned correction I'd expect > this > >> to be correct: > >> > >> OGLM = TM * InvCRM * Rot * CRM > >> > >> Hope that helps, > >> Brad > >> > >> [1] > >> > http://www.itk.org/Doxygen/html/classitk_1_1MatrixOffsetTransformBase.html > >> > >> On Aug 5, 2014, at 5:26 AM, vincent ngai > wrote: > >> > >> > Hi all, apologies if this has been asked before, I googled the above > but > >> > only got 4x4 -> AffineTransform and not the other way around. > >> > > >> > I need to get the output of an AffineTransform after registration to > my > >> > OpenGL renderer. > >> > > >> > From what I understand, the AffineTransform is composed of a Rotation, > >> > Center of Rotation and Translation. > >> > > >> > So would the following sequence of 4x4 transformation be correct? > >> > > >> > OGLM = InvCRM * Rot * CRM * TM > >> > > >> > where > >> > > >> > CRM = 4x4 identity matrix with indices [ 12, 13, 14] set to XYZ > >> > value of GetCenter() > >> > InvCRM = Inverse of CRM > >> > Rot = 4x4 Identity matrix with 3x3 set to the rotation > parameters > >> > TM = 4x4 identity matrix with indicies[ 12, 13, 14 ] set to the > >> > translation parameters > >> > > >> > Essentially: > >> > > >> > 1) translate center to origin > >> > 2) perform rotation > >> > 3) translate back to where we were > >> > 4) slap on translation > >> > > >> > I am doing the above, but for some reason the translation does not > match > >> > up. The rotation seems fine. > >> > -- > >> > Regards, > >> > Vincent > >> > _____________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Kitware offers ITK Training Courses, for more information visit: > >> > http://www.kitware.com/products/protraining.php > >> > > >> > Please keep messages on-topic and check the ITK FAQ at: > >> > http://www.itk.org/Wiki/ITK_FAQ > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > http://public.kitware.com/mailman/listinfo/insight-users > >> > > > > > > > > -- > > Regards, > > Vincent > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the 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 > > > -- Regards, Vincent -------------- 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 mallikarjun49 at gmail.com Wed Aug 6 04:42:35 2014 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Wed, 6 Aug 2014 14:12:35 +0530 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: Message-ID: Hi All, Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . //// typedef itk::QuadEdgeMeshTraits qetraits; typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; itk::OnesMatrixCoefficients< MeshType > coeff0; typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); VtkToItkReader->SetFileName("abc.vtk"); VtkToItkReader->Update(); typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > SmoothingQuadEdgeMeshFilter; SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); QEMeshSmoother->SetNumberOfIterations(5 ); QEMeshSmoother->SetRelaxationFactor( 0.5 ); QEMeshSmoother->SetDelaunayConforming(true ); QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); QEMeshSmoother->Update(); //// On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: > Thanks Bill for your answer. > > The reason I am using this pipeline is that SmoothingQEMeshFilter has an > additional parameter for smoothing which is delaunay conforming which helps > to optimize aspect ratio of triangles while smoothing and thus produces > better output.Is there anything similar filter in the vtk pipeline.I used > vtkWindowedSincPolydatafilter which is not giving the output as good as > QEMeshSmoothing filter. > > Thanks for your help > > > On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen > wrote: > >> If you have it in vtk, I suggest using the vtk pipeline to smooth the >> data. >> >> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K >> wrote: >> > Hi Bill, >> > Thanks for the replay. >> > >> > Yes,I built both ITK and my app with Release ,I forgot to mention it in >> the >> > previous post.Actually the data set is the output of >> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I >> saved >> > this marching cube's output as .vtk file and read it using >> > itkVTKPolyDataReader and then I am giving this reader's output to >> > itkSmoothingQuadEdgeMeshFilter's input. >> > >> > I checked the execution time of each step in the pipeline ,after >> > SmothingQEMeshFilter has got it's input ,it is taking time to process >> the >> > data. >> > >> > Thank you >> > >> > >> > >> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen > > >> > wrote: >> >> >> >> First, make sure you are building ITK and your app with Release. A >> >> Debug build can be 10-50 times slower. >> >> >> >> >> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K < >> mallikarjun49 at gmail.com> >> >> wrote: >> >> > Hi All, >> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >> >> > smoothing.This >> >> > filter is giving good results what I expected but taking more >> execution >> >> > time.can any one suggest me to reduce the execution time( multi >> >> > threading >> >> > or any parameters to add/remove )? >> >> > >> >> > Below is the code snippet >> >> > /////// >> >> > typedef itk::QuadEdgeMeshTraits> double,double >> >> > > >> >> > qetraits; >> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > >> MeshType; >> >> > >> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >> >> > >> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >> >> > >> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >> >> > SmoothingQuadEdgeMeshFilter; >> >> > >> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >> >> > SmoothingQuadEdgeMeshFilter::New(); >> >> > >> >> > QEMeshSmoother->SetInput("abc.vtk"); >> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> >> > QEMeshSmoother->SetDelaunayConforming(true ); >> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> >> > QEMeshSmoother->Update(); >> >> > //// >> >> > >> >> > -- >> >> > Regards: >> >> > Mallik >> >> > >> >> > >> >> > _____________________________________ >> >> > Powered by www.kitware.com >> >> > >> >> > Visit other Kitware open-source projects at >> >> > http://www.kitware.com/opensource/opensource.html >> >> > >> >> > Kitware offers ITK Training Courses, for more information visit: >> >> > http://www.kitware.com/products/protraining.php >> >> > >> >> > Please keep messages on-topic and check the 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 >> > >> > >> > >> > >> > -- >> > Regards: >> > Mallik >> > >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> > > > > -- > *Regards:* > Mallik > > -- *Regards:* Mallik -------------- 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 joseignacio.prieto at gmail.com Wed Aug 6 10:11:38 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Wed, 6 Aug 2014 10:11:38 -0400 Subject: [ITK] [ITK-users] Distance map to 2D polygon Message-ID: Hi all, I need to get a distance (preferably signed) map 2D given a polygon input as polygonSpatialObject. I think it can be done by using SpatialObjectToImageFilter and then applying a distance map, but I was thinking that maybe it is not the optimal way to do it. It is more important that the result is fast rather than accurate. Thank you very much for any input. -- Ignacio Prieto Research Assistant Biomedical Imaging Center Pontificia Universidad Catolica de Chile -------------- 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 Aug 6 15:06:56 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 6 Aug 2014 15:06:56 -0400 Subject: [ITK] [ITK-dev] DisplacementFieldTransform::SetIdentity method missing? Message-ID: <2C3F55CD-43B8-4ECF-BA2B-083F54235AA7@mail.nih.gov> Hello, I noticed there was no SetIdentity method for the DisplacementFields. It seems like it should be pretty easy to add, just fill the displace field with zeros, and inverse if set? 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 matt.mccormick at kitware.com Wed Aug 6 15:16:41 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 6 Aug 2014 15:16:41 -0400 Subject: [ITK] [ITK-dev] DisplacementFieldTransform::SetIdentity method missing? In-Reply-To: <2C3F55CD-43B8-4ECF-BA2B-083F54235AA7@mail.nih.gov> References: <2C3F55CD-43B8-4ECF-BA2B-083F54235AA7@mail.nih.gov> Message-ID: Hi Brad, Sounds like a good plan. Thanks, Matt On Wed, Aug 6, 2014 at 3:06 PM, Bradley Lowekamp wrote: > Hello, > > I noticed there was no SetIdentity method for the DisplacementFields. It seems like it should be pretty easy to add, just fill the displace field with zeros, and inverse if set? > > 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 > _______________________________________________ > 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 Aug 6 16:28:46 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 6 Aug 2014 16:28:46 -0400 Subject: [ITK] Insight Journal downtime today Message-ID: Hi, The Insight Journal [1] will be down today for a few hours for maintenance. Down time will start at 6:30 PM Eastern Time. Thanks for your patience. Matt [1] http://insight-journal.org From arnaudgelas at gmail.com Thu Aug 7 04:52:53 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 7 Aug 2014 10:52:53 +0200 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: Message-ID: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> Hi Malik, First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?). Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal). At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages? How large is your input mesh (number of points)? You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement. Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing). HTH Arnaud On Aug 6, 2014, at 10:42 AM, Mallikarjun K wrote: > Hi All, > > Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . > > > //// > > typedef itk::QuadEdgeMeshTraits qetraits; > > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; > > itk::OnesMatrixCoefficients< MeshType > coeff0; > > typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; > //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; > > //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); > VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); > > VtkToItkReader->SetFileName("abc.vtk"); > VtkToItkReader->Update(); > > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > > SmoothingQuadEdgeMeshFilter; > > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); > > > QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); > QEMeshSmoother->SetNumberOfIterations(5 ); > QEMeshSmoother->SetRelaxationFactor( 0.5 ); > QEMeshSmoother->SetDelaunayConforming(true ); > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); > > QEMeshSmoother->Update(); > > //// > > > On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: > Thanks Bill for your answer. > > The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. > > Thanks for your help > > > On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: > If you have it in vtk, I suggest using the vtk pipeline to smooth the data. > > On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K wrote: > > Hi Bill, > > Thanks for the replay. > > > > Yes,I built both ITK and my app with Release ,I forgot to mention it in the > > previous post.Actually the data set is the output of > > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved > > this marching cube's output as .vtk file and read it using > > itkVTKPolyDataReader and then I am giving this reader's output to > > itkSmoothingQuadEdgeMeshFilter's input. > > > > I checked the execution time of each step in the pipeline ,after > > SmothingQEMeshFilter has got it's input ,it is taking time to process the > > data. > > > > Thank you > > > > > > > > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen > > wrote: > >> > >> First, make sure you are building ITK and your app with Release. A > >> Debug build can be 10-50 times slower. > >> > >> > >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K > >> wrote: > >> > Hi All, > >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh > >> > smoothing.This > >> > filter is giving good results what I expected but taking more execution > >> > time.can any one suggest me to reduce the execution time( multi > >> > threading > >> > or any parameters to add/remove )? > >> > > >> > Below is the code snippet > >> > /////// > >> > typedef itk::QuadEdgeMeshTraits >> > > > >> > qetraits; > >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; > >> > > >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; > >> > > >> > itk::OnesMatrixCoefficients< MeshType > coeff0; > >> > > >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > > >> > SmoothingQuadEdgeMeshFilter; > >> > > >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = > >> > SmoothingQuadEdgeMeshFilter::New(); > >> > > >> > QEMeshSmoother->SetInput("abc.vtk"); > >> > QEMeshSmoother->SetNumberOfIterations(5 ); > >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); > >> > QEMeshSmoother->SetDelaunayConforming(true ); > >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); > >> > QEMeshSmoother->Update(); > >> > //// > >> > > >> > -- > >> > Regards: > >> > Mallik > >> > > >> > > >> > _____________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Kitware offers ITK Training Courses, for more information visit: > >> > http://www.kitware.com/products/protraining.php > >> > > >> > Please keep messages on-topic and check the 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 > > > > > > > > > > -- > > Regards: > > Mallik > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > > > > -- > Regards: > Mallik > > > > > -- > Regards: > Mallik > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 mallikarjun49 at gmail.com Thu Aug 7 06:09:50 2014 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Thu, 7 Aug 2014 15:39:50 +0530 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> Message-ID: Hi Arnaud, Thanks for your reply and valuable suggestions. Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF. Thank you On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas wrote: > Hi Malik, > > First of all, I would recommend using MeshFileReader instead of > VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near > future?). > > Regarding now the smoothing procedure in itself. This class definitively > misses some documentation and I will be adding some in the next few days > (mainly extracted from the corresponding insight journal). > > At the end of each iteration, when the delaunay conforming flag is turned > ON, the conformation is performed. So depending on the mesh configuration, > mesh size and number of iterations, it can take ages? > How large is your input mesh (number of points)? > > You can also check results, by running first a smoothing without delaunay > conforming, then apply a delaunay conforming on the output. Results won't > be as nice, but you should get significant speed improvement. > Another possibility is to first do a clean poly data in vtk, with a small > threshold to remove small edges in the input meshes (which results in lots > of edge flipping after smoothing). > > HTH > Arnaud > > > On Aug 6, 2014, at 10:42 AM, Mallikarjun K > wrote: > > Hi All, > > Can anyone suggest me if anything wrong I am doing in this below pipeline > ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk > QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in > release mode) at itkVtkPolydataReader . > > > //// > > typedef itk::QuadEdgeMeshTraits > qetraits; > > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; > > itk::OnesMatrixCoefficients< MeshType > coeff0; > > typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; > //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; > > //VTKPolyDataWriterType::Pointer > ItkToVtkWriter=VTKPolyDataWriterType::New(); > VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); > > VtkToItkReader->SetFileName("abc.vtk"); > VtkToItkReader->Update(); > > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > > SmoothingQuadEdgeMeshFilter; > > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = > SmoothingQuadEdgeMeshFilter::New(); > > QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); > QEMeshSmoother->SetNumberOfIterations(5 ); > QEMeshSmoother->SetRelaxationFactor( 0.5 ); > QEMeshSmoother->SetDelaunayConforming(true ); > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); > QEMeshSmoother->Update(); > > //// > > > On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K > wrote: > >> Thanks Bill for your answer. >> >> The reason I am using this pipeline is that SmoothingQEMeshFilter has an >> additional parameter for smoothing which is delaunay conforming which helps >> to optimize aspect ratio of triangles while smoothing and thus produces >> better output.Is there anything similar filter in the vtk pipeline.I used >> vtkWindowedSincPolydatafilter which is not giving the output as good as >> QEMeshSmoothing filter. >> >> Thanks for your help >> >> >> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen >> wrote: >> >>> If you have it in vtk, I suggest using the vtk pipeline to smooth the >>> data. >>> >>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K >>> wrote: >>> > Hi Bill, >>> > Thanks for the replay. >>> > >>> > Yes,I built both ITK and my app with Release ,I forgot to mention it >>> in the >>> > previous post.Actually the data set is the output of >>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I >>> saved >>> > this marching cube's output as .vtk file and read it using >>> > itkVTKPolyDataReader and then I am giving this reader's output to >>> > itkSmoothingQuadEdgeMeshFilter's input. >>> > >>> > I checked the execution time of each step in the pipeline ,after >>> > SmothingQEMeshFilter has got it's input ,it is taking time to process >>> the >>> > data. >>> > >>> > Thank you >>> > >>> > >>> > >>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen < >>> bill.lorensen at gmail.com> >>> > wrote: >>> >> >>> >> First, make sure you are building ITK and your app with Release. A >>> >> Debug build can be 10-50 times slower. >>> >> >>> >> >>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K < >>> mallikarjun49 at gmail.com> >>> >> wrote: >>> >> > Hi All, >>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>> >> > smoothing.This >>> >> > filter is giving good results what I expected but taking more >>> execution >>> >> > time.can any one suggest me to reduce the execution time( multi >>> >> > threading >>> >> > or any parameters to add/remove )? >>> >> > >>> >> > Below is the code snippet >>> >> > /////// >>> >> > typedef itk::QuadEdgeMeshTraits>> double,double >>> >> > > >>> >> > qetraits; >>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > >>> MeshType; >>> >> > >>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>> >> > >>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>> >> > >>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>> >> > SmoothingQuadEdgeMeshFilter; >>> >> > >>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>> >> > SmoothingQuadEdgeMeshFilter::New(); >>> >> > >>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>> >> > QEMeshSmoother->Update(); >>> >> > //// >>> >> > >>> >> > -- >>> >> > Regards: >>> >> > Mallik >>> >> > >>> >> > >>> >> > _____________________________________ >>> >> > Powered by www.kitware.com >>> >> > >>> >> > Visit other Kitware open-source projects at >>> >> > http://www.kitware.com/opensource/opensource.html >>> >> > >>> >> > Kitware offers ITK Training Courses, for more information visit: >>> >> > http://www.kitware.com/products/protraining.php >>> >> > >>> >> > Please keep messages on-topic and check the 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 >>> > >>> > >>> > >>> > >>> > -- >>> > Regards: >>> > Mallik >>> > >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >>> >> >> >> >> -- >> *Regards:* >> Mallik >> >> > > > -- > *Regards:* > Mallik > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > -- *Regards:* Mallik -------------- 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 Thu Aug 7 09:21:56 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 7 Aug 2014 09:21:56 -0400 Subject: [ITK] [ITK-dev] A couple minor FFT valgrind defects. Message-ID: <1A49D266-39FE-40F0-B550-6DDFB175E262@mail.nih.gov> Matt, After addressing the large number of ThreadPool defects, there appears to a a minor uninitialized condition with these new complex fft filters: http://open.cdash.org/viewDynamicAnalysis.php?buildid=3440158 Let me know if you have the time. Thanks, 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 mallikarjun49 at gmail.com Thu Aug 7 09:23:15 2014 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Thu, 7 Aug 2014 18:53:15 +0530 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> Message-ID: Hi Arnaud, Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ? ///// #include #include #include #include #include #include #include #include #include #include #include "itkMesh.h" #include "itkQuadEdgeMesh.h" #include "itkQuadEdgeMeshTraits.h" #include "itkSmoothingQuadEdgeMeshFilter.h" #include "vtkSTLWriter.h" #include int main() { std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K typedef itk::QuadEdgeMeshTraits qetraits; typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; itk::OnesMatrixCoefficients< MeshType > coeff0; typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; vtkSmartPointer polyDatawriter=vtkSmartPointer::New(); vtkSmartPointer polyDatareader=vtkSmartPointer::New(); SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); /* polyDatareader->SetFileName(Inputfilename.c_str() ); polyDatareader->ReleaseDataFlagOn(); polyDatareader->Update();*/ /*vtkSmartPointer triangleFilter = vtkSmartPointer::New(); triangleFilter->SetInput(polyDatareader->GetOutput()); triangleFilter->Update();*/ // /* vtkSmartPointer clean = vtkSmartPointer::New(); #if (VTK_MAJOR_VERSION < 6) clean->SetInput(triangleFilter->GetOutput() ); #else clean->SetInputData(triangleFilter->GetOutput() ); #endif clean->ConvertPolysToLinesOff(); clean->ConvertLinesToPointsOff(); clean->Update(); std::string Inputfilename2="D:/cleaned.vtk";*/ //// /*polyDatawriter->SetInput(clean->GetOutput()); polyDatawriter->SetFileName(Inputfilename2.c_str()); polyDatawriter->ReleaseDataFlagOn(); polyDatawriter->Write(); */ typedef itk::MeshFileReader MeshReaderType; MeshReaderType::Pointer Meshreader = MeshReaderType::New(); Meshreader->SetFileName(Inputfilename.c_str( )); Meshreader->Update(); /*MeshType::Pointer mesh = Meshreader->GetOutput(); mesh->DisconnectPipeline();*/ QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); QEMeshSmoother->SetNumberOfIterations(1 ); QEMeshSmoother->SetRelaxationFactor( 0.5 ); QEMeshSmoother->SetDelaunayConforming(true); QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); QEMeshSmoother->ReleaseDataFlagOn(); QEMeshSmoother->Update(); std::string Outputfilename="D:/tempOut.vtk"; typedef itk::MeshFileWriter MeshWriterType; MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); Meshwriter->SetFileName(Outputfilename.c_str( )); Meshwriter->SetInput(QEMeshSmoother->GetOutput()); Meshwriter->Update(); polyDatareader->SetFileName(Outputfilename.c_str() ); polyDatareader->ReleaseDataFlagOn(); polyDatareader->Update(); vtkSmartPointer stlWriter=vtkSmartPointer::New(); stlWriter->SetInput( polyDatareader->GetOutput()); stlWriter->SetFileName("D:/QEoutput.stl"); stlWriter->SetFileTypeToASCII(); stlWriter->Write(); //Here it stops and taking long time return 0; } //// On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K wrote: > Hi Arnaud, > > Thanks for your reply and valuable suggestions. > > Number of points in my input mesh are 78928.In my pipeline I am already > cleaning the polydata using vtkCleanPolyData filter.I will check the speed > improvement and results with delaunay conforming turned OFF. > > Thank you > > > On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas > wrote: > >> Hi Malik, >> >> First of all, I would recommend using MeshFileReader instead of >> VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near >> future?). >> >> Regarding now the smoothing procedure in itself. This class definitively >> misses some documentation and I will be adding some in the next few days >> (mainly extracted from the corresponding insight journal). >> >> At the end of each iteration, when the delaunay conforming flag is turned >> ON, the conformation is performed. So depending on the mesh configuration, >> mesh size and number of iterations, it can take ages? >> How large is your input mesh (number of points)? >> >> You can also check results, by running first a smoothing without delaunay >> conforming, then apply a delaunay conforming on the output. Results won't >> be as nice, but you should get significant speed improvement. >> Another possibility is to first do a clean poly data in vtk, with a small >> threshold to remove small edges in the input meshes (which results in lots >> of edge flipping after smoothing). >> >> HTH >> Arnaud >> >> >> On Aug 6, 2014, at 10:42 AM, Mallikarjun K >> wrote: >> >> Hi All, >> >> Can anyone suggest me if anything wrong I am doing in this below pipeline >> ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk >> QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in >> release mode) at itkVtkPolydataReader . >> >> >> //// >> >> typedef itk::QuadEdgeMeshTraits >> qetraits; >> >> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >> >> itk::OnesMatrixCoefficients< MeshType > coeff0; >> >> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >> >> //VTKPolyDataWriterType::Pointer >> ItkToVtkWriter=VTKPolyDataWriterType::New(); >> VTKPolyDataReaderType::Pointer >> VtkToItkReader=VTKPolyDataReaderType::New(); >> >> VtkToItkReader->SetFileName("abc.vtk"); >> VtkToItkReader->Update(); >> >> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >> SmoothingQuadEdgeMeshFilter; >> >> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >> SmoothingQuadEdgeMeshFilter::New(); >> >> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >> QEMeshSmoother->SetNumberOfIterations(5 ); >> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> QEMeshSmoother->SetDelaunayConforming(true ); >> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> QEMeshSmoother->Update(); >> >> //// >> >> >> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K >> wrote: >> >>> Thanks Bill for your answer. >>> >>> The reason I am using this pipeline is that SmoothingQEMeshFilter has an >>> additional parameter for smoothing which is delaunay conforming which helps >>> to optimize aspect ratio of triangles while smoothing and thus produces >>> better output.Is there anything similar filter in the vtk pipeline.I used >>> vtkWindowedSincPolydatafilter which is not giving the output as good as >>> QEMeshSmoothing filter. >>> >>> Thanks for your help >>> >>> >>> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen >>> wrote: >>> >>>> If you have it in vtk, I suggest using the vtk pipeline to smooth the >>>> data. >>>> >>>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K >>>> wrote: >>>> > Hi Bill, >>>> > Thanks for the replay. >>>> > >>>> > Yes,I built both ITK and my app with Release ,I forgot to mention it >>>> in the >>>> > previous post.Actually the data set is the output of >>>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I >>>> saved >>>> > this marching cube's output as .vtk file and read it using >>>> > itkVTKPolyDataReader and then I am giving this reader's output to >>>> > itkSmoothingQuadEdgeMeshFilter's input. >>>> > >>>> > I checked the execution time of each step in the pipeline ,after >>>> > SmothingQEMeshFilter has got it's input ,it is taking time to process >>>> the >>>> > data. >>>> > >>>> > Thank you >>>> > >>>> > >>>> > >>>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen < >>>> bill.lorensen at gmail.com> >>>> > wrote: >>>> >> >>>> >> First, make sure you are building ITK and your app with Release. A >>>> >> Debug build can be 10-50 times slower. >>>> >> >>>> >> >>>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K < >>>> mallikarjun49 at gmail.com> >>>> >> wrote: >>>> >> > Hi All, >>>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>>> >> > smoothing.This >>>> >> > filter is giving good results what I expected but taking more >>>> execution >>>> >> > time.can any one suggest me to reduce the execution time( multi >>>> >> > threading >>>> >> > or any parameters to add/remove )? >>>> >> > >>>> >> > Below is the code snippet >>>> >> > /////// >>>> >> > typedef itk::QuadEdgeMeshTraits>>> double,double >>>> >> > > >>>> >> > qetraits; >>>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > >>>> MeshType; >>>> >> > >>>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>>> >> > >>>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>>> >> > >>>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>> >> > SmoothingQuadEdgeMeshFilter; >>>> >> > >>>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>>> >> > SmoothingQuadEdgeMeshFilter::New(); >>>> >> > >>>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>> >> > QEMeshSmoother->Update(); >>>> >> > //// >>>> >> > >>>> >> > -- >>>> >> > Regards: >>>> >> > Mallik >>>> >> > >>>> >> > >>>> >> > _____________________________________ >>>> >> > Powered by www.kitware.com >>>> >> > >>>> >> > Visit other Kitware open-source projects at >>>> >> > http://www.kitware.com/opensource/opensource.html >>>> >> > >>>> >> > Kitware offers ITK Training Courses, for more information visit: >>>> >> > http://www.kitware.com/products/protraining.php >>>> >> > >>>> >> > Please keep messages on-topic and check the 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 >>>> > >>>> > >>>> > >>>> > >>>> > -- >>>> > Regards: >>>> > Mallik >>>> > >>>> >>>> >>>> >>>> -- >>>> Unpaid intern in BillsBasement at noware dot com >>>> >>> >>> >>> >>> -- >>> *Regards:* >>> Mallik >>> >>> >> >> >> -- >> *Regards:* >> Mallik >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> > > > -- > *Regards:* > Mallik > > -- *Regards:* Mallik -------------- 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 arnaudgelas at gmail.com Thu Aug 7 09:31:03 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 7 Aug 2014 15:31:03 +0200 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> Message-ID: <305E1509-8EF7-4770-9236-3D639B9BF155@gmail.com> Shouldn't it be D://temp.vtk ? Isn't it missing one '/' ? Can you send this vtk file? On Aug 7, 2014, at 3:23 PM, Mallikarjun K wrote: > Hi Arnaud, > > Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ? > > ///// > #include > #include > > #include > #include > #include > #include > #include > #include > #include > #include > #include "itkMesh.h" > #include "itkQuadEdgeMesh.h" > #include "itkQuadEdgeMeshTraits.h" > #include "itkSmoothingQuadEdgeMeshFilter.h" > #include "vtkSTLWriter.h" > #include > > int main() > { > std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K > > typedef itk::QuadEdgeMeshTraits qetraits; > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; > > itk::OnesMatrixCoefficients< MeshType > coeff0; > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; > > vtkSmartPointer polyDatawriter=vtkSmartPointer::New(); > vtkSmartPointer polyDatareader=vtkSmartPointer::New(); > > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); > > /* polyDatareader->SetFileName(Inputfilename.c_str() ); > polyDatareader->ReleaseDataFlagOn(); > polyDatareader->Update();*/ > > /*vtkSmartPointer triangleFilter = > vtkSmartPointer::New(); > triangleFilter->SetInput(polyDatareader->GetOutput()); > triangleFilter->Update();*/ > > // > /* vtkSmartPointer clean = vtkSmartPointer::New(); > #if (VTK_MAJOR_VERSION < 6) > clean->SetInput(triangleFilter->GetOutput() ); > #else > clean->SetInputData(triangleFilter->GetOutput() ); > #endif > > clean->ConvertPolysToLinesOff(); > clean->ConvertLinesToPointsOff(); > clean->Update(); > > std::string Inputfilename2="D:/cleaned.vtk";*/ > > //// > /*polyDatawriter->SetInput(clean->GetOutput()); > polyDatawriter->SetFileName(Inputfilename2.c_str()); > polyDatawriter->ReleaseDataFlagOn(); > polyDatawriter->Write(); */ > > typedef itk::MeshFileReader MeshReaderType; > MeshReaderType::Pointer Meshreader = MeshReaderType::New(); > Meshreader->SetFileName(Inputfilename.c_str( )); > Meshreader->Update(); > > /*MeshType::Pointer mesh = Meshreader->GetOutput(); > mesh->DisconnectPipeline();*/ > > > QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); > QEMeshSmoother->SetNumberOfIterations(1 ); > QEMeshSmoother->SetRelaxationFactor( 0.5 ); > QEMeshSmoother->SetDelaunayConforming(true); > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); > > QEMeshSmoother->ReleaseDataFlagOn(); > > QEMeshSmoother->Update(); > > std::string Outputfilename="D:/tempOut.vtk"; > > typedef itk::MeshFileWriter MeshWriterType; > MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); > Meshwriter->SetFileName(Outputfilename.c_str( )); > Meshwriter->SetInput(QEMeshSmoother->GetOutput()); > Meshwriter->Update(); > > polyDatareader->SetFileName(Outputfilename.c_str() ); > polyDatareader->ReleaseDataFlagOn(); > polyDatareader->Update(); > > vtkSmartPointer stlWriter=vtkSmartPointer::New(); > > stlWriter->SetInput( polyDatareader->GetOutput()); > stlWriter->SetFileName("D:/QEoutput.stl"); > stlWriter->SetFileTypeToASCII(); > stlWriter->Write(); > > //Here it stops and taking long time > > return 0; > > > } > //// > > > > On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K wrote: > Hi Arnaud, > > Thanks for your reply and valuable suggestions. > > Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF. > > Thank you > > > On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas wrote: > Hi Malik, > > First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?). > > Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal). > > At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages? > How large is your input mesh (number of points)? > > You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement. > Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing). > > HTH > Arnaud > > > On Aug 6, 2014, at 10:42 AM, Mallikarjun K wrote: > >> Hi All, >> >> Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . >> >> >> //// >> >> typedef itk::QuadEdgeMeshTraits qetraits; >> >> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >> >> itk::OnesMatrixCoefficients< MeshType > coeff0; >> >> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >> >> //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); >> VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); >> >> VtkToItkReader->SetFileName("abc.vtk"); >> VtkToItkReader->Update(); >> >> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >> SmoothingQuadEdgeMeshFilter; >> >> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >> >> >> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >> QEMeshSmoother->SetNumberOfIterations(5 ); >> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> QEMeshSmoother->SetDelaunayConforming(true ); >> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> >> QEMeshSmoother->Update(); >> >> //// >> >> >> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: >> Thanks Bill for your answer. >> >> The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. >> >> Thanks for your help >> >> >> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: >> If you have it in vtk, I suggest using the vtk pipeline to smooth the data. >> >> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K wrote: >> > Hi Bill, >> > Thanks for the replay. >> > >> > Yes,I built both ITK and my app with Release ,I forgot to mention it in the >> > previous post.Actually the data set is the output of >> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved >> > this marching cube's output as .vtk file and read it using >> > itkVTKPolyDataReader and then I am giving this reader's output to >> > itkSmoothingQuadEdgeMeshFilter's input. >> > >> > I checked the execution time of each step in the pipeline ,after >> > SmothingQEMeshFilter has got it's input ,it is taking time to process the >> > data. >> > >> > Thank you >> > >> > >> > >> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen >> > wrote: >> >> >> >> First, make sure you are building ITK and your app with Release. A >> >> Debug build can be 10-50 times slower. >> >> >> >> >> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K >> >> wrote: >> >> > Hi All, >> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >> >> > smoothing.This >> >> > filter is giving good results what I expected but taking more execution >> >> > time.can any one suggest me to reduce the execution time( multi >> >> > threading >> >> > or any parameters to add/remove )? >> >> > >> >> > Below is the code snippet >> >> > /////// >> >> > typedef itk::QuadEdgeMeshTraits> >> > > >> >> > qetraits; >> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >> >> > >> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >> >> > >> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >> >> > >> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >> >> > SmoothingQuadEdgeMeshFilter; >> >> > >> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >> >> > SmoothingQuadEdgeMeshFilter::New(); >> >> > >> >> > QEMeshSmoother->SetInput("abc.vtk"); >> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> >> > QEMeshSmoother->SetDelaunayConforming(true ); >> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> >> > QEMeshSmoother->Update(); >> >> > //// >> >> > >> >> > -- >> >> > Regards: >> >> > Mallik >> >> > >> >> > >> >> > _____________________________________ >> >> > Powered by www.kitware.com >> >> > >> >> > Visit other Kitware open-source projects at >> >> > http://www.kitware.com/opensource/opensource.html >> >> > >> >> > Kitware offers ITK Training Courses, for more information visit: >> >> > http://www.kitware.com/products/protraining.php >> >> > >> >> > Please keep messages on-topic and check the 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 >> > >> > >> > >> > >> > -- >> > Regards: >> > Mallik >> > >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> >> >> >> -- >> Regards: >> Mallik >> >> >> >> >> -- >> Regards: >> Mallik >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > > > > -- > Regards: > Mallik > > > > > -- > Regards: > Mallik > -------------- 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 Aug 7 09:33:19 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 7 Aug 2014 09:33:19 -0400 Subject: [ITK] [ITK-dev] A couple minor FFT valgrind defects. In-Reply-To: <1A49D266-39FE-40F0-B550-6DDFB175E262@mail.nih.gov> References: <1A49D266-39FE-40F0-B550-6DDFB175E262@mail.nih.gov> Message-ID: Hi Brad, Happy to see we are getting back to zero :-). Yes, please review this patch: http://review.source.kitware.com/#/c/16542/ Thanks, Matt On Thu, Aug 7, 2014 at 9:21 AM, Bradley Lowekamp wrote: > Matt, > > After addressing the large number of ThreadPool defects, there appears to a a minor uninitialized condition with these new complex fft filters: > > http://open.cdash.org/viewDynamicAnalysis.php?buildid=3440158 > > Let me know if you have the time. > > Thanks, > 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 arnaudgelas at gmail.com Thu Aug 7 10:40:20 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 7 Aug 2014 16:40:20 +0200 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> <305E1509-8EF7-4770-9236-3D639B9BF155@gmail.com> Message-ID: It takes 29s on my machine in debug to run 5 iterations with Delaunay conforming set to true https://gist.github.com/arnaudgelas/0f20ebdaf53956f79997 On Aug 7, 2014, at 3:45 PM, Mallikarjun K wrote: > File path is correct.if it is '\'(backward slash) we have to add "D:\\" .since I used '/' it's not required to add "//". > > please find the attached .vtk file > > Thanks > > > On Thu, Aug 7, 2014 at 7:01 PM, Arnaud Gelas wrote: > Shouldn't it be D://temp.vtk ? Isn't it missing one '/' ? > > Can you send this vtk file? > > > On Aug 7, 2014, at 3:23 PM, Mallikarjun K wrote: > >> Hi Arnaud, >> >> Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ? >> >> ///// >> #include >> #include >> >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include "itkMesh.h" >> #include "itkQuadEdgeMesh.h" >> #include "itkQuadEdgeMeshTraits.h" >> #include "itkSmoothingQuadEdgeMeshFilter.h" >> #include "vtkSTLWriter.h" >> #include >> >> int main() >> { >> std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K >> >> typedef itk::QuadEdgeMeshTraits qetraits; >> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >> >> itk::OnesMatrixCoefficients< MeshType > coeff0; >> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; >> >> vtkSmartPointer polyDatawriter=vtkSmartPointer::New(); >> vtkSmartPointer polyDatareader=vtkSmartPointer::New(); >> >> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >> >> /* polyDatareader->SetFileName(Inputfilename.c_str() ); >> polyDatareader->ReleaseDataFlagOn(); >> polyDatareader->Update();*/ >> >> /*vtkSmartPointer triangleFilter = >> vtkSmartPointer::New(); >> triangleFilter->SetInput(polyDatareader->GetOutput()); >> triangleFilter->Update();*/ >> >> // >> /* vtkSmartPointer clean = vtkSmartPointer::New(); >> #if (VTK_MAJOR_VERSION < 6) >> clean->SetInput(triangleFilter->GetOutput() ); >> #else >> clean->SetInputData(triangleFilter->GetOutput() ); >> #endif >> >> clean->ConvertPolysToLinesOff(); >> clean->ConvertLinesToPointsOff(); >> clean->Update(); >> >> std::string Inputfilename2="D:/cleaned.vtk";*/ >> >> //// >> /*polyDatawriter->SetInput(clean->GetOutput()); >> polyDatawriter->SetFileName(Inputfilename2.c_str()); >> polyDatawriter->ReleaseDataFlagOn(); >> polyDatawriter->Write(); */ >> >> typedef itk::MeshFileReader MeshReaderType; >> MeshReaderType::Pointer Meshreader = MeshReaderType::New(); >> Meshreader->SetFileName(Inputfilename.c_str( )); >> Meshreader->Update(); >> >> /*MeshType::Pointer mesh = Meshreader->GetOutput(); >> mesh->DisconnectPipeline();*/ >> >> >> QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); >> QEMeshSmoother->SetNumberOfIterations(1 ); >> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> QEMeshSmoother->SetDelaunayConforming(true); >> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> >> QEMeshSmoother->ReleaseDataFlagOn(); >> >> QEMeshSmoother->Update(); >> >> std::string Outputfilename="D:/tempOut.vtk"; >> >> typedef itk::MeshFileWriter MeshWriterType; >> MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); >> Meshwriter->SetFileName(Outputfilename.c_str( )); >> Meshwriter->SetInput(QEMeshSmoother->GetOutput()); >> Meshwriter->Update(); >> >> polyDatareader->SetFileName(Outputfilename.c_str() ); >> polyDatareader->ReleaseDataFlagOn(); >> polyDatareader->Update(); >> >> vtkSmartPointer stlWriter=vtkSmartPointer::New(); >> >> stlWriter->SetInput( polyDatareader->GetOutput()); >> stlWriter->SetFileName("D:/QEoutput.stl"); >> stlWriter->SetFileTypeToASCII(); >> stlWriter->Write(); >> >> //Here it stops and taking long time >> >> return 0; >> >> >> } >> //// >> >> >> >> On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K wrote: >> Hi Arnaud, >> >> Thanks for your reply and valuable suggestions. >> >> Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF. >> >> Thank you >> >> >> On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas wrote: >> Hi Malik, >> >> First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?). >> >> Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal). >> >> At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages? >> How large is your input mesh (number of points)? >> >> You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement. >> Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing). >> >> HTH >> Arnaud >> >> >> On Aug 6, 2014, at 10:42 AM, Mallikarjun K wrote: >> >>> Hi All, >>> >>> Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . >>> >>> >>> //// >>> >>> typedef itk::QuadEdgeMeshTraits qetraits; >>> >>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>> >>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>> >>> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >>> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >>> >>> //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); >>> VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); >>> >>> VtkToItkReader->SetFileName("abc.vtk"); >>> VtkToItkReader->Update(); >>> >>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>> SmoothingQuadEdgeMeshFilter; >>> >>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>> >>> >>> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >>> QEMeshSmoother->SetNumberOfIterations(5 ); >>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>> QEMeshSmoother->SetDelaunayConforming(true ); >>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>> >>> QEMeshSmoother->Update(); >>> >>> //// >>> >>> >>> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: >>> Thanks Bill for your answer. >>> >>> The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. >>> >>> Thanks for your help >>> >>> >>> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: >>> If you have it in vtk, I suggest using the vtk pipeline to smooth the data. >>> >>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K wrote: >>> > Hi Bill, >>> > Thanks for the replay. >>> > >>> > Yes,I built both ITK and my app with Release ,I forgot to mention it in the >>> > previous post.Actually the data set is the output of >>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved >>> > this marching cube's output as .vtk file and read it using >>> > itkVTKPolyDataReader and then I am giving this reader's output to >>> > itkSmoothingQuadEdgeMeshFilter's input. >>> > >>> > I checked the execution time of each step in the pipeline ,after >>> > SmothingQEMeshFilter has got it's input ,it is taking time to process the >>> > data. >>> > >>> > Thank you >>> > >>> > >>> > >>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen >>> > wrote: >>> >> >>> >> First, make sure you are building ITK and your app with Release. A >>> >> Debug build can be 10-50 times slower. >>> >> >>> >> >>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K >>> >> wrote: >>> >> > Hi All, >>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>> >> > smoothing.This >>> >> > filter is giving good results what I expected but taking more execution >>> >> > time.can any one suggest me to reduce the execution time( multi >>> >> > threading >>> >> > or any parameters to add/remove )? >>> >> > >>> >> > Below is the code snippet >>> >> > /////// >>> >> > typedef itk::QuadEdgeMeshTraits>> >> > > >>> >> > qetraits; >>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>> >> > >>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>> >> > >>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>> >> > >>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>> >> > SmoothingQuadEdgeMeshFilter; >>> >> > >>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>> >> > SmoothingQuadEdgeMeshFilter::New(); >>> >> > >>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>> >> > QEMeshSmoother->Update(); >>> >> > //// >>> >> > >>> >> > -- >>> >> > Regards: >>> >> > Mallik >>> >> > >>> >> > >>> >> > _____________________________________ >>> >> > Powered by www.kitware.com >>> >> > >>> >> > Visit other Kitware open-source projects at >>> >> > http://www.kitware.com/opensource/opensource.html >>> >> > >>> >> > Kitware offers ITK Training Courses, for more information visit: >>> >> > http://www.kitware.com/products/protraining.php >>> >> > >>> >> > Please keep messages on-topic and check the 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 >>> > >>> > >>> > >>> > >>> > -- >>> > Regards: >>> > Mallik >>> > >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >>> >>> >>> >>> -- >>> Regards: >>> Mallik >>> >>> >>> >>> >>> -- >>> Regards: >>> Mallik >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> >> >> -- >> Regards: >> Mallik >> >> >> >> >> -- >> Regards: >> Mallik >> > > > > > -- > Regards: > Mallik > > -------------- 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 mallikarjun49 at gmail.com Thu Aug 7 11:20:44 2014 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Thu, 7 Aug 2014 20:50:44 +0530 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> <305E1509-8EF7-4770-9236-3D639B9BF155@gmail.com> Message-ID: Hi Arnaud, Thanks,Can you please tell me your machine confuguration. I am running 4GB RAM,i3 on windows7. I have downloaded your project and tried to execute it and it is still the same problem Which I was facing earlier.Any suggestions ..... thank you On Thu, Aug 7, 2014 at 8:10 PM, Arnaud Gelas wrote: > It takes 29s on my machine in debug to run 5 iterations with Delaunay > conforming set to true > > https://gist.github.com/arnaudgelas/0f20ebdaf53956f79997 > > > On Aug 7, 2014, at 3:45 PM, Mallikarjun K wrote: > > File path is correct.if it is '\'(backward slash) we have to add "D:\\" > .since I used '/' it's not required to add "//". > > please find the attached .vtk file > > Thanks > > > On Thu, Aug 7, 2014 at 7:01 PM, Arnaud Gelas > wrote: > >> Shouldn't it be D://temp.vtk ? Isn't it missing one '/' ? >> >> Can you send this vtk file? >> >> >> On Aug 7, 2014, at 3:23 PM, Mallikarjun K >> wrote: >> >> Hi Arnaud, >> >> Kindly have a look in the below code ,the problem is that even after >> QEMeshFilter output is saved as .stl file ,the program is still running for >> long time.I have observed in my tests that MeshFileReader seems to be the >> culprit. Any suggestions ? >> >> ///// >> #include >> #include >> >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include "itkMesh.h" >> #include "itkQuadEdgeMesh.h" >> #include "itkQuadEdgeMeshTraits.h" >> #include "itkSmoothingQuadEdgeMeshFilter.h" >> #include "vtkSTLWriter.h" >> #include >> >> int main() >> { >> std::string Inputfilename="D:/temp.vtk"; //number of points of this >> mesh file is around 78K >> >> typedef itk::QuadEdgeMeshTraits >> qetraits; >> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >> itk::OnesMatrixCoefficients< MeshType > coeff0; >> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >> >SmoothingQuadEdgeMeshFilter; >> >> vtkSmartPointer >> polyDatawriter=vtkSmartPointer::New(); >> vtkSmartPointer >> polyDatareader=vtkSmartPointer::New(); >> >> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >> SmoothingQuadEdgeMeshFilter::New(); >> /* polyDatareader->SetFileName(Inputfilename.c_str() ); >> polyDatareader->ReleaseDataFlagOn(); >> polyDatareader->Update();*/ >> >> /*vtkSmartPointer triangleFilter = >> vtkSmartPointer::New(); >> triangleFilter->SetInput(polyDatareader->GetOutput()); >> triangleFilter->Update();*/ >> >> // >> /* vtkSmartPointer clean = >> vtkSmartPointer::New(); >> #if (VTK_MAJOR_VERSION < 6) >> clean->SetInput(triangleFilter->GetOutput() ); >> #else >> clean->SetInputData(triangleFilter->GetOutput() ); >> #endif >> clean->ConvertPolysToLinesOff(); >> clean->ConvertLinesToPointsOff(); >> clean->Update(); >> >> std::string Inputfilename2="D:/cleaned.vtk";*/ >> >> //// >> /*polyDatawriter->SetInput(clean->GetOutput()); >> polyDatawriter->SetFileName(Inputfilename2.c_str()); >> polyDatawriter->ReleaseDataFlagOn(); >> polyDatawriter->Write(); */ >> >> typedef itk::MeshFileReader MeshReaderType; >> MeshReaderType::Pointer Meshreader = MeshReaderType::New(); >> Meshreader->SetFileName(Inputfilename.c_str( )); >> Meshreader->Update(); >> >> /*MeshType::Pointer mesh = Meshreader->GetOutput(); >> mesh->DisconnectPipeline();*/ >> >> QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); >> QEMeshSmoother->SetNumberOfIterations(1 ); >> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> QEMeshSmoother->SetDelaunayConforming(true); >> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> >> QEMeshSmoother->ReleaseDataFlagOn(); >> >> QEMeshSmoother->Update(); >> >> std::string Outputfilename="D:/tempOut.vtk"; >> >> typedef itk::MeshFileWriter MeshWriterType; >> MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); >> Meshwriter->SetFileName(Outputfilename.c_str( )); >> Meshwriter->SetInput(QEMeshSmoother->GetOutput()); >> Meshwriter->Update(); >> >> polyDatareader->SetFileName(Outputfilename.c_str() ); >> polyDatareader->ReleaseDataFlagOn(); >> polyDatareader->Update(); >> >> vtkSmartPointer >> stlWriter=vtkSmartPointer::New(); >> stlWriter->SetInput( polyDatareader->GetOutput()); >> stlWriter->SetFileName("D:/QEoutput.stl"); >> stlWriter->SetFileTypeToASCII(); >> stlWriter->Write(); >> //Here it stops and taking long time >> >> return 0; >> >> } >> //// >> >> >> >> On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K >> wrote: >> >>> Hi Arnaud, >>> >>> Thanks for your reply and valuable suggestions. >>> >>> Number of points in my input mesh are 78928.In my pipeline I am already >>> cleaning the polydata using vtkCleanPolyData filter.I will check the speed >>> improvement and results with delaunay conforming turned OFF. >>> >>> Thank you >>> >>> >>> On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas >>> wrote: >>> >>>> Hi Malik, >>>> >>>> First of all, I would recommend using MeshFileReader instead of >>>> VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near >>>> future?). >>>> >>>> Regarding now the smoothing procedure in itself. This class >>>> definitively misses some documentation and I will be adding some in the >>>> next few days (mainly extracted from the corresponding insight journal). >>>> >>>> At the end of each iteration, when the delaunay conforming flag is >>>> turned ON, the conformation is performed. So depending on the mesh >>>> configuration, mesh size and number of iterations, it can take ages? >>>> How large is your input mesh (number of points)? >>>> >>>> You can also check results, by running first a smoothing without >>>> delaunay conforming, then apply a delaunay conforming on the output. >>>> Results won't be as nice, but you should get significant speed improvement. >>>> Another possibility is to first do a clean poly data in vtk, with a >>>> small threshold to remove small edges in the input meshes (which results in >>>> lots of edge flipping after smoothing). >>>> >>>> HTH >>>> Arnaud >>>> >>>> >>>> On Aug 6, 2014, at 10:42 AM, Mallikarjun K >>>> wrote: >>>> >>>> Hi All, >>>> >>>> Can anyone suggest me if anything wrong I am doing in this below >>>> pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata >>>> to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 >>>> mins in release mode) at itkVtkPolydataReader . >>>> >>>> >>>> //// >>>> >>>> typedef itk::QuadEdgeMeshTraits>>> > qetraits; >>>> >>>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>> >>>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>>> >>>> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >>>> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >>>> >>>> //VTKPolyDataWriterType::Pointer >>>> ItkToVtkWriter=VTKPolyDataWriterType::New(); >>>> VTKPolyDataReaderType::Pointer >>>> VtkToItkReader=VTKPolyDataReaderType::New(); >>>> >>>> VtkToItkReader->SetFileName("abc.vtk"); >>>> VtkToItkReader->Update(); >>>> >>>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>> SmoothingQuadEdgeMeshFilter; >>>> >>>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>>> SmoothingQuadEdgeMeshFilter::New(); >>>> >>>> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >>>> QEMeshSmoother->SetNumberOfIterations(5 ); >>>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>> QEMeshSmoother->SetDelaunayConforming(true ); >>>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>> QEMeshSmoother->Update(); >>>> >>>> //// >>>> >>>> >>>> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K >>>> wrote: >>>> >>>>> Thanks Bill for your answer. >>>>> >>>>> The reason I am using this pipeline is that SmoothingQEMeshFilter has >>>>> an additional parameter for smoothing which is delaunay conforming which >>>>> helps to optimize aspect ratio of triangles while smoothing and thus >>>>> produces better output.Is there anything similar filter in the vtk >>>>> pipeline.I used vtkWindowedSincPolydatafilter which is not giving the >>>>> output as good as QEMeshSmoothing filter. >>>>> >>>>> Thanks for your help >>>>> >>>>> >>>>> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen < >>>>> bill.lorensen at gmail.com> wrote: >>>>> >>>>>> If you have it in vtk, I suggest using the vtk pipeline to smooth the >>>>>> data. >>>>>> >>>>>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K < >>>>>> mallikarjun49 at gmail.com> wrote: >>>>>> > Hi Bill, >>>>>> > Thanks for the replay. >>>>>> > >>>>>> > Yes,I built both ITK and my app with Release ,I forgot to mention >>>>>> it in the >>>>>> > previous post.Actually the data set is the output of >>>>>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth >>>>>> .I saved >>>>>> > this marching cube's output as .vtk file and read it using >>>>>> > itkVTKPolyDataReader and then I am giving this reader's output to >>>>>> > itkSmoothingQuadEdgeMeshFilter's input. >>>>>> > >>>>>> > I checked the execution time of each step in the pipeline ,after >>>>>> > SmothingQEMeshFilter has got it's input ,it is taking time to >>>>>> process the >>>>>> > data. >>>>>> > >>>>>> > Thank you >>>>>> > >>>>>> > >>>>>> > >>>>>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen < >>>>>> bill.lorensen at gmail.com> >>>>>> > wrote: >>>>>> >> >>>>>> >> First, make sure you are building ITK and your app with Release. A >>>>>> >> Debug build can be 10-50 times slower. >>>>>> >> >>>>>> >> >>>>>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K < >>>>>> mallikarjun49 at gmail.com> >>>>>> >> wrote: >>>>>> >> > Hi All, >>>>>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>>>>> >> > smoothing.This >>>>>> >> > filter is giving good results what I expected but taking more >>>>>> execution >>>>>> >> > time.can any one suggest me to reduce the execution time( multi >>>>>> >> > threading >>>>>> >> > or any parameters to add/remove )? >>>>>> >> > >>>>>> >> > Below is the code snippet >>>>>> >> > /////// >>>>>> >> > typedef itk::QuadEdgeMeshTraits>>>>> double,double >>>>>> >> > > >>>>>> >> > qetraits; >>>>>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > >>>>>> MeshType; >>>>>> >> > >>>>>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>>>>> >> > >>>>>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>>>>> >> > >>>>>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>>>> >> > SmoothingQuadEdgeMeshFilter; >>>>>> >> > >>>>>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>>>>> >> > SmoothingQuadEdgeMeshFilter::New(); >>>>>> >> > >>>>>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>>>>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>>>>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>>>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>>>>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>>>> >> > QEMeshSmoother->Update(); >>>>>> >> > //// >>>>>> >> > >>>>>> >> > -- >>>>>> >> > Regards: >>>>>> >> > Mallik >>>>>> >> > >>>>>> >> > >>>>>> >> > _____________________________________ >>>>>> >> > Powered by www.kitware.com >>>>>> >> > >>>>>> >> > Visit other Kitware open-source projects at >>>>>> >> > http://www.kitware.com/opensource/opensource.html >>>>>> >> > >>>>>> >> > Kitware offers ITK Training Courses, for more information visit: >>>>>> >> > http://www.kitware.com/products/protraining.php >>>>>> >> > >>>>>> >> > Please keep messages on-topic and check the 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 >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > -- >>>>>> > Regards: >>>>>> > Mallik >>>>>> > >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Unpaid intern in BillsBasement at noware dot com >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> *Regards:* >>>>> Mallik >>>>> >>>>> >>>> >>>> >>>> -- >>>> *Regards:* >>>> Mallik >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>>> >>>> >>> >>> >>> -- >>> *Regards:* >>> Mallik >>> >>> >> >> >> -- >> *Regards:* >> Mallik >> >> >> > > > -- > *Regards:* > Mallik > > > > > -- *Regards:* Mallik -------------- 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 Aug 7 14:20:19 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 7 Aug 2014 14:20:19 -0400 Subject: [ITK] ITK Development Meeting Message-ID: Hi, Are we having the development meeting teleconference tomorrow? If not, would folks like to do a Google Hangout at 9 AM? On a positive side note, Google Hangout's no longer require a Google Plus account [1], and it no longer requires plugins with Chrome/ium [2]. I am happy to see the Goog-Monster moving towards greater openness and liberty. Maybe the internal forces for good are becoming stronger :-). Thanks, Matt [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ From blowekamp at mail.nih.gov Thu Aug 7 14:23:07 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 7 Aug 2014 14:23:07 -0400 Subject: [ITK] ITK Development Meeting In-Reply-To: References: Message-ID: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> Hello, I am in favor of using Google Hangout as it appears to be more accessible to people and more seem to be able to join. Brad On Aug 7, 2014, at 2:20 PM, Matt McCormick wrote: > Hi, > > Are we having the development meeting teleconference tomorrow? If > not, would folks like to do a Google Hangout at 9 AM? > > On a positive side note, Google Hangout's no longer require a Google > Plus account [1], and it no longer requires plugins with Chrome/ium > [2]. > > I am happy to see the Goog-Monster moving towards greater openness and > liberty. Maybe the internal forces for good are becoming stronger > :-). > > Thanks, > Matt > > [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ > > [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ From bill.lorensen at gmail.com Thu Aug 7 14:24:40 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 7 Aug 2014 14:24:40 -0400 Subject: [ITK] ITK Development Meeting In-Reply-To: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> References: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> Message-ID: +1 On Thu, Aug 7, 2014 at 2:23 PM, Bradley Lowekamp wrote: > Hello, > > I am in favor of using Google Hangout as it appears to be more accessible to people and more seem to be able to join. > > Brad > > On Aug 7, 2014, at 2:20 PM, Matt McCormick wrote: > >> Hi, >> >> Are we having the development meeting teleconference tomorrow? If >> not, would folks like to do a Google Hangout at 9 AM? >> >> On a positive side note, Google Hangout's no longer require a Google >> Plus account [1], and it no longer requires plugins with Chrome/ium >> [2]. >> >> I am happy to see the Goog-Monster moving towards greater openness and >> liberty. Maybe the internal forces for good are becoming stronger >> :-). >> >> Thanks, >> Matt >> >> [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ >> >> [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -- Unpaid intern in BillsBasement at noware dot com From michkapopoff at gmail.com Thu Aug 7 14:43:54 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Thu, 7 Aug 2014 20:43:54 +0200 Subject: [ITK] ITK Development Meeting In-Reply-To: References: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> Message-ID: <913EF9B6-84A0-4BD3-A154-EBCFD92685E5@gmail.com> +1 9 AM, what timezone ? ;D On 7 ao?t 2014, at 20:24, Bill Lorensen wrote: > +1 > > > On Thu, Aug 7, 2014 at 2:23 PM, Bradley Lowekamp wrote: >> Hello, >> >> I am in favor of using Google Hangout as it appears to be more accessible to people and more seem to be able to join. >> >> Brad >> >> On Aug 7, 2014, at 2:20 PM, Matt McCormick wrote: >> >>> Hi, >>> >>> Are we having the development meeting teleconference tomorrow? If >>> not, would folks like to do a Google Hangout at 9 AM? >>> >>> On a positive side note, Google Hangout's no longer require a Google >>> Plus account [1], and it no longer requires plugins with Chrome/ium >>> [2]. >>> >>> I am happy to see the Goog-Monster moving towards greater openness and >>> liberty. Maybe the internal forces for good are becoming stronger >>> :-). >>> >>> Thanks, >>> Matt >>> >>> [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ >>> >>> [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community > > > > -- > Unpaid intern in BillsBasement at noware dot com > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From matt.mccormick at kitware.com Thu Aug 7 15:19:02 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 7 Aug 2014 15:19:02 -0400 Subject: [ITK] ITK Development Meeting In-Reply-To: <913EF9B6-84A0-4BD3-A154-EBCFD92685E5@gmail.com> References: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> <913EF9B6-84A0-4BD3-A154-EBCFD92685E5@gmail.com> Message-ID: OK, let's do 9 AM Eastern Time Zone (GMT-4). :-) I created an Event here [1]. If you are subscribed to the ITK Bar Camp Community [2], you should already have received an invitation. Thanks, Matt [1] https://plus.google.com/events/cauvj61hvr7kirg5g5vjsupt4pg [2] https://plus.google.com/communities/111375098792764998322 On Thu, Aug 7, 2014 at 2:43 PM, Michka Popoff wrote: > +1 > > 9 AM, what timezone ? ;D > > On 7 ao?t 2014, at 20:24, Bill Lorensen wrote: > >> +1 >> >> >> On Thu, Aug 7, 2014 at 2:23 PM, Bradley Lowekamp wrote: >>> Hello, >>> >>> I am in favor of using Google Hangout as it appears to be more accessible to people and more seem to be able to join. >>> >>> Brad >>> >>> On Aug 7, 2014, at 2:20 PM, Matt McCormick wrote: >>> >>>> Hi, >>>> >>>> Are we having the development meeting teleconference tomorrow? If >>>> not, would folks like to do a Google Hangout at 9 AM? >>>> >>>> On a positive side note, Google Hangout's no longer require a Google >>>> Plus account [1], and it no longer requires plugins with Chrome/ium >>>> [2]. >>>> >>>> I am happy to see the Goog-Monster moving towards greater openness and >>>> liberty. Maybe the internal forces for good are becoming stronger >>>> :-). >>>> >>>> Thanks, >>>> Matt >>>> >>>> [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ >>>> >>>> [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> _______________________________________________ >> 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 From michkapopoff at gmail.com Thu Aug 7 15:50:18 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Thu, 7 Aug 2014 21:50:18 +0200 Subject: [ITK] ITK Development Meeting In-Reply-To: References: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> <913EF9B6-84A0-4BD3-A154-EBCFD92685E5@gmail.com> Message-ID: <5CB49492-605B-434E-BE5D-7F1B33F289CA@gmail.com> Perfect, 3 PM for me :) Thanks On 7 ao?t 2014, at 21:19, Matt McCormick wrote: > OK, let's do 9 AM Eastern Time Zone (GMT-4). :-) > > I created an Event here [1]. > > If you are subscribed to the ITK Bar Camp Community [2], you should > already have received an invitation. > > Thanks, > Matt > > [1] https://plus.google.com/events/cauvj61hvr7kirg5g5vjsupt4pg > > [2] https://plus.google.com/communities/111375098792764998322 > > On Thu, Aug 7, 2014 at 2:43 PM, Michka Popoff wrote: >> +1 >> >> 9 AM, what timezone ? ;D >> >> On 7 ao?t 2014, at 20:24, Bill Lorensen wrote: >> >>> +1 >>> >>> >>> On Thu, Aug 7, 2014 at 2:23 PM, Bradley Lowekamp wrote: >>>> Hello, >>>> >>>> I am in favor of using Google Hangout as it appears to be more accessible to people and more seem to be able to join. >>>> >>>> Brad >>>> >>>> On Aug 7, 2014, at 2:20 PM, Matt McCormick wrote: >>>> >>>>> Hi, >>>>> >>>>> Are we having the development meeting teleconference tomorrow? If >>>>> not, would folks like to do a Google Hangout at 9 AM? >>>>> >>>>> On a positive side note, Google Hangout's no longer require a Google >>>>> Plus account [1], and it no longer requires plugins with Chrome/ium >>>>> [2]. >>>>> >>>>> I am happy to see the Goog-Monster moving towards greater openness and >>>>> liberty. Maybe the internal forces for good are becoming stronger >>>>> :-). >>>>> >>>>> Thanks, >>>>> Matt >>>>> >>>>> [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ >>>>> >>>>> [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ >>>> >>>> _______________________________________________ >>>> Community mailing list >>>> Community at itk.org >>>> http://public.kitware.com/mailman/listinfo/community >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >>> _______________________________________________ >>> 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 From millerjv at ge.com Thu Aug 7 14:30:04 2014 From: millerjv at ge.com (Miller, James V (GE Global Research)) Date: Thu, 7 Aug 2014 18:30:04 +0000 Subject: [ITK] ITK Development Meeting In-Reply-To: References: Message-ID: <2CD24A027ACF154199B5D6F6E5EF830BB487D924@CINMBCNA06.e2k.ad.ge.com> I don't have a strong preference. Note, it looks like Hangouts require either a Google+ or a Google Apps account. It doesn't look like a plain old Google account is supported yet. Jim -----Original Message----- From: Matt McCormick [mailto:matt.mccormick at kitware.com] Sent: Thursday, August 07, 2014 2:20 PM To: ITK; community at itk.org; Bradley Lowekamp; Miller, James V (GE Global Research); Padfield, Dirk R (GE Global Research) Subject: ITK Development Meeting Hi, Are we having the development meeting teleconference tomorrow? If not, would folks like to do a Google Hangout at 9 AM? On a positive side note, Google Hangout's no longer require a Google Plus account [1], and it no longer requires plugins with Chrome/ium [2]. I am happy to see the Goog-Monster moving towards greater openness and liberty. Maybe the internal forces for good are becoming stronger :-). Thanks, Matt [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ From arnaudgelas at gmail.com Fri Aug 8 04:44:26 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Fri, 8 Aug 2014 10:44:26 +0200 Subject: [ITK] [ITK-users] Motion under Mean Curvature with LevelSetv4 Framework In-Reply-To: References: Message-ID: Hi Cagatay, I just came back from vacation... Have you solved this problem? It would be great if we could make the equivalent code in the old framework to compare and fix what could be wrong. Have you done something like this? I'll start looking at it... Best, Arnaud On Tue, Jul 22, 2014 at 9:58 AM, Cagatay Bilgin wrote: > Dear ITK Community, > > I am trying to familiarize myself with the new level set classes. My goal > is to simulate motion under mean curvature using the new design. > > I have put together the following, looking at the examples and tests. > http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3872740/ is a great source to > understand the design and tests in source directory are very helpful, thank > you for the resources! > > The test scenario I have is a L shaped object. I would expect the object > to become somewhat ellipse and then disappear at the end of the evolution. > However I get the following results attached to the email. I don't quite > follow these results. Am I missing something obvious? > > Here is the code and CMakeLists.txt. I ran the program with ./Motion 100 0 > 0 0.05 > > #include "itkBinaryImageToLevelSetImageAdaptor.h" > #include "itkImageFileReader.h" > #include "itkLevelSetContainer.h" > #include "itkLevelSetEquationPropagationTerm.h" > #include "itkLevelSetEquationAdvectionTerm2.h" > #include "itkLevelSetEquationContainer.h" > #include "itkLevelSetEquationTermContainer.h" > #include "itkLevelSetEvolution.h" > #include "itkLevelSetEvolutionNumberOfIterationsStoppingCriterion.h" > #include "itkLevelSetDenseImage.h" > #include "itkVTKVisualizeImageLevelSetIsoValues.h" > #include "itkSinRegularizedHeavisideStepFunction.h" > #include "itkLevelSetIterationUpdateCommand.h" > #include "itkLevelSetEquationCurvatureTerm.h" > #include "itkCastImageFilter.h" > #include "itkWhitakerSparseLevelSetImage.h" > #include "itkSpatialObjectToImageFilter.h" > #include "itkEllipseSpatialObject.h" > > typedef itk::Image< float, 2 > FIT; > > /* > * L Shape > */ > void CreateSquareImage(FIT::Pointer image) > { > FIT::RegionType region; > FIT::IndexType start; > start[0] = 0; > start[1] = 0; > > FIT::SizeType size; > size[0] = 200; > size[1] = 300; > > region.SetSize(size); > region.SetIndex(start); > > image->SetRegions(region); > image->Allocate(); > > // Set pixels in a square to one value > for(unsigned int r = 20; r < 160; r++) > { > for(unsigned int c = 30; c < 100; c++) > { > FIT::IndexType pixelIndex; > pixelIndex[0] = r; > pixelIndex[1] = c; > > image->SetPixel(pixelIndex, 255); > } > } > > for(unsigned int r = 20; r < 80; r++) > { > for(unsigned int c = 100; c < 200; c++) > { > FIT::IndexType pixelIndex; > pixelIndex[0] = r; > pixelIndex[1] = c; > > image->SetPixel(pixelIndex, 255); > } > } > } > > > /* > */ > int main( int argc, char* argv[] ) > { > if( argc != 5) > { > std::cerr << "Missing Arguments" << std::endl; > std::cerr << argv[0] << std::endl; > std::cerr << "1- Number of Iterations" << std::endl; > std::cerr << "2- Propagation Term" << std::endl; > std::cerr << "3- Advection Term" << std::endl; > std::cerr << "4- Curvature Term" << std::endl; > return EXIT_FAILURE; > } > > // Image Dimension > const unsigned int Dimension = 2; > > typedef unsigned char InputPixelType; > typedef itk::Image< InputPixelType, Dimension > IIT; > typedef itk::Image< float, 2 > FIT; > > FIT::Pointer input = FIT::New(); > CreateSquareImage(input); > > int numberOfIterations = atoi( argv[1]); > > typedef float > LevelSetPixelType; > typedef itk::Image< LevelSetPixelType, Dimension > LSIT; > typedef itk::LevelSetDenseImage< LSIT > LST; > //typedef itk::WhitakerSparseLevelSetImage< LevelSetPixelType, 2 > LST; > > typedef LST::OutputType LevelSetOutputType; > typedef LST::OutputRealType LevelSetRealType; > > // convert a binary mask to a level-set function > typedef itk::BinaryImageToLevelSetImageAdaptor BI2LST; > BI2LST::Pointer adaptor = BI2LST::New(); > adaptor->SetInputImage( input ); > adaptor->Initialize(); > LST::Pointer levelSet = adaptor->GetLevelSet(); > > // The Heaviside function > typedef itk::SinRegularizedHeavisideStepFunction< LevelSetRealType, > LevelSetRealType > HeavisideFunctionType; > HeavisideFunctionType::Pointer heaviside = > HeavisideFunctionType::New(); > heaviside->SetEpsilon( 1 ); > > // Create the level set container > typedef itk::LevelSetContainer< itk::IdentifierType, LST > > LSContainerT; > LSContainerT::Pointer levelSetContainer = LSContainerT::New(); > levelSetContainer->SetHeaviside( heaviside ); > levelSetContainer->AddLevelSet( 0, levelSet ); > > // Create the terms. > typedef itk::LevelSetEquationPropagationTerm > PropagationTermType; > PropagationTermType::Pointer propagationTerm = > PropagationTermType::New(); > propagationTerm->SetInput(input); > propagationTerm->SetCoefficient(atof(argv[2])); > > typedef itk::LevelSetEquationAdvectionTerm2 > AdvectionTermType; > AdvectionTermType::Pointer advectionTerm = AdvectionTermType::New(); > advectionTerm->SetInput(input); > advectionTerm->SetCoefficient(atof(argv[3])); > > typedef itk::LevelSetEquationCurvatureTerm > CurvatureTermType; > CurvatureTermType::Pointer curvatureTerm = CurvatureTermType::New(); > //curvatureTerm->SetInput(input); > curvatureTerm->SetCoefficient(atof(argv[4])); > > > // Create term container (equation rhs) > typedef itk::LevelSetEquationTermContainer< FIT, LSContainerT > > TermContainerType; > TermContainerType::Pointer termContainer = TermContainerType::New(); > termContainer->SetLevelSetContainer( levelSetContainer ); > termContainer->SetInput( input ); > //termContainer->AddTerm( 0, propagationTerm ); > //termContainer->AddTerm( 1, advectionTerm ); > termContainer->AddTerm( 0, curvatureTerm ); > > // Create equation container > typedef itk::LevelSetEquationContainer< TermContainerType > > EquationContainerType; > EquationContainerType::Pointer equationContainer = > EquationContainerType::New(); > equationContainer->SetLevelSetContainer( levelSetContainer ); > equationContainer->AddEquation( 0, termContainer ); > > // Create stopping criteria > typedef itk::LevelSetEvolutionNumberOfIterationsStoppingCriterion< > LSContainerT > StoppingCriterionType; > StoppingCriterionType::Pointer criterion = > StoppingCriterionType::New(); > criterion->SetNumberOfIterations( numberOfIterations ); > > // Create the visualizer > typedef itk::VTKVisualizeImageLevelSetIsoValues< FIT, LST > > VisualizationType; > VisualizationType::Pointer visualizer = VisualizationType::New(); > visualizer->SetInputImage( input ); > visualizer->SetLevelSet( levelSet ); > visualizer->SetScreenCapture( true ); > > // Create evolution class > typedef itk::LevelSetEvolution< EquationContainerType, LST > > LevelSetEvolutionType; > LevelSetEvolutionType::Pointer evolution = > LevelSetEvolutionType::New(); > evolution->SetEquationContainer( equationContainer ); > evolution->SetStoppingCriterion( criterion ); > evolution->SetLevelSetContainer( levelSetContainer ); > > typedef itk::LevelSetIterationUpdateCommand< LevelSetEvolutionType, > VisualizationType > IterationUpdateCommandType; > IterationUpdateCommandType::Pointer iterationUpdateCommand = > IterationUpdateCommandType::New(); > iterationUpdateCommand->SetFilterToUpdate( visualizer ); > iterationUpdateCommand->SetUpdatePeriod( 1 ); > > evolution->AddObserver( itk::IterationEvent(), iterationUpdateCommand > ); > > evolution->Update(); > > return EXIT_SUCCESS; > } > > > > cmake_minimum_required(VERSION 2.8) > > project(CurvatureMotion) > > find_package(ITK REQUIRED) > include(${ITK_USE_FILE}) > > find_package(VTK REQUIRED) > include(${VTK_USE_FILE}) > > add_executable(Motion main.cpp) > target_link_libraries(Motion ${ITK_LIBRARIES} ${VTK_LIBRARIES}) > > [image: Inline image 4][image: Inline image 3] > -- > Cemal Cagatay Bilgin, PhD > Life Sciences Division > Lawrence Berkeley National Lab > MS977, One Cyclotron Road > Berkeley, CA 94720, USA > Email: ccbilgin at lbl.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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: levelset_040.png Type: image/png Size: 3421 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: levelset_000.png Type: image/png Size: 2652 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 david.froger.ml at mailoo.org Fri Aug 8 10:48:27 2014 From: david.froger.ml at mailoo.org (David Froger) Date: Fri, 08 Aug 2014 16:48:27 +0200 Subject: [ITK] HDF5 enhancements Message-ID: <20140808144827.12192.3457@otis.rocq.inria.fr> Dear all, I just push this to Gerrit (ITK): http://review.source.kitware.com/16576 http://review.source.kitware.com/16577 http://review.source.kitware.com/16578 http://review.source.kitware.com/16579 to fix the test of HDF5 write streaming, and add pasting support for HDF5. and this (ITKExamples): http://review.source.kitware.com/16580 to add examples about streamnig and pasting HDF5 files. The commits are not perfect, but I would be happy to discuss its content and to have feedback. Especially: - I introduce a 'ChangeRegionImageFilter', that may be replaced by something already existing, but I didn't find what. (Furthermore, the implementation is not optimal, it make a useless copy). - For the ITKExamples, I didn't find how to build the html documentations from the rst files, so I didn't test it. - For the ITKExamples, I didn't succced yet to upload the input binary files. - For the ITKExamples, the last example may not work yet. Best, David From nicgallego at gmail.com Fri Aug 8 12:18:53 2014 From: nicgallego at gmail.com (Nicolas Gallego) Date: Fri, 8 Aug 2014 18:18:53 +0200 Subject: [ITK] [ITK-users] Whole body Segmentation-Identification In-Reply-To: References: Message-ID: Hi Bumpy, It seams that your problem is exploratory and will get benefit of manual interaction. Have you tried visualizing your images in ITKSnap for example? There are tools to do manual segmentation there. Hope that helps Nicol?s Gallego-Ortiz Universit? catholique de Louvain, Belgium 2014-08-01 15:47 GMT+02:00 Bumpy RG : > Dear All, > > I have a dicom series having whole body image sequences, starting from > head up to legs. > > My aim is to write an algorithm to automatically identify the body parts > (lungs, spines, head etc.) from the dicom sequence. > > Although I am very new to the ITK world, I am following these steps in ITK > (*I would appreciate if you comment whether I am following correct idea > or not*): > > 1. Read dicom series using 'DicomSeriesReadImageWrite2.cxx ' to create > a 3D volume and save the result in mhd format. > 2. Use 'ImageReadRegionOfInterestWrite.cxx' for separating various > parts (like left lung, right lung, spines, head etc.) and save them in > respective 3D volumes in mhd format. > 3. Pick the various body parts prepared above, one by one and segment > them using robust algorithm (say > ThresholdSegmentationLevelSetImageFilter.cxx). > 4. Use Mathematical Morphology to get better results. > 5. Using the various results from above, form an algorithm for > identifying the various body parts. > > Currently I am stuck in the second step because it is so hard to choose > the co-ordinates for selecting proper region of interest. > > For example, I chose these points for ROI of right lung (I checked the > co-ordinates using 3D slicer visualizer) and it does not give me good > results : > start[0] = 255; > start[1] =165; > start[2] = 0; > > *However I do not understand how to choose the points properly in ITK.* > > > I would be really glad to have your response. > > Thanking you in advance. > Kind Regards, > Bumpy. > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Fri Aug 8 17:36:36 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 8 Aug 2014 17:36:36 -0400 Subject: [ITK] HDF5 enhancements In-Reply-To: <20140808144827.12192.3457@otis.rocq.inria.fr> References: <20140808144827.12192.3457@otis.rocq.inria.fr> Message-ID: Hi David, Looks like some great work! Thanks for contributing! I'll review over the coming days. Thanks, Matt On Fri, Aug 8, 2014 at 10:48 AM, David Froger wrote: > Dear all, > > I just push this to Gerrit (ITK): > > http://review.source.kitware.com/16576 > http://review.source.kitware.com/16577 > http://review.source.kitware.com/16578 > http://review.source.kitware.com/16579 > > to fix the test of HDF5 write streaming, and add pasting support for HDF5. > > and this (ITKExamples): > > http://review.source.kitware.com/16580 > > to add examples about streamnig and pasting HDF5 files. > > The commits are not perfect, but I would be happy to discuss its content and > to have feedback. > > Especially: > - I introduce a 'ChangeRegionImageFilter', that may be replaced by something > already existing, but I didn't find what. (Furthermore, the implementation is > not optimal, it make a useless copy). > - For the ITKExamples, I didn't find how to build the html documentations from > the rst files, so I didn't test it. > - For the ITKExamples, I didn't succced yet to upload the input binary files. > - For the ITKExamples, the last example may not work yet. > > Best, > David > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From matimontg at gmail.com Sat Aug 9 10:21:47 2014 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 9 Aug 2014 11:21:47 -0300 Subject: [ITK] ResampleDicom | Tags Message-ID: HI, I'm using the ResmpleDicom example to convert a serie of images to a new serie with z spacing=1. Images are CT Everything works fine except that some Tags on the images are deleted during the process, I even see the rescale intercept is srt to 0 and the rescaletype is changed as well. The padding value also changes. Is there a way to avoid all this? My images WL and WC change once I run the Resample.. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Sat Aug 9 10:34:08 2014 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 9 Aug 2014 11:34:08 -0300 Subject: [ITK] [ITK-users] ITK ResampleDicom | Tags Message-ID: Hi, I'm using the ResmpleDicom example to convert a serie of images to a new serie with z spacing=1. Images are CT Everything works fine except that some Tags on the images are deleted during the process, I even see the rescale intercept is srt to 0 and the rescaletype is changed as well. The padding value also changes. Is there a way to avoid all this? My images WL and WC change once I run the Resample.. Thanks! -------------- 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 Sat Aug 9 10:42:28 2014 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 9 Aug 2014 11:42:28 -0300 Subject: [ITK] [ITK-users] ITK ResampleDicom | Tags In-Reply-To: References: Message-ID: I think the key is in this section of the code: CopyDictionary (*inputDict, *dict); Shouldn't copy the entire tags? On Sat, Aug 9, 2014 at 11:34 AM, Matias Montroull wrote: > Hi, > > I'm using the ResmpleDicom example to convert a serie of images to a new > serie with z spacing=1. Images are CT > > Everything works fine except that some Tags on the images are deleted > during the process, I even see the rescale intercept is srt to 0 and the > rescaletype is changed as well. The padding value also changes. > > Is there a way to avoid all this? My images WL and WC change once I run > the Resample.. > > Thanks! > -------------- 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 Aug 11 01:15:45 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Mon, 11 Aug 2014 07:15:45 +0200 Subject: [ITK] [ITK-users] adding a global hierarchical watershed segmentation mode to itksnap Message-ID: <53E85181.8040607@mh-hannover.de> Dear mailing list members, For a long time now I've been searching for a replacement of the old SegmentationEditor (part of the InsightApplications) which I could not get to work even with older ITK-3.x. Somewhere I was told that it was integrated and maintained within itksnap. However the only tool in itksnap based on watershed segmentation seems to be the adaptive brush. It is very handy, but time-consuming in 3D and only for local segmentations. In contrast the SegmentationEditor used a global hierarchical watershed segmentation to pick labels from, see e.g. the video linked here: http://www.insight-journal.org/browse/publication/70 Quite often now I've stumbled over data, that would likely have profited a lot of such a tool for segmentation. If such a tool working with ITK-4.x does not exist any more, I thought of implementing it as a global WS segmentation mode in itksnap. That way making the tool easier to find, to use and to ensure maintenance (should it be integrated into the itksnap code base in the end) and also avoiding recoding a GUI with mouse interaction and such. My current idea is to start, similar to the snake-tool, with pre-filtering like smoothing and optional edge-detection. Then the main edit mode to consist of the usual 4 subwindows showing an overlay of the grey-image and the watershed segmentation of the hierarchical WS-filter (hWS), side-by-side to another label-dataset (loaded like a tiled overlay) which consist of the actually chosen labels from the hWS as the final data (FD). The interaction I'm considering would be to LMB click on a label in the hWS which is then added to the FD as the current fg label, or removed with a RMB. The hierachrchy level of the hWS could be controlled by a slider or the mouse wheel + Shift in nearly real time if some region demands higher or lower detailed segmentation. When the fg label is changed, the segmentation added or removed with further mouse interactions would modify the new fg label. When all is done and the global WS mode is left, the FD label-dataset is added to the main segmentation of itksnap. Would that be possible to implement in itksnap 3.x? What source files of the itksnap code base should I look at for: - the pre-filtering mode of the snake (for the smoothing and edge detection) - the mouse interactions (for e.g. adding the whell + Shift interaction) - possible examples for the dual layout Thanks for any comments, help or hints. 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 iyas.hamdan at gmail.com Mon Aug 11 03:35:25 2014 From: iyas.hamdan at gmail.com (Iyas Hamdan) Date: Mon, 11 Aug 2014 09:35:25 +0200 Subject: [ITK] [ITK-users] 3D multimodal registration Message-ID: Hello all, I?m working on 3D multimodal image registration and I have a problem I've been struggling with for quite a while. I have a 3D MRI volume (fixed volume) and a 3D CT volume (moving volume), but those two volumes have different sizes (different dimensions and different number of slices). First of all I have a general question, how does the 3D registration in itk work basically ? I mean does it take the first slice from the fixed volume and try to find its correspondence in the moving volume ( by optimizing a metric ) and then go on to the next slice and so on? Or does it rather work with the whole volume and not slice by slice ? Because for me, lets imagine I have 50 MRI slices and 150 CT ones for example, but the field of view is different between both volumes. I mean the first MRI slice corresponds ( visually ) to the 50th CT slice for example so the first 49 CT slices don?t exist in the MRI volume. So when I apply my registration method ( affine transformation with the mutual information as the metric ) the registration fails to give a good result. It show no errors but the result volume is not well aligned with the fixed one. Although the transformation ( from the outside let?s say ) is correct, meaning the result volume has the same size as the fixed one and both volumes are on top of each other perfectly but the slices don?t look alike at all when I try to show both volumes on top of each other. Knowing that my initialization is good, and I tuned the parameters of the optimizer ( regular step gradient descent) and always ended up with almost the same result. So is that a normal behavior of itk to fail when the field of view is different ? Because I tried to cut off the first 49 CT slices, and created a new volume with the rest of the slices ( so that I had the same field of view with the MRI volume ), and when I applied the registration between this new volume and the MRI one, the registration worked perfectly and I had a very good result. So what?s wrong here ? and if the field of view is the problem how can I fix that automatically ? because I can delete the extra slices from one volume manually, but what I'm looking for is an automatic approach and I couldn?t think of one. Any hint would be really appreciated, Thanks in advance, Best regards, Iyas -------------- 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 mercikd at thomas.edu Mon Aug 11 10:37:37 2014 From: mercikd at thomas.edu (Dan Mercik) Date: Mon, 11 Aug 2014 14:37:37 +0000 Subject: [ITK] [ITK-users] Image Diffusion Message-ID: Good Morning, I'm doing a project that involves the fusion of multiple images. However, at the end of the fusion process I need to be able to diffuse the fuse imaged back to it's original stack images. I wanted to know if there an algorithm I can use to defuse my fused image? Any thoughts are more than welcome and I would be highly appreciative for your input. Daniel Mercik Computer Science Major Service Desk Technician Thomas College _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 lasso at queensu.ca Mon Aug 11 10:20:58 2014 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 11 Aug 2014 14:20:58 +0000 Subject: [ITK] [ITK-users] adding a global hierarchical watershed segmentation mode to itksnap In-Reply-To: <53E85181.8040607@mh-hannover.de> References: <53E85181.8040607@mh-hannover.de> Message-ID: <0f32755d9980441ca0162728b088f00b@queensu.ca> Have you tried segmentation tools in 3D Slicer? There is a multi-label watershed segmentation tool that works in 3d (http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Editor#WatershedFromMarkers), there are also a number of other generic semi-automatic segmentation tools (such as GrowCut) and a few fully-automatic specialized tools (for brain, airways, etc). Download the nightly build and also checkout the Segmentation category in the Extension Manager. Andras From: Dr. Roman Grothausmann Sent: ?Monday?, ?August? ?11?, ?2014 ?1?:?15? ?AM To: itksnap-users at googlegroups.com Cc: ITK Mailing List Dear mailing list members, For a long time now I've been searching for a replacement of the old SegmentationEditor (part of the InsightApplications) which I could not get to work even with older ITK-3.x. Somewhere I was told that it was integrated and maintained within itksnap. However the only tool in itksnap based on watershed segmentation seems to be the adaptive brush. It is very handy, but time-consuming in 3D and only for local segmentations. In contrast the SegmentationEditor used a global hierarchical watershed segmentation to pick labels from, see e.g. the video linked here: http://www.insight-journal.org/browse/publication/70 Quite often now I've stumbled over data, that would likely have profited a lot of such a tool for segmentation. If such a tool working with ITK-4.x does not exist any more, I thought of implementing it as a global WS segmentation mode in itksnap. That way making the tool easier to find, to use and to ensure maintenance (should it be integrated into the itksnap code base in the end) and also avoiding recoding a GUI with mouse interaction and such. My current idea is to start, similar to the snake-tool, with pre-filtering like smoothing and optional edge-detection. Then the main edit mode to consist of the usual 4 subwindows showing an overlay of the grey-image and the watershed segmentation of the hierarchical WS-filter (hWS), side-by-side to another label-dataset (loaded like a tiled overlay) which consist of the actually chosen labels from the hWS as the final data (FD). The interaction I'm considering would be to LMB click on a label in the hWS which is then added to the FD as the current fg label, or removed with a RMB. The hierachrchy level of the hWS could be controlled by a slider or the mouse wheel + Shift in nearly real time if some region demands higher or lower detailed segmentation. When the fg label is changed, the segmentation added or removed with further mouse interactions would modify the new fg label. When all is done and the global WS mode is left, the FD label-dataset is added to the main segmentation of itksnap. Would that be possible to implement in itksnap 3.x? What source files of the itksnap code base should I look at for: - the pre-filtering mode of the snake (for the smoothing and edge detection) - the mouse interactions (for e.g. adding the whell + Shift interaction) - possible examples for the dual layout Thanks for any comments, help or hints. 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 _______________________________________________ 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 gass at vision.ee.ethz.ch Mon Aug 11 12:18:03 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Mon, 11 Aug 2014 18:18:03 +0200 Subject: [ITK] [ITK-users] Anti-alias filter Message-ID: Dear all, I'm having problems using the anti-alias filter, which I want to use in order to smooth a binary segmentation volume. I'm using essentially the example code from the repository, which for my input file seems to start oscillating after 2 iterations, leading to weird 'pointy' artifacts on the surface as can be seen from the attached screenshot (AA filter output is on the left, input on the right). Is there any parameter to set/implement which could improve the behavior of this filter? I'm assuming that my input is reasonable, or is this something the filter is expected to have problems with? It is notable that such errors seem to mainly appear in 'flat' regions of the volume, and are not apparent in the curved shaft of the bone. Any help, or pointers to further resources are appreciated, thanks, Tobias -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: AAFIlter.jpg Type: image/jpeg Size: 205294 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 norman-k-williams at uiowa.edu Mon Aug 11 12:49:31 2014 From: norman-k-williams at uiowa.edu (Williams, Norman K) Date: Mon, 11 Aug 2014 16:49:31 +0000 Subject: [ITK] [ITK-dev] VtkGlue module -- strange configuration. Message-ID: I?ve been messing with making the VtkGlue module use a more specific signature for find_package(VTK)* In ITK/Modules/Bridge/VtkGlue/itk-module-init.cmake there?s this: set(VERSION_MIN "5.9.20110419") ? which as far as I can tell is nonsense; I checked out the VTK version from April 19th 2011, and the VTK version is set to be 5.9.0 I don?t think the VTK_BUILD_VERSION would ever be set to a specific date stamp. What is required ? in order to use find_package(VTK COMPONENTS ?) -- would be the first revision after VTK Modularization was working. And in fact, given how VTK sets its version numbers ? hard coded in the top level CMakeLists.txt ? I don?t even know how that would work. Any ideas? *This is an outgrowth of the work I?m doing on tailoring BRAINSTools? dependency processing in CMake for Slicer inclusion. Specifically, rather than use find_package(ITK REQUIRED) use find_package(ITK COMPONENTS ? REQUIRED) ? this only adds the include paths (to compiles) and libraries (to link commangs) actually used by the specific programs. There?s no find_package(ITK) at the top level of the build tree; there?s a specific find_package in each subdirectory that only requests the COMPONENTS actually referenced. ________________________________ 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. ________________________________ -------------- 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 michkapopoff at gmail.com Mon Aug 11 13:10:26 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Mon, 11 Aug 2014 19:10:26 +0200 Subject: [ITK] [ITK-dev] VtkGlue module -- strange configuration. In-Reply-To: References: Message-ID: Hi moving this to the new community mailing list. I made a patch some days ago fixing a bug for old VTK versions under 5.5, where VTK_VERSION was not defined, but that is another topic I think. https://github.com/InsightSoftwareConsortium/ITK/commit/1f41404903e50102c2ed5271d9caeec41807d014 This minimal version you see was introduced here: https://github.com/InsightSoftwareConsortium/ITK/commit/913e2164cca521f791aac6d20bce34cba9831e96 I guess we could just set VERSION_MIN to 5.10.0, and make a fix for ITK 4.6.1. Michka On 11 ao?t 2014, at 18:49, Williams, Norman K wrote: > I?ve been messing with making the VtkGlue module use a more specific signature for find_package(VTK)* > > In ITK/Modules/Bridge/VtkGlue/itk-module-init.cmake there?s this: > > set(VERSION_MIN "5.9.20110419") > > ? which as far as I can tell is nonsense; I checked out the VTK version from April 19th 2011, and the VTK version is set to be 5.9.0 > > I don?t think the VTK_BUILD_VERSION would ever be set to a specific date stamp. > > What is required ? in order to use find_package(VTK COMPONENTS ?) -- would be the first revision after VTK Modularization was working. And in fact, given how VTK sets its version numbers ? hard coded in the top level CMakeLists.txt ? I don?t even know how that would work. > > Any ideas? > > *This is an outgrowth of the work I?m doing on tailoring BRAINSTools? dependency processing in CMake for Slicer inclusion. Specifically, rather than use find_package(ITK REQUIRED) use find_package(ITK COMPONENTS ? REQUIRED) ? this only adds the include paths (to compiles) and libraries (to link commangs) actually used by the specific programs. There?s no find_package(ITK) at the top level of the build tree; there?s a specific find_package in each subdirectory that only requests the COMPONENTS actually referenced. > > > > > > 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 > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Aug 11 13:32:21 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 13:32:21 -0400 Subject: [ITK] [ITK-dev] VtkGlue module -- strange configuration. In-Reply-To: References: Message-ID: I set that version. VTK used to use a nightly version stamp. If I recall, there was a fix made in vtk regarding meta library configurations. It could probably be set to 6.0. On Mon, Aug 11, 2014 at 12:49 PM, Williams, Norman K wrote: > I?ve been messing with making the VtkGlue module use a more specific > signature for find_package(VTK)* > > In ITK/Modules/Bridge/VtkGlue/itk-module-init.cmake there?s this: > > set(VERSION_MIN "5.9.20110419") > > ? which as far as I can tell is nonsense; I checked out the VTK version from > April 19th 2011, and the VTK version is set to be 5.9.0 > > I don?t think the VTK_BUILD_VERSION would ever be set to a specific date > stamp. > > What is required ? in order to use find_package(VTK COMPONENTS ?) -- would > be the first revision after VTK Modularization was working. And in fact, > given how VTK sets its version numbers ? hard coded in the top level > CMakeLists.txt ? I don?t even know how that would work. > > Any ideas? > > *This is an outgrowth of the work I?m doing on tailoring BRAINSTools? > dependency processing in CMake for Slicer inclusion. Specifically, rather > than use find_package(ITK REQUIRED) use find_package(ITK COMPONENTS ? > REQUIRED) ? this only adds the include paths (to compiles) and libraries (to > link commangs) actually used by the specific programs. There?s no > find_package(ITK) at the top level of the build tree; there?s a specific > find_package in each subdirectory that only requests the COMPONENTS actually > referenced. > > > > > > ________________________________ > 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 > -- 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 bill.lorensen at gmail.com Mon Aug 11 13:33:00 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 13:33:00 -0400 Subject: [ITK] [ITK-dev] VtkGlue module -- strange configuration. In-Reply-To: References: Message-ID: Or set to VTK 5.10 On Mon, Aug 11, 2014 at 1:32 PM, Bill Lorensen wrote: > I set that version. VTK used to use a nightly version stamp. If I > recall, there was a fix made in vtk regarding meta library > configurations. It could probably be set to 6.0. > > > On Mon, Aug 11, 2014 at 12:49 PM, Williams, Norman K > wrote: >> I?ve been messing with making the VtkGlue module use a more specific >> signature for find_package(VTK)* >> >> In ITK/Modules/Bridge/VtkGlue/itk-module-init.cmake there?s this: >> >> set(VERSION_MIN "5.9.20110419") >> >> ? which as far as I can tell is nonsense; I checked out the VTK version from >> April 19th 2011, and the VTK version is set to be 5.9.0 >> >> I don?t think the VTK_BUILD_VERSION would ever be set to a specific date >> stamp. >> >> What is required ? in order to use find_package(VTK COMPONENTS ?) -- would >> be the first revision after VTK Modularization was working. And in fact, >> given how VTK sets its version numbers ? hard coded in the top level >> CMakeLists.txt ? I don?t even know how that would work. >> >> Any ideas? >> >> *This is an outgrowth of the work I?m doing on tailoring BRAINSTools? >> dependency processing in CMake for Slicer inclusion. Specifically, rather >> than use find_package(ITK REQUIRED) use find_package(ITK COMPONENTS ? >> REQUIRED) ? this only adds the include paths (to compiles) and libraries (to >> link commangs) actually used by the specific programs. There?s no >> find_package(ITK) at the top level of the build tree; there?s a specific >> find_package in each subdirectory that only requests the COMPONENTS actually >> referenced. >> >> >> >> >> >> ________________________________ >> 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 >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- 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 bill.lorensen at gmail.com Mon Aug 11 13:36:06 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 13:36:06 -0400 Subject: [ITK] [ITK-dev] VtkGlue module -- strange configuration. In-Reply-To: References: Message-ID: The commit log for my change says it all: commit 913e2164cca521f791aac6d20bce34cba9831e96 Author: Bill Lorensen Date: Sun Feb 19 08:21:41 2012 -0500 BUG: Older version of VTK cannot be used with ITK Versions of VTK prior to April 19, 2011 cannot be used with ITKv4 because of issues with MetaIO. Note that VTK 5.9 contains this error. These older version will produce the compile errors: MetaObject does not name a type MetaObjectType does not name a type plus others. The errors are caused by a change in the way MetaIO configures itself. Since VTK commit eb532553, (MetaIO: Avoid requiring parent projects to provide "../metaIOConfig.h", 2011-04-06) MetaIO configures a header into it's build tree.) The earliest VTK commit tag that will work is be4c4f115793598f6c8937a98bdd1f227d471540 Change-Id: I58506c09b53344a8550df9aed5a9ceda844597e4 On Mon, Aug 11, 2014 at 1:33 PM, Bill Lorensen wrote: > Or set to VTK 5.10 > > > On Mon, Aug 11, 2014 at 1:32 PM, Bill Lorensen wrote: >> I set that version. VTK used to use a nightly version stamp. If I >> recall, there was a fix made in vtk regarding meta library >> configurations. It could probably be set to 6.0. >> >> >> On Mon, Aug 11, 2014 at 12:49 PM, Williams, Norman K >> wrote: >>> I?ve been messing with making the VtkGlue module use a more specific >>> signature for find_package(VTK)* >>> >>> In ITK/Modules/Bridge/VtkGlue/itk-module-init.cmake there?s this: >>> >>> set(VERSION_MIN "5.9.20110419") >>> >>> ? which as far as I can tell is nonsense; I checked out the VTK version from >>> April 19th 2011, and the VTK version is set to be 5.9.0 >>> >>> I don?t think the VTK_BUILD_VERSION would ever be set to a specific date >>> stamp. >>> >>> What is required ? in order to use find_package(VTK COMPONENTS ?) -- would >>> be the first revision after VTK Modularization was working. And in fact, >>> given how VTK sets its version numbers ? hard coded in the top level >>> CMakeLists.txt ? I don?t even know how that would work. >>> >>> Any ideas? >>> >>> *This is an outgrowth of the work I?m doing on tailoring BRAINSTools? >>> dependency processing in CMake for Slicer inclusion. Specifically, rather >>> than use find_package(ITK REQUIRED) use find_package(ITK COMPONENTS ? >>> REQUIRED) ? this only adds the include paths (to compiles) and libraries (to >>> link commangs) actually used by the specific programs. There?s no >>> find_package(ITK) at the top level of the build tree; there?s a specific >>> find_package in each subdirectory that only requests the COMPONENTS actually >>> referenced. >>> >>> >>> >>> >>> >>> ________________________________ >>> 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 >>> >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com -- 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 bill.lorensen at gmail.com Mon Aug 11 13:39:44 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 13:39:44 -0400 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Can you post your code. The results do not look correct. On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass wrote: > Dear all, > > I'm having problems using the anti-alias filter, which I want to use in > order to smooth a binary segmentation volume. I'm using essentially the > example code from the repository, which for my input file seems to start > oscillating after 2 iterations, leading to weird 'pointy' artifacts on the > surface as can be seen from the attached screenshot (AA filter output is on > the left, input on the right). > > Is there any parameter to set/implement which could improve the behavior of > this filter? I'm assuming that my input is reasonable, or is this something > the filter is expected to have problems with? It is notable that such errors > seem to mainly appear in 'flat' regions of the volume, and are not apparent > in the curved shaft of the bone. > > Any help, or pointers to further resources are appreciated, > thanks, > Tobias > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 gass at vision.ee.ethz.ch Mon Aug 11 14:47:49 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Mon, 11 Aug 2014 20:47:49 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: > Can you post your code. The results do not look correct. Sure. The {write,read}Image functions are just convenient wrappers for the respective ITK tools. #include #include #include "argstream.h" #include "ImageUtils.h" #include "itkAntiAliasBinaryImageFilter.h" using namespace std; using namespace itk; int main(int argc, char ** argv) { feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); typedef short PixelType; typedef double OutputPixelType; const unsigned int D=3; typedef Image ImageType; typedef ImageType::Pointer ImagePointerType; typedef Image OutputImageType; typedef OutputImageType::Pointer OutputImagePointerType; argstream * as=new argstream(argc,argv); string inFile, outFile; double thresh=0.0; (*as) >> parameter ("in", inFile, " filename...", true); (*as) >> parameter ("out", outFile, " filename...", true); (*as) >> help(); as->defaultErrorHandling(); ImagePointerType img = ImageUtils::readImage(inFile); typedef itk::AntiAliasBinaryImageFilter AntiAliasBinaryImageFilterType; AntiAliasBinaryImageFilterType::Pointer antiAliasFilter = AntiAliasBinaryImageFilterType::New (); antiAliasFilter->SetInput(img); antiAliasFilter->SetNumberOfIterations(5); antiAliasFilter->SetMaximumRMSError(0.02); antiAliasFilter->Update(); // For increased code coverage. Does nothing. antiAliasFilter->GetMaximumRMSError(); antiAliasFilter->Update(); std::cout << "Maximum RMS change value threshold was: 0.02 " << std::endl; std::cout << "Last RMS change value was: " << antiAliasFilter->GetRMSChange() << std::endl; std::cout<< antiAliasFilter->GetElapsedIterations() <GetLowerBinaryValue()<<" "<< antiAliasFilter->GetUpperBinaryValue()<GetOutput(); ImageUtils::writeImage(outFile,out); return 1; } I tried different values for maxIter (1,2,3,4,5,10,100,1000) and maxRMSError (0.02 0.07 0.08 0.8), and the best visual results are achieved after one iteration where RMSE changes by about 0.08. This increases for all following iterations, which have an RMSE-change of about 0.25 for all number of iterations tested. All this is using ITK 4.5 pulled from the GIT repository a while ago, running on an intel i7 on Debian. Thanks a lot! Tobias > > On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass > wrote: > > Dear all, > > > > I'm having problems using the anti-alias filter, which I want to use in > > order to smooth a binary segmentation volume. I'm using essentially the > > example code from the repository, which for my input file seems to start > > oscillating after 2 iterations, leading to weird 'pointy' artifacts on > the > > surface as can be seen from the attached screenshot (AA filter output is > on > > the left, input on the right). > > > > Is there any parameter to set/implement which could improve the behavior > of > > this filter? I'm assuming that my input is reasonable, or is this > something > > the filter is expected to have problems with? It is notable that such > errors > > seem to mainly appear in 'flat' regions of the volume, and are not > apparent > > in the curved shaft of the bone. > > > > Any help, or pointers to further resources are appreciated, > > thanks, > > Tobias > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the 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 bill.lorensen at gmail.com Mon Aug 11 15:22:09 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 15:22:09 -0400 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: If you change typedef short PixelType; to typedef double PixelType; do the results change. On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass wrote: > >> Can you post your code. The results do not look correct. > > > Sure. The {write,read}Image functions are just convenient wrappers for the > respective ITK tools. > > > #include > > #include > > #include "argstream.h" > > #include "ImageUtils.h" > > #include "itkAntiAliasBinaryImageFilter.h" > > using namespace std; > > using namespace itk; > > > > > int main(int argc, char ** argv) > > { > > > feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); > > typedef short PixelType; > > typedef double OutputPixelType; > > const unsigned int D=3; > > typedef Image ImageType; > > > > typedef ImageType::Pointer ImagePointerType; > > > > typedef Image OutputImageType; > > typedef OutputImageType::Pointer OutputImagePointerType; > > > > argstream * as=new argstream(argc,argv); > > string inFile, outFile; > > double thresh=0.0; > > (*as) >> parameter ("in", inFile, " filename...", true); > > (*as) >> parameter ("out", outFile, " filename...", true); > > > (*as) >> help(); > > as->defaultErrorHandling(); > > > ImagePointerType img = ImageUtils::readImage(inFile); > > > typedef itk::AntiAliasBinaryImageFilter > > AntiAliasBinaryImageFilterType; > > > > AntiAliasBinaryImageFilterType::Pointer antiAliasFilter > > = AntiAliasBinaryImageFilterType::New (); > > antiAliasFilter->SetInput(img); > > antiAliasFilter->SetNumberOfIterations(5); > > antiAliasFilter->SetMaximumRMSError(0.02); > > > antiAliasFilter->Update(); > > > // For increased code coverage. Does nothing. > > antiAliasFilter->GetMaximumRMSError(); > > > > > antiAliasFilter->Update(); > > > std::cout << "Maximum RMS change value threshold was: 0.02 " << std::endl; > > std::cout << "Last RMS change value was: " << > antiAliasFilter->GetRMSChange() << std::endl; > > > std::cout<< antiAliasFilter->GetElapsedIterations() < > > std::cout<GetLowerBinaryValue()<<" "<< > antiAliasFilter->GetUpperBinaryValue()< > > OutputImagePointerType out=antiAliasFilter->GetOutput(); > > > ImageUtils::writeImage(outFile,out); > > > return 1; > > } > > > I tried different values for maxIter (1,2,3,4,5,10,100,1000) and maxRMSError > (0.02 0.07 0.08 0.8), and the best visual results are achieved after one > iteration where RMSE changes by about 0.08. This increases for all following > iterations, which have an RMSE-change of about 0.25 for all number of > iterations tested. All this is using ITK 4.5 pulled from the GIT repository > a while ago, running on an intel i7 on Debian. > > Thanks a lot! > Tobias > >> >> >> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass >> wrote: >> > Dear all, >> > >> > I'm having problems using the anti-alias filter, which I want to use in >> > order to smooth a binary segmentation volume. I'm using essentially the >> > example code from the repository, which for my input file seems to start >> > oscillating after 2 iterations, leading to weird 'pointy' artifacts on >> > the >> > surface as can be seen from the attached screenshot (AA filter output is >> > on >> > the left, input on the right). >> > >> > Is there any parameter to set/implement which could improve the behavior >> > of >> > this filter? I'm assuming that my input is reasonable, or is this >> > something >> > the filter is expected to have problems with? It is notable that such >> > errors >> > seem to mainly appear in 'flat' regions of the volume, and are not >> > apparent >> > in the curved shaft of the bone. >> > >> > Any help, or pointers to further resources are appreciated, >> > thanks, >> > Tobias >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the 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 > > -- 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 Aug 11 15:22:44 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 15:22:44 -0400 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: How are you extracting the final isosurface? On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen wrote: > If you change > typedef short PixelType; > to > typedef double PixelType; > > do the results change. > > > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass wrote: >> >>> Can you post your code. The results do not look correct. >> >> >> Sure. The {write,read}Image functions are just convenient wrappers for the >> respective ITK tools. >> >> >> #include >> >> #include >> >> #include "argstream.h" >> >> #include "ImageUtils.h" >> >> #include "itkAntiAliasBinaryImageFilter.h" >> >> using namespace std; >> >> using namespace itk; >> >> >> >> >> int main(int argc, char ** argv) >> >> { >> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); >> >> typedef short PixelType; >> >> typedef double OutputPixelType; >> >> const unsigned int D=3; >> >> typedef Image ImageType; >> >> >> >> typedef ImageType::Pointer ImagePointerType; >> >> >> >> typedef Image OutputImageType; >> >> typedef OutputImageType::Pointer OutputImagePointerType; >> >> >> >> argstream * as=new argstream(argc,argv); >> >> string inFile, outFile; >> >> double thresh=0.0; >> >> (*as) >> parameter ("in", inFile, " filename...", true); >> >> (*as) >> parameter ("out", outFile, " filename...", true); >> >> >> (*as) >> help(); >> >> as->defaultErrorHandling(); >> >> >> ImagePointerType img = ImageUtils::readImage(inFile); >> >> >> typedef itk::AntiAliasBinaryImageFilter >> >> AntiAliasBinaryImageFilterType; >> >> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter >> >> = AntiAliasBinaryImageFilterType::New (); >> >> antiAliasFilter->SetInput(img); >> >> antiAliasFilter->SetNumberOfIterations(5); >> >> antiAliasFilter->SetMaximumRMSError(0.02); >> >> >> antiAliasFilter->Update(); >> >> >> // For increased code coverage. Does nothing. >> >> antiAliasFilter->GetMaximumRMSError(); >> >> >> >> >> antiAliasFilter->Update(); >> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " << std::endl; >> >> std::cout << "Last RMS change value was: " << >> antiAliasFilter->GetRMSChange() << std::endl; >> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() <> >> >> std::cout<GetLowerBinaryValue()<<" "<< >> antiAliasFilter->GetUpperBinaryValue()<> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); >> >> >> ImageUtils::writeImage(outFile,out); >> >> >> return 1; >> >> } >> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and maxRMSError >> (0.02 0.07 0.08 0.8), and the best visual results are achieved after one >> iteration where RMSE changes by about 0.08. This increases for all following >> iterations, which have an RMSE-change of about 0.25 for all number of >> iterations tested. All this is using ITK 4.5 pulled from the GIT repository >> a while ago, running on an intel i7 on Debian. >> >> Thanks a lot! >> Tobias >> >>> >>> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass >>> wrote: >>> > Dear all, >>> > >>> > I'm having problems using the anti-alias filter, which I want to use in >>> > order to smooth a binary segmentation volume. I'm using essentially the >>> > example code from the repository, which for my input file seems to start >>> > oscillating after 2 iterations, leading to weird 'pointy' artifacts on >>> > the >>> > surface as can be seen from the attached screenshot (AA filter output is >>> > on >>> > the left, input on the right). >>> > >>> > Is there any parameter to set/implement which could improve the behavior >>> > of >>> > this filter? I'm assuming that my input is reasonable, or is this >>> > something >>> > the filter is expected to have problems with? It is notable that such >>> > errors >>> > seem to mainly appear in 'flat' regions of the volume, and are not >>> > apparent >>> > in the curved shaft of the bone. >>> > >>> > Any help, or pointers to further resources are appreciated, >>> > thanks, >>> > Tobias >>> > >>> > _____________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Kitware offers ITK Training Courses, for more information visit: >>> > http://www.kitware.com/products/protraining.php >>> > >>> > Please keep messages on-topic and check the 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 >> >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- 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 gass at vision.ee.ethz.ch Mon Aug 11 15:38:45 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Mon, 11 Aug 2014 21:38:45 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: I will try that tomorrow morning (living in GMT+1). I used paraview to extract the isosurface, but also looked at the output of the AA-filter directly (which looked fuzzy). I can also post an image of that tomorrow. Thanks for your help! Tobias 2014-08-11 21:22 GMT+02:00 Bill Lorensen : > How are you extracting the final isosurface? > > On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen > wrote: > > If you change > > typedef short PixelType; > > to > > typedef double PixelType; > > > > do the results change. > > > > > > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass > wrote: > >> > >>> Can you post your code. The results do not look correct. > >> > >> > >> Sure. The {write,read}Image functions are just convenient wrappers for > the > >> respective ITK tools. > >> > >> > >> #include > >> > >> #include > >> > >> #include "argstream.h" > >> > >> #include "ImageUtils.h" > >> > >> #include "itkAntiAliasBinaryImageFilter.h" > >> > >> using namespace std; > >> > >> using namespace itk; > >> > >> > >> > >> > >> int main(int argc, char ** argv) > >> > >> { > >> > >> > >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); > >> > >> typedef short PixelType; > >> > >> typedef double OutputPixelType; > >> > >> const unsigned int D=3; > >> > >> typedef Image ImageType; > >> > >> > >> > >> typedef ImageType::Pointer ImagePointerType; > >> > >> > >> > >> typedef Image OutputImageType; > >> > >> typedef OutputImageType::Pointer OutputImagePointerType; > >> > >> > >> > >> argstream * as=new argstream(argc,argv); > >> > >> string inFile, outFile; > >> > >> double thresh=0.0; > >> > >> (*as) >> parameter ("in", inFile, " filename...", true); > >> > >> (*as) >> parameter ("out", outFile, " filename...", true); > >> > >> > >> (*as) >> help(); > >> > >> as->defaultErrorHandling(); > >> > >> > >> ImagePointerType img = ImageUtils::readImage(inFile); > >> > >> > >> typedef itk::AntiAliasBinaryImageFilter > >> > >> AntiAliasBinaryImageFilterType; > >> > >> > >> > >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter > >> > >> = AntiAliasBinaryImageFilterType::New (); > >> > >> antiAliasFilter->SetInput(img); > >> > >> antiAliasFilter->SetNumberOfIterations(5); > >> > >> antiAliasFilter->SetMaximumRMSError(0.02); > >> > >> > >> antiAliasFilter->Update(); > >> > >> > >> // For increased code coverage. Does nothing. > >> > >> antiAliasFilter->GetMaximumRMSError(); > >> > >> > >> > >> > >> antiAliasFilter->Update(); > >> > >> > >> std::cout << "Maximum RMS change value threshold was: 0.02 " << > std::endl; > >> > >> std::cout << "Last RMS change value was: " << > >> antiAliasFilter->GetRMSChange() << std::endl; > >> > >> > >> std::cout<< antiAliasFilter->GetElapsedIterations() < >> > >> > >> std::cout<GetLowerBinaryValue()<<" "<< > >> antiAliasFilter->GetUpperBinaryValue()< >> > >> > >> OutputImagePointerType out=antiAliasFilter->GetOutput(); > >> > >> > >> ImageUtils::writeImage(outFile,out); > >> > >> > >> return 1; > >> > >> } > >> > >> > >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and > maxRMSError > >> (0.02 0.07 0.08 0.8), and the best visual results are achieved after one > >> iteration where RMSE changes by about 0.08. This increases for all > following > >> iterations, which have an RMSE-change of about 0.25 for all number of > >> iterations tested. All this is using ITK 4.5 pulled from the GIT > repository > >> a while ago, running on an intel i7 on Debian. > >> > >> Thanks a lot! > >> Tobias > >> > >>> > >>> > >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass > >>> wrote: > >>> > Dear all, > >>> > > >>> > I'm having problems using the anti-alias filter, which I want to use > in > >>> > order to smooth a binary segmentation volume. I'm using essentially > the > >>> > example code from the repository, which for my input file seems to > start > >>> > oscillating after 2 iterations, leading to weird 'pointy' artifacts > on > >>> > the > >>> > surface as can be seen from the attached screenshot (AA filter > output is > >>> > on > >>> > the left, input on the right). > >>> > > >>> > Is there any parameter to set/implement which could improve the > behavior > >>> > of > >>> > this filter? I'm assuming that my input is reasonable, or is this > >>> > something > >>> > the filter is expected to have problems with? It is notable that such > >>> > errors > >>> > seem to mainly appear in 'flat' regions of the volume, and are not > >>> > apparent > >>> > in the curved shaft of the bone. > >>> > > >>> > Any help, or pointers to further resources are appreciated, > >>> > thanks, > >>> > Tobias > >>> > > >>> > _____________________________________ > >>> > Powered by www.kitware.com > >>> > > >>> > Visit other Kitware open-source projects at > >>> > http://www.kitware.com/opensource/opensource.html > >>> > > >>> > Kitware offers ITK Training Courses, for more information visit: > >>> > http://www.kitware.com/products/protraining.php > >>> > > >>> > Please keep messages on-topic and check the 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 > >> > >> > > > > > > > > -- > > Unpaid intern in BillsBasement at noware dot com > > > > -- > 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 bill.lorensen at gmail.com Mon Aug 11 16:17:10 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 16:17:10 -0400 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Paraview should do the right thing. On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass wrote: > I will try that tomorrow morning (living in GMT+1). I used paraview to > extract the isosurface, but also looked at the output of the AA-filter > directly (which looked fuzzy). I can also post an image of that tomorrow. > > Thanks for your help! > Tobias > > > 2014-08-11 21:22 GMT+02:00 Bill Lorensen : > >> How are you extracting the final isosurface? >> >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen >> wrote: >> > If you change >> > typedef short PixelType; >> > to >> > typedef double PixelType; >> > >> > do the results change. >> > >> > >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass >> > wrote: >> >> >> >>> Can you post your code. The results do not look correct. >> >> >> >> >> >> Sure. The {write,read}Image functions are just convenient wrappers for >> >> the >> >> respective ITK tools. >> >> >> >> >> >> #include >> >> >> >> #include >> >> >> >> #include "argstream.h" >> >> >> >> #include "ImageUtils.h" >> >> >> >> #include "itkAntiAliasBinaryImageFilter.h" >> >> >> >> using namespace std; >> >> >> >> using namespace itk; >> >> >> >> >> >> >> >> >> >> int main(int argc, char ** argv) >> >> >> >> { >> >> >> >> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); >> >> >> >> typedef short PixelType; >> >> >> >> typedef double OutputPixelType; >> >> >> >> const unsigned int D=3; >> >> >> >> typedef Image ImageType; >> >> >> >> >> >> >> >> typedef ImageType::Pointer ImagePointerType; >> >> >> >> >> >> >> >> typedef Image OutputImageType; >> >> >> >> typedef OutputImageType::Pointer OutputImagePointerType; >> >> >> >> >> >> >> >> argstream * as=new argstream(argc,argv); >> >> >> >> string inFile, outFile; >> >> >> >> double thresh=0.0; >> >> >> >> (*as) >> parameter ("in", inFile, " filename...", true); >> >> >> >> (*as) >> parameter ("out", outFile, " filename...", true); >> >> >> >> >> >> (*as) >> help(); >> >> >> >> as->defaultErrorHandling(); >> >> >> >> >> >> ImagePointerType img = ImageUtils::readImage(inFile); >> >> >> >> >> >> typedef itk::AntiAliasBinaryImageFilter > >> OutputImageType> >> >> >> >> AntiAliasBinaryImageFilterType; >> >> >> >> >> >> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter >> >> >> >> = AntiAliasBinaryImageFilterType::New (); >> >> >> >> antiAliasFilter->SetInput(img); >> >> >> >> antiAliasFilter->SetNumberOfIterations(5); >> >> >> >> antiAliasFilter->SetMaximumRMSError(0.02); >> >> >> >> >> >> antiAliasFilter->Update(); >> >> >> >> >> >> // For increased code coverage. Does nothing. >> >> >> >> antiAliasFilter->GetMaximumRMSError(); >> >> >> >> >> >> >> >> >> >> antiAliasFilter->Update(); >> >> >> >> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " << >> >> std::endl; >> >> >> >> std::cout << "Last RMS change value was: " << >> >> antiAliasFilter->GetRMSChange() << std::endl; >> >> >> >> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() <> >> >> >> >> >> std::cout<GetLowerBinaryValue()<<" "<< >> >> antiAliasFilter->GetUpperBinaryValue()<> >> >> >> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); >> >> >> >> >> >> ImageUtils::writeImage(outFile,out); >> >> >> >> >> >> return 1; >> >> >> >> } >> >> >> >> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and >> >> maxRMSError >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved after >> >> one >> >> iteration where RMSE changes by about 0.08. This increases for all >> >> following >> >> iterations, which have an RMSE-change of about 0.25 for all number of >> >> iterations tested. All this is using ITK 4.5 pulled from the GIT >> >> repository >> >> a while ago, running on an intel i7 on Debian. >> >> >> >> Thanks a lot! >> >> Tobias >> >> >> >>> >> >>> >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass >> >>> wrote: >> >>> > Dear all, >> >>> > >> >>> > I'm having problems using the anti-alias filter, which I want to use >> >>> > in >> >>> > order to smooth a binary segmentation volume. I'm using essentially >> >>> > the >> >>> > example code from the repository, which for my input file seems to >> >>> > start >> >>> > oscillating after 2 iterations, leading to weird 'pointy' artifacts >> >>> > on >> >>> > the >> >>> > surface as can be seen from the attached screenshot (AA filter >> >>> > output is >> >>> > on >> >>> > the left, input on the right). >> >>> > >> >>> > Is there any parameter to set/implement which could improve the >> >>> > behavior >> >>> > of >> >>> > this filter? I'm assuming that my input is reasonable, or is this >> >>> > something >> >>> > the filter is expected to have problems with? It is notable that >> >>> > such >> >>> > errors >> >>> > seem to mainly appear in 'flat' regions of the volume, and are not >> >>> > apparent >> >>> > in the curved shaft of the bone. >> >>> > >> >>> > Any help, or pointers to further resources are appreciated, >> >>> > thanks, >> >>> > Tobias >> >>> > >> >>> > _____________________________________ >> >>> > Powered by www.kitware.com >> >>> > >> >>> > Visit other Kitware open-source projects at >> >>> > http://www.kitware.com/opensource/opensource.html >> >>> > >> >>> > Kitware offers ITK Training Courses, for more information visit: >> >>> > http://www.kitware.com/products/protraining.php >> >>> > >> >>> > Please keep messages on-topic and check the 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 >> >> >> >> >> > >> > >> > >> > -- >> > Unpaid intern in BillsBasement at noware dot com >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > -- 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 matt.mccormick at kitware.com Mon Aug 11 23:20:15 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 11 Aug 2014 23:20:15 -0400 Subject: [ITK] Pull requests on github In-Reply-To: <78A8BBD4-D4F6-4D4F-B88D-674D0BD7A27C@gmail.com> References: <78A8BBD4-D4F6-4D4F-B88D-674D0BD7A27C@gmail.com> Message-ID: Hi Michka, I looked around, and apparently it is not possible to disable pull requests [1]. But, getting pull requests forwarded to gerrit, as suggested by Jean-Christophe Fillion-Robin, is on the radar. I see you update the links in the README -- excellent! Thanks, Matt [1] https://github.com/torvalds/linux/pull/17 On Thu, Jul 31, 2014 at 5:59 PM, Michka Popoff wrote: > Hi > > would it be possible to close the pull request feature on the ITK github accounts ? > This will prevent double posting patches (and asking people to move their patch to gerrit). They should directly post on gerrit. > > Maybe we would need to add one sentence in the README, people on github are accustomed to use pull requests, > so they will maybe wonder where to post their patches ? (And maybe also a link to the JIRA bug tracker). > > Thanks > > Michka > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From matt.mccormick at kitware.com Tue Aug 12 00:04:47 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 12 Aug 2014 00:04:47 -0400 Subject: [ITK] "Can We Trust the Libraries We Use?", i.e. "You've got JPEG" Message-ID: Michka, Ho, and Ben pointed out a very good blog post that looked at the output of a static code analysis tool on ITK and the third party libraries that it uses: http://www.viva64.com/en/b/0271/ The post brings up admirable principles, namely: 1) Use automated code quality tools. 2) Avoid duplication of effort and improve overall excellence by using open source libraries. 3) Reduce maintenance costs by pushing fixes upstream. ITK has strong practices in these areas and is continuously making improvements. In particular, 1) The cross-platform continuous testing on the software quality dashboard [1] has long been a strong suit [1]. On the dashboard we configure, build, and test, but we also run valgrind dynamic memory analysis and gcov coverage testing. The latter are available on CDash and also posted to Bill L's website [2]. We also have Coverity static analysis [3]. Following Bill H's setup instructions, Sean and Kent's posts to the list, I will also be setting up scan-build static analysis [4]. [1] http://open.cdash.org/index.php?project=Insight [2] http://lorensen.github.io/VTKCodeCoverage/ITK/index.html [3] https://scan.coverity.com/projects/783 [4] http://clang-analyzer.llvm.org/scan-build.html 2) ITK uses a number of excellent ThirdParty open source libraries, found in the Modules/ThirdParty directory. We are continually improving our CMake configuration to support additional ITK_USE_SYSTEM_ so native system libraries can be utilized. For example, in the last four releases, for example, we have improved support for [1] * ITK_USE_SYSTEM_VXL * ITK_USE_SYSTEM_TIFF * ITK_USE_SYSTEM_EXPAT * ITK_USE_SYSTEM_DCMTK * ITK_USE_SYSTEM_HDF5 [1] http://www.itk.org/Wiki/ITK/Releases 3) We are always trying to improve our efforts to push fixes upstream and stay in sync with upstream. Recently, a big step forward in this area has been led by Brad King and Brian Helba, who have improved and generalized a process to perform git subtree merges of third party libraries [1]. This technical improvement to version management of third party libraries allows us to stay in sync with upstream, push patches upstream, and ensure upstream and our patches pushed upstream retain proper credit. This method is applied to a number of third party libraries in the tree, and we are incrementally adding more. A few that are admittedly in great need of updates, as noted in the article, are OpenJPEG and GDCM. [1] http://review.source.kitware.com/#/c/14175/ All contributions to these efforts are welcome! On a side note, the issues brought up have been addressed in the following patches: http://review.source.kitware.com/#/c/16617/ http://review.source.kitware.com/#/c/16623/ http://review.source.kitware.com/#/c/16626/ http://review.source.kitware.com/#/c/16627/ http://review.source.kitware.com/#/c/16624/ http://review.source.kitware.com/#/c/16628/ http://review.source.kitware.com/#/c/16629/ From michkapopoff at gmail.com Tue Aug 12 02:00:59 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Tue, 12 Aug 2014 08:00:59 +0200 Subject: [ITK] Pull requests on github In-Reply-To: References: <78A8BBD4-D4F6-4D4F-B88D-674D0BD7A27C@gmail.com> Message-ID: <2883176D-23F0-4A87-B68E-DFD2FD81DB59@gmail.com> Thanks matt Integrating with gerrit, if possible, would be cool. It may lower the entry difficulty for new users. The link to the pull request discussion is epic :) Michka On 12 ao?t 2014, at 05:20, Matt McCormick wrote: > Hi Michka, > > I looked around, and apparently it is not possible to disable pull > requests [1]. But, getting pull requests forwarded to gerrit, as > suggested by Jean-Christophe Fillion-Robin, is on the radar. > > I see you update the links in the README -- excellent! > > Thanks, > Matt > > > [1] https://github.com/torvalds/linux/pull/17 > > > On Thu, Jul 31, 2014 at 5:59 PM, Michka Popoff wrote: >> Hi >> >> would it be possible to close the pull request feature on the ITK github accounts ? >> This will prevent double posting patches (and asking people to move their patch to gerrit). They should directly post on gerrit. >> >> Maybe we would need to add one sentence in the README, people on github are accustomed to use pull requests, >> so they will maybe wonder where to post their patches ? (And maybe also a link to the JIRA bug tracker). >> >> Thanks >> >> Michka >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community From grothausmann.roman at mh-hannover.de Tue Aug 12 04:14:37 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Tue, 12 Aug 2014 10:14:37 +0200 Subject: [ITK] [ITK-users] adding a global hierarchical watershed segmentation mode to itksnap In-Reply-To: <0f32755d9980441ca0162728b088f00b@queensu.ca> References: <53E85181.8040607@mh-hannover.de> <0f32755d9980441ca0162728b088f00b@queensu.ca> Message-ID: <53E9CCED.1000604@mh-hannover.de> Hi Andras, Many thanks for Your hints. We'll test them on our data. However, our data is not as standardized in quality as CT or MRT data and from our experience many of the "magic" segmentations demonstrated on CT or MRT data does not work on our data. However, of all the segmentation modules I could find in Slicer or elsewhere none was based on a hierarchical watershed algorithm like the SegmentationEditor of the InsightApplications. Is there any other that I've missed? Concerning my idea to implement this if no tool currently already exists: Would such an extension be of more use in Slicer or itksnap? For which of the both would it likely be easier to integrate the extension? Best wishes Roman On 11/08/14 16:20, Andras Lasso wrote: > Have you tried segmentation tools in 3D Slicer? There is a multi-label watershed > segmentation tool that works in 3d > (http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Editor#WatershedFromMarkers), > there are also a number of other generic semi-automatic segmentation tools (such > as GrowCut) and a few fully-automatic specialized tools (for brain, > airways, etc). Download the nightly build and also checkout the Segmentation > category in the Extension Manager. > > Andras > > *From:* Dr. Roman Grothausmann > *Sent:* ?Monday?, ?August? ?11?, ?2014 ?1?:?15? ?AM > *To:* itksnap-users at googlegroups.com > *Cc:* ITK Mailing List > > Dear mailing list members, > > > For a long time now I've been searching for a replacement of the old > SegmentationEditor (part of the InsightApplications) which I could not get to > work even with older ITK-3.x. Somewhere I was told that it was integrated and > maintained within itksnap. However the only tool in itksnap based on watershed > segmentation seems to be the adaptive brush. It is very handy, but > time-consuming in 3D and only for local segmentations. In contrast the > SegmentationEditor used a global hierarchical watershed segmentation to pick > labels from, see e.g. the video linked here: > http://www.insight-journal.org/browse/publication/70 > Quite often now I've stumbled over data, that would likely have profited a lot > of such a tool for segmentation. > > If such a tool working with ITK-4.x does not exist any more, I thought of > implementing it as a global WS segmentation mode in itksnap. That way making the > tool easier to find, to use and to ensure maintenance (should it be integrated > into the itksnap code base in the end) and also avoiding recoding a GUI with > mouse interaction and such. > > My current idea is to start, similar to the snake-tool, with pre-filtering like > smoothing and optional edge-detection. > Then the main edit mode to consist of the usual 4 subwindows showing an overlay > of the grey-image and the watershed segmentation of the hierarchical WS-filter > (hWS), side-by-side to another label-dataset (loaded like a tiled overlay) which > consist of the actually chosen labels from the hWS as the final data (FD). > The interaction I'm considering would be to LMB click on a label in the hWS > which is then added to the FD as the current fg label, or removed with a RMB. > The hierachrchy level of the hWS could be controlled by a slider or the mouse > wheel + Shift in nearly real time if some region demands higher or lower > detailed segmentation. When the fg label is changed, the segmentation added or > removed with further mouse interactions would modify the new fg label. > When all is done and the global WS mode is left, the FD label-dataset is added > to the main segmentation of itksnap. > > Would that be possible to implement in itksnap 3.x? > What source files of the itksnap code base should I look at for: > - the pre-filtering mode of the snake (for the smoothing and edge detection) > - the mouse interactions (for e.g. adding the whell + Shift interaction) > - possible examples for the dual layout > > Thanks for any comments, help or hints. > 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 > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -- 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 gass at vision.ee.ethz.ch Tue Aug 12 04:44:22 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Tue, 12 Aug 2014 10:44:22 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Hi, changing the PixelType did not yield any change. However, I did some further tests which seem to point at image spacing or total size to be the culprit. My original image is fairly high-res, with 0.25mm in-plane resolution and 0.75mm slice thickness and 512x512x409 voxel size. I tried resampling the image to different isotropic resolutions (0.25, 0.3, 0.34, 0.35, 0.4, 0.5, 0.75, 1)mm isotropic spacing. For all spacings down to 0.35mm, the AA filter converged nicely and the output looks as I'd expect it. Lower than 0.35mm spacing, and it fails in the way I described (from this spacing on the #vox is equal or greater than the #voxels in my original image). Any idea what might cause this, or what to further investigate? Thanks, Tobias 2014-08-11 22:17 GMT+02:00 Bill Lorensen : > Paraview should do the right thing. > > On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass > wrote: > > I will try that tomorrow morning (living in GMT+1). I used paraview to > > extract the isosurface, but also looked at the output of the AA-filter > > directly (which looked fuzzy). I can also post an image of that tomorrow. > > > > Thanks for your help! > > Tobias > > > > > > 2014-08-11 21:22 GMT+02:00 Bill Lorensen : > > > >> How are you extracting the final isosurface? > >> > >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen > > >> wrote: > >> > If you change > >> > typedef short PixelType; > >> > to > >> > typedef double PixelType; > >> > > >> > do the results change. > >> > > >> > > >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass > >> > wrote: > >> >> > >> >>> Can you post your code. The results do not look correct. > >> >> > >> >> > >> >> Sure. The {write,read}Image functions are just convenient wrappers > for > >> >> the > >> >> respective ITK tools. > >> >> > >> >> > >> >> #include > >> >> > >> >> #include > >> >> > >> >> #include "argstream.h" > >> >> > >> >> #include "ImageUtils.h" > >> >> > >> >> #include "itkAntiAliasBinaryImageFilter.h" > >> >> > >> >> using namespace std; > >> >> > >> >> using namespace itk; > >> >> > >> >> > >> >> > >> >> > >> >> int main(int argc, char ** argv) > >> >> > >> >> { > >> >> > >> >> > >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); > >> >> > >> >> typedef short PixelType; > >> >> > >> >> typedef double OutputPixelType; > >> >> > >> >> const unsigned int D=3; > >> >> > >> >> typedef Image ImageType; > >> >> > >> >> > >> >> > >> >> typedef ImageType::Pointer ImagePointerType; > >> >> > >> >> > >> >> > >> >> typedef Image OutputImageType; > >> >> > >> >> typedef OutputImageType::Pointer OutputImagePointerType; > >> >> > >> >> > >> >> > >> >> argstream * as=new argstream(argc,argv); > >> >> > >> >> string inFile, outFile; > >> >> > >> >> double thresh=0.0; > >> >> > >> >> (*as) >> parameter ("in", inFile, " filename...", true); > >> >> > >> >> (*as) >> parameter ("out", outFile, " filename...", true); > >> >> > >> >> > >> >> (*as) >> help(); > >> >> > >> >> as->defaultErrorHandling(); > >> >> > >> >> > >> >> ImagePointerType img = ImageUtils::readImage(inFile); > >> >> > >> >> > >> >> typedef itk::AntiAliasBinaryImageFilter >> >> OutputImageType> > >> >> > >> >> AntiAliasBinaryImageFilterType; > >> >> > >> >> > >> >> > >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter > >> >> > >> >> = AntiAliasBinaryImageFilterType::New (); > >> >> > >> >> antiAliasFilter->SetInput(img); > >> >> > >> >> antiAliasFilter->SetNumberOfIterations(5); > >> >> > >> >> antiAliasFilter->SetMaximumRMSError(0.02); > >> >> > >> >> > >> >> antiAliasFilter->Update(); > >> >> > >> >> > >> >> // For increased code coverage. Does nothing. > >> >> > >> >> antiAliasFilter->GetMaximumRMSError(); > >> >> > >> >> > >> >> > >> >> > >> >> antiAliasFilter->Update(); > >> >> > >> >> > >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " << > >> >> std::endl; > >> >> > >> >> std::cout << "Last RMS change value was: " << > >> >> antiAliasFilter->GetRMSChange() << std::endl; > >> >> > >> >> > >> >> std::cout<< antiAliasFilter->GetElapsedIterations() < >> >> > >> >> > >> >> std::cout<GetLowerBinaryValue()<<" "<< > >> >> antiAliasFilter->GetUpperBinaryValue()< >> >> > >> >> > >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); > >> >> > >> >> > >> >> ImageUtils::writeImage(outFile,out); > >> >> > >> >> > >> >> return 1; > >> >> > >> >> } > >> >> > >> >> > >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and > >> >> maxRMSError > >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved after > >> >> one > >> >> iteration where RMSE changes by about 0.08. This increases for all > >> >> following > >> >> iterations, which have an RMSE-change of about 0.25 for all number of > >> >> iterations tested. All this is using ITK 4.5 pulled from the GIT > >> >> repository > >> >> a while ago, running on an intel i7 on Debian. > >> >> > >> >> Thanks a lot! > >> >> Tobias > >> >> > >> >>> > >> >>> > >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass < > gass at vision.ee.ethz.ch> > >> >>> wrote: > >> >>> > Dear all, > >> >>> > > >> >>> > I'm having problems using the anti-alias filter, which I want to > use > >> >>> > in > >> >>> > order to smooth a binary segmentation volume. I'm using > essentially > >> >>> > the > >> >>> > example code from the repository, which for my input file seems to > >> >>> > start > >> >>> > oscillating after 2 iterations, leading to weird 'pointy' > artifacts > >> >>> > on > >> >>> > the > >> >>> > surface as can be seen from the attached screenshot (AA filter > >> >>> > output is > >> >>> > on > >> >>> > the left, input on the right). > >> >>> > > >> >>> > Is there any parameter to set/implement which could improve the > >> >>> > behavior > >> >>> > of > >> >>> > this filter? I'm assuming that my input is reasonable, or is this > >> >>> > something > >> >>> > the filter is expected to have problems with? It is notable that > >> >>> > such > >> >>> > errors > >> >>> > seem to mainly appear in 'flat' regions of the volume, and are not > >> >>> > apparent > >> >>> > in the curved shaft of the bone. > >> >>> > > >> >>> > Any help, or pointers to further resources are appreciated, > >> >>> > thanks, > >> >>> > Tobias > >> >>> > > >> >>> > _____________________________________ > >> >>> > Powered by www.kitware.com > >> >>> > > >> >>> > Visit other Kitware open-source projects at > >> >>> > http://www.kitware.com/opensource/opensource.html > >> >>> > > >> >>> > Kitware offers ITK Training Courses, for more information visit: > >> >>> > http://www.kitware.com/products/protraining.php > >> >>> > > >> >>> > Please keep messages on-topic and check the 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 > >> >> > >> >> > >> > > >> > > >> > > >> > -- > >> > Unpaid intern in BillsBasement at noware dot com > >> > >> > >> > >> -- > >> Unpaid intern in BillsBasement at noware dot com > > > > > > > > -- > 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 > -------------- 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 gass at vision.ee.ethz.ch Tue Aug 12 08:33:14 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Tue, 12 Aug 2014 14:33:14 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Update: meanwhile I also tried cropping the image to investigate the impact of the overall size (#voxels) of the image. It appears to not have an effect, the same artifacts occur when processing a significantly smaller region (1/2 size). 2014-08-12 10:44 GMT+02:00 Tobias Gass : > Hi, > > changing the PixelType did not yield any change. However, I did some > further tests which seem to point at image spacing or total size to be the > culprit. My original image is fairly high-res, with 0.25mm in-plane > resolution and 0.75mm slice thickness and 512x512x409 voxel size. I tried > resampling the image to different isotropic resolutions (0.25, 0.3, 0.34, > 0.35, 0.4, 0.5, 0.75, 1)mm isotropic spacing. For all spacings down to > 0.35mm, the AA filter converged nicely and the output looks as I'd expect > it. Lower than 0.35mm spacing, and it fails in the way I described (from > this spacing on the #vox is equal or greater than the #voxels in my > original image). > > Any idea what might cause this, or what to further investigate? > > Thanks, > Tobias > > > 2014-08-11 22:17 GMT+02:00 Bill Lorensen : > > Paraview should do the right thing. >> >> On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass >> wrote: >> > I will try that tomorrow morning (living in GMT+1). I used paraview to >> > extract the isosurface, but also looked at the output of the AA-filter >> > directly (which looked fuzzy). I can also post an image of that >> tomorrow. >> > >> > Thanks for your help! >> > Tobias >> > >> > >> > 2014-08-11 21:22 GMT+02:00 Bill Lorensen : >> > >> >> How are you extracting the final isosurface? >> >> >> >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen < >> bill.lorensen at gmail.com> >> >> wrote: >> >> > If you change >> >> > typedef short PixelType; >> >> > to >> >> > typedef double PixelType; >> >> > >> >> > do the results change. >> >> > >> >> > >> >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass > > >> >> > wrote: >> >> >> >> >> >>> Can you post your code. The results do not look correct. >> >> >> >> >> >> >> >> >> Sure. The {write,read}Image functions are just convenient wrappers >> for >> >> >> the >> >> >> respective ITK tools. >> >> >> >> >> >> >> >> >> #include >> >> >> >> >> >> #include >> >> >> >> >> >> #include "argstream.h" >> >> >> >> >> >> #include "ImageUtils.h" >> >> >> >> >> >> #include "itkAntiAliasBinaryImageFilter.h" >> >> >> >> >> >> using namespace std; >> >> >> >> >> >> using namespace itk; >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> int main(int argc, char ** argv) >> >> >> >> >> >> { >> >> >> >> >> >> >> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); >> >> >> >> >> >> typedef short PixelType; >> >> >> >> >> >> typedef double OutputPixelType; >> >> >> >> >> >> const unsigned int D=3; >> >> >> >> >> >> typedef Image ImageType; >> >> >> >> >> >> >> >> >> >> >> >> typedef ImageType::Pointer ImagePointerType; >> >> >> >> >> >> >> >> >> >> >> >> typedef Image OutputImageType; >> >> >> >> >> >> typedef OutputImageType::Pointer OutputImagePointerType; >> >> >> >> >> >> >> >> >> >> >> >> argstream * as=new argstream(argc,argv); >> >> >> >> >> >> string inFile, outFile; >> >> >> >> >> >> double thresh=0.0; >> >> >> >> >> >> (*as) >> parameter ("in", inFile, " filename...", true); >> >> >> >> >> >> (*as) >> parameter ("out", outFile, " filename...", true); >> >> >> >> >> >> >> >> >> (*as) >> help(); >> >> >> >> >> >> as->defaultErrorHandling(); >> >> >> >> >> >> >> >> >> ImagePointerType img = ImageUtils::readImage(inFile); >> >> >> >> >> >> >> >> >> typedef itk::AntiAliasBinaryImageFilter > >> >> OutputImageType> >> >> >> >> >> >> AntiAliasBinaryImageFilterType; >> >> >> >> >> >> >> >> >> >> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter >> >> >> >> >> >> = AntiAliasBinaryImageFilterType::New (); >> >> >> >> >> >> antiAliasFilter->SetInput(img); >> >> >> >> >> >> antiAliasFilter->SetNumberOfIterations(5); >> >> >> >> >> >> antiAliasFilter->SetMaximumRMSError(0.02); >> >> >> >> >> >> >> >> >> antiAliasFilter->Update(); >> >> >> >> >> >> >> >> >> // For increased code coverage. Does nothing. >> >> >> >> >> >> antiAliasFilter->GetMaximumRMSError(); >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> antiAliasFilter->Update(); >> >> >> >> >> >> >> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " << >> >> >> std::endl; >> >> >> >> >> >> std::cout << "Last RMS change value was: " << >> >> >> antiAliasFilter->GetRMSChange() << std::endl; >> >> >> >> >> >> >> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() <> >> >> >> >> >> >> >> >> std::cout<GetLowerBinaryValue()<<" "<< >> >> >> antiAliasFilter->GetUpperBinaryValue()<> >> >> >> >> >> >> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); >> >> >> >> >> >> >> >> >> ImageUtils::writeImage(outFile,out); >> >> >> >> >> >> >> >> >> return 1; >> >> >> >> >> >> } >> >> >> >> >> >> >> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and >> >> >> maxRMSError >> >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved after >> >> >> one >> >> >> iteration where RMSE changes by about 0.08. This increases for all >> >> >> following >> >> >> iterations, which have an RMSE-change of about 0.25 for all number >> of >> >> >> iterations tested. All this is using ITK 4.5 pulled from the GIT >> >> >> repository >> >> >> a while ago, running on an intel i7 on Debian. >> >> >> >> >> >> Thanks a lot! >> >> >> Tobias >> >> >> >> >> >>> >> >> >>> >> >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass < >> gass at vision.ee.ethz.ch> >> >> >>> wrote: >> >> >>> > Dear all, >> >> >>> > >> >> >>> > I'm having problems using the anti-alias filter, which I want to >> use >> >> >>> > in >> >> >>> > order to smooth a binary segmentation volume. I'm using >> essentially >> >> >>> > the >> >> >>> > example code from the repository, which for my input file seems >> to >> >> >>> > start >> >> >>> > oscillating after 2 iterations, leading to weird 'pointy' >> artifacts >> >> >>> > on >> >> >>> > the >> >> >>> > surface as can be seen from the attached screenshot (AA filter >> >> >>> > output is >> >> >>> > on >> >> >>> > the left, input on the right). >> >> >>> > >> >> >>> > Is there any parameter to set/implement which could improve the >> >> >>> > behavior >> >> >>> > of >> >> >>> > this filter? I'm assuming that my input is reasonable, or is this >> >> >>> > something >> >> >>> > the filter is expected to have problems with? It is notable that >> >> >>> > such >> >> >>> > errors >> >> >>> > seem to mainly appear in 'flat' regions of the volume, and are >> not >> >> >>> > apparent >> >> >>> > in the curved shaft of the bone. >> >> >>> > >> >> >>> > Any help, or pointers to further resources are appreciated, >> >> >>> > thanks, >> >> >>> > Tobias >> >> >>> > >> >> >>> > _____________________________________ >> >> >>> > Powered by www.kitware.com >> >> >>> > >> >> >>> > Visit other Kitware open-source projects at >> >> >>> > http://www.kitware.com/opensource/opensource.html >> >> >>> > >> >> >>> > Kitware offers ITK Training Courses, for more information visit: >> >> >>> > http://www.kitware.com/products/protraining.php >> >> >>> > >> >> >>> > Please keep messages on-topic and check the 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 >> >> >> >> >> >> >> >> > >> >> > >> >> > >> >> > -- >> >> > Unpaid intern in BillsBasement at noware dot com >> >> >> >> >> >> >> >> -- >> >> Unpaid intern in BillsBasement at noware dot com >> > >> > >> >> >> >> -- >> 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 >> > > -------------- 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 lasso at queensu.ca Tue Aug 12 08:42:31 2014 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 12 Aug 2014 12:42:31 +0000 Subject: [ITK] [ITK-users] adding a global hierarchical watershed segmentation mode to itksnap In-Reply-To: <53E9CCED.1000604@mh-hannover.de> References: <53E85181.8040607@mh-hannover.de> <0f32755d9980441ca0162728b088f00b@queensu.ca> <53E9CCED.1000604@mh-hannover.de> Message-ID: Hi Roman, Try GrowCut segmentation. You paint a few strokes inside and outside your target(s) on one or a few slices and you may get a nice sementation. Using the FastGrowCut version you can edit/refine your inputs and as it is GPU-accelerated, it's fast (initial segmentation may take 20-30 seconds on a high-resolution volume but then the updates take just a few seconds). I've just used ITKSnap a couple of times, so I don't know it much. Slicer is a large, more comprehensive application framework, with a large user and developer community. You can add new segmentation methods to Slicer by writing a Python script that can use VTK, ITK, numpy, etc. No developer tools are needed, no need to compile anything, just download Slicer and you are ready to go. Of course you can also develop in C++, if you prefer; and if you download Eclipse then you can do step-by-step debugging of your Python module in Slicer, etc. You can share your module with others by uploading it to the extension manager (Slicer app store). More info: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers. Andras -----Original Message----- From: Dr. Roman Grothausmann [mailto:grothausmann.roman at mh-hannover.de] Sent: Tuesday, August 12, 2014 4:15 AM To: Andras Lasso Cc: itksnap-users at googlegroups.com; ITK Mailing List Subject: Re: [ITK] [ITK-users] adding a global hierarchical watershed segmentation mode to itksnap Hi Andras, Many thanks for Your hints. We'll test them on our data. However, our data is not as standardized in quality as CT or MRT data and from our experience many of the "magic" segmentations demonstrated on CT or MRT data does not work on our data. However, of all the segmentation modules I could find in Slicer or elsewhere none was based on a hierarchical watershed algorithm like the SegmentationEditor of the InsightApplications. Is there any other that I've missed? Concerning my idea to implement this if no tool currently already exists: Would such an extension be of more use in Slicer or itksnap? For which of the both would it likely be easier to integrate the extension? Best wishes Roman On 11/08/14 16:20, Andras Lasso wrote: > Have you tried segmentation tools in 3D Slicer? There is a multi-label > watershed segmentation tool that works in 3d > (http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modu > les/Editor#WatershedFromMarkers), there are also a number of other > generic semi-automatic segmentation tools (such as GrowCut) and a few > fully-automatic specialized tools (for brain, airways, etc). Download > the nightly build and also checkout the Segmentation category in the > Extension Manager. > > Andras > > *From:* Dr. Roman Grothausmann > > *Sent:* ?Monday?, ?August? ?11?, ?2014 ?1?:?15? ?AM > *To:* itksnap-users at googlegroups.com > > *Cc:* ITK Mailing List > > Dear mailing list members, > > > For a long time now I've been searching for a replacement of the old > SegmentationEditor (part of the InsightApplications) which I could not > get to work even with older ITK-3.x. Somewhere I was told that it was > integrated and maintained within itksnap. However the only tool in > itksnap based on watershed segmentation seems to be the adaptive > brush. It is very handy, but time-consuming in 3D and only for local > segmentations. In contrast the SegmentationEditor used a global > hierarchical watershed segmentation to pick labels from, see e.g. the video linked here: > http://www.insight-journal.org/browse/publication/70 > Quite often now I've stumbled over data, that would likely have > profited a lot of such a tool for segmentation. > > If such a tool working with ITK-4.x does not exist any more, I thought > of implementing it as a global WS segmentation mode in itksnap. That > way making the tool easier to find, to use and to ensure maintenance > (should it be integrated into the itksnap code base in the end) and > also avoiding recoding a GUI with mouse interaction and such. > > My current idea is to start, similar to the snake-tool, with > pre-filtering like smoothing and optional edge-detection. > Then the main edit mode to consist of the usual 4 subwindows showing > an overlay of the grey-image and the watershed segmentation of the > hierarchical WS-filter (hWS), side-by-side to another label-dataset > (loaded like a tiled overlay) which consist of the actually chosen labels from the hWS as the final data (FD). > The interaction I'm considering would be to LMB click on a label in > the hWS which is then added to the FD as the current fg label, or removed with a RMB. > The hierachrchy level of the hWS could be controlled by a slider or > the mouse wheel + Shift in nearly real time if some region demands > higher or lower detailed segmentation. When the fg label is changed, > the segmentation added or removed with further mouse interactions would modify the new fg label. > When all is done and the global WS mode is left, the FD label-dataset > is added to the main segmentation of itksnap. > > Would that be possible to implement in itksnap 3.x? > What source files of the itksnap code base should I look at for: > - the pre-filtering mode of the snake (for the smoothing and edge > detection) > - the mouse interactions (for e.g. adding the whell + Shift > interaction) > - possible examples for the dual layout > > Thanks for any comments, help or hints. > 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 > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -- 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 gass at vision.ee.ethz.ch Tue Aug 12 08:47:00 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Tue, 12 Aug 2014 14:47:00 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Further update: when manually increasing the spacing of the input image (without resampling, thus not changing the size), the filter works well. This probably indicates numerical instability depending on image spacing somewhere in the code, which would probably be great if it could be fixed. Best, Tobias 2014-08-12 14:33 GMT+02:00 Tobias Gass : > Update: meanwhile I also tried cropping the image to investigate the > impact of the overall size (#voxels) of the image. It appears to not have > an effect, the same artifacts occur when processing a significantly smaller > region (1/2 size). > > > 2014-08-12 10:44 GMT+02:00 Tobias Gass : > > Hi, >> >> changing the PixelType did not yield any change. However, I did some >> further tests which seem to point at image spacing or total size to be the >> culprit. My original image is fairly high-res, with 0.25mm in-plane >> resolution and 0.75mm slice thickness and 512x512x409 voxel size. I tried >> resampling the image to different isotropic resolutions (0.25, 0.3, 0.34, >> 0.35, 0.4, 0.5, 0.75, 1)mm isotropic spacing. For all spacings down to >> 0.35mm, the AA filter converged nicely and the output looks as I'd expect >> it. Lower than 0.35mm spacing, and it fails in the way I described (from >> this spacing on the #vox is equal or greater than the #voxels in my >> original image). >> >> Any idea what might cause this, or what to further investigate? >> >> Thanks, >> Tobias >> >> >> 2014-08-11 22:17 GMT+02:00 Bill Lorensen : >> >> Paraview should do the right thing. >>> >>> On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass >>> wrote: >>> > I will try that tomorrow morning (living in GMT+1). I used paraview to >>> > extract the isosurface, but also looked at the output of the AA-filter >>> > directly (which looked fuzzy). I can also post an image of that >>> tomorrow. >>> > >>> > Thanks for your help! >>> > Tobias >>> > >>> > >>> > 2014-08-11 21:22 GMT+02:00 Bill Lorensen : >>> > >>> >> How are you extracting the final isosurface? >>> >> >>> >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen < >>> bill.lorensen at gmail.com> >>> >> wrote: >>> >> > If you change >>> >> > typedef short PixelType; >>> >> > to >>> >> > typedef double PixelType; >>> >> > >>> >> > do the results change. >>> >> > >>> >> > >>> >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass < >>> gass at vision.ee.ethz.ch> >>> >> > wrote: >>> >> >> >>> >> >>> Can you post your code. The results do not look correct. >>> >> >> >>> >> >> >>> >> >> Sure. The {write,read}Image functions are just convenient wrappers >>> for >>> >> >> the >>> >> >> respective ITK tools. >>> >> >> >>> >> >> >>> >> >> #include >>> >> >> >>> >> >> #include >>> >> >> >>> >> >> #include "argstream.h" >>> >> >> >>> >> >> #include "ImageUtils.h" >>> >> >> >>> >> >> #include "itkAntiAliasBinaryImageFilter.h" >>> >> >> >>> >> >> using namespace std; >>> >> >> >>> >> >> using namespace itk; >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> int main(int argc, char ** argv) >>> >> >> >>> >> >> { >>> >> >> >>> >> >> >>> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); >>> >> >> >>> >> >> typedef short PixelType; >>> >> >> >>> >> >> typedef double OutputPixelType; >>> >> >> >>> >> >> const unsigned int D=3; >>> >> >> >>> >> >> typedef Image ImageType; >>> >> >> >>> >> >> >>> >> >> >>> >> >> typedef ImageType::Pointer ImagePointerType; >>> >> >> >>> >> >> >>> >> >> >>> >> >> typedef Image OutputImageType; >>> >> >> >>> >> >> typedef OutputImageType::Pointer OutputImagePointerType; >>> >> >> >>> >> >> >>> >> >> >>> >> >> argstream * as=new argstream(argc,argv); >>> >> >> >>> >> >> string inFile, outFile; >>> >> >> >>> >> >> double thresh=0.0; >>> >> >> >>> >> >> (*as) >> parameter ("in", inFile, " filename...", true); >>> >> >> >>> >> >> (*as) >> parameter ("out", outFile, " filename...", true); >>> >> >> >>> >> >> >>> >> >> (*as) >> help(); >>> >> >> >>> >> >> as->defaultErrorHandling(); >>> >> >> >>> >> >> >>> >> >> ImagePointerType img = >>> ImageUtils::readImage(inFile); >>> >> >> >>> >> >> >>> >> >> typedef itk::AntiAliasBinaryImageFilter >> >> >> OutputImageType> >>> >> >> >>> >> >> AntiAliasBinaryImageFilterType; >>> >> >> >>> >> >> >>> >> >> >>> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter >>> >> >> >>> >> >> = AntiAliasBinaryImageFilterType::New (); >>> >> >> >>> >> >> antiAliasFilter->SetInput(img); >>> >> >> >>> >> >> antiAliasFilter->SetNumberOfIterations(5); >>> >> >> >>> >> >> antiAliasFilter->SetMaximumRMSError(0.02); >>> >> >> >>> >> >> >>> >> >> antiAliasFilter->Update(); >>> >> >> >>> >> >> >>> >> >> // For increased code coverage. Does nothing. >>> >> >> >>> >> >> antiAliasFilter->GetMaximumRMSError(); >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> antiAliasFilter->Update(); >>> >> >> >>> >> >> >>> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " << >>> >> >> std::endl; >>> >> >> >>> >> >> std::cout << "Last RMS change value was: " << >>> >> >> antiAliasFilter->GetRMSChange() << std::endl; >>> >> >> >>> >> >> >>> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() <>> >> >> >>> >> >> >>> >> >> std::cout<GetLowerBinaryValue()<<" "<< >>> >> >> antiAliasFilter->GetUpperBinaryValue()<>> >> >> >>> >> >> >>> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); >>> >> >> >>> >> >> >>> >> >> ImageUtils::writeImage(outFile,out); >>> >> >> >>> >> >> >>> >> >> return 1; >>> >> >> >>> >> >> } >>> >> >> >>> >> >> >>> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and >>> >> >> maxRMSError >>> >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved >>> after >>> >> >> one >>> >> >> iteration where RMSE changes by about 0.08. This increases for all >>> >> >> following >>> >> >> iterations, which have an RMSE-change of about 0.25 for all number >>> of >>> >> >> iterations tested. All this is using ITK 4.5 pulled from the GIT >>> >> >> repository >>> >> >> a while ago, running on an intel i7 on Debian. >>> >> >> >>> >> >> Thanks a lot! >>> >> >> Tobias >>> >> >> >>> >> >>> >>> >> >>> >>> >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass < >>> gass at vision.ee.ethz.ch> >>> >> >>> wrote: >>> >> >>> > Dear all, >>> >> >>> > >>> >> >>> > I'm having problems using the anti-alias filter, which I want >>> to use >>> >> >>> > in >>> >> >>> > order to smooth a binary segmentation volume. I'm using >>> essentially >>> >> >>> > the >>> >> >>> > example code from the repository, which for my input file seems >>> to >>> >> >>> > start >>> >> >>> > oscillating after 2 iterations, leading to weird 'pointy' >>> artifacts >>> >> >>> > on >>> >> >>> > the >>> >> >>> > surface as can be seen from the attached screenshot (AA filter >>> >> >>> > output is >>> >> >>> > on >>> >> >>> > the left, input on the right). >>> >> >>> > >>> >> >>> > Is there any parameter to set/implement which could improve the >>> >> >>> > behavior >>> >> >>> > of >>> >> >>> > this filter? I'm assuming that my input is reasonable, or is >>> this >>> >> >>> > something >>> >> >>> > the filter is expected to have problems with? It is notable that >>> >> >>> > such >>> >> >>> > errors >>> >> >>> > seem to mainly appear in 'flat' regions of the volume, and are >>> not >>> >> >>> > apparent >>> >> >>> > in the curved shaft of the bone. >>> >> >>> > >>> >> >>> > Any help, or pointers to further resources are appreciated, >>> >> >>> > thanks, >>> >> >>> > Tobias >>> >> >>> > >>> >> >>> > _____________________________________ >>> >> >>> > Powered by www.kitware.com >>> >> >>> > >>> >> >>> > Visit other Kitware open-source projects at >>> >> >>> > http://www.kitware.com/opensource/opensource.html >>> >> >>> > >>> >> >>> > Kitware offers ITK Training Courses, for more information visit: >>> >> >>> > http://www.kitware.com/products/protraining.php >>> >> >>> > >>> >> >>> > Please keep messages on-topic and check the 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 >>> >> >> >>> >> >> >>> >> > >>> >> > >>> >> > >>> >> > -- >>> >> > Unpaid intern in BillsBasement at noware dot com >>> >> >>> >> >>> >> >>> >> -- >>> >> Unpaid intern in BillsBasement at noware dot com >>> > >>> > >>> >>> >>> >>> -- >>> 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 >>> >> >> > -------------- 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 Aug 12 07:58:11 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 12 Aug 2014 06:58:11 -0500 Subject: [ITK] "Can We Trust the Libraries We Use?", i.e. "You've got JPEG" In-Reply-To: References: Message-ID: <4717349A-D8D5-4F54-80EE-F4F6E7085038@mail.nih.gov> Very nice follow up Matt!! These looks like some nice genuine bugs found. Do you have these based on the release branch, to target the fixes for a patch release? Brad On Aug 11, 2014, at 11:04 PM, Matt McCormick wrote: > Michka, Ho, and Ben pointed out a very good blog post that looked at > the output of a static code analysis tool on ITK and the third party > libraries that it uses: > > http://www.viva64.com/en/b/0271/ > > > The post brings up admirable principles, namely: > > 1) Use automated code quality tools. > 2) Avoid duplication of effort and improve overall excellence by using > open source libraries. > 3) Reduce maintenance costs by pushing fixes upstream. > > > ITK has strong practices in these areas and is continuously making > improvements. In particular, > > 1) The cross-platform continuous testing on the software quality > dashboard [1] has long been a strong suit [1]. On the dashboard we > configure, build, and test, but we also run valgrind dynamic memory > analysis and gcov coverage testing. The latter are available on CDash > and also posted to Bill L's website [2]. > > We also have Coverity static analysis [3]. Following Bill H's setup > instructions, Sean and Kent's posts to the list, I will also be > setting up scan-build static analysis [4]. > > [1] http://open.cdash.org/index.php?project=Insight > > [2] http://lorensen.github.io/VTKCodeCoverage/ITK/index.html > > [3] https://scan.coverity.com/projects/783 > > [4] http://clang-analyzer.llvm.org/scan-build.html > > > 2) ITK uses a number of excellent ThirdParty open source libraries, > found in the Modules/ThirdParty directory. We are continually > improving our CMake configuration to support additional > ITK_USE_SYSTEM_ so native system libraries can be utilized. > For example, in the last four releases, for example, we have improved > support for [1] > > * ITK_USE_SYSTEM_VXL > * ITK_USE_SYSTEM_TIFF > * ITK_USE_SYSTEM_EXPAT > * ITK_USE_SYSTEM_DCMTK > * ITK_USE_SYSTEM_HDF5 > > [1] http://www.itk.org/Wiki/ITK/Releases > > > 3) We are always trying to improve our efforts to push fixes upstream > and stay in sync with upstream. Recently, a big step forward in this > area has been led by Brad King and Brian Helba, who have improved and > generalized a process to perform git subtree merges of third party > libraries [1]. > > This technical improvement to version management of third party > libraries allows us to stay in sync with upstream, push patches > upstream, and ensure upstream and our patches pushed upstream retain > proper credit. This method is applied to a number of third party > libraries in the tree, and we are incrementally adding more. A few > that are admittedly in great need of updates, as noted in the article, > are OpenJPEG and GDCM. > > [1] http://review.source.kitware.com/#/c/14175/ > > > All contributions to these efforts are welcome! > > > On a side note, the issues brought up have been addressed in the > following patches: > > http://review.source.kitware.com/#/c/16617/ > http://review.source.kitware.com/#/c/16623/ > http://review.source.kitware.com/#/c/16626/ > http://review.source.kitware.com/#/c/16627/ > http://review.source.kitware.com/#/c/16624/ > http://review.source.kitware.com/#/c/16628/ > http://review.source.kitware.com/#/c/16629/ From bill.lorensen at gmail.com Tue Aug 12 09:06:22 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 12 Aug 2014 09:06:22 -0400 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Have you tried: UseImageSpacingOn(); On Tue, Aug 12, 2014 at 8:47 AM, Tobias Gass wrote: > Further update: when manually increasing the spacing of the input image > (without resampling, thus not changing the size), the filter works well. > This probably indicates numerical instability depending on image spacing > somewhere in the code, which would probably be great if it could be fixed. > > Best, > Tobias > > > 2014-08-12 14:33 GMT+02:00 Tobias Gass : > >> Update: meanwhile I also tried cropping the image to investigate the >> impact of the overall size (#voxels) of the image. It appears to not have an >> effect, the same artifacts occur when processing a significantly smaller >> region (1/2 size). >> >> >> 2014-08-12 10:44 GMT+02:00 Tobias Gass : >> >>> Hi, >>> >>> changing the PixelType did not yield any change. However, I did some >>> further tests which seem to point at image spacing or total size to be the >>> culprit. My original image is fairly high-res, with 0.25mm in-plane >>> resolution and 0.75mm slice thickness and 512x512x409 voxel size. I tried >>> resampling the image to different isotropic resolutions (0.25, 0.3, 0.34, >>> 0.35, 0.4, 0.5, 0.75, 1)mm isotropic spacing. For all spacings down to >>> 0.35mm, the AA filter converged nicely and the output looks as I'd expect >>> it. Lower than 0.35mm spacing, and it fails in the way I described (from >>> this spacing on the #vox is equal or greater than the #voxels in my original >>> image). >>> >>> Any idea what might cause this, or what to further investigate? >>> >>> Thanks, >>> Tobias >>> >>> >>> 2014-08-11 22:17 GMT+02:00 Bill Lorensen : >>> >>>> Paraview should do the right thing. >>>> >>>> On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass >>>> wrote: >>>> > I will try that tomorrow morning (living in GMT+1). I used paraview to >>>> > extract the isosurface, but also looked at the output of the AA-filter >>>> > directly (which looked fuzzy). I can also post an image of that >>>> > tomorrow. >>>> > >>>> > Thanks for your help! >>>> > Tobias >>>> > >>>> > >>>> > 2014-08-11 21:22 GMT+02:00 Bill Lorensen : >>>> > >>>> >> How are you extracting the final isosurface? >>>> >> >>>> >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen >>>> >> >>>> >> wrote: >>>> >> > If you change >>>> >> > typedef short PixelType; >>>> >> > to >>>> >> > typedef double PixelType; >>>> >> > >>>> >> > do the results change. >>>> >> > >>>> >> > >>>> >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass >>>> >> > >>>> >> > wrote: >>>> >> >> >>>> >> >>> Can you post your code. The results do not look correct. >>>> >> >> >>>> >> >> >>>> >> >> Sure. The {write,read}Image functions are just convenient wrappers >>>> >> >> for >>>> >> >> the >>>> >> >> respective ITK tools. >>>> >> >> >>>> >> >> >>>> >> >> #include >>>> >> >> >>>> >> >> #include >>>> >> >> >>>> >> >> #include "argstream.h" >>>> >> >> >>>> >> >> #include "ImageUtils.h" >>>> >> >> >>>> >> >> #include "itkAntiAliasBinaryImageFilter.h" >>>> >> >> >>>> >> >> using namespace std; >>>> >> >> >>>> >> >> using namespace itk; >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> int main(int argc, char ** argv) >>>> >> >> >>>> >> >> { >>>> >> >> >>>> >> >> >>>> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); >>>> >> >> >>>> >> >> typedef short PixelType; >>>> >> >> >>>> >> >> typedef double OutputPixelType; >>>> >> >> >>>> >> >> const unsigned int D=3; >>>> >> >> >>>> >> >> typedef Image ImageType; >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> typedef ImageType::Pointer ImagePointerType; >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> typedef Image OutputImageType; >>>> >> >> >>>> >> >> typedef OutputImageType::Pointer OutputImagePointerType; >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> argstream * as=new argstream(argc,argv); >>>> >> >> >>>> >> >> string inFile, outFile; >>>> >> >> >>>> >> >> double thresh=0.0; >>>> >> >> >>>> >> >> (*as) >> parameter ("in", inFile, " filename...", true); >>>> >> >> >>>> >> >> (*as) >> parameter ("out", outFile, " filename...", true); >>>> >> >> >>>> >> >> >>>> >> >> (*as) >> help(); >>>> >> >> >>>> >> >> as->defaultErrorHandling(); >>>> >> >> >>>> >> >> >>>> >> >> ImagePointerType img = >>>> >> >> ImageUtils::readImage(inFile); >>>> >> >> >>>> >> >> >>>> >> >> typedef itk::AntiAliasBinaryImageFilter >>> >> >> OutputImageType> >>>> >> >> >>>> >> >> AntiAliasBinaryImageFilterType; >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter >>>> >> >> >>>> >> >> = AntiAliasBinaryImageFilterType::New (); >>>> >> >> >>>> >> >> antiAliasFilter->SetInput(img); >>>> >> >> >>>> >> >> antiAliasFilter->SetNumberOfIterations(5); >>>> >> >> >>>> >> >> antiAliasFilter->SetMaximumRMSError(0.02); >>>> >> >> >>>> >> >> >>>> >> >> antiAliasFilter->Update(); >>>> >> >> >>>> >> >> >>>> >> >> // For increased code coverage. Does nothing. >>>> >> >> >>>> >> >> antiAliasFilter->GetMaximumRMSError(); >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> antiAliasFilter->Update(); >>>> >> >> >>>> >> >> >>>> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " << >>>> >> >> std::endl; >>>> >> >> >>>> >> >> std::cout << "Last RMS change value was: " << >>>> >> >> antiAliasFilter->GetRMSChange() << std::endl; >>>> >> >> >>>> >> >> >>>> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() <>>> >> >> >>>> >> >> >>>> >> >> std::cout<GetLowerBinaryValue()<<" "<< >>>> >> >> antiAliasFilter->GetUpperBinaryValue()<>>> >> >> >>>> >> >> >>>> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); >>>> >> >> >>>> >> >> >>>> >> >> ImageUtils::writeImage(outFile,out); >>>> >> >> >>>> >> >> >>>> >> >> return 1; >>>> >> >> >>>> >> >> } >>>> >> >> >>>> >> >> >>>> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and >>>> >> >> maxRMSError >>>> >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved >>>> >> >> after >>>> >> >> one >>>> >> >> iteration where RMSE changes by about 0.08. This increases for all >>>> >> >> following >>>> >> >> iterations, which have an RMSE-change of about 0.25 for all number >>>> >> >> of >>>> >> >> iterations tested. All this is using ITK 4.5 pulled from the GIT >>>> >> >> repository >>>> >> >> a while ago, running on an intel i7 on Debian. >>>> >> >> >>>> >> >> Thanks a lot! >>>> >> >> Tobias >>>> >> >> >>>> >> >>> >>>> >> >>> >>>> >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass >>>> >> >>> >>>> >> >>> wrote: >>>> >> >>> > Dear all, >>>> >> >>> > >>>> >> >>> > I'm having problems using the anti-alias filter, which I want >>>> >> >>> > to use >>>> >> >>> > in >>>> >> >>> > order to smooth a binary segmentation volume. I'm using >>>> >> >>> > essentially >>>> >> >>> > the >>>> >> >>> > example code from the repository, which for my input file seems >>>> >> >>> > to >>>> >> >>> > start >>>> >> >>> > oscillating after 2 iterations, leading to weird 'pointy' >>>> >> >>> > artifacts >>>> >> >>> > on >>>> >> >>> > the >>>> >> >>> > surface as can be seen from the attached screenshot (AA filter >>>> >> >>> > output is >>>> >> >>> > on >>>> >> >>> > the left, input on the right). >>>> >> >>> > >>>> >> >>> > Is there any parameter to set/implement which could improve the >>>> >> >>> > behavior >>>> >> >>> > of >>>> >> >>> > this filter? I'm assuming that my input is reasonable, or is >>>> >> >>> > this >>>> >> >>> > something >>>> >> >>> > the filter is expected to have problems with? It is notable >>>> >> >>> > that >>>> >> >>> > such >>>> >> >>> > errors >>>> >> >>> > seem to mainly appear in 'flat' regions of the volume, and are >>>> >> >>> > not >>>> >> >>> > apparent >>>> >> >>> > in the curved shaft of the bone. >>>> >> >>> > >>>> >> >>> > Any help, or pointers to further resources are appreciated, >>>> >> >>> > thanks, >>>> >> >>> > Tobias >>>> >> >>> > >>>> >> >>> > _____________________________________ >>>> >> >>> > Powered by www.kitware.com >>>> >> >>> > >>>> >> >>> > Visit other Kitware open-source projects at >>>> >> >>> > http://www.kitware.com/opensource/opensource.html >>>> >> >>> > >>>> >> >>> > Kitware offers ITK Training Courses, for more information >>>> >> >>> > visit: >>>> >> >>> > http://www.kitware.com/products/protraining.php >>>> >> >>> > >>>> >> >>> > Please keep messages on-topic and check the 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 >>>> >> >> >>>> >> >> >>>> >> > >>>> >> > >>>> >> > >>>> >> > -- >>>> >> > Unpaid intern in BillsBasement at noware dot com >>>> >> >>>> >> >>>> >> >>>> >> -- >>>> >> Unpaid intern in BillsBasement at noware dot com >>>> > >>>> > >>>> >>>> >>>> >>>> -- >>>> 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 >>> >>> >> > -- 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 matt.mccormick at kitware.com Tue Aug 12 09:50:36 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 12 Aug 2014 09:50:36 -0400 Subject: [ITK] "Can We Trust the Libraries We Use?", i.e. "You've got JPEG" In-Reply-To: <4717349A-D8D5-4F54-80EE-F4F6E7085038@mail.nih.gov> References: <4717349A-D8D5-4F54-80EE-F4F6E7085038@mail.nih.gov> Message-ID: On Tue, Aug 12, 2014 at 7:58 AM, Bradley Lowekamp wrote: > Very nice follow up Matt!! > > These looks like some nice genuine bugs found. Do you have these based on the release branch, to target the fixes for a patch release? Yes, good point. I'll rebase them on release before merging. Thanks, Matt From michkapopoff at gmail.com Tue Aug 12 09:58:46 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Tue, 12 Aug 2014 15:58:46 +0200 Subject: [ITK] "Can We Trust the Libraries We Use?", i.e. "You've got JPEG" In-Reply-To: References: <4717349A-D8D5-4F54-80EE-F4F6E7085038@mail.nih.gov> Message-ID: <7F24E121-F5E2-4F58-9BDE-D3329B67DA43@gmail.com> I already merged 3 from the PointSetToSpatialObjectDemonsReg topic. You will have to cherry pick them. Michka On 12 ao?t 2014, at 15:50, Matt McCormick wrote: > On Tue, Aug 12, 2014 at 7:58 AM, Bradley Lowekamp > wrote: >> Very nice follow up Matt!! >> >> These looks like some nice genuine bugs found. Do you have these based on the release branch, to target the fixes for a patch release? > > Yes, good point. I'll rebase them on release before merging. > > Thanks, > Matt From gass at vision.ee.ethz.ch Tue Aug 12 10:10:34 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Tue, 12 Aug 2014 16:10:34 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Yes, this does result in the same problems as before. 2014-08-12 15:06 GMT+02:00 Bill Lorensen : > Have you tried: > UseImageSpacingOn(); > > > On Tue, Aug 12, 2014 at 8:47 AM, Tobias Gass > wrote: > > Further update: when manually increasing the spacing of the input image > > (without resampling, thus not changing the size), the filter works well. > > This probably indicates numerical instability depending on image spacing > > somewhere in the code, which would probably be great if it could be > fixed. > > > > Best, > > Tobias > > > > > > 2014-08-12 14:33 GMT+02:00 Tobias Gass : > > > >> Update: meanwhile I also tried cropping the image to investigate the > >> impact of the overall size (#voxels) of the image. It appears to not > have an > >> effect, the same artifacts occur when processing a significantly smaller > >> region (1/2 size). > >> > >> > >> 2014-08-12 10:44 GMT+02:00 Tobias Gass : > >> > >>> Hi, > >>> > >>> changing the PixelType did not yield any change. However, I did some > >>> further tests which seem to point at image spacing or total size to be > the > >>> culprit. My original image is fairly high-res, with 0.25mm in-plane > >>> resolution and 0.75mm slice thickness and 512x512x409 voxel size. I > tried > >>> resampling the image to different isotropic resolutions (0.25, 0.3, > 0.34, > >>> 0.35, 0.4, 0.5, 0.75, 1)mm isotropic spacing. For all spacings down to > >>> 0.35mm, the AA filter converged nicely and the output looks as I'd > expect > >>> it. Lower than 0.35mm spacing, and it fails in the way I described > (from > >>> this spacing on the #vox is equal or greater than the #voxels in my > original > >>> image). > >>> > >>> Any idea what might cause this, or what to further investigate? > >>> > >>> Thanks, > >>> Tobias > >>> > >>> > >>> 2014-08-11 22:17 GMT+02:00 Bill Lorensen : > >>> > >>>> Paraview should do the right thing. > >>>> > >>>> On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass > >>>> wrote: > >>>> > I will try that tomorrow morning (living in GMT+1). I used paraview > to > >>>> > extract the isosurface, but also looked at the output of the > AA-filter > >>>> > directly (which looked fuzzy). I can also post an image of that > >>>> > tomorrow. > >>>> > > >>>> > Thanks for your help! > >>>> > Tobias > >>>> > > >>>> > > >>>> > 2014-08-11 21:22 GMT+02:00 Bill Lorensen : > >>>> > > >>>> >> How are you extracting the final isosurface? > >>>> >> > >>>> >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen > >>>> >> > >>>> >> wrote: > >>>> >> > If you change > >>>> >> > typedef short PixelType; > >>>> >> > to > >>>> >> > typedef double PixelType; > >>>> >> > > >>>> >> > do the results change. > >>>> >> > > >>>> >> > > >>>> >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass > >>>> >> > > >>>> >> > wrote: > >>>> >> >> > >>>> >> >>> Can you post your code. The results do not look correct. > >>>> >> >> > >>>> >> >> > >>>> >> >> Sure. The {write,read}Image functions are just convenient > wrappers > >>>> >> >> for > >>>> >> >> the > >>>> >> >> respective ITK tools. > >>>> >> >> > >>>> >> >> > >>>> >> >> #include > >>>> >> >> > >>>> >> >> #include > >>>> >> >> > >>>> >> >> #include "argstream.h" > >>>> >> >> > >>>> >> >> #include "ImageUtils.h" > >>>> >> >> > >>>> >> >> #include "itkAntiAliasBinaryImageFilter.h" > >>>> >> >> > >>>> >> >> using namespace std; > >>>> >> >> > >>>> >> >> using namespace itk; > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> int main(int argc, char ** argv) > >>>> >> >> > >>>> >> >> { > >>>> >> >> > >>>> >> >> > >>>> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); > >>>> >> >> > >>>> >> >> typedef short PixelType; > >>>> >> >> > >>>> >> >> typedef double OutputPixelType; > >>>> >> >> > >>>> >> >> const unsigned int D=3; > >>>> >> >> > >>>> >> >> typedef Image ImageType; > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> typedef ImageType::Pointer ImagePointerType; > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> typedef Image OutputImageType; > >>>> >> >> > >>>> >> >> typedef OutputImageType::Pointer OutputImagePointerType; > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> argstream * as=new argstream(argc,argv); > >>>> >> >> > >>>> >> >> string inFile, outFile; > >>>> >> >> > >>>> >> >> double thresh=0.0; > >>>> >> >> > >>>> >> >> (*as) >> parameter ("in", inFile, " filename...", true); > >>>> >> >> > >>>> >> >> (*as) >> parameter ("out", outFile, " filename...", true); > >>>> >> >> > >>>> >> >> > >>>> >> >> (*as) >> help(); > >>>> >> >> > >>>> >> >> as->defaultErrorHandling(); > >>>> >> >> > >>>> >> >> > >>>> >> >> ImagePointerType img = > >>>> >> >> ImageUtils::readImage(inFile); > >>>> >> >> > >>>> >> >> > >>>> >> >> typedef itk::AntiAliasBinaryImageFilter >>>> >> >> OutputImageType> > >>>> >> >> > >>>> >> >> AntiAliasBinaryImageFilterType; > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter > >>>> >> >> > >>>> >> >> = AntiAliasBinaryImageFilterType::New (); > >>>> >> >> > >>>> >> >> antiAliasFilter->SetInput(img); > >>>> >> >> > >>>> >> >> antiAliasFilter->SetNumberOfIterations(5); > >>>> >> >> > >>>> >> >> antiAliasFilter->SetMaximumRMSError(0.02); > >>>> >> >> > >>>> >> >> > >>>> >> >> antiAliasFilter->Update(); > >>>> >> >> > >>>> >> >> > >>>> >> >> // For increased code coverage. Does nothing. > >>>> >> >> > >>>> >> >> antiAliasFilter->GetMaximumRMSError(); > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> antiAliasFilter->Update(); > >>>> >> >> > >>>> >> >> > >>>> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " > << > >>>> >> >> std::endl; > >>>> >> >> > >>>> >> >> std::cout << "Last RMS change value was: " << > >>>> >> >> antiAliasFilter->GetRMSChange() << std::endl; > >>>> >> >> > >>>> >> >> > >>>> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() < >>>> >> >> > >>>> >> >> > >>>> >> >> std::cout<GetLowerBinaryValue()<<" "<< > >>>> >> >> antiAliasFilter->GetUpperBinaryValue()< >>>> >> >> > >>>> >> >> > >>>> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); > >>>> >> >> > >>>> >> >> > >>>> >> >> ImageUtils::writeImage(outFile,out); > >>>> >> >> > >>>> >> >> > >>>> >> >> return 1; > >>>> >> >> > >>>> >> >> } > >>>> >> >> > >>>> >> >> > >>>> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and > >>>> >> >> maxRMSError > >>>> >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved > >>>> >> >> after > >>>> >> >> one > >>>> >> >> iteration where RMSE changes by about 0.08. This increases for > all > >>>> >> >> following > >>>> >> >> iterations, which have an RMSE-change of about 0.25 for all > number > >>>> >> >> of > >>>> >> >> iterations tested. All this is using ITK 4.5 pulled from the GIT > >>>> >> >> repository > >>>> >> >> a while ago, running on an intel i7 on Debian. > >>>> >> >> > >>>> >> >> Thanks a lot! > >>>> >> >> Tobias > >>>> >> >> > >>>> >> >>> > >>>> >> >>> > >>>> >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass > >>>> >> >>> > >>>> >> >>> wrote: > >>>> >> >>> > Dear all, > >>>> >> >>> > > >>>> >> >>> > I'm having problems using the anti-alias filter, which I want > >>>> >> >>> > to use > >>>> >> >>> > in > >>>> >> >>> > order to smooth a binary segmentation volume. I'm using > >>>> >> >>> > essentially > >>>> >> >>> > the > >>>> >> >>> > example code from the repository, which for my input file > seems > >>>> >> >>> > to > >>>> >> >>> > start > >>>> >> >>> > oscillating after 2 iterations, leading to weird 'pointy' > >>>> >> >>> > artifacts > >>>> >> >>> > on > >>>> >> >>> > the > >>>> >> >>> > surface as can be seen from the attached screenshot (AA > filter > >>>> >> >>> > output is > >>>> >> >>> > on > >>>> >> >>> > the left, input on the right). > >>>> >> >>> > > >>>> >> >>> > Is there any parameter to set/implement which could improve > the > >>>> >> >>> > behavior > >>>> >> >>> > of > >>>> >> >>> > this filter? I'm assuming that my input is reasonable, or is > >>>> >> >>> > this > >>>> >> >>> > something > >>>> >> >>> > the filter is expected to have problems with? It is notable > >>>> >> >>> > that > >>>> >> >>> > such > >>>> >> >>> > errors > >>>> >> >>> > seem to mainly appear in 'flat' regions of the volume, and > are > >>>> >> >>> > not > >>>> >> >>> > apparent > >>>> >> >>> > in the curved shaft of the bone. > >>>> >> >>> > > >>>> >> >>> > Any help, or pointers to further resources are appreciated, > >>>> >> >>> > thanks, > >>>> >> >>> > Tobias > >>>> >> >>> > > >>>> >> >>> > _____________________________________ > >>>> >> >>> > Powered by www.kitware.com > >>>> >> >>> > > >>>> >> >>> > Visit other Kitware open-source projects at > >>>> >> >>> > http://www.kitware.com/opensource/opensource.html > >>>> >> >>> > > >>>> >> >>> > Kitware offers ITK Training Courses, for more information > >>>> >> >>> > visit: > >>>> >> >>> > http://www.kitware.com/products/protraining.php > >>>> >> >>> > > >>>> >> >>> > Please keep messages on-topic and check the 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 > >>>> >> >> > >>>> >> >> > >>>> >> > > >>>> >> > > >>>> >> > > >>>> >> > -- > >>>> >> > Unpaid intern in BillsBasement at noware dot com > >>>> >> > >>>> >> > >>>> >> > >>>> >> -- > >>>> >> Unpaid intern in BillsBasement at noware dot com > >>>> > > >>>> > > >>>> > >>>> > >>>> > >>>> -- > >>>> 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 > >>> > >>> > >> > > > > > > -- > 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 matt.mccormick at kitware.com Tue Aug 12 10:23:05 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 12 Aug 2014 10:23:05 -0400 Subject: [ITK] "Can We Trust the Libraries We Use?", i.e. "You've got JPEG" In-Reply-To: <7F24E121-F5E2-4F58-9BDE-D3329B67DA43@gmail.com> References: <4717349A-D8D5-4F54-80EE-F4F6E7085038@mail.nih.gov> <7F24E121-F5E2-4F58-9BDE-D3329B67DA43@gmail.com> Message-ID: On Tue, Aug 12, 2014 at 9:58 AM, Michka Popoff wrote: > I already merged 3 from the PointSetToSpatialObjectDemonsReg topic. > You will have to cherry pick them. > Thanks for the note. Will do. Matt From pauloguilhermefreire at gmail.com Tue Aug 12 15:22:25 2014 From: pauloguilhermefreire at gmail.com (Paulo Guilherme Freire) Date: Tue, 12 Aug 2014 16:22:25 -0300 Subject: [ITK] Problem using Size() and iterator with ImageToListSampleAdaptor Message-ID: Hello. I've been having some troubles to understand the use of Size() and iterator when dealing with ImageToListSampleAdaptor. Here's what I've been doing: 1) Read N images (usually N = 3) and store them in an itk::VectorImage container. 2) Set such itk::VectorImage as input for itk::ImageToListSampleAdaptor. 3) Iterate over the list using a for loop (using the Size() method from the ListSample) and an iterator; in both cases, count how many times the loop was executed. Here is my problem: when I iterate over the list using Size() I get a different value of iterations than when I use an iterator. For example, suppose I read three 3D (256 x 256 x 256) images. When I count the number of iterations using an iterator (say, ListSampleType::Iterator), I get 16777216 (which is precisely 256 times 256 times 256). However, when I count the number of iterations using a for loop (for(unsigned int = 0; i < ListSample->Size(); ++i)), I get 50331648 (which is precisely the result of 16777216 times 3). My question is: shouldn't the number of iterations be the same (irregardless of whether I use an iterator or a for loop)? The code I've been using is attached to this email. I would really appreciate it if someone could help me solve this "mystery" :-) Best regards, Paulo -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- CMAKE_MINIMUM_REQUIRED(VERSION 2.8) SET( ProgramName "list_sample" ) PROJECT( ${ProgramName} ) FIND_PACKAGE (ITK REQUIRED) IF (ITK_FOUND) INCLUDE( ${USE_ITK_FILE} ) ENDIF(ITK_FOUND) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ) SET( SRCS ) ADD_EXECUTABLE( ${ProgramName} ListSampleImages.cxx ${SRCS} ) LINK_DIRECTORIES( ${PROJECT_BINARY_DIR}/lib ) TARGET_LINK_LIBRARIES( ${ProgramName} ${ITK_LIBRARIES} ) -------------- next part -------------- A non-text attachment was scrubbed... Name: bipUtils.h Type: text/x-chdr Size: 20020 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CmdLine.h Type: text/x-chdr Size: 10610 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ListSampleImages.cxx Type: text/x-c++src Size: 2649 bytes Desc: not available URL: From mercikd at thomas.edu Tue Aug 12 19:06:35 2014 From: mercikd at thomas.edu (Dan Mercik) Date: Tue, 12 Aug 2014 23:06:35 +0000 Subject: [ITK] [ITK-users] TileImageFilter SideBySide Message-ID: Good Afternoon, I want to know if it's possible to have more than two image be side by side vertically? If so what would I have to change in the algorithm, would I have to make a loop for the amount of input images? Any help would be greatly appreciative. Daniel Mercik Computer Science Major Service Desk Technician Thomas College _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 Wed Aug 13 02:32:21 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Wed, 13 Aug 2014 08:32:21 +0200 Subject: [ITK] [ITK-users] TileImageFilter SideBySide In-Reply-To: References: Message-ID: Hi Moving this mail to the new community mailing list For your problem, you should use the setLayout method [1] For 4 images, that would be: itk::FixedArray< unsigned int, 2 > layout; layout[0] = 4; layout[1] = 0; Michka [1] http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_SideBySide On 13 ao?t 2014, at 01:06, Dan Mercik wrote: > Good Afternoon, > > > > I want to know if it's possible to have more than two image be side by side vertically? If so what would I have to change in the algorithm, would I have to make a loop for the amount of input images? Any help would be greatly appreciative. > > > > Daniel Mercik > > Computer Science Major > > Service Desk Technician > > Thomas College > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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: From blowekamp at mail.nih.gov Wed Aug 13 12:39:26 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 13 Aug 2014 11:39:26 -0500 Subject: [ITK] Problem using Size() and iterator with ImageToListSampleAdaptor In-Reply-To: References: Message-ID: <56639AAD-D477-4C7F-B7FC-B498146000DA@mail.nih.gov> Hello, This sounds like a bug to me. Have you tried using an itk::Image of FixedArray to see if the same thins occurs? Brad On Aug 12, 2014, at 2:22 PM, Paulo Guilherme Freire wrote: > Hello. > > I've been having some troubles to understand the use of Size() and iterator when dealing with ImageToListSampleAdaptor. > > Here's what I've been doing: > > 1) Read N images (usually N = 3) and store them in an itk::VectorImage container. > > 2) Set such itk::VectorImage as input for itk::ImageToListSampleAdaptor. > > 3) Iterate over the list using a for loop (using the Size() method from the ListSample) and an iterator; in both cases, count how many times the loop was executed. > > Here is my problem: when I iterate over the list using Size() I get a different value of iterations than when I use an iterator. For example, suppose I read three 3D (256 x 256 x 256) images. When I count the number of iterations using an iterator (say, ListSampleType::Iterator), I get 16777216 (which is precisely 256 times 256 times 256). However, when I count the number of iterations using a for loop (for(unsigned int = 0; i < ListSample->Size(); ++i)), I get 50331648 (which is precisely the result of 16777216 times 3). > > My question is: shouldn't the number of iterations be the same (irregardless of whether I use an iterator or a for loop)? > > The code I've been using is attached to this email. I would really appreciate it if someone could help me solve this "mystery" :-) > > Best regards, > Paulo > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From ntustison at gmail.com Wed Aug 13 12:39:50 2014 From: ntustison at gmail.com (Nicholas Tustison) Date: Wed, 13 Aug 2014 09:39:50 -0700 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> <85D2068C-A0FC-46EE-8CF8-3F44CDB40E5D@mail.nih.gov> Message-ID: I?ll change it and add an origin far from (0,0) in the example. Nick On Aug 13, 2014, at 9:23 AM, Bradley Lowekamp wrote: > Nick, > > Thanks you for working on the patch. It appears that I was incorrect with my proposed formula for propagating the center. > > Hans, Ali, and myself have continued this discussion over the the last couple of days. After further experimentation with IPython notebooks and composite transform we developed a better test cases to interact with. This lead to the conclusion that the Center parameter is not an point in the moving image's domain, but a point in the fixed. Therefore the same center can be used for all composite affine transforms and it can more simply be just copied along. Here is the corrected statement: > > > For a Composite transformed defined as ?=T0(T1(x)) where ?:?fixed??moving then if C such that C??fixed is the correct center initialization for T0, then the correct center initialization for T1 is still C, as it is set in the in the domain ( not the range ) of the individual transforms. > > And here is a link to a viewer of the revisited notebooks: > > http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/UpdateCompositeTransformCenter/Transform%20Composition%20And%20Order.ipynb > > Brad > > On Aug 5, 2014, at 8:03 AM, Bradley Lowekamp wrote: > >> Ali, >> >> Glad to hear the registration iteration graphs where effective. >> >> Yes, you are right you can initialize the parameters of the second stage affine registration. Specifically the Center. However, it not readily apparent ( no example, no filter/initializer ) how that center fixed parameter should be initialized. And the "CenteredTransformInitializer" is not the correct way. >> >> For a Composite transformed defined as ?=T0(T1(x)) where ?:?fixed??moving then if C such that C??moving is the correct center initialization for T1, then the correct center initialization for T0 when in the composite transform is C?=T?10(C). >> >> Cool pasting from the IPython Notebook with inline latex appears to have worked :) >> >> While it is easy to do this with the MomentsCaluclator and manually doing the transform inverse, I think to make it more readily apparent and easier to use it should be available as a filter/initializer. >> >> There are several things that are done manually in the examples that I would think should be updated to use the latest filters and initializers. For example The BSplines are manually initialized instead of using the BSplineTransform Initializer[1]. Additionally, conversion of BSpline to a deformation field[2], and the the upsampling of the BSpine[3], though that last one still looks like ITKv3 framework, so maybe it'll be updated to the adaptors with v4. However I am after simple functions for these common tasks for SimpleITK, so I have a bit different perspective then one who is OK with implementing a 50 line solution in C++ and being OK with the interface. >> >> We'll discuss these initialization issue further this afternoon. >> >> Brad >> >> [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L215-L235 >> [2] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L401-L430 >> [3] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration6.cxx#L273-L330 >> >> On Aug 4, 2014, at 11:56 PM, Ghayoor, Ali wrote: >> >>> Hello Brad, >>> >>> It is an awesome way for demonstration, and thanks for verification of my example. It seems that this email is sent on Saturday, but unfortunately I got that this morning! And I should inspect the reason! >>> Anyway, over the weekend I ran almost the same experiment in ITK and got close results to you. >>> >>> Also, today I tried to make the registration process work when Affine Transform is used in a multi stage structure, and here is my suggestion: >>> >>> I think we do not need to bother ourselves to think about a new optimizer or a new initializer for the composite transform since we can initialize the fixed parameters of each transform individually at the beginning of each stage. >>> >>> Remember how we run a BSpline registration stage after some linear registrations. At the beginning of the BSpline stage, we should instantiate a BSpline transform object and define its fixed parameters (grid size, etc). Then, we pass this initialized transform to the registration filter using ?SetInitialTransform()?, yet we can initialize this stage by passing a composite transform, resultant from the previous stages, to the registration filter by ?SetMovingInitialTransform()?. >>> >>> The same condition holds for all other transform types with fixed unoptimizable parameters like the center of rotation in our Affine transform case. Attachment file includes a multi stage registration example that I have created for the new software guide. In this example, we use a simple 2 stages registration process for a multi modal problem that moving image is misaligned from the fixed image by a translation shift and rotation. In registration process, a translation transform is followed by an affine transform. Also, an initial transform is used at the beginning. >>> >>> If I do not set the center of the affine transform, the registration fails as you have shown in your Ipython example. However, if at the beginning of the second stage, I compute the geometrical center (or center of the mass) of the fixed image, and pass that to the affine transform using ?SetCenter()? or ?SetFixedParameters()?, the registration succeeds. Please take a quick look in the attached file that also includes lots of explanations. >>> >>> Therefore, we can follow the same procedure for all other transform types that their fixed parameters are important in the optimization, but those fixed parameters cannot be set explicitly inside a composite transform. Please let me know with you think about this. >>> >>> Thank you, >>> Ali >>> >>> >>> From: Bradley Lowekamp >>> Date: Saturday, August 2, 2014 at 6:48 PM >>> To: Ali Ghayoor >>> Cc: Hans Johnson , Insight Developers List >>> Subject: Re: [ITK-dev] [ITK] Optimizing composite transforms and center of transform >>> >>> Hello Ali, >>> >>> I created a notebook to try to demonstrate the problem you are describing: >>> http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb >>> >>> If the center of an Affine transformation isn't correctly initialized then the optimization is not speedy or robust. I think it's best illustrated with these two graphs: >>> >>> >>> >>> >>> Notice that with the Center being the origin, all 1000 iterations are exhausted, and the metric is slowing decreasing. And this is with the translation path being around the length to 10. If the spacing was bigger or more offset from the origin the situation would be worse. >>> >>> I don't think this is a bug with the registration framework. I think new initializers for composite transforms are needed, along with documentation how the 2 good ways to initialize the registration methods transforms. >>> >>> >>> Brad >>> >>> On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali wrote: >>> >>>> Brad, >>>> >>>> I have exactly the same issue. I wrote a simple registration program that is run in two stages: >>>> -Translation >>>> -Affine >>>> >>>> My fixed and moving images are in 2D, and the moving image is created from the fixed image by >>>> rotation of 10 degree and translation of [13,17] in X and Y directions. >>>> >>>> The first stage does a translation registration and the result transform is added to a composite transform >>>> that is used as the initial moving transform of the second stage. >>>> >>>> After the registration the result transform of the second stage is also added to the composite transform >>>> to be used by the resampler. >>>> >>>> I have printed the composite transform to the screen: >>>> >>>> 2481: CompositeTransform (0x7fa359a18b00) >>>> 2481: RTTI typeinfo: itk::CompositeTransform >>>> 2481: Reference Count: 2 >>>> 2481: Modified Time: 20949 >>>> 2481: Debug: Off >>>> 2481: Object Name: >>>> 2481: Observers: >>>> 2481: none >>>> 2481: Transforms in queue, from begin to end: >>>> 2481: >>>>>>>>> >>>> 2481: TranslationTransform (0x7fa359a199b0) >>>> 2481: RTTI typeinfo: itk::TranslationTransform >>>> 2481: Reference Count: 7 >>>> 2481: Modified Time: 1648 >>>> 2481: Debug: Off >>>> 2481: Object Name: >>>> 2481: Observers: >>>> 2481: none >>>> 2481: Offset: [12.801, 15.8578] >>>> 2481: >>>>>>>>> >>>> 2481: AffineTransform (0x7fa359d095a0) >>>> 2481: RTTI typeinfo: itk::AffineTransform >>>> 2481: Reference Count: 5 >>>> 2481: Modified Time: 20946 >>>> 2481: Debug: Off >>>> 2481: Object Name: >>>> 2481: Observers: >>>> 2481: none >>>> 2481: Matrix: >>>> 2481: 1.01593 -0.0100051 >>>> 2481: -0.00835669 1.01113 >>>> 2481: Offset: [-0.358829, -0.290093] >>>> 2481: Center: [0, 0] >>>> 2481: Translation: [-0.358829, -0.290093] >>>> 2481: Inverse: >>>> 2481: 0.984397 0.00974056 >>>> 2481: 0.00813575 0.989073 >>>> 2481: Singular: 0 >>>> 2481: End of MultiTransform. >>>> 2481: <<<<<<<<<< >>>> >>>> As it can be seen, the translation transform provides a good initialization since its offset (Offset: [12.801, 15.8578]) is close to the shift parameters. >>>> >>>> However, the Affine transform fails to rotate the moving image since its Matrix is almost identity. >>>> Possible reason can be the improper Center of Affine transform that is fixed to [0,0], and not at geometrical center or center of mass. >>>> >>>> To make sure that I have not made any crazy mistake in my example, I simulated my example parameters in ANTs, and ANTs returned >>>> the same results and failed to register the images!! >>>> >>>>>>>>> ANTs command line <<<<<<<<<<< >>>> >>>> PROGPATH=/scratch/ANTS/release-new/bin >>>> fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png >>>> mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png >>>> >>>> time ${PROGPATH}/antsRegistration -d 2 \ >>>> --float \ >>>> --output [test1, warpedMoving.nii.gz] \ >>>> --transform "Translation[16]" \ >>>> --metric MI[${fi},${mi},1,32,None,1] \ >>>> --convergence [100,1e-2,5] \ >>>> --shrink-factors 3 \ >>>> --smoothing-sigmas 2 \ >>>> --use-histogram-matching 1 \ >>>> \ >>>> --transform "Affine[1]" \ >>>> --metric MI[${fi},${mi},1,32] \ >>>> --convergence [100x100,1e-2,2] \ >>>> --shrink-factors 2x1 \ >>>> --smoothing-sigmas 1x0 \ >>>> --use-histogram-matching 1 >>>> >>>> <<<<<<<<<<<<<<<<<<<<<<<< >>>> >>>> Fixed and moving images can be loaded from the ITK data files. What do you think about this example? Is it a bug in ITK or just the parameters are not tuned finely? >>>> >>>> Thanks, >>>> Ali >>>> >>>> ________________________________________ >>>> From: Johnson, Hans J >>>> Sent: Tuesday, July 29, 2014 6:19 PM >>>> To: Ghayoor, Ali >>>> Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of transform >>>> >>>> Ali, >>>> >>>> You need to follow this discussion. >>>> >>>> Hans >>>> >>>> On 7/29/14, 6:16 PM, "Bradley Lowekamp" wrote: >>>> >>>>> Hello, >>>>> >>>>> Ok, to further explore this problem, and hopeful help other people too: I >>>>> created an IPython Notebook viewable here: >>>>> http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl >>>>> ob/master/Transform%20Composition%20And%20Order.ipynb >>>>> >>>>> It doesn't come through on the static page, but I added some nifty >>>>> interactive slider widgets to change the rotation parameter. Which is >>>>> really the point to enable understanding of the parameters for the >>>>> transform and how they should be best optimized. The notebook should work >>>>> with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one >>>>> to try it out :) IPython Notebooks widget are very cool! >>>>> >>>>> EXPLANATION: >>>>> >>>>> The the order of the composite transform is that the new transforms are >>>>> applied first. >>>>> >>>>> BUT they map from the virtual domain ( fixed ) to the moving image. >>>>> Therefore if your first transform moves the center of mass to the origin >>>>> then the second added transform's space will be centered on the mass, >>>>> which is good for optimizing rotation and affine parameters. >>>>> >>>>> QUESTION: >>>>> >>>>> Therefore I am inclined to conclude that its best practices to map the >>>>> fixed and moving image to the virtual domain such that the center of mass >>>>> ( or some other "center feature" ) are at the origin. This would then the >>>>> scale, rotation and other affine parameters around the center, with out >>>>> having to used the "Center" parameter the transforms currently have. >>>>> >>>>> Is this what others are doing in their registration? For general best >>>>> practices should this be recommend? >>>>> >>>>> @Brian I know I have seen this multi-domain description many time, but I >>>>> think I may have just gotten it... Is the well describe in the literature >>>>> some place? I think this may be an important part add the software guide. >>>>> >>>>> Thanks, >>>>> Brad >>>>> >>>>> >>>>> >>>>> >>>>> On Jul 29, 2014, at 5:38 PM, Matt McCormick >>>>> wrote: >>>>> >>>>>> Hi Brad, >>>>>> >>>>>> Your assessment that the fixed center is important is correct. >>>>>> >>>>>> In most cases, a transform with a Center is the first transform in a >>>>>> Composite transform. There not any issues here. However, if the >>>>>> transform with a Center is further along the chain, then a >>>>>> CenteredTransformInitializer that was applied before the registration >>>>>> is started will not generate the desired result. In this case, we >>>>>> would have to respond to an Event in the registration process and >>>>>> estimated the center on the imaged after the other transforms have >>>>>> been applied. It is more work, but it is a more unusual case. >>>>>> >>>>>> HTH, >>>>>> Matt >>>>>> >>>>>> >>>>>> >>>>>> On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp >>>>>> wrote: >>>>>>> Helloo Nick! >>>>>>> >>>>>>> I am glad you got back to me. >>>>>>> >>>>>>> I suspect that I have spent more time this past week looking at the >>>>>>> ITK affine transforms than anyone else[1] this week. With that here is >>>>>>> my current understanding... >>>>>>> >>>>>>> 1) The CenterTransformInitializers estimates an initial "Center" and >>>>>>> an initial "Translation" parameter from either the geometry or the >>>>>>> first moments. From my problematic experiences, getting the initial >>>>>>> transform which is a "good" guess is been critical for the optimizer to >>>>>>> head to the correct solution. >>>>>>> >>>>>>> 2) The Center parameter of a transform can either be "Fixed" or an >>>>>>> optimizable parameter. The transforms with the "Centered" monkier are >>>>>>> the the ones with the Center parameter optimizable. This issue seems to >>>>>>> be what you were referring to in to message. >>>>>>> >>>>>>> In many ways the point I am trying to make is independent of #2. I >>>>>>> have observed that it's important to have the "Center" of an affine >>>>>>> transform ( or sub parameterization thereof ) at the center of the >>>>>>> object you are trying to register. That is the coordinate space of the >>>>>>> optimizable parameters' point 0 is near the center. This enables >>>>>>> rotation to easily rotate around the center, as well as scaling to >>>>>>> maintain the same relative center when "zooming". This issue is >>>>>>> independent of wether that center point can be optimized. >>>>>>> >>>>>>> For example, consider changing the origin of an image for alignment by >>>>>>> say 500, and compensating with just an initial translation and not >>>>>>> setting the "Center" parameter. If we are trying to optimize rotation >>>>>>> and translation, then the optimization path would be very difficult to >>>>>>> traverse with these inter-dependent parameters to force it to rotate >>>>>>> around the center of the object. This scenario may be more common in >>>>>>> microscopy then medical imaging, due to microscopy frequently having >>>>>>> multiple subjects across large images. I could write up a IPython >>>>>>> Notebook to illustrate the case. >>>>>>> >>>>>>> So that is my understanding of why using a fixed center is important. >>>>>>> I thought this may have been shared knowledge, but perhaps is not or is >>>>>>> incorrect... >>>>>>> >>>>>>> Now I am trying to understand how this interacts with all the >>>>>>> coordinate frames involved with the ITKv4 registration framework, and >>>>>>> the composite transforms. Specifically the composite transform apply >>>>>>> the transforms in "reverse order"[2]. As I understand that that means >>>>>>> that the newest transform get applied first. So that transform >>>>>>> parameters are being optimized in the images space not in the virtual >>>>>>> domains we are working towards. Therefore the center of our transforms >>>>>>> is still important as we composite transforms? >>>>>>> >>>>>>> I hope I explained that clearly, a white board may really be needed.... >>>>>>> >>>>>>> Thanks, >>>>>>> Brad >>>>>>> >>>>>>> >>>>>>> [1] >>>>>>> https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94 >>>>>>> 099d3519eb23bcc16c7cf015 >>>>>>> [2] http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html >>>>>>> >>>>>>> On Jul 28, 2014, at 8:57 PM, Nicholas Tustison >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Brad, >>>>>>>> >>>>>>>> I apologize for the delayed response. I?m still catching up on my >>>>>>>> workload after moving to CA. We might want to talk to Luis as it >>>>>>>> was my understanding that the ?center? component of the linear >>>>>>>> transforms might be a carry-over from all the ?Centered? transforms, >>>>>>>> e.g., >>>>>>>> >>>>>>>> >>>>>>>> http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm >>>>>>>> l >>>>>>>> >>>>>>>> which, if I remember correctly, Luis said were somewhat sub optimally >>>>>>>> conceived but this was such a long time ago that I might be completely >>>>>>>> misremembering. However, fixing the center for all transforms within >>>>>>>> a composite transform is certainly not necessary within the specified >>>>>>>> framework. Rather, the matrix and offset are updated with the >>>>>>>> ?Center? >>>>>>>> being updated implicitly. >>>>>>>> >>>>>>>> Nick >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hello, >>>>>>>>> >>>>>>>>> There are a lot of transforms involved in the new registration >>>>>>>>> framework. >>>>>>>>> >>>>>>>>> I am trying to figure out what the implications for the fix >>>>>>>>> parameters of the transform "Center" ( ie center of rotation/scaling >>>>>>>>> ) are when combined with composite transforms and the >>>>>>>>> fixed/moving/registration coordinate frames... >>>>>>>>> >>>>>>>>> Based on how the transforms are composed it seems necessary to set >>>>>>>>> the fix "Center" for subsequent transformations. Additionally, I am >>>>>>>>> unsure how one would "improve" ( poorly defined? ) the center for a >>>>>>>>> subsequent transform ie Affine after a similarity... >>>>>>>>> >>>>>>>>> Are there some documented guidance or figures to help with this >>>>>>>>> issue? >>>>>>>>> Do we have a comprehensive diagram of these transforms? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> 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 >>>>>>> _______________________________________________ >>>>>>> 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 >>>> >>>> >>>> >>>> ________________________________ >>>> 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 >> _______________________________________________ >> 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://kitware.com/products/protraining.php Please keep messages on-topic and check 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 Wed Aug 13 12:23:18 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 13 Aug 2014 11:23:18 -0500 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: <85D2068C-A0FC-46EE-8CF8-3F44CDB40E5D@mail.nih.gov> References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> <85D2068C-A0FC-46EE-8CF8-3F44CDB40E5D@mail.nih.gov> Message-ID: Nick, Thanks you for working on the patch. It appears that I was incorrect with my proposed formula for propagating the center. Hans, Ali, and myself have continued this discussion over the the last couple of days. After further experimentation with IPython notebooks and composite transform we developed a better test cases to interact with. This lead to the conclusion that the Center parameter is not an point in the moving image's domain, but a point in the fixed. Therefore the same center can be used for all composite affine transforms and it can more simply be just copied along. Here is the corrected statement: For a Composite transformed defined as ?=T0(T1(x)) where ?:?fixed??moving then if C such that C??fixed is the correct center initialization for T0, then the correct center initialization for T1 is still C, as it is set in the in the domain ( not the range ) of the individual transforms. And here is a link to a viewer of the revisited notebooks: http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/UpdateCompositeTransformCenter/Transform%20Composition%20And%20Order.ipynb Brad On Aug 5, 2014, at 8:03 AM, Bradley Lowekamp wrote: > Ali, > > Glad to hear the registration iteration graphs where effective. > > Yes, you are right you can initialize the parameters of the second stage affine registration. Specifically the Center. However, it not readily apparent ( no example, no filter/initializer ) how that center fixed parameter should be initialized. And the "CenteredTransformInitializer" is not the correct way. > > For a Composite transformed defined as ?=T0(T1(x)) where ?:?fixed??moving then if C such that C??moving is the correct center initialization for T1, then the correct center initialization for T0 when in the composite transform is C?=T?10(C). > > Cool pasting from the IPython Notebook with inline latex appears to have worked :) > > While it is easy to do this with the MomentsCaluclator and manually doing the transform inverse, I think to make it more readily apparent and easier to use it should be available as a filter/initializer. > > There are several things that are done manually in the examples that I would think should be updated to use the latest filters and initializers. For example The BSplines are manually initialized instead of using the BSplineTransform Initializer[1]. Additionally, conversion of BSpline to a deformation field[2], and the the upsampling of the BSpine[3], though that last one still looks like ITKv3 framework, so maybe it'll be updated to the adaptors with v4. However I am after simple functions for these common tasks for SimpleITK, so I have a bit different perspective then one who is OK with implementing a 50 line solution in C++ and being OK with the interface. > > We'll discuss these initialization issue further this afternoon. > > Brad > > [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L215-L235 > [2] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L401-L430 > [3] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration6.cxx#L273-L330 > > On Aug 4, 2014, at 11:56 PM, Ghayoor, Ali wrote: > >> Hello Brad, >> >> It is an awesome way for demonstration, and thanks for verification of my example. It seems that this email is sent on Saturday, but unfortunately I got that this morning! And I should inspect the reason! >> Anyway, over the weekend I ran almost the same experiment in ITK and got close results to you. >> >> Also, today I tried to make the registration process work when Affine Transform is used in a multi stage structure, and here is my suggestion: >> >> I think we do not need to bother ourselves to think about a new optimizer or a new initializer for the composite transform since we can initialize the fixed parameters of each transform individually at the beginning of each stage. >> >> Remember how we run a BSpline registration stage after some linear registrations. At the beginning of the BSpline stage, we should instantiate a BSpline transform object and define its fixed parameters (grid size, etc). Then, we pass this initialized transform to the registration filter using ?SetInitialTransform()?, yet we can initialize this stage by passing a composite transform, resultant from the previous stages, to the registration filter by ?SetMovingInitialTransform()?. >> >> The same condition holds for all other transform types with fixed unoptimizable parameters like the center of rotation in our Affine transform case. Attachment file includes a multi stage registration example that I have created for the new software guide. In this example, we use a simple 2 stages registration process for a multi modal problem that moving image is misaligned from the fixed image by a translation shift and rotation. In registration process, a translation transform is followed by an affine transform. Also, an initial transform is used at the beginning. >> >> If I do not set the center of the affine transform, the registration fails as you have shown in your Ipython example. However, if at the beginning of the second stage, I compute the geometrical center (or center of the mass) of the fixed image, and pass that to the affine transform using ?SetCenter()? or ?SetFixedParameters()?, the registration succeeds. Please take a quick look in the attached file that also includes lots of explanations. >> >> Therefore, we can follow the same procedure for all other transform types that their fixed parameters are important in the optimization, but those fixed parameters cannot be set explicitly inside a composite transform. Please let me know with you think about this. >> >> Thank you, >> Ali >> >> >> From: Bradley Lowekamp >> Date: Saturday, August 2, 2014 at 6:48 PM >> To: Ali Ghayoor >> Cc: Hans Johnson , Insight Developers List >> Subject: Re: [ITK-dev] [ITK] Optimizing composite transforms and center of transform >> >> Hello Ali, >> >> I created a notebook to try to demonstrate the problem you are describing: >> http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb >> >> If the center of an Affine transformation isn't correctly initialized then the optimization is not speedy or robust. I think it's best illustrated with these two graphs: >> >> >> >> >> Notice that with the Center being the origin, all 1000 iterations are exhausted, and the metric is slowing decreasing. And this is with the translation path being around the length to 10. If the spacing was bigger or more offset from the origin the situation would be worse. >> >> I don't think this is a bug with the registration framework. I think new initializers for composite transforms are needed, along with documentation how the 2 good ways to initialize the registration methods transforms. >> >> >> Brad >> >> On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali wrote: >> >>> Brad, >>> >>> I have exactly the same issue. I wrote a simple registration program that is run in two stages: >>> -Translation >>> -Affine >>> >>> My fixed and moving images are in 2D, and the moving image is created from the fixed image by >>> rotation of 10 degree and translation of [13,17] in X and Y directions. >>> >>> The first stage does a translation registration and the result transform is added to a composite transform >>> that is used as the initial moving transform of the second stage. >>> >>> After the registration the result transform of the second stage is also added to the composite transform >>> to be used by the resampler. >>> >>> I have printed the composite transform to the screen: >>> >>> 2481: CompositeTransform (0x7fa359a18b00) >>> 2481: RTTI typeinfo: itk::CompositeTransform >>> 2481: Reference Count: 2 >>> 2481: Modified Time: 20949 >>> 2481: Debug: Off >>> 2481: Object Name: >>> 2481: Observers: >>> 2481: none >>> 2481: Transforms in queue, from begin to end: >>> 2481: >>>>>>>>> >>> 2481: TranslationTransform (0x7fa359a199b0) >>> 2481: RTTI typeinfo: itk::TranslationTransform >>> 2481: Reference Count: 7 >>> 2481: Modified Time: 1648 >>> 2481: Debug: Off >>> 2481: Object Name: >>> 2481: Observers: >>> 2481: none >>> 2481: Offset: [12.801, 15.8578] >>> 2481: >>>>>>>>> >>> 2481: AffineTransform (0x7fa359d095a0) >>> 2481: RTTI typeinfo: itk::AffineTransform >>> 2481: Reference Count: 5 >>> 2481: Modified Time: 20946 >>> 2481: Debug: Off >>> 2481: Object Name: >>> 2481: Observers: >>> 2481: none >>> 2481: Matrix: >>> 2481: 1.01593 -0.0100051 >>> 2481: -0.00835669 1.01113 >>> 2481: Offset: [-0.358829, -0.290093] >>> 2481: Center: [0, 0] >>> 2481: Translation: [-0.358829, -0.290093] >>> 2481: Inverse: >>> 2481: 0.984397 0.00974056 >>> 2481: 0.00813575 0.989073 >>> 2481: Singular: 0 >>> 2481: End of MultiTransform. >>> 2481: <<<<<<<<<< >>> >>> As it can be seen, the translation transform provides a good initialization since its offset (Offset: [12.801, 15.8578]) is close to the shift parameters. >>> >>> However, the Affine transform fails to rotate the moving image since its Matrix is almost identity. >>> Possible reason can be the improper Center of Affine transform that is fixed to [0,0], and not at geometrical center or center of mass. >>> >>> To make sure that I have not made any crazy mistake in my example, I simulated my example parameters in ANTs, and ANTs returned >>> the same results and failed to register the images!! >>> >>>>>>>> ANTs command line <<<<<<<<<<< >>> >>> PROGPATH=/scratch/ANTS/release-new/bin >>> fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png >>> mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png >>> >>> time ${PROGPATH}/antsRegistration -d 2 \ >>> --float \ >>> --output [test1, warpedMoving.nii.gz] \ >>> --transform "Translation[16]" \ >>> --metric MI[${fi},${mi},1,32,None,1] \ >>> --convergence [100,1e-2,5] \ >>> --shrink-factors 3 \ >>> --smoothing-sigmas 2 \ >>> --use-histogram-matching 1 \ >>> \ >>> --transform "Affine[1]" \ >>> --metric MI[${fi},${mi},1,32] \ >>> --convergence [100x100,1e-2,2] \ >>> --shrink-factors 2x1 \ >>> --smoothing-sigmas 1x0 \ >>> --use-histogram-matching 1 >>> >>> <<<<<<<<<<<<<<<<<<<<<<<< >>> >>> Fixed and moving images can be loaded from the ITK data files. What do you think about this example? Is it a bug in ITK or just the parameters are not tuned finely? >>> >>> Thanks, >>> Ali >>> >>> ________________________________________ >>> From: Johnson, Hans J >>> Sent: Tuesday, July 29, 2014 6:19 PM >>> To: Ghayoor, Ali >>> Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of transform >>> >>> Ali, >>> >>> You need to follow this discussion. >>> >>> Hans >>> >>> On 7/29/14, 6:16 PM, "Bradley Lowekamp" wrote: >>> >>>> Hello, >>>> >>>> Ok, to further explore this problem, and hopeful help other people too: I >>>> created an IPython Notebook viewable here: >>>> http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl >>>> ob/master/Transform%20Composition%20And%20Order.ipynb >>>> >>>> It doesn't come through on the static page, but I added some nifty >>>> interactive slider widgets to change the rotation parameter. Which is >>>> really the point to enable understanding of the parameters for the >>>> transform and how they should be best optimized. The notebook should work >>>> with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one >>>> to try it out :) IPython Notebooks widget are very cool! >>>> >>>> EXPLANATION: >>>> >>>> The the order of the composite transform is that the new transforms are >>>> applied first. >>>> >>>> BUT they map from the virtual domain ( fixed ) to the moving image. >>>> Therefore if your first transform moves the center of mass to the origin >>>> then the second added transform's space will be centered on the mass, >>>> which is good for optimizing rotation and affine parameters. >>>> >>>> QUESTION: >>>> >>>> Therefore I am inclined to conclude that its best practices to map the >>>> fixed and moving image to the virtual domain such that the center of mass >>>> ( or some other "center feature" ) are at the origin. This would then the >>>> scale, rotation and other affine parameters around the center, with out >>>> having to used the "Center" parameter the transforms currently have. >>>> >>>> Is this what others are doing in their registration? For general best >>>> practices should this be recommend? >>>> >>>> @Brian I know I have seen this multi-domain description many time, but I >>>> think I may have just gotten it... Is the well describe in the literature >>>> some place? I think this may be an important part add the software guide. >>>> >>>> Thanks, >>>> Brad >>>> >>>> >>>> >>>> >>>> On Jul 29, 2014, at 5:38 PM, Matt McCormick >>>> wrote: >>>> >>>>> Hi Brad, >>>>> >>>>> Your assessment that the fixed center is important is correct. >>>>> >>>>> In most cases, a transform with a Center is the first transform in a >>>>> Composite transform. There not any issues here. However, if the >>>>> transform with a Center is further along the chain, then a >>>>> CenteredTransformInitializer that was applied before the registration >>>>> is started will not generate the desired result. In this case, we >>>>> would have to respond to an Event in the registration process and >>>>> estimated the center on the imaged after the other transforms have >>>>> been applied. It is more work, but it is a more unusual case. >>>>> >>>>> HTH, >>>>> Matt >>>>> >>>>> >>>>> >>>>> On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp >>>>> wrote: >>>>>> Helloo Nick! >>>>>> >>>>>> I am glad you got back to me. >>>>>> >>>>>> I suspect that I have spent more time this past week looking at the >>>>>> ITK affine transforms than anyone else[1] this week. With that here is >>>>>> my current understanding... >>>>>> >>>>>> 1) The CenterTransformInitializers estimates an initial "Center" and >>>>>> an initial "Translation" parameter from either the geometry or the >>>>>> first moments. From my problematic experiences, getting the initial >>>>>> transform which is a "good" guess is been critical for the optimizer to >>>>>> head to the correct solution. >>>>>> >>>>>> 2) The Center parameter of a transform can either be "Fixed" or an >>>>>> optimizable parameter. The transforms with the "Centered" monkier are >>>>>> the the ones with the Center parameter optimizable. This issue seems to >>>>>> be what you were referring to in to message. >>>>>> >>>>>> In many ways the point I am trying to make is independent of #2. I >>>>>> have observed that it's important to have the "Center" of an affine >>>>>> transform ( or sub parameterization thereof ) at the center of the >>>>>> object you are trying to register. That is the coordinate space of the >>>>>> optimizable parameters' point 0 is near the center. This enables >>>>>> rotation to easily rotate around the center, as well as scaling to >>>>>> maintain the same relative center when "zooming". This issue is >>>>>> independent of wether that center point can be optimized. >>>>>> >>>>>> For example, consider changing the origin of an image for alignment by >>>>>> say 500, and compensating with just an initial translation and not >>>>>> setting the "Center" parameter. If we are trying to optimize rotation >>>>>> and translation, then the optimization path would be very difficult to >>>>>> traverse with these inter-dependent parameters to force it to rotate >>>>>> around the center of the object. This scenario may be more common in >>>>>> microscopy then medical imaging, due to microscopy frequently having >>>>>> multiple subjects across large images. I could write up a IPython >>>>>> Notebook to illustrate the case. >>>>>> >>>>>> So that is my understanding of why using a fixed center is important. >>>>>> I thought this may have been shared knowledge, but perhaps is not or is >>>>>> incorrect... >>>>>> >>>>>> Now I am trying to understand how this interacts with all the >>>>>> coordinate frames involved with the ITKv4 registration framework, and >>>>>> the composite transforms. Specifically the composite transform apply >>>>>> the transforms in "reverse order"[2]. As I understand that that means >>>>>> that the newest transform get applied first. So that transform >>>>>> parameters are being optimized in the images space not in the virtual >>>>>> domains we are working towards. Therefore the center of our transforms >>>>>> is still important as we composite transforms? >>>>>> >>>>>> I hope I explained that clearly, a white board may really be needed.... >>>>>> >>>>>> Thanks, >>>>>> Brad >>>>>> >>>>>> >>>>>> [1] >>>>>> https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94 >>>>>> 099d3519eb23bcc16c7cf015 >>>>>> [2] http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html >>>>>> >>>>>> On Jul 28, 2014, at 8:57 PM, Nicholas Tustison >>>>>> wrote: >>>>>> >>>>>>> Hi Brad, >>>>>>> >>>>>>> I apologize for the delayed response. I?m still catching up on my >>>>>>> workload after moving to CA. We might want to talk to Luis as it >>>>>>> was my understanding that the ?center? component of the linear >>>>>>> transforms might be a carry-over from all the ?Centered? transforms, >>>>>>> e.g., >>>>>>> >>>>>>> >>>>>>> http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm >>>>>>> l >>>>>>> >>>>>>> which, if I remember correctly, Luis said were somewhat sub optimally >>>>>>> conceived but this was such a long time ago that I might be completely >>>>>>> misremembering. However, fixing the center for all transforms within >>>>>>> a composite transform is certainly not necessary within the specified >>>>>>> framework. Rather, the matrix and offset are updated with the >>>>>>> ?Center? >>>>>>> being updated implicitly. >>>>>>> >>>>>>> Nick >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp >>>>>>> wrote: >>>>>>> >>>>>>>> Hello, >>>>>>>> >>>>>>>> There are a lot of transforms involved in the new registration >>>>>>>> framework. >>>>>>>> >>>>>>>> I am trying to figure out what the implications for the fix >>>>>>>> parameters of the transform "Center" ( ie center of rotation/scaling >>>>>>>> ) are when combined with composite transforms and the >>>>>>>> fixed/moving/registration coordinate frames... >>>>>>>> >>>>>>>> Based on how the transforms are composed it seems necessary to set >>>>>>>> the fix "Center" for subsequent transformations. Additionally, I am >>>>>>>> unsure how one would "improve" ( poorly defined? ) the center for a >>>>>>>> subsequent transform ie Affine after a similarity... >>>>>>>> >>>>>>>> Are there some documented guidance or figures to help with this >>>>>>>> issue? >>>>>>>> Do we have a comprehensive diagram of these transforms? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> 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 >>>>>> _______________________________________________ >>>>>> 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 >>> >>> >>> >>> ________________________________ >>> 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 > _______________________________________________ > 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://kitware.com/products/protraining.php Please keep messages on-topic and check 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 Aug 13 13:36:21 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 13 Aug 2014 13:36:21 -0400 Subject: [ITK] Problem using Size() and iterator with ImageToListSampleAdaptor In-Reply-To: <56639AAD-D477-4C7F-B7FC-B498146000DA@mail.nih.gov> References: <56639AAD-D477-4C7F-B7FC-B498146000DA@mail.nih.gov> Message-ID: Hi, Yes, it is a bug. Thank you for discussing the issue on the list and for including a buildable example that clearly illustrates the issue. Please review [1] this patch [2]. Thanks, Matt [1]http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html [2] http://review.source.kitware.com/#/c/16663/ On Wed, Aug 13, 2014 at 12:39 PM, Bradley Lowekamp wrote: > Hello, > > This sounds like a bug to me. Have you tried using an itk::Image of FixedArray to see if the same thins occurs? > > Brad > > On Aug 12, 2014, at 2:22 PM, Paulo Guilherme Freire wrote: > >> Hello. >> >> I've been having some troubles to understand the use of Size() and iterator when dealing with ImageToListSampleAdaptor. >> >> Here's what I've been doing: >> >> 1) Read N images (usually N = 3) and store them in an itk::VectorImage container. >> >> 2) Set such itk::VectorImage as input for itk::ImageToListSampleAdaptor. >> >> 3) Iterate over the list using a for loop (using the Size() method from the ListSample) and an iterator; in both cases, count how many times the loop was executed. >> >> Here is my problem: when I iterate over the list using Size() I get a different value of iterations than when I use an iterator. For example, suppose I read three 3D (256 x 256 x 256) images. When I count the number of iterations using an iterator (say, ListSampleType::Iterator), I get 16777216 (which is precisely 256 times 256 times 256). However, when I count the number of iterations using a for loop (for(unsigned int = 0; i < ListSample->Size(); ++i)), I get 50331648 (which is precisely the result of 16777216 times 3). >> >> My question is: shouldn't the number of iterations be the same (irregardless of whether I use an iterator or a for loop)? >> >> The code I've been using is attached to this email. I would really appreciate it if someone could help me solve this "mystery" :-) >> >> Best regards, >> Paulo >> >> >> _______________________________________________ >> 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 From nekto1989 at gmail.com Wed Aug 13 13:47:02 2014 From: nekto1989 at gmail.com (=?UTF-8?B?0JzQsNGAJ9GP0L0g0JrQu9C40LzQvtCy?=) Date: Wed, 13 Aug 2014 20:47:02 +0300 Subject: [ITK] Getting ImageType for TIFF Message-ID: Hi, How to properly read 32-bit TIFF? I need to get itk::Image on output. If I use it as ImageType for ImageFileReader, it is read as fully black (checked contrast with Image Watch and it is for sure completely empty). If I read it with pixel type RGBPixel or RGBAPixel, it is read properly. But I need to convert it manually to unsigned short after this. So what is the proper way of reading it? Do I need to create templated methods for every pixeltype with conversions to unsigned short? Best regards, Marian -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Aug 13 13:50:04 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 13 Aug 2014 13:50:04 -0400 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Hi Marian, If itk::Image< unsigned short, 2 > is used for the ImageType, does it work (note the dimension specification). HTH, Matt On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? wrote: > Hi, > > How to properly read 32-bit TIFF? I need to get itk::Image > on output. If I use it as ImageType for ImageFileReader, it is read as fully > black (checked contrast with Image Watch and it is for sure completely > empty). If I read it with pixel type RGBPixel or > RGBAPixel, it is read properly. But I need to convert it > manually to unsigned short after this. So what is the proper way of reading > it? Do I need to create templated methods for every pixeltype with > conversions to unsigned short? > > Best regards, > Marian > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From sebastian.ordas at gmail.com Wed Aug 13 13:50:24 2014 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Wed, 13 Aug 2014 14:50:24 -0300 Subject: [ITK] [ITK-users] FDA agile practices guidance Message-ID: <53EBA560.208@gmail.com> Hello friends, Sorry if it is not the right place for asking this question, but does anyone know about resources about FDA guidances for implementing agile practices in the development of medical device software? In concrete, the document AAMI TIR45:2012 is the one I am seeking online. thank you, sebastian _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 Jared.Becksfort at STJUDE.ORG Wed Aug 13 13:57:54 2014 From: Jared.Becksfort at STJUDE.ORG (Becksfort, Jared) Date: Wed, 13 Aug 2014 12:57:54 -0500 Subject: [ITK] [ITK-users] Rotation or registration by plane Message-ID: Hello, Sorry if this is a dumb question (I feel like it may be). I have a plane in an MRI. I would like to either: * Change the coordinate system to refer to this plane (transform coordinates by plane) * Transform the image so that this plane is in the center (transform image by plane) Is there a registration algorithm that allows this? Thanks, Jared ________________________________ Email Disclaimer: www.stjude.org/emaildisclaimer Consultation Disclaimer: www.stjude.org/consultationdisclaimer _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 pauloguilhermefreire at gmail.com Wed Aug 13 14:26:28 2014 From: pauloguilhermefreire at gmail.com (Paulo Guilherme Freire) Date: Wed, 13 Aug 2014 15:26:28 -0300 Subject: [ITK] Problem using Size() and iterator with ImageToListSampleAdaptor In-Reply-To: References: <56639AAD-D477-4C7F-B7FC-B498146000DA@mail.nih.gov> Message-ID: Hello, Matt. Thank you very much for your reply and for providing a patch. I'll review it as soon as I can. Best regards, Paulo On 13 August 2014 14:36, Matt McCormick wrote: > Hi, > > Yes, it is a bug. Thank you for discussing the issue on the list and > for including a buildable example that clearly illustrates the issue. > > Please review [1] this patch [2]. > > Thanks, > Matt > > [1] > http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html > > [2] http://review.source.kitware.com/#/c/16663/ > > On Wed, Aug 13, 2014 at 12:39 PM, Bradley Lowekamp > wrote: > > Hello, > > > > This sounds like a bug to me. Have you tried using an itk::Image of > FixedArray to see if the same thins occurs? > > > > Brad > > > > On Aug 12, 2014, at 2:22 PM, Paulo Guilherme Freire < > pauloguilhermefreire at gmail.com> wrote: > > > >> Hello. > >> > >> I've been having some troubles to understand the use of Size() and > iterator when dealing with ImageToListSampleAdaptor. > >> > >> Here's what I've been doing: > >> > >> 1) Read N images (usually N = 3) and store them in an itk::VectorImage > container. > >> > >> 2) Set such itk::VectorImage as input for itk::ImageToListSampleAdaptor. > >> > >> 3) Iterate over the list using a for loop (using the Size() method from > the ListSample) and an iterator; in both cases, count how many times the > loop was executed. > >> > >> Here is my problem: when I iterate over the list using Size() I get a > different value of iterations than when I use an iterator. For example, > suppose I read three 3D (256 x 256 x 256) images. When I count the number > of iterations using an iterator (say, ListSampleType::Iterator), I get > 16777216 (which is precisely 256 times 256 times 256). However, when I > count the number of iterations using a for loop (for(unsigned int = 0; i < > ListSample->Size(); ++i)), I get 50331648 (which is precisely the result of > 16777216 times 3). > >> > >> My question is: shouldn't the number of iterations be the same > (irregardless of whether I use an iterator or a for loop)? > >> > >> The code I've been using is attached to this email. I would really > appreciate it if someone could help me solve this "mystery" :-) > >> > >> Best regards, > >> Paulo > >> > >> > >> > _______________________________________________ > >> 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 > -- Paulo Guilherme de Lima Freire Bacharelado em Ci?ncia da Computa??o 010 Universidade Federal de S?o Carlos - UFSCar -------------- next part -------------- An HTML attachment was scrubbed... URL: From nekto1989 at gmail.com Wed Aug 13 14:27:27 2014 From: nekto1989 at gmail.com (=?UTF-8?B?0JzQsNGAJ9GP0L0g0JrQu9C40LzQvtCy?=) Date: Wed, 13 Aug 2014 21:27:27 +0300 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: { typedef unsigned short PixelType; typedef itk::Image ImageType; auto reader = itk::ImageFileReader< ImageType>::New(); reader->SetFileName("D:/TestData/input/input.tif"); reader->SetImageIO(itk::TIFFImageIO::New()); typedef unsigned short OutputPixelType; typedef itk::Image OutputImageType; auto writer = itk::ImageFileWriter::New(); writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); auto image_io = itk::TIFFImageIO::New(); image_io->SetPixelType(itk::ImageIOBase::SCALAR); writer->SetImageIO(image_io); writer->SetInput(reader->GetOutput()); writer->Update(); //produces completely black } { typedef itk::RGBAPixel PixelType; typedef itk::Image ImageType; auto reader = itk::ImageFileReader::New(); reader->SetFileName("D:/TestData/input/input.tif"); reader->SetImageIO(itk::TIFFImageIO::New()); reader->Update(); typedef unsigned short OutputPixelType; typedef itk::Image OutputImageType; auto input_image = reader->GetOutput(); auto output_image = OutputImageType::New(); output_image->CopyInformation(input_image); output_image->SetRegions(input_image->GetLargestPossibleRegion()); output_image->Allocate(); itk::ImageRegionConstIterator const_iterator(input_image, input_image->GetLargestPossibleRegion()); itk::ImageRegionIterator rescaled_iterator(output_image, output_image->GetLargestPossibleRegion()); for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) { const PixelType& pixel = const_iterator.Get(); rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) * 16 + pixel.GetGreen()) * 16 + pixel.GetBlue()); } auto writer = itk::ImageFileWriter::New(); writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); auto image_io = itk::TIFFImageIO::New(); image_io->SetPixelType(itk::ImageIOBase::SCALAR); writer->SetImageIO(image_io); writer->SetInput(output_image); writer->Update(); //output looks the same } 2014-08-13 20:50 GMT+03:00 Matt McCormick : > Hi Marian, > > If > > itk::Image< unsigned short, 2 > > > is used for the ImageType, does it work (note the dimension specification). > > HTH, > Matt > > On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? > wrote: > > Hi, > > > > How to properly read 32-bit TIFF? I need to get itk::Image short> > > on output. If I use it as ImageType for ImageFileReader, it is read as > fully > > black (checked contrast with Image Watch and it is for sure completely > > empty). If I read it with pixel type RGBPixel or > > RGBAPixel, it is read properly. But I need to convert it > > manually to unsigned short after this. So what is the proper way of > reading > > it? Do I need to create templated methods for every pixeltype with > > conversions to unsigned short? > > > > Best regards, > > Marian > > > > _______________________________________________ > > 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 Wed Aug 13 15:52:31 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 13 Aug 2014 15:52:31 -0400 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Hi Marian, Thanks for the update. Offhand, I am not seeing the issue. Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and the input data? Thanks, Matt [1] http://sscce.org/ On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? wrote: > { > typedef unsigned short PixelType; > typedef itk::Image ImageType; > auto reader = itk::ImageFileReader< > ImageType>::New(); > reader->SetFileName("D:/TestData/input/input.tif"); > reader->SetImageIO(itk::TIFFImageIO::New()); > > typedef unsigned short OutputPixelType; > typedef itk::Image OutputImageType; > > auto writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); > auto image_io = itk::TIFFImageIO::New(); > image_io->SetPixelType(itk::ImageIOBase::SCALAR); > writer->SetImageIO(image_io); > writer->SetInput(reader->GetOutput()); > writer->Update(); //produces completely black > } > > { > typedef itk::RGBAPixel PixelType; > typedef itk::Image ImageType; > auto reader = itk::ImageFileReader::New(); > reader->SetFileName("D:/TestData/input/input.tif"); > reader->SetImageIO(itk::TIFFImageIO::New()); > reader->Update(); > > typedef unsigned short OutputPixelType; > typedef itk::Image OutputImageType; > > auto input_image = reader->GetOutput(); > auto output_image = OutputImageType::New(); > output_image->CopyInformation(input_image); > output_image->SetRegions(input_image->GetLargestPossibleRegion()); > output_image->Allocate(); > itk::ImageRegionConstIterator const_iterator(input_image, > input_image->GetLargestPossibleRegion()); > itk::ImageRegionIterator > rescaled_iterator(output_image, output_image->GetLargestPossibleRegion()); > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) > { > const PixelType& pixel = const_iterator.Get(); > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) * 16 + > pixel.GetGreen()) * 16 + pixel.GetBlue()); > } > > auto writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); > auto image_io = itk::TIFFImageIO::New(); > image_io->SetPixelType(itk::ImageIOBase::SCALAR); > writer->SetImageIO(image_io); > writer->SetInput(output_image); > writer->Update(); //output looks the same > } > > > 2014-08-13 20:50 GMT+03:00 Matt McCormick : >> >> Hi Marian, >> >> >> If >> >> itk::Image< unsigned short, 2 > >> >> is used for the ImageType, does it work (note the dimension >> specification). >> >> HTH, >> Matt >> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? >> wrote: >> > Hi, >> > >> > How to properly read 32-bit TIFF? I need to get itk::Image> > short> >> > on output. If I use it as ImageType for ImageFileReader, it is read as >> > fully >> > black (checked contrast with Image Watch and it is for sure completely >> > empty). If I read it with pixel type RGBPixel or >> > RGBAPixel, it is read properly. But I need to convert it >> > manually to unsigned short after this. So what is the proper way of >> > reading >> > it? Do I need to create templated methods for every pixeltype with >> > conversions to unsigned short? >> > >> > Best regards, >> > Marian >> > >> > _______________________________________________ >> > Community mailing list >> > Community at itk.org >> > http://public.kitware.com/mailman/listinfo/community >> > > > From nekto1989 at gmail.com Wed Aug 13 16:55:51 2014 From: nekto1989 at gmail.com (=?UTF-8?B?0JzQsNGAJ9GP0L0g0JrQu9C40LzQvtCy?=) Date: Wed, 13 Aug 2014 23:55:51 +0300 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Hi Matt, I hope this is proper cmakelists.txt. I'm used to using ITK connected through *.props into Visual Studio solution. Best regards, Marian 2014-08-13 22:52 GMT+03:00 Matt McCormick : > Hi Marian, > > Thanks for the update. Offhand, I am not seeing the issue. > > Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and > the input data? > > Thanks, > Matt > > [1] http://sscce.org/ > > On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? > wrote: > > { > > typedef unsigned short PixelType; > > typedef itk::Image ImageType; > > auto reader = itk::ImageFileReader< > > ImageType>::New(); > > reader->SetFileName("D:/TestData/input/input.tif"); > > reader->SetImageIO(itk::TIFFImageIO::New()); > > > > typedef unsigned short OutputPixelType; > > typedef itk::Image OutputImageType; > > > > auto writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); > > auto image_io = itk::TIFFImageIO::New(); > > image_io->SetPixelType(itk::ImageIOBase::SCALAR); > > writer->SetImageIO(image_io); > > writer->SetInput(reader->GetOutput()); > > writer->Update(); //produces completely black > > } > > > > { > > typedef itk::RGBAPixel PixelType; > > typedef itk::Image ImageType; > > auto reader = itk::ImageFileReader::New(); > > reader->SetFileName("D:/TestData/input/input.tif"); > > reader->SetImageIO(itk::TIFFImageIO::New()); > > reader->Update(); > > > > typedef unsigned short OutputPixelType; > > typedef itk::Image OutputImageType; > > > > auto input_image = reader->GetOutput(); > > auto output_image = OutputImageType::New(); > > output_image->CopyInformation(input_image); > > output_image->SetRegions(input_image->GetLargestPossibleRegion()); > > output_image->Allocate(); > > itk::ImageRegionConstIterator const_iterator(input_image, > > input_image->GetLargestPossibleRegion()); > > itk::ImageRegionIterator > > rescaled_iterator(output_image, > output_image->GetLargestPossibleRegion()); > > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); > > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) > > { > > const PixelType& pixel = const_iterator.Get(); > > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) * > 16 + > > pixel.GetGreen()) * 16 + pixel.GetBlue()); > > } > > > > auto writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); > > auto image_io = itk::TIFFImageIO::New(); > > image_io->SetPixelType(itk::ImageIOBase::SCALAR); > > writer->SetImageIO(image_io); > > writer->SetInput(output_image); > > writer->Update(); //output looks the same > > } > > > > > > 2014-08-13 20:50 GMT+03:00 Matt McCormick : > >> > >> Hi Marian, > >> > >> > >> If > >> > >> itk::Image< unsigned short, 2 > > >> > >> is used for the ImageType, does it work (note the dimension > >> specification). > >> > >> HTH, > >> Matt > >> > >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? > >> wrote: > >> > Hi, > >> > > >> > How to properly read 32-bit TIFF? I need to get itk::Image >> > short> > >> > on output. If I use it as ImageType for ImageFileReader, it is read as > >> > fully > >> > black (checked contrast with Image Watch and it is for sure completely > >> > empty). If I read it with pixel type RGBPixel or > >> > RGBAPixel, it is read properly. But I need to convert > it > >> > manually to unsigned short after this. So what is the proper way of > >> > reading > >> > it? Do I need to create templated methods for every pixeltype with > >> > conversions to unsigned short? > >> > > >> > Best regards, > >> > Marian > >> > > >> > _______________________________________________ > >> > 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: ReadTIFF32bit.zip Type: application/zip Size: 63889 bytes Desc: not available URL: From grothausmann.roman at mh-hannover.de Thu Aug 14 06:42:10 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Thu, 14 Aug 2014 12:42:10 +0200 Subject: [ITK] [ITK-users] adding a global hierarchical watershed segmentation mode to itksnap In-Reply-To: References: <53E85181.8040607@mh-hannover.de> <0f32755d9980441ca0162728b088f00b@queensu.ca> <53E9CCED.1000604@mh-hannover.de> Message-ID: <53EC9282.3090904@mh-hannover.de> Hi Paul, Many thanks for Your reply. The main problem that I often face with samples from material science is, that around 1000 labels are needed per tomogram, e.g. individual particles, regions, domains. So setting markers by hand is already very timeconsuming. Expanding each of these one after another is way to cumbersum. I'm not sure if I have tried clustering. At least it was not available as preprocessing mode (possibly because I only have a greyscale tomogram) as described in the ReleaseNotes (is there any other new docu?). I did not try supervised classification because dev32 does not run on our system and the self-compiled binary crashes at start up with a segmentation fault (see below). Anyway it seems not possible to have the snake-tool make multiple labels compete against each other, as e.g. in a global watershed approach. I'd be very happy if there was already a tool in order to achieve what I need but it seems there isn't, so I guess I've to start creating my own. With Andras hint about using Slicer, I'm now wondering whether I should implement it for itksnap or slicer. None of both seem to have a tool to join/remove labels from a base map to a result map by just LMB/RMB clicking, which I would find very helpful. Adding a hierarchical watershed to generate the base map and using the mouse wheel to change the level/granularity on the fly would then just be an extension. A tile view (e.g. both maps side by side) for all three axes as in itksnap would be handy for this join/remove tool. Does Slicer offer something like that as well? Is it possible to get also the overlay id together with the click position? That would even allow to choose an already existing label in the result map for modification by just a click. Any further recommendations for the start are very welcome. Thanks, Roman ______________________ LD_LIBRARY_PATH=/opt/itk-4.5.1/lib/:/opt/qt-5.3.1/5.3/gcc_64/lib/ vglrun ./ITK-SNAP QXcbConnection: Failed to initialize XRandr Qt: XKEYBOARD extension not present on the X server. ************************************* ITK-SNAP: Segmentation fault BACKTRACE: ./ITK-SNAP(_Z24SegmentationFaultHandleri+0x133)[0x7af9c3] /lib/x86_64-linux-gnu/libc.so.6(+0x324f0)[0x7f6e977224f0] /lib/x86_64-linux-gnu/libc.so.6(+0x11aedf)[0x7f6e9780aedf] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5Core.so.5(_ZN16QCoreApplication9argumentsEv+0x8c)[0x7f6ea8dbf6bc] /opt/qt-5.3.1/5.3/gcc_64/plugins/platforms/libqxcb.so(+0x4b213)[0x7f6e907df213] /opt/qt-5.3.1/5.3/gcc_64/plugins/platforms/libqxcb.so(+0x4b5f9)[0x7f6e907df5f9] /opt/qt-5.3.1/5.3/gcc_64/plugins/platforms/libqxcb.so(+0x58127)[0x7f6e907ec127] /opt/qt-5.3.1/5.3/gcc_64/plugins/platforms/libqxcb.so(+0x4b009)[0x7f6e907df009] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5Gui.so.5(_ZN7QWindow6createEv+0x33)[0x7f6ea9e89e03] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5OpenGL.so.5(_ZN10QGLContext13chooseContextEPKS_+0x121)[0x7f6eaad4bf51] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5OpenGL.so.5(_ZN10QGLContext6createEPKS_+0x39)[0x7f6eaad23609] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5OpenGL.so.5(_ZN9QGLWidget10setContextEP10QGLContextPKS0_b+0xa7)[0x7f6eaad4b8b7] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5OpenGL.so.5(_ZN16QGLWidgetPrivate11initContextEP10QGLContextPK9QGLWidget+0x7a)[0x7f6eaad28c2a] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5OpenGL.so.5(_ZN9QGLWidgetC2EP7QWidgetPKS_6QFlagsIN2Qt10WindowTypeEE+0x111)[0x7f6eaad29031] ./ITK-SNAP(_ZN19QtAbstractOpenGLBoxC1EP7QWidget+0xd)[0x849e3d] ./ITK-SNAP(_ZN16GenericSliceViewC2EP7QWidget+0x10)[0x848310] ./ITK-SNAP(_ZN17Ui_SliceViewPanel7setupUiEP7QWidget+0x235f)[0x840fbf] ./ITK-SNAP(_ZN14SliceViewPanelC1EP7QWidget+0x53)[0x839fc3] ./ITK-SNAP(_ZN18Ui_MainImageWindow7setupUiEP11QMainWindow+0x336b)[0x7d77bb] ./ITK-SNAP(_ZN15MainImageWindowC2EP7QWidget+0x64)[0x7c47b4] ./ITK-SNAP(main+0x1b3)[0x7aa8c3] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f6e9770eead] ./ITK-SNAP[0x7af6f9] ************************************* On 13/08/14 22:15, Paul Yushkevich wrote: > Hi Roman, > > I am not sure, have you experimented with some of the newer segmentation modes > in ITK-SNAP (clustering, available in the 3.0 release, and supervised > classification, available in the dev32 branch). These still operate using active > contours, but can generate per-label probability maps that could then be easily > converted into multilabel segmentations. I guess my main question is whether > heirarchical watershed segmentation offers advantages over these modes, and if > so, whether it may possibly be integrated as another segmentation mode in the > snake pipeline... > > Paul. > > > On Tue, Aug 12, 2014 at 4:14 AM, Dr. Roman Grothausmann > > > wrote: > > Hi Andras, > > > Many thanks for Your hints. We'll test them on our data. However, our data > is not as standardized in quality as CT or MRT data and from our experience > many of the "magic" segmentations demonstrated on CT or MRT data does not > work on our data. > However, of all the segmentation modules I could find in Slicer or elsewhere > none was based on a hierarchical watershed algorithm like the > SegmentationEditor of the InsightApplications. Is there any other that I've > missed? > Concerning my idea to implement this if no tool currently already exists: > Would such an extension be of more use in Slicer or itksnap? > For which of the both would it likely be easier to integrate the extension? > > Best wishes > Roman > > On 11/08/14 16:20, Andras Lasso wrote: > > Have you tried segmentation tools in 3D Slicer? There is a multi-label > watershed > segmentation tool that works in 3d > (http://www.slicer.org/__slicerWiki/index.php/__Documentation/Nightly/Modules/__Editor#WatershedFromMarkers > ), > there are also a number of other generic semi-automatic segmentation > tools (such > as GrowCut) and a few fully-automatic specialized tools (for brain, > airways, etc). Download the nightly build and also checkout the Segmentation > category in the Extension Manager. > > Andras > > *From:* Dr. Roman Grothausmann > > > *Sent:* Monday, August 11, 2014 1:15 AM > *To:* itksnap-users at googlegroups.com > > > > *Cc:* ITK Mailing List > > > > Dear mailing list members, > > > For a long time now I've been searching for a replacement of the old > SegmentationEditor (part of the InsightApplications) which I could not > get to > work even with older ITK-3.x. Somewhere I was told that it was > integrated and > maintained within itksnap. However the only tool in itksnap based on > watershed > segmentation seems to be the adaptive brush. It is very handy, but > time-consuming in 3D and only for local segmentations. In contrast the > SegmentationEditor used a global hierarchical watershed segmentation to pick > labels from, see e.g. the video linked here: > http://www.insight-journal.__org/browse/publication/70 > > Quite often now I've stumbled over data, that would likely have profited > a lot > of such a tool for segmentation. > > If such a tool working with ITK-4.x does not exist any more, I thought of > implementing it as a global WS segmentation mode in itksnap. That way > making the > tool easier to find, to use and to ensure maintenance (should it be > integrated > into the itksnap code base in the end) and also avoiding recoding a GUI with > mouse interaction and such. > > My current idea is to start, similar to the snake-tool, with > pre-filtering like > smoothing and optional edge-detection. > Then the main edit mode to consist of the usual 4 subwindows showing an > overlay > of the grey-image and the watershed segmentation of the hierarchical > WS-filter > (hWS), side-by-side to another label-dataset (loaded like a tiled > overlay) which > consist of the actually chosen labels from the hWS as the final data (FD). > The interaction I'm considering would be to LMB click on a label in the hWS > which is then added to the FD as the current fg label, or removed with a > RMB. > The hierachrchy level of the hWS could be controlled by a slider or the > mouse > wheel + Shift in nearly real time if some region demands higher or lower > detailed segmentation. When the fg label is changed, the segmentation > added or > removed with further mouse interactions would modify the new fg label. > When all is done and the global WS mode is left, the FD label-dataset is > added > to the main segmentation of itksnap. > > Would that be possible to implement in itksnap 3.x? > What source files of the itksnap code base should I look at for: > - the pre-filtering mode of the snake (for the smoothing and edge detection) > - the mouse interactions (for e.g. adding the whell + Shift interaction) > - possible examples for the dual layout > > Thanks for any comments, help or hints. > 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 > > _________________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/__mailman/listinfo/community > > > > -- > 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 > > -- > You received this message because you are subscribed to the Google Groups > "itksnap-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to itksnap-users+unsubscribe at __googlegroups.com > . > To post to this group, send email to itksnap-users at googlegroups.com > __. > Visit this group at http://groups.google.com/__group/itksnap-users > . > For more options, visit https://groups.google.com/d/__optout > . > > > > > -- > Paul A. Yushkevich, Ph.D. > Associate Professor > Penn Image Computing and Science Laboratory > Department of Radiology > University of Pennsylvania > > -- > You received this message because you are subscribed to the Google Groups > "itksnap-users" group. > To unsubscribe from this group and stop receiving emails from it, send an email > to itksnap-users+unsubscribe at googlegroups.com > . > To post to this group, send email to itksnap-users at googlegroups.com > . > Visit this group at http://groups.google.com/group/itksnap-users. > For more options, visit https://groups.google.com/d/optout. -- 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 nekto1989 at gmail.com Thu Aug 14 07:23:14 2014 From: nekto1989 at gmail.com (=?UTF-8?B?0JzQsNGAJ9GP0L0g0JrQu9C40LzQvtCy?=) Date: Thu, 14 Aug 2014 14:23:14 +0300 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Hi, I've tried different methods. Reading to RGBPixel, then using RGBToLuminanceImageFilter and MultiplyImageFilter (2 ^ 8) produces the same visually proper image. Reading directly to fails. Looks like this is bug in TIFFImageIO and not in the way it is being called. http://itk-users.7.n7.nabble.com/TiffIO-strange-behaviour-td32215.html Marian 2014-08-13 23:55 GMT+03:00 ???'?? ?????? : > Hi Matt, > > I hope this is proper cmakelists.txt. I'm used to using ITK connected > through *.props into Visual Studio solution. > > Best regards, > Marian > > > > 2014-08-13 22:52 GMT+03:00 Matt McCormick : > > Hi Marian, >> >> Thanks for the update. Offhand, I am not seeing the issue. >> >> Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and >> the input data? >> >> Thanks, >> Matt >> >> [1] http://sscce.org/ >> >> On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? >> wrote: >> > { >> > typedef unsigned short PixelType; >> > typedef itk::Image ImageType; >> > auto reader = itk::ImageFileReader< >> > ImageType>::New(); >> > reader->SetFileName("D:/TestData/input/input.tif"); >> > reader->SetImageIO(itk::TIFFImageIO::New()); >> > >> > typedef unsigned short OutputPixelType; >> > typedef itk::Image OutputImageType; >> > >> > auto writer = itk::ImageFileWriter::New(); >> > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); >> > auto image_io = itk::TIFFImageIO::New(); >> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >> > writer->SetImageIO(image_io); >> > writer->SetInput(reader->GetOutput()); >> > writer->Update(); //produces completely black >> > } >> > >> > { >> > typedef itk::RGBAPixel PixelType; >> > typedef itk::Image ImageType; >> > auto reader = itk::ImageFileReader::New(); >> > reader->SetFileName("D:/TestData/input/input.tif"); >> > reader->SetImageIO(itk::TIFFImageIO::New()); >> > reader->Update(); >> > >> > typedef unsigned short OutputPixelType; >> > typedef itk::Image OutputImageType; >> > >> > auto input_image = reader->GetOutput(); >> > auto output_image = OutputImageType::New(); >> > output_image->CopyInformation(input_image); >> > output_image->SetRegions(input_image->GetLargestPossibleRegion()); >> > output_image->Allocate(); >> > itk::ImageRegionConstIterator const_iterator(input_image, >> > input_image->GetLargestPossibleRegion()); >> > itk::ImageRegionIterator >> > rescaled_iterator(output_image, >> output_image->GetLargestPossibleRegion()); >> > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); >> > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) >> > { >> > const PixelType& pixel = const_iterator.Get(); >> > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) * >> 16 + >> > pixel.GetGreen()) * 16 + pixel.GetBlue()); >> > } >> > >> > auto writer = itk::ImageFileWriter::New(); >> > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); >> > auto image_io = itk::TIFFImageIO::New(); >> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >> > writer->SetImageIO(image_io); >> > writer->SetInput(output_image); >> > writer->Update(); //output looks the same >> > } >> > >> > >> > 2014-08-13 20:50 GMT+03:00 Matt McCormick : >> >> >> >> Hi Marian, >> >> >> >> >> >> If >> >> >> >> itk::Image< unsigned short, 2 > >> >> >> >> is used for the ImageType, does it work (note the dimension >> >> specification). >> >> >> >> HTH, >> >> Matt >> >> >> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? >> >> wrote: >> >> > Hi, >> >> > >> >> > How to properly read 32-bit TIFF? I need to get itk::Image> >> > short> >> >> > on output. If I use it as ImageType for ImageFileReader, it is read >> as >> >> > fully >> >> > black (checked contrast with Image Watch and it is for sure >> completely >> >> > empty). If I read it with pixel type RGBPixel or >> >> > RGBAPixel, it is read properly. But I need to convert >> it >> >> > manually to unsigned short after this. So what is the proper way of >> >> > reading >> >> > it? Do I need to create templated methods for every pixeltype with >> >> > conversions to unsigned short? >> >> > >> >> > Best regards, >> >> > Marian >> >> > >> >> > _______________________________________________ >> >> > Community mailing list >> >> > Community at itk.org >> >> > http://public.kitware.com/mailman/listinfo/community >> >> > >> > >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gass at vision.ee.ethz.ch Thu Aug 14 07:32:06 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Thu, 14 Aug 2014 13:32:06 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Dear all, any further ideas on this one? Thanks, Tobias 2014-08-12 16:10 GMT+02:00 Tobias Gass : > Yes, this does result in the same problems as before. > > > 2014-08-12 15:06 GMT+02:00 Bill Lorensen : > > Have you tried: >> UseImageSpacingOn(); >> >> >> On Tue, Aug 12, 2014 at 8:47 AM, Tobias Gass >> wrote: >> > Further update: when manually increasing the spacing of the input image >> > (without resampling, thus not changing the size), the filter works well. >> > This probably indicates numerical instability depending on image spacing >> > somewhere in the code, which would probably be great if it could be >> fixed. >> > >> > Best, >> > Tobias >> > >> > >> > 2014-08-12 14:33 GMT+02:00 Tobias Gass : >> > >> >> Update: meanwhile I also tried cropping the image to investigate the >> >> impact of the overall size (#voxels) of the image. It appears to not >> have an >> >> effect, the same artifacts occur when processing a significantly >> smaller >> >> region (1/2 size). >> >> >> >> >> >> 2014-08-12 10:44 GMT+02:00 Tobias Gass : >> >> >> >>> Hi, >> >>> >> >>> changing the PixelType did not yield any change. However, I did some >> >>> further tests which seem to point at image spacing or total size to >> be the >> >>> culprit. My original image is fairly high-res, with 0.25mm in-plane >> >>> resolution and 0.75mm slice thickness and 512x512x409 voxel size. I >> tried >> >>> resampling the image to different isotropic resolutions (0.25, 0.3, >> 0.34, >> >>> 0.35, 0.4, 0.5, 0.75, 1)mm isotropic spacing. For all spacings down to >> >>> 0.35mm, the AA filter converged nicely and the output looks as I'd >> expect >> >>> it. Lower than 0.35mm spacing, and it fails in the way I described >> (from >> >>> this spacing on the #vox is equal or greater than the #voxels in my >> original >> >>> image). >> >>> >> >>> Any idea what might cause this, or what to further investigate? >> >>> >> >>> Thanks, >> >>> Tobias >> >>> >> >>> >> >>> 2014-08-11 22:17 GMT+02:00 Bill Lorensen : >> >>> >> >>>> Paraview should do the right thing. >> >>>> >> >>>> On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass > > >> >>>> wrote: >> >>>> > I will try that tomorrow morning (living in GMT+1). I used >> paraview to >> >>>> > extract the isosurface, but also looked at the output of the >> AA-filter >> >>>> > directly (which looked fuzzy). I can also post an image of that >> >>>> > tomorrow. >> >>>> > >> >>>> > Thanks for your help! >> >>>> > Tobias >> >>>> > >> >>>> > >> >>>> > 2014-08-11 21:22 GMT+02:00 Bill Lorensen > >: >> >>>> > >> >>>> >> How are you extracting the final isosurface? >> >>>> >> >> >>>> >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen >> >>>> >> >> >>>> >> wrote: >> >>>> >> > If you change >> >>>> >> > typedef short PixelType; >> >>>> >> > to >> >>>> >> > typedef double PixelType; >> >>>> >> > >> >>>> >> > do the results change. >> >>>> >> > >> >>>> >> > >> >>>> >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass >> >>>> >> > >> >>>> >> > wrote: >> >>>> >> >> >> >>>> >> >>> Can you post your code. The results do not look correct. >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> Sure. The {write,read}Image functions are just convenient >> wrappers >> >>>> >> >> for >> >>>> >> >> the >> >>>> >> >> respective ITK tools. >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> #include >> >>>> >> >> >> >>>> >> >> #include >> >>>> >> >> >> >>>> >> >> #include "argstream.h" >> >>>> >> >> >> >>>> >> >> #include "ImageUtils.h" >> >>>> >> >> >> >>>> >> >> #include "itkAntiAliasBinaryImageFilter.h" >> >>>> >> >> >> >>>> >> >> using namespace std; >> >>>> >> >> >> >>>> >> >> using namespace itk; >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> int main(int argc, char ** argv) >> >>>> >> >> >> >>>> >> >> { >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); >> >>>> >> >> >> >>>> >> >> typedef short PixelType; >> >>>> >> >> >> >>>> >> >> typedef double OutputPixelType; >> >>>> >> >> >> >>>> >> >> const unsigned int D=3; >> >>>> >> >> >> >>>> >> >> typedef Image ImageType; >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> typedef ImageType::Pointer ImagePointerType; >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> typedef Image OutputImageType; >> >>>> >> >> >> >>>> >> >> typedef OutputImageType::Pointer OutputImagePointerType; >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> argstream * as=new argstream(argc,argv); >> >>>> >> >> >> >>>> >> >> string inFile, outFile; >> >>>> >> >> >> >>>> >> >> double thresh=0.0; >> >>>> >> >> >> >>>> >> >> (*as) >> parameter ("in", inFile, " filename...", true); >> >>>> >> >> >> >>>> >> >> (*as) >> parameter ("out", outFile, " filename...", true); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> (*as) >> help(); >> >>>> >> >> >> >>>> >> >> as->defaultErrorHandling(); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> ImagePointerType img = >> >>>> >> >> ImageUtils::readImage(inFile); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> typedef itk::AntiAliasBinaryImageFilter > >>>> >> >> OutputImageType> >> >>>> >> >> >> >>>> >> >> AntiAliasBinaryImageFilterType; >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter >> >>>> >> >> >> >>>> >> >> = AntiAliasBinaryImageFilterType::New (); >> >>>> >> >> >> >>>> >> >> antiAliasFilter->SetInput(img); >> >>>> >> >> >> >>>> >> >> antiAliasFilter->SetNumberOfIterations(5); >> >>>> >> >> >> >>>> >> >> antiAliasFilter->SetMaximumRMSError(0.02); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> antiAliasFilter->Update(); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> // For increased code coverage. Does nothing. >> >>>> >> >> >> >>>> >> >> antiAliasFilter->GetMaximumRMSError(); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> antiAliasFilter->Update(); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " >> << >> >>>> >> >> std::endl; >> >>>> >> >> >> >>>> >> >> std::cout << "Last RMS change value was: " << >> >>>> >> >> antiAliasFilter->GetRMSChange() << std::endl; >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() <> >>>> >> >> >> >>>> >> >> >> >>>> >> >> std::cout<GetLowerBinaryValue()<<" "<< >> >>>> >> >> antiAliasFilter->GetUpperBinaryValue()<> >>>> >> >> >> >>>> >> >> >> >>>> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> ImageUtils::writeImage(outFile,out); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> return 1; >> >>>> >> >> >> >>>> >> >> } >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) >> and >> >>>> >> >> maxRMSError >> >>>> >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved >> >>>> >> >> after >> >>>> >> >> one >> >>>> >> >> iteration where RMSE changes by about 0.08. This increases for >> all >> >>>> >> >> following >> >>>> >> >> iterations, which have an RMSE-change of about 0.25 for all >> number >> >>>> >> >> of >> >>>> >> >> iterations tested. All this is using ITK 4.5 pulled from the >> GIT >> >>>> >> >> repository >> >>>> >> >> a while ago, running on an intel i7 on Debian. >> >>>> >> >> >> >>>> >> >> Thanks a lot! >> >>>> >> >> Tobias >> >>>> >> >> >> >>>> >> >>> >> >>>> >> >>> >> >>>> >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass >> >>>> >> >>> >> >>>> >> >>> wrote: >> >>>> >> >>> > Dear all, >> >>>> >> >>> > >> >>>> >> >>> > I'm having problems using the anti-alias filter, which I >> want >> >>>> >> >>> > to use >> >>>> >> >>> > in >> >>>> >> >>> > order to smooth a binary segmentation volume. I'm using >> >>>> >> >>> > essentially >> >>>> >> >>> > the >> >>>> >> >>> > example code from the repository, which for my input file >> seems >> >>>> >> >>> > to >> >>>> >> >>> > start >> >>>> >> >>> > oscillating after 2 iterations, leading to weird 'pointy' >> >>>> >> >>> > artifacts >> >>>> >> >>> > on >> >>>> >> >>> > the >> >>>> >> >>> > surface as can be seen from the attached screenshot (AA >> filter >> >>>> >> >>> > output is >> >>>> >> >>> > on >> >>>> >> >>> > the left, input on the right). >> >>>> >> >>> > >> >>>> >> >>> > Is there any parameter to set/implement which could improve >> the >> >>>> >> >>> > behavior >> >>>> >> >>> > of >> >>>> >> >>> > this filter? I'm assuming that my input is reasonable, or is >> >>>> >> >>> > this >> >>>> >> >>> > something >> >>>> >> >>> > the filter is expected to have problems with? It is notable >> >>>> >> >>> > that >> >>>> >> >>> > such >> >>>> >> >>> > errors >> >>>> >> >>> > seem to mainly appear in 'flat' regions of the volume, and >> are >> >>>> >> >>> > not >> >>>> >> >>> > apparent >> >>>> >> >>> > in the curved shaft of the bone. >> >>>> >> >>> > >> >>>> >> >>> > Any help, or pointers to further resources are appreciated, >> >>>> >> >>> > thanks, >> >>>> >> >>> > Tobias >> >>>> >> >>> > >> >>>> >> >>> > _____________________________________ >> >>>> >> >>> > Powered by www.kitware.com >> >>>> >> >>> > >> >>>> >> >>> > Visit other Kitware open-source projects at >> >>>> >> >>> > http://www.kitware.com/opensource/opensource.html >> >>>> >> >>> > >> >>>> >> >>> > Kitware offers ITK Training Courses, for more information >> >>>> >> >>> > visit: >> >>>> >> >>> > http://www.kitware.com/products/protraining.php >> >>>> >> >>> > >> >>>> >> >>> > Please keep messages on-topic and check the 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 >> >>>> >> >> >> >>>> >> >> >> >>>> >> > >> >>>> >> > >> >>>> >> > >> >>>> >> > -- >> >>>> >> > Unpaid intern in BillsBasement at noware dot com >> >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> -- >> >>>> >> Unpaid intern in BillsBasement at noware dot com >> >>>> > >> >>>> > >> >>>> >> >>>> >> >>>> >> >>>> -- >> >>>> 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 >> >>> >> >>> >> >> >> > >> >> >> >> -- >> 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 bill.lorensen at gmail.com Thu Aug 14 08:35:10 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 14 Aug 2014 08:35:10 -0400 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: How are you displaying the unsigned short image? Many viewers cannot properly display unsigned short. On Aug 14, 2014 7:23 AM, "???'?? ??????" wrote: > Hi, > > I've tried different methods. Reading to RGBPixel, then > using RGBToLuminanceImageFilter and MultiplyImageFilter (2 ^ 8) produces > the same visually proper image. Reading directly to > fails. Looks like this is bug in TIFFImageIO and not in the way it is being > called. > http://itk-users.7.n7.nabble.com/TiffIO-strange-behaviour-td32215.html > > Marian > > > 2014-08-13 23:55 GMT+03:00 ???'?? ?????? : > >> Hi Matt, >> >> I hope this is proper cmakelists.txt. I'm used to using ITK connected >> through *.props into Visual Studio solution. >> >> Best regards, >> Marian >> >> >> >> 2014-08-13 22:52 GMT+03:00 Matt McCormick : >> >> Hi Marian, >>> >>> Thanks for the update. Offhand, I am not seeing the issue. >>> >>> Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and >>> the input data? >>> >>> Thanks, >>> Matt >>> >>> [1] http://sscce.org/ >>> >>> On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? >>> wrote: >>> > { >>> > typedef unsigned short PixelType; >>> > typedef itk::Image ImageType; >>> > auto reader = itk::ImageFileReader< >>> > ImageType>::New(); >>> > reader->SetFileName("D:/TestData/input/input.tif"); >>> > reader->SetImageIO(itk::TIFFImageIO::New()); >>> > >>> > typedef unsigned short OutputPixelType; >>> > typedef itk::Image OutputImageType; >>> > >>> > auto writer = itk::ImageFileWriter::New(); >>> > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); >>> > auto image_io = itk::TIFFImageIO::New(); >>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >>> > writer->SetImageIO(image_io); >>> > writer->SetInput(reader->GetOutput()); >>> > writer->Update(); //produces completely black >>> > } >>> > >>> > { >>> > typedef itk::RGBAPixel PixelType; >>> > typedef itk::Image ImageType; >>> > auto reader = itk::ImageFileReader::New(); >>> > reader->SetFileName("D:/TestData/input/input.tif"); >>> > reader->SetImageIO(itk::TIFFImageIO::New()); >>> > reader->Update(); >>> > >>> > typedef unsigned short OutputPixelType; >>> > typedef itk::Image OutputImageType; >>> > >>> > auto input_image = reader->GetOutput(); >>> > auto output_image = OutputImageType::New(); >>> > output_image->CopyInformation(input_image); >>> > output_image->SetRegions(input_image->GetLargestPossibleRegion()); >>> > output_image->Allocate(); >>> > itk::ImageRegionConstIterator >>> const_iterator(input_image, >>> > input_image->GetLargestPossibleRegion()); >>> > itk::ImageRegionIterator >>> > rescaled_iterator(output_image, >>> output_image->GetLargestPossibleRegion()); >>> > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); >>> > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) >>> > { >>> > const PixelType& pixel = const_iterator.Get(); >>> > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) >>> * 16 + >>> > pixel.GetGreen()) * 16 + pixel.GetBlue()); >>> > } >>> > >>> > auto writer = itk::ImageFileWriter::New(); >>> > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); >>> > auto image_io = itk::TIFFImageIO::New(); >>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >>> > writer->SetImageIO(image_io); >>> > writer->SetInput(output_image); >>> > writer->Update(); //output looks the same >>> > } >>> > >>> > >>> > 2014-08-13 20:50 GMT+03:00 Matt McCormick >> >: >>> >> >>> >> Hi Marian, >>> >> >>> >> >>> >> If >>> >> >>> >> itk::Image< unsigned short, 2 > >>> >> >>> >> is used for the ImageType, does it work (note the dimension >>> >> specification). >>> >> >>> >> HTH, >>> >> Matt >>> >> >>> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? >>> >> wrote: >>> >> > Hi, >>> >> > >>> >> > How to properly read 32-bit TIFF? I need to get itk::Image>> >> > short> >>> >> > on output. If I use it as ImageType for ImageFileReader, it is read >>> as >>> >> > fully >>> >> > black (checked contrast with Image Watch and it is for sure >>> completely >>> >> > empty). If I read it with pixel type RGBPixel or >>> >> > RGBAPixel, it is read properly. But I need to >>> convert it >>> >> > manually to unsigned short after this. So what is the proper way of >>> >> > reading >>> >> > it? Do I need to create templated methods for every pixeltype with >>> >> > conversions to unsigned short? >>> >> > >>> >> > Best regards, >>> >> > Marian >>> >> > >>> >> > _______________________________________________ >>> >> > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nekto1989 at gmail.com Thu Aug 14 09:51:27 2014 From: nekto1989 at gmail.com (=?UTF-8?B?0JzQsNGAJ9GP0L0g0JrQu9C40LzQvtCy?=) Date: Thu, 14 Aug 2014 16:51:27 +0300 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Image Watch during debugging in Visual Studio. Windows Photo Viewer after results dumped to disk. 2014-08-14 15:35 GMT+03:00 Bill Lorensen : > How are you displaying the unsigned short image? Many viewers cannot > properly display unsigned short. > On Aug 14, 2014 7:23 AM, "???'?? ??????" wrote: > >> Hi, >> >> I've tried different methods. Reading to RGBPixel, then >> using RGBToLuminanceImageFilter and MultiplyImageFilter (2 ^ 8) produces >> the same visually proper image. Reading directly to >> fails. Looks like this is bug in TIFFImageIO and not in the way it is being >> called. >> http://itk-users.7.n7.nabble.com/TiffIO-strange-behaviour-td32215.html >> >> Marian >> >> >> 2014-08-13 23:55 GMT+03:00 ???'?? ?????? : >> >>> Hi Matt, >>> >>> I hope this is proper cmakelists.txt. I'm used to using ITK connected >>> through *.props into Visual Studio solution. >>> >>> Best regards, >>> Marian >>> >>> >>> >>> 2014-08-13 22:52 GMT+03:00 Matt McCormick : >>> >>> Hi Marian, >>>> >>>> Thanks for the update. Offhand, I am not seeing the issue. >>>> >>>> Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and >>>> the input data? >>>> >>>> Thanks, >>>> Matt >>>> >>>> [1] http://sscce.org/ >>>> >>>> On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? >>>> wrote: >>>> > { >>>> > typedef unsigned short PixelType; >>>> > typedef itk::Image ImageType; >>>> > auto reader = itk::ImageFileReader< >>>> > ImageType>::New(); >>>> > reader->SetFileName("D:/TestData/input/input.tif"); >>>> > reader->SetImageIO(itk::TIFFImageIO::New()); >>>> > >>>> > typedef unsigned short OutputPixelType; >>>> > typedef itk::Image OutputImageType; >>>> > >>>> > auto writer = itk::ImageFileWriter::New(); >>>> > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); >>>> > auto image_io = itk::TIFFImageIO::New(); >>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >>>> > writer->SetImageIO(image_io); >>>> > writer->SetInput(reader->GetOutput()); >>>> > writer->Update(); //produces completely black >>>> > } >>>> > >>>> > { >>>> > typedef itk::RGBAPixel PixelType; >>>> > typedef itk::Image ImageType; >>>> > auto reader = itk::ImageFileReader::New(); >>>> > reader->SetFileName("D:/TestData/input/input.tif"); >>>> > reader->SetImageIO(itk::TIFFImageIO::New()); >>>> > reader->Update(); >>>> > >>>> > typedef unsigned short OutputPixelType; >>>> > typedef itk::Image OutputImageType; >>>> > >>>> > auto input_image = reader->GetOutput(); >>>> > auto output_image = OutputImageType::New(); >>>> > output_image->CopyInformation(input_image); >>>> > output_image->SetRegions(input_image->GetLargestPossibleRegion()); >>>> > output_image->Allocate(); >>>> > itk::ImageRegionConstIterator >>>> const_iterator(input_image, >>>> > input_image->GetLargestPossibleRegion()); >>>> > itk::ImageRegionIterator >>>> > rescaled_iterator(output_image, >>>> output_image->GetLargestPossibleRegion()); >>>> > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); >>>> > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) >>>> > { >>>> > const PixelType& pixel = const_iterator.Get(); >>>> > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) >>>> * 16 + >>>> > pixel.GetGreen()) * 16 + pixel.GetBlue()); >>>> > } >>>> > >>>> > auto writer = itk::ImageFileWriter::New(); >>>> > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); >>>> > auto image_io = itk::TIFFImageIO::New(); >>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >>>> > writer->SetImageIO(image_io); >>>> > writer->SetInput(output_image); >>>> > writer->Update(); //output looks the same >>>> > } >>>> > >>>> > >>>> > 2014-08-13 20:50 GMT+03:00 Matt McCormick >>> >: >>>> >> >>>> >> Hi Marian, >>>> >> >>>> >> >>>> >> If >>>> >> >>>> >> itk::Image< unsigned short, 2 > >>>> >> >>>> >> is used for the ImageType, does it work (note the dimension >>>> >> specification). >>>> >> >>>> >> HTH, >>>> >> Matt >>>> >> >>>> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? >>>> >> wrote: >>>> >> > Hi, >>>> >> > >>>> >> > How to properly read 32-bit TIFF? I need to get itk::Image>>> >> > short> >>>> >> > on output. If I use it as ImageType for ImageFileReader, it is >>>> read as >>>> >> > fully >>>> >> > black (checked contrast with Image Watch and it is for sure >>>> completely >>>> >> > empty). If I read it with pixel type RGBPixel or >>>> >> > RGBAPixel, it is read properly. But I need to >>>> convert it >>>> >> > manually to unsigned short after this. So what is the proper way of >>>> >> > reading >>>> >> > it? Do I need to create templated methods for every pixeltype with >>>> >> > conversions to unsigned short? >>>> >> > >>>> >> > Best regards, >>>> >> > Marian >>>> >> > >>>> >> > _______________________________________________ >>>> >> > 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 >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Aug 14 10:18:59 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 14 Aug 2014 10:18:59 -0400 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Thanks for the nice example! I have been able to reproduce the output. If it is a bug, can the given image be added to the repository as part of a unit test? Thanks, Matt On Thu, Aug 14, 2014 at 9:51 AM, ???'?? ?????? wrote: > Image Watch during debugging in Visual Studio. > Windows Photo Viewer after results dumped to disk. > > > 2014-08-14 15:35 GMT+03:00 Bill Lorensen : > >> How are you displaying the unsigned short image? Many viewers cannot >> properly display unsigned short. >> >> On Aug 14, 2014 7:23 AM, "???'?? ??????" wrote: >>> >>> Hi, >>> >>> I've tried different methods. Reading to RGBPixel, then >>> using RGBToLuminanceImageFilter and MultiplyImageFilter (2 ^ 8) produces the >>> same visually proper image. Reading directly to fails. >>> Looks like this is bug in TIFFImageIO and not in the way it is being called. >>> http://itk-users.7.n7.nabble.com/TiffIO-strange-behaviour-td32215.html >>> >>> Marian >>> >>> >>> 2014-08-13 23:55 GMT+03:00 ???'?? ?????? : >>>> >>>> Hi Matt, >>>> >>>> I hope this is proper cmakelists.txt. I'm used to using ITK connected >>>> through *.props into Visual Studio solution. >>>> >>>> Best regards, >>>> Marian >>>> >>>> >>>> >>>> 2014-08-13 22:52 GMT+03:00 Matt McCormick : >>>> >>>>> Hi Marian, >>>>> >>>>> Thanks for the update. Offhand, I am not seeing the issue. >>>>> >>>>> Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and >>>>> the input data? >>>>> >>>>> Thanks, >>>>> Matt >>>>> >>>>> [1] http://sscce.org/ >>>>> >>>>> On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? >>>>> wrote: >>>>> > { >>>>> > typedef unsigned short PixelType; >>>>> > typedef itk::Image ImageType; >>>>> > auto reader = itk::ImageFileReader< >>>>> > ImageType>::New(); >>>>> > reader->SetFileName("D:/TestData/input/input.tif"); >>>>> > reader->SetImageIO(itk::TIFFImageIO::New()); >>>>> > >>>>> > typedef unsigned short OutputPixelType; >>>>> > typedef itk::Image OutputImageType; >>>>> > >>>>> > auto writer = itk::ImageFileWriter::New(); >>>>> > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); >>>>> > auto image_io = itk::TIFFImageIO::New(); >>>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> > writer->SetImageIO(image_io); >>>>> > writer->SetInput(reader->GetOutput()); >>>>> > writer->Update(); //produces completely black >>>>> > } >>>>> > >>>>> > { >>>>> > typedef itk::RGBAPixel PixelType; >>>>> > typedef itk::Image ImageType; >>>>> > auto reader = itk::ImageFileReader::New(); >>>>> > reader->SetFileName("D:/TestData/input/input.tif"); >>>>> > reader->SetImageIO(itk::TIFFImageIO::New()); >>>>> > reader->Update(); >>>>> > >>>>> > typedef unsigned short OutputPixelType; >>>>> > typedef itk::Image OutputImageType; >>>>> > >>>>> > auto input_image = reader->GetOutput(); >>>>> > auto output_image = OutputImageType::New(); >>>>> > output_image->CopyInformation(input_image); >>>>> > >>>>> > output_image->SetRegions(input_image->GetLargestPossibleRegion()); >>>>> > output_image->Allocate(); >>>>> > itk::ImageRegionConstIterator >>>>> > const_iterator(input_image, >>>>> > input_image->GetLargestPossibleRegion()); >>>>> > itk::ImageRegionIterator >>>>> > rescaled_iterator(output_image, >>>>> > output_image->GetLargestPossibleRegion()); >>>>> > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); >>>>> > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) >>>>> > { >>>>> > const PixelType& pixel = const_iterator.Get(); >>>>> > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) >>>>> > * 16 + >>>>> > pixel.GetGreen()) * 16 + pixel.GetBlue()); >>>>> > } >>>>> > >>>>> > auto writer = itk::ImageFileWriter::New(); >>>>> > >>>>> > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); >>>>> > auto image_io = itk::TIFFImageIO::New(); >>>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> > writer->SetImageIO(image_io); >>>>> > writer->SetInput(output_image); >>>>> > writer->Update(); //output looks the same >>>>> > } >>>>> > >>>>> > >>>>> > 2014-08-13 20:50 GMT+03:00 Matt McCormick >>>>> > : >>>>> >> >>>>> >> Hi Marian, >>>>> >> >>>>> >> >>>>> >> If >>>>> >> >>>>> >> itk::Image< unsigned short, 2 > >>>>> >> >>>>> >> is used for the ImageType, does it work (note the dimension >>>>> >> specification). >>>>> >> >>>>> >> HTH, >>>>> >> Matt >>>>> >> >>>>> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? >>>>> >> wrote: >>>>> >> > Hi, >>>>> >> > >>>>> >> > How to properly read 32-bit TIFF? I need to get >>>>> >> > itk::Image>>>> >> > short> >>>>> >> > on output. If I use it as ImageType for ImageFileReader, it is >>>>> >> > read as >>>>> >> > fully >>>>> >> > black (checked contrast with Image Watch and it is for sure >>>>> >> > completely >>>>> >> > empty). If I read it with pixel type RGBPixel or >>>>> >> > RGBAPixel, it is read properly. But I need to >>>>> >> > convert it >>>>> >> > manually to unsigned short after this. So what is the proper way >>>>> >> > of >>>>> >> > reading >>>>> >> > it? Do I need to create templated methods for every pixeltype with >>>>> >> > conversions to unsigned short? >>>>> >> > >>>>> >> > Best regards, >>>>> >> > Marian >>>>> >> > >>>>> >> > _______________________________________________ >>>>> >> > 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 >>> > From matt.mccormick at kitware.com Thu Aug 14 15:05:52 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 14 Aug 2014 15:05:52 -0400 Subject: [ITK] HDF5 enhancements In-Reply-To: References: <20140808144827.12192.3457@otis.rocq.inria.fr> Message-ID: Hi David, Would you be available to discuss these patches more in a Google Hangout sometime next week? Thanks, Matt On Fri, Aug 8, 2014 at 5:36 PM, Matt McCormick wrote: > Hi David, > > Looks like some great work! Thanks for contributing! > > I'll review over the coming days. > > Thanks, > Matt > > On Fri, Aug 8, 2014 at 10:48 AM, David Froger > wrote: >> Dear all, >> >> I just push this to Gerrit (ITK): >> >> http://review.source.kitware.com/16576 >> http://review.source.kitware.com/16577 >> http://review.source.kitware.com/16578 >> http://review.source.kitware.com/16579 >> >> to fix the test of HDF5 write streaming, and add pasting support for HDF5. >> >> and this (ITKExamples): >> >> http://review.source.kitware.com/16580 >> >> to add examples about streamnig and pasting HDF5 files. >> >> The commits are not perfect, but I would be happy to discuss its content and >> to have feedback. >> >> Especially: >> - I introduce a 'ChangeRegionImageFilter', that may be replaced by something >> already existing, but I didn't find what. (Furthermore, the implementation is >> not optimal, it make a useless copy). >> - For the ITKExamples, I didn't find how to build the html documentations from >> the rst files, so I didn't test it. >> - For the ITKExamples, I didn't succced yet to upload the input binary files. >> - For the ITKExamples, the last example may not work yet. >> >> Best, >> David >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community From HIROTATSU.ARMSTRONG at UCDENVER.EDU Thu Aug 14 17:14:59 2014 From: HIROTATSU.ARMSTRONG at UCDENVER.EDU (Armstrong, Hirotatsu) Date: Thu, 14 Aug 2014 21:14:59 +0000 Subject: [ITK] Deformable Registration Field Definition Message-ID: <0f470a9977db47e6a60f1bccc69be9a1@CO1PR05MB411.namprd05.prod.outlook.com> Hello, I was wondering if it would be possible to get information of exactly how the deformable registration field is defined, specifically for the daemons filter. Assuming we have a fixed CT and a moving CT of the same number of pixels in each dimension, the deformable field could be defined as 'To deformation field' For each voxel in moving CT, the vectors point to the location this voxel should be mapped in the fixed CT Or 'From deformation field' For each voxel in fixed CT, the vector points to the location in the moving CT from which we should grab and place here In addition, each of these could be defined as either +/- depending on how you define the starting location of the pixel shifts. I am generating these deformation fields and saving them as VTK files, then applying them in my own implementation. I have switched definitions and tried multiple ways to apply the deformation field, and no single method produces a result that is obviously correct or obviously wrong. Any information on how the deformation field is actually defined would be appreciated. Thanks James Armstrong, Ph.D. PostDoctoral Fellow, Physics Department of Radiation Oncology University of Colorado School of Medicine 1665 Aurora Ct, MS F706 Aurora, CO 80045 720-848-0257 -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Aug 14 17:27:58 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 14 Aug 2014 17:27:58 -0400 Subject: [ITK] Deformable Registration Field Definition In-Reply-To: <0f470a9977db47e6a60f1bccc69be9a1@CO1PR05MB411.namprd05.prod.outlook.com> References: <0f470a9977db47e6a60f1bccc69be9a1@CO1PR05MB411.namprd05.prod.outlook.com> Message-ID: Hi James, The ITK transforms map from the fixed to moving. Also, it helps to conceptually to also use the more precise term "displacement" instead of "deformation", so ?From displacement field? For each voxel in fixed CT, the vector points to the location in the moving CT from which we should grab and place here HTH, Matt On Thu, Aug 14, 2014 at 5:14 PM, Armstrong, Hirotatsu wrote: > Hello, > > > > I was wondering if it would be possible to get information of exactly how > the deformable registration field is defined, specifically for the daemons > filter. Assuming we have a fixed CT and a moving CT of the same number of > pixels in each dimension, the deformable field could be defined as > > > > ?To deformation field? > > For each voxel in moving CT, the vectors point to the location this voxel > should be mapped in the fixed CT > > > > Or > > > > ?From deformation field? > > For each voxel in fixed CT, the vector points to the location in the moving > CT from which we should grab and place here > > > > In addition, each of these could be defined as either +/- depending on how > you define the starting location of the pixel shifts. I am generating these > deformation fields and saving them as VTK files, then applying them in my > own implementation. I have switched definitions and tried multiple ways to > apply the deformation field, and no single method produces a result that is > obviously correct or obviously wrong. Any information on how the > deformation field is actually defined would be appreciated. Thanks > > > > > > James Armstrong, Ph.D. > > PostDoctoral Fellow, Physics > > Department of Radiation Oncology > > University of Colorado School of Medicine > > 1665 Aurora Ct, MS F706 > > Aurora, CO 80045 > > 720-848-0257 > > > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From matt.mccormick at kitware.com Fri Aug 15 01:25:52 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 15 Aug 2014 01:25:52 -0400 Subject: [ITK] ITK Development Meeting In-Reply-To: <5CB49492-605B-434E-BE5D-7F1B33F289CA@gmail.com> References: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> <913EF9B6-84A0-4BD3-A154-EBCFD92685E5@gmail.com> <5CB49492-605B-434E-BE5D-7F1B33F289CA@gmail.com> Message-ID: Follow-up: Following feedback from last week, I have scheduled a Hangout for 11 AM Eastern Time (GMT-4) for today, Friday 2014-08-15. Here is the link: https://plus.google.com/u/1/events/cioior9b5k16e3uaqsjsa1km2t0?authkey=COiD36DYzNGxMg For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423? On Thu, Aug 7, 2014 at 3:50 PM, Michka Popoff wrote: > Perfect, 3 PM for me :) > > Thanks > > On 7 ao?t 2014, at 21:19, Matt McCormick wrote: > >> OK, let's do 9 AM Eastern Time Zone (GMT-4). :-) >> >> I created an Event here [1]. >> >> If you are subscribed to the ITK Bar Camp Community [2], you should >> already have received an invitation. >> >> Thanks, >> Matt >> >> [1] https://plus.google.com/events/cauvj61hvr7kirg5g5vjsupt4pg >> >> [2] https://plus.google.com/communities/111375098792764998322 >> >> On Thu, Aug 7, 2014 at 2:43 PM, Michka Popoff wrote: >>> +1 >>> >>> 9 AM, what timezone ? ;D >>> >>> On 7 ao?t 2014, at 20:24, Bill Lorensen wrote: >>> >>>> +1 >>>> >>>> >>>> On Thu, Aug 7, 2014 at 2:23 PM, Bradley Lowekamp wrote: >>>>> Hello, >>>>> >>>>> I am in favor of using Google Hangout as it appears to be more accessible to people and more seem to be able to join. >>>>> >>>>> Brad >>>>> >>>>> On Aug 7, 2014, at 2:20 PM, Matt McCormick wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> Are we having the development meeting teleconference tomorrow? If >>>>>> not, would folks like to do a Google Hangout at 9 AM? >>>>>> >>>>>> On a positive side note, Google Hangout's no longer require a Google >>>>>> Plus account [1], and it no longer requires plugins with Chrome/ium >>>>>> [2]. >>>>>> >>>>>> I am happy to see the Goog-Monster moving towards greater openness and >>>>>> liberty. Maybe the internal forces for good are becoming stronger >>>>>> :-). >>>>>> >>>>>> Thanks, >>>>>> Matt >>>>>> >>>>>> [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ >>>>>> >>>>>> [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ >>>>> >>>>> _______________________________________________ >>>>> Community mailing list >>>>> Community at itk.org >>>>> http://public.kitware.com/mailman/listinfo/community >>>> >>>> >>>> >>>> -- >>>> Unpaid intern in BillsBasement at noware dot com >>>> _______________________________________________ >>>> 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 > From david.froger.ml at mailoo.org Fri Aug 15 02:41:27 2014 From: david.froger.ml at mailoo.org (David Froger) Date: Fri, 15 Aug 2014 08:41:27 +0200 Subject: [ITK] HDF5 enhancements In-Reply-To: References: <20140808144827.12192.3457@otis.rocq.inria.fr> Message-ID: <20140815064127.31406.74510@otis.rocq.inria.fr> Hi Matt, I would be very pleased, unfortunately from Thursday, August 19 to Thursday, August 26 I will be on a trip and without Internet connection most of the time. I'm available the rest of the year! Thanks, David Quoting Matt McCormick (2014-08-14 21:05:52) > Hi David, > > Would you be available to discuss these patches more in a Google > Hangout sometime next week? > > Thanks, > Matt > > On Fri, Aug 8, 2014 at 5:36 PM, Matt McCormick > wrote: > > Hi David, > > > > Looks like some great work! Thanks for contributing! > > > > I'll review over the coming days. > > > > Thanks, > > Matt > > > > On Fri, Aug 8, 2014 at 10:48 AM, David Froger > > wrote: > >> Dear all, > >> > >> I just push this to Gerrit (ITK): > >> > >> http://review.source.kitware.com/16576 > >> http://review.source.kitware.com/16577 > >> http://review.source.kitware.com/16578 > >> http://review.source.kitware.com/16579 > >> > >> to fix the test of HDF5 write streaming, and add pasting support for HDF5. > >> > >> and this (ITKExamples): > >> > >> http://review.source.kitware.com/16580 > >> > >> to add examples about streamnig and pasting HDF5 files. > >> > >> The commits are not perfect, but I would be happy to discuss its content and > >> to have feedback. > >> > >> Especially: > >> - I introduce a 'ChangeRegionImageFilter', that may be replaced by something > >> already existing, but I didn't find what. (Furthermore, the implementation is > >> not optimal, it make a useless copy). > >> - For the ITKExamples, I didn't find how to build the html documentations from > >> the rst files, so I didn't test it. > >> - For the ITKExamples, I didn't succced yet to upload the input binary files. > >> - For the ITKExamples, the last example may not work yet. > >> > >> Best, > >> David > >> > >> _______________________________________________ > >> Community mailing list > >> Community at itk.org > >> http://public.kitware.com/mailman/listinfo/community From nekto1989 at gmail.com Fri Aug 15 04:53:41 2014 From: nekto1989 at gmail.com (=?UTF-8?B?0JzQsNGAJ9GP0L0g0JrQu9C40LzQvtCy?=) Date: Fri, 15 Aug 2014 11:53:41 +0300 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Hi, I don't mind. After changes that Ivan Kubarev proposed this image is being read to unsigned short properly for me. Problem may be the same for 64-bit TIFF. Marian 2014-08-14 17:18 GMT+03:00 Matt McCormick : > Thanks for the nice example! > > > I have been able to reproduce the output. If it is a bug, can the > given image be added to the repository as part of a unit test? > > Thanks, > Matt > > On Thu, Aug 14, 2014 at 9:51 AM, ???'?? ?????? > wrote: > > Image Watch during debugging in Visual Studio. > > Windows Photo Viewer after results dumped to disk. > > > > > > 2014-08-14 15:35 GMT+03:00 Bill Lorensen : > > > >> How are you displaying the unsigned short image? Many viewers cannot > >> properly display unsigned short. > >> > >> On Aug 14, 2014 7:23 AM, "???'?? ??????" wrote: > >>> > >>> Hi, > >>> > >>> I've tried different methods. Reading to RGBPixel, then > >>> using RGBToLuminanceImageFilter and MultiplyImageFilter (2 ^ 8) > produces the > >>> same visually proper image. Reading directly to > fails. > >>> Looks like this is bug in TIFFImageIO and not in the way it is being > called. > >>> http://itk-users.7.n7.nabble.com/TiffIO-strange-behaviour-td32215.html > >>> > >>> Marian > >>> > >>> > >>> 2014-08-13 23:55 GMT+03:00 ???'?? ?????? : > >>>> > >>>> Hi Matt, > >>>> > >>>> I hope this is proper cmakelists.txt. I'm used to using ITK connected > >>>> through *.props into Visual Studio solution. > >>>> > >>>> Best regards, > >>>> Marian > >>>> > >>>> > >>>> > >>>> 2014-08-13 22:52 GMT+03:00 Matt McCormick >: > >>>> > >>>>> Hi Marian, > >>>>> > >>>>> Thanks for the update. Offhand, I am not seeing the issue. > >>>>> > >>>>> Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and > >>>>> the input data? > >>>>> > >>>>> Thanks, > >>>>> Matt > >>>>> > >>>>> [1] http://sscce.org/ > >>>>> > >>>>> On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? > >>>>> wrote: > >>>>> > { > >>>>> > typedef unsigned short PixelType; > >>>>> > typedef itk::Image ImageType; > >>>>> > auto reader = itk::ImageFileReader< > >>>>> > ImageType>::New(); > >>>>> > reader->SetFileName("D:/TestData/input/input.tif"); > >>>>> > reader->SetImageIO(itk::TIFFImageIO::New()); > >>>>> > > >>>>> > typedef unsigned short OutputPixelType; > >>>>> > typedef itk::Image OutputImageType; > >>>>> > > >>>>> > auto writer = itk::ImageFileWriter::New(); > >>>>> > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); > >>>>> > auto image_io = itk::TIFFImageIO::New(); > >>>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> > writer->SetImageIO(image_io); > >>>>> > writer->SetInput(reader->GetOutput()); > >>>>> > writer->Update(); //produces completely black > >>>>> > } > >>>>> > > >>>>> > { > >>>>> > typedef itk::RGBAPixel PixelType; > >>>>> > typedef itk::Image ImageType; > >>>>> > auto reader = itk::ImageFileReader::New(); > >>>>> > reader->SetFileName("D:/TestData/input/input.tif"); > >>>>> > reader->SetImageIO(itk::TIFFImageIO::New()); > >>>>> > reader->Update(); > >>>>> > > >>>>> > typedef unsigned short OutputPixelType; > >>>>> > typedef itk::Image OutputImageType; > >>>>> > > >>>>> > auto input_image = reader->GetOutput(); > >>>>> > auto output_image = OutputImageType::New(); > >>>>> > output_image->CopyInformation(input_image); > >>>>> > > >>>>> > output_image->SetRegions(input_image->GetLargestPossibleRegion()); > >>>>> > output_image->Allocate(); > >>>>> > itk::ImageRegionConstIterator > >>>>> > const_iterator(input_image, > >>>>> > input_image->GetLargestPossibleRegion()); > >>>>> > itk::ImageRegionIterator > >>>>> > rescaled_iterator(output_image, > >>>>> > output_image->GetLargestPossibleRegion()); > >>>>> > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); > >>>>> > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) > >>>>> > { > >>>>> > const PixelType& pixel = const_iterator.Get(); > >>>>> > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + > pixel.GetRed()) > >>>>> > * 16 + > >>>>> > pixel.GetGreen()) * 16 + pixel.GetBlue()); > >>>>> > } > >>>>> > > >>>>> > auto writer = itk::ImageFileWriter::New(); > >>>>> > > >>>>> > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); > >>>>> > auto image_io = itk::TIFFImageIO::New(); > >>>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> > writer->SetImageIO(image_io); > >>>>> > writer->SetInput(output_image); > >>>>> > writer->Update(); //output looks the same > >>>>> > } > >>>>> > > >>>>> > > >>>>> > 2014-08-13 20:50 GMT+03:00 Matt McCormick > >>>>> > : > >>>>> >> > >>>>> >> Hi Marian, > >>>>> >> > >>>>> >> > >>>>> >> If > >>>>> >> > >>>>> >> itk::Image< unsigned short, 2 > > >>>>> >> > >>>>> >> is used for the ImageType, does it work (note the dimension > >>>>> >> specification). > >>>>> >> > >>>>> >> HTH, > >>>>> >> Matt > >>>>> >> > >>>>> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? < > nekto1989 at gmail.com> > >>>>> >> wrote: > >>>>> >> > Hi, > >>>>> >> > > >>>>> >> > How to properly read 32-bit TIFF? I need to get > >>>>> >> > itk::Image >>>>> >> > short> > >>>>> >> > on output. If I use it as ImageType for ImageFileReader, it is > >>>>> >> > read as > >>>>> >> > fully > >>>>> >> > black (checked contrast with Image Watch and it is for sure > >>>>> >> > completely > >>>>> >> > empty). If I read it with pixel type RGBPixel or > >>>>> >> > RGBAPixel, it is read properly. But I need to > >>>>> >> > convert it > >>>>> >> > manually to unsigned short after this. So what is the proper way > >>>>> >> > of > >>>>> >> > reading > >>>>> >> > it? Do I need to create templated methods for every pixeltype > with > >>>>> >> > conversions to unsigned short? > >>>>> >> > > >>>>> >> > Best regards, > >>>>> >> > Marian > >>>>> >> > > >>>>> >> > _______________________________________________ > >>>>> >> > 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 > >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Fri Aug 15 08:44:40 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Fri, 15 Aug 2014 14:44:40 +0200 Subject: [ITK] [ITK-users] [Insight-users] enhancing plate like structures (by modifying itkHessianSmoothed3DToVesselnessMeasureImageFilter) In-Reply-To: <22EC75E8215562428ACADFA35877A25A02F9FE@JANEWAY.ts.odu.edu> References: <22EC75E8215562428ACADFA35877A25A02F9FE@JANEWAY.ts.odu.edu> Message-ID: <53EE00B8.3030605@mh-hannover.de> Dear Michel, dear Luca, Coming back to Hessian-based measures of Yours, which I've tried out two years ago: Is my understanding correct that the response function V of [Desc?teaux et. al.MICCAI 2006] and [Luca ITK-Journal 2007] differ for N=3 and M=2? i.e. for N=3, M=2: Rblob = vnl_math_abs( l3 + l3 - l2 - l1 ) / l3 in itkDescoteauxSheetnessImageFilter corresponding to Ra (NOT Rb) in itkHessianToObjectnessMeasureImageFilter, which is undefined for N=3, M=2. Rsheet = l2 / l3 in itkDescoteauxSheetnessImageFilter corresponds to Rb in itkHessianToObjectnessMeasureImageFilter, both equal for N=3, M=2. When has each definition its optimal use? Additionally, In Desc?teaux2006 a zero level-set segmentation approach is described based on a vector field constructed from initial ellipsoids positioned at high sheetness measures. Are there ITK-Filters to achieve that same approach or something similar? Which would I need? Many thanks again for Your replies and help. Roman On 05/09/12 17:10, Audette, Michel A. wrote: > Do a google on sheetness. Maxime Desc?teaux and I had modified this type of > operator a few years back to improve the detection of curviplanar bones (MICCAI > paper, republished in J. Computer Assisted Surgery), which was a tweak of his > and Frangi's work on vesselness operators. > > Michel > > Michel Audette, Ph.D. > Assistant Professor, > Department of Modeling, Simulation and Visualization Engineering, > Old Dominion University, > Norfolk, VA. > ________________________________________ > From: insight-users-bounces at itk.org [insight-users-bounces at itk.org] on behalf of > Ho Cheung [hocheung20 at gmail.com] > Sent: Wednesday, September 05, 2012 8:41 AM > To: Dr. Roman Grothausmann > Cc: insight-users at itk.org; vmtk-users at lists.sourceforge.net; Luca Antiga > Subject: Re: [Insight-users] enhancing plate like structures (by modifying > itkHessianSmoothed3DToVesselnessMeasureImageFilter) > > Hi Dr. Grothausmann, > > The measure in ITK appears to be based on Sato > (http://www.spl.harvard.edu/archive/spl-pre2007/pages/papers/yoshi/node3.html#SECTION00021000000000000000) > and I don't see an easy way to modify it so that it detects plate like > structures instead of line like structures. > > If speed is not a major concern for you, may I suggest you implement a similar > measure? Frangi's original vesselness enhancement formula > (http://www.dtic.upf.edu/~afrangi/articles/miccai1998.pdf) can be easily > modified for what you need and is based on Eigenvalues like Sato. > > According to equations 10, 11, 12, 13 in Frangi's paper and my interpretation of > what the measures do, what you need is high Ra, Rb, and S values, so the formula > becomes: > > V = [1 - exp(-Ra^2/2a^2)][1 - exp(-Rb^2/2b^2)][1 - exp(-S^2/2c62)] > > Hope, this helps, > > Ho Cheung > Research Assistant > Bio-Image Analytics Laboratory - University of Houston > (832) 215-6347 > > > > On Sep 5, 2012, at 3:36 AM, Dr. Roman Grothausmann > wrote: > > > Dear mailing list members, dear Luca, > > > > > > Recently I was trying to enhance vascular structures from airways with the > vessel enhancement filters from ITK (objectness and vessel enhancement). The > problem is that these vessels are not filled in the tomograms our imaging > technique yields. Only the airway walls are imaged, which corresponds to an > uneven 2D surface. Since it is only a 3D not an ND problem, I tried to modify > itkHessianSmoothed3DToVesselnessMeasureImageFilter to enhance not vessels (1D) > structures but plates/walls. Therefore I exchanged lambda 1 and 3 in the > weighting function. Sadly, I could not get the filter to enhance the airway walls. > > Have I missed anything or would enhancing plateness this way only work for > not-curved planes? > > > > > > Here the important part of the diff of my changes: > > > > diff -au > itk/IJ-Vessel_Enhancement_Diffusion.1/itkHessianSmoothed3DToVesselnessMeasureImageFilter.txx > itk/plateness3D_01/itkHessianSmoothed3DToPlatenessMeasureImageFilter.txx > > > > > > > > + ////swap Lambda1 and Lambda3 to enhance "plateness" > > + double swap_tmp= Lambda1; > > + Lambda3= Lambda1; > > + Lambda1= swap_tmp; > > + ///swapping done > > + > > double Lambda1Abs = vnl_math_abs( Lambda1 ); > > double Lambda2Abs = vnl_math_abs( Lambda2 ); > > double Lambda3Abs = vnl_math_abs( Lambda3 ); > > @@ -162,14 +168,13 @@ > > double vesMeasure_3 = > > ( 1 - vcl_exp( -1.0 * (( vnl_math_sqr( S )) / ( 2.0 * ( GammaSqr))))); > > > > - double vesMeasure_4 = > > - vcl_exp ( -1.0 * ( 2.0 * vnl_math_sqr( m_C )) / > > - ( Lambda2Abs * (Lambda3Sqr))); > > + double vesMeasure_4 = 1; ////plateness for now not smoothed > > + //double vesMeasure_4 = vcl_exp ( -1.0 * ( 2.0 * vnl_math_sqr( m_C )) > / ( Lambda2Abs * (Lambda3Sqr))); ////check if this makes sense for plateness > > > > > > Many thanks for any help or hints. > > 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 > > 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://www.itk.org/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://www.itk.org/mailman/listinfo/insight-users > > > -- > BEGIN-ANTISPAM-VOTING-LINKS > ------------------------------------------------------ > > Teach CanIt if this mail (ID 699566122) is spam: > Spam: https://www.spamtrap.odu.edu/b.php?i=699566122&m=6758d860fb26&t=20120905&c=s > Not spam: > https://www.spamtrap.odu.edu/b.php?i=699566122&m=6758d860fb26&t=20120905&c=n > Forget vote: > https://www.spamtrap.odu.edu/b.php?i=699566122&m=6758d860fb26&t=20120905&c=f > ------------------------------------------------------ > END-ANTISPAM-VOTING-LINKS > -- 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 matt.mccormick at kitware.com Fri Aug 15 09:31:45 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 15 Aug 2014 09:31:45 -0400 Subject: [ITK] HDF5 enhancements In-Reply-To: <20140815064127.31406.74510@otis.rocq.inria.fr> References: <20140808144827.12192.3457@otis.rocq.inria.fr> <20140815064127.31406.74510@otis.rocq.inria.fr> Message-ID: Hi David, That is fine -- have a great trip! Does sometime the first week of September work? Thanks, Matt On Fri, Aug 15, 2014 at 2:41 AM, David Froger wrote: > Hi Matt, > > I would be very pleased, unfortunately from Thursday, August 19 to Thursday, > August 26 I will be on a trip and without Internet connection most of the > time. I'm available the rest of the year! > > Thanks, > David > > Quoting Matt McCormick (2014-08-14 21:05:52) >> Hi David, >> >> Would you be available to discuss these patches more in a Google >> Hangout sometime next week? >> >> Thanks, >> Matt >> >> On Fri, Aug 8, 2014 at 5:36 PM, Matt McCormick >> wrote: >> > Hi David, >> > >> > Looks like some great work! Thanks for contributing! >> > >> > I'll review over the coming days. >> > >> > Thanks, >> > Matt >> > >> > On Fri, Aug 8, 2014 at 10:48 AM, David Froger >> > wrote: >> >> Dear all, >> >> >> >> I just push this to Gerrit (ITK): >> >> >> >> http://review.source.kitware.com/16576 >> >> http://review.source.kitware.com/16577 >> >> http://review.source.kitware.com/16578 >> >> http://review.source.kitware.com/16579 >> >> >> >> to fix the test of HDF5 write streaming, and add pasting support for HDF5. >> >> >> >> and this (ITKExamples): >> >> >> >> http://review.source.kitware.com/16580 >> >> >> >> to add examples about streamnig and pasting HDF5 files. >> >> >> >> The commits are not perfect, but I would be happy to discuss its content and >> >> to have feedback. >> >> >> >> Especially: >> >> - I introduce a 'ChangeRegionImageFilter', that may be replaced by something >> >> already existing, but I didn't find what. (Furthermore, the implementation is >> >> not optimal, it make a useless copy). >> >> - For the ITKExamples, I didn't find how to build the html documentations from >> >> the rst files, so I didn't test it. >> >> - For the ITKExamples, I didn't succced yet to upload the input binary files. >> >> - For the ITKExamples, the last example may not work yet. >> >> >> >> Best, >> >> David >> >> >> >> _______________________________________________ >> >> Community mailing list >> >> Community at itk.org >> >> http://public.kitware.com/mailman/listinfo/community From david.froger.ml at mailoo.org Fri Aug 15 13:11:13 2014 From: david.froger.ml at mailoo.org (David Froger) Date: Fri, 15 Aug 2014 19:11:13 +0200 Subject: [ITK] HDF5 enhancements In-Reply-To: References: <20140808144827.12192.3457@otis.rocq.inria.fr> <20140815064127.31406.74510@otis.rocq.inria.fr> Message-ID: <20140815171113.8127.83369@otis.rocq.inria.fr> Hi Matt, The first week of September is perfect. Thanks, David Quoting Matt McCormick (2014-08-15 15:31:45) > Hi David, > > That is fine -- have a great trip! > > Does sometime the first week of September work? > > Thanks, > Matt > > On Fri, Aug 15, 2014 at 2:41 AM, David Froger > wrote: > > Hi Matt, > > > > I would be very pleased, unfortunately from Thursday, August 19 to Thursday, > > August 26 I will be on a trip and without Internet connection most of the > > time. I'm available the rest of the year! > > > > Thanks, > > David > > > > Quoting Matt McCormick (2014-08-14 21:05:52) > >> Hi David, > >> > >> Would you be available to discuss these patches more in a Google > >> Hangout sometime next week? > >> > >> Thanks, > >> Matt > >> > >> On Fri, Aug 8, 2014 at 5:36 PM, Matt McCormick > >> wrote: > >> > Hi David, > >> > > >> > Looks like some great work! Thanks for contributing! > >> > > >> > I'll review over the coming days. > >> > > >> > Thanks, > >> > Matt > >> > > >> > On Fri, Aug 8, 2014 at 10:48 AM, David Froger > >> > wrote: > >> >> Dear all, > >> >> > >> >> I just push this to Gerrit (ITK): > >> >> > >> >> http://review.source.kitware.com/16576 > >> >> http://review.source.kitware.com/16577 > >> >> http://review.source.kitware.com/16578 > >> >> http://review.source.kitware.com/16579 > >> >> > >> >> to fix the test of HDF5 write streaming, and add pasting support for HDF5. > >> >> > >> >> and this (ITKExamples): > >> >> > >> >> http://review.source.kitware.com/16580 > >> >> > >> >> to add examples about streamnig and pasting HDF5 files. > >> >> > >> >> The commits are not perfect, but I would be happy to discuss its content and > >> >> to have feedback. > >> >> > >> >> Especially: > >> >> - I introduce a 'ChangeRegionImageFilter', that may be replaced by something > >> >> already existing, but I didn't find what. (Furthermore, the implementation is > >> >> not optimal, it make a useless copy). > >> >> - For the ITKExamples, I didn't find how to build the html documentations from > >> >> the rst files, so I didn't test it. > >> >> - For the ITKExamples, I didn't succced yet to upload the input binary files. > >> >> - For the ITKExamples, the last example may not work yet. > >> >> > >> >> Best, > >> >> David > >> >> > >> >> _______________________________________________ > >> >> Community mailing list > >> >> Community at itk.org > >> >> http://public.kitware.com/mailman/listinfo/community From bill.lorensen at gmail.com Fri Aug 15 14:59:42 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 15 Aug 2014 14:59:42 -0400 Subject: [ITK] [ITK-dev] The patch you merged does not work Message-ID: Matt, That patch does not work. http://review.source.kitware.com/#/c/16697/ I merged the original patch as a temporary fix. Now I'm not sure what state we are in... Bill _______________________________________________ Powered by www.kitware.com 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 Aug 15 15:08:39 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 15 Aug 2014 15:08:39 -0400 Subject: [ITK] [ITK-dev] The patch you merged does not work In-Reply-To: References: Message-ID: Ooops. Sorry. I think we are OK. Too many pathes/topics... We'll see tomorrow. Bill On Fri, Aug 15, 2014 at 2:59 PM, Bill Lorensen wrote: > Matt, > > That patch does not work. http://review.source.kitware.com/#/c/16697/ > > I merged the original patch as a temporary fix. Now I'm not sure what > state we are in... > > Bill -- 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 matt.mccormick at kitware.com Fri Aug 15 18:53:42 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 15 Aug 2014 18:53:42 -0400 Subject: [ITK] [ITK-dev] The patch you merged does not work In-Reply-To: References: Message-ID: Looking a bit closer at how the merge occurred, I think it will still need more work. :-( Here is another patch: http://review.source.kitware.com/#/c/16703 Thanks, Matt On Fri, Aug 15, 2014 at 3:08 PM, Bill Lorensen wrote: > Ooops. Sorry. I think we are OK. Too many pathes/topics... We'll see tomorrow. > > Bill > > > On Fri, Aug 15, 2014 at 2:59 PM, Bill Lorensen wrote: >> Matt, >> >> That patch does not work. http://review.source.kitware.com/#/c/16697/ >> >> I merged the original patch as a temporary fix. Now I'm not sure what >> state we are in... >> >> Bill > > > > -- > 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 bill.lorensen at gmail.com Fri Aug 15 19:17:33 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 15 Aug 2014 19:17:33 -0400 Subject: [ITK] [ITK-dev] The patch you merged does not work In-Reply-To: References: Message-ID: master seems to be ok now? On Fri, Aug 15, 2014 at 6:53 PM, Matt McCormick wrote: > Looking a bit closer at how the merge occurred, I think it will still > need more work. :-( > > Here is another patch: > > http://review.source.kitware.com/#/c/16703 > > Thanks, > Matt > > On Fri, Aug 15, 2014 at 3:08 PM, Bill Lorensen wrote: >> Ooops. Sorry. I think we are OK. Too many pathes/topics... We'll see tomorrow. >> >> Bill >> >> >> On Fri, Aug 15, 2014 at 2:59 PM, Bill Lorensen wrote: >>> Matt, >>> >>> That patch does not work. http://review.source.kitware.com/#/c/16697/ >>> >>> I merged the original patch as a temporary fix. Now I'm not sure what >>> state we are in... >>> >>> Bill >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com -- 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 mtaquet at gmail.com Sat Aug 16 10:18:38 2014 From: mtaquet at gmail.com (Maxime Taquet) Date: Sat, 16 Aug 2014 16:18:38 +0200 Subject: [ITK] Create an itk transform file from a vector image Message-ID: <09BF8708-9EAE-4057-865F-5AE12D74CB7F@gmail.com> Hi all, I am trying to create an itk transform file (tfm file) representing a dense deformation field that itkTransformFileReader can open from a vector image (stored as a nrrd file) that contains the deformation field and the geometry of the image. Would you know how to do this? Thank you, Maxime From matt.mccormick at kitware.com Sat Aug 16 12:56:42 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 16 Aug 2014 12:56:42 -0400 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Hi Marian, Sounds great. I added the file to the regression test suite. Please review [1] this patch [2]. Thanks, Matt [1] http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html#perform-a-gerrit-review [2] http://review.source.kitware.com/#/c/16705/ On Fri, Aug 15, 2014 at 4:53 AM, ???'?? ?????? wrote: > Hi, > > I don't mind. After changes that Ivan Kubarev proposed this image is being > read to unsigned short properly for me. Problem may be the same for 64-bit > TIFF. > > Marian > > > 2014-08-14 17:18 GMT+03:00 Matt McCormick : > >> Thanks for the nice example! >> >> >> I have been able to reproduce the output. If it is a bug, can the >> given image be added to the repository as part of a unit test? >> >> Thanks, >> Matt >> >> On Thu, Aug 14, 2014 at 9:51 AM, ???'?? ?????? >> wrote: >> > Image Watch during debugging in Visual Studio. >> > Windows Photo Viewer after results dumped to disk. >> > >> > >> > 2014-08-14 15:35 GMT+03:00 Bill Lorensen : >> > >> >> How are you displaying the unsigned short image? Many viewers cannot >> >> properly display unsigned short. >> >> >> >> On Aug 14, 2014 7:23 AM, "???'?? ??????" wrote: >> >>> >> >>> Hi, >> >>> >> >>> I've tried different methods. Reading to RGBPixel, then >> >>> using RGBToLuminanceImageFilter and MultiplyImageFilter (2 ^ 8) >> >>> produces the >> >>> same visually proper image. Reading directly to >> >>> fails. >> >>> Looks like this is bug in TIFFImageIO and not in the way it is being >> >>> called. >> >>> http://itk-users.7.n7.nabble.com/TiffIO-strange-behaviour-td32215.html >> >>> >> >>> Marian >> >>> >> >>> >> >>> 2014-08-13 23:55 GMT+03:00 ???'?? ?????? : >> >>>> >> >>>> Hi Matt, >> >>>> >> >>>> I hope this is proper cmakelists.txt. I'm used to using ITK connected >> >>>> through *.props into Visual Studio solution. >> >>>> >> >>>> Best regards, >> >>>> Marian >> >>>> >> >>>> >> >>>> >> >>>> 2014-08-13 22:52 GMT+03:00 Matt McCormick >> >>>> : >> >>>> >> >>>>> Hi Marian, >> >>>>> >> >>>>> Thanks for the update. Offhand, I am not seeing the issue. >> >>>>> >> >>>>> Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, >> >>>>> and >> >>>>> the input data? >> >>>>> >> >>>>> Thanks, >> >>>>> Matt >> >>>>> >> >>>>> [1] http://sscce.org/ >> >>>>> >> >>>>> On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? >> >>>>> wrote: >> >>>>> > { >> >>>>> > typedef unsigned short PixelType; >> >>>>> > typedef itk::Image ImageType; >> >>>>> > auto reader = itk::ImageFileReader< >> >>>>> > ImageType>::New(); >> >>>>> > reader->SetFileName("D:/TestData/input/input.tif"); >> >>>>> > reader->SetImageIO(itk::TIFFImageIO::New()); >> >>>>> > >> >>>>> > typedef unsigned short OutputPixelType; >> >>>>> > typedef itk::Image OutputImageType; >> >>>>> > >> >>>>> > auto writer = itk::ImageFileWriter::New(); >> >>>>> > >> >>>>> > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); >> >>>>> > auto image_io = itk::TIFFImageIO::New(); >> >>>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >> >>>>> > writer->SetImageIO(image_io); >> >>>>> > writer->SetInput(reader->GetOutput()); >> >>>>> > writer->Update(); //produces completely black >> >>>>> > } >> >>>>> > >> >>>>> > { >> >>>>> > typedef itk::RGBAPixel PixelType; >> >>>>> > typedef itk::Image ImageType; >> >>>>> > auto reader = itk::ImageFileReader::New(); >> >>>>> > reader->SetFileName("D:/TestData/input/input.tif"); >> >>>>> > reader->SetImageIO(itk::TIFFImageIO::New()); >> >>>>> > reader->Update(); >> >>>>> > >> >>>>> > typedef unsigned short OutputPixelType; >> >>>>> > typedef itk::Image OutputImageType; >> >>>>> > >> >>>>> > auto input_image = reader->GetOutput(); >> >>>>> > auto output_image = OutputImageType::New(); >> >>>>> > output_image->CopyInformation(input_image); >> >>>>> > >> >>>>> > output_image->SetRegions(input_image->GetLargestPossibleRegion()); >> >>>>> > output_image->Allocate(); >> >>>>> > itk::ImageRegionConstIterator >> >>>>> > const_iterator(input_image, >> >>>>> > input_image->GetLargestPossibleRegion()); >> >>>>> > itk::ImageRegionIterator >> >>>>> > rescaled_iterator(output_image, >> >>>>> > output_image->GetLargestPossibleRegion()); >> >>>>> > for (const_iterator.GoToBegin(), >> >>>>> > rescaled_iterator.GoToBegin(); >> >>>>> > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) >> >>>>> > { >> >>>>> > const PixelType& pixel = const_iterator.Get(); >> >>>>> > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + >> >>>>> > pixel.GetRed()) >> >>>>> > * 16 + >> >>>>> > pixel.GetGreen()) * 16 + pixel.GetBlue()); >> >>>>> > } >> >>>>> > >> >>>>> > auto writer = itk::ImageFileWriter::New(); >> >>>>> > >> >>>>> > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); >> >>>>> > auto image_io = itk::TIFFImageIO::New(); >> >>>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >> >>>>> > writer->SetImageIO(image_io); >> >>>>> > writer->SetInput(output_image); >> >>>>> > writer->Update(); //output looks the same >> >>>>> > } >> >>>>> > >> >>>>> > >> >>>>> > 2014-08-13 20:50 GMT+03:00 Matt McCormick >> >>>>> > : >> >>>>> >> >> >>>>> >> Hi Marian, >> >>>>> >> >> >>>>> >> >> >>>>> >> If >> >>>>> >> >> >>>>> >> itk::Image< unsigned short, 2 > >> >>>>> >> >> >>>>> >> is used for the ImageType, does it work (note the dimension >> >>>>> >> specification). >> >>>>> >> >> >>>>> >> HTH, >> >>>>> >> Matt >> >>>>> >> >> >>>>> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? >> >>>>> >> >> >>>>> >> wrote: >> >>>>> >> > Hi, >> >>>>> >> > >> >>>>> >> > How to properly read 32-bit TIFF? I need to get >> >>>>> >> > itk::Image> >>>>> >> > short> >> >>>>> >> > on output. If I use it as ImageType for ImageFileReader, it is >> >>>>> >> > read as >> >>>>> >> > fully >> >>>>> >> > black (checked contrast with Image Watch and it is for sure >> >>>>> >> > completely >> >>>>> >> > empty). If I read it with pixel type RGBPixel or >> >>>>> >> > RGBAPixel, it is read properly. But I need to >> >>>>> >> > convert it >> >>>>> >> > manually to unsigned short after this. So what is the proper >> >>>>> >> > way >> >>>>> >> > of >> >>>>> >> > reading >> >>>>> >> > it? Do I need to create templated methods for every pixeltype >> >>>>> >> > with >> >>>>> >> > conversions to unsigned short? >> >>>>> >> > >> >>>>> >> > Best regards, >> >>>>> >> > Marian >> >>>>> >> > >> >>>>> >> > _______________________________________________ >> >>>>> >> > 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 >> >>> >> > > > From matt.mccormick at kitware.com Sat Aug 16 14:17:49 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 16 Aug 2014 14:17:49 -0400 Subject: [ITK] Create an itk transform file from a vector image In-Reply-To: <09BF8708-9EAE-4057-865F-5AE12D74CB7F@gmail.com> References: <09BF8708-9EAE-4057-865F-5AE12D74CB7F@gmail.com> Message-ID: Hi Maxime, You can read in the vector image with an itk::ImageFileReader, then create a DisplacementFieldTransform out of it with SetDisplacementField [1]. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1DisplacementFieldTransform.html#ab0b5ac8b6792ed0acddbd0a6666b39d2 On Sat, Aug 16, 2014 at 10:18 AM, Maxime Taquet wrote: > Hi all, > > I am trying to create an itk transform file (tfm file) representing a dense deformation field that itkTransformFileReader can open from a vector image (stored as a nrrd file) that contains the deformation field and the geometry of the image. Would you know how to do this? > > Thank you, > Maxime > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From kris.f.thielemans at gmail.com Sun Aug 17 09:42:50 2014 From: kris.f.thielemans at gmail.com (Kris Thielemans) Date: Sun, 17 Aug 2014 14:42:50 +0100 Subject: [ITK] problem (and fix?) for Nifti IO with very large number of elements in file Message-ID: <01d201cfba21$2431bc00$6c953400$@gmail.com> Dear all My Nifti file is very large (448x512x176 x141). After a lot of pain, I discovered that it doesn't get read completely by the ITK Nifti IO image reader. The reason is that the number of elements is computed as an integer, which is 32bit on my system (Ubuntu 12.04, gcc 4.6.3). Below is an easy patch that seems to solve the problem. (It also fixes a compilation error in the file when __USE_VERY_VERBOSE_NIFTI_DEBUGGING__ is on, as then it refers to a nonexisting variable tobuffer, so I've just commented that line out). I'm afraid I don't have the resources to put in a bug report (in fact, I couldn't register as https://issues.itk.org/jira/secure/Signup.jspa seems to ask for a captcha, but I can't see any in my firefox window), nor for adding a test case etc, so I'm hoping somebody else will take this further. Please also reply to my email address as I might miss anything sent to the list. Kris Thielemans Senior Lecturer at University College London Institute for Nuclear Medicine, UCL Hospital diff --git a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx index 25d85d3..491bcd1 100644 --- a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx +++ b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx @@ -409,7 +409,7 @@ void RescaleFunction(TBuffer *buffer, double intercept, size_t size) { - for ( unsigned int i = 0; i < size; i++ ) + for ( size_t i = 0; i < size; i++ ) { double tmp = static_cast< double >( buffer[i] ) * slope; tmp += intercept; @@ -437,7 +437,7 @@ void NiftiImageIO::Read(void *buffer) ImageIORegion::SizeType size = regionToRead.GetSize(); ImageIORegion::IndexType start = regionToRead.GetIndex(); - int numElts = 1; + size_t numElts = 1; int _origin[7]; int _size[7]; unsigned int i; @@ -1933,7 +1933,7 @@ NiftiImageIO } delete[] vecOrder; dumpdata(buffer); - dumpdata(tobuffer); + //dumpdata(tobuffer); //Need a const cast here so that we don't have to copy the memory for //writing. this->m_NiftiImage->data = (void *)nifti_buf; From matt.mccormick at kitware.com Sun Aug 17 17:25:55 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 17 Aug 2014 17:25:55 -0400 Subject: [ITK] problem (and fix?) for Nifti IO with very large number of elements in file In-Reply-To: <01d201cfba21$2431bc00$6c953400$@gmail.com> References: <01d201cfba21$2431bc00$6c953400$@gmail.com> Message-ID: Hi Kris, Thank you for the report and patch. Please review [1] these patches [2] [3]. For future reference, it is not necessary to file a bug report to submit a patch. Essentially, ./Utilities/SetupForDevelopment.sh git gerrit-push will submit the patch. More details can be found here [4]. Thanks, Matt [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html [2] http://review.source.kitware.com/#/c/16729/ [3] http://review.source.kitware.com/#/c/16728/ [4] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html On Sun, Aug 17, 2014 at 9:42 AM, Kris Thielemans wrote: > Dear all > > My Nifti file is very large (448x512x176 x141). After a lot of pain, I > discovered that it doesn't get read completely by the ITK Nifti IO image > reader. The reason is that the number of elements is computed as an integer, > which is 32bit on my system (Ubuntu 12.04, gcc 4.6.3). Below is an easy > patch that seems to solve the problem. (It also fixes a compilation error in > the file when __USE_VERY_VERBOSE_NIFTI_DEBUGGING__ is on, as then it refers > to a nonexisting variable tobuffer, so I've just commented that line out). > > I'm afraid I don't have the resources to put in a bug report (in fact, I > couldn't register as https://issues.itk.org/jira/secure/Signup.jspa seems to > ask for a captcha, but I can't see any in my firefox window), nor for adding > a test case etc, so I'm hoping somebody else will take this further. > > Please also reply to my email address as I might miss anything sent to the > list. > > > Kris Thielemans > Senior Lecturer at University College London > Institute for Nuclear Medicine, UCL Hospital > > > > diff --git a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx > b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx > index 25d85d3..491bcd1 100644 > --- a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx > +++ b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx > @@ -409,7 +409,7 @@ void RescaleFunction(TBuffer *buffer, > double intercept, > size_t size) > { > - for ( unsigned int i = 0; i < size; i++ ) > + for ( size_t i = 0; i < size; i++ ) > { > double tmp = static_cast< double >( buffer[i] ) * slope; > tmp += intercept; > @@ -437,7 +437,7 @@ void NiftiImageIO::Read(void *buffer) > ImageIORegion::SizeType size = regionToRead.GetSize(); > ImageIORegion::IndexType start = regionToRead.GetIndex(); > > - int numElts = 1; > + size_t numElts = 1; > int _origin[7]; > int _size[7]; > unsigned int i; > @@ -1933,7 +1933,7 @@ NiftiImageIO > } > delete[] vecOrder; > dumpdata(buffer); > - dumpdata(tobuffer); > + //dumpdata(tobuffer); > //Need a const cast here so that we don't have to copy the memory for > //writing. > this->m_NiftiImage->data = (void *)nifti_buf; > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From constantine.zakkaroff at canterbury.ac.nz Sun Aug 17 22:52:23 2014 From: constantine.zakkaroff at canterbury.ac.nz (Kon Zakkaroff) Date: Mon, 18 Aug 2014 02:52:23 +0000 Subject: [ITK] Advice on Vessel/Bifurcation Quad Mesh Surface, Please? Message-ID: Hello ALL, I need to generate some good quality quad surface meshes for vessel bifurcations or segmented coronary arteries. In both cases the input can be replaced with centrelines with the associated radiuses for every point. Would anyone offer a perspective on how ITK can help with this? It seems the experience on quad surface mesh generation is quite sparse. Also I would appreciate any advice on any tools for generating quad surface meshes if there are any out there in the wild. Many thanks, Constantine This email may be confidential and subject to legal privilege, it may not reflect the views of the University of Canterbury, and it is not guaranteed to be virus free. If you are not an intended recipient, please notify the sender immediately and erase all copies of the message and any attachments. Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more information. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hms96 at scarletmail.rutgers.edu Mon Aug 18 10:01:22 2014 From: hms96 at scarletmail.rutgers.edu (Harsh Shah) Date: Mon, 18 Aug 2014 10:01:22 -0400 Subject: [ITK] [ITK-users] Question About Buffers Message-ID: Hello, I wanted to know if itk had any resources that would allow me to set the value of an itk::Image m_buffer to a buffer I read in from my camera. If you could point me in the direction of a good example, I would appreciate it. 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 grothausmann.roman at mh-hannover.de Mon Aug 18 10:03:25 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Mon, 18 Aug 2014 16:03:25 +0200 Subject: [ITK] [ITK-users] difference between trees constructed in itkWatershedImageFilter and itkComponentTree Message-ID: <53F207AD.3030503@mh-hannover.de> Dear mailing list members, Wherein lies the difference in the tree constructed in itkWatershedImageFilter and itkComponentTree contributed by Ga?tan Lehmann in http://www.insight-journal.org/browse/publication/210? In the article about the itkComponentTree (http://www.insight-journal.org/browse/publication/210) it says there is a contribution for the binary case in ITK. Which is it? ConnectedComponentImageFilter? Further in the text single template attribute are mentioned. Would these have to be computed separately with e.g. itkLabelImageToShapeLabelMapFilter? Thanks for any answers and explanations 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 mercikd at thomas.edu Mon Aug 18 10:05:49 2014 From: mercikd at thomas.edu (Dan Mercik) Date: Mon, 18 Aug 2014 14:05:49 +0000 Subject: [ITK] [ITK-users] TileImageFilter SideBySide In-Reply-To: References: , Message-ID: Good Morning, The demonstration you showed me works great, however if I wanted to do 20 images that would take some time. So, I tried doing a for loop which didn't work exactly how I wanted it to work. I would like the program to take any amount of images and output them side by side , any ideas? The attachment shows the for loop I used similar to TileImageFilter CreateVolume example however when I use it for some odd reason only one image is being display side by side multiple times. Daniel Mercik Computer Science Major Service Desk Technician Thomas College ________________________________ From: Michka Popoff Sent: Wednesday, August 13, 2014 2:32 AM To: Dan Mercik Cc: ITK Mailing List; community at itk.org Subject: Re: [ITK-users] TileImageFilter SideBySide Hi Moving this mail to the new community mailing list For your problem, you should use the setLayout method [1] For 4 images, that would be: itk::FixedArray< unsigned int, 2 > layout; layout[0] = 4; layout[1] = 0; Michka [1] http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_SideBySide On 13 ao?t 2014, at 01:06, Dan Mercik > wrote: Good Afternoon, I want to know if it's possible to have more than two image be side by side vertically? If so what would I have to change in the algorithm, would I have to make a loop for the amount of input images? Any help would be greatly appreciative. Daniel Mercik Computer Science Major Service Desk Technician Thomas College _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 embedded and charset-unspecified text was scrubbed... Name: TileImageFilter_SideBySide.cxx URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Tilesidebyside.JPG Type: image/jpeg Size: 59821 bytes Desc: Tilesidebyside.JPG 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 yves.frederix+itk at gmail.com Mon Aug 18 10:30:36 2014 From: yves.frederix+itk at gmail.com (Yves Frederix) Date: Mon, 18 Aug 2014 16:30:36 +0200 Subject: [ITK] [ITK-dev] Problem with itkPCAShapeSignedDistanceFunction in multithreaded environment when using a 'dense' solver Message-ID: Hi all, I am writing you with a crash I encountered while experimenting with the GeodesicActiveContour image filter with shape guidance. Although I did not find the root cause of the problem, I did implement a small change which might be a useful contribution. Currently, the GeodesicActiveContourShapePriorLevelSetImageFilter is based on a SparseField solver. For my application, this was not very suitable and I implemented a version of this image filter based on a dense solver. After doing this, however, I consistently experienced a crash in the algorithm when more than one thread was used. After some debugging, I tracked down the problem to itkPCAShapeSignedDistanceFunction, which contains a smart pointer member variable which caused the crash in the multithreaded run. In particular, it seemed to me that the reference counting somehow got confused, and things went wrong. I did not feel comfortable enough to dig deeper into the root cause of the problem, but I did do a simple fix to the itkPCAShapeSignedDistanceFunction code that avoids the problem, which I would like to share (see attach). Basically, I replaced the problematic reference counting member variable by a raw pointer, so that during iteration no reference counting takes place. In this particular case, I think that this change does not impose any risks as there is no issue with ownership or life time management. I am unsure if this mailing list is the best or correct medium to report this, so if not, please point me to the right direction. If somebody would be interested in looking at the root cause of this issue, I should be able to provide some code to reproduce the crash. Just let me know. Best regards, Yves -------------- next part -------------- A non-text attachment was scrubbed... Name: fix.patch Type: application/octet-stream Size: 2277 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 mtaquet at gmail.com Mon Aug 18 10:46:02 2014 From: mtaquet at gmail.com (Maxime Taquet) Date: Mon, 18 Aug 2014 16:46:02 +0200 Subject: [ITK] Create an itk transform file from a vector image In-Reply-To: References: <09BF8708-9EAE-4057-865F-5AE12D74CB7F@gmail.com> Message-ID: Thank you, Matt! For the record, here is the piece of code that solved my problem (it creates a transform named "transform" that contains the deformation field contained in ?myfield.nrrd"): // Read the input vector image typedef itk::Image::OutputVectorType, 3> FieldImageType; FieldImageType::Pointer fieldImage; itk::ImageFileReader::Pointer fieldReader = itk::ImageFileReader::New(); std::string myFieldFileName = "myfield.nrrd"; fieldReader->SetFileName(myFieldFileName); fieldReader->Update(); fieldImage = fieldReader->GetOutput(); // Define a transform from the field itk::DisplacementFieldTransform::Pointer transform = itk::DisplacementFieldTransform::New(); transform->SetDisplacementField(fieldImage.GetPointer()); -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Mon Aug 18 11:01:57 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Mon, 18 Aug 2014 17:01:57 +0200 Subject: [ITK] [ITK-users] TileImageFilter SideBySide In-Reply-To: References: , Message-ID: Hi Going the way described in the CreateVolume example is the way to go. Why did you uncomment the DisconnectPipeline() call and Update() call in the for loop ? They need to stay there, else you will always use the last image. That?s why you see the same image, the single update call will be triggered at the end of the script and read only one image. You don?t need to call tileFilter->Update(), you can remove this line. The writer->Update() will take care of the pipeline update. As a bonus, you may wrap your writer->Update() call, to fetch errors at the end of the pipeline: try { writer->Update(); } catch( itk::ExceptionObject & error ) { std::cerr << "Error: " << error << std::endl; return EXIT_FAILURE; } I made a little Python prototype, the syntax is a little bit different than in C++ but it gives you the main idea. Michka On 18 ao?t 2014, at 16:05, Dan Mercik wrote: > Good Morning, > > > > The demonstration you showed me works great, however if I wanted to do 20 images that would take some time. So, I tried doing a for loop which didn't work exactly how I wanted it to work. I would like the program to take any amount of images and output them side by side , any ideas? The attachment shows the for loop I used similar to TileImageFilter CreateVolume example however when I use it for some odd reason only one image is being display side by side multiple times. > > > > Daniel Mercik > > Computer Science Major > > Service Desk Technician > > Thomas College > > ________________________________ > From: Michka Popoff > Sent: Wednesday, August 13, 2014 2:32 AM > To: Dan Mercik > Cc: ITK Mailing List; community at itk.org > Subject: Re: [ITK-users] TileImageFilter SideBySide > > Hi > > > Moving this mail to the new community mailing list > > > For your problem, you should use the setLayout method [1] > > > For 4 images, that would be: > > > > itk::FixedArray< unsigned int, 2 > layout; > > layout[0] = 4; > layout[1] = 0; > > > Michka > > > [1] http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_SideBySide > > On 13 ao?t 2014, at 01:06, Dan Mercik > wrote: > > Good Afternoon, > > > > I want to know if it's possible to have more than two image be side by side vertically? If so what would I have to change in the algorithm, would I have to make a loop for the amount of input images? Any help would be greatly appreciative. > > > > Daniel Mercik > > Computer Science Major > > Service Desk Technician > > Thomas College > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 -------------- A non-text attachment was scrubbed... Name: tiling.py Type: text/x-python-script Size: 881 bytes Desc: not available URL: -------------- 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 jan.bergmeier at imes.uni-hannover.de Mon Aug 18 11:20:48 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Mon, 18 Aug 2014 08:20:48 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation Message-ID: <1408375248616-7586081.post@n2.nabble.com> Hello, I want to perform a registration between two images without any transformation or optimization. I like to use the itk::MutualInformationImageToImageMetric. As I understand the itk metric, you have to use a transformation, an optimizer, an interpolator and so on. I want to compare one image to a set of images with mutual information as metric. So basically, I like to use the GetValue() method, without giving any parameters to it. Is there a way to do that, or another way to get just one mutual information value between two images? Thanks in advance, Jan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081.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 b.haghighi at yahoo.com Mon Aug 18 11:55:47 2014 From: b.haghighi at yahoo.com (Babak Haghighi) Date: Mon, 18 Aug 2014 08:55:47 -0700 Subject: [ITK] Change the axis of a DICOM image Message-ID: <1408377347.24864.YahooMailNeo@web140503.mail.bf1.yahoo.com> Hi, I converted a file with .img extension to a DICOM image via "ImageReadDicomSeriesWrite.cxx". After that I tried to open the DICOM images in VTK or Apollo software but I encountered a problem with axis a the DICOM image. My question is how I can change the axis of a DICOM image? Thank you. Babak -------------- next part -------------- An HTML attachment was scrubbed... URL: From anton.delehony at gmail.com Mon Aug 18 22:37:22 2014 From: anton.delehony at gmail.com (Anton Delehony) Date: Mon, 18 Aug 2014 22:37:22 -0400 Subject: [ITK] [ITK-users] Deformation Field Modulation Message-ID: Hello, I have a general image processing question that I hope I can get some guidance from more experienced researchers. My data is composed of two 3d MRI volumes taken at end-inhale and end-exhale. I do non-rigid registration (demons) to estimate the overall transformation field between the two volumes. Then, I also have dynamic 2D slices that are taken continuously throughout the breathing cycle. I would like to "modulate" the overall field measured from registration by the measured 2D planes. Any suggestions? -------------- 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 Aug 19 00:31:19 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 19 Aug 2014 00:31:19 -0400 Subject: [ITK] [ITK-users] Question About Buffers In-Reply-To: References: Message-ID: Hi Harsh, Yes, you can use ImportImageFilter [1] as in this example [2]. Hope this helps, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1ImportImageFilter.html [2] http://www.itk.org/Doxygen/html/DataRepresentation_2Image_2Image5_8cxx-example.html#_a1 On Mon, Aug 18, 2014 at 10:01 AM, Harsh Shah wrote: > Hello, > > I wanted to know if itk had any resources that would allow me to set the > value of an itk::Image m_buffer to a buffer I read in from my camera. If > you could point me in the direction of a good example, I would appreciate > 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://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 grothausmann.roman at mh-hannover.de Wed Aug 20 03:37:40 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Wed, 20 Aug 2014 09:37:40 +0200 Subject: [ITK] [ITK-users] TileImageFilter SideBySide In-Reply-To: References: , Message-ID: <53F45044.8010702@mh-hannover.de> Hi As this is a nice case of a question I have always had: In the case of the c++ example (http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume) InputImageType::Pointer inputImageTile; for (int i = 1; i < argc - 1; i++) { reader->SetFileName( argv[i] ); reader->UpdateLargestPossibleRegion(); inputImageTile = reader->GetOutput(); inputImageTile->DisconnectPipeline(); tiler->SetInput( inputImageNumber++, inputImageTile ); } When the reader output is assigned to inputImageTile, I thought this is only a pointer assignment and not a full copy of the image. However, I wonder, what makes sure the address space in the memory is not used (partially) again for the next image read? Is there a full copy created "behind the scene" at any point in the code? Or does the reader remember the address space of former images read even though DisconnectPipeline was called? Thanks for any explanations Roman On 18/08/14 17:01, Michka Popoff wrote: > Hi > > Going the way described in the CreateVolume example is the way to go. > > Why did you uncomment the DisconnectPipeline() call and Update() call in the for > loop ? They need to stay there, else you will always use the last image. > That?s why you see the same image, the single update call will be triggered at > the end of the script and read only one image. > > You don?t need to call tileFilter->Update(), you can remove this line. The > writer->Update() will take care of the pipeline update. > As a bonus, you may wrap your writer->Update() call, to fetch errors at the end > of the pipeline: > > try > { > writer->Update(); > } > catch( itk::ExceptionObject & error ) > { > std::cerr << "Error: " << error << std::endl; > return EXIT_FAILURE; > } > > I made a little Python prototype, the syntax is a little bit different than in > C++ but it gives you the main idea. > > Michka > > > > > On 18 ao?t 2014, at 16:05, Dan Mercik > wrote: > >> Good Morning, >> >> >> >> The demonstration you showed me works great, however if >> I wanted to do 20 images that would take some time. So, I tried doing a for >> loop which didn't work exactly how I wanted it to work. I would like the >> program to take any amount of images and output them side by side , any ideas? >> The attachment shows the for loop I used similar to TileImageFilter >> CreateVolume example however when I use it for some odd reason only one image >> is being display side by side multiple times. >> >> >> >> Daniel Mercik >> >> Computer Science Major >> >> Service Desk Technician >> >> Thomas College >> >> ________________________________ >> From: Michka Popoff > >> Sent: Wednesday, August 13, 2014 2:32 AM >> To: Dan Mercik >> Cc: ITK Mailing List;community at itk.org >> Subject: Re: [ITK-users] TileImageFilter SideBySide >> >> Hi >> >> >> Moving this mail to the new community mailing list >> >> >> For your problem, you should use the setLayout method [1] >> >> >> For 4 images, that would be: >> >> >> >> itk::FixedArray< unsigned int, 2 > layout; >> >> layout[0] = 4; >> layout[1] = 0; >> >> >> Michka >> >> >> [1] >> http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_SideBySide >> >> On 13 ao?t 2014, at 01:06, Dan Mercik > > wrote: >> >> Good Afternoon, >> >> >> >> I want to know if it's possible to have more than two image >> be side by side vertically? If so what would I have to change in the >> algorithm, would I have to make a loop for the amount of input images? Any >> help would be greatly appreciative. >> >> >> >> Daniel Mercik >> >> Computer Science Major >> >> Service Desk Technician >> >> Thomas College >> _____________________________________ >> Powered bywww.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 > -- 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 millerjv at gmail.com Wed Aug 20 07:16:59 2014 From: millerjv at gmail.com (Jim Miller) Date: Wed, 20 Aug 2014 07:16:59 -0400 Subject: [ITK] [ITK-users] TileImageFilter SideBySide In-Reply-To: <53F45044.8010702@mh-hannover.de> References: <53F45044.8010702@mh-hannover.de> Message-ID: <2D7CC2D6-CD96-4778-8DFA-86382739FA01@gmail.com> Once DisconnectPipeline is called the Image object is completely disassociated with the source filter (in this case a reader). The source filter then constructs a new a Image object to serve as its output. For instance, if you call GetOutput() after calling DisconnectPipeline, you will get a different Image object than one retrieved before DisconnectPipeline is called. The pixel buffer is managed by the Image object, not the source/filter/reader. So after a call to DisconnectPipeline(), the reader has a new Image object as it its output and that new Image object has a distinct pixel buffer. Initially this pixel buffer is not even allocated. The act of reading the next image causes the reader to request the Image object to allocate the pixel buffer to an appropriate size. If DisconnectPipeline() was not called and the reader was asked to read another image of the same size or smaller, its output Image object would already have an allocated pixel buffer. The reader would still ask the Image object to allocate a pixel buffer of the appropriate size. But in this case, the Image object would recognize that it already has a block of memory of sufficient size and not do another allocation. Jim > On Aug 20, 2014, at 3:37 AM, "Dr. Roman Grothausmann" wrote: > > Hi > > > As this is a nice case of a question I have always had: In the case of the c++ example (http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume) > > InputImageType::Pointer inputImageTile; > > for (int i = 1; i < argc - 1; i++) > { > reader->SetFileName( argv[i] ); > reader->UpdateLargestPossibleRegion(); > inputImageTile = reader->GetOutput(); > inputImageTile->DisconnectPipeline(); > tiler->SetInput( inputImageNumber++, inputImageTile ); > } > > When the reader output is assigned to inputImageTile, I thought this is only a pointer assignment and not a full copy of the image. However, I wonder, what makes sure the address space in the memory is not used (partially) again for the next image read? Is there a full copy created "behind the scene" at any point in the code? Or does the reader remember the address space of former images read even though DisconnectPipeline was called? > > Thanks for any explanations > Roman > >> On 18/08/14 17:01, Michka Popoff wrote: >> Hi >> >> Going the way described in the CreateVolume example is the way to go. >> >> Why did you uncomment the DisconnectPipeline() call and Update() call in the for >> loop ? They need to stay there, else you will always use the last image. >> That?s why you see the same image, the single update call will be triggered at >> the end of the script and read only one image. >> >> You don?t need to call tileFilter->Update(), you can remove this line. The >> writer->Update() will take care of the pipeline update. >> As a bonus, you may wrap your writer->Update() call, to fetch errors at the end >> of the pipeline: >> >> try >> { >> writer->Update(); >> } >> catch( itk::ExceptionObject & error ) >> { >> std::cerr << "Error: " << error << std::endl; >> return EXIT_FAILURE; >> } >> >> I made a little Python prototype, the syntax is a little bit different than in >> C++ but it gives you the main idea. >> >> Michka >> >> >> >> >> On 18 ao?t 2014, at 16:05, Dan Mercik > > wrote: >> >>> Good Morning, >>> >>> >>> >>> The demonstration you showed me works great, however if >>> I wanted to do 20 images that would take some time. So, I tried doing a for >>> loop which didn't work exactly how I wanted it to work. I would like the >>> program to take any amount of images and output them side by side , any ideas? >>> The attachment shows the for loop I used similar to TileImageFilter >>> CreateVolume example however when I use it for some odd reason only one image >>> is being display side by side multiple times. >>> >>> >>> >>> Daniel Mercik >>> >>> Computer Science Major >>> >>> Service Desk Technician >>> >>> Thomas College >>> >>> ________________________________ >>> From: Michka Popoff > >>> Sent: Wednesday, August 13, 2014 2:32 AM >>> To: Dan Mercik >>> Cc: ITK Mailing List;community at itk.org >>> Subject: Re: [ITK-users] TileImageFilter SideBySide >>> >>> Hi >>> >>> >>> Moving this mail to the new community mailing list >>> >>> >>> For your problem, you should use the setLayout method [1] >>> >>> >>> For 4 images, that would be: >>> >>> >>> >>> itk::FixedArray< unsigned int, 2 > layout; >>> >>> layout[0] = 4; >>> layout[1] = 0; >>> >>> >>> Michka >>> >>> >>> [1] >>> http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_SideBySide >>> >>> On 13 ao?t 2014, at 01:06, Dan Mercik >> > wrote: >>> >>> Good Afternoon, >>> >>> >>> >>> I want to know if it's possible to have more than two image >>> be side by side vertically? If so what would I have to change in the >>> algorithm, would I have to make a loop for the amount of input images? Any >>> help would be greatly appreciative. >>> >>> >>> >>> Daniel Mercik >>> >>> Computer Science Major >>> >>> Service Desk Technician >>> >>> Thomas College >>> _____________________________________ >>> Powered bywww.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 > > -- > 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 grothausmann.roman at mh-hannover.de Wed Aug 20 07:59:40 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Wed, 20 Aug 2014 13:59:40 +0200 Subject: [ITK] [ITK-users] TileImageFilter SideBySide In-Reply-To: <2D7CC2D6-CD96-4778-8DFA-86382739FA01@gmail.com> References: <53F45044.8010702@mh-hannover.de> <2D7CC2D6-CD96-4778-8DFA-86382739FA01@gmail.com> Message-ID: <53F48DAC.5040005@mh-hannover.de> Thanks Jim for the great explanation, I understand now. So in simple CLI programs where an ITK pipeline is only updated once by the final writer: In order to limit maximum memory used during execution, would it be best to always store the output of a filter in the pipeline in an image object and then call DisconnectPipeline (and setting ReleaseDataFlagOn for the filter)? Many thanks again for the answer. Roman On 20/08/14 13:16, Jim Miller wrote: > Once DisconnectPipeline is called the Image object is completely > disassociated with the source filter (in this case a reader). The source > filter then constructs a new a Image object to serve as its output. For > instance, if you call GetOutput() after calling DisconnectPipeline, you will > get a different Image object than one retrieved before DisconnectPipeline is > called. > > The pixel buffer is managed by the Image object, not the > source/filter/reader. So after a call to DisconnectPipeline(), the reader has > a new Image object as it its output and that new Image object has a distinct > pixel buffer. Initially this pixel buffer is not even allocated. The act of > reading the next image causes the reader to request the Image object to > allocate the pixel buffer to an appropriate size. > > If DisconnectPipeline() was not called and the reader was asked to read > another image of the same size or smaller, its output Image object would > already have an allocated pixel buffer. The reader would still ask the Image > object to allocate a pixel buffer of the appropriate size. But in this case, > the Image object would recognize that it already has a block of memory of > sufficient size and not do another allocation. > > Jim > >> On Aug 20, 2014, at 3:37 AM, "Dr. Roman Grothausmann" >> wrote: >> >> Hi >> >> >> As this is a nice case of a question I have always had: In the case of the >> c++ example >> (http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume) >> >> >> InputImageType::Pointer inputImageTile; >> >> for (int i = 1; i < argc - 1; i++) { reader->SetFileName( argv[i] ); >> reader->UpdateLargestPossibleRegion(); inputImageTile = >> reader->GetOutput(); inputImageTile->DisconnectPipeline(); tiler->SetInput( >> inputImageNumber++, inputImageTile ); } >> >> When the reader output is assigned to inputImageTile, I thought this is >> only a pointer assignment and not a full copy of the image. However, I >> wonder, what makes sure the address space in the memory is not used >> (partially) again for the next image read? Is there a full copy created >> "behind the scene" at any point in the code? Or does the reader remember >> the address space of former images read even though DisconnectPipeline was >> called? >> >> Thanks for any explanations Roman >> >>> On 18/08/14 17:01, Michka Popoff wrote: Hi >>> >>> Going the way described in the CreateVolume example is the way to go. >>> >>> Why did you uncomment the DisconnectPipeline() call and Update() call in >>> the for loop ? They need to stay there, else you will always use the last >>> image. That?s why you see the same image, the single update call will be >>> triggered at the end of the script and read only one image. >>> >>> You don?t need to call tileFilter->Update(), you can remove this line. >>> The writer->Update() will take care of the pipeline update. As a bonus, >>> you may wrap your writer->Update() call, to fetch errors at the end of >>> the pipeline: >>> >>> try { writer->Update(); } catch( itk::ExceptionObject & error ) { >>> std::cerr << "Error: " << error << std::endl; return EXIT_FAILURE; } >>> >>> I made a little Python prototype, the syntax is a little bit different >>> than in C++ but it gives you the main idea. >>> >>> Michka >>> >>> >>> >>> >>> On 18 ao?t 2014, at 16:05, Dan Mercik >> > wrote: >>> >>>> Good Morning, >>>> >>>> >>>> >>>> The demonstration you showed me works great, however if I wanted to do >>>> 20 images that would take some time. So, I tried doing a for loop >>>> which didn't work exactly how I wanted it to work. I would like the >>>> program to take any amount of images and output them side by side , any >>>> ideas? The attachment shows the for loop I used similar to >>>> TileImageFilter CreateVolume example however when I use it for some odd >>>> reason only one image is being display side by side multiple times. >>>> >>>> >>>> >>>> Daniel Mercik >>>> >>>> Computer Science Major >>>> >>>> Service Desk Technician >>>> >>>> Thomas College >>>> >>>> ________________________________ From: Michka Popoff >>>> > Sent: >>>> Wednesday, August 13, 2014 2:32 AM To: Dan Mercik Cc: ITK Mailing >>>> List;community at itk.org Subject: Re: >>>> [ITK-users] TileImageFilter SideBySide >>>> >>>> Hi >>>> >>>> >>>> Moving this mail to the new community mailing list >>>> >>>> >>>> For your problem, you should use the setLayout method [1] >>>> >>>> >>>> For 4 images, that would be: >>>> >>>> >>>> >>>> itk::FixedArray< unsigned int, 2 > layout; >>>> >>>> layout[0] = 4; layout[1] = 0; >>>> >>>> >>>> Michka >>>> >>>> >>>> [1] >>>> http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_SideBySide >>>> >>>> >>>> On 13 ao?t 2014, at 01:06, Dan Mercik >>> > wrote: >>>> >>>> Good Afternoon, >>>> >>>> >>>> >>>> I want to know if it's possible to have more than two image be side by >>>> side vertically? If so what would I have to change in the algorithm, >>>> would I have to make a loop for the amount of input images? Any help >>>> would be greatly appreciative. >>>> >>>> >>>> >>>> Daniel Mercik >>>> >>>> Computer Science Major >>>> >>>> Service Desk Technician >>>> >>>> Thomas College _____________________________________ Powered >>>> bywww.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the 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 >> >> -- 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 _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 Wed Aug 20 10:03:32 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Wed, 20 Aug 2014 16:03:32 +0200 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> <305E1509-8EF7-4770-9236-3D639B9BF155@gmail.com> Message-ID: <8E777677-5A6C-47A1-9ED6-030C85AB48B5@gmail.com> Hi, I have just submitted this patch for the documentation, can you please review it? http://review.source.kitware.com/#/c/16755/ I was running this code on Mac i5 with 4GB RAM, with both ITK and this program compiled in Debug? Best, Arnaud On Aug 7, 2014, at 5:20 PM, Mallikarjun K wrote: > Hi Arnaud, > > Thanks,Can you please tell me your machine confuguration. I am running 4GB RAM,i3 on windows7. > I have downloaded your project and tried to execute it and it is still the same problem Which I was facing earlier.Any suggestions ..... > > thank you > > > On Thu, Aug 7, 2014 at 8:10 PM, Arnaud Gelas wrote: > It takes 29s on my machine in debug to run 5 iterations with Delaunay conforming set to true > > https://gist.github.com/arnaudgelas/0f20ebdaf53956f79997 > > > On Aug 7, 2014, at 3:45 PM, Mallikarjun K wrote: > >> File path is correct.if it is '\'(backward slash) we have to add "D:\\" .since I used '/' it's not required to add "//". >> >> please find the attached .vtk file >> >> Thanks >> >> >> On Thu, Aug 7, 2014 at 7:01 PM, Arnaud Gelas wrote: >> Shouldn't it be D://temp.vtk ? Isn't it missing one '/' ? >> >> Can you send this vtk file? >> >> >> On Aug 7, 2014, at 3:23 PM, Mallikarjun K wrote: >> >>> Hi Arnaud, >>> >>> Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ? >>> >>> ///// >>> #include >>> #include >>> >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include "itkMesh.h" >>> #include "itkQuadEdgeMesh.h" >>> #include "itkQuadEdgeMeshTraits.h" >>> #include "itkSmoothingQuadEdgeMeshFilter.h" >>> #include "vtkSTLWriter.h" >>> #include >>> >>> int main() >>> { >>> std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K >>> >>> typedef itk::QuadEdgeMeshTraits qetraits; >>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>> >>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; >>> >>> vtkSmartPointer polyDatawriter=vtkSmartPointer::New(); >>> vtkSmartPointer polyDatareader=vtkSmartPointer::New(); >>> >>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>> >>> /* polyDatareader->SetFileName(Inputfilename.c_str() ); >>> polyDatareader->ReleaseDataFlagOn(); >>> polyDatareader->Update();*/ >>> >>> /*vtkSmartPointer triangleFilter = >>> vtkSmartPointer::New(); >>> triangleFilter->SetInput(polyDatareader->GetOutput()); >>> triangleFilter->Update();*/ >>> >>> // >>> /* vtkSmartPointer clean = vtkSmartPointer::New(); >>> #if (VTK_MAJOR_VERSION < 6) >>> clean->SetInput(triangleFilter->GetOutput() ); >>> #else >>> clean->SetInputData(triangleFilter->GetOutput() ); >>> #endif >>> >>> clean->ConvertPolysToLinesOff(); >>> clean->ConvertLinesToPointsOff(); >>> clean->Update(); >>> >>> std::string Inputfilename2="D:/cleaned.vtk";*/ >>> >>> //// >>> /*polyDatawriter->SetInput(clean->GetOutput()); >>> polyDatawriter->SetFileName(Inputfilename2.c_str()); >>> polyDatawriter->ReleaseDataFlagOn(); >>> polyDatawriter->Write(); */ >>> >>> typedef itk::MeshFileReader MeshReaderType; >>> MeshReaderType::Pointer Meshreader = MeshReaderType::New(); >>> Meshreader->SetFileName(Inputfilename.c_str( )); >>> Meshreader->Update(); >>> >>> /*MeshType::Pointer mesh = Meshreader->GetOutput(); >>> mesh->DisconnectPipeline();*/ >>> >>> >>> QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); >>> QEMeshSmoother->SetNumberOfIterations(1 ); >>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>> QEMeshSmoother->SetDelaunayConforming(true); >>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>> >>> QEMeshSmoother->ReleaseDataFlagOn(); >>> >>> QEMeshSmoother->Update(); >>> >>> std::string Outputfilename="D:/tempOut.vtk"; >>> >>> typedef itk::MeshFileWriter MeshWriterType; >>> MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); >>> Meshwriter->SetFileName(Outputfilename.c_str( )); >>> Meshwriter->SetInput(QEMeshSmoother->GetOutput()); >>> Meshwriter->Update(); >>> >>> polyDatareader->SetFileName(Outputfilename.c_str() ); >>> polyDatareader->ReleaseDataFlagOn(); >>> polyDatareader->Update(); >>> >>> vtkSmartPointer stlWriter=vtkSmartPointer::New(); >>> >>> stlWriter->SetInput( polyDatareader->GetOutput()); >>> stlWriter->SetFileName("D:/QEoutput.stl"); >>> stlWriter->SetFileTypeToASCII(); >>> stlWriter->Write(); >>> >>> //Here it stops and taking long time >>> >>> return 0; >>> >>> >>> } >>> //// >>> >>> >>> >>> On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K wrote: >>> Hi Arnaud, >>> >>> Thanks for your reply and valuable suggestions. >>> >>> Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF. >>> >>> Thank you >>> >>> >>> On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas wrote: >>> Hi Malik, >>> >>> First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?). >>> >>> Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal). >>> >>> At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages? >>> How large is your input mesh (number of points)? >>> >>> You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement. >>> Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing). >>> >>> HTH >>> Arnaud >>> >>> >>> On Aug 6, 2014, at 10:42 AM, Mallikarjun K wrote: >>> >>>> Hi All, >>>> >>>> Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . >>>> >>>> >>>> //// >>>> >>>> typedef itk::QuadEdgeMeshTraits qetraits; >>>> >>>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>> >>>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>>> >>>> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >>>> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >>>> >>>> //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); >>>> VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); >>>> >>>> VtkToItkReader->SetFileName("abc.vtk"); >>>> VtkToItkReader->Update(); >>>> >>>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>> SmoothingQuadEdgeMeshFilter; >>>> >>>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>>> >>>> >>>> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >>>> QEMeshSmoother->SetNumberOfIterations(5 ); >>>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>> QEMeshSmoother->SetDelaunayConforming(true ); >>>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>> >>>> QEMeshSmoother->Update(); >>>> >>>> //// >>>> >>>> >>>> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: >>>> Thanks Bill for your answer. >>>> >>>> The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. >>>> >>>> Thanks for your help >>>> >>>> >>>> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: >>>> If you have it in vtk, I suggest using the vtk pipeline to smooth the data. >>>> >>>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K wrote: >>>> > Hi Bill, >>>> > Thanks for the replay. >>>> > >>>> > Yes,I built both ITK and my app with Release ,I forgot to mention it in the >>>> > previous post.Actually the data set is the output of >>>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved >>>> > this marching cube's output as .vtk file and read it using >>>> > itkVTKPolyDataReader and then I am giving this reader's output to >>>> > itkSmoothingQuadEdgeMeshFilter's input. >>>> > >>>> > I checked the execution time of each step in the pipeline ,after >>>> > SmothingQEMeshFilter has got it's input ,it is taking time to process the >>>> > data. >>>> > >>>> > Thank you >>>> > >>>> > >>>> > >>>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen >>>> > wrote: >>>> >> >>>> >> First, make sure you are building ITK and your app with Release. A >>>> >> Debug build can be 10-50 times slower. >>>> >> >>>> >> >>>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K >>>> >> wrote: >>>> >> > Hi All, >>>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>>> >> > smoothing.This >>>> >> > filter is giving good results what I expected but taking more execution >>>> >> > time.can any one suggest me to reduce the execution time( multi >>>> >> > threading >>>> >> > or any parameters to add/remove )? >>>> >> > >>>> >> > Below is the code snippet >>>> >> > /////// >>>> >> > typedef itk::QuadEdgeMeshTraits>>> >> > > >>>> >> > qetraits; >>>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>> >> > >>>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>>> >> > >>>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>>> >> > >>>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>> >> > SmoothingQuadEdgeMeshFilter; >>>> >> > >>>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>>> >> > SmoothingQuadEdgeMeshFilter::New(); >>>> >> > >>>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>> >> > QEMeshSmoother->Update(); >>>> >> > //// >>>> >> > >>>> >> > -- >>>> >> > Regards: >>>> >> > Mallik >>>> >> > >>>> >> > >>>> >> > _____________________________________ >>>> >> > Powered by www.kitware.com >>>> >> > >>>> >> > Visit other Kitware open-source projects at >>>> >> > http://www.kitware.com/opensource/opensource.html >>>> >> > >>>> >> > Kitware offers ITK Training Courses, for more information visit: >>>> >> > http://www.kitware.com/products/protraining.php >>>> >> > >>>> >> > Please keep messages on-topic and check the 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 >>>> > >>>> > >>>> > >>>> > >>>> > -- >>>> > Regards: >>>> > Mallik >>>> > >>>> >>>> >>>> >>>> -- >>>> Unpaid intern in BillsBasement at noware dot com >>>> >>>> >>>> >>>> -- >>>> Regards: >>>> Mallik >>>> >>>> >>>> >>>> >>>> -- >>>> Regards: >>>> Mallik >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >>> >>> >>> -- >>> Regards: >>> Mallik >>> >>> >>> >>> >>> -- >>> Regards: >>> Mallik >>> >> >> >> >> >> -- >> Regards: >> Mallik >> >> > > > > > -- > Regards: > Mallik > -------------- 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 arnaudgelas at gmail.com Wed Aug 20 10:28:58 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Wed, 20 Aug 2014 16:28:58 +0200 Subject: [ITK] [ITK-users] combining N images Message-ID: Hi all, I am trying to combine N images together into a single image of the same dimension. These N images have the same direction, but can have different origin, start index, spacing, size (there is no overlap). Then gaps in between images would be filled with a given constant value. Is there such a filter? or assuming I have already resampled all images to a common ground, is there a filter to do this? 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 joseignacio.prieto at gmail.com Wed Aug 20 11:00:51 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Wed, 20 Aug 2014 11:00:51 -0400 Subject: [ITK] [ITK-users] Composite Filter with variable stdvector of filters inside Message-ID: Hi all, I am trying to create a composite filter for a 4D dataset that will use different cascaded 2D filters on the inside. For this, I have created a double std vector that holds all the 2D filters. I have also set some param setters for this filters (that perform a double for inside, setting the param to each filter and then calling modified() on the outside one). I have another method called UpdateNumberofFilters, that depending on 2 ints (num of Z slices, num of T timeframes) will push back more filters to the 2D array of filters. My problem is that I dont know which function should call the UpdateNumofFilters. It should be done before the setters but after the constructor and after setting those two ints. I want to design it so that if I change a param after calling update I dont have to run the whole filter again, so I dont want it to be under the GenerateData() method. Thank you very much for your insights. Ignacio Prieto -- Ignacio Prieto Research Assistant Biomedical Imaging Center Pontificia Universida Catolica de Chile -------------- 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 mercikd at thomas.edu Wed Aug 20 11:48:43 2014 From: mercikd at thomas.edu (Dan Mercik) Date: Wed, 20 Aug 2014 15:48:43 +0000 Subject: [ITK] [ITK-users] Tiling Side by Side Question Message-ID: <5a78d43e709547e49519d34f2e74838e@T9.tcnet.thomas.edu> Hey, In my program I'm using a If Else statement to decide which direction I want my images to tile. So far, the If statement works if I want my images to tile horizontally, but It not working vertically. In my code if I input 1 my images would tile horizontally, anything input other than 1 should display my images vertically. Do anyone happen to see the problem in my if Else statement? Daniel Mercik Computer Science Major Service Desk Technician Thomas College -------------- next part -------------- A non-text attachment was scrubbed... Name: sidebyside tiling.JPG Type: image/jpeg Size: 67308 bytes Desc: sidebyside tiling.JPG 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 arnaudgelas at gmail.com Wed Aug 20 11:51:19 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Wed, 20 Aug 2014 17:51:19 +0200 Subject: [ITK] [ITK-users] combining N images In-Reply-To: References: Message-ID: Hi, I do not want to add images, it is more something like pasting but I do not know in advance what would be the output image size, but it would be at least the bounding box of all images... Arnaud On Wednesday, August 20, 2014, Mordig, Maximilian Oliver < maximilian_oliver.mordig at roche.com> wrote: > Once you have resampled all images, you can use the itk AddFilter. > > > On Wed, Aug 20, 2014 at 4:28 PM, Arnaud Gelas > wrote: > >> Hi all, >> >> I am trying to combine N images together into a single image of the same >> dimension. >> >> These N images have the same direction, but can have different origin, >> start index, spacing, size (there is no overlap). Then gaps in between >> images would be filled with a given constant value. >> >> Is there such a filter? or assuming I have already resampled all images >> to a common ground, is there a filter to do this? >> >> 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 >> >> _______________________________________________ >> 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 brad at lowekamp.net Wed Aug 20 12:53:18 2014 From: brad at lowekamp.net (Bradley Lowekamp) Date: Wed, 20 Aug 2014 12:53:18 -0400 Subject: [ITK] [ITK-users] combining N images In-Reply-To: References: Message-ID: <41BB5486-E3F6-4196-8E58-C59F514C8800@mail.nih.gov> This may be of some use: https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkBoundingRegionImageSinc.h > On Aug 20, 2014, at 11:51 AM, Arnaud Gelas wrote: > > Hi, > > I do not want to add images, it is more something like pasting but I do not know in advance what would be the output image size, but it would be at least the bounding box of all images... > > Arnaud > >> On Wednesday, August 20, 2014, Mordig, Maximilian Oliver wrote: >> Once you have resampled all images, you can use the itk AddFilter. >> >> >>> On Wed, Aug 20, 2014 at 4:28 PM, Arnaud Gelas wrote: >>> Hi all, >>> >>> I am trying to combine N images together into a single image of the same dimension. >>> >>> These N images have the same direction, but can have different origin, start index, spacing, size (there is no overlap). Then gaps in between images would be filled with a given constant value. >>> >>> Is there such a filter? or assuming I have already resampled all images to a common ground, is there a filter to do this? >>> >>> 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 >>> >>> _______________________________________________ >>> 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 > _______________________________________________ > 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 yxp233 at postech.ac.kr Wed Aug 20 13:07:38 2014 From: yxp233 at postech.ac.kr (Xiaopeng Yang) Date: Thu, 21 Aug 2014 02:07:38 +0900 Subject: [ITK] [ITK-users] Compiling ITK for GPU support In-Reply-To: <1405141094987070.021539.ptmail03@ptmail03> References: <1405141094987070.021539.ptmail03@ptmail03> Message-ID: <023f01cfbc99$3ecc2c60$bc648520$@ac.kr> Hello, I would like to develop GPU based program for image processing, so I tried to compile ITK with GPU support. My question is whether I shall install 3rd party program like CUDDA first? Thank you. Xiaopeng -------------- 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 Thu Aug 21 03:30:02 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Thu, 21 Aug 2014 09:30:02 +0200 Subject: [ITK] [ITK-users] Tiling Side by Side Question In-Reply-To: <5a78d43e709547e49519d34f2e74838e@T9.tcnet.thomas.edu> References: <5a78d43e709547e49519d34f2e74838e@T9.tcnet.thomas.edu> Message-ID: <53F59FFA.2070002@mh-hannover.de> Hm, haven't used that filter before but I'd think that you need to change layout[2] to layout[1]. On 20/08/14 17:48, Dan Mercik wrote: > Hey, > > > > In my program I'm using a If Else statement to decide which direction I want > my images to tile. So far, the If statement works if I want my images to tile > horizontally, but It not working vertically. In my code if I input 1 my > images would tile horizontally, anything input other than 1 should display my > images vertically. Do anyone happen to see the problem in my if Else > statement? > > > > > > Daniel Mercik > > Computer Science Major > > Service Desk Technician > > Thomas College > > > > _____________________________________ Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 Aug 21 03:37:31 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Thu, 21 Aug 2014 09:37:31 +0200 Subject: [ITK] [ITK-users] Tiling Side by Side Question In-Reply-To: <53F59FFA.2070002@mh-hannover.de> References: <5a78d43e709547e49519d34f2e74838e@T9.tcnet.thomas.edu> <53F59FFA.2070002@mh-hannover.de> Message-ID: <8BA6CC8C-BAFC-496A-8FA3-B2998B9745B6@gmail.com> Yes, layout[2] is for the third direction, when you do a stack. Do not set layout[2], as you set your FixedArray to be 2 dimensional. (else you should do itk::FixedArray< unsigned int, 3 > layout; So for vertical tiling it is: layout[0] = 0; layout[1] = i + 1; Michka On 21 ao?t 2014, at 09:30, Dr. Roman Grothausmann wrote: > Hm, haven't used that filter before but I'd think that you need to change layout[2] to layout[1]. > > On 20/08/14 17:48, Dan Mercik wrote: >> Hey, >> >> >> >> In my program I'm using a If Else statement to decide which direction I want >> my images to tile. So far, the If statement works if I want my images to tile >> horizontally, but It not working vertically. In my code if I input 1 my >> images would tile horizontally, anything input other than 1 should display my >> images vertically. Do anyone happen to see the problem in my if Else >> statement? >> >> >> >> >> >> Daniel Mercik >> >> Computer Science Major >> >> Service Desk Technician >> >> Thomas College >> >> >> >> _____________________________________ Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 yuetian926 at 163.com Thu Aug 21 04:55:17 2014 From: yuetian926 at 163.com (Yuetian Liu) Date: Thu, 21 Aug 2014 16:55:17 +0800 (CST) Subject: [ITK] [ITK-users] How to fusion the MR volume to the CT volume Message-ID: <40b48479.b227.147f7c6f61b.Coremail.yuetian926@163.com> Hi itkusers, Recently I want to fuse the MR volume to the CT volume, but I search the itk mailist. I haven;t known how to realise it. And there isn't example in the InsightSoftwareGuide-4.5.0.pdf and InsightSphinxExamplesPDF-4.5.0.pdf. So I want to ask how to fuse the MR volume to the CT volume by itk. Thank you for helping me! Best Yuetian -------------- 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 yuetian926 at 163.com Thu Aug 21 04:44:11 2014 From: yuetian926 at 163.com (Yuetian Liu) Date: Thu, 21 Aug 2014 16:44:11 +0800 (CST) Subject: [ITK] [ITK-users] How to fusion the MR volume to the CT volume Message-ID: <49b24f0c.ad8d.147f7bccdd9.Coremail.yuetian926@163.com> Hi itkusers, Recently I want to fuse the MR volume to the CT volume, but I search the itk mailist. I haven;t known how to realise it. And there isn't example in the InsightSoftwareGuide-4.5.0.pdf and InsightSphinxExamplesPDF-4.5.0.pdf. So I want to ask how to fuse the MR volume to the CT volume by itk. Thank you for helping me! Best Yuetian -------------- 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 arnaudgelas at gmail.com Thu Aug 21 06:47:17 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 21 Aug 2014 12:47:17 +0200 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> <305E1509-8EF7-4770-9236-3D639B9BF155@gmail.com> <8E777677-5A6C-47A1-9ED6-030C85AB48B5@gmail.com> Message-ID: Hi, As of now, there is no progress event on this filter, so it is normal nothing happened. I'll submit another patch for progress event later today. To review the patch, you need to create an account on gerrit: http://review.source.kitware.com Then you ca volunteer to the review patch, you can add comments, accept, refuse? Else once you are registered, you can send me an email and I will add you as a reviewer. Best, Arnaud On Aug 21, 2014, at 12:11 PM, Mallikarjun K wrote: > Hi, > I am trying observe the progressEvent by using AddObserver method of this filter but I couldn't. Could you check the below code once. > > And one more thing,Could you guide me what exactly I have to do to Review the patch you have submitted. > > Thank you > > > ///progress > > #include > #include > > #include > #include > #include > #include > #include "itkMesh.h" > #include "itkQuadEdgeMesh.h" > #include "itkQuadEdgeMeshTraits.h" > #include "itkSmoothingQuadEdgeMeshFilter.h" > #include "itkCommand.h" > > class MyCommand : public itk::Command > { > public: > itkNewMacro( MyCommand ); > > public: > > void Execute(itk::Object *caller, const itk::EventObject & event) > { > Execute( (const itk::Object *)caller, event); > } > > void Execute(const itk::Object * object, const itk::EventObject & event) > { > std::cout << "Command called." << std::endl; > > if( typeid( itk::ProgressEvent ) == typeid( event ) ) > { > ::itk::ProcessObject::ConstPointer process = > dynamic_cast< const itk::ProcessObject *>( object/*caller*/ ); > > const int value = static_cast(process->GetProgress() * 100 ); > std::cout<<"progress:"< > > > } > > } > > }; > > int main( int argc, char* argv[] ) > { > > /*if( argc < 2 ) > { > std::cerr << "Usage: " << std::endl; > std::cerr << argv[0] << " inputImageFile outputImageFile flipAxisX flipAxisY" << std::endl; > return EXIT_FAILURE; > }*/ > > std::string Inputfilename="D:\\temp.vtk"; > typedef itk::QuadEdgeMeshTraits qetraits; > typedef itk::QuadEdgeMesh< double, 3,qetraits > MeshType; > > itk::OnesMatrixCoefficients< MeshType > coeff0; > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; > > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); > > typedef itk::MeshFileReader MeshReaderType; > MeshReaderType::Pointer Meshreader = MeshReaderType::New(); > Meshreader->SetFileName( Inputfilename.c_str()/*argv[1]*/ ); > // Meshreader->Update(); > > > MyCommand::Pointer myCommand = MyCommand::New(); > > QEMeshSmoother->SetInput(Meshreader->GetOutput() ); > QEMeshSmoother->SetNumberOfIterations( 1 ); > QEMeshSmoother->SetRelaxationFactor( 0.5 ); > QEMeshSmoother->SetDelaunayConforming(true); > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); > QEMeshSmoother->AddObserver(itk::ProgressEvent, myCommand); > > // QEMeshSmoother->Update(); > std::string Outputfilename="D:\\tempOut2.vtk"; > > typedef itk::MeshFileWriter MeshWriterType; > MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); > Meshwriter->SetFileName(Outputfilename.c_str() /*argv[2]*/ ); > Meshwriter->SetInput(QEMeshSmoother->GetOutput()); > > try > { > Meshwriter->Update(); > } > catch( itk::ExceptionObject& e ) > { > std::cerr << e.what() << std::endl; > } > > return 0; > > > } > > > On Wed, Aug 20, 2014 at 7:33 PM, Arnaud Gelas wrote: > Hi, > > I have just submitted this patch for the documentation, can you please review it? > > http://review.source.kitware.com/#/c/16755/ > > I was running this code on Mac i5 with 4GB RAM, with both ITK and this program compiled in Debug? > > Best, > Arnaud > > On Aug 7, 2014, at 5:20 PM, Mallikarjun K wrote: > >> Hi Arnaud, >> >> Thanks,Can you please tell me your machine confuguration. I am running 4GB RAM,i3 on windows7. >> I have downloaded your project and tried to execute it and it is still the same problem Which I was facing earlier.Any suggestions ..... >> >> thank you >> >> >> On Thu, Aug 7, 2014 at 8:10 PM, Arnaud Gelas wrote: >> It takes 29s on my machine in debug to run 5 iterations with Delaunay conforming set to true >> >> https://gist.github.com/arnaudgelas/0f20ebdaf53956f79997 >> >> >> On Aug 7, 2014, at 3:45 PM, Mallikarjun K wrote: >> >>> File path is correct.if it is '\'(backward slash) we have to add "D:\\" .since I used '/' it's not required to add "//". >>> >>> please find the attached .vtk file >>> >>> Thanks >>> >>> >>> On Thu, Aug 7, 2014 at 7:01 PM, Arnaud Gelas wrote: >>> Shouldn't it be D://temp.vtk ? Isn't it missing one '/' ? >>> >>> Can you send this vtk file? >>> >>> >>> On Aug 7, 2014, at 3:23 PM, Mallikarjun K wrote: >>> >>>> Hi Arnaud, >>>> >>>> Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ? >>>> >>>> ///// >>>> #include >>>> #include >>>> >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include "itkMesh.h" >>>> #include "itkQuadEdgeMesh.h" >>>> #include "itkQuadEdgeMeshTraits.h" >>>> #include "itkSmoothingQuadEdgeMeshFilter.h" >>>> #include "vtkSTLWriter.h" >>>> #include >>>> >>>> int main() >>>> { >>>> std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K >>>> >>>> typedef itk::QuadEdgeMeshTraits qetraits; >>>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>> >>>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; >>>> >>>> vtkSmartPointer polyDatawriter=vtkSmartPointer::New(); >>>> vtkSmartPointer polyDatareader=vtkSmartPointer::New(); >>>> >>>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>>> >>>> /* polyDatareader->SetFileName(Inputfilename.c_str() ); >>>> polyDatareader->ReleaseDataFlagOn(); >>>> polyDatareader->Update();*/ >>>> >>>> /*vtkSmartPointer triangleFilter = >>>> vtkSmartPointer::New(); >>>> triangleFilter->SetInput(polyDatareader->GetOutput()); >>>> triangleFilter->Update();*/ >>>> >>>> // >>>> /* vtkSmartPointer clean = vtkSmartPointer::New(); >>>> #if (VTK_MAJOR_VERSION < 6) >>>> clean->SetInput(triangleFilter->GetOutput() ); >>>> #else >>>> clean->SetInputData(triangleFilter->GetOutput() ); >>>> #endif >>>> >>>> clean->ConvertPolysToLinesOff(); >>>> clean->ConvertLinesToPointsOff(); >>>> clean->Update(); >>>> >>>> std::string Inputfilename2="D:/cleaned.vtk";*/ >>>> >>>> //// >>>> /*polyDatawriter->SetInput(clean->GetOutput()); >>>> polyDatawriter->SetFileName(Inputfilename2.c_str()); >>>> polyDatawriter->ReleaseDataFlagOn(); >>>> polyDatawriter->Write(); */ >>>> >>>> typedef itk::MeshFileReader MeshReaderType; >>>> MeshReaderType::Pointer Meshreader = MeshReaderType::New(); >>>> Meshreader->SetFileName(Inputfilename.c_str( )); >>>> Meshreader->Update(); >>>> >>>> /*MeshType::Pointer mesh = Meshreader->GetOutput(); >>>> mesh->DisconnectPipeline();*/ >>>> >>>> >>>> QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); >>>> QEMeshSmoother->SetNumberOfIterations(1 ); >>>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>> QEMeshSmoother->SetDelaunayConforming(true); >>>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>> >>>> QEMeshSmoother->ReleaseDataFlagOn(); >>>> >>>> QEMeshSmoother->Update(); >>>> >>>> std::string Outputfilename="D:/tempOut.vtk"; >>>> >>>> typedef itk::MeshFileWriter MeshWriterType; >>>> MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); >>>> Meshwriter->SetFileName(Outputfilename.c_str( )); >>>> Meshwriter->SetInput(QEMeshSmoother->GetOutput()); >>>> Meshwriter->Update(); >>>> >>>> polyDatareader->SetFileName(Outputfilename.c_str() ); >>>> polyDatareader->ReleaseDataFlagOn(); >>>> polyDatareader->Update(); >>>> >>>> vtkSmartPointer stlWriter=vtkSmartPointer::New(); >>>> >>>> stlWriter->SetInput( polyDatareader->GetOutput()); >>>> stlWriter->SetFileName("D:/QEoutput.stl"); >>>> stlWriter->SetFileTypeToASCII(); >>>> stlWriter->Write(); >>>> >>>> //Here it stops and taking long time >>>> >>>> return 0; >>>> >>>> >>>> } >>>> //// >>>> >>>> >>>> >>>> On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K wrote: >>>> Hi Arnaud, >>>> >>>> Thanks for your reply and valuable suggestions. >>>> >>>> Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF. >>>> >>>> Thank you >>>> >>>> >>>> On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas wrote: >>>> Hi Malik, >>>> >>>> First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?). >>>> >>>> Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal). >>>> >>>> At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages? >>>> How large is your input mesh (number of points)? >>>> >>>> You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement. >>>> Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing). >>>> >>>> HTH >>>> Arnaud >>>> >>>> >>>> On Aug 6, 2014, at 10:42 AM, Mallikarjun K wrote: >>>> >>>>> Hi All, >>>>> >>>>> Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . >>>>> >>>>> >>>>> //// >>>>> >>>>> typedef itk::QuadEdgeMeshTraits qetraits; >>>>> >>>>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>>> >>>>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>>>> >>>>> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >>>>> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >>>>> >>>>> //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); >>>>> VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); >>>>> >>>>> VtkToItkReader->SetFileName("abc.vtk"); >>>>> VtkToItkReader->Update(); >>>>> >>>>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>>> SmoothingQuadEdgeMeshFilter; >>>>> >>>>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>>>> >>>>> >>>>> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >>>>> QEMeshSmoother->SetNumberOfIterations(5 ); >>>>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>>> QEMeshSmoother->SetDelaunayConforming(true ); >>>>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>>> >>>>> QEMeshSmoother->Update(); >>>>> >>>>> //// >>>>> >>>>> >>>>> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: >>>>> Thanks Bill for your answer. >>>>> >>>>> The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. >>>>> >>>>> Thanks for your help >>>>> >>>>> >>>>> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: >>>>> If you have it in vtk, I suggest using the vtk pipeline to smooth the data. >>>>> >>>>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K wrote: >>>>> > Hi Bill, >>>>> > Thanks for the replay. >>>>> > >>>>> > Yes,I built both ITK and my app with Release ,I forgot to mention it in the >>>>> > previous post.Actually the data set is the output of >>>>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved >>>>> > this marching cube's output as .vtk file and read it using >>>>> > itkVTKPolyDataReader and then I am giving this reader's output to >>>>> > itkSmoothingQuadEdgeMeshFilter's input. >>>>> > >>>>> > I checked the execution time of each step in the pipeline ,after >>>>> > SmothingQEMeshFilter has got it's input ,it is taking time to process the >>>>> > data. >>>>> > >>>>> > Thank you >>>>> > >>>>> > >>>>> > >>>>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen >>>>> > wrote: >>>>> >> >>>>> >> First, make sure you are building ITK and your app with Release. A >>>>> >> Debug build can be 10-50 times slower. >>>>> >> >>>>> >> >>>>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K >>>>> >> wrote: >>>>> >> > Hi All, >>>>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>>>> >> > smoothing.This >>>>> >> > filter is giving good results what I expected but taking more execution >>>>> >> > time.can any one suggest me to reduce the execution time( multi >>>>> >> > threading >>>>> >> > or any parameters to add/remove )? >>>>> >> > >>>>> >> > Below is the code snippet >>>>> >> > /////// >>>>> >> > typedef itk::QuadEdgeMeshTraits>>>> >> > > >>>>> >> > qetraits; >>>>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>>> >> > >>>>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>>>> >> > >>>>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>>>> >> > >>>>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>>> >> > SmoothingQuadEdgeMeshFilter; >>>>> >> > >>>>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>>>> >> > SmoothingQuadEdgeMeshFilter::New(); >>>>> >> > >>>>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>>>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>>>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>>>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>>> >> > QEMeshSmoother->Update(); >>>>> >> > //// >>>>> >> > >>>>> >> > -- >>>>> >> > Regards: >>>>> >> > Mallik >>>>> >> > >>>>> >> > >>>>> >> > _____________________________________ >>>>> >> > Powered by www.kitware.com >>>>> >> > >>>>> >> > Visit other Kitware open-source projects at >>>>> >> > http://www.kitware.com/opensource/opensource.html >>>>> >> > >>>>> >> > Kitware offers ITK Training Courses, for more information visit: >>>>> >> > http://www.kitware.com/products/protraining.php >>>>> >> > >>>>> >> > Please keep messages on-topic and check the 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 >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > -- >>>>> > Regards: >>>>> > Mallik >>>>> > >>>>> >>>>> >>>>> >>>>> -- >>>>> Unpaid intern in BillsBasement at noware dot com >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards: >>>>> Mallik >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards: >>>>> Mallik >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>>> >>>> >>>> >>>> -- >>>> Regards: >>>> Mallik >>>> >>>> >>>> >>>> >>>> -- >>>> Regards: >>>> Mallik >>>> >>> >>> >>> >>> >>> -- >>> Regards: >>> Mallik >>> >>> >> >> >> >> >> -- >> Regards: >> Mallik >> > > > > > -- > Regards: > Mallik > -------------- 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 arnaudgelas at gmail.com Thu Aug 21 07:00:52 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 21 Aug 2014 13:00:52 +0200 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> <305E1509-8EF7-4770-9236-3D639B9BF155@gmail.com> <8E777677-5A6C-47A1-9ED6-030C85AB48B5@gmail.com> Message-ID: <997CA50D-FE3F-4620-BBDD-CCCD9EB440E0@gmail.com> Here is the patch (for progress report): http://review.source.kitware.com/#/c/16769/ On Aug 21, 2014, at 12:47 PM, Arnaud Gelas wrote: > Hi, > > As of now, there is no progress event on this filter, so it is normal nothing happened. > > I'll submit another patch for progress event later today. > > To review the patch, you need to create an account on gerrit: > > http://review.source.kitware.com > > Then you ca volunteer to the review patch, you can add comments, accept, refuse? > Else once you are registered, you can send me an email and I will add you as a reviewer. > > Best, > Arnaud > > On Aug 21, 2014, at 12:11 PM, Mallikarjun K wrote: > >> Hi, >> I am trying observe the progressEvent by using AddObserver method of this filter but I couldn't. Could you check the below code once. >> >> And one more thing,Could you guide me what exactly I have to do to Review the patch you have submitted. >> >> Thank you >> >> >> ///progress >> >> #include >> #include >> >> #include >> #include >> #include >> #include >> #include "itkMesh.h" >> #include "itkQuadEdgeMesh.h" >> #include "itkQuadEdgeMeshTraits.h" >> #include "itkSmoothingQuadEdgeMeshFilter.h" >> #include "itkCommand.h" >> >> class MyCommand : public itk::Command >> { >> public: >> itkNewMacro( MyCommand ); >> >> public: >> >> void Execute(itk::Object *caller, const itk::EventObject & event) >> { >> Execute( (const itk::Object *)caller, event); >> } >> >> void Execute(const itk::Object * object, const itk::EventObject & event) >> { >> std::cout << "Command called." << std::endl; >> >> if( typeid( itk::ProgressEvent ) == typeid( event ) ) >> { >> ::itk::ProcessObject::ConstPointer process = >> dynamic_cast< const itk::ProcessObject *>( object/*caller*/ ); >> >> const int value = static_cast(process->GetProgress() * 100 ); >> std::cout<<"progress:"<> >> >> >> } >> >> } >> >> }; >> >> int main( int argc, char* argv[] ) >> { >> >> /*if( argc < 2 ) >> { >> std::cerr << "Usage: " << std::endl; >> std::cerr << argv[0] << " inputImageFile outputImageFile flipAxisX flipAxisY" << std::endl; >> return EXIT_FAILURE; >> }*/ >> >> std::string Inputfilename="D:\\temp.vtk"; >> typedef itk::QuadEdgeMeshTraits qetraits; >> typedef itk::QuadEdgeMesh< double, 3,qetraits > MeshType; >> >> itk::OnesMatrixCoefficients< MeshType > coeff0; >> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; >> >> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >> >> typedef itk::MeshFileReader MeshReaderType; >> MeshReaderType::Pointer Meshreader = MeshReaderType::New(); >> Meshreader->SetFileName( Inputfilename.c_str()/*argv[1]*/ ); >> // Meshreader->Update(); >> >> >> MyCommand::Pointer myCommand = MyCommand::New(); >> >> QEMeshSmoother->SetInput(Meshreader->GetOutput() ); >> QEMeshSmoother->SetNumberOfIterations( 1 ); >> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> QEMeshSmoother->SetDelaunayConforming(true); >> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> QEMeshSmoother->AddObserver(itk::ProgressEvent, myCommand); >> >> // QEMeshSmoother->Update(); >> std::string Outputfilename="D:\\tempOut2.vtk"; >> >> typedef itk::MeshFileWriter MeshWriterType; >> MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); >> Meshwriter->SetFileName(Outputfilename.c_str() /*argv[2]*/ ); >> Meshwriter->SetInput(QEMeshSmoother->GetOutput()); >> >> try >> { >> Meshwriter->Update(); >> } >> catch( itk::ExceptionObject& e ) >> { >> std::cerr << e.what() << std::endl; >> } >> >> return 0; >> >> >> } >> >> >> On Wed, Aug 20, 2014 at 7:33 PM, Arnaud Gelas wrote: >> Hi, >> >> I have just submitted this patch for the documentation, can you please review it? >> >> http://review.source.kitware.com/#/c/16755/ >> >> I was running this code on Mac i5 with 4GB RAM, with both ITK and this program compiled in Debug? >> >> Best, >> Arnaud >> >> On Aug 7, 2014, at 5:20 PM, Mallikarjun K wrote: >> >>> Hi Arnaud, >>> >>> Thanks,Can you please tell me your machine confuguration. I am running 4GB RAM,i3 on windows7. >>> I have downloaded your project and tried to execute it and it is still the same problem Which I was facing earlier.Any suggestions ..... >>> >>> thank you >>> >>> >>> On Thu, Aug 7, 2014 at 8:10 PM, Arnaud Gelas wrote: >>> It takes 29s on my machine in debug to run 5 iterations with Delaunay conforming set to true >>> >>> https://gist.github.com/arnaudgelas/0f20ebdaf53956f79997 >>> >>> >>> On Aug 7, 2014, at 3:45 PM, Mallikarjun K wrote: >>> >>>> File path is correct.if it is '\'(backward slash) we have to add "D:\\" .since I used '/' it's not required to add "//". >>>> >>>> please find the attached .vtk file >>>> >>>> Thanks >>>> >>>> >>>> On Thu, Aug 7, 2014 at 7:01 PM, Arnaud Gelas wrote: >>>> Shouldn't it be D://temp.vtk ? Isn't it missing one '/' ? >>>> >>>> Can you send this vtk file? >>>> >>>> >>>> On Aug 7, 2014, at 3:23 PM, Mallikarjun K wrote: >>>> >>>>> Hi Arnaud, >>>>> >>>>> Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ? >>>>> >>>>> ///// >>>>> #include >>>>> #include >>>>> >>>>> #include >>>>> #include >>>>> #include >>>>> #include >>>>> #include >>>>> #include >>>>> #include >>>>> #include >>>>> #include "itkMesh.h" >>>>> #include "itkQuadEdgeMesh.h" >>>>> #include "itkQuadEdgeMeshTraits.h" >>>>> #include "itkSmoothingQuadEdgeMeshFilter.h" >>>>> #include "vtkSTLWriter.h" >>>>> #include >>>>> >>>>> int main() >>>>> { >>>>> std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K >>>>> >>>>> typedef itk::QuadEdgeMeshTraits qetraits; >>>>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>>> >>>>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>>>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; >>>>> >>>>> vtkSmartPointer polyDatawriter=vtkSmartPointer::New(); >>>>> vtkSmartPointer polyDatareader=vtkSmartPointer::New(); >>>>> >>>>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>>>> >>>>> /* polyDatareader->SetFileName(Inputfilename.c_str() ); >>>>> polyDatareader->ReleaseDataFlagOn(); >>>>> polyDatareader->Update();*/ >>>>> >>>>> /*vtkSmartPointer triangleFilter = >>>>> vtkSmartPointer::New(); >>>>> triangleFilter->SetInput(polyDatareader->GetOutput()); >>>>> triangleFilter->Update();*/ >>>>> >>>>> // >>>>> /* vtkSmartPointer clean = vtkSmartPointer::New(); >>>>> #if (VTK_MAJOR_VERSION < 6) >>>>> clean->SetInput(triangleFilter->GetOutput() ); >>>>> #else >>>>> clean->SetInputData(triangleFilter->GetOutput() ); >>>>> #endif >>>>> >>>>> clean->ConvertPolysToLinesOff(); >>>>> clean->ConvertLinesToPointsOff(); >>>>> clean->Update(); >>>>> >>>>> std::string Inputfilename2="D:/cleaned.vtk";*/ >>>>> >>>>> //// >>>>> /*polyDatawriter->SetInput(clean->GetOutput()); >>>>> polyDatawriter->SetFileName(Inputfilename2.c_str()); >>>>> polyDatawriter->ReleaseDataFlagOn(); >>>>> polyDatawriter->Write(); */ >>>>> >>>>> typedef itk::MeshFileReader MeshReaderType; >>>>> MeshReaderType::Pointer Meshreader = MeshReaderType::New(); >>>>> Meshreader->SetFileName(Inputfilename.c_str( )); >>>>> Meshreader->Update(); >>>>> >>>>> /*MeshType::Pointer mesh = Meshreader->GetOutput(); >>>>> mesh->DisconnectPipeline();*/ >>>>> >>>>> >>>>> QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); >>>>> QEMeshSmoother->SetNumberOfIterations(1 ); >>>>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>>> QEMeshSmoother->SetDelaunayConforming(true); >>>>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>>> >>>>> QEMeshSmoother->ReleaseDataFlagOn(); >>>>> >>>>> QEMeshSmoother->Update(); >>>>> >>>>> std::string Outputfilename="D:/tempOut.vtk"; >>>>> >>>>> typedef itk::MeshFileWriter MeshWriterType; >>>>> MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); >>>>> Meshwriter->SetFileName(Outputfilename.c_str( )); >>>>> Meshwriter->SetInput(QEMeshSmoother->GetOutput()); >>>>> Meshwriter->Update(); >>>>> >>>>> polyDatareader->SetFileName(Outputfilename.c_str() ); >>>>> polyDatareader->ReleaseDataFlagOn(); >>>>> polyDatareader->Update(); >>>>> >>>>> vtkSmartPointer stlWriter=vtkSmartPointer::New(); >>>>> >>>>> stlWriter->SetInput( polyDatareader->GetOutput()); >>>>> stlWriter->SetFileName("D:/QEoutput.stl"); >>>>> stlWriter->SetFileTypeToASCII(); >>>>> stlWriter->Write(); >>>>> >>>>> //Here it stops and taking long time >>>>> >>>>> return 0; >>>>> >>>>> >>>>> } >>>>> //// >>>>> >>>>> >>>>> >>>>> On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K wrote: >>>>> Hi Arnaud, >>>>> >>>>> Thanks for your reply and valuable suggestions. >>>>> >>>>> Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF. >>>>> >>>>> Thank you >>>>> >>>>> >>>>> On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas wrote: >>>>> Hi Malik, >>>>> >>>>> First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?). >>>>> >>>>> Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal). >>>>> >>>>> At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages? >>>>> How large is your input mesh (number of points)? >>>>> >>>>> You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement. >>>>> Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing). >>>>> >>>>> HTH >>>>> Arnaud >>>>> >>>>> >>>>> On Aug 6, 2014, at 10:42 AM, Mallikarjun K wrote: >>>>> >>>>>> Hi All, >>>>>> >>>>>> Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . >>>>>> >>>>>> >>>>>> //// >>>>>> >>>>>> typedef itk::QuadEdgeMeshTraits qetraits; >>>>>> >>>>>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>>>> >>>>>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>>>>> >>>>>> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >>>>>> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >>>>>> >>>>>> //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); >>>>>> VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); >>>>>> >>>>>> VtkToItkReader->SetFileName("abc.vtk"); >>>>>> VtkToItkReader->Update(); >>>>>> >>>>>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>>>> SmoothingQuadEdgeMeshFilter; >>>>>> >>>>>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>>>>> >>>>>> >>>>>> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >>>>>> QEMeshSmoother->SetNumberOfIterations(5 ); >>>>>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>>>> QEMeshSmoother->SetDelaunayConforming(true ); >>>>>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>>>> >>>>>> QEMeshSmoother->Update(); >>>>>> >>>>>> //// >>>>>> >>>>>> >>>>>> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: >>>>>> Thanks Bill for your answer. >>>>>> >>>>>> The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. >>>>>> >>>>>> Thanks for your help >>>>>> >>>>>> >>>>>> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: >>>>>> If you have it in vtk, I suggest using the vtk pipeline to smooth the data. >>>>>> >>>>>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K wrote: >>>>>> > Hi Bill, >>>>>> > Thanks for the replay. >>>>>> > >>>>>> > Yes,I built both ITK and my app with Release ,I forgot to mention it in the >>>>>> > previous post.Actually the data set is the output of >>>>>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved >>>>>> > this marching cube's output as .vtk file and read it using >>>>>> > itkVTKPolyDataReader and then I am giving this reader's output to >>>>>> > itkSmoothingQuadEdgeMeshFilter's input. >>>>>> > >>>>>> > I checked the execution time of each step in the pipeline ,after >>>>>> > SmothingQEMeshFilter has got it's input ,it is taking time to process the >>>>>> > data. >>>>>> > >>>>>> > Thank you >>>>>> > >>>>>> > >>>>>> > >>>>>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen >>>>>> > wrote: >>>>>> >> >>>>>> >> First, make sure you are building ITK and your app with Release. A >>>>>> >> Debug build can be 10-50 times slower. >>>>>> >> >>>>>> >> >>>>>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K >>>>>> >> wrote: >>>>>> >> > Hi All, >>>>>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>>>>> >> > smoothing.This >>>>>> >> > filter is giving good results what I expected but taking more execution >>>>>> >> > time.can any one suggest me to reduce the execution time( multi >>>>>> >> > threading >>>>>> >> > or any parameters to add/remove )? >>>>>> >> > >>>>>> >> > Below is the code snippet >>>>>> >> > /////// >>>>>> >> > typedef itk::QuadEdgeMeshTraits>>>>> >> > > >>>>>> >> > qetraits; >>>>>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>>>> >> > >>>>>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>>>>> >> > >>>>>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>>>>> >> > >>>>>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>>>> >> > SmoothingQuadEdgeMeshFilter; >>>>>> >> > >>>>>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>>>>> >> > SmoothingQuadEdgeMeshFilter::New(); >>>>>> >> > >>>>>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>>>>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>>>>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>>>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>>>>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>>>> >> > QEMeshSmoother->Update(); >>>>>> >> > //// >>>>>> >> > >>>>>> >> > -- >>>>>> >> > Regards: >>>>>> >> > Mallik >>>>>> >> > >>>>>> >> > >>>>>> >> > _____________________________________ >>>>>> >> > Powered by www.kitware.com >>>>>> >> > >>>>>> >> > Visit other Kitware open-source projects at >>>>>> >> > http://www.kitware.com/opensource/opensource.html >>>>>> >> > >>>>>> >> > Kitware offers ITK Training Courses, for more information visit: >>>>>> >> > http://www.kitware.com/products/protraining.php >>>>>> >> > >>>>>> >> > Please keep messages on-topic and check the 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 >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > -- >>>>>> > Regards: >>>>>> > Mallik >>>>>> > >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Unpaid intern in BillsBasement at noware dot com >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Regards: >>>>>> Mallik >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Regards: >>>>>> Mallik >>>>>> >>>>>> _____________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>> http://www.kitware.com/products/protraining.php >>>>>> >>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards: >>>>> Mallik >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards: >>>>> Mallik >>>>> >>>> >>>> >>>> >>>> >>>> -- >>>> Regards: >>>> Mallik >>>> >>>> >>> >>> >>> >>> >>> -- >>> Regards: >>> Mallik >>> >> >> >> >> >> -- >> Regards: >> Mallik >> > -------------- 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 maximilian_oliver.mordig at roche.com Thu Aug 21 10:52:53 2014 From: maximilian_oliver.mordig at roche.com (maximilian) Date: Thu, 21 Aug 2014 07:52:53 -0700 (PDT) Subject: [ITK] [ITK-users] Modifying ValueAt function of SpatialObject Message-ID: <1408632773158-7586101.post@n2.nabble.com> Dear all, I am using the itk::SpatialObjectToImageFilter to convert a GroupSpatialObject (collection of several spatial objects) to an image. This filter is fine, however, if several spatial objects overlap at a location, the image's pixel value of that location is the first value returned by any spatial object in GroupSpatialObject (the ValueAt function is implemented in SpatialObject.hxx and iterates through its children; if one children matches, its value is immediately returned). I wanted the change the ValueAt() function to add up all the values returned by the ValueAt function if several SpatialObjects overlap at a location. To change the behavior, I have to inherit my new class, let's call it A, from GroupSpatialObject (collection of SpatialObjects) and redefine the method ValueAt(). The ValueAt() function in A has to be very similar to the ValueAt() defined in SpatialObject, but add up the values returned by its children spatial objects (instead of returning just the first match as it is currently implemented). The problem is that I need access m_TreeNode that is a list of all children (i.e. all objects contained in the GroupSpatialObject) to get the values of each child. However, m_TreeNode is declared private in the SpatialObject class. How can I circumvent this? Of course, I could copy-paste SpatialObject into a new class, but I consider this a very ugly solution, because I have to do so for all derived classes (like GroupSpatialObject, among others). Regards, Maximilian -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Modifying-ValueAt-function-of-SpatialObject-tp7586101.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 nicgallego at gmail.com Thu Aug 21 12:55:09 2014 From: nicgallego at gmail.com (Nicolas Gallego) Date: Thu, 21 Aug 2014 18:55:09 +0200 Subject: [ITK] Compiling ITK tests and examples, can It done module by module In-Reply-To: References: Message-ID: Hi Matt, Hello everybody, Just a further question of this issue I asked a while ago, I am trying to build, as you said, selected examples using the build target as make ExampleName, I am on Ubuntu and I just built itk 4.5 without the BUILD_EXAMPLES flag. Compilation went Ok. Now on the build directory, say I need the example Mesh1.cxx, the try on the built directory make Mesh1 but I get the following error, make: *** No rule to make target `Mesh1'. Stop. What I am missing? Thank you Nicol?s Gallego-Ortiz Universit? catholique de Louvain, Belgium 2014-07-10 18:42 GMT+02:00 Matt McCormick : > Hi Nicolas, > > If individual modules are selected during CMake configuration, only > those tests will be built an run. Unfortunately, when BUILD_EXAMPLES > is ON, all examples will be built. To just build select examples the > best current option is to select the corresponding build target. This > is build system specific. With Unix Makefiles, for example, > > make ExampleName > > Hope this helps, > Matt > > > > On Thu, Jul 10, 2014 at 12:15 PM, Nicolas Gallego > wrote: > > Hi, > > > > Here is a naive question, after waiting long time and seeing how much > disk > > space a complete compilation of ITK library takes, with all examples and > > tests. > > > > Is it possible to specify to compile just a subset of examples and tests? > > Before I have copied and pasted out some source code to achieve this but > I > > guess there should be a nicer way to do it. > > > > Thank you, > > > > Nicol?s Gallego-Ortiz > > Universit? catholique de Louvain, Belgium > > > > _______________________________________________ > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Aug 21 12:57:35 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 21 Aug 2014 12:57:35 -0400 Subject: [ITK] Compiling ITK tests and examples, can It done module by module In-Reply-To: References: Message-ID: You must turn BUILD_EXAMPLES on. Then you can build individual examples. On Thu, Aug 21, 2014 at 12:55 PM, Nicolas Gallego wrote: > Hi Matt, Hello everybody, > > Just a further question of this issue I asked a while ago, > > I am trying to build, as you said, selected examples using the build target > > as > > make ExampleName, > > I am on Ubuntu and I just built itk 4.5 without the BUILD_EXAMPLES flag. > Compilation went Ok. > Now on the build directory, say I need the example Mesh1.cxx, the try on the > built directory > > make Mesh1 > > but I get the following error, > > make: *** No rule to make target `Mesh1'. Stop. > > What I am missing? Thank you > > Nicol?s Gallego-Ortiz > Universit? catholique de Louvain, Belgium > > > 2014-07-10 18:42 GMT+02:00 Matt McCormick : > >> Hi Nicolas, >> >> If individual modules are selected during CMake configuration, only >> those tests will be built an run. Unfortunately, when BUILD_EXAMPLES >> is ON, all examples will be built. To just build select examples the >> best current option is to select the corresponding build target. This >> is build system specific. With Unix Makefiles, for example, >> >> make ExampleName >> >> Hope this helps, >> Matt >> >> >> >> On Thu, Jul 10, 2014 at 12:15 PM, Nicolas Gallego >> wrote: >> > Hi, >> > >> > Here is a naive question, after waiting long time and seeing how much >> > disk >> > space a complete compilation of ITK library takes, with all examples and >> > tests. >> > >> > Is it possible to specify to compile just a subset of examples and >> > tests? >> > Before I have copied and pasted out some source code to achieve this but >> > I >> > guess there should be a nicer way to do it. >> > >> > Thank you, >> > >> > Nicol?s Gallego-Ortiz >> > Universit? catholique de Louvain, Belgium >> > >> > _______________________________________________ >> > 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 > > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > -- Unpaid intern in BillsBasement at noware dot com From nicgallego at gmail.com Thu Aug 21 12:59:08 2014 From: nicgallego at gmail.com (Nicolas Gallego) Date: Thu, 21 Aug 2014 18:59:08 +0200 Subject: [ITK] Compiling ITK tests and examples, can It done module by module In-Reply-To: References: Message-ID: Sorry, I just figured it out BUILD_EXAMPLES should be ON then make ExampleName works Nicol?s Gallego-Ortiz Universit? catholique de Louvain, Belgium 2014-08-21 18:55 GMT+02:00 Nicolas Gallego : > Hi Matt, Hello everybody, > > Just a further question of this issue I asked a while ago, > > I am trying to build, as you said, selected examples using the build target > > as > > make ExampleName, > > I am on Ubuntu and I just built itk 4.5 without the BUILD_EXAMPLES flag. > Compilation went Ok. > Now on the build directory, say I need the example Mesh1.cxx, the try on > the built directory > > make Mesh1 > > but I get the following error, > > make: *** No rule to make target `Mesh1'. Stop. > > What I am missing? Thank you > > Nicol?s Gallego-Ortiz > Universit? catholique de Louvain, Belgium > > > 2014-07-10 18:42 GMT+02:00 Matt McCormick : > > Hi Nicolas, >> >> If individual modules are selected during CMake configuration, only >> those tests will be built an run. Unfortunately, when BUILD_EXAMPLES >> is ON, all examples will be built. To just build select examples the >> best current option is to select the corresponding build target. This >> is build system specific. With Unix Makefiles, for example, >> >> make ExampleName >> >> Hope this helps, >> Matt >> >> >> >> On Thu, Jul 10, 2014 at 12:15 PM, Nicolas Gallego >> wrote: >> > Hi, >> > >> > Here is a naive question, after waiting long time and seeing how much >> disk >> > space a complete compilation of ITK library takes, with all examples and >> > tests. >> > >> > Is it possible to specify to compile just a subset of examples and >> tests? >> > Before I have copied and pasted out some source code to achieve this >> but I >> > guess there should be a nicer way to do it. >> > >> > Thank you, >> > >> > Nicol?s Gallego-Ortiz >> > Universit? catholique de Louvain, Belgium >> > >> > _______________________________________________ >> > 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 >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bilgincc at gmail.com Thu Aug 21 13:33:53 2014 From: bilgincc at gmail.com (Cagatay Bilgin) Date: Thu, 21 Aug 2014 10:33:53 -0700 Subject: [ITK] [ITK-users] Different output with dense and sparse level set representations Message-ID: Hello everybody, I continue with my exploration of the new level set framework. I have modified one of the examples and have an advection field in the positive x direction. I would expect the initial contour to move in that direction and that's the case with the sparse representation. Using the dense representation however, only half of the contour moves to my surprise. Is this a bug or I am missing something here. Here is the code and the cmake file and snapshots of the movements. [image: Inline image 2][image: Inline image 1] #include "itkBinaryImageToLevelSetImageAdaptor.h" #include "itkLevelSetContainer.h" #include "itkLevelSetEquationPropagationTerm.h" #include "itkLevelSetEquationAdvectionTerm.h" #include "itkLevelSetEquationContainer.h" #include "itkLevelSetEquationTermContainer.h" #include "itkLevelSetEvolution.h" #include "itkLevelSetEvolutionNumberOfIterationsStoppingCriterion.h" #include "itkLevelSetDenseImage.h" #include "itkVTKVisualizeImageLevelSetIsoValues.h" #include "itkSinRegularizedHeavisideStepFunction.h" #include "itkLevelSetIterationUpdateCommand.h" #include "itkLevelSetEquationCurvatureTerm.h" #include "itkWhitakerSparseLevelSetImage.h" #include "itkLevelSetSparseImage.h" typedef itk::Image< float, 2 > FIT; void CreateSquareImage(FIT::Pointer image, FIT::Pointer prop, FIT::Pointer advec) { FIT::RegionType region; FIT::IndexType start; start[0] = 0; start[1] = 0; FIT::SizeType size; size[0] = 100; size[1] = 100; region.SetSize(size); region.SetIndex(start); image->SetRegions(region); image->Allocate(); image->FillBuffer(0); //constant grow in all directions prop->SetRegions(image->GetLargestPossibleRegion()); prop->Allocate(); prop->FillBuffer(1); //advec will increase in positive x direction advec->SetRegions(image->GetLargestPossibleRegion()); advec->Allocate(); advec->FillBuffer(0); // Set pixels in a square to one value for(unsigned int x = 35; x < 65; x++){ for(unsigned int y = 35; y < 65; y++){ FIT::IndexType pixelIndex; pixelIndex[0] = x; pixelIndex[1] = y; image->SetPixel(pixelIndex, 255); } } //advection in positive x direction for(unsigned int x = 0; x < 100; x++){ for(unsigned int y = 0; y < 100; y++){ FIT::IndexType pixelIndex; pixelIndex[0] = x; pixelIndex[1] = y; advec->SetPixel(pixelIndex, x); } } } /* */ int main(int argc, char* argv[] ) { using namespace itk; if(argc != 5) { std::cerr << "Missing Arguments" << std::endl; std::cerr << argv[0] << std::endl; std::cerr << "1- Number of Iterations" << std::endl; std::cerr << "2- Propagation Term" << std::endl; std::cerr << "3- Advection Term" << std::endl; std::cerr << "4- Curvature Term" << std::endl; return EXIT_FAILURE; } FIT::Pointer input = FIT::New(); FIT::Pointer prop = FIT::New(); FIT::Pointer advec = FIT::New(); CreateSquareImage(input, prop, advec); int numberOfIterations = atoi(argv[1]); typedef float LSPT; typedef Image< LSPT, 2 > LSIT; typedef LevelSetDenseImage< LSIT > LST; //typedef WhitakerSparseLevelSetImage< LSPT, 2 > LST; typedef LST::OutputRealType LSOutputT; // convert a binary mask to a level-set function typedef BinaryImageToLevelSetImageAdaptor BI2LST; BI2LST::Pointer adaptor = BI2LST::New(); adaptor->SetInputImage(input ); adaptor->Initialize(); LST::Pointer levelSet = adaptor->GetLevelSet(); // The Heaviside function typedef SinRegularizedHeavisideStepFunction HeavisideFunctionType; HeavisideFunctionType::Pointer heaviside = HeavisideFunctionType::New(); heaviside->SetEpsilon(1 ); // Create the level set container typedef LevelSetContainer< IdentifierType, LST > LSContainerT; LSContainerT::Pointer levelSetContainer = LSContainerT::New(); levelSetContainer->SetHeaviside(heaviside ); levelSetContainer->AddLevelSet(0, levelSet ); // Create the terms. typedef LevelSetEquationPropagationTerm PropT; PropT::Pointer propagationTerm = PropT::New(); propagationTerm->SetInput(prop); propagationTerm->SetCoefficient(atof(argv[2])); typedef LevelSetEquationAdvectionTerm AdvecT; AdvecT::Pointer advectionTerm = AdvecT::New(); advectionTerm->SetInput(advec); advectionTerm->SetCoefficient(atof(argv[3])); typedef LevelSetEquationCurvatureTerm CurvT; CurvT::Pointer curvatureTerm = CurvT::New(); curvatureTerm->SetCoefficient(atof(argv[4])); // Create term container (equation rhs) typedef LevelSetEquationTermContainer< FIT, LSContainerT > TermContainerT; TermContainerT::Pointer termContainer = TermContainerT::New(); termContainer->SetLevelSetContainer(levelSetContainer ); termContainer->SetInput(input ); termContainer->AddTerm(0, curvatureTerm ); termContainer->AddTerm(1, advectionTerm ); termContainer->AddTerm(2, propagationTerm ); // Create equation container typedef LevelSetEquationContainer< TermContainerT > EquationContainerType; EquationContainerType::Pointer equationContainer = EquationContainerType::New(); equationContainer->SetLevelSetContainer(levelSetContainer ); equationContainer->AddEquation(0, termContainer ); // Create stopping criteria typedef LevelSetEvolutionNumberOfIterationsStoppingCriterion< LSContainerT > StoppingCriterionType; StoppingCriterionType::Pointer criterion = StoppingCriterionType::New(); criterion->SetNumberOfIterations(numberOfIterations ); // Create the visualizer typedef VTKVisualizeImageLevelSetIsoValues< FIT, LST > VisT; VisT::Pointer visualizer = VisT::New(); visualizer->SetInputImage(input ); visualizer->SetLevelSet(levelSet ); visualizer->SetScreenCapture(true ); // Create evolution class typedef LevelSetEvolution< EquationContainerType, LST > LSEvolT; LSEvolT::Pointer evolution = LSEvolT::New(); evolution->SetEquationContainer(equationContainer ); evolution->SetStoppingCriterion(criterion ); evolution->SetLevelSetContainer(levelSetContainer ); typedef LevelSetIterationUpdateCommand< LSEvolT, VisT > IterationUpdateCommandType; IterationUpdateCommandType::Pointer iterationUpdateCommand = IterationUpdateCommandType::New(); iterationUpdateCommand->SetFilterToUpdate(visualizer ); iterationUpdateCommand->SetUpdatePeriod(1 ); evolution->AddObserver(IterationEvent(), iterationUpdateCommand ); evolution->Update(); return EXIT_SUCCESS; } cmake_minimum_required(VERSION 2.8) project(Motion) find_package(ITK REQUIRED) include(${ITK_USE_FILE}) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(Motion main.cpp) target_link_libraries(Motion ${ITK_LIBRARIES} ${VTK_LIBRARIES}) Params used for the experiment: Ran sparse representation with ./Motion 15 0 1 1 Ran dense representation with ./Motion 15 0 1 0 Cemal Cagatay Bilgin, PhD Life Sciences Division Lawrence Berkeley National Lab MS977, One Cyclotron Road Berkeley, CA 94720, USA Email: ccbilgin at lbl.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sparse_00015.png Type: image/png Size: 2848 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dense_00010.png Type: image/png Size: 2737 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 matt.mccormick at kitware.com Thu Aug 21 17:54:56 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 21 Aug 2014 17:54:56 -0400 Subject: [ITK] Friday gathering Message-ID: Hi, I will not be able to host or attend the regular gathering tomorrow. If someone is interested in hosting, please do so. Thanks, Matt From arnaudgelas at gmail.com Fri Aug 22 02:58:34 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Fri, 22 Aug 2014 08:58:34 +0200 Subject: [ITK] [ITK-users] combining N images In-Reply-To: <41BB5486-E3F6-4196-8E58-C59F514C8800@mail.nih.gov> References: <41BB5486-E3F6-4196-8E58-C59F514C8800@mail.nih.gov> Message-ID: Hi Brad, Thanks for the link! It helped me to get on track... In the end, it was not that complicated to do all in one filter (let me know if anyone is interested). Arnaud On Wed, Aug 20, 2014 at 6:53 PM, Bradley Lowekamp wrote: > This may be of some use: > > > https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkBoundingRegionImageSinc.h > > On Aug 20, 2014, at 11:51 AM, Arnaud Gelas wrote: > > Hi, > > I do not want to add images, it is more something like pasting but I do > not know in advance what would be the output image size, but it would be at > least the bounding box of all images... > > Arnaud > > On Wednesday, August 20, 2014, Mordig, Maximilian Oliver < > maximilian_oliver.mordig at roche.com> wrote: > >> Once you have resampled all images, you can use the itk AddFilter. >> >> >> On Wed, Aug 20, 2014 at 4:28 PM, Arnaud Gelas >> wrote: >> >>> Hi all, >>> >>> I am trying to combine N images together into a single image of the same >>> dimension. >>> >>> These N images have the same direction, but can have different origin, >>> start index, spacing, size (there is no overlap). Then gaps in between >>> images would be filled with a given constant value. >>> >>> Is there such a filter? or assuming I have already resampled all images >>> to a common ground, is there a filter to do this? >>> >>> 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 >>> >>> _______________________________________________ >>> 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 > > _______________________________________________ > 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 vincent.ngai at gmail.com Fri Aug 22 03:30:44 2014 From: vincent.ngai at gmail.com (vincent ngai) Date: Fri, 22 Aug 2014 15:30:44 +0800 Subject: [ITK] [ITK-users] Silly question on itk::Matrix Message-ID: Hi all, pardon me for this silly question on itk::Matrix. Why do I need to transpose a translation matrix after I copy the [x,y,z] translation values to the matrix[3]. I know conceptually it should not really matter whether its row or col major so long as you can post multiply or pre multiply with another vector. But the way operator*() works only allows for Matrix * P, and when I test the simple case of TranslationMatrix * Point, I would have to transpose the matrix. If I could also do Point * TranslationMatrix, then i wouldn't need to transpose. Any ideas? -- Regards, Vincent -------------- 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 millerjv at gmail.com Fri Aug 22 07:14:11 2014 From: millerjv at gmail.com (Jim Miller) Date: Fri, 22 Aug 2014 07:14:11 -0400 Subject: [ITK] [ITK-users] Silly question on itk::Matrix In-Reply-To: References: Message-ID: <0BBC89C9-0F67-48F1-99F4-AC89AF5C394B@gmail.com> ITK standard is that points are column vectors. Thus, matrix times a point a point is defined as Mat * P Jim > On Aug 22, 2014, at 3:30 AM, vincent ngai wrote: > > Hi all, pardon me for this silly question on itk::Matrix. Why do I need to transpose a translation matrix after I copy the [x,y,z] translation values to the matrix[3]. > > I know conceptually it should not really matter whether its row or col major so long as you can > post multiply or pre multiply with another vector. But the way operator*() works only allows for > Matrix * P, and when I test the simple case of TranslationMatrix * Point, I would have to transpose the matrix. If I could also do Point * TranslationMatrix, then i wouldn't need to transpose. > > Any ideas? > > -- > Regards, > Vincent > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 gowithking at googlemail.com Fri Aug 22 10:06:42 2014 From: gowithking at googlemail.com (gowith king) Date: Fri, 22 Aug 2014 16:06:42 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: gowith king Date: Fri, Aug 22, 2014 at 1:32 PM Subject: ITK and python wrap problem To: community at itk.org Dear ITK friends I am not sure this is an appropriate place to issue my problem in the wrapping process: I followed the instruction of ' http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. Then I tried one line for test : >>> import itk >>> inputimage=itk.Image[itk.UC,3] Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ itkBase.LoadModule(module, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule module = loader.load(swigModuleName) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load return imp.load_module(name, fp, pathname, description) File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in _ITKCommonPython = swig_import_helper() File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory I got totally lost for this, what should I do to fix this? Any suggestion would be appreciated -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Fri Aug 22 10:15:57 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Fri, 22 Aug 2014 16:15:57 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: Message-ID: Hi Some important questions first: What was the warning for the library mismatch ? On what OS are you installing ? Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? If the warnings were about the python library, it is quite important. It may happen that you have two different python installations, and cmake is not able to find the right libraries. I wrote some instructions to install ITK with python wrapping on Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora There is a list of cmake flags you can set to help cmake find the right python, if it?s the problem you had. I think the error is just because the library is not in your path. If you are using Fedora, just follow the instructions I wrote down. For other OS?es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this) Feedback is welcome so I can improve the installation instructions :) Michka On 22 ao?t 2014, at 16:06, gowith king wrote: > > > ---------- Forwarded message ---------- > From: gowith king > Date: Fri, Aug 22, 2014 at 1:32 PM > Subject: ITK and python wrap problem > To: community at itk.org > > > Dear ITK friends > I am not sure this is an appropriate place to issue my problem in the wrapping process: > I followed the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. > Then I tried one line for test : > >>> import itk > >>> inputimage=itk.Image[itk.UC,3] > Traceback (most recent call last): > File "", line 1, in > File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ > itkBase.LoadModule(module, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule > module = loader.load(swigModuleName) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load > return imp.load_module(name, fp, pathname, description) > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in > _ITKCommonPython = swig_import_helper() > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper > _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) > ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory > > I got totally lost for this, what should I do to fix this? > Any suggestion would be appreciated > > > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Fri Aug 22 11:30:00 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Fri, 22 Aug 2014 17:30:00 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: Message-ID: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Please keep the discussion on the mailing list :) Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. Seems on ubuntu the procedure is the same for loading the shared libraries: http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. Michka On 22 ao?t 2014, at 17:21, gowith king wrote: > Dear Popoff > I am using Ubuntu 12.04 LTS. the warning is the mismatching of python library and python executable : python executable "2.7.3" and library "" is mismatched. Here is the option setting: > > > PYTHON_EXECUTABLE /usr/bin/python > PYTHON_INCLUDE_DIR /usr/include/python2.7 > PYTHON_LIBRARY /usr/lib/libpython2.7.so > PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages > > The libitkvnl_algo-4.7.so file exist in /usr/local/lib . > > I do have few python versions been installed in the same OS. > The flags in the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' are not exact as the same as the description. I will try your instruction step be step in my system. > By the way, your instruction is so practical. > > Have a nice day. > > > > > > On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff wrote: > Hi > > Some important questions first: > > What was the warning for the library mismatch ? > On what OS are you installing ? > Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? > > If the warnings were about the python library, it is quite important. > It may happen that you have two different python installations, and cmake is not able to find the right libraries. > > I wrote some instructions to install ITK with python wrapping on Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora > There is a list of cmake flags you can set to help cmake find the right python, if it?s the problem you had. > I think the error is just because the library is not in your path. If you are using Fedora, just follow the instructions I wrote down. > For other OS?es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this) > > Feedback is welcome so I can improve the installation instructions :) > > Michka > > On 22 ao?t 2014, at 16:06, gowith king wrote: > >> >> >> ---------- Forwarded message ---------- >> From: gowith king >> Date: Fri, Aug 22, 2014 at 1:32 PM >> Subject: ITK and python wrap problem >> To: community at itk.org >> >> >> Dear ITK friends >> I am not sure this is an appropriate place to issue my problem in the wrapping process: >> I followed the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. >> Then I tried one line for test : >> >>> import itk >> >>> inputimage=itk.Image[itk.UC,3] >> Traceback (most recent call last): >> File "", line 1, in >> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ >> itkBase.LoadModule(module, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule >> module = loader.load(swigModuleName) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >> return imp.load_module(name, fp, pathname, description) >> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >> _ITKCommonPython = swig_import_helper() >> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper >> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) >> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory >> >> I got totally lost for this, what should I do to fix this? >> Any suggestion would be appreciated >> >> >> >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gowithking at googlemail.com Fri Aug 22 12:13:23 2014 From: gowithking at googlemail.com (gowith king) Date: Fri, 22 Aug 2014 18:13:23 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: I recorded my procedure as follow: cd ~ git clone git://itk.org/ITK.git cd ITK git pull mkdir BUILD cd BUILD ccmake .. in the ccmake configure options the follow flags were selected: BUILD_EXAMPLES OFF BUILD_SHARED_LIBS ON BUILD_TESTING OFF CMAKE_BUILD_TYPE Release ITK_WRAP_PERL OFF ITK_WRAP_PYTHON ON PERL_EXECUTABLE /usr/bin/perl PYTHON_EXECUTABLE /usr/bin/python PYTHON_INCLUDE_DIR /usr/include/python2.7 PYTHON_LIBRARY /usr/lib/libpython2.7.so PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages SCPCOMMAND /usr/bin/scp Then the configure warning of executable and library mismatch comes, ignore the warning g to generation sudo make sudo make install for the test : python >>>import itk >>> inputimage=itk.Image[itk.UC,3] --- errors report here : in eclispe : undefined variable from import UC in terminal :Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ itkBase.LoadModule(module, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule module = loader.load(swigModuleName) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load return imp.load_module(name, fp, pathname, description) File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in _ITKCommonPython = swig_import_helper() File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory On Fri, Aug 22, 2014 at 5:55 PM, gowith king wrote: > Please keep the discussion on the mailing list :) > > This is my first post in mailing list system " if this is a sort of > system, :)" > I guess that means I should always do not forget to cc to community? or > what else should I do to keep it? > > > Okay, so you will have to find the paths to the right folders/files to be > consistent in your python choice. > > > I have no idea Howto identify the python2.7.3 working library, normally > they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a > similar .so file in /usr/lib/libpython2.7.so . > However in your instruction :PYTHON_LIBRARY = > /usr/lib64/libpython2.7.so.1.0 > The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/ > libpython2.7.so.1.0 ; should I use this file? > > I would be happy if you could communicate me the paths for Ubuntu 12.04, > so I could extend the installation procedure. > > How could I send you the path of ubuntu 12.04? I can try to switch on a > remote assistant if necessary. > > > Seems on ubuntu the procedure is the same for loading the shared libraries: > > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run > ldconfig. > > > On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff > wrote: > >> Please keep the discussion on the mailing list :) >> >> Okay, so you will have to find the paths to the right folders/files to be >> consistent in your python choice. >> I would be happy if you could communicate me the paths for Ubuntu 12.04, >> so I could extend the installation procedure. >> >> Seems on ubuntu the procedure is the same for loading the shared >> libraries: >> >> http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib >> On Ubuntu you should have a /etc/ld.so.conf file. Then you should run >> ldconfig. >> >> Michka >> >> On 22 ao?t 2014, at 17:21, gowith king wrote: >> >> Dear Popoff >> I am using Ubuntu 12.04 LTS. the warning is the mismatching of >> python library and python executable : python executable "2.7.3" and >> library "" is mismatched. Here is the option setting: >> >> >> PYTHON_EXECUTABLE >> /usr/bin/python >> PYTHON_INCLUDE_DIR >> /usr/include/python2.7 >> PYTHON_LIBRARY /usr/lib/libpython2.7.so >> >> PY_SITE_PACKAGES_PATH >> /usr/lib/python2.7/dist-packages >> >> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . >> >> I do have few python versions been installed in the same OS. >> The flags in the instruction of ' >> http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' are >> not exact as the same as the description. I will try your instruction step >> be step in my system. >> By the way, your instruction is so practical. >> >> Have a nice day. >> >> >> >> >> >> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff >> wrote: >> >>> Hi >>> >>> Some important questions first: >>> >>> What was the warning for the library mismatch ? >>> On what OS are you installing ? >>> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? >>> >>> If the warnings were about the python library, it is quite important. >>> It may happen that you have two different python installations, and >>> cmake is not able to find the right libraries. >>> >>> I wrote some instructions to install ITK with python wrapping on Fedora >>> http://www.itk.org/Wiki/ITK/WrapITKInstallFedora >>> There is a list of cmake flags you can set to help cmake find the right >>> python, if it?s the problem you had. >>> I think the error is just because the library is not in your path. If >>> you are using Fedora, just follow the instructions I wrote down. >>> For other OS?es there are ways to do this, like setting the >>> LD_LIBRARY_PATH for example (you'll have to google this) >>> >>> Feedback is welcome so I can improve the installation instructions :) >>> >>> Michka >>> >>> On 22 ao?t 2014, at 16:06, gowith king >>> wrote: >>> >>> >>> >>> ---------- Forwarded message ---------- >>> From: gowith king >>> Date: Fri, Aug 22, 2014 at 1:32 PM >>> Subject: ITK and python wrap problem >>> To: community at itk.org >>> >>> >>> Dear ITK friends >>> I am not sure this is an appropriate place to issue my problem in >>> the wrapping process: >>> I followed the instruction of ' >>> http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to >>> finish the compiling and installing process. it look good so far except a >>> warning of mismatching library version, I think it could be ignored. >>> Then I tried one line for test : >>> >>> import itk >>> >>> inputimage=itk.Image[itk.UC,3] >>> Traceback (most recent call last): >>> File "", line 1, in >>> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in >>> __getattribute__ >>> itkBase.LoadModule(module, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>> LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>> LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>> LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>> LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in >>> LoadModule >>> module = loader.load(swigModuleName) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >>> return imp.load_module(name, fp, pathname, description) >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >>> >>> _ITKCommonPython = swig_import_helper() >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in >>> swig_import_helper >>> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) >>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No >>> such file or directory >>> >>> I got totally lost for this, what should I do to fix this? >>> Any suggestion would be appreciated >>> >>> >>> >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Fri Aug 22 12:52:29 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Fri, 22 Aug 2014 18:52:29 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: Yes, just cc the community (or reply to all), so that all the discussion is archived as a thread by the mailing list system. It?s easier for users to search for an answer when there are no missing messages in the thread. The answer to a problem/bug should be public. Sending a mail to only one person from the list is okay though, but only for private/off topic discussions. Michka On 22 ao?t 2014, at 17:55, gowith king wrote: > Please keep the discussion on the mailing list :) > > This is my first post in mailing list system " if this is a sort of system, :)" > I guess that means I should always do not forget to cc to community? or what else should I do to keep it? > > > Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. > > > I have no idea Howto identify the python2.7.3 working library, normally they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a similar .so file in /usr/lib/libpython2.7.so . > However in your instruction :PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0 > The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/libpython2.7.so.1.0 ; should I use this file? > > I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. > > How could I send you the path of ubuntu 12.04? I can try to switch on a remote assistant if necessary. > > > Seems on ubuntu the procedure is the same for loading the shared libraries: > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. > > > On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff wrote: > Please keep the discussion on the mailing list :) > > Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. > I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. > > Seems on ubuntu the procedure is the same for loading the shared libraries: > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. > > Michka > > On 22 ao?t 2014, at 17:21, gowith king wrote: > >> Dear Popoff >> I am using Ubuntu 12.04 LTS. the warning is the mismatching of python library and python executable : python executable "2.7.3" and library "" is mismatched. Here is the option setting: >> >> >> PYTHON_EXECUTABLE /usr/bin/python >> PYTHON_INCLUDE_DIR /usr/include/python2.7 >> PYTHON_LIBRARY /usr/lib/libpython2.7.so >> PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages >> >> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . >> >> I do have few python versions been installed in the same OS. >> The flags in the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' are not exact as the same as the description. I will try your instruction step be step in my system. >> By the way, your instruction is so practical. >> >> Have a nice day. >> >> >> >> >> >> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff wrote: >> Hi >> >> Some important questions first: >> >> What was the warning for the library mismatch ? >> On what OS are you installing ? >> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? >> >> If the warnings were about the python library, it is quite important. >> It may happen that you have two different python installations, and cmake is not able to find the right libraries. >> >> I wrote some instructions to install ITK with python wrapping on Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora >> There is a list of cmake flags you can set to help cmake find the right python, if it?s the problem you had. >> I think the error is just because the library is not in your path. If you are using Fedora, just follow the instructions I wrote down. >> For other OS?es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this) >> >> Feedback is welcome so I can improve the installation instructions :) >> >> Michka >> >> On 22 ao?t 2014, at 16:06, gowith king wrote: >> >>> >>> >>> ---------- Forwarded message ---------- >>> From: gowith king >>> Date: Fri, Aug 22, 2014 at 1:32 PM >>> Subject: ITK and python wrap problem >>> To: community at itk.org >>> >>> >>> Dear ITK friends >>> I am not sure this is an appropriate place to issue my problem in the wrapping process: >>> I followed the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. >>> Then I tried one line for test : >>> >>> import itk >>> >>> inputimage=itk.Image[itk.UC,3] >>> Traceback (most recent call last): >>> File "", line 1, in >>> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ >>> itkBase.LoadModule(module, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule >>> module = loader.load(swigModuleName) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >>> return imp.load_module(name, fp, pathname, description) >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >>> _ITKCommonPython = swig_import_helper() >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper >>> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) >>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory >>> >>> I got totally lost for this, what should I do to fix this? >>> Any suggestion would be appreciated >>> >>> >>> >>> >>> _______________________________________________ >>> 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 Fri Aug 22 14:04:39 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 22 Aug 2014 14:04:39 -0400 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: Hi, Please see inline comments below On Fri, Aug 22, 2014 at 12:13 PM, gowith king wrote: > I recorded my procedure as follow: > cd ~ > git clone git://itk.org/ITK.git > cd ITK > git pull > mkdir BUILD > cd BUILD > ccmake .. > in the ccmake configure options the follow flags were selected: > BUILD_EXAMPLES OFF > BUILD_SHARED_LIBS ON > BUILD_TESTING OFF > CMAKE_BUILD_TYPE Release > ITK_WRAP_PERL OFF > ITK_WRAP_PYTHON ON > PERL_EXECUTABLE /usr/bin/perl > PYTHON_EXECUTABLE /usr/bin/python Try /usr/bin/python2.7 or /usr/bin/python2 > PYTHON_INCLUDE_DIR /usr/include/python2.7 > PYTHON_LIBRARY /usr/lib/libpython2.7.so > PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages > SCPCOMMAND /usr/bin/scp > > Then the configure warning of executable and library mismatch comes, ignore > the warning > g to generation > sudo make > sudo make install > > for the test : > python >>>>import itk >>>> inputimage=itk.Image[itk.UC,3] --- errors report here : > in eclispe : undefined variable from import UC Here "UC" stands for "unsigned char". In your CMake configuration options, make sure ITK_WRAP_unsigned_char is ON to support this pixel type. Hope this helps, Matt From joseignacio.prieto at gmail.com Fri Aug 22 19:45:37 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Fri, 22 Aug 2014 19:45:37 -0400 Subject: [ITK] [ITK-users] 2D polygon stack to 3d mesh Message-ID: Hi all, I am dubious to which mail list use. I have an array of 2d snake segmentations for the left ventricle( a std vector of 20 rows with a closed convex 2d polygon each row) on ITK and I would like it to turn it into a mesh that can be visualized. Should I use QuadMeshEdge and then a Delaunay in ITk, or use Delaunay methods in VTK. Or maybe I should write an ad-hoc method given that the points are sorted so a triangle can be made with two consecutive polygon points and the closest one on the following slice. Thank you very much, Ignacio Prieto -- Ignacio Prieto Research Assistant Biomedical Imaging Center Pontificia Universidad Catolica de Chile -------------- 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 vincent.ngai at gmail.com Fri Aug 22 21:49:32 2014 From: vincent.ngai at gmail.com (vincent ngai) Date: Sat, 23 Aug 2014 09:49:32 +0800 Subject: [ITK] [ITK-users] Silly question on itk::Matrix In-Reply-To: <0BBC89C9-0F67-48F1-99F4-AC89AF5C394B@gmail.com> References: <0BBC89C9-0F67-48F1-99F4-AC89AF5C394B@gmail.com> Message-ID: Ah yes, so my question is why is the [] accessor not column major? If points are columns, the matrix elements for the Tx,Ty,Tz translation components should also be columnar? It just seems like extra work to need to get the matrix transpose just to do a Mat * P Regards, Vincent On Fri, Aug 22, 2014 at 7:14 PM, Jim Miller wrote: > ITK standard is that points are column vectors. Thus, matrix times a point > a point is defined as Mat * P > > Jim > > > On Aug 22, 2014, at 3:30 AM, vincent ngai > wrote: > > > > Hi all, pardon me for this silly question on itk::Matrix. Why do I need > to transpose a translation matrix after I copy the [x,y,z] translation > values to the matrix[3]. > > > > I know conceptually it should not really matter whether its row or col > major so long as you can > > post multiply or pre multiply with another vector. But the way > operator*() works only allows for > > Matrix * P, and when I test the simple case of TranslationMatrix * > Point, I would have to transpose the matrix. If I could also do Point * > TranslationMatrix, then i wouldn't need to transpose. > > > > Any ideas? > > > > -- > > Regards, > > Vincent > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > -- Regards, Vincent -------------- 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 millerjv at gmail.com Sat Aug 23 08:12:10 2014 From: millerjv at gmail.com (Jim Miller) Date: Sat, 23 Aug 2014 08:12:10 -0400 Subject: [ITK] [ITK-users] Silly question on itk::Matrix In-Reply-To: References: <0BBC89C9-0F67-48F1-99F4-AC89AF5C394B@gmail.com> Message-ID: Matrices and images are row major order. Points and vectors are column vectors. No transpose is necessary. You can index element by element directly to set the column you want. Row major ordering is more popular than column major ordering. I think there are regional preferences as to the"proper" way. I also think electrical engineers prefer one way whereas mechanical engineers prefer the other. Probably is partially based on how disciplines view the composition of coordinate frames (inside out or outside in). Some systems allow you to use either convention. We found that leads to a lot of confusion and errors. So 15 years ago, when we started ITK, we chose to pick a single standard for the code. Jim > On Aug 22, 2014, at 9:49 PM, vincent ngai wrote: > > Ah yes, so my question is why is the [] accessor not column major? If points are columns, the matrix elements for the Tx,Ty,Tz translation components should also be columnar? It just seems like extra work to need to get the matrix transpose just to do a Mat * P > > Regards, > Vincent > > >> On Fri, Aug 22, 2014 at 7:14 PM, Jim Miller wrote: >> ITK standard is that points are column vectors. Thus, matrix times a point a point is defined as Mat * P >> >> Jim >> >> > On Aug 22, 2014, at 3:30 AM, vincent ngai wrote: >> > >> > Hi all, pardon me for this silly question on itk::Matrix. Why do I need to transpose a translation matrix after I copy the [x,y,z] translation values to the matrix[3]. >> > >> > I know conceptually it should not really matter whether its row or col major so long as you can >> > post multiply or pre multiply with another vector. But the way operator*() works only allows for >> > Matrix * P, and when I test the simple case of TranslationMatrix * Point, I would have to transpose the matrix. If I could also do Point * TranslationMatrix, then i wouldn't need to transpose. >> > >> > Any ideas? >> > >> > -- >> > Regards, >> > Vincent >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users > > > > -- > Regards, > Vincent -------------- 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 gowithking at googlemail.com Sat Aug 23 09:41:01 2014 From: gowithking at googlemail.com (gowith king) Date: Sat, 23 Aug 2014 15:41:01 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: update : following Mr. Popoff 's instruction, I add these few command to active ldconfig - cd /etc/ld.so.conf.d/ - add a file called itk-46.conf, which should contain only one line: /usr/local/lib - ldconfig # tells the system to read the files in ld.so.conf.d - then python - import itk - itk.image - lots warning reported : - Warning: Unknown parameter 'itk::Matrix< float, 2, 2 >' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::Matrix< double, 2, 2 >' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::Matrix< float, 3, 3 >' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::Matrix< double, 3, 3 >' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,2,2,double,double,double >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,3,3,double,double,double >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix ,2,2,float,float,itk::Matrix >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix ,3,3,float,float,itk::Matrix >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::Mesh' Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::Mesh' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::Mesh' Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::Mesh' Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultStaticMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter' Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultDynamicMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter' Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultStaticMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter' Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultDynamicMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter' On Fri, Aug 22, 2014 at 6:13 PM, gowith king wrote: > I recorded my procedure as follow: > cd ~ > git clone git://itk.org/ITK.git > cd ITK > git pull > mkdir BUILD > cd BUILD > ccmake .. > in the ccmake configure options the follow flags were selected: > BUILD_EXAMPLES > OFF > BUILD_SHARED_LIBS > ON > BUILD_TESTING > OFF > CMAKE_BUILD_TYPE Release > ITK_WRAP_PERL > OFF > ITK_WRAP_PYTHON ON > PERL_EXECUTABLE > /usr/bin/perl > PYTHON_EXECUTABLE > /usr/bin/python > PYTHON_INCLUDE_DIR > /usr/include/python2.7 > PYTHON_LIBRARY /usr/lib/libpython2.7.so > > PY_SITE_PACKAGES_PATH > /usr/lib/python2.7/dist-packages > SCPCOMMAND /usr/bin/scp > > Then the configure warning of executable and library mismatch comes, > ignore the warning > g to generation > sudo make > sudo make install > > for the test : > python > >>>import itk > >>> inputimage=itk.Image[itk.UC,3] --- errors report here : > in eclispe : undefined variable from import UC > in terminal :Traceback (most recent call last): > > File "", line 1, in > File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in > __getattribute__ > itkBase.LoadModule(module, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule > module = loader.load(swigModuleName) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load > return imp.load_module(name, fp, pathname, description) > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in > > _ITKCommonPython = swig_import_helper() > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in > swig_import_helper > _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) > ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No > such file or directory > > > > > > > On Fri, Aug 22, 2014 at 5:55 PM, gowith king > wrote: > >> Please keep the discussion on the mailing list :) >> >> This is my first post in mailing list system " if this is a sort of >> system, :)" >> I guess that means I should always do not forget to cc to community? or >> what else should I do to keep it? >> >> >> Okay, so you will have to find the paths to the right folders/files to be >> consistent in your python choice. >> >> >> I have no idea Howto identify the python2.7.3 working library, normally >> they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a >> similar .so file in /usr/lib/libpython2.7.so . >> However in your instruction :PYTHON_LIBRARY = >> /usr/lib64/libpython2.7.so.1.0 >> The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/ >> libpython2.7.so.1.0 ; should I use this file? >> >> I would be happy if you could communicate me the paths for Ubuntu 12.04, >> so I could extend the installation procedure. >> >> How could I send you the path of ubuntu 12.04? I can try to switch on a >> remote assistant if necessary. >> >> >> Seems on ubuntu the procedure is the same for loading the shared >> libraries: >> >> http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib >> On Ubuntu you should have a /etc/ld.so.conf file. Then you should run >> ldconfig. >> >> >> On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff >> wrote: >> >>> Please keep the discussion on the mailing list :) >>> >>> Okay, so you will have to find the paths to the right folders/files to >>> be consistent in your python choice. >>> I would be happy if you could communicate me the paths for Ubuntu 12.04, >>> so I could extend the installation procedure. >>> >>> Seems on ubuntu the procedure is the same for loading the shared >>> libraries: >>> >>> http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib >>> On Ubuntu you should have a /etc/ld.so.conf file. Then you should run >>> ldconfig. >>> >>> Michka >>> >>> On 22 ao?t 2014, at 17:21, gowith king >>> wrote: >>> >>> Dear Popoff >>> I am using Ubuntu 12.04 LTS. the warning is the mismatching of >>> python library and python executable : python executable "2.7.3" and >>> library "" is mismatched. Here is the option setting: >>> >>> >>> PYTHON_EXECUTABLE >>> /usr/bin/python >>> PYTHON_INCLUDE_DIR >>> /usr/include/python2.7 >>> PYTHON_LIBRARY /usr/lib/libpython2.7.so >>> >>> PY_SITE_PACKAGES_PATH >>> /usr/lib/python2.7/dist-packages >>> >>> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . >>> >>> I do have few python versions been installed in the same OS. >>> The flags in the instruction of ' >>> http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' >>> are not exact as the same as the description. I will try your instruction >>> step be step in my system. >>> By the way, your instruction is so practical. >>> >>> Have a nice day. >>> >>> >>> >>> >>> >>> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff >>> wrote: >>> >>>> Hi >>>> >>>> Some important questions first: >>>> >>>> What was the warning for the library mismatch ? >>>> On what OS are you installing ? >>>> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? >>>> >>>> If the warnings were about the python library, it is quite important. >>>> It may happen that you have two different python installations, and >>>> cmake is not able to find the right libraries. >>>> >>>> I wrote some instructions to install ITK with python wrapping on Fedora >>>> http://www.itk.org/Wiki/ITK/WrapITKInstallFedora >>>> There is a list of cmake flags you can set to help cmake find the right >>>> python, if it?s the problem you had. >>>> I think the error is just because the library is not in your path. If >>>> you are using Fedora, just follow the instructions I wrote down. >>>> For other OS?es there are ways to do this, like setting the >>>> LD_LIBRARY_PATH for example (you'll have to google this) >>>> >>>> Feedback is welcome so I can improve the installation instructions :) >>>> >>>> Michka >>>> >>>> On 22 ao?t 2014, at 16:06, gowith king >>>> wrote: >>>> >>>> >>>> >>>> ---------- Forwarded message ---------- >>>> From: gowith king >>>> Date: Fri, Aug 22, 2014 at 1:32 PM >>>> Subject: ITK and python wrap problem >>>> To: community at itk.org >>>> >>>> >>>> Dear ITK friends >>>> I am not sure this is an appropriate place to issue my problem in >>>> the wrapping process: >>>> I followed the instruction of ' >>>> http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' >>>> to finish the compiling and installing process. it look good so far except >>>> a warning of mismatching library version, I think it could be ignored. >>>> Then I tried one line for test : >>>> >>> import itk >>>> >>> inputimage=itk.Image[itk.UC,3] >>>> Traceback (most recent call last): >>>> File "", line 1, in >>>> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in >>>> __getattribute__ >>>> itkBase.LoadModule(module, namespace) >>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>> LoadModule >>>> LoadModule(dep, namespace) >>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>> LoadModule >>>> LoadModule(dep, namespace) >>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>> LoadModule >>>> LoadModule(dep, namespace) >>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>> LoadModule >>>> LoadModule(dep, namespace) >>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in >>>> LoadModule >>>> module = loader.load(swigModuleName) >>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >>>> return imp.load_module(name, fp, pathname, description) >>>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >>>> >>>> _ITKCommonPython = swig_import_helper() >>>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in >>>> swig_import_helper >>>> _mod = imp.load_module('_ITKCommonPython', fp, pathname, >>>> description) >>>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: >>>> No such file or directory >>>> >>>> I got totally lost for this, what should I do to fix this? >>>> Any suggestion would be appreciated >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Community mailing list >>>> Community at itk.org >>>> http://public.kitware.com/mailman/listinfo/community >>>> >>>> >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Sat Aug 23 09:49:09 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Sat, 23 Aug 2014 15:49:09 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: <7E0D1109-E4CA-484A-9110-AF53E616BE45@gmail.com> Yes, these warnings are known, it?s because we did not finish and clean up all the wrappings. I changed the code some time ago for the warnings, you may disable them following the instructions below. This is a temporary solution, until we get this sorted out. Users can now disable warnings with the following lines before importing ITK : import warnings warnings.filterwarnings("ignore?) import itk or by running python with : python -W ignore foo.py On 23 ao?t 2014, at 15:41, gowith king wrote: > update : > following Mr. Popoff 's instruction, I add these few command to active ldconfig > cd /etc/ld.so.conf.d/ > add a file called itk-46.conf, which should contain only one line: /usr/local/lib > ldconfig # tells the system to read the files in ld.so.conf.d > then python > import itk > itk.image > lots warning reported : > Warning: Unknown parameter 'itk::Matrix< float, 2, 2 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< double, 2, 2 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< float, 3, 3 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< double, 3, 3 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,2,2,double,double,double >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,3,3,double,double,double >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix ,2,2,float,float,itk::Matrix >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix ,3,3,float,float,itk::Matrix >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultStaticMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultDynamicMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultStaticMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultDynamicMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter' > > > > > On Fri, Aug 22, 2014 at 6:13 PM, gowith king wrote: > I recorded my procedure as follow: > cd ~ > git clone git://itk.org/ITK.git > cd ITK > git pull > mkdir BUILD > cd BUILD > ccmake .. > in the ccmake configure options the follow flags were selected: > BUILD_EXAMPLES OFF > BUILD_SHARED_LIBS ON > BUILD_TESTING OFF > CMAKE_BUILD_TYPE Release > ITK_WRAP_PERL OFF > ITK_WRAP_PYTHON ON > PERL_EXECUTABLE /usr/bin/perl > PYTHON_EXECUTABLE /usr/bin/python > PYTHON_INCLUDE_DIR /usr/include/python2.7 > PYTHON_LIBRARY /usr/lib/libpython2.7.so > PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages > SCPCOMMAND /usr/bin/scp > > Then the configure warning of executable and library mismatch comes, ignore the warning > g to generation > sudo make > sudo make install > > for the test : > python > >>>import itk > >>> inputimage=itk.Image[itk.UC,3] --- errors report here : > in eclispe : undefined variable from import UC > in terminal :Traceback (most recent call last): > > File "", line 1, in > File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ > itkBase.LoadModule(module, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule > module = loader.load(swigModuleName) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load > return imp.load_module(name, fp, pathname, description) > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in > _ITKCommonPython = swig_import_helper() > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper > _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) > ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory > > > > > > > On Fri, Aug 22, 2014 at 5:55 PM, gowith king wrote: > Please keep the discussion on the mailing list :) > > This is my first post in mailing list system " if this is a sort of system, :)" > I guess that means I should always do not forget to cc to community? or what else should I do to keep it? > > > Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. > > > I have no idea Howto identify the python2.7.3 working library, normally they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a similar .so file in /usr/lib/libpython2.7.so . > However in your instruction :PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0 > The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/libpython2.7.so.1.0 ; should I use this file? > > I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. > > How could I send you the path of ubuntu 12.04? I can try to switch on a remote assistant if necessary. > > > Seems on ubuntu the procedure is the same for loading the shared libraries: > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. > > > On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff wrote: > Please keep the discussion on the mailing list :) > > Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. > I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. > > Seems on ubuntu the procedure is the same for loading the shared libraries: > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. > > Michka > > On 22 ao?t 2014, at 17:21, gowith king wrote: > >> Dear Popoff >> I am using Ubuntu 12.04 LTS. the warning is the mismatching of python library and python executable : python executable "2.7.3" and library "" is mismatched. Here is the option setting: >> >> >> PYTHON_EXECUTABLE /usr/bin/python >> PYTHON_INCLUDE_DIR /usr/include/python2.7 >> PYTHON_LIBRARY /usr/lib/libpython2.7.so >> PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages >> >> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . >> >> I do have few python versions been installed in the same OS. >> The flags in the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' are not exact as the same as the description. I will try your instruction step be step in my system. >> By the way, your instruction is so practical. >> >> Have a nice day. >> >> >> >> >> >> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff wrote: >> Hi >> >> Some important questions first: >> >> What was the warning for the library mismatch ? >> On what OS are you installing ? >> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? >> >> If the warnings were about the python library, it is quite important. >> It may happen that you have two different python installations, and cmake is not able to find the right libraries. >> >> I wrote some instructions to install ITK with python wrapping on Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora >> There is a list of cmake flags you can set to help cmake find the right python, if it?s the problem you had. >> I think the error is just because the library is not in your path. If you are using Fedora, just follow the instructions I wrote down. >> For other OS?es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this) >> >> Feedback is welcome so I can improve the installation instructions :) >> >> Michka >> >> On 22 ao?t 2014, at 16:06, gowith king wrote: >> >>> >>> >>> ---------- Forwarded message ---------- >>> From: gowith king >>> Date: Fri, Aug 22, 2014 at 1:32 PM >>> Subject: ITK and python wrap problem >>> To: community at itk.org >>> >>> >>> Dear ITK friends >>> I am not sure this is an appropriate place to issue my problem in the wrapping process: >>> I followed the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. >>> Then I tried one line for test : >>> >>> import itk >>> >>> inputimage=itk.Image[itk.UC,3] >>> Traceback (most recent call last): >>> File "", line 1, in >>> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ >>> itkBase.LoadModule(module, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule >>> module = loader.load(swigModuleName) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >>> return imp.load_module(name, fp, pathname, description) >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >>> _ITKCommonPython = swig_import_helper() >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper >>> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) >>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory >>> >>> I got totally lost for this, what should I do to fix this? >>> Any suggestion would be appreciated >>> >>> >>> >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gowithking at googlemail.com Sat Aug 23 10:08:43 2014 From: gowithking at googlemail.com (gowith king) Date: Sat, 23 Aug 2014 16:08:43 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: That means the mismatching is not really matter and the essential problem is the valence of idconfig activation. So I will write a summary to end our discussion to emailling list and recommend your wrapping protocol, which should also work on Ubuntu. have a nice weekend. On Sat, Aug 23, 2014 at 3:41 PM, gowith king wrote: > update : > following Mr. Popoff 's instruction, I add these few command to active > ldconfig > > - cd /etc/ld.so.conf.d/ > - add a file called itk-46.conf, which should contain only one line: > /usr/local/lib > - ldconfig # tells the system to read the files in ld.so.conf.d > - then python > - import itk > - itk.image > - lots warning reported : > - Warning: Unknown parameter 'itk::Matrix< float, 2, 2 >' in template > 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< double, 2, 2 >' in template > 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< float, 3, 3 >' in template > 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< double, 3, 3 >' in template > 'itk::VectorContainer' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< > float,2,2,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< > float,2,2,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< > float,3,3,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< > float,3,3,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< > double,2,2,double,double,double >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< > double,3,3,double,double,double >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix > ,2,2,float,float,itk::Matrix >' in template > 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix > ,3,3,float,float,itk::Matrix >' in template > 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< > float,2,2,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< > float,2,2,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< > float,3,3,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< > float,3,3,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::CellInterface< float, > itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned > long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< > float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< double, > itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned > long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< > double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< float, > itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned > long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< > float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< double, > itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned > long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< > double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< float, > itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned > long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< > float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< double, > itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned > long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< > double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< float, > itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned > long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< > float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< double, > itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned > long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< > double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 > >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< > unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< > double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, > std::set< unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 > >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< > unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< > double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, > std::set< unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 > >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< > unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< > double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, > std::set< unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 > >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< > unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< > double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, > std::set< unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterface' > Warning: Unknown parameter 'itk::Mesh< > float,2,itk::DefaultStaticMeshTraits< float,2,2,float > >' in template > 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< > float,2,itk::DefaultDynamicMeshTraits< float,2,2,float > >' in template > 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< > float,3,itk::DefaultStaticMeshTraits< float,3,3,float > >' in template > 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< > float,3,itk::DefaultDynamicMeshTraits< float,3,3,float > >' in template > 'itk::MeshToMeshFilter' > > > > > > On Fri, Aug 22, 2014 at 6:13 PM, gowith king > wrote: > >> I recorded my procedure as follow: >> cd ~ >> git clone git://itk.org/ITK.git >> cd ITK >> git pull >> mkdir BUILD >> cd BUILD >> ccmake .. >> in the ccmake configure options the follow flags were selected: >> BUILD_EXAMPLES >> OFF >> BUILD_SHARED_LIBS >> ON >> BUILD_TESTING >> OFF >> CMAKE_BUILD_TYPE Release >> ITK_WRAP_PERL >> OFF >> ITK_WRAP_PYTHON ON >> PERL_EXECUTABLE >> /usr/bin/perl >> PYTHON_EXECUTABLE >> /usr/bin/python >> PYTHON_INCLUDE_DIR >> /usr/include/python2.7 >> PYTHON_LIBRARY /usr/lib/libpython2.7.so >> >> PY_SITE_PACKAGES_PATH >> /usr/lib/python2.7/dist-packages >> SCPCOMMAND /usr/bin/scp >> >> Then the configure warning of executable and library mismatch comes, >> ignore the warning >> g to generation >> sudo make >> sudo make install >> >> for the test : >> python >> >>>import itk >> >>> inputimage=itk.Image[itk.UC,3] --- errors report here : >> in eclispe : undefined variable from import UC >> in terminal :Traceback (most recent call last): >> >> File "", line 1, in >> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in >> __getattribute__ >> itkBase.LoadModule(module, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule >> module = loader.load(swigModuleName) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >> return imp.load_module(name, fp, pathname, description) >> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >> >> _ITKCommonPython = swig_import_helper() >> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in >> swig_import_helper >> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) >> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No >> such file or directory >> >> >> >> >> >> >> On Fri, Aug 22, 2014 at 5:55 PM, gowith king >> wrote: >> >>> Please keep the discussion on the mailing list :) >>> >>> This is my first post in mailing list system " if this is a sort of >>> system, :)" >>> I guess that means I should always do not forget to cc to community? or >>> what else should I do to keep it? >>> >>> >>> Okay, so you will have to find the paths to the right folders/files to >>> be consistent in your python choice. >>> >>> >>> I have no idea Howto identify the python2.7.3 working library, normally >>> they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a >>> similar .so file in /usr/lib/libpython2.7.so . >>> However in your instruction :PYTHON_LIBRARY = >>> /usr/lib64/libpython2.7.so.1.0 >>> The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/ >>> libpython2.7.so.1.0 ; should I use this file? >>> >>> I would be happy if you could communicate me the paths for Ubuntu 12.04, >>> so I could extend the installation procedure. >>> >>> How could I send you the path of ubuntu 12.04? I can try to switch on a >>> remote assistant if necessary. >>> >>> >>> Seems on ubuntu the procedure is the same for loading the shared >>> libraries: >>> >>> http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib >>> On Ubuntu you should have a /etc/ld.so.conf file. Then you should run >>> ldconfig. >>> >>> >>> On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff >>> wrote: >>> >>>> Please keep the discussion on the mailing list :) >>>> >>>> Okay, so you will have to find the paths to the right folders/files to >>>> be consistent in your python choice. >>>> I would be happy if you could communicate me the paths for Ubuntu >>>> 12.04, so I could extend the installation procedure. >>>> >>>> Seems on ubuntu the procedure is the same for loading the shared >>>> libraries: >>>> >>>> http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib >>>> On Ubuntu you should have a /etc/ld.so.conf file. Then you should run >>>> ldconfig. >>>> >>>> Michka >>>> >>>> On 22 ao?t 2014, at 17:21, gowith king >>>> wrote: >>>> >>>> Dear Popoff >>>> I am using Ubuntu 12.04 LTS. the warning is the mismatching of >>>> python library and python executable : python executable "2.7.3" and >>>> library "" is mismatched. Here is the option setting: >>>> >>>> >>>> PYTHON_EXECUTABLE >>>> /usr/bin/python >>>> PYTHON_INCLUDE_DIR >>>> /usr/include/python2.7 >>>> PYTHON_LIBRARY /usr/lib/libpython2.7.so >>>> >>>> PY_SITE_PACKAGES_PATH >>>> /usr/lib/python2.7/dist-packages >>>> >>>> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . >>>> >>>> I do have few python versions been installed in the same OS. >>>> The flags in the instruction of ' >>>> http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' >>>> are not exact as the same as the description. I will try your instruction >>>> step be step in my system. >>>> By the way, your instruction is so practical. >>>> >>>> Have a nice day. >>>> >>>> >>>> >>>> >>>> >>>> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff >>>> wrote: >>>> >>>>> Hi >>>>> >>>>> Some important questions first: >>>>> >>>>> What was the warning for the library mismatch ? >>>>> On what OS are you installing ? >>>>> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? >>>>> >>>>> If the warnings were about the python library, it is quite important. >>>>> It may happen that you have two different python installations, and >>>>> cmake is not able to find the right libraries. >>>>> >>>>> I wrote some instructions to install ITK with python wrapping on >>>>> Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora >>>>> There is a list of cmake flags you can set to help cmake find the >>>>> right python, if it?s the problem you had. >>>>> I think the error is just because the library is not in your path. If >>>>> you are using Fedora, just follow the instructions I wrote down. >>>>> For other OS?es there are ways to do this, like setting the >>>>> LD_LIBRARY_PATH for example (you'll have to google this) >>>>> >>>>> Feedback is welcome so I can improve the installation instructions :) >>>>> >>>>> Michka >>>>> >>>>> On 22 ao?t 2014, at 16:06, gowith king >>>>> wrote: >>>>> >>>>> >>>>> >>>>> ---------- Forwarded message ---------- >>>>> From: gowith king >>>>> Date: Fri, Aug 22, 2014 at 1:32 PM >>>>> Subject: ITK and python wrap problem >>>>> To: community at itk.org >>>>> >>>>> >>>>> Dear ITK friends >>>>> I am not sure this is an appropriate place to issue my problem >>>>> in the wrapping process: >>>>> I followed the instruction of ' >>>>> http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' >>>>> to finish the compiling and installing process. it look good so far except >>>>> a warning of mismatching library version, I think it could be ignored. >>>>> Then I tried one line for test : >>>>> >>> import itk >>>>> >>> inputimage=itk.Image[itk.UC,3] >>>>> Traceback (most recent call last): >>>>> File "", line 1, in >>>>> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in >>>>> __getattribute__ >>>>> itkBase.LoadModule(module, namespace) >>>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>>> LoadModule >>>>> LoadModule(dep, namespace) >>>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>>> LoadModule >>>>> LoadModule(dep, namespace) >>>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>>> LoadModule >>>>> LoadModule(dep, namespace) >>>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>>> LoadModule >>>>> LoadModule(dep, namespace) >>>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in >>>>> LoadModule >>>>> module = loader.load(swigModuleName) >>>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >>>>> return imp.load_module(name, fp, pathname, description) >>>>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >>>>> >>>>> _ITKCommonPython = swig_import_helper() >>>>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in >>>>> swig_import_helper >>>>> _mod = imp.load_module('_ITKCommonPython', fp, pathname, >>>>> description) >>>>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: >>>>> No such file or directory >>>>> >>>>> I got totally lost for this, what should I do to fix this? >>>>> Any suggestion would be appreciated >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Community mailing list >>>>> Community at itk.org >>>>> http://public.kitware.com/mailman/listinfo/community >>>>> >>>>> >>>>> >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Sat Aug 23 10:16:07 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Sat, 23 Aug 2014 16:16:07 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: <6E017549-03E9-499E-9461-84EE13E220E8@gmail.com> Yes your initial problem was the ldconfig one. I?m glad it works for you now. Yes please if you have some notes on the protocol for Ubuntu, just send it to the list so that I can update it on the wiki. Michka On 23 ao?t 2014, at 16:08, gowith king wrote: > That means the mismatching is not really matter and the essential problem is the valence of idconfig activation. > So I will write a summary to end our discussion to emailling list and recommend your wrapping protocol, which should also work on Ubuntu. > have a nice weekend. > > > > On Sat, Aug 23, 2014 at 3:41 PM, gowith king wrote: > update : > following Mr. Popoff 's instruction, I add these few command to active ldconfig > cd /etc/ld.so.conf.d/ > add a file called itk-46.conf, which should contain only one line: /usr/local/lib > ldconfig # tells the system to read the files in ld.so.conf.d > then python > import itk > itk.image > lots warning reported : > Warning: Unknown parameter 'itk::Matrix< float, 2, 2 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< double, 2, 2 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< float, 3, 3 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< double, 3, 3 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,2,2,double,double,double >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,3,3,double,double,double >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix ,2,2,float,float,itk::Matrix >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix ,3,3,float,float,itk::Matrix >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultStaticMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultDynamicMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultStaticMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultDynamicMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter' > > > > > On Fri, Aug 22, 2014 at 6:13 PM, gowith king wrote: > I recorded my procedure as follow: > cd ~ > git clone git://itk.org/ITK.git > cd ITK > git pull > mkdir BUILD > cd BUILD > ccmake .. > in the ccmake configure options the follow flags were selected: > BUILD_EXAMPLES OFF > BUILD_SHARED_LIBS ON > BUILD_TESTING OFF > CMAKE_BUILD_TYPE Release > ITK_WRAP_PERL OFF > ITK_WRAP_PYTHON ON > PERL_EXECUTABLE /usr/bin/perl > PYTHON_EXECUTABLE /usr/bin/python > PYTHON_INCLUDE_DIR /usr/include/python2.7 > PYTHON_LIBRARY /usr/lib/libpython2.7.so > PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages > SCPCOMMAND /usr/bin/scp > > Then the configure warning of executable and library mismatch comes, ignore the warning > g to generation > sudo make > sudo make install > > for the test : > python > >>>import itk > >>> inputimage=itk.Image[itk.UC,3] --- errors report here : > in eclispe : undefined variable from import UC > in terminal :Traceback (most recent call last): > > File "", line 1, in > File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ > itkBase.LoadModule(module, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule > module = loader.load(swigModuleName) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load > return imp.load_module(name, fp, pathname, description) > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in > _ITKCommonPython = swig_import_helper() > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper > _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) > ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory > > > > > > > On Fri, Aug 22, 2014 at 5:55 PM, gowith king wrote: > Please keep the discussion on the mailing list :) > > This is my first post in mailing list system " if this is a sort of system, :)" > I guess that means I should always do not forget to cc to community? or what else should I do to keep it? > > > Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. > > > I have no idea Howto identify the python2.7.3 working library, normally they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a similar .so file in /usr/lib/libpython2.7.so . > However in your instruction :PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0 > The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/libpython2.7.so.1.0 ; should I use this file? > > I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. > > How could I send you the path of ubuntu 12.04? I can try to switch on a remote assistant if necessary. > > > Seems on ubuntu the procedure is the same for loading the shared libraries: > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. > > > On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff wrote: > Please keep the discussion on the mailing list :) > > Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. > I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. > > Seems on ubuntu the procedure is the same for loading the shared libraries: > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. > > Michka > > On 22 ao?t 2014, at 17:21, gowith king wrote: > >> Dear Popoff >> I am using Ubuntu 12.04 LTS. the warning is the mismatching of python library and python executable : python executable "2.7.3" and library "" is mismatched. Here is the option setting: >> >> >> PYTHON_EXECUTABLE /usr/bin/python >> PYTHON_INCLUDE_DIR /usr/include/python2.7 >> PYTHON_LIBRARY /usr/lib/libpython2.7.so >> PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages >> >> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . >> >> I do have few python versions been installed in the same OS. >> The flags in the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' are not exact as the same as the description. I will try your instruction step be step in my system. >> By the way, your instruction is so practical. >> >> Have a nice day. >> >> >> >> >> >> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff wrote: >> Hi >> >> Some important questions first: >> >> What was the warning for the library mismatch ? >> On what OS are you installing ? >> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? >> >> If the warnings were about the python library, it is quite important. >> It may happen that you have two different python installations, and cmake is not able to find the right libraries. >> >> I wrote some instructions to install ITK with python wrapping on Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora >> There is a list of cmake flags you can set to help cmake find the right python, if it?s the problem you had. >> I think the error is just because the library is not in your path. If you are using Fedora, just follow the instructions I wrote down. >> For other OS?es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this) >> >> Feedback is welcome so I can improve the installation instructions :) >> >> Michka >> >> On 22 ao?t 2014, at 16:06, gowith king wrote: >> >>> >>> >>> ---------- Forwarded message ---------- >>> From: gowith king >>> Date: Fri, Aug 22, 2014 at 1:32 PM >>> Subject: ITK and python wrap problem >>> To: community at itk.org >>> >>> >>> Dear ITK friends >>> I am not sure this is an appropriate place to issue my problem in the wrapping process: >>> I followed the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. >>> Then I tried one line for test : >>> >>> import itk >>> >>> inputimage=itk.Image[itk.UC,3] >>> Traceback (most recent call last): >>> File "", line 1, in >>> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ >>> itkBase.LoadModule(module, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule >>> module = loader.load(swigModuleName) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >>> return imp.load_module(name, fp, pathname, description) >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >>> _ITKCommonPython = swig_import_helper() >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper >>> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) >>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory >>> >>> I got totally lost for this, what should I do to fix this? >>> Any suggestion would be appreciated >>> >>> >>> >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >> >> > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent.ngai at gmail.com Sun Aug 24 22:38:37 2014 From: vincent.ngai at gmail.com (vincent ngai) Date: Mon, 25 Aug 2014 10:38:37 +0800 Subject: [ITK] [ITK-users] Silly question on itk::Matrix In-Reply-To: References: <0BBC89C9-0F67-48F1-99F4-AC89AF5C394B@gmail.com> Message-ID: Hi Jim, thanks for the background, that clarified things for me. Regards, Vincent On Sat, Aug 23, 2014 at 8:12 PM, Jim Miller wrote: > Matrices and images are row major order. Points and vectors are column > vectors. > > No transpose is necessary. You can index element by element directly to > set the column you want. > > Row major ordering is more popular than column major ordering. I think > there are regional preferences as to the"proper" way. I also think > electrical engineers prefer one way whereas mechanical engineers prefer the > other. Probably is partially based on how disciplines view the composition > of coordinate frames (inside out or outside in). > > Some systems allow you to use either convention. We found that leads to a > lot of confusion and errors. So 15 years ago, when we started ITK, we chose > to pick a single standard for the code. > > Jim > > On Aug 22, 2014, at 9:49 PM, vincent ngai wrote: > > Ah yes, so my question is why is the [] accessor not column major? If > points are columns, the matrix elements for the Tx,Ty,Tz translation > components should also be columnar? It just seems like extra work to need > to get the matrix transpose just to do a Mat * P > > Regards, > Vincent > > > On Fri, Aug 22, 2014 at 7:14 PM, Jim Miller wrote: > >> ITK standard is that points are column vectors. Thus, matrix times a >> point a point is defined as Mat * P >> >> Jim >> >> > On Aug 22, 2014, at 3:30 AM, vincent ngai >> wrote: >> > >> > Hi all, pardon me for this silly question on itk::Matrix. Why do I need >> to transpose a translation matrix after I copy the [x,y,z] translation >> values to the matrix[3]. >> > >> > I know conceptually it should not really matter whether its row or col >> major so long as you can >> > post multiply or pre multiply with another vector. But the way >> operator*() works only allows for >> > Matrix * P, and when I test the simple case of TranslationMatrix * >> Point, I would have to transpose the matrix. If I could also do Point * >> TranslationMatrix, then i wouldn't need to transpose. >> > >> > Any ideas? >> > >> > -- >> > Regards, >> > Vincent >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > > > > -- > Regards, > Vincent > > -- Regards, Vincent -------------- 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 CHernando at telespazio.es Mon Aug 25 04:36:44 2014 From: CHernando at telespazio.es (Carlos Hernando Ramiro) Date: Mon, 25 Aug 2014 10:36:44 +0200 Subject: [ITK] [ITK-users] UseAllPixelsOn with Mutual Information In-Reply-To: <800D4DFDAF353641B990F5CEB49F05E179B9C9@GORDONS.aurensis.com> References: <800D4DFDAF353641B990F5CEB49F05E179B9C9@GORDONS.aurensis.com> Message-ID: <53FAF59C.3040602@telespazio.es> Dear all, is seems that the method UseAllPixelsOn() does not work for the class itkMutualInformationImageToImageMetric. Then, what I can do to assure that all the pixels of an specific region are used to calculate this metric? Is there any alternative to UseAllPixelsOn()? Best regards Carlos _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 chernando at telespazio.es Mon Aug 25 05:20:45 2014 From: chernando at telespazio.es (carlos) Date: Mon, 25 Aug 2014 02:20:45 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1408375248616-7586081.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> Message-ID: <1408958445955-7586112.post@n2.nabble.com> Dear Jan, I think that you can use the metric without optimizer, but that you need a transformation and an interpolator. You can use the translation transform (and the interpolator you prefer, although it will not influence): typedef itk::MutualInformationImageToImageMetric MIMetricType; MIMetricType::Pointer MImetric; typedef itk::TranslationTransform< double, ImageDimension > TransformType; TransformType::Pointer transform = TransformType::New(); MImetric->SetTransform(transform); and then call GetValue with the translation parameters [0,0] MIMetricType::TransformParametersType displacementMI(transform->ParametersDimension); displacementMI[0] = 0; displacementMI[1] = 0; MImetric->GetValue(displacementMI); Best regards Carlos -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586112.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 payalprajapati2808 at gmail.com Mon Aug 25 13:01:36 2014 From: payalprajapati2808 at gmail.com (mahi) Date: Mon, 25 Aug 2014 10:01:36 -0700 (PDT) Subject: [ITK] [ITK-users] Problem in computing Eigenvalue for swir band of hdf taken by Imager payload Message-ID: <1408986096189-34456.post@n7.nabble.com> Hello All, I am new to ITK.I want to compute eigenvalue of SWIR band of .h5 File.I have tried it using itkSymmetricEigenAnalysis and vnl_symmetric_eigen .Both Programs work fine for a .tiff file(which i am using for experimental purpose) having dimension 256*256 and it works fine. SWIR band has dimension of 11220*11264. so I made it of 11264*11264 by padding extra zeros at rows starting from 11221. My problem is when i apply both program on this extended matrix it shows no error but also doesnt give any output.It gets stuck...Am i going in a right direction or not?Why this happen?I have attached both code. itk_image_to_matrix.cxx newsvd.cxx Q_matrixfinal.cxx Any help would be appriciated. Thank You, Payal -- View this message in context: http://itk-users.7.n7.nabble.com/Problem-in-computing-Eigenvalue-for-swir-band-of-hdf-taken-by-Imager-payload-tp34456.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 mercikd at thomas.edu Mon Aug 25 14:44:28 2014 From: mercikd at thomas.edu (Dan Mercik) Date: Mon, 25 Aug 2014 18:44:28 +0000 Subject: [ITK] [ITK-users] Tiling Side by Side Question Message-ID: <5d84846dd31f482d88152b7c19c56632@T9.tcnet.thomas.edu> Hey, I have 7 images to tile but only want 2 images to be tile horizontally and the other 5 other images to be tile vertically. When I declare the layouts like layout[0] = 2; layout[1] = 5; The x axis is always being filled. Is it possible to not fill that tile with an image? Daniel Mercik Computer Science Major Service Desk Technician Thomas College _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 millerjv at gmail.com Mon Aug 25 15:42:04 2014 From: millerjv at gmail.com (Jim Miller) Date: Mon, 25 Aug 2014 15:42:04 -0400 Subject: [ITK] [ITK-users] Tiling Side by Side Question In-Reply-To: <5d84846dd31f482d88152b7c19c56632@T9.tcnet.thomas.edu> References: <5d84846dd31f482d88152b7c19c56632@T9.tcnet.thomas.edu> Message-ID: In this, I think you want to cascade two TileImage filters. One to tile the first two images horizontally. The second to Tile that result with your others vertically. Jim > On Aug 25, 2014, at 2:44 PM, Dan Mercik wrote: > > Hey, > > I have 7 images to tile but only want 2 images to be tile horizontally and the other 5 other images to be tile vertically. When I declare the layouts like > > layout[0] = 2; > > layout[1] = 5; > > The x axis is always being filled. Is it possible to not fill that tile with an image? > > > > Daniel Mercik > > Computer Science Major > > Service Desk Technician > > Thomas College > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Aug 25 23:31:16 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 25 Aug 2014 23:31:16 -0400 Subject: [ITK] [ITK-dev] Problem with itkPCAShapeSignedDistanceFunction in multithreaded environment when using a 'dense' solver In-Reply-To: References: Message-ID: Hi Yves, Yes, your comments are very welcome. Thank you for discussing this issue with the list! Regarding the issue described and the patch, I think it is a good start. As you not, the smart pointers are not very effective from an efficiency perspect, and it would be fine to replace them by raw pointer since there is no issue with ownership or life time management. However, the thread-safety is still an issue. Digging into the code, it looks like the m_Selectors member in PCAShapeSignedDistanceFunction can be removed altogether. Please review this patch: http://review.source.kitware.com/#/c/16824/ Thanks, Matt On Mon, Aug 18, 2014 at 10:30 AM, Yves Frederix wrote: > Hi all, > > I am writing you with a crash I encountered while experimenting with > the GeodesicActiveContour image filter with shape guidance. Although > I did not find the root cause of the problem, I did implement a small > change which might be a useful contribution. > > Currently, the GeodesicActiveContourShapePriorLevelSetImageFilter is > based on a SparseField solver. For my application, this was not very > suitable and I implemented a version of this image filter based on a > dense solver. After doing this, however, I consistently experienced a > crash in the algorithm when more than one thread was used. After some > debugging, I tracked down the problem to > itkPCAShapeSignedDistanceFunction, which contains a smart pointer > member variable which caused the crash in the multithreaded run. In > particular, it seemed to me that the reference counting somehow got > confused, and things went wrong. > I did not feel comfortable enough to dig deeper into the root cause of > the problem, but I did do a simple fix to the > itkPCAShapeSignedDistanceFunction code that avoids the problem, which > I would like to share (see attach). Basically, I replaced the > problematic reference counting member variable by a raw pointer, so > that during iteration no reference counting takes place. In this > particular case, I think that this change does not impose any risks as > there is no issue with ownership or life time management. > > I am unsure if this mailing list is the best or correct medium to > report this, so if not, please point me to the right direction. If > somebody would be interested in looking at the root cause of this > issue, I should be able to provide some code to reproduce the crash. > Just let me know. > > Best regards, > Yves > > _______________________________________________ > Powered by www.kitware.com > > 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 Mon Aug 25 23:46:52 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 25 Aug 2014 23:46:52 -0400 Subject: [ITK] [ITK-users] Composite Filter with variable stdvector of filters inside In-Reply-To: References: Message-ID: Hi Ignacio, If I understand corrections, this may do want is desired: void SetNumberOfZSlices( int slices ) { if( m_NumberOfZSlices != slices ) { this->m_NumberOfZSlices = slices; this->UpdateNumberOfFilters(); this->Modified(); } } and a similar implementation for SetNumberOfTimeFrames(). Hope this helps, Matt On Wed, Aug 20, 2014 at 11:00 AM, Jose Ignacio Prieto wrote: > Hi all, > I am trying to create a composite filter for a 4D dataset that will use > different cascaded 2D filters on the inside. For this, I have created a > double std vector that holds all the 2D filters. I have also set some param > setters for this filters (that perform a double for inside, setting the > param to each filter and then calling modified() on the outside one). I have > another method called UpdateNumberofFilters, that depending on 2 ints (num > of Z slices, num of T timeframes) will push back more filters to the 2D > array of filters. > My problem is that I dont know which function should call the > UpdateNumofFilters. It should be done before the setters but after the > constructor and after setting those two ints. I want to design it so that if > I change a param after calling update I dont have to run the whole filter > again, so I dont want it to be under the GenerateData() method. > > Thank you very much for your insights. > > Ignacio Prieto > > -- > Ignacio Prieto > Research Assistant > Biomedical Imaging Center > Pontificia Universida Catolica de Chile > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 yves.frederix+itk at gmail.com Tue Aug 26 02:42:17 2014 From: yves.frederix+itk at gmail.com (Yves Frederix) Date: Tue, 26 Aug 2014 08:42:17 +0200 Subject: [ITK] [ITK-dev] Problem with itkPCAShapeSignedDistanceFunction in multithreaded environment when using a 'dense' solver In-Reply-To: References: Message-ID: Hi Matt, You are right, the troublesome member variable can be removed entirely, making your solution the correct fix. Thank you. Best regards, Yves On Tue, Aug 26, 2014 at 5:31 AM, Matt McCormick wrote: > Hi Yves, > > Yes, your comments are very welcome. Thank you for discussing this > issue with the list! > > Regarding the issue described and the patch, I think it is a good > start. As you not, the smart pointers are not very effective from an > efficiency perspect, and it would be fine to replace them by raw > pointer since there is no issue with ownership or life time > management. However, the thread-safety is still an issue. Digging > into the code, it looks like the m_Selectors member in > PCAShapeSignedDistanceFunction can be removed altogether. Please > review this patch: > > http://review.source.kitware.com/#/c/16824/ > > Thanks, > Matt > > On Mon, Aug 18, 2014 at 10:30 AM, Yves Frederix > wrote: >> Hi all, >> >> I am writing you with a crash I encountered while experimenting with >> the GeodesicActiveContour image filter with shape guidance. Although >> I did not find the root cause of the problem, I did implement a small >> change which might be a useful contribution. >> >> Currently, the GeodesicActiveContourShapePriorLevelSetImageFilter is >> based on a SparseField solver. For my application, this was not very >> suitable and I implemented a version of this image filter based on a >> dense solver. After doing this, however, I consistently experienced a >> crash in the algorithm when more than one thread was used. After some >> debugging, I tracked down the problem to >> itkPCAShapeSignedDistanceFunction, which contains a smart pointer >> member variable which caused the crash in the multithreaded run. In >> particular, it seemed to me that the reference counting somehow got >> confused, and things went wrong. >> I did not feel comfortable enough to dig deeper into the root cause of >> the problem, but I did do a simple fix to the >> itkPCAShapeSignedDistanceFunction code that avoids the problem, which >> I would like to share (see attach). Basically, I replaced the >> problematic reference counting member variable by a raw pointer, so >> that during iteration no reference counting takes place. In this >> particular case, I think that this change does not impose any risks as >> there is no issue with ownership or life time management. >> >> I am unsure if this mailing list is the best or correct medium to >> report this, so if not, please point me to the right direction. If >> somebody would be interested in looking at the root cause of this >> issue, I should be able to provide some code to reproduce the crash. >> Just let me know. >> >> Best regards, >> Yves >> >> _______________________________________________ >> Powered by www.kitware.com >> >> 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 jan.bergmeier at imes.uni-hannover.de Tue Aug 26 09:08:26 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Tue, 26 Aug 2014 06:08:26 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1408958445955-7586112.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> <1408958445955-7586112.post@n2.nabble.com> Message-ID: <1409058506727-7586118.post@n2.nabble.com> Dear Carlos, thank you for your help. i'm still experiencing some difficulties. I tried your proposed way like this: typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, UChar2DImageType > MetricType; typedef itk::TranslationTransform< double, 2 > TransformType; typedef itk::GradientDescentOptimizer OptimizerType; MetricType::Pointer metric = MetricType::New(); TransformType::Pointer transform = TransformType::New(); MetricType::TransformParametersType displacement( transform->ParametersDimension ); displacement[0] = 0.0; displacement[1] = 0.0; metric->SetFixedImage( fixedImage ); metric->SetMovingImage( movingImage); metric->SetTransform( transform ); metric->GetValue( displacement ); When I am trying to get the MI-value with the displacement parameters, my program crashes. i tried another way with an optimizer that does only one iteration: typedef itk::TranslationTransform< double, 2 > TransformType; typedef itk::GradientDescentOptimizer OptimizerType; typedef itk::LinearInterpolateImageFunction< UChar2DImageType, double > InterpolatorType; typedef itk::ImageRegistrationMethod< UChar2DImageType, UChar2DImageType > RegistrationType; typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, UChar2DImageType > MetricType; typedef RegistrationType::ParametersType ParametersType; TransformType::Pointer transform = TransformType::New(); OptimizerType::Pointer optimizer = OptimizerType::New(); InterpolatorType::Pointer interpolator = InterpolatorType::New(); RegistrationType::Pointer registration = RegistrationType::New(); MetricType::Pointer metric = MetricType::New(); registration->SetOptimizer( optimizer ); registration->SetTransform( transform ); registration->SetInterpolator( interpolator ); registration->SetMetric( metric ); registration->SetFixedImage( fixedImage ); registration->SetMovingImage( movingImage ); ParametersType initialParameters( transform->GetNumberOfParameters() ); initialParameters[0] = 0.0; initialParameters[1] = 0.0; registration->SetInitialTransformParameters( initialParameters ); optimizer->SetNumberOfIterations( 1 ); try { registration->Update(); } catch( itk::ExceptionObject & err ) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; } double bestValue = optimizer->GetValue(); The problem here is that I get the following Error: "Description: itk::ERROR: MutualInformationImageToImageMetric(0x48e0860): Standard deviation is too small" Any suggestions for a convenient solution? Thanks, Jan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586118.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 gass at vision.ee.ethz.ch Tue Aug 26 09:22:33 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Tue, 26 Aug 2014 15:22:33 +0200 Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1408375248616-7586081.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> Message-ID: Hi Jan, ITK also offers a convenient identity transform for this: http://www.itk.org/Doxygen/html/classitk_1_1IdentityTransform.html Hope that helps, Tobias 2014-08-18 17:20 GMT+02:00 jan : > Hello, > > I want to perform a registration between two images without any > transformation or optimization. I like to use the > itk::MutualInformationImageToImageMetric. As I understand the itk metric, > you have to use a transformation, an optimizer, an interpolator and so on. > > I want to compare one image to a set of images with mutual information as > metric. > > So basically, I like to use the GetValue() method, without giving any > parameters to it. Is there a way to do that, or another way to get just one > mutual information value between two images? > > Thanks in advance, > > Jan > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081.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 jan.bergmeier at imes.uni-hannover.de Tue Aug 26 09:31:46 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Tue, 26 Aug 2014 06:31:46 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: References: <1408375248616-7586081.post@n2.nabble.com> Message-ID: <1409059906690-7586120.post@n2.nabble.com> Hi, my attempt with the identity transform would be this: typedef itk::IdentityTransform< double, 2 > TransformType; typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, UChar2DImageType > MetricType; TransformType::Pointer transform = TransformType::New(); MetricType::Pointer metric = MetricType::New(); metric->SetFixedImage( fixedImage ); metric->SetMovingImage( movingImage ); metric->GetValue( transform->GetParameters() ); For me it's the same problem. The program crashes when I use GetValue(). It seems to me as if the parameters need to be OptimizerParameters.... Thanks, Jan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586120.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 gass at vision.ee.ethz.ch Tue Aug 26 09:36:46 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Tue, 26 Aug 2014 15:36:46 +0200 Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1409059906690-7586120.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> Message-ID: Have you checked whether your images are physically overlapping? You could also try to change the number of MI samples to avoid accidentally sampling only from homogeneous regions. Best of luck, Tobias 2014-08-26 15:31 GMT+02:00 jan : > Hi, > > my attempt with the identity transform would be this: > > typedef itk::IdentityTransform< double, 2 > TransformType; > typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, > UChar2DImageType > MetricType; > > TransformType::Pointer transform = TransformType::New(); > MetricType::Pointer metric = MetricType::New(); > > metric->SetFixedImage( fixedImage ); > metric->SetMovingImage( movingImage ); > metric->GetValue( transform->GetParameters() ); > > For me it's the same problem. The program crashes when I use GetValue(). It > seems to me as if the parameters need to be OptimizerParameters.... > > Thanks, > Jan > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586120.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 joseignacio.prieto at gmail.com Tue Aug 26 09:38:16 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Tue, 26 Aug 2014 09:38:16 -0400 Subject: [ITK] [ITK-users] Composite Filter with variable stdvector of filters inside In-Reply-To: References: Message-ID: Thanks Matt, my problem was that I didn't know when to call this methods. I finally put them into GenerateInputRequestedRegion and this way seems to be called before Update(). I don't know under what conditions GenerateInputRequestedRegion is called, for example if a parameter is changed after an update call, will it be called again or only GenerateData would be called. Is there a good developer manual? The ITK user manual seems a little short on this. Thanks Ignacio Prieto On Mon, Aug 25, 2014 at 11:46 PM, Matt McCormick wrote: > Hi Ignacio, > > If I understand corrections, this may do want is desired: > > void SetNumberOfZSlices( int slices ) > { > if( m_NumberOfZSlices != slices ) > { > this->m_NumberOfZSlices = slices; > this->UpdateNumberOfFilters(); > this->Modified(); > } > } > > and a similar implementation for SetNumberOfTimeFrames(). > > Hope this helps, > Matt > > On Wed, Aug 20, 2014 at 11:00 AM, Jose Ignacio Prieto > wrote: > > Hi all, > > I am trying to create a composite filter for a 4D dataset that will use > > different cascaded 2D filters on the inside. For this, I have created a > > double std vector that holds all the 2D filters. I have also set some > param > > setters for this filters (that perform a double for inside, setting the > > param to each filter and then calling modified() on the outside one). I > have > > another method called UpdateNumberofFilters, that depending on 2 ints > (num > > of Z slices, num of T timeframes) will push back more filters to the 2D > > array of filters. > > My problem is that I dont know which function should call the > > UpdateNumofFilters. It should be done before the setters but after the > > constructor and after setting those two ints. I want to design it so > that if > > I change a param after calling update I dont have to run the whole filter > > again, so I dont want it to be under the GenerateData() method. > > > > Thank you very much for your insights. > > > > Ignacio Prieto > > > > -- > > Ignacio Prieto > > Research Assistant > > Biomedical Imaging Center > > Pontificia Universida Catolica de Chile > > > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -- Jos? Ignacio Prieto celular(nuevo): 94348182 -------------- 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 jan.bergmeier at imes.uni-hannover.de Tue Aug 26 10:17:05 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Tue, 26 Aug 2014 07:17:05 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> Message-ID: <1409062625902-7586123.post@n2.nabble.com> Increasing the NumberOfSpatialSamples fixes the way with the one-iteration optimizer but unfortunately not the attempts without the optimizer (which I would prefer, since I like to keep it simple). -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586123.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 joseignacio.prieto at gmail.com Tue Aug 26 11:35:50 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Tue, 26 Aug 2014 11:35:50 -0400 Subject: [ITK] [ITK-dev] Create PolygonToMeshFilter Message-ID: Hi all, I am trying to create a filter that receives many 2D polygons in the form of PolyLineParametricPath (which in turn has an itkImage as input) and returns an itkMesh for later visualization. I have completed the GenerateData() method by calling internally to itkAutomaticTopologyMeshSource. The problem seems to be that before GenerateData, the filter fails in itkPointSet::CopyInformation (because it tries to cast the polygon as a mesh). I discovered that the call stack comes from UpdateOutputInformation on my PolygonToMeshFilter and then GenerateOutputInformation, then itkMesh::CopyInformation and itkPointset::CopyInformation. I think I should edit my PolygonToMesh::GenerateOutputInformation() but I don't know how. Inside it I just called Superclass::GenerateOutputInformation. My filter PolygonToMeshFilter is a copy of MeshToMesh filter and inherits from MeshSource. Maybe I should inherit from anothe filter. Thank you very much Ignacio Prieto -- Ignacio Prieto Research Assistant Biomedical Imaging Center Pontificia Universidad Catolica de Chile -------------- 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 joseignacio.prieto at gmail.com Tue Aug 26 11:35:50 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Tue, 26 Aug 2014 11:35:50 -0400 Subject: [ITK] [ITK-users] Create PolygonToMeshFilter Message-ID: Hi all, I am trying to create a filter that receives many 2D polygons in the form of PolyLineParametricPath (which in turn has an itkImage as input) and returns an itkMesh for later visualization. I have completed the GenerateData() method by calling internally to itkAutomaticTopologyMeshSource. The problem seems to be that before GenerateData, the filter fails in itkPointSet::CopyInformation (because it tries to cast the polygon as a mesh). I discovered that the call stack comes from UpdateOutputInformation on my PolygonToMeshFilter and then GenerateOutputInformation, then itkMesh::CopyInformation and itkPointset::CopyInformation. I think I should edit my PolygonToMesh::GenerateOutputInformation() but I don't know how. Inside it I just called Superclass::GenerateOutputInformation. My filter PolygonToMeshFilter is a copy of MeshToMesh filter and inherits from MeshSource. Maybe I should inherit from anothe filter. Thank you very much Ignacio Prieto -- Ignacio Prieto Research Assistant Biomedical Imaging Center Pontificia Universidad Catolica de Chile -------------- 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 Aug 26 11:38:34 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 26 Aug 2014 11:38:34 -0400 Subject: [ITK] [ITK-users] Composite Filter with variable stdvector of filters inside In-Reply-To: References: Message-ID: Hi Ignacio, GenerateInputRequestedRegion() may be a good place, too. When an Update() is called, GenerateInputRequestedRegion() will get called during the pipeline update if the filter's Modified time indicates this is necessary. If the filter needs to be updated, the GenerateData will also get called as appropriate. The best manual I am aware of is the ITK Software Guide [1]. More information on this subject comes in Section 8.3.2 Details of Pipeline Execution and section 8.3 Streaming Large Data. HTH, Matt [1] http://sourceforge.net/projects/itk/files/itk/4.6/InsightSoftwareGuide-Book1-4.6.0.pdf/download On Tue, Aug 26, 2014 at 9:38 AM, Jose Ignacio Prieto wrote: > Thanks Matt, my problem was that I didn't know when to call this methods. I > finally put them into GenerateInputRequestedRegion and this way seems to be > called before Update(). I don't know under what conditions > GenerateInputRequestedRegion is called, for example if a parameter is > changed after an update call, will it be called again or only GenerateData > would be called. Is there a good developer manual? The ITK user manual seems > a little short on this. > > Thanks > > Ignacio Prieto > > > On Mon, Aug 25, 2014 at 11:46 PM, Matt McCormick > wrote: >> >> Hi Ignacio, >> >> If I understand corrections, this may do want is desired: >> >> void SetNumberOfZSlices( int slices ) >> { >> if( m_NumberOfZSlices != slices ) >> { >> this->m_NumberOfZSlices = slices; >> this->UpdateNumberOfFilters(); >> this->Modified(); >> } >> } >> >> and a similar implementation for SetNumberOfTimeFrames(). >> >> Hope this helps, >> Matt >> >> On Wed, Aug 20, 2014 at 11:00 AM, Jose Ignacio Prieto >> wrote: >> > Hi all, >> > I am trying to create a composite filter for a 4D dataset that will use >> > different cascaded 2D filters on the inside. For this, I have created a >> > double std vector that holds all the 2D filters. I have also set some >> > param >> > setters for this filters (that perform a double for inside, setting the >> > param to each filter and then calling modified() on the outside one). I >> > have >> > another method called UpdateNumberofFilters, that depending on 2 ints >> > (num >> > of Z slices, num of T timeframes) will push back more filters to the 2D >> > array of filters. >> > My problem is that I dont know which function should call the >> > UpdateNumofFilters. It should be done before the setters but after the >> > constructor and after setting those two ints. I want to design it so >> > that if >> > I change a param after calling update I dont have to run the whole >> > filter >> > again, so I dont want it to be under the GenerateData() method. >> > >> > Thank you very much for your insights. >> > >> > Ignacio Prieto >> > >> > -- >> > Ignacio Prieto >> > Research Assistant >> > Biomedical Imaging Center >> > Pontificia Universida Catolica de Chile >> > >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > > > > > > -- > Jos? Ignacio Prieto > celular(nuevo): 94348182 _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 joseignacio.prieto at gmail.com Tue Aug 26 11:56:27 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Tue, 26 Aug 2014 11:56:27 -0400 Subject: [ITK] [ITK-dev] Create PolygonToMeshFilter In-Reply-To: References: Message-ID: I solved it partially but don't know why it works. I just set GenerateOutputInformation(){} on my .h file as it is done on itkSpatialObjecToPointSetFilter so it goes straight to GenerateInputRequestedRegion. On Tue, Aug 26, 2014 at 11:35 AM, Jose Ignacio Prieto < joseignacio.prieto at gmail.com> wrote: > Hi all, > I am trying to create a filter that receives many 2D polygons in the form > of PolyLineParametricPath (which in turn has an itkImage as input) and > returns an itkMesh for later visualization. I have completed the > GenerateData() method by calling internally to > itkAutomaticTopologyMeshSource. The problem seems to be that before > GenerateData, the filter fails in itkPointSet::CopyInformation (because it > tries to cast the polygon as a mesh). I discovered that the call stack > comes from UpdateOutputInformation on my PolygonToMeshFilter and then > GenerateOutputInformation, then itkMesh::CopyInformation and > itkPointset::CopyInformation. > I think I should edit my PolygonToMesh::GenerateOutputInformation() but I > don't know how. Inside it I just called > Superclass::GenerateOutputInformation. > My filter PolygonToMeshFilter is a copy of MeshToMesh filter and inherits > from MeshSource. Maybe I should inherit from anothe filter. > Thank you very much > > Ignacio Prieto > > -- > Ignacio Prieto > Research Assistant > Biomedical Imaging Center > Pontificia Universidad Catolica de Chile > -- Jos? Ignacio Prieto celular(nuevo): 94348182 -------------- 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 joseignacio.prieto at gmail.com Tue Aug 26 11:56:27 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Tue, 26 Aug 2014 11:56:27 -0400 Subject: [ITK] [ITK-users] Create PolygonToMeshFilter In-Reply-To: References: Message-ID: I solved it partially but don't know why it works. I just set GenerateOutputInformation(){} on my .h file as it is done on itkSpatialObjecToPointSetFilter so it goes straight to GenerateInputRequestedRegion. On Tue, Aug 26, 2014 at 11:35 AM, Jose Ignacio Prieto < joseignacio.prieto at gmail.com> wrote: > Hi all, > I am trying to create a filter that receives many 2D polygons in the form > of PolyLineParametricPath (which in turn has an itkImage as input) and > returns an itkMesh for later visualization. I have completed the > GenerateData() method by calling internally to > itkAutomaticTopologyMeshSource. The problem seems to be that before > GenerateData, the filter fails in itkPointSet::CopyInformation (because it > tries to cast the polygon as a mesh). I discovered that the call stack > comes from UpdateOutputInformation on my PolygonToMeshFilter and then > GenerateOutputInformation, then itkMesh::CopyInformation and > itkPointset::CopyInformation. > I think I should edit my PolygonToMesh::GenerateOutputInformation() but I > don't know how. Inside it I just called > Superclass::GenerateOutputInformation. > My filter PolygonToMeshFilter is a copy of MeshToMesh filter and inherits > from MeshSource. Maybe I should inherit from anothe filter. > Thank you very much > > Ignacio Prieto > > -- > Ignacio Prieto > Research Assistant > Biomedical Imaging Center > Pontificia Universidad Catolica de Chile > -- Jos? Ignacio Prieto celular(nuevo): 94348182 -------------- 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 chernando at telespazio.es Wed Aug 27 04:55:38 2014 From: chernando at telespazio.es (carlos) Date: Wed, 27 Aug 2014 01:55:38 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1409062625902-7586123.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> <1409062625902-7586123.post@n2.nabble.com> Message-ID: <1409129738759-7586127.post@n2.nabble.com> When the program crashes, no error appears? Take also into account, that having the same size does not mean always that they overlap. You have to check also their origin and spacing in case they have different physical locations. Regarding the standard deviation issue, if you previously normalize the image, then a standard deviation of 0.4 works, please see this example: http://www.itk.org/Doxygen/html/RegistrationITKv4_2ImageRegistration2_8cxx-example.html -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586127.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 maximilian_oliver.mordig at roche.com Wed Aug 27 08:29:12 2014 From: maximilian_oliver.mordig at roche.com (maximilian) Date: Wed, 27 Aug 2014 05:29:12 -0700 (PDT) Subject: [ITK] [ITK-users] Problem with itk::ImageToHistogramFilter Message-ID: <1409142552492-7586128.post@n2.nabble.com> I am having problems with the itk::ImageToHistogramFilter. I am generating ellipses that I want to add to an image that already contains some ellipses (in each iteration step, I add one ellipse to an image being the result of previous iterations). To see if the new ellipse overlaps by more than (let's say) 10%, I use the ImageToHistogramFilter. The previous image has objects that all have pixel values of 1. The newly added ellipse has value of 2. So, to get the number of overlapping pixels, I add up both images and I count the number of pixels = 3 in that image. I set the histogram bin minimum to 0 (background) and the histogram bin maximum to 3 (+ some constant c) and the number of bins such that the step is = 1 (here, it is 3 + c). However, when I output the average frequencies associated to each bin, I get values between 0 and 2 (number like 1.92) and not between 0 and 3 + c (see output of program of attached file). Why? GenerateCells.cxx -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Problem-with-itk-ImageToHistogramFilter-tp7586128.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 Aug 27 09:52:20 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 27 Aug 2014 09:52:20 -0400 Subject: [ITK] [ITK-dev] System PNG sCal issue Message-ID: <060332A9-7A8F-4E15-B9AF-BCB308A597DD@mail.nih.gov> Kent, I am getting a failing test when using a new system PNG. It appears to be related to this issue: https://issues.itk.org/jira/browse/ITK-3067 and commit: https://github.com/InsightSoftwareConsortium/ITK/commit/74b5e6e4bbcbebcee860dd7b52ed76a4941c9efe I have just upgraded my system to redhat7 and I now have libpng 1.5.13. Here is the build on the dashboard: http://open.cdash.org/buildSummary.php?buildid=3465169 There are compiler warnings related to unused variables, and then the failing test has sCal warnings. So I am assuming the failing test is due to sCal issue. As I am diving into the libPNG API and its changes, I thought I'd post up to case someone knows more about this issue. Thanks, Brtad -------------- 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 blowekamp at mail.nih.gov Wed Aug 27 10:35:54 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 27 Aug 2014 10:35:54 -0400 Subject: [ITK] [ITK-dev] System PNG sCal issue In-Reply-To: <060332A9-7A8F-4E15-B9AF-BCB308A597DD@mail.nih.gov> References: <060332A9-7A8F-4E15-B9AF-BCB308A597DD@mail.nih.gov> Message-ID: It looks this there was also a discussion about this on the user mailing list to with a proposed patch: http://public.kitware.com/pipermail/insight-users/2012-December/046756.html Anyone know the state of this? Brad On Aug 27, 2014, at 9:52 AM, Bradley Lowekamp wrote: > Kent, > > I am getting a failing test when using a new system PNG. It appears to be related to this issue: > > https://issues.itk.org/jira/browse/ITK-3067 > > and commit: > > https://github.com/InsightSoftwareConsortium/ITK/commit/74b5e6e4bbcbebcee860dd7b52ed76a4941c9efe > > I have just upgraded my system to redhat7 and I now have libpng 1.5.13. > > Here is the build on the dashboard: > > http://open.cdash.org/buildSummary.php?buildid=3465169 > > There are compiler warnings related to unused variables, and then the failing test has sCal warnings. So I am assuming the failing test is due to sCal issue. As I am diving into the libPNG API and its changes, I thought I'd post up to case someone knows more about this issue. > > Thanks, > Brtad > _______________________________________________ > Powered by www.kitware.com > > 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 Wed Aug 27 10:56:38 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 27 Aug 2014 10:56:38 -0400 Subject: [ITK] [ITK-dev] System PNG sCal issue In-Reply-To: References: <060332A9-7A8F-4E15-B9AF-BCB308A597DD@mail.nih.gov> Message-ID: Here is the patch in Gerrit: http://review.source.kitware.com/#/c/8884/ HTH, Matt On Wed, Aug 27, 2014 at 10:35 AM, Bradley Lowekamp wrote: > It looks this there was also a discussion about this on the user mailing > list to with a proposed patch: > http://public.kitware.com/pipermail/insight-users/2012-December/046756.html > > Anyone know the state of this? > > Brad > > On Aug 27, 2014, at 9:52 AM, Bradley Lowekamp > wrote: > > Kent, > > I am getting a failing test when using a new system PNG. It appears to be > related to this issue: > > https://issues.itk.org/jira/browse/ITK-3067 > > and commit: > > https://github.com/InsightSoftwareConsortium/ITK/commit/74b5e6e4bbcbebcee860dd7b52ed76a4941c9efe > > I have just upgraded my system to redhat7 and I now have libpng 1.5.13. > > Here is the build on the dashboard: > > http://open.cdash.org/buildSummary.php?buildid=3465169 > > There are compiler warnings related to unused variables, and then the > failing test has sCal warnings. So I am assuming the failing test is due to > sCal issue. As I am diving into the libPNG API and its changes, I thought > I'd post up to case someone knows more about this issue. > > Thanks, > Brtad > _______________________________________________ > Powered by www.kitware.com > > 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 Wed Aug 27 11:06:41 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 27 Aug 2014 11:06:41 -0400 Subject: [ITK] [ITK-dev] System PNG sCal issue In-Reply-To: References: <060332A9-7A8F-4E15-B9AF-BCB308A597DD@mail.nih.gov> Message-ID: Great! That is what I was looking for and why I kept thinking I have seen this issue around... Not sure what the real issue is... maybe the png file in the test in invalid, and the lib png change the behavior for this case.... I just don't know yet. I did determine that the spacing of the output put image for this system in 1, while the passing tests have 0.25. So this is the right problem... just need to figure out where the behavior is going wrong. Brad On Aug 27, 2014, at 10:56 AM, Matt McCormick wrote: > Here is the patch in Gerrit: > > http://review.source.kitware.com/#/c/8884/ > > HTH, > Matt > > On Wed, Aug 27, 2014 at 10:35 AM, Bradley Lowekamp > wrote: >> It looks this there was also a discussion about this on the user mailing >> list to with a proposed patch: >> http://public.kitware.com/pipermail/insight-users/2012-December/046756.html >> >> Anyone know the state of this? >> >> Brad >> >> On Aug 27, 2014, at 9:52 AM, Bradley Lowekamp >> wrote: >> >> Kent, >> >> I am getting a failing test when using a new system PNG. It appears to be >> related to this issue: >> >> https://issues.itk.org/jira/browse/ITK-3067 >> >> and commit: >> >> https://github.com/InsightSoftwareConsortium/ITK/commit/74b5e6e4bbcbebcee860dd7b52ed76a4941c9efe >> >> I have just upgraded my system to redhat7 and I now have libpng 1.5.13. >> >> Here is the build on the dashboard: >> >> http://open.cdash.org/buildSummary.php?buildid=3465169 >> >> There are compiler warnings related to unused variables, and then the >> failing test has sCal warnings. So I am assuming the failing test is due to >> sCal issue. As I am diving into the libPNG API and its changes, I thought >> I'd post up to case someone knows more about this issue. >> >> Thanks, >> Brtad >> _______________________________________________ >> Powered by www.kitware.com >> >> 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 pattersonnp.work at gmail.com Wed Aug 27 12:28:19 2014 From: pattersonnp.work at gmail.com (Nick Patterson) Date: Wed, 27 Aug 2014 17:28:19 +0100 Subject: [ITK] [ITK-users] ResampleDICOM example and DCMTK Message-ID: <95FBA78F-1DFC-4F33-9572-DA0DD9DE1E73@gmail.com> Hi, I have been trying to test the ResampledDICOM ITK example using DCMTK instead of GDCM. I have attached the code below. The code compiles and runs, but does not output the resultant files - which is strange, as all of the expected parameters are good (i.e. number of files, origin of image, image dimensions etc). Can anyone possibly comment on any possible reason why the code execute without error, but does not result in any output files? Regards, Nick #include "itkVersion.h" #include "itkImage.h" #include "itkMinimumMaximumImageFilter.h" #include "itkDCMTKImageIO.h" #include "itkDCMTKSeriesFileNames.h" #include "itkNumericSeriesFileNames.h" #include "itkImageSeriesReader.h" #include "itkImageSeriesWriter.h" #include "itkResampleImageFilter.h" #include "itkShiftScaleImageFilter.h" #include "itkIdentityTransform.h" #include "itkLinearInterpolateImageFunction.h" #include #include "dcmdata/dcuid.h" #include static void CopyDictionary (itk::MetaDataDictionary &fromDict, itk::MetaDataDictionary &toDict); int main( int argc, char* argv[] ) { // Validate input parameters if( argc < 4 ) { std::cerr << "Usage: " << argv[0] << " InputDicomDirectory OutputDicomDirectory spacing_x spacing_y spacing_z" << std::endl; return EXIT_FAILURE; } const unsigned int InputDimension = 3; const unsigned int OutputDimension = 2; typedef signed short PixelType; typedef itk::Image< PixelType, InputDimension > InputImageType; typedef itk::Image< PixelType, OutputDimension > OutputImageType; typedef itk::ImageSeriesReader< InputImageType >ReaderType; typedef itk::DCMTKImageIO ImageIOType; typedef itk::DCMTKSeriesFileNames InputNamesGeneratorType; typedef itk::NumericSeriesFileNames OutputNamesGeneratorType; typedef itk::IdentityTransform< double, InputDimension > TransformType; typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; typedef itk::ResampleImageFilter< InputImageType, InputImageType > ResampleFilterType; typedef itk::ShiftScaleImageFilter< InputImageType, InputImageType > ShiftScaleType; typedef itk::ImageSeriesWriter< InputImageType, OutputImageType > SeriesWriterType; //////////////////////////////////////////////// // 1) Read the input series ImageIOType::Pointer gdcmIO = ImageIOType::New(); InputNamesGeneratorType::Pointer inputNames = InputNamesGeneratorType::New(); inputNames->SetInputDirectory( argv[1] ); const ReaderType::FileNamesContainer & filenames = inputNames->GetInputFileNames(); ReaderType::Pointer reader = ReaderType::New(); reader->SetImageIO( gdcmIO ); reader->SetFileNames( filenames ); try { reader->Update(); } catch (itk::ExceptionObject &excp) { std::cerr << "Exception thrown while reading the series" << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } //////////////////////////////////////////////// // 2) Resample the series InterpolatorType::Pointer interpolator = InterpolatorType::New(); TransformType::Pointer transform = TransformType::New(); transform->SetIdentity(); const InputImageType::SpacingType& inputSpacing = reader->GetOutput()->GetSpacing(); const InputImageType::RegionType& inputRegion = reader->GetOutput()->GetLargestPossibleRegion(); const InputImageType::SizeType& inputSize = inputRegion.GetSize(); std::cout << "The input series in directory " << argv[1] << " has " << filenames.size() << " files with spacing " << inputSpacing << std::endl; // Compute the size of the output. The user specifies a spacing on // the command line. If the spacing is 0, the input spacing will be // used. The size (# of pixels) in the output is recomputed using // the ratio of the input and output sizes. InputImageType::SpacingType outputSpacing; outputSpacing[0] = atof(argv[3]); outputSpacing[1] = atof(argv[4]); outputSpacing[2] = atof(argv[5]); bool changeInSpacing = false; for (unsigned int i = 0; i < 3; i++) { if (outputSpacing[i] == 0.0) { outputSpacing[i] = inputSpacing[i]; } else { changeInSpacing = true; } } InputImageType::SizeType outputSize; typedef InputImageType::SizeType::SizeValueType SizeValueType; outputSize[0] = static_cast(inputSize[0] * inputSpacing[0] / outputSpacing[0] + .5); outputSize[1] = static_cast(inputSize[1] * inputSpacing[1] / outputSpacing[1] + .5); outputSize[2] = static_cast(inputSize[2] * inputSpacing[2] / outputSpacing[2] + .5); ResampleFilterType::Pointer resampler = ResampleFilterType::New(); resampler->SetInput( reader->GetOutput() ); resampler->SetTransform( transform ); resampler->SetInterpolator( interpolator ); resampler->SetOutputOrigin ( reader->GetOutput()->GetOrigin()); resampler->SetOutputSpacing ( outputSpacing ); resampler->SetOutputDirection ( reader->GetOutput()->GetDirection()); resampler->SetSize ( outputSize ); resampler->Update (); //////////////////////////////////////////////// // 3) Create a MetaDataDictionary for each slice. // Copy the dictionary from the first image and override slice // specific fields ReaderType::DictionaryRawPointer inputDict = (*(reader->GetMetaDataDictionaryArray()))[0]; ReaderType::DictionaryArrayType outputArray; // To keep the new series in the same study as the original we need // to keep the same study UID. But we need new series and frame of // reference UID's. char seriesUID[100]; dcmGenerateUniqueIdentifier(seriesUID); char frameOfReferenceUID[100]; dcmGenerateUniqueIdentifier(frameOfReferenceUID); std::string studyUID; std::string sopClassUID; itk::ExposeMetaData(*inputDict, "0020|000d", studyUID); itk::ExposeMetaData(*inputDict, "0008|0016", sopClassUID); // gdcmIO->KeepOriginalUIDOn(); for (unsigned int f = 0; f < outputSize[2]; f++) { // Create a new dictionary for this slice ReaderType::DictionaryRawPointer dict = new ReaderType::DictionaryType; // Copy the dictionary from the first slice CopyDictionary (*inputDict, *dict); // Set the UID's for the study, series, SOP and frame of reference itk::EncapsulateMetaData(*dict,"0020|000d", studyUID); itk::EncapsulateMetaData(*dict,"0020|000e", seriesUID); itk::EncapsulateMetaData(*dict,"0020|0052", frameOfReferenceUID); char sopInstanceUID[100]; dcmGenerateUniqueIdentifier(sopInstanceUID); itk::EncapsulateMetaData(*dict,"0008|0018", sopInstanceUID); itk::EncapsulateMetaData(*dict,"0002|0003", sopInstanceUID); // Change fields that are slice specific itksys_ios::ostringstream value; value.str(""); value << f + 1; // Image Number itk::EncapsulateMetaData(*dict,"0020|0013", value.str()); // Series Description - Append new description to current series // description std::string oldSeriesDesc; itk::ExposeMetaData(*inputDict, "0008|103e", oldSeriesDesc); value.str(""); value << oldSeriesDesc << ": Resampled with pixel spacing " << outputSpacing[0] << ", "<< outputSpacing[1] << ", "<< outputSpacing[2]; // This is an long string and there is a 64 character limit in the // standard unsigned lengthDesc = value.str().length(); std::string seriesDesc( value.str(), 0,lengthDesc > 64 ? 64 : lengthDesc); itk::EncapsulateMetaData(*dict,"0008|103e", seriesDesc); // Series Number value.str(""); value << 1001; itk::EncapsulateMetaData(*dict,"0020|0011", value.str()); // Derivation Description - How this image was derived value.str(""); for (int i = 0; i < argc; i++) { value << argv[i] << " "; } value << ": " << ITK_SOURCE_VERSION; lengthDesc = value.str().length(); std::string derivationDesc( value.str(), 0, lengthDesc > 1024 ? 1024 : lengthDesc); itk::EncapsulateMetaData(*dict,"0008|2111", derivationDesc); // Image Position Patient: This is calculated by computing the // physical coordinate of the first pixel in each slice. InputImageType::PointType position; InputImageType::IndexType index; index[0] = 0; index[1] = 0; index[2] = f; resampler->GetOutput()->TransformIndexToPhysicalPoint(index, position); value.str(""); value << position[0] << "\\" << position[1] << "\\" << position[2]; itk::EncapsulateMetaData(*dict,"0020|0032", value.str()); // Slice Location: For now, we store the z component of the Image // Position Patient. value.str(""); value << position[2]; itk::EncapsulateMetaData(*dict,"0020|1041", value.str()); if (changeInSpacing) { // Slice Thickness: For now, we store the z spacing value.str(""); value << outputSpacing[2]; itk::EncapsulateMetaData(*dict,"0018|0050",value.str()); // Spacing Between Slices itk::EncapsulateMetaData(*dict,"0018|0088",value.str()); } // Save the dictionary outputArray.push_back(dict); } //////////////////////////////////////////////// // 4) Shift data to undo the effect of a rescale intercept by the // DICOM reader std::string interceptTag("0028|1052"); typedef itk::MetaDataObject< std::string > MetaDataStringType; itk::MetaDataObjectBase::Pointer entry = (*inputDict)[interceptTag]; MetaDataStringType::ConstPointer interceptValue = dynamic_cast( entry.GetPointer() ) ; int interceptShift = 0; if( interceptValue ) { std::string tagValue = interceptValue->GetMetaDataObjectValue(); interceptShift = -atoi ( tagValue.c_str() ); } ShiftScaleType::Pointer shiftScale = ShiftScaleType::New(); shiftScale->SetInput( resampler->GetOutput()); shiftScale->SetShift( interceptShift ); //////////////////////////////////////////////// // 5) Write the new DICOM series // Make the output directory and generate the file names. itksys::SystemTools::MakeDirectory( argv[2] ); // Generate the file names OutputNamesGeneratorType::Pointer outputNames = OutputNamesGeneratorType::New(); std::string seriesFormat(argv[2]); seriesFormat = seriesFormat + "IM%d.dcm"; outputNames->SetSeriesFormat (seriesFormat.c_str()); outputNames->SetStartIndex (1); outputNames->SetEndIndex (outputSize[2]); std::cout << "Output Size: " << outputSize[2] << std::endl; std::cout << outputNames->GetFileNames().at(0) << std::endl; SeriesWriterType::Pointer seriesWriter = SeriesWriterType::New(); seriesWriter->SetInput( shiftScale->GetOutput() ); seriesWriter->SetImageIO( gdcmIO ); seriesWriter->SetFileNames( outputNames->GetFileNames() ); seriesWriter->SetMetaDataDictionaryArray( &outputArray ); std::cout << seriesWriter->GetImageIO()->GetOrigin(0) << " " << seriesWriter->GetImageIO()->GetOrigin(1) << " " << seriesWriter->GetImageIO()->GetOrigin(2) << std::endl; try { seriesWriter->Update(); } catch( itk::ExceptionObject & excp ) { std::cerr << "Exception thrown while writing the series " << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } std::cout << "The output series in directory " << argv[2] << " has " << outputSize[2] << " files with spacing "<< outputSpacing << std::endl; return EXIT_SUCCESS; } void CopyDictionary (itk::MetaDataDictionary &fromDict, itk::MetaDataDictionary &toDict) { typedef itk::MetaDataDictionary DictionaryType; DictionaryType::ConstIterator itr = fromDict.Begin(); DictionaryType::ConstIterator end = fromDict.End(); typedef itk::MetaDataObject< std::string > MetaDataStringType; while( itr != end ) { itk::MetaDataObjectBase::Pointer entry = itr->second; MetaDataStringType::Pointer entryvalue = dynamic_cast( entry.GetPointer() ) ; if( entryvalue ) { std::string tagkey = itr->first; std::string tagvalue = entryvalue->GetMetaDataObjectValue(); itk::EncapsulateMetaData(toDict, tagkey, tagvalue); } ++itr; } } -------------- 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 Aug 27 13:30:56 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 27 Aug 2014 13:30:56 -0400 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 (tomorow), 9 AM Eastern USA time, there will be a Google+ Hangout where we will be doing code reviews: https://plus.google.com/u/0/events/cj4tf2heirsligiim1blh9j3498 On Friday, 10 AM Eastern USA time, an ITK development teleconference, (866) 546-4138 USA or +1 (404) 602-0798 International Access code 5687046# All are welcome. Hope to talk to you then! From mohammedrashadkm at gmail.com Thu Aug 28 04:48:44 2014 From: mohammedrashadkm at gmail.com (Rashad M) Date: Thu, 28 Aug 2014 10:48:44 +0200 Subject: [ITK] [ITK-dev] System PNG sCal issue In-Reply-To: References: <060332A9-7A8F-4E15-B9AF-BCB308A597DD@mail.nih.gov> Message-ID: Hello, Here is another related issuse regarding png sCal. - http://public.kitware.com/pipermail/insight-developers/2014-July/023918.html On Wed, Aug 27, 2014 at 5:06 PM, Bradley Lowekamp wrote: > Great! That is what I was looking for and why I kept thinking I have seen > this issue around... > > Not sure what the real issue is... maybe the png file in the test in > invalid, and the lib png change the behavior for this case.... I just don't > know yet. > > I did determine that the spacing of the output put image for this system > in 1, while the passing tests have 0.25. So this is the right problem... > just need to figure out where the behavior is going wrong. > > Brad > > On Aug 27, 2014, at 10:56 AM, Matt McCormick > wrote: > > > Here is the patch in Gerrit: > > > > http://review.source.kitware.com/#/c/8884/ > > > > HTH, > > Matt > > > > On Wed, Aug 27, 2014 at 10:35 AM, Bradley Lowekamp > > wrote: > >> It looks this there was also a discussion about this on the user mailing > >> list to with a proposed patch: > >> > http://public.kitware.com/pipermail/insight-users/2012-December/046756.html > >> > >> Anyone know the state of this? > >> > >> Brad > >> > >> On Aug 27, 2014, at 9:52 AM, Bradley Lowekamp > >> wrote: > >> > >> Kent, > >> > >> I am getting a failing test when using a new system PNG. It appears to > be > >> related to this issue: > >> > >> https://issues.itk.org/jira/browse/ITK-3067 > >> > >> and commit: > >> > >> > https://github.com/InsightSoftwareConsortium/ITK/commit/74b5e6e4bbcbebcee860dd7b52ed76a4941c9efe > >> > >> I have just upgraded my system to redhat7 and I now have libpng 1.5.13. > >> > >> Here is the build on the dashboard: > >> > >> http://open.cdash.org/buildSummary.php?buildid=3465169 > >> > >> There are compiler warnings related to unused variables, and then the > >> failing test has sCal warnings. So I am assuming the failing test is > due to > >> sCal issue. As I am diving into the libPNG API and its changes, I > thought > >> I'd post up to case someone knows more about this issue. > >> > >> Thanks, > >> Brtad > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> 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 > -- Regards, Rashad -------------- 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 jan.bergmeier at imes.uni-hannover.de Thu Aug 28 07:43:45 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Thu, 28 Aug 2014 04:43:45 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1409129738759-7586127.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> <1409062625902-7586123.post@n2.nabble.com> <1409129738759-7586127.post@n2.nabble.com> Message-ID: <1409226225974-7586133.post@n2.nabble.com> Hey, no error appears when the program crashes. i checked the origin and the spacing. Both are the same for both images. Thanks, Jan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586133.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 jan.bergmeier at imes.uni-hannover.de Thu Aug 28 09:24:40 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Thu, 28 Aug 2014 06:24:40 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1409226225974-7586133.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> <1409062625902-7586123.post@n2.nabble.com> <1409129738759-7586127.post@n2.nabble.com> <1409226225974-7586133.post@n2.nabble.com> Message-ID: <1409232280489-7586134.post@n2.nabble.com> Hi, I will use this way, because it's the most convenient that's working for me. //Typedefs typedef itk::IdentityTransform< double, 2 > TransformType; typedef itk::GradientDescentOptimizer OptimizerType; typedef itk::LinearInterpolateImageFunction< UChar2DImageType, double > InterpolatorType; typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, UChar2DImageType > MiMetricType; typedef itk::ImageRegistrationMethod< UChar2DImageType, UChar2DImageType > RegistrationType; //Create registration components TransformType::Pointer transform = TransformType::New(); OptimizerType::Pointer optimizer = OptimizerType::New(); InterpolatorType::Pointer interpolator = InterpolatorType::New(); RegistrationType::Pointer registration = RegistrationType::New(); //Configure transform transform->SetIdentity(); //Configure optimizer optimizer->SetNumberOfIterations( 1 ); //Configure metric MetricType::Pointer metric = MetricType::New(); metric->SetNumberOfSpatialSamples( 1000 ); //Set up registration registration->SetOptimizer( optimizer ); registration->SetTransform( transform ); registration->SetInterpolator( interpolator ); registration->SetMetric( metric ); registration->SetFixedImage( fixedImageIn ); registration->SetMovingImage( movingImageIn ); registration->SetInitialTransformParameters( transform->GetParameters() ); //Perform registration try { registration->Update(); } catch( itk::ExceptionObject & err ) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; } //Get output double bestValue = optimizer->GetValue(); Thank you all for your help, Jan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586134.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 hans-johnson at uiowa.edu Thu Aug 28 14:37:29 2014 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Thu, 28 Aug 2014 18:37:29 +0000 Subject: [ITK] [ITK-dev] issues.itk.org maintenance Message-ID: The ITK bug tracker will be down for approximately 30 minutes at 4:30CST today for routine maintenance. Hans ________________________________ 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. ________________________________ -------------- 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 krismz at sci.utah.edu Thu Aug 28 16:13:23 2014 From: krismz at sci.utah.edu (Kristen Zygmunt) Date: Thu, 28 Aug 2014 14:13:23 -0600 Subject: [ITK] [ITK-users] Compiling ITK for GPU support In-Reply-To: References: Message-ID: <911AFB65-CD92-45BB-9880-D830B2D8FFE5@sci.utah.edu> You will need to install OpenCL first. If you install it where OpenCL recommends to be installed, CMake should then be able to find it. -Kris > Date: Thu, 21 Aug 2014 02:07:38 +0900 > From: "Xiaopeng Yang" > To: > Subject: [ITK] [ITK-users] Compiling ITK for GPU support > Message-ID: <023f01cfbc99$3ecc2c60$bc648520$@ac.kr> > Content-Type: text/plain; charset="utf-8" > > Hello, > > > > I would like to develop GPU based program for image processing, so I tried to compile ITK with GPU support. > > > > My question is whether I shall install 3rd party program like CUDDA first? > > > > Thank you. > > > > Xiaopeng > > -------------- 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 Aug 28 22:35:03 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 28 Aug 2014 22:35:03 -0400 Subject: [ITK] [ITK-users] [ITK-dev] Create PolygonToMeshFilter In-Reply-To: References: Message-ID: Hi Ignacio, The default implementation of GenerateOutputInformation() in itk::ProcessObject is to call ::CopyInformation() on all the pipeline objects from the input to the output DataObjects. The information that is copied for itk::PointSet / itk::Mesh is related to Region's (see their implementations of ::CopyInformation()). You may write a GenerateOutputInformation() that sets these regions, or you could leave the default values given in the constructors, which is what the SpatialObjectToPointSetFilter does. Hope this helps, Matt On Tue, Aug 26, 2014 at 11:56 AM, Jose Ignacio Prieto wrote: > I solved it partially but don't know why it works. I just set > GenerateOutputInformation(){} on my .h file as it is done on > itkSpatialObjecToPointSetFilter so it goes straight to > GenerateInputRequestedRegion. > > > > On Tue, Aug 26, 2014 at 11:35 AM, Jose Ignacio Prieto > wrote: >> >> Hi all, >> I am trying to create a filter that receives many 2D polygons in the form >> of PolyLineParametricPath (which in turn has an itkImage as input) and >> returns an itkMesh for later visualization. I have completed the >> GenerateData() method by calling internally to >> itkAutomaticTopologyMeshSource. The problem seems to be that before >> GenerateData, the filter fails in itkPointSet::CopyInformation (because it >> tries to cast the polygon as a mesh). I discovered that the call stack comes >> from UpdateOutputInformation on my PolygonToMeshFilter and then >> GenerateOutputInformation, then itkMesh::CopyInformation and >> itkPointset::CopyInformation. >> I think I should edit my PolygonToMesh::GenerateOutputInformation() but I >> don't know how. Inside it I just called >> Superclass::GenerateOutputInformation. >> My filter PolygonToMeshFilter is a copy of MeshToMesh filter and inherits >> from MeshSource. Maybe I should inherit from anothe filter. >> Thank you very much >> >> Ignacio Prieto >> >> -- >> Ignacio Prieto >> Research Assistant >> Biomedical Imaging Center >> Pontificia Universidad Catolica de Chile > > > > > -- > Jos? Ignacio Prieto > celular(nuevo): 94348182 > > _______________________________________________ > Powered by www.kitware.com > > 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://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 Aug 28 22:35:03 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 28 Aug 2014 22:35:03 -0400 Subject: [ITK] [ITK-dev] Create PolygonToMeshFilter In-Reply-To: References: Message-ID: Hi Ignacio, The default implementation of GenerateOutputInformation() in itk::ProcessObject is to call ::CopyInformation() on all the pipeline objects from the input to the output DataObjects. The information that is copied for itk::PointSet / itk::Mesh is related to Region's (see their implementations of ::CopyInformation()). You may write a GenerateOutputInformation() that sets these regions, or you could leave the default values given in the constructors, which is what the SpatialObjectToPointSetFilter does. Hope this helps, Matt On Tue, Aug 26, 2014 at 11:56 AM, Jose Ignacio Prieto wrote: > I solved it partially but don't know why it works. I just set > GenerateOutputInformation(){} on my .h file as it is done on > itkSpatialObjecToPointSetFilter so it goes straight to > GenerateInputRequestedRegion. > > > > On Tue, Aug 26, 2014 at 11:35 AM, Jose Ignacio Prieto > wrote: >> >> Hi all, >> I am trying to create a filter that receives many 2D polygons in the form >> of PolyLineParametricPath (which in turn has an itkImage as input) and >> returns an itkMesh for later visualization. I have completed the >> GenerateData() method by calling internally to >> itkAutomaticTopologyMeshSource. The problem seems to be that before >> GenerateData, the filter fails in itkPointSet::CopyInformation (because it >> tries to cast the polygon as a mesh). I discovered that the call stack comes >> from UpdateOutputInformation on my PolygonToMeshFilter and then >> GenerateOutputInformation, then itkMesh::CopyInformation and >> itkPointset::CopyInformation. >> I think I should edit my PolygonToMesh::GenerateOutputInformation() but I >> don't know how. Inside it I just called >> Superclass::GenerateOutputInformation. >> My filter PolygonToMeshFilter is a copy of MeshToMesh filter and inherits >> from MeshSource. Maybe I should inherit from anothe filter. >> Thank you very much >> >> Ignacio Prieto >> >> -- >> Ignacio Prieto >> Research Assistant >> Biomedical Imaging Center >> Pontificia Universidad Catolica de Chile > > > > > -- > Jos? Ignacio Prieto > celular(nuevo): 94348182 > > _______________________________________________ > Powered by www.kitware.com > > 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 Aug 28 22:39:54 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 28 Aug 2014 22:39:54 -0400 Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1409232280489-7586134.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> <1409062625902-7586123.post@n2.nabble.com> <1409129738759-7586127.post@n2.nabble.com> <1409226225974-7586133.post@n2.nabble.com> <1409232280489-7586134.post@n2.nabble.com> Message-ID: Hi Jan, Make sure to call Initialize() [1]. See also the MeanSquareImageMetric1.cxx file from the Examples/ directory. Hope this helps, Matt [1] http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageToImageMetric.html#a2bd5955a3bedf31e701aed3ee1d4e473 On Thu, Aug 28, 2014 at 9:24 AM, jan wrote: > Hi, I will use this way, because it's the most convenient that's working for > me. > > //Typedefs > typedef itk::IdentityTransform< double, 2 > TransformType; > typedef itk::GradientDescentOptimizer OptimizerType; > typedef itk::LinearInterpolateImageFunction< UChar2DImageType, double > > InterpolatorType; > typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, > UChar2DImageType > MiMetricType; > typedef itk::ImageRegistrationMethod< UChar2DImageType, UChar2DImageType >> RegistrationType; > > //Create registration components > TransformType::Pointer transform = TransformType::New(); > OptimizerType::Pointer optimizer = OptimizerType::New(); > InterpolatorType::Pointer interpolator = InterpolatorType::New(); > RegistrationType::Pointer registration = RegistrationType::New(); > > //Configure transform > transform->SetIdentity(); > > //Configure optimizer > optimizer->SetNumberOfIterations( 1 ); > > //Configure metric > MetricType::Pointer metric = MetricType::New(); > metric->SetNumberOfSpatialSamples( 1000 ); > > //Set up registration > registration->SetOptimizer( optimizer ); > registration->SetTransform( transform ); > registration->SetInterpolator( interpolator ); > registration->SetMetric( metric ); > > registration->SetFixedImage( fixedImageIn ); > registration->SetMovingImage( movingImageIn ); > registration->SetInitialTransformParameters( transform->GetParameters() > ); > > //Perform registration > try > { > registration->Update(); > } > catch( itk::ExceptionObject & err ) > { > std::cout << "ExceptionObject caught !" << std::endl; > std::cout << err << std::endl; > } > > //Get output > double bestValue = optimizer->GetValue(); > > Thank you all for your help, > > Jan > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586134.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 g.bogle at auckland.ac.nz Fri Aug 29 04:09:30 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 08:09:30 +0000 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem Message-ID: I've been using Visual Studio 10 for a few years without any problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my programs with the new libraries the build fails with (for example) this message: crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory Looking at the Project Properties I see in Additional Include Directories: crop.cpp(18): \include\ITK-4.5 For some reason cmake has not used the ITK_DIR prefix. In addition I see in Linker > Additional Dependencies that all the ITK libraries are expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, although in this case the ITK_DIR prefix has been used. This is a bit of a mess. I presume the problem lies with cmake. My version is 2.8.12.2, which I would have thought was recent enough - maybe it's too recent. Has anyone else run into this problem, and is there a solution? Thanks Gib -------------- 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 indianzeppelin at gmail.com Fri Aug 29 04:29:47 2014 From: indianzeppelin at gmail.com (Girish Mallya Udupi) Date: Fri, 29 Aug 2014 09:29:47 +0100 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: Message-ID: Could you paste the part of your CMakeLists.txt where you find/include/link ITK? On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle wrote: > I've been using Visual Studio 10 for a few years without any problems. > Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I > have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK > environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my > programs with the new libraries the build fails with (for example) this > message: > > crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': > No such file or directory > > Looking at the Project Properties I see in Additional Include Directories: > crop.cpp(18): \include\ITK-4.5 > For some reason cmake has not used the ITK_DIR prefix. In addition I see > in Linker > Additional Dependencies that all the ITK libraries are expected > to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, > although in this case the ITK_DIR prefix has been used. > > This is a bit of a mess. I presume the problem lies with cmake. My > version is 2.8.12.2, which I would have thought was recent enough - maybe > it's too recent. Has anyone else run into this problem, and is there a > solution? > > Thanks > Gib > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 > > -- Regards, Girish -------------- 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 g.bogle at auckland.ac.nz Fri Aug 29 05:10:05 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 09:10:05 +0000 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: , Message-ID: I just remembered that I forgot to paste that: cmake_minimum_required(VERSION 2.6) PROJECT(crop) FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.") ENDIF(ITK_FOUND) set(PROJECTNAME "crop") ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 8:25 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem Could you paste the part of your CMakeLists.txt where you find/include ITK? On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle > wrote: I've been using Visual Studio 10 for a few years without any problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my programs with the new libraries the build fails with (for example) this message: crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory Looking at the Project Properties I see in Additional Include Directories: crop.cpp(18): \include\ITK-4.5 For some reason cmake has not used the ITK_DIR prefix. In addition I see in Linker > Additional Dependencies that all the ITK libraries are expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, although in this case the ITK_DIR prefix has been used. This is a bit of a mess. I presume the problem lies with cmake. My version is 2.8.12.2, which I would have thought was recent enough - maybe it's too recent. Has anyone else run into this problem, and is there a solution? Thanks Gib _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 -- Regards, Girish -------------- 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 indianzeppelin at gmail.com Fri Aug 29 05:29:51 2014 From: indianzeppelin at gmail.com (Girish Mallya Udupi) Date: Fri, 29 Aug 2014 10:29:51 +0100 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: Message-ID: That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE (${ITK_INCLUDE_DIRS})? On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle wrote: > I just remembered that I forgot to paste that: > > > cmake_minimum_required(VERSION 2.6) > > PROJECT(crop) > FIND_PACKAGE(ITK) > IF(ITK_FOUND) > INCLUDE(${ITK_USE_FILE}) > ELSE(ITK_FOUND) > MESSAGE(FATAL_ERROR > "ITK not found. Please set ITK_DIR.") > ENDIF(ITK_FOUND) > > set(PROJECTNAME "crop") > ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) > TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) > ------------------------------ > *From:* Girish Mallya Udupi [indianzeppelin at gmail.com] > *Sent:* Friday, 29 August 2014 8:25 p.m. > *To:* Gib Bogle > *Cc:* insight-users at itk.org > *Subject:* Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem > > Could you paste the part of your CMakeLists.txt where you find/include > ITK? > > > On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle wrote: > >> I've been using Visual Studio 10 for a few years without any problems. >> Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I >> have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK >> environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my >> programs with the new libraries the build fails with (for example) this >> message: >> >> crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': >> No such file or directory >> >> Looking at the Project Properties I see in Additional Include >> Directories: crop.cpp(18): \include\ITK-4.5 >> For some reason cmake has not used the ITK_DIR prefix. In addition I see >> in Linker > Additional Dependencies that all the ITK libraries are expected >> to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, >> although in this case the ITK_DIR prefix has been used. >> >> This is a bit of a mess. I presume the problem lies with cmake. My >> version is 2.8.12.2, which I would have thought was recent enough - maybe >> it's too recent. Has anyone else run into this problem, and is there a >> solution? >> >> Thanks >> Gib >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 >> >> > > > -- > Regards, > Girish > -- Regards, Girish -------------- 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 g.bogle at auckland.ac.nz Fri Aug 29 05:33:19 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 09:33:19 +0000 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: , Message-ID: OK, I just did that, and got: D:/InsightToolkit-4.5.2/CMake/UseITK.cmake /include/ITK-4.5 ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 9:29 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE (${ITK_INCLUDE_DIRS})? On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle > wrote: I just remembered that I forgot to paste that: cmake_minimum_required(VERSION 2.6) PROJECT(crop) FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.") ENDIF(ITK_FOUND) set(PROJECTNAME "crop") ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 8:25 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem Could you paste the part of your CMakeLists.txt where you find/include ITK? On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle > wrote: I've been using Visual Studio 10 for a few years without any problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my programs with the new libraries the build fails with (for example) this message: crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory Looking at the Project Properties I see in Additional Include Directories: crop.cpp(18): \include\ITK-4.5 For some reason cmake has not used the ITK_DIR prefix. In addition I see in Linker > Additional Dependencies that all the ITK libraries are expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, although in this case the ITK_DIR prefix has been used. This is a bit of a mess. I presume the problem lies with cmake. My version is 2.8.12.2, which I would have thought was recent enough - maybe it's too recent. Has anyone else run into this problem, and is there a solution? Thanks Gib _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 -- Regards, Girish -- Regards, Girish -------------- 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 g.bogle at auckland.ac.nz Fri Aug 29 05:47:46 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 09:47:46 +0000 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: , Message-ID: Hold everything, Girish! I see that D:\ITK-VS11-x64 does not have the directory structure of an ITK installation, from which I conclude that I did something wrong. I am now checking the build of ITK and will report back. ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 9:29 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE (${ITK_INCLUDE_DIRS})? On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle > wrote: I just remembered that I forgot to paste that: cmake_minimum_required(VERSION 2.6) PROJECT(crop) FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.") ENDIF(ITK_FOUND) set(PROJECTNAME "crop") ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 8:25 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem Could you paste the part of your CMakeLists.txt where you find/include ITK? On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle > wrote: I've been using Visual Studio 10 for a few years without any problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my programs with the new libraries the build fails with (for example) this message: crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory Looking at the Project Properties I see in Additional Include Directories: crop.cpp(18): \include\ITK-4.5 For some reason cmake has not used the ITK_DIR prefix. In addition I see in Linker > Additional Dependencies that all the ITK libraries are expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, although in this case the ITK_DIR prefix has been used. This is a bit of a mess. I presume the problem lies with cmake. My version is 2.8.12.2, which I would have thought was recent enough - maybe it's too recent. Has anyone else run into this problem, and is there a solution? Thanks Gib _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 -- Regards, Girish -- Regards, Girish -------------- 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 g.bogle at auckland.ac.nz Fri Aug 29 05:57:24 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 09:57:24 +0000 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: , Message-ID: Now I'm more confused. I thought that D:\ITK-VS11-x64 didn't look like an ITK installation directory because on my other machine there are only the subdirectories 'bin', 'include', 'lib', and 'share', while on the new machine I have those and many more, including 'CMakeFiles', 'config', 'ExternalData', 'Modules', 'Utilities'. But I did Build Install again and it left things unchanged. So it appears that the ITK install has changed from ITK-4.0 to ITK-4.5. Should I go back to 4.0? Life was simpler then... ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 9:29 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE (${ITK_INCLUDE_DIRS})? On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle > wrote: I just remembered that I forgot to paste that: cmake_minimum_required(VERSION 2.6) PROJECT(crop) FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.") ENDIF(ITK_FOUND) set(PROJECTNAME "crop") ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 8:25 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem Could you paste the part of your CMakeLists.txt where you find/include ITK? On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle > wrote: I've been using Visual Studio 10 for a few years without any problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my programs with the new libraries the build fails with (for example) this message: crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory Looking at the Project Properties I see in Additional Include Directories: crop.cpp(18): \include\ITK-4.5 For some reason cmake has not used the ITK_DIR prefix. In addition I see in Linker > Additional Dependencies that all the ITK libraries are expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, although in this case the ITK_DIR prefix has been used. This is a bit of a mess. I presume the problem lies with cmake. My version is 2.8.12.2, which I would have thought was recent enough - maybe it's too recent. Has anyone else run into this problem, and is there a solution? Thanks Gib _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 -- Regards, Girish -- Regards, Girish -------------- 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 g.bogle at auckland.ac.nz Fri Aug 29 06:16:14 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 10:16:14 +0000 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: , Message-ID: I just checked the build configuration in cmake and everything looks fine. ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 9:29 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE (${ITK_INCLUDE_DIRS})? On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle > wrote: I just remembered that I forgot to paste that: cmake_minimum_required(VERSION 2.6) PROJECT(crop) FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.") ENDIF(ITK_FOUND) set(PROJECTNAME "crop") ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 8:25 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem Could you paste the part of your CMakeLists.txt where you find/include ITK? On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle > wrote: I've been using Visual Studio 10 for a few years without any problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my programs with the new libraries the build fails with (for example) this message: crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory Looking at the Project Properties I see in Additional Include Directories: crop.cpp(18): \include\ITK-4.5 For some reason cmake has not used the ITK_DIR prefix. In addition I see in Linker > Additional Dependencies that all the ITK libraries are expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, although in this case the ITK_DIR prefix has been used. This is a bit of a mess. I presume the problem lies with cmake. My version is 2.8.12.2, which I would have thought was recent enough - maybe it's too recent. Has anyone else run into this problem, and is there a solution? Thanks Gib _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 -- Regards, Girish -- Regards, Girish -------------- 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 indianzeppelin at gmail.com Fri Aug 29 06:35:44 2014 From: indianzeppelin at gmail.com (Girish Mallya Udupi) Date: Fri, 29 Aug 2014 11:35:44 +0100 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: Message-ID: Ok, I've never actually built the "INSTALL" project and the oldest ITK version I have used is ITK-4.5.1. The folders you see ('CMakeFiles' etc) look normal to me since those are present in the build folder. Anyway, it might be worth trying to build ITK again using the following simple steps. (You might be aware of all the steps, but mentioning them all here just for the sake of completeness). 1) Create a root folder e.g., D:\ITK-4.5 2) Create two folders in the root folder "src" and "bin" 3) Put the ITK source tree in the src folder. So this folder would have the main ITK CMakeLists.txt. 4) Configure and generate using CMake with "D:\ITK-4.5\src" as source folder and "D:\ITK-4.5\bin" as binary directory 5) Then open the ITK.sln from "D:\ITK-4.5\bin" and build the solution. 6) Once built, edit the ITK environment variable ITK_DIR to point to " D:\ITK-4.5\bin" I've never faced any problem using ITK in my projects after building it this way. I am still a beginner, so someone more knowledgeable could point out what exactly the problem was with your build. On Fri, Aug 29, 2014 at 11:16 AM, Gib Bogle wrote: > I just checked the build configuration in cmake and everything looks > fine. > ------------------------------ > *From:* Girish Mallya Udupi [indianzeppelin at gmail.com] > *Sent:* Friday, 29 August 2014 9:29 p.m. > > *To:* Gib Bogle > *Cc:* insight-users at itk.org > *Subject:* Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem > > That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE > (${ITK_INCLUDE_DIRS})? > > > On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle > wrote: > >> I just remembered that I forgot to paste that: >> >> >> cmake_minimum_required(VERSION 2.6) >> >> PROJECT(crop) >> FIND_PACKAGE(ITK) >> IF(ITK_FOUND) >> INCLUDE(${ITK_USE_FILE}) >> ELSE(ITK_FOUND) >> MESSAGE(FATAL_ERROR >> "ITK not found. Please set ITK_DIR.") >> ENDIF(ITK_FOUND) >> >> set(PROJECTNAME "crop") >> ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) >> TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) >> ------------------------------ >> *From:* Girish Mallya Udupi [indianzeppelin at gmail.com] >> *Sent:* Friday, 29 August 2014 8:25 p.m. >> *To:* Gib Bogle >> *Cc:* insight-users at itk.org >> *Subject:* Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem >> >> Could you paste the part of your CMakeLists.txt where you >> find/include ITK? >> >> >> On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle >> wrote: >> >>> I've been using Visual Studio 10 for a few years without any >>> problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) >>> installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. >>> The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to >>> build my programs with the new libraries the build fails with (for example) >>> this message: >>> >>> crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': >>> No such file or directory >>> >>> Looking at the Project Properties I see in Additional Include >>> Directories: crop.cpp(18): \include\ITK-4.5 >>> For some reason cmake has not used the ITK_DIR prefix. In addition I >>> see in Linker > Additional Dependencies that all the ITK libraries are >>> expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent >>> directory, although in this case the ITK_DIR prefix has been used. >>> >>> This is a bit of a mess. I presume the problem lies with cmake. My >>> version is 2.8.12.2, which I would have thought was recent enough - maybe >>> it's too recent. Has anyone else run into this problem, and is there a >>> solution? >>> >>> Thanks >>> Gib >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 >>> >>> >> >> >> -- >> Regards, >> Girish >> > > > > -- > Regards, > Girish > -- Regards, Girish -------------- 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 jan.bergmeier at imes.uni-hannover.de Fri Aug 29 09:10:41 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Fri, 29 Aug 2014 06:10:41 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> <1409062625902-7586123.post@n2.nabble.com> <1409129738759-7586127.post@n2.nabble.com> <1409226225974-7586133.post@n2.nabble.com> <1409232280489-7586134.post@n2.nabble.com> Message-ID: <1409317841331-7586146.post@n2.nabble.com> Thanks Matt, this example was exactly what I was searching in the first place. My new minimal version is now this: typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, UChar2DImageType > MetricType; typedef itk::LinearInterpolateImageFunction< UChar2DImageType, double > InterpolatorType; typedef itk::IdentityTransform< double, 2 > TransformType; MetricType::Pointer metric = MetricType::New(); TransformType::Pointer transform = TransformType::New(); InterpolatorType::Pointer interpolator = InterpolatorType::New(); metric->SetFixedImage( fixedImage ); metric->SetMovingImage( movingImage ); metric->SetFixedImageRegion( fixedImage->GetLargestPossibleRegion() ); metric->SetTransform( transform ); metric->SetInterpolator( interpolator ); metric->SetNumberOfSpatialSamples( 1000 ); metric->Initialize(); double mutualInformation = metric->GetValue( transform->GetParameters() ); Regards, Jan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586146.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 Fri Aug 29 12:24:39 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 29 Aug 2014 12:24:39 -0400 Subject: [ITK] [ITK-users] Problem with itk::ImageToHistogramFilter In-Reply-To: <1409142552492-7586128.post@n2.nabble.com> References: <1409142552492-7586128.post@n2.nabble.com> Message-ID: Hi Maximilian, It is necessary to call imageToHistogramFilter->SetAutoMinimumMaximum( false ); http://www.itk.org/Doxygen/html/classitk_1_1Statistics_1_1ImageToHistogramFilter.html#ab0f2c568bbb0ec3ff22e27e10b6af295 Usually, the range of values are computed from the input image. HTH, Matt On Wed, Aug 27, 2014 at 8:29 AM, maximilian wrote: > I am having problems with the itk::ImageToHistogramFilter. > > I am generating ellipses that I want to add to an image that already > contains some ellipses (in each iteration step, I add one ellipse to an > image being the result of previous iterations). To see if the new ellipse > overlaps by more than (let's say) 10%, I use the ImageToHistogramFilter. > The previous image has objects that all have pixel values of 1. The newly > added ellipse has value of 2. So, to get the number of overlapping pixels, I > add up both images and I count the number of pixels = 3 in that image. > > I set the histogram bin minimum to 0 (background) and the histogram bin > maximum to 3 (+ some constant c) and the number of bins such that the step > is = 1 (here, it is 3 + c). However, when I output the average frequencies > associated to each bin, I get values between 0 and 2 (number like 1.92) and > not between 0 and 3 + c (see output of program of attached file). Why? > > GenerateCells.cxx > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Problem-with-itk-ImageToHistogramFilter-tp7586128.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 g.bogle at auckland.ac.nz Fri Aug 29 16:00:48 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 20:00:48 +0000 Subject: [ITK] [ITK-users] VS 2012 Message-ID: Has anyone built ITK-4.5 with Visual Studio 2012? -------------- 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 g.bogle at auckland.ac.nz Fri Aug 29 17:15:36 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 21:15:36 +0000 Subject: [ITK] [ITK-users] VS 2012 In-Reply-To: References: , Message-ID: When I build ITK-4.0 with VS2010, Build INSTALL creates the directory that I specified, with four subdirectories: bin. include, lib, share. I set ITK_DIR to the install directory, and my programs build correctly. When I build ITK-4.5 with VS2012, Build INSTALL creates the install directory with a completely different structure, with many additional files and subdirectories, and if ITK_DIR is set to this install directory program builds fail. To build my programs successfully I need to set ITK_DIR to the name of the ITK build directory. What I'm trying to ascertain is whether this is the result of an ITK change or a VS change. When you build ITK-3.20 with VS2012 do you do Build INSTALL, and if so what does the install directory look like? ________________________________ From: ???'?? ?????? [nekto1989 at gmail.com] Sent: Saturday, 30 August 2014 8:52 a.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] VS 2012 Hi, Same way as 3.20-vs2010 or 3.20-vs2012. 2014-08-29 23:00 GMT+03:00 Gib Bogle >: Has anyone built ITK-4.5 with Visual Studio 2012? _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 drescherjm at gmail.com Fri Aug 29 20:46:16 2014 From: drescherjm at gmail.com (John Drescher) Date: Fri, 29 Aug 2014 20:46:16 -0400 Subject: [ITK] [ITK-users] Fwd: VS 2012 In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: John Drescher Date: Fri, Aug 29, 2014 at 8:45 PM Subject: Re: [ITK-users] VS 2012 To: Gib Bogle On Fri, Aug 29, 2014 at 4:00 PM, Gib Bogle wrote: > Has anyone built ITK-4.5 with Visual Studio 2012? Yes dozens of times with no issues at all.. John -- John M. Drescher _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 drescherjm at gmail.com Fri Aug 29 21:19:48 2014 From: drescherjm at gmail.com (John Drescher) Date: Fri, 29 Aug 2014 21:19:48 -0400 Subject: [ITK] [ITK-users] VS 2012 In-Reply-To: References: Message-ID: > Do you do Build INSTALL in the VS IDE? If so, what does your install directory look like, i.e. what are the subdirectories? I do not build INSTALL ever because that prevents me from using both Release and Debug. I build itk using cmake --build from the command line. John _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 g.bogle at auckland.ac.nz Fri Aug 29 21:33:15 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sat, 30 Aug 2014 01:33:15 +0000 Subject: [ITK] [ITK-users] VS 2012 In-Reply-To: References: , Message-ID: It seems that there is a problem with Build INSTALL. The build itself is fine, and I can use it if I set ITK_DIR to the build directory, but the installation done with Build INSTALL is not usable. It's probably a cmake issue, since the wrong paths for include and library files are configured in the VS project file. I'm pursuing this issue because having different build procedures on different machines is a recipe for confusion down the line, when I've forgotten what I had to do to get things working. It's puzzling to me that Kitware now have a divergence between ITK and VTK build-install procedures - the Build INSTALL path works with VTK. ________________________________________ From: John Drescher [drescherjm at gmail.com] Sent: Saturday, 30 August 2014 1:19 p.m. To: Gib Bogle; Insight-Users Subject: Re: [ITK-users] VS 2012 > Do you do Build INSTALL in the VS IDE? If so, what does your install directory look like, i.e. what are the subdirectories? I do not build INSTALL ever because that prevents me from using both Release and Debug. I build itk using cmake --build from the command line. John _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 indianzeppelin at gmail.com Sat Aug 30 02:40:24 2014 From: indianzeppelin at gmail.com (Girish Mallya Udupi) Date: Sat, 30 Aug 2014 07:40:24 +0100 Subject: [ITK] [ITK-users] VS 2012 In-Reply-To: References: Message-ID: I don't think this is an ITK version issue. I built INSTALL for ITK-4.5.1 and ITK-4.6.0 using VS2010 and the install directories have only those sub-directories that you mentioned (bin. include, lib, share). Also, did you try the latest CMake 3.0.1? Just a couple of weeks ago, I faced an issue (can't remember the specific details) when building my project using 2.8.12 while 3.0.1 worked without any problems. On Sat, Aug 30, 2014 at 2:33 AM, Gib Bogle wrote: > It seems that there is a problem with Build INSTALL. The build itself is > fine, and I can use it if I set ITK_DIR to the build directory, but the > installation done with Build INSTALL is not usable. It's probably a cmake > issue, since the wrong paths for include and library files are configured > in the VS project file. > > I'm pursuing this issue because having different build procedures on > different machines is a recipe for confusion down the line, when I've > forgotten what I had to do to get things working. It's puzzling to me that > Kitware now have a divergence between ITK and VTK build-install procedures > - the Build INSTALL path works with VTK. > ________________________________________ > From: John Drescher [drescherjm at gmail.com] > Sent: Saturday, 30 August 2014 1:19 p.m. > To: Gib Bogle; Insight-Users > Subject: Re: [ITK-users] VS 2012 > > > Do you do Build INSTALL in the VS IDE? If so, what does your install > directory look like, i.e. what are the subdirectories? > > I do not build INSTALL ever because that prevents me from using both > Release and Debug. I build itk using cmake --build from the command > line. > > John > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -- Regards, Girish -------------- 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 g.bogle at auckland.ac.nz Sat Aug 30 05:59:17 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sat, 30 Aug 2014 09:59:17 +0000 Subject: [ITK] [ITK-users] VS 2012 In-Reply-To: References: , Message-ID: Thanks Girish! I installed cmake 3.0.1 and rebuilt ITK, and now it all works as expected. Whew! Gib ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Saturday, 30 August 2014 6:40 p.m. To: Gib Bogle Cc: John Drescher; Insight-Users Subject: Re: [ITK-users] VS 2012 I don't think this is an ITK version issue. I built INSTALL for ITK-4.5.1 and ITK-4.6.0 using VS2010 and the install directories have only those sub-directories that you mentioned (bin. include, lib, share). Also, did you try the latest CMake 3.0.1? Just a couple of weeks ago, I faced an issue (can't remember the specific details) when building my project using 2.8.12 while 3.0.1 worked without any problems. On Sat, Aug 30, 2014 at 2:33 AM, Gib Bogle > wrote: It seems that there is a problem with Build INSTALL. The build itself is fine, and I can use it if I set ITK_DIR to the build directory, but the installation done with Build INSTALL is not usable. It's probably a cmake issue, since the wrong paths for include and library files are configured in the VS project file. I'm pursuing this issue because having different build procedures on different machines is a recipe for confusion down the line, when I've forgotten what I had to do to get things working. It's puzzling to me that Kitware now have a divergence between ITK and VTK build-install procedures - the Build INSTALL path works with VTK. ________________________________________ From: John Drescher [drescherjm at gmail.com] Sent: Saturday, 30 August 2014 1:19 p.m. To: Gib Bogle; Insight-Users Subject: Re: [ITK-users] VS 2012 > Do you do Build INSTALL in the VS IDE? If so, what does your install directory look like, i.e. what are the subdirectories? I do not build INSTALL ever because that prevents me from using both Release and Debug. I build itk using cmake --build from the command line. John _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users -- Regards, Girish -------------- 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 marco.ulge at gmail.com Sat Aug 30 06:16:57 2014 From: marco.ulge at gmail.com (Marco Ulge) Date: Sat, 30 Aug 2014 03:16:57 -0700 (PDT) Subject: [ITK] [ITK-users] Convert Matrix to itk::Image Message-ID: <1409393816990-34497.post@n7.nabble.com> Hello, I used the vnl_matrix_ref class to extract the matrix from the itk::Image and then perform some calculations. What i need to do now, is convert the matrix back to an itk::Image and i read that i should use the itkImportImageFilter class to achieve this. I am having difficulties understanding what should be my input to SetImportPointer method. Can anyone help me with this? Regards, Marco -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Convert-Matrix-to-itk-Image-tp34497.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 millerjv at gmail.com Sat Aug 30 08:23:20 2014 From: millerjv at gmail.com (Jim Miller) Date: Sat, 30 Aug 2014 08:23:20 -0400 Subject: [ITK] [ITK-users] Convert Matrix to itk::Image In-Reply-To: <1409393816990-34497.post@n7.nabble.com> References: <1409393816990-34497.post@n7.nabble.com> Message-ID: You pass the pointer to the pixels you want to ITK image to wrap. There is a Boolean in the methods to control whether ITK should manage the memory from that point forward (deleting the pixels when the ITK Image is destroyed) or whether you want your program to maintain control of that memory block and you will be carefule to ensure the buffer is freed at the appropriate time. Jim > On Aug 30, 2014, at 6:16 AM, Marco Ulge wrote: > > Hello, > > I used the vnl_matrix_ref class to extract the matrix from the itk::Image > and then perform some calculations. What i need to do now, is convert the > matrix back to an itk::Image and i read that i should use the > itkImportImageFilter class to achieve this. I am having difficulties > understanding what should be my input to SetImportPointer method. Can anyone > help me with this? > > Regards, > > Marco > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Convert-Matrix-to-itk-Image-tp34497.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 wechen5 at vt.edu Sat Aug 30 18:36:29 2014 From: wechen5 at vt.edu (blueridge) Date: Sat, 30 Aug 2014 15:36:29 -0700 (PDT) Subject: [ITK] [ITK-users] Using RGB file for GMM module Message-ID: <1409438189857-34499.post@n7.nabble.com> Is it possible to use ImageToListSampleAdaptor to convert RGB image to a list of samples and then use ExpectationMaximizationMixtureModelEstimator to estimate components of this RGB image? thanks -- View this message in context: http://itk-users.7.n7.nabble.com/Using-RGB-file-for-GMM-module-tp34499.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 mohammedrashadkm at gmail.com Sun Aug 31 01:28:21 2014 From: mohammedrashadkm at gmail.com (Rashad M) Date: Sun, 31 Aug 2014 10:58:21 +0530 Subject: [ITK] [ITK-dev] ITKVideo module Message-ID: Hi all, I have trying to process a video from UAV along with a GPS data to try generate a stream in KLV[1] format. So far I had found[2],[3], [4]. The github.io page gives an sample code and a demo video which looks great! So I would to know if there is more examples as with other ITK modules? Using OpenCV bridge is it possible to have a mix of algorithms in opencv and itk? [1] http://en.wikipedia.org/wiki/KLV [2] http://www.itk.org/Wiki/ITK_Release_4/Video [3] http://www.itk.org/Wiki/ITK_Release_4/Video/HowToBuildVideoModules [4] http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/ITK/VideoProcessingUsingOpenCVBridge/index.html -- Regards, Rashad -------------- 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 Sun Aug 31 08:09:14 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 31 Aug 2014 08:09:14 -0400 Subject: [ITK] [ITK-dev] ITKVideo module In-Reply-To: References: Message-ID: Hi Rashad, Here is one more example that shows how to work with ITK-OpenCV [1]. HTH, Matt [1] http://itk.org/ITKExamples/src/Video/BridgeOpenCV/ConvertAnITKGrayScaleImageToCVMat/Documentation.html On Sun, Aug 31, 2014 at 1:28 AM, Rashad M wrote: > Hi all, > > I have trying to process a video from UAV along with a GPS data to try > generate a stream in KLV[1] format. So far I had found[2],[3], [4]. The > github.io page gives an sample code and a demo video which looks great! > > So I would to know if there is more examples as with other ITK modules? > Using OpenCV bridge is it possible to have a mix of algorithms in opencv and > itk? > > [1] http://en.wikipedia.org/wiki/KLV > [2] http://www.itk.org/Wiki/ITK_Release_4/Video > [3] http://www.itk.org/Wiki/ITK_Release_4/Video/HowToBuildVideoModules > [4] > http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/ITK/VideoProcessingUsingOpenCVBridge/index.html > > > -- > Regards, > Rashad > > _______________________________________________ > Powered by www.kitware.com > > 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 pattersonnp.work at gmail.com Sun Aug 31 16:06:53 2014 From: pattersonnp.work at gmail.com (NPatterson) Date: Sun, 31 Aug 2014 13:06:53 -0700 (PDT) Subject: [ITK] [ITK-users] ResampleDICOM example and DCMTK In-Reply-To: <95FBA78F-1DFC-4F33-9572-DA0DD9DE1E73@gmail.com> References: <95FBA78F-1DFC-4F33-9572-DA0DD9DE1E73@gmail.com> Message-ID: <1409515613801-7586158.post@n2.nabble.com> Hi, I wondered if anyone could test the code attached in the thread header "ResampleDICOM example and DCMTK" regarding the use of DCMTK for DICOM reading writing in ITK. I adapted the ResampleDICOM example to work with DCMTK instead of GDCM, and although I get no errors, I also do not get any output dicom images. If someone has the time to test this code to see if they observe the same behaviour/or can suggest a fix, I would be very appreciative. Regards, Nick. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-ResampleDICOM-example-and-DCMTK-tp7586131p7586158.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 wechen5 at vt.edu Sun Aug 31 16:40:52 2014 From: wechen5 at vt.edu (blueridge) Date: Sun, 31 Aug 2014 13:40:52 -0700 (PDT) Subject: [ITK] [ITK-users] ExpectationMaximizationMixtureModelEstimator use of WeightedMeanSampleFilter In-Reply-To: References: Message-ID: <1409517652082-34501.post@n7.nabble.com> It's kind of late, but just for the record since I ran into same error message. My problem was that I did not initialize the component parameters correctly, ( I did not initialize it at all, use default constructor, with set all zeros), then the weights of first iteration are all zeros, which triggers the error message. -- View this message in context: http://itk-users.7.n7.nabble.com/ExpectationMaximizationMixtureModelEstimator-error-tp31798p34501.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 Sun Aug 31 17:38:39 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 31 Aug 2014 17:38:39 -0400 Subject: [ITK] [ITK-users] ResampleDICOM example and DCMTK In-Reply-To: <1409515613801-7586158.post@n2.nabble.com> References: <95FBA78F-1DFC-4F33-9572-DA0DD9DE1E73@gmail.com> <1409515613801-7586158.post@n2.nabble.com> Message-ID: Hi Nick, Nothing stands out from inspecting the code. Could you please send an example dataset? Thanks, Matt On Sun, Aug 31, 2014 at 4:06 PM, NPatterson wrote: > Hi, I wondered if anyone could test the code attached in the thread header > "ResampleDICOM example and DCMTK" regarding the use of DCMTK for DICOM > reading writing in ITK. I adapted the ResampleDICOM example to work with > DCMTK instead of GDCM, and although I get no errors, I also do not get any > output dicom images. If someone has the time to test this code to see if > they observe the same behaviour/or can suggest a fix, I would be very > appreciative. > > Regards, Nick. > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-ResampleDICOM-example-and-DCMTK-tp7586131p7586158.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 donelron at web.de Fri Aug 1 04:27:22 2014 From: donelron at web.de (donelron) Date: Fri, 1 Aug 2014 01:27:22 -0700 (PDT) Subject: [ITK] [ITK-users] Inconsistent results for same histogram on same image when PixelType of image is different In-Reply-To: <1406833109934-34366.post@n7.nabble.com> References: <1406833109934-34366.post@n7.nabble.com> Message-ID: <1406881642374-34367.post@n7.nabble.com> Just one short addition / correction to my post: If I was able to use for example that would also be more than enough. Basically, I just need up to around 1000 different gray values in the image in which I have to calculate the histogram. So, unsigned char with 256 different values is obviously not enough... -- View this message in context: http://itk-users.7.n7.nabble.com/Inconsistent-results-for-same-histogram-on-same-image-when-PixelType-of-image-is-different-tp34366p34367.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 mallikarjun49 at gmail.com Fri Aug 1 07:06:12 2014 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Fri, 1 Aug 2014 16:36:12 +0530 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: Message-ID: Thanks Bill for your answer. The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. Thanks for your help On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: > If you have it in vtk, I suggest using the vtk pipeline to smooth the data. > > On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K > wrote: > > Hi Bill, > > Thanks for the replay. > > > > Yes,I built both ITK and my app with Release ,I forgot to mention it in > the > > previous post.Actually the data set is the output of > > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I > saved > > this marching cube's output as .vtk file and read it using > > itkVTKPolyDataReader and then I am giving this reader's output to > > itkSmoothingQuadEdgeMeshFilter's input. > > > > I checked the execution time of each step in the pipeline ,after > > SmothingQEMeshFilter has got it's input ,it is taking time to process the > > data. > > > > Thank you > > > > > > > > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen > > wrote: > >> > >> First, make sure you are building ITK and your app with Release. A > >> Debug build can be 10-50 times slower. > >> > >> > >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K < > mallikarjun49 at gmail.com> > >> wrote: > >> > Hi All, > >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh > >> > smoothing.This > >> > filter is giving good results what I expected but taking more > execution > >> > time.can any one suggest me to reduce the execution time( multi > >> > threading > >> > or any parameters to add/remove )? > >> > > >> > Below is the code snippet > >> > /////// > >> > typedef itk::QuadEdgeMeshTraits double,double > >> > > > >> > qetraits; > >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > > MeshType; > >> > > >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; > >> > > >> > itk::OnesMatrixCoefficients< MeshType > coeff0; > >> > > >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > > >> > SmoothingQuadEdgeMeshFilter; > >> > > >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = > >> > SmoothingQuadEdgeMeshFilter::New(); > >> > > >> > QEMeshSmoother->SetInput("abc.vtk"); > >> > QEMeshSmoother->SetNumberOfIterations(5 ); > >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); > >> > QEMeshSmoother->SetDelaunayConforming(true ); > >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); > >> > QEMeshSmoother->Update(); > >> > //// > >> > > >> > -- > >> > Regards: > >> > Mallik > >> > > >> > > >> > _____________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Kitware offers ITK Training Courses, for more information visit: > >> > http://www.kitware.com/products/protraining.php > >> > > >> > Please keep messages on-topic and check the 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 > > > > > > > > > > -- > > Regards: > > Mallik > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -- *Regards:* Mallik -------------- 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 Aug 1 09:36:09 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 1 Aug 2014 09:36:09 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <8C9CCC8B-5379-4A6A-902F-ACAE609F5789@gmail.com> <8727A959-8F80-471A-9E24-04C0E564D8DC@mail.nih.gov> Message-ID: Nick, I hope you can make it to today's TCON. I can demo that notebook I linked too. It should clarify things. Brad On Jul 30, 2014, at 1:57 PM, Nicholas Tustison wrote: >> To try to summaries... sorry if have not been clear enough in my explanations. > > No, I blame me?I?m consistently distracted by the scenery outside here in > California and it?s definitely affecting my ability to concentrate on code > questions. > >> INITIAL QUESTION >> >> How does composite transform and the "Center" parameter interact? How does this relate to the virtual domain? > > The composite transform is agnostic with respect to whether or not a > transform has a center or any other fixed parameter set. The only > distinction we make is typology with respect to linear/deformable. To > be clear, we?re not discussing any of the ?Centered? transforms: > > * CenteredAffineTransform > * CenteredEuler3DTransform > * CenteredEuler2DTransform > * CenteredSimilarity2DTransform > > None of those transforms are used in ANTs but I don?t think > their optimization would be an issue in the new ITKv4 registration > framework. > > The virtual domain is simply defined in terms of standard image > geometry (origin, spacing, etc.) and is currently set in terms of the > fixed image geometry. > >> MY UNDERSTANDING >> >> 1) Using a "Center" initialized transform only works correctly for a single transform and directly with a composite. ( This is with the current center initializers, a different approach could be done which takes into consideration the composition ) > > I don?t see why it would only work correctly for a single transform. Suppose > I optimize a translation transform to get it?s optimal parameters for a given > registration problem. It?s not clear to me why it would be a problem to follow > that with optimizing an Euler3D transform (which we do all the time in ANTs). > Obviously, we have to specify a staring point for the second transform (which > is identity by default) and perhaps it would be better to have a different > starting point but I don?t see why starting with the default parameters is a > problem. > > If the ?Center initialized transform? is one of the transforms listed above > then we don?t use those. If it?s simply the result of using the > CenteredTransformInitializer, then we just pull the itk::TranslationTransform > part from the result and push that translation transform into the composite > transform queue. I don?t see why it would be a problem to then optimize, > for example, the Euler3DTransform which just has 3 translation parameters > and 3 angle parameters to optimize where the center is implicitly defined > (unlike the CenteredEuler3DTransform which does have additional Center > parameters). > >> 2) The virtual domain should be initialized such that the two images "Center"s are at the origin. This an alternative to using the "Center" transform parameters, and better works with composite transforms. > > Yes, that would probably be a better initialization but I don?t know why it would > be a problem for the current framework to optimize with the origin elsewhere. > Right now, each transform within the composite transform queue is > optimized starting from its identity parameters but perhaps the initializer > idea that you propose would improve optimization. > >> I was not aware that 2 was the best practice with the ITKv4 framework. Do we have any examples/test/documentation to indicate this? Further more using the current CenterTransformInitalizers to initialize the virtual domain is not readily apparent[1] how to map the parameters. >> PROPOSAL >> >> Perhaps we need a new Initializer filter to assist with initializing the virtual domain to initialize this practice? >> >> 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 rg.bumpy at gmail.com Fri Aug 1 09:47:48 2014 From: rg.bumpy at gmail.com (Bumpy RG) Date: Fri, 1 Aug 2014 15:47:48 +0200 Subject: [ITK] [ITK-users] Whole body Segmentation-Identification Message-ID: Dear All, I have a dicom series having whole body image sequences, starting from head up to legs. My aim is to write an algorithm to automatically identify the body parts (lungs, spines, head etc.) from the dicom sequence. Although I am very new to the ITK world, I am following these steps in ITK (*I would appreciate if you comment whether I am following correct idea or not* ): 1. Read dicom series using 'DicomSeriesReadImageWrite2.cxx ' to create a 3D volume and save the result in mhd format. 2. Use 'ImageReadRegionOfInterestWrite.cxx' for separating various parts (like left lung, right lung, spines, head etc.) and save them in respective 3D volumes in mhd format. 3. Pick the various body parts prepared above, one by one and segment them using robust algorithm (say ThresholdSegmentationLevelSetImageFilter.cxx). 4. Use Mathematical Morphology to get better results. 5. Using the various results from above, form an algorithm for identifying the various body parts. Currently I am stuck in the second step because it is so hard to choose the co-ordinates for selecting proper region of interest. For example, I chose these points for ROI of right lung (I checked the co-ordinates using 3D slicer visualizer) and it does not give me good results : start[0] = 255; start[1] =165; start[2] = 0; *However I do not understand how to choose the points properly in ITK.* I would be really glad to have your response. Thanking you in advance. Kind Regards, Bumpy. -------------- 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 ntustison at gmail.com Fri Aug 1 10:15:19 2014 From: ntustison at gmail.com (Nick Tustison) Date: Fri, 1 Aug 2014 08:15:19 -0600 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <8C9CCC8B-5379-4A6A-902F-ACAE609F5789@gmail.com> <8727A959-8F80-471A-9E24-04C0E564D8DC@mail.nih.gov> Message-ID: <6D8816B7-9BE5-494A-BAE8-81057667632E@gmail.com> Sorry, Brad, but I'm currently in Salt Lake at a funeral. I'd really like to understand better so, if you're available, I can do it anytime during the week on another call. Sent from Howling Fantods > On Aug 1, 2014, at 7:36 AM, Bradley Lowekamp wrote: > > Nick, > > I hope you can make it to today's TCON. I can demo that notebook I linked too. It should clarify things. > > Brad > > On Jul 30, 2014, at 1:57 PM, Nicholas Tustison wrote: > >>> To try to summaries... sorry if have not been clear enough in my explanations. >> >> No, I blame me?I?m consistently distracted by the scenery outside here in >> California and it?s definitely affecting my ability to concentrate on code >> questions. >> >>> INITIAL QUESTION >>> >>> How does composite transform and the "Center" parameter interact? How does this relate to the virtual domain? >> >> The composite transform is agnostic with respect to whether or not a >> transform has a center or any other fixed parameter set. The only >> distinction we make is typology with respect to linear/deformable. To >> be clear, we?re not discussing any of the ?Centered? transforms: >> >> * CenteredAffineTransform >> * CenteredEuler3DTransform >> * CenteredEuler2DTransform >> * CenteredSimilarity2DTransform >> >> None of those transforms are used in ANTs but I don?t think >> their optimization would be an issue in the new ITKv4 registration >> framework. >> >> The virtual domain is simply defined in terms of standard image >> geometry (origin, spacing, etc.) and is currently set in terms of the >> fixed image geometry. >> >>> MY UNDERSTANDING >>> >>> 1) Using a "Center" initialized transform only works correctly for a single transform and directly with a composite. ( This is with the current center initializers, a different approach could be done which takes into consideration the composition ) >> >> I don?t see why it would only work correctly for a single transform. Suppose >> I optimize a translation transform to get it?s optimal parameters for a given >> registration problem. It?s not clear to me why it would be a problem to follow >> that with optimizing an Euler3D transform (which we do all the time in ANTs). >> Obviously, we have to specify a staring point for the second transform (which >> is identity by default) and perhaps it would be better to have a different >> starting point but I don?t see why starting with the default parameters is a >> problem. >> >> If the ?Center initialized transform? is one of the transforms listed above >> then we don?t use those. If it?s simply the result of using the >> CenteredTransformInitializer, then we just pull the itk::TranslationTransform >> part from the result and push that translation transform into the composite >> transform queue. I don?t see why it would be a problem to then optimize, >> for example, the Euler3DTransform which just has 3 translation parameters >> and 3 angle parameters to optimize where the center is implicitly defined >> (unlike the CenteredEuler3DTransform which does have additional Center >> parameters). >> >>> 2) The virtual domain should be initialized such that the two images "Center"s are at the origin. This an alternative to using the "Center" transform parameters, and better works with composite transforms. >> >> Yes, that would probably be a better initialization but I don?t know why it would >> be a problem for the current framework to optimize with the origin elsewhere. >> Right now, each transform within the composite transform queue is >> optimized starting from its identity parameters but perhaps the initializer >> idea that you propose would improve optimization. >> >>> I was not aware that 2 was the best practice with the ITKv4 framework. Do we have any examples/test/documentation to indicate this? Further more using the current CenterTransformInitalizers to initialize the virtual domain is not readily apparent[1] how to map the parameters. >>> PROPOSAL >>> >>> Perhaps we need a new Initializer filter to assist with initializing the virtual domain to initialize this practice? >>> >>> 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 Fri Aug 1 10:17:46 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 1 Aug 2014 10:17:46 -0400 Subject: [ITK] [ITK-dev] Google Hangout TCON now Message-ID: Hello, I set up a google hangout TCON for now: https://plus.google.com/hangouts/_/event/cn8hv391boek27j8c7blph7igho 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 matt at mmmccormick.com Fri Aug 1 10:48:29 2014 From: matt at mmmccormick.com (Matthew McCormick (thewtex)) Date: Fri, 1 Aug 2014 10:48:29 -0400 Subject: [ITK] [ITK-dev] Google Hangout TCON now In-Reply-To: References: Message-ID: Thanks for setting this up. I am traveling again this week, but I will be resuming a more normal schedule next week and should be able to join. Matt On Fri, Aug 1, 2014 at 10:17 AM, Bradley Lowekamp wrote: > Hello, > > I set up a google hangout TCON for now: > https://plus.google.com/hangouts/_/event/cn8hv391boek27j8c7blph7igho > > 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 _______________________________________________ Powered by www.kitware.com 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 Aug 1 11:31:54 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 1 Aug 2014 11:31:54 -0400 Subject: [ITK] [ITK-dev] Move ITK TCONs to Google Hangout? Message-ID: Hello, Should we move the weekly ITK TCONs to Google hangouts? Using Google hangouts would be more visible and public along with having an automatic process to start the event. Additionally there is the ability to phone in people to the hang out? 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 stnava at gmail.com Fri Aug 1 12:06:42 2014 From: stnava at gmail.com (brian avants) Date: Fri, 1 Aug 2014 12:06:42 -0400 Subject: [ITK] [ITK-dev] Move ITK TCONs to Google Hangout? In-Reply-To: References: Message-ID: +1 brian On Fri, Aug 1, 2014 at 11:31 AM, Bradley Lowekamp wrote: > Hello, > > Should we move the weekly ITK TCONs to Google hangouts? > > Using Google hangouts would be more visible and public along with having an automatic process to start the event. Additionally there is the ability to phone in people to the hang out? > > 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 _______________________________________________ Powered by www.kitware.com 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 michkapopoff at gmail.com Sat Aug 2 09:07:01 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Sat, 2 Aug 2014 15:07:01 +0200 Subject: [ITK] SSE2 errors on dashboard Message-ID: Hi Some SSE2 errors appeared on the dashboard on the 31 of July, see http://open.cdash.org/buildSummary.php?buildid=3431994 The errors appear also on the wrapping machines. Any clue what is causing this ? I was not able to determine the origin of it. /home/kevin/kitware/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:49:5: error: #error "Required file emmintrin.h for SSE2 not found" # error "Required file emmintrin.h for SSE2 not found? Michka -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Sat Aug 2 08:39:25 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sat, 02 Aug 2014 08:39:25 -0400 Subject: [ITK] [ITK-dev] Upgraded factory.kitware Mac compiler Message-ID: <96995EF3-CB2E-4DBD-9360-A7D3909D25E6@mail.nih.gov> Hello, Hello there is recently some regular failing tests on the factory.kitware Mac robot build: http://open.cdash.org/viewTest.php?onlyfailed&buildid=3433716 What specific compiler, Xcode, and os version is the system now running? Was it recently upgraded? These failures look vaguely familiar to me, not sure quite why. May have been at some point in the GNU gcc->llvm-gcc transition when things didn't work too good... 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 Sat Aug 2 11:03:59 2014 From: jchris.fillionr at kitware.com (Jean-Christophe Fillion-Robin) Date: Sat, 2 Aug 2014 11:03:59 -0400 Subject: [ITK] [ITK-dev] Upgraded factory.kitware Mac compiler In-Reply-To: <96995EF3-CB2E-4DBD-9360-A7D3909D25E6@mail.nih.gov> References: <96995EF3-CB2E-4DBD-9360-A7D3909D25E6@mail.nih.gov> Message-ID: Hi Brad, All details are captured here: http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=23528 XCode before: * Xcode: 3.2.6 - uildVersion: 10M2518 * gcc-4.0: i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5494) * gcc-4.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) * llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.6) * clang: Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn XCode after: * Xcode: 4.2 - Build version 4C199 * gcc-4.0: i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5494) * gcc-4.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) * llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) * clang: Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn) Hth Jc On Sat, Aug 2, 2014 at 8:39 AM, Bradley Lowekamp wrote: > Hello, > > Hello there is recently some regular failing tests on the factory.kitware > Mac robot build: > http://open.cdash.org/viewTest.php?onlyfailed&buildid=3433716 > > What specific compiler, Xcode, and os version is the system now running? > Was it recently upgraded? > > These failures look vaguely familiar to me, not sure quite why. May have > been at some point in the GNU gcc->llvm-gcc transition when things didn't > work too good... > > Brad > > > -- +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 blowekamp at mail.nih.gov Sat Aug 2 11:25:49 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sat, 02 Aug 2014 11:25:49 -0400 Subject: [ITK] [ITK-dev] Upgraded factory.kitware Mac compiler In-Reply-To: References: <96995EF3-CB2E-4DBD-9360-A7D3909D25E6@mail.nih.gov> Message-ID: OK, I think the compiler being used on the system is not a winner. Something need to be changes on the system to make this more identifiable, perhaps changing the build name to be llvm-gcc-4.2. As it's not apparent in the configuration: The C compiler identification is GNU 4.2.1 -- The CXX compiler identification is GNU 4.2.1 -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works Digging into the system information test[1] we can find the following: sing built-in specs. Target: i686-apple-darwin10 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~3/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~3/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) /usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/collect2 -dynamic -arch x86_64 -macosx_version_min 10.6.8 -weak_reference_mismatches non-weak -o cmTryCompileExec885700192 -lcrt1.10.6.o -L/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -L/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -L/usr/lib/i686-apple-darwin10/4.2.1 -L/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/llvm-gcc-4.2/bin/../lib/gcc -L/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1/../../.. -L/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/../../.. -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTryCompileExec885700192.dir/CMakeCCompilerABI.c.o -lSystem -lgcc -lSystem collect2 version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) (i686 Darwin) But the GCC masquerading version is not too helpful. [1] http://open.cdash.org/testDetails.php?test=272099142&build=3433750 On Aug 2, 2014, at 11:03 AM, Jean-Christophe Fillion-Robin wrote: > Hi Brad, > > All details are captured here: > > http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=23528 > > > XCode before: > > * Xcode: 3.2.6 - uildVersion: 10M2518 > * gcc-4.0: i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5494) > * gcc-4.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) > * llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.6) > * clang: Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn > > XCode after: > > * Xcode: 4.2 - Build version 4C199 > * gcc-4.0: i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5494) > * gcc-4.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) > * llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) > * clang: Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn) > > > Hth > Jc > > > On Sat, Aug 2, 2014 at 8:39 AM, Bradley Lowekamp wrote: > Hello, > > Hello there is recently some regular failing tests on the factory.kitware Mac robot build: > http://open.cdash.org/viewTest.php?onlyfailed&buildid=3433716 > > What specific compiler, Xcode, and os version is the system now running? Was it recently upgraded? > > These failures look vaguely familiar to me, not sure quite why. May have been at some point in the GNU gcc->llvm-gcc transition when things didn't work too good... > > Brad > > > > > > -- > +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 blowekamp at mail.nih.gov Sat Aug 2 19:48:53 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sat, 02 Aug 2014 19:48:53 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov>, Message-ID: <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> Hello Ali, I created a notebook to try to demonstrate the problem you are describing: http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb If the center of an Affine transformation isn't correctly initialized then the optimization is not speedy or robust. I think it's best illustrated with these two graphs: Notice that with the Center being the origin, all 1000 iterations are exhausted, and the metric is slowing decreasing. And this is with the translation path being around the length to 10. If the spacing was bigger or more offset from the origin the situation would be worse. I don't think this is a bug with the registration framework. I think new initializers for composite transforms are needed, along with documentation how the 2 good ways to initialize the registration methods transforms. Brad On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali wrote: > Brad, > > I have exactly the same issue. I wrote a simple registration program that is run in two stages: > -Translation > -Affine > > My fixed and moving images are in 2D, and the moving image is created from the fixed image by > rotation of 10 degree and translation of [13,17] in X and Y directions. > > The first stage does a translation registration and the result transform is added to a composite transform > that is used as the initial moving transform of the second stage. > > After the registration the result transform of the second stage is also added to the composite transform > to be used by the resampler. > > I have printed the composite transform to the screen: > > 2481: CompositeTransform (0x7fa359a18b00) > 2481: RTTI typeinfo: itk::CompositeTransform > 2481: Reference Count: 2 > 2481: Modified Time: 20949 > 2481: Debug: Off > 2481: Object Name: > 2481: Observers: > 2481: none > 2481: Transforms in queue, from begin to end: > 2481: >>>>>>>>> > 2481: TranslationTransform (0x7fa359a199b0) > 2481: RTTI typeinfo: itk::TranslationTransform > 2481: Reference Count: 7 > 2481: Modified Time: 1648 > 2481: Debug: Off > 2481: Object Name: > 2481: Observers: > 2481: none > 2481: Offset: [12.801, 15.8578] > 2481: >>>>>>>>> > 2481: AffineTransform (0x7fa359d095a0) > 2481: RTTI typeinfo: itk::AffineTransform > 2481: Reference Count: 5 > 2481: Modified Time: 20946 > 2481: Debug: Off > 2481: Object Name: > 2481: Observers: > 2481: none > 2481: Matrix: > 2481: 1.01593 -0.0100051 > 2481: -0.00835669 1.01113 > 2481: Offset: [-0.358829, -0.290093] > 2481: Center: [0, 0] > 2481: Translation: [-0.358829, -0.290093] > 2481: Inverse: > 2481: 0.984397 0.00974056 > 2481: 0.00813575 0.989073 > 2481: Singular: 0 > 2481: End of MultiTransform. > 2481: <<<<<<<<<< > > As it can be seen, the translation transform provides a good initialization since its offset (Offset: [12.801, 15.8578]) is close to the shift parameters. > > However, the Affine transform fails to rotate the moving image since its Matrix is almost identity. > Possible reason can be the improper Center of Affine transform that is fixed to [0,0], and not at geometrical center or center of mass. > > To make sure that I have not made any crazy mistake in my example, I simulated my example parameters in ANTs, and ANTs returned > the same results and failed to register the images!! > >>>>>> ANTs command line <<<<<<<<<<< > > PROGPATH=/scratch/ANTS/release-new/bin > fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png > mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png > > time ${PROGPATH}/antsRegistration -d 2 \ > --float \ > --output [test1, warpedMoving.nii.gz] \ > --transform "Translation[16]" \ > --metric MI[${fi},${mi},1,32,None,1] \ > --convergence [100,1e-2,5] \ > --shrink-factors 3 \ > --smoothing-sigmas 2 \ > --use-histogram-matching 1 \ > \ > --transform "Affine[1]" \ > --metric MI[${fi},${mi},1,32] \ > --convergence [100x100,1e-2,2] \ > --shrink-factors 2x1 \ > --smoothing-sigmas 1x0 \ > --use-histogram-matching 1 > > <<<<<<<<<<<<<<<<<<<<<<<< > > Fixed and moving images can be loaded from the ITK data files. What do you think about this example? Is it a bug in ITK or just the parameters are not tuned finely? > > Thanks, > Ali > > ________________________________________ > From: Johnson, Hans J > Sent: Tuesday, July 29, 2014 6:19 PM > To: Ghayoor, Ali > Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of transform > > Ali, > > You need to follow this discussion. > > Hans > > On 7/29/14, 6:16 PM, "Bradley Lowekamp" wrote: > >> Hello, >> >> Ok, to further explore this problem, and hopeful help other people too: I >> created an IPython Notebook viewable here: >> http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl >> ob/master/Transform%20Composition%20And%20Order.ipynb >> >> It doesn't come through on the static page, but I added some nifty >> interactive slider widgets to change the rotation parameter. Which is >> really the point to enable understanding of the parameters for the >> transform and how they should be best optimized. The notebook should work >> with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one >> to try it out :) IPython Notebooks widget are very cool! >> >> EXPLANATION: >> >> The the order of the composite transform is that the new transforms are >> applied first. >> >> BUT they map from the virtual domain ( fixed ) to the moving image. >> Therefore if your first transform moves the center of mass to the origin >> then the second added transform's space will be centered on the mass, >> which is good for optimizing rotation and affine parameters. >> >> QUESTION: >> >> Therefore I am inclined to conclude that its best practices to map the >> fixed and moving image to the virtual domain such that the center of mass >> ( or some other "center feature" ) are at the origin. This would then the >> scale, rotation and other affine parameters around the center, with out >> having to used the "Center" parameter the transforms currently have. >> >> Is this what others are doing in their registration? For general best >> practices should this be recommend? >> >> @Brian I know I have seen this multi-domain description many time, but I >> think I may have just gotten it... Is the well describe in the literature >> some place? I think this may be an important part add the software guide. >> >> Thanks, >> Brad >> >> >> >> >> On Jul 29, 2014, at 5:38 PM, Matt McCormick >> wrote: >> >>> Hi Brad, >>> >>> Your assessment that the fixed center is important is correct. >>> >>> In most cases, a transform with a Center is the first transform in a >>> Composite transform. There not any issues here. However, if the >>> transform with a Center is further along the chain, then a >>> CenteredTransformInitializer that was applied before the registration >>> is started will not generate the desired result. In this case, we >>> would have to respond to an Event in the registration process and >>> estimated the center on the imaged after the other transforms have >>> been applied. It is more work, but it is a more unusual case. >>> >>> HTH, >>> Matt >>> >>> >>> >>> On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp >>> wrote: >>>> Helloo Nick! >>>> >>>> I am glad you got back to me. >>>> >>>> I suspect that I have spent more time this past week looking at the >>>> ITK affine transforms than anyone else[1] this week. With that here is >>>> my current understanding... >>>> >>>> 1) The CenterTransformInitializers estimates an initial "Center" and >>>> an initial "Translation" parameter from either the geometry or the >>>> first moments. From my problematic experiences, getting the initial >>>> transform which is a "good" guess is been critical for the optimizer to >>>> head to the correct solution. >>>> >>>> 2) The Center parameter of a transform can either be "Fixed" or an >>>> optimizable parameter. The transforms with the "Centered" monkier are >>>> the the ones with the Center parameter optimizable. This issue seems to >>>> be what you were referring to in to message. >>>> >>>> In many ways the point I am trying to make is independent of #2. I >>>> have observed that it's important to have the "Center" of an affine >>>> transform ( or sub parameterization thereof ) at the center of the >>>> object you are trying to register. That is the coordinate space of the >>>> optimizable parameters' point 0 is near the center. This enables >>>> rotation to easily rotate around the center, as well as scaling to >>>> maintain the same relative center when "zooming". This issue is >>>> independent of wether that center point can be optimized. >>>> >>>> For example, consider changing the origin of an image for alignment by >>>> say 500, and compensating with just an initial translation and not >>>> setting the "Center" parameter. If we are trying to optimize rotation >>>> and translation, then the optimization path would be very difficult to >>>> traverse with these inter-dependent parameters to force it to rotate >>>> around the center of the object. This scenario may be more common in >>>> microscopy then medical imaging, due to microscopy frequently having >>>> multiple subjects across large images. I could write up a IPython >>>> Notebook to illustrate the case. >>>> >>>> So that is my understanding of why using a fixed center is important. >>>> I thought this may have been shared knowledge, but perhaps is not or is >>>> incorrect... >>>> >>>> Now I am trying to understand how this interacts with all the >>>> coordinate frames involved with the ITKv4 registration framework, and >>>> the composite transforms. Specifically the composite transform apply >>>> the transforms in "reverse order"[2]. As I understand that that means >>>> that the newest transform get applied first. So that transform >>>> parameters are being optimized in the images space not in the virtual >>>> domains we are working towards. Therefore the center of our transforms >>>> is still important as we composite transforms? >>>> >>>> I hope I explained that clearly, a white board may really be needed.... >>>> >>>> Thanks, >>>> Brad >>>> >>>> >>>> [1] >>>> https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94 >>>> 099d3519eb23bcc16c7cf015 >>>> [2] http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html >>>> >>>> On Jul 28, 2014, at 8:57 PM, Nicholas Tustison >>>> wrote: >>>> >>>>> Hi Brad, >>>>> >>>>> I apologize for the delayed response. I?m still catching up on my >>>>> workload after moving to CA. We might want to talk to Luis as it >>>>> was my understanding that the ?center? component of the linear >>>>> transforms might be a carry-over from all the ?Centered? transforms, >>>>> e.g., >>>>> >>>>> >>>>> http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm >>>>> l >>>>> >>>>> which, if I remember correctly, Luis said were somewhat sub optimally >>>>> conceived but this was such a long time ago that I might be completely >>>>> misremembering. However, fixing the center for all transforms within >>>>> a composite transform is certainly not necessary within the specified >>>>> framework. Rather, the matrix and offset are updated with the >>>>> ?Center? >>>>> being updated implicitly. >>>>> >>>>> Nick >>>>> >>>>> >>>>> >>>>> On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp >>>>> wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> There are a lot of transforms involved in the new registration >>>>>> framework. >>>>>> >>>>>> I am trying to figure out what the implications for the fix >>>>>> parameters of the transform "Center" ( ie center of rotation/scaling >>>>>> ) are when combined with composite transforms and the >>>>>> fixed/moving/registration coordinate frames... >>>>>> >>>>>> Based on how the transforms are composed it seems necessary to set >>>>>> the fix "Center" for subsequent transformations. Additionally, I am >>>>>> unsure how one would "improve" ( poorly defined? ) the center for a >>>>>> subsequent transform ie Affine after a similarity... >>>>>> >>>>>> Are there some documented guidance or figures to help with this >>>>>> issue? >>>>>> Do we have a comprehensive diagram of these transforms? >>>>>> >>>>>> Thanks, >>>>>> 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 >>>> _______________________________________________ >>>> 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 > > > > ________________________________ > 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. > ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: unknown.png Type: image/png Size: 15787 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: unknown.png Type: image/png Size: 15016 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 michkapopoff at gmail.com Sun Aug 3 06:08:04 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Sun, 3 Aug 2014 12:08:04 +0200 Subject: [ITK] SSE2 errors on dashboard In-Reply-To: References: Message-ID: <8185AF24-9C31-405B-8CD6-CCCB57A6BC6C@gmail.com> Hi answering to myself, this is related to this Jira ticket: https://issues.itk.org/jira/browse/ITK-3299 I?ll look at the provided patches and push them to gerrit so that we can fix this. Michka On 2 ao?t 2014, at 15:07, Michka Popoff wrote: > Hi > Some SSE2 errors appeared on the dashboard on the 31 of July, see http://open.cdash.org/buildSummary.php?buildid=3431994 > The errors appear also on the wrapping machines. > Any clue what is causing this ? I was not able to determine the origin of it. > /home/kevin/kitware/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:49:5: error: #error "Required file emmintrin.h for SSE2 not found" > # error "Required file emmintrin.h for SSE2 not found? > Michka -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Sun Aug 3 10:21:10 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Sun, 3 Aug 2014 16:21:10 +0200 Subject: [ITK] SSE2 errors on dashboard In-Reply-To: <4EB827D9-070D-403E-9607-25306A768C9D@mail.nih.gov> References: <8185AF24-9C31-405B-8CD6-CCCB57A6BC6C@gmail.com> <4EB827D9-070D-403E-9607-25306A768C9D@mail.nih.gov> Message-ID: MMh, I may have been a little bit too fast here. The dashboard is failing on vnl_math.h, and Gert?s patch is for itkMathDetail.h. Gert?s patch is on gerrit (http://review.source.kitware.com/#/c/16499/) and it?s a different story, so we can keep the discussion for this specific patch in the gerrit topic. What I can not understand is why all the Python dashboard and the Fedora-19-x86_64 machine suddenly started to have this error. Michka On 3 ao?t 2014, at 16:05, Bradley Lowekamp wrote: > Michka, > > I am not sure what that patch has to do with VNL. It's looks different. > > The patch in that JIRA issue was fixed by adding support that that version of GCC to gcc_xml.. > > On Aug 3, 2014, at 6:08 AM, Michka Popoff wrote: > >> Hi >> >> answering to myself, this is related to this Jira ticket: https://issues.itk.org/jira/browse/ITK-3299 >> I?ll look at the provided patches and push them to gerrit so that we can fix this. >> >> Michka >> >> On 2 ao?t 2014, at 15:07, Michka Popoff wrote: >> >>> Hi >>> Some SSE2 errors appeared on the dashboard on the 31 of July, see http://open.cdash.org/buildSummary.php?buildid=3431994 >>> The errors appear also on the wrapping machines. >>> Any clue what is causing this ? I was not able to determine the origin of it. >>> /home/kevin/kitware/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:49:5: error: #error "Required file emmintrin.h for SSE2 not found" >>> # error "Required file emmintrin.h for SSE2 not found? >>> Michka >> >> _______________________________________________ >> 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 Sun Aug 3 10:05:12 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sun, 03 Aug 2014 10:05:12 -0400 Subject: [ITK] SSE2 errors on dashboard In-Reply-To: <8185AF24-9C31-405B-8CD6-CCCB57A6BC6C@gmail.com> References: <8185AF24-9C31-405B-8CD6-CCCB57A6BC6C@gmail.com> Message-ID: <4EB827D9-070D-403E-9607-25306A768C9D@mail.nih.gov> Michka, I am not sure what that patch has to do with VNL. It's looks different. The patch in that JIRA issue was fixed by adding support that that version of GCC to gcc_xml.. On Aug 3, 2014, at 6:08 AM, Michka Popoff wrote: > Hi > > answering to myself, this is related to this Jira ticket: https://issues.itk.org/jira/browse/ITK-3299 > I?ll look at the provided patches and push them to gerrit so that we can fix this. > > Michka > > On 2 ao?t 2014, at 15:07, Michka Popoff wrote: > >> Hi >> Some SSE2 errors appeared on the dashboard on the 31 of July, see http://open.cdash.org/buildSummary.php?buildid=3431994 >> The errors appear also on the wrapping machines. >> Any clue what is causing this ? I was not able to determine the origin of it. >> /home/kevin/kitware/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:49:5: error: #error "Required file emmintrin.h for SSE2 not found" >> # error "Required file emmintrin.h for SSE2 not found? >> Michka > > _______________________________________________ > 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 Mon Aug 4 09:13:53 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 4 Aug 2014 09:13:53 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: <6D8816B7-9BE5-494A-BAE8-81057667632E@gmail.com> References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <8C9CCC8B-5379-4A6A-902F-ACAE609F5789@gmail.com> <8727A959-8F80-471A-9E24-04C0E564D8DC@mail.nih.gov> <6D8816B7-9BE5-494A-BAE8-81057667632E@gmail.com> Message-ID: <2BBBE077-9880-4FAC-9873-DC265CFD7C35@mail.nih.gov> Nick, Would 2pm EST on day this week for you for a google hang out? Let's plan on review these points I've made along with the notebooks. I'd think the likely output is going to be some initial requirements for a new transform optimizer for composite transforms and the v4 framework. Brad On Aug 1, 2014, at 10:15 AM, Nick Tustison wrote: > Sorry, Brad, but I'm currently in Salt Lake at a funeral. I'd really like to understand better so, if you're available, I can do it anytime during the week on another call. > > Sent from Howling Fantods > >> On Aug 1, 2014, at 7:36 AM, Bradley Lowekamp wrote: >> >> Nick, >> >> I hope you can make it to today's TCON. I can demo that notebook I linked too. It should clarify things. >> >> Brad >> >> On Jul 30, 2014, at 1:57 PM, Nicholas Tustison wrote: >> >>>> To try to summaries... sorry if have not been clear enough in my explanations. >>> >>> No, I blame me?I?m consistently distracted by the scenery outside here in >>> California and it?s definitely affecting my ability to concentrate on code >>> questions. >>> >>>> INITIAL QUESTION >>>> >>>> How does composite transform and the "Center" parameter interact? How does this relate to the virtual domain? >>> >>> The composite transform is agnostic with respect to whether or not a >>> transform has a center or any other fixed parameter set. The only >>> distinction we make is typology with respect to linear/deformable. To >>> be clear, we?re not discussing any of the ?Centered? transforms: >>> >>> * CenteredAffineTransform >>> * CenteredEuler3DTransform >>> * CenteredEuler2DTransform >>> * CenteredSimilarity2DTransform >>> >>> None of those transforms are used in ANTs but I don?t think >>> their optimization would be an issue in the new ITKv4 registration >>> framework. >>> >>> The virtual domain is simply defined in terms of standard image >>> geometry (origin, spacing, etc.) and is currently set in terms of the >>> fixed image geometry. >>> >>>> MY UNDERSTANDING >>>> >>>> 1) Using a "Center" initialized transform only works correctly for a single transform and directly with a composite. ( This is with the current center initializers, a different approach could be done which takes into consideration the composition ) >>> >>> I don?t see why it would only work correctly for a single transform. Suppose >>> I optimize a translation transform to get it?s optimal parameters for a given >>> registration problem. It?s not clear to me why it would be a problem to follow >>> that with optimizing an Euler3D transform (which we do all the time in ANTs). >>> Obviously, we have to specify a staring point for the second transform (which >>> is identity by default) and perhaps it would be better to have a different >>> starting point but I don?t see why starting with the default parameters is a >>> problem. >>> >>> If the ?Center initialized transform? is one of the transforms listed above >>> then we don?t use those. If it?s simply the result of using the >>> CenteredTransformInitializer, then we just pull the itk::TranslationTransform >>> part from the result and push that translation transform into the composite >>> transform queue. I don?t see why it would be a problem to then optimize, >>> for example, the Euler3DTransform which just has 3 translation parameters >>> and 3 angle parameters to optimize where the center is implicitly defined >>> (unlike the CenteredEuler3DTransform which does have additional Center >>> parameters). >>> >>>> 2) The virtual domain should be initialized such that the two images "Center"s are at the origin. This an alternative to using the "Center" transform parameters, and better works with composite transforms. >>> >>> Yes, that would probably be a better initialization but I don?t know why it would >>> be a problem for the current framework to optimize with the origin elsewhere. >>> Right now, each transform within the composite transform queue is >>> optimized starting from its identity parameters but perhaps the initializer >>> idea that you propose would improve optimization. >>> >>>> I was not aware that 2 was the best practice with the ITKv4 framework. Do we have any examples/test/documentation to indicate this? Further more using the current CenterTransformInitalizers to initialize the virtual domain is not readily apparent[1] how to map the parameters. >>>> PROPOSAL >>>> >>>> Perhaps we need a new Initializer filter to assist with initializing the virtual domain to initialize this practice? >>>> >>>> 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 ntustison at gmail.com Mon Aug 4 09:36:37 2014 From: ntustison at gmail.com (Nick Tustison) Date: Mon, 4 Aug 2014 06:36:37 -0700 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: <2BBBE077-9880-4FAC-9873-DC265CFD7C35@mail.nih.gov> References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <8C9CCC8B-5379-4A6A-902F-ACAE609F5789@gmail.com> <8727A959-8F80-471A-9E24-04C0E564D8DC@mail.nih.gov> <6D8816B7-9BE5-494A-BAE8-81057667632E@gmail.com> <2BBBE077-9880-4FAC-9873-DC265CFD7C35@mail.nih.gov> Message-ID: <51C874C8-7984-4C5C-B53B-F08D10B6BC6D@gmail.com> Hi Brad, Yes, 2 pm EST would work for me any day this week. Nick > On Aug 4, 2014, at 6:13 AM, Bradley Lowekamp wrote: > > Nick, > > Would 2pm EST on day this week for you for a google hang out? > > Let's plan on review these points I've made along with the notebooks. I'd think the likely output is going to be some initial requirements for a new transform optimizer for composite transforms and the v4 framework. > > Brad > >> On Aug 1, 2014, at 10:15 AM, Nick Tustison wrote: >> >> Sorry, Brad, but I'm currently in Salt Lake at a funeral. I'd really like to understand better so, if you're available, I can do it anytime during the week on another call. >> >> Sent from Howling Fantods >> >>> On Aug 1, 2014, at 7:36 AM, Bradley Lowekamp wrote: >>> >>> Nick, >>> >>> I hope you can make it to today's TCON. I can demo that notebook I linked too. It should clarify things. >>> >>> Brad >>> >>> On Jul 30, 2014, at 1:57 PM, Nicholas Tustison wrote: >>> >>>>> To try to summaries... sorry if have not been clear enough in my explanations. >>>> >>>> No, I blame me?I?m consistently distracted by the scenery outside here in >>>> California and it?s definitely affecting my ability to concentrate on code >>>> questions. >>>> >>>>> INITIAL QUESTION >>>>> >>>>> How does composite transform and the "Center" parameter interact? How does this relate to the virtual domain? >>>> >>>> The composite transform is agnostic with respect to whether or not a >>>> transform has a center or any other fixed parameter set. The only >>>> distinction we make is typology with respect to linear/deformable. To >>>> be clear, we?re not discussing any of the ?Centered? transforms: >>>> >>>> * CenteredAffineTransform >>>> * CenteredEuler3DTransform >>>> * CenteredEuler2DTransform >>>> * CenteredSimilarity2DTransform >>>> >>>> None of those transforms are used in ANTs but I don?t think >>>> their optimization would be an issue in the new ITKv4 registration >>>> framework. >>>> >>>> The virtual domain is simply defined in terms of standard image >>>> geometry (origin, spacing, etc.) and is currently set in terms of the >>>> fixed image geometry. >>>> >>>>> MY UNDERSTANDING >>>>> >>>>> 1) Using a "Center" initialized transform only works correctly for a single transform and directly with a composite. ( This is with the current center initializers, a different approach could be done which takes into consideration the composition ) >>>> >>>> I don?t see why it would only work correctly for a single transform. Suppose >>>> I optimize a translation transform to get it?s optimal parameters for a given >>>> registration problem. It?s not clear to me why it would be a problem to follow >>>> that with optimizing an Euler3D transform (which we do all the time in ANTs). >>>> Obviously, we have to specify a staring point for the second transform (which >>>> is identity by default) and perhaps it would be better to have a different >>>> starting point but I don?t see why starting with the default parameters is a >>>> problem. >>>> >>>> If the ?Center initialized transform? is one of the transforms listed above >>>> then we don?t use those. If it?s simply the result of using the >>>> CenteredTransformInitializer, then we just pull the itk::TranslationTransform >>>> part from the result and push that translation transform into the composite >>>> transform queue. I don?t see why it would be a problem to then optimize, >>>> for example, the Euler3DTransform which just has 3 translation parameters >>>> and 3 angle parameters to optimize where the center is implicitly defined >>>> (unlike the CenteredEuler3DTransform which does have additional Center >>>> parameters). >>>> >>>>> 2) The virtual domain should be initialized such that the two images "Center"s are at the origin. This an alternative to using the "Center" transform parameters, and better works with composite transforms. >>>> >>>> Yes, that would probably be a better initialization but I don?t know why it would >>>> be a problem for the current framework to optimize with the origin elsewhere. >>>> Right now, each transform within the composite transform queue is >>>> optimized starting from its identity parameters but perhaps the initializer >>>> idea that you propose would improve optimization. >>>> >>>>> I was not aware that 2 was the best practice with the ITKv4 framework. Do we have any examples/test/documentation to indicate this? Further more using the current CenterTransformInitalizers to initialize the virtual domain is not readily apparent[1] how to map the parameters. >>>>> PROPOSAL >>>>> >>>>> Perhaps we need a new Initializer filter to assist with initializing the virtual domain to initialize this practice? >>>>> >>>>> 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 Mon Aug 4 10:50:54 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 4 Aug 2014 10:50:54 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: <51C874C8-7984-4C5C-B53B-F08D10B6BC6D@gmail.com> References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <8C9CCC8B-5379-4A6A-902F-ACAE609F5789@gmail.com> <8727A959-8F80-471A-9E24-04C0E564D8DC@mail.nih.gov> <6D8816B7-9BE5-494A-BAE8-81057667632E@gmail.com> <2BBBE077-9880-4FAC-9873-DC265CFD7C35@mail.nih.gov> <51C874C8-7984-4C5C-B53B-F08D10B6BC6D@gmail.com> Message-ID: Hello, I have created an Google Hangout event, it should be shared with the ITKBarCamp Google+ group if others are interested in attending. Thanks, Brad On Aug 4, 2014, at 9:36 AM, Nick Tustison wrote: > Hi Brad, > > Yes, 2 pm EST would work for me any day this week. > > Nick > >> On Aug 4, 2014, at 6:13 AM, Bradley Lowekamp wrote: >> >> Nick, >> >> Would 2pm EST on day this week for you for a google hang out? >> >> Let's plan on review these points I've made along with the notebooks. I'd think the likely output is going to be some initial requirements for a new transform optimizer for composite transforms and the v4 framework. >> >> Brad >> >>> On Aug 1, 2014, at 10:15 AM, Nick Tustison wrote: >>> >>> Sorry, Brad, but I'm currently in Salt Lake at a funeral. I'd really like to understand better so, if you're available, I can do it anytime during the week on another call. >>> >>> Sent from Howling Fantods >>> >>>> On Aug 1, 2014, at 7:36 AM, Bradley Lowekamp wrote: >>>> >>>> Nick, >>>> >>>> I hope you can make it to today's TCON. I can demo that notebook I linked too. It should clarify things. >>>> >>>> Brad >>>> >>>> On Jul 30, 2014, at 1:57 PM, Nicholas Tustison wrote: >>>> >>>>>> To try to summaries... sorry if have not been clear enough in my explanations. >>>>> >>>>> No, I blame me?I?m consistently distracted by the scenery outside here in >>>>> California and it?s definitely affecting my ability to concentrate on code >>>>> questions. >>>>> >>>>>> INITIAL QUESTION >>>>>> >>>>>> How does composite transform and the "Center" parameter interact? How does this relate to the virtual domain? >>>>> >>>>> The composite transform is agnostic with respect to whether or not a >>>>> transform has a center or any other fixed parameter set. The only >>>>> distinction we make is typology with respect to linear/deformable. To >>>>> be clear, we?re not discussing any of the ?Centered? transforms: >>>>> >>>>> * CenteredAffineTransform >>>>> * CenteredEuler3DTransform >>>>> * CenteredEuler2DTransform >>>>> * CenteredSimilarity2DTransform >>>>> >>>>> None of those transforms are used in ANTs but I don?t think >>>>> their optimization would be an issue in the new ITKv4 registration >>>>> framework. >>>>> >>>>> The virtual domain is simply defined in terms of standard image >>>>> geometry (origin, spacing, etc.) and is currently set in terms of the >>>>> fixed image geometry. >>>>> >>>>>> MY UNDERSTANDING >>>>>> >>>>>> 1) Using a "Center" initialized transform only works correctly for a single transform and directly with a composite. ( This is with the current center initializers, a different approach could be done which takes into consideration the composition ) >>>>> >>>>> I don?t see why it would only work correctly for a single transform. Suppose >>>>> I optimize a translation transform to get it?s optimal parameters for a given >>>>> registration problem. It?s not clear to me why it would be a problem to follow >>>>> that with optimizing an Euler3D transform (which we do all the time in ANTs). >>>>> Obviously, we have to specify a staring point for the second transform (which >>>>> is identity by default) and perhaps it would be better to have a different >>>>> starting point but I don?t see why starting with the default parameters is a >>>>> problem. >>>>> >>>>> If the ?Center initialized transform? is one of the transforms listed above >>>>> then we don?t use those. If it?s simply the result of using the >>>>> CenteredTransformInitializer, then we just pull the itk::TranslationTransform >>>>> part from the result and push that translation transform into the composite >>>>> transform queue. I don?t see why it would be a problem to then optimize, >>>>> for example, the Euler3DTransform which just has 3 translation parameters >>>>> and 3 angle parameters to optimize where the center is implicitly defined >>>>> (unlike the CenteredEuler3DTransform which does have additional Center >>>>> parameters). >>>>> >>>>>> 2) The virtual domain should be initialized such that the two images "Center"s are at the origin. This an alternative to using the "Center" transform parameters, and better works with composite transforms. >>>>> >>>>> Yes, that would probably be a better initialization but I don?t know why it would >>>>> be a problem for the current framework to optimize with the origin elsewhere. >>>>> Right now, each transform within the composite transform queue is >>>>> optimized starting from its identity parameters but perhaps the initializer >>>>> idea that you propose would improve optimization. >>>>> >>>>>> I was not aware that 2 was the best practice with the ITKv4 framework. Do we have any examples/test/documentation to indicate this? Further more using the current CenterTransformInitalizers to initialize the virtual domain is not readily apparent[1] how to map the parameters. >>>>>> PROPOSAL >>>>>> >>>>>> Perhaps we need a new Initializer filter to assist with initializing the virtual domain to initialize this practice? >>>>>> >>>>>> 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 stnava at gmail.com Mon Aug 4 10:53:00 2014 From: stnava at gmail.com (brian avants) Date: Mon, 4 Aug 2014 10:53:00 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <8C9CCC8B-5379-4A6A-902F-ACAE609F5789@gmail.com> <8727A959-8F80-471A-9E24-04C0E564D8DC@mail.nih.gov> <6D8816B7-9BE5-494A-BAE8-81057667632E@gmail.com> <2BBBE077-9880-4FAC-9873-DC265CFD7C35@mail.nih.gov> <51C874C8-7984-4C5C-B53B-F08D10B6BC6D@gmail.com> Message-ID: what day? On Aug 4, 2014 10:50 AM, "Bradley Lowekamp" wrote: > Hello, > > I have created an Google Hangout event, it should be shared with the > ITKBarCamp Google+ group if others are interested in attending. > > Thanks, > Brad > > On Aug 4, 2014, at 9:36 AM, Nick Tustison wrote: > > > Hi Brad, > > > > Yes, 2 pm EST would work for me any day this week. > > > > Nick > > > >> On Aug 4, 2014, at 6:13 AM, Bradley Lowekamp > wrote: > >> > >> Nick, > >> > >> Would 2pm EST on day this week for you for a google hang out? > >> > >> Let's plan on review these points I've made along with the notebooks. > I'd think the likely output is going to be some initial requirements for a > new transform optimizer for composite transforms and the v4 framework. > >> > >> Brad > >> > >>> On Aug 1, 2014, at 10:15 AM, Nick Tustison > wrote: > >>> > >>> Sorry, Brad, but I'm currently in Salt Lake at a funeral. I'd really > like to understand better so, if you're available, I can do it anytime > during the week on another call. > >>> > >>> Sent from Howling Fantods > >>> > >>>> On Aug 1, 2014, at 7:36 AM, Bradley Lowekamp > wrote: > >>>> > >>>> Nick, > >>>> > >>>> I hope you can make it to today's TCON. I can demo that notebook I > linked too. It should clarify things. > >>>> > >>>> Brad > >>>> > >>>> On Jul 30, 2014, at 1:57 PM, Nicholas Tustison > wrote: > >>>> > >>>>>> To try to summaries... sorry if have not been clear enough in my > explanations. > >>>>> > >>>>> No, I blame me?I?m consistently distracted by the scenery outside > here in > >>>>> California and it?s definitely affecting my ability to concentrate > on code > >>>>> questions. > >>>>> > >>>>>> INITIAL QUESTION > >>>>>> > >>>>>> How does composite transform and the "Center" parameter interact? > How does this relate to the virtual domain? > >>>>> > >>>>> The composite transform is agnostic with respect to whether or not a > >>>>> transform has a center or any other fixed parameter set. The only > >>>>> distinction we make is typology with respect to linear/deformable. To > >>>>> be clear, we?re not discussing any of the ?Centered? transforms: > >>>>> > >>>>> * CenteredAffineTransform > >>>>> * CenteredEuler3DTransform > >>>>> * CenteredEuler2DTransform > >>>>> * CenteredSimilarity2DTransform > >>>>> > >>>>> None of those transforms are used in ANTs but I don?t think > >>>>> their optimization would be an issue in the new ITKv4 registration > >>>>> framework. > >>>>> > >>>>> The virtual domain is simply defined in terms of standard image > >>>>> geometry (origin, spacing, etc.) and is currently set in terms of the > >>>>> fixed image geometry. > >>>>> > >>>>>> MY UNDERSTANDING > >>>>>> > >>>>>> 1) Using a "Center" initialized transform only works correctly for > a single transform and directly with a composite. ( This is with the > current center initializers, a different approach could be done which takes > into consideration the composition ) > >>>>> > >>>>> I don?t see why it would only work correctly for a single transform. > Suppose > >>>>> I optimize a translation transform to get it?s optimal parameters > for a given > >>>>> registration problem. It?s not clear to me why it would be a > problem to follow > >>>>> that with optimizing an Euler3D transform (which we do all the time > in ANTs). > >>>>> Obviously, we have to specify a staring point for the second > transform (which > >>>>> is identity by default) and perhaps it would be better to have a > different > >>>>> starting point but I don?t see why starting with the default > parameters is a > >>>>> problem. > >>>>> > >>>>> If the ?Center initialized transform? is one of the transforms > listed above > >>>>> then we don?t use those. If it?s simply the result of using the > >>>>> CenteredTransformInitializer, then we just pull the > itk::TranslationTransform > >>>>> part from the result and push that translation transform into the > composite > >>>>> transform queue. I don?t see why it would be a problem to then > optimize, > >>>>> for example, the Euler3DTransform which just has 3 translation > parameters > >>>>> and 3 angle parameters to optimize where the center is implicitly > defined > >>>>> (unlike the CenteredEuler3DTransform which does have additional > Center > >>>>> parameters). > >>>>> > >>>>>> 2) The virtual domain should be initialized such that the two > images "Center"s are at the origin. This an alternative to using the > "Center" transform parameters, and better works with composite transforms. > >>>>> > >>>>> Yes, that would probably be a better initialization but I don?t know > why it would > >>>>> be a problem for the current framework to optimize with the origin > elsewhere. > >>>>> Right now, each transform within the composite transform queue is > >>>>> optimized starting from its identity parameters but perhaps the > initializer > >>>>> idea that you propose would improve optimization. > >>>>> > >>>>>> I was not aware that 2 was the best practice with the ITKv4 > framework. Do we have any examples/test/documentation to indicate this? > Further more using the current CenterTransformInitalizers to initialize > the virtual domain is not readily apparent[1] how to map the parameters. > >>>>>> PROPOSAL > >>>>>> > >>>>>> Perhaps we need a new Initializer filter to assist with > initializing the virtual domain to initialize this practice? > >>>>>> > >>>>>> 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 > -------------- 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 fttfzzx227 at 126.com Mon Aug 4 14:02:32 2014 From: fttfzzx227 at 126.com (tina) Date: Tue, 5 Aug 2014 02:02:32 +0800 Subject: [ITK] [ITK-users] [Insight-users] Principal Axes pre-registration Message-ID: <000001cfb00e$448ce9b0$cda6bd10$@126.com> Hi, Can anybody tell me about how to implement a principal axes registration use ITK? I use itkCenteredVersorTransformInitializer.txx to initialize the VersorRigid3DTransform,but this function didn't implement the rotation,so I try to compute the angle of rotation from the fixedPrincipalAxes and the movingPrincipalAxes, is there any way else to get the rotation matrix? Another problem is does the rotation matrix only specify one axis of the coordinate? I mean: in order to registrate two coordinates(x,y,z;x',y',z'),we should implement the VersorRigid3DTransform 3 times? Any help would be greatly appreciated! Best regards, Tina -------------- 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 Aug 4 14:12:59 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 4 Aug 2014 14:12:59 -0400 Subject: [ITK] [ITK-users] [Insight-users] Principal Axes pre-registration In-Reply-To: <000001cfb00e$448ce9b0$cda6bd10$@126.com> References: <000001cfb00e$448ce9b0$cda6bd10$@126.com> Message-ID: <5F66F56B-AB5F-491D-91C4-E60A83770043@mail.nih.gov> Hello, I just wrapped this class for SimpleITK. I found it odd that by default the "ComputeRotation" parameter is set to off. With turing this parameter on I got good initialization for some anisotropic blobs. Did you turn this on? Regarding you other question regarding the VersorTransfrom. The "versor" representation for rotation an represent an arbitrary rotation about the origin. So one is quite sufficient. Brad On Aug 4, 2014, at 2:02 PM, tina wrote: > Hi, > Can anybody tell me about how to implement a principal axes registration use ITK? I use itkCenteredVersorTransformInitializer.txx to initialize the VersorRigid3DTransform,but this function didn?t implement the rotation,so I try to compute the angle of rotation from the fixedPrincipalAxes and the movingPrincipalAxes, is there any way else to get the rotation matrix? > Another problem is does the rotation matrix only specify one axis of the coordinate? I mean: in order to registrate two coordinates(x,y,z;x?,y?,z?),we should implement the VersorRigid3DTransform 3 times? > Any help would be greatly appreciated! > Best regards, > Tina > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 ctrueden at wisc.edu Mon Aug 4 15:35:38 2014 From: ctrueden at wisc.edu (Curtis Rueden) Date: Mon, 4 Aug 2014 14:35:38 -0500 Subject: [ITK] [ITK-users] Extensions to the MetaImage (MHDs) IO-plugin to support compression and MHAs In-Reply-To: References: <27272_1406557413_s6SENUxH012254_53D65CD8.4080305@mh-hannover.de> Message-ID: Hi Roman, > I've extended the MetaImage (used by e.g. ITK/VTK) IO-plugin from > Kang Li (http://www.kangli.org/code/MetaImage_Reader_Writer.html) to > also support compression and local data storage, i.e. MHAs. The > MetaImage Reader/Writer from > (http://ij-plugins.sourceforge.net/plugins/3d-io/) seems not to > support this either. Reading and writing in Fiji was tested with MHDs > and MHAs created/read by ITK-4.5.1. While the plugin handles files > bigger than 4GB correctly, (for unknown reasons my) ITK seems to have > problems with MHDs/MHAs bigger than 4GB (in general). Interesting work. If you would like to get it upstream into Fiji, I suggest filing a Pull Request [1] against the IO repository [2]. Please also be aware that ImageJ is moving away from HandleExtraFileTypes hacks in favor of a unified Java library for image I/O known as SCIFIO [3]. There is already a SCIFIO/ITK bridge project [4, 5] that allows reading and writing SCIFIO formats within ITK. Regards, Curtis [1] https://help.github.com/articles/using-pull-requests [2] https://github.com/fiji/IO [3] http://imagej.net/SCIFIO [4] https://github.com/scifio/scifio-imageio [5] https://github.com/scifio/scifio-itk-bridge On Mon, Jul 28, 2014 at 12:34 PM, Williams, Norman K < norman-k-williams at uiowa.edu> wrote: > This is a good thing to submit to ITK proper; it would require conversion > to C++, though. > > On 7/28/14, 9:23 AM, "Dr. Roman Grothausmann" > wrote: > > >Dear mailing list members, > > > > > >I've extended the MetaImage (used by e.g. ITK/VTK) IO-plugin from Kang > >Li > >(http://www.kangli.org/code/MetaImage_Reader_Writer.html) to also support > >compression and local data storage, i.e. MHAs. The MetaImage > >Reader/Writer from > >(http://ij-plugins.sourceforge.net/plugins/3d-io/) seems not to support > >this > >either. > >Reading and writing in Fiji was tested with MHDs and MHAs created/read by > >ITK-4.5.1. While the plugin handles files bigger than 4GB correctly, (for > >unknown reasons my) ITK seems to have problems with MHDs/MHAs bigger than > >4GB > >(in general). > >The plugin does not check whether the size of the compressed data is > >correct, > >ITK however does. If the header lacks an entry of CompressedDataSize, ITK > >throws > >an error when reading/loading such a file. If the size specified with > >CompressedDataSize is too big, ITK just issues a warning. This was used > >as a > >workaround because I did not find an easy way in Java to put the correct > >value > >for CompressedDataSize without using extra temporary files (which might > >be quite > >big). > > > >Attached are the modified files (java-files, plugins.config and a > >repacked > >IO_-2.0.0-SNAPSHOT.jar). > >A modified HandleExtraFileTypes.java (based on: > >https://github.com/fiji/IO/blob/master/src/main/java/HandleExtraFileTypes > . > >java) > >is also included. > >Togehter with the modified Plugin it allows opening MHDs and MHAs > >directly. > > > > > >The repacked IO_-2.0.0-SNAPSHOT.jar was generated with: > > > >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. MetaImage_Reader.java > >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. MetaImage_Writer.java > >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. MetaImage_CWriter.java > > > >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. HandleExtraFileTypes.java > > > >The compiled Class-files were moved to a subfolder named io/: > >ExtendedFileOpener.class MetaImage_CWriter.class MetaImage_Writer.class > >ExtendedFileSaver.class MetaImage_Reader.class > >ReplacingInputStream.class > > > >And then included/replaced with zip: > >zip -r IO_-2.0.0-SNAPSHOT.jar plugins.config HandleExtraFileTypes.class > >io/ > > > >Feel free to add these extensions to the Plugin-Page or the ImageJ/Fiji > >repository. > >Any suggestions concerning improvements are very welcome. > > > > > >Many thanks for ImageJ/Fiji and the initial Metaimage IO-plugin. > >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 > > > > > > > >====================================================================== > >A potentially unsafe attachment has been removed from this email > >message. See http://its.uiowa.edu/support/article/100806 for further > >information. > > > >Removed attachment name(s): > >IO_-2.0.0-SNAPSHOT.jar > >====================================================================== > > > > > > ________________________________ > 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://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 ali-ghayoor at uiowa.edu Mon Aug 4 23:56:52 2014 From: ali-ghayoor at uiowa.edu (Ghayoor, Ali) Date: Tue, 5 Aug 2014 03:56:52 +0000 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> Message-ID: Hello Brad, It is an awesome way for demonstration, and thanks for verification of my example. It seems that this email is sent on Saturday, but unfortunately I got that this morning! And I should inspect the reason! Anyway, over the weekend I ran almost the same experiment in ITK and got close results to you. Also, today I tried to make the registration process work when Affine Transform is used in a multi stage structure, and here is my suggestion: I think we do not need to bother ourselves to think about a new optimizer or a new initializer for the composite transform since we can initialize the fixed parameters of each transform individually at the beginning of each stage. Remember how we run a BSpline registration stage after some linear registrations. At the beginning of the BSpline stage, we should instantiate a BSpline transform object and define its fixed parameters (grid size, etc). Then, we pass this initialized transform to the registration filter using ?SetInitialTransform()?, yet we can initialize this stage by passing a composite transform, resultant from the previous stages, to the registration filter by ?SetMovingInitialTransform()?. The same condition holds for all other transform types with fixed unoptimizable parameters like the center of rotation in our Affine transform case. Attachment file includes a multi stage registration example that I have created for the new software guide. In this example, we use a simple 2 stages registration process for a multi modal problem that moving image is misaligned from the fixed image by a translation shift and rotation. In registration process, a translation transform is followed by an affine transform. Also, an initial transform is used at the beginning. If I do not set the center of the affine transform, the registration fails as you have shown in your Ipython example. However, if at the beginning of the second stage, I compute the geometrical center (or center of the mass) of the fixed image, and pass that to the affine transform using ?SetCenter()? or ?SetFixedParameters()?, the registration succeeds. Please take a quick look in the attached file that also includes lots of explanations. Therefore, we can follow the same procedure for all other transform types that their fixed parameters are important in the optimization, but those fixed parameters cannot be set explicitly inside a composite transform. Please let me know with you think about this. Thank you, Ali From: Bradley Lowekamp > Date: Saturday, August 2, 2014 at 6:48 PM To: Ali Ghayoor > Cc: Hans Johnson >, Insight Developers List > Subject: Re: [ITK-dev] [ITK] Optimizing composite transforms and center of transform Hello Ali, I created a notebook to try to demonstrate the problem you are describing: http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb If the center of an Affine transformation isn't correctly initialized then the optimization is not speedy or robust. I think it's best illustrated with these two graphs: [unknown.png] [unknown.png] Notice that with the Center being the origin, all 1000 iterations are exhausted, and the metric is slowing decreasing. And this is with the translation path being around the length to 10. If the spacing was bigger or more offset from the origin the situation would be worse. I don't think this is a bug with the registration framework. I think new initializers for composite transforms are needed, along with documentation how the 2 good ways to initialize the registration methods transforms. Brad On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali > wrote: Brad, I have exactly the same issue. I wrote a simple registration program that is run in two stages: -Translation -Affine My fixed and moving images are in 2D, and the moving image is created from the fixed image by rotation of 10 degree and translation of [13,17] in X and Y directions. The first stage does a translation registration and the result transform is added to a composite transform that is used as the initial moving transform of the second stage. After the registration the result transform of the second stage is also added to the composite transform to be used by the resampler. I have printed the composite transform to the screen: 2481: CompositeTransform (0x7fa359a18b00) 2481: RTTI typeinfo: itk::CompositeTransform 2481: Reference Count: 2 2481: Modified Time: 20949 2481: Debug: Off 2481: Object Name: 2481: Observers: 2481: none 2481: Transforms in queue, from begin to end: 2481: >>>>>>>>> 2481: TranslationTransform (0x7fa359a199b0) 2481: RTTI typeinfo: itk::TranslationTransform 2481: Reference Count: 7 2481: Modified Time: 1648 2481: Debug: Off 2481: Object Name: 2481: Observers: 2481: none 2481: Offset: [12.801, 15.8578] 2481: >>>>>>>>> 2481: AffineTransform (0x7fa359d095a0) 2481: RTTI typeinfo: itk::AffineTransform 2481: Reference Count: 5 2481: Modified Time: 20946 2481: Debug: Off 2481: Object Name: 2481: Observers: 2481: none 2481: Matrix: 2481: 1.01593 -0.0100051 2481: -0.00835669 1.01113 2481: Offset: [-0.358829, -0.290093] 2481: Center: [0, 0] 2481: Translation: [-0.358829, -0.290093] 2481: Inverse: 2481: 0.984397 0.00974056 2481: 0.00813575 0.989073 2481: Singular: 0 2481: End of MultiTransform. 2481: <<<<<<<<<< As it can be seen, the translation transform provides a good initialization since its offset (Offset: [12.801, 15.8578]) is close to the shift parameters. However, the Affine transform fails to rotate the moving image since its Matrix is almost identity. Possible reason can be the improper Center of Affine transform that is fixed to [0,0], and not at geometrical center or center of mass. To make sure that I have not made any crazy mistake in my example, I simulated my example parameters in ANTs, and ANTs returned the same results and failed to register the images!! ANTs command line <<<<<<<<<<< PROGPATH=/scratch/ANTS/release-new/bin fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png time ${PROGPATH}/antsRegistration -d 2 \ --float \ --output [test1, warpedMoving.nii.gz] \ --transform "Translation[16]" \ --metric MI[${fi},${mi},1,32,None,1] \ --convergence [100,1e-2,5] \ --shrink-factors 3 \ --smoothing-sigmas 2 \ --use-histogram-matching 1 \ \ --transform "Affine[1]" \ --metric MI[${fi},${mi},1,32] \ --convergence [100x100,1e-2,2] \ --shrink-factors 2x1 \ --smoothing-sigmas 1x0 \ --use-histogram-matching 1 <<<<<<<<<<<<<<<<<<<<<<<< Fixed and moving images can be loaded from the ITK data files. What do you think about this example? Is it a bug in ITK or just the parameters are not tuned finely? Thanks, Ali ________________________________________ From: Johnson, Hans J Sent: Tuesday, July 29, 2014 6:19 PM To: Ghayoor, Ali Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of transform Ali, You need to follow this discussion. Hans On 7/29/14, 6:16 PM, "Bradley Lowekamp" > wrote: Hello, Ok, to further explore this problem, and hopeful help other people too: I created an IPython Notebook viewable here: http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl ob/master/Transform%20Composition%20And%20Order.ipynb It doesn't come through on the static page, but I added some nifty interactive slider widgets to change the rotation parameter. Which is really the point to enable understanding of the parameters for the transform and how they should be best optimized. The notebook should work with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one to try it out :) IPython Notebooks widget are very cool! EXPLANATION: The the order of the composite transform is that the new transforms are applied first. BUT they map from the virtual domain ( fixed ) to the moving image. Therefore if your first transform moves the center of mass to the origin then the second added transform's space will be centered on the mass, which is good for optimizing rotation and affine parameters. QUESTION: Therefore I am inclined to conclude that its best practices to map the fixed and moving image to the virtual domain such that the center of mass ( or some other "center feature" ) are at the origin. This would then the scale, rotation and other affine parameters around the center, with out having to used the "Center" parameter the transforms currently have. Is this what others are doing in their registration? For general best practices should this be recommend? @Brian I know I have seen this multi-domain description many time, but I think I may have just gotten it... Is the well describe in the literature some place? I think this may be an important part add the software guide. Thanks, Brad On Jul 29, 2014, at 5:38 PM, Matt McCormick > wrote: Hi Brad, Your assessment that the fixed center is important is correct. In most cases, a transform with a Center is the first transform in a Composite transform. There not any issues here. However, if the transform with a Center is further along the chain, then a CenteredTransformInitializer that was applied before the registration is started will not generate the desired result. In this case, we would have to respond to an Event in the registration process and estimated the center on the imaged after the other transforms have been applied. It is more work, but it is a more unusual case. HTH, Matt On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp > wrote: Helloo Nick! I am glad you got back to me. I suspect that I have spent more time this past week looking at the ITK affine transforms than anyone else[1] this week. With that here is my current understanding... 1) The CenterTransformInitializers estimates an initial "Center" and an initial "Translation" parameter from either the geometry or the first moments. From my problematic experiences, getting the initial transform which is a "good" guess is been critical for the optimizer to head to the correct solution. 2) The Center parameter of a transform can either be "Fixed" or an optimizable parameter. The transforms with the "Centered" monkier are the the ones with the Center parameter optimizable. This issue seems to be what you were referring to in to message. In many ways the point I am trying to make is independent of #2. I have observed that it's important to have the "Center" of an affine transform ( or sub parameterization thereof ) at the center of the object you are trying to register. That is the coordinate space of the optimizable parameters' point 0 is near the center. This enables rotation to easily rotate around the center, as well as scaling to maintain the same relative center when "zooming". This issue is independent of wether that center point can be optimized. For example, consider changing the origin of an image for alignment by say 500, and compensating with just an initial translation and not setting the "Center" parameter. If we are trying to optimize rotation and translation, then the optimization path would be very difficult to traverse with these inter-dependent parameters to force it to rotate around the center of the object. This scenario may be more common in microscopy then medical imaging, due to microscopy frequently having multiple subjects across large images. I could write up a IPython Notebook to illustrate the case. So that is my understanding of why using a fixed center is important. I thought this may have been shared knowledge, but perhaps is not or is incorrect... Now I am trying to understand how this interacts with all the coordinate frames involved with the ITKv4 registration framework, and the composite transforms. Specifically the composite transform apply the transforms in "reverse order"[2]. As I understand that that means that the newest transform get applied first. So that transform parameters are being optimized in the images space not in the virtual domains we are working towards. Therefore the center of our transforms is still important as we composite transforms? I hope I explained that clearly, a white board may really be needed.... Thanks, Brad [1] https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94 099d3519eb23bcc16c7cf015 [2] http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html On Jul 28, 2014, at 8:57 PM, Nicholas Tustison > wrote: Hi Brad, I apologize for the delayed response. I?m still catching up on my workload after moving to CA. We might want to talk to Luis as it was my understanding that the ?center? component of the linear transforms might be a carry-over from all the ?Centered? transforms, e.g., http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm l which, if I remember correctly, Luis said were somewhat sub optimally conceived but this was such a long time ago that I might be completely misremembering. However, fixing the center for all transforms within a composite transform is certainly not necessary within the specified framework. Rather, the matrix and offset are updated with the ?Center? being updated implicitly. Nick On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp > wrote: Hello, There are a lot of transforms involved in the new registration framework. I am trying to figure out what the implications for the fix parameters of the transform "Center" ( ie center of rotation/scaling ) are when combined with composite transforms and the fixed/moving/registration coordinate frames... Based on how the transforms are composed it seems necessary to set the fix "Center" for subsequent transformations. Additionally, I am unsure how one would "improve" ( poorly defined? ) the center for a subsequent transform ie Affine after a similarity... Are there some documented guidance or figures to help with this issue? Do we have a comprehensive diagram of these transforms? Thanks, 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 _______________________________________________ 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 ________________________________ 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. ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: unknown.png Type: image/png Size: 15787 bytes Desc: unknown.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: unknown.png Type: image/png Size: 15016 bytes Desc: unknown.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MultiStageImageRegistration1.cxx Type: application/octet-stream Size: 35511 bytes Desc: MultiStageImageRegistration1.cxx 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 michkapopoff at gmail.com Tue Aug 5 05:02:55 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Tue, 5 Aug 2014 11:02:55 +0200 Subject: [ITK] SSE2 errors on dashboard In-Reply-To: References: <8185AF24-9C31-405B-8CD6-CCCB57A6BC6C@gmail.com> <4EB827D9-070D-403E-9607-25306A768C9D@mail.nih.gov> Message-ID: <1B557792-9A5F-4B26-BD5B-B53F0C365AE3@gmail.com> The errors on the WrapITK dashboard are gone for all the machines, except the Fedora 19 one. The failings on the other machines were due to the bug in the new FTT filters which I fixed yesterday, so the build is green again :) These errors were not related to the SSE2 errors, I was confused as they appeared the same day ... Remain the SSE2 errors: - The Fedora 19 machine is failing on vnl_math.h, so I suppose that needs to be fixed first - Then we need to add the new gccxml to ITK, I am waiting on Matt?s return so he can upload a new tarball - Then we can look at Gert Wollny's patch for itkMathDetail.h, I want to see how this plays out with the new gccxml Michka On 3 ao?t 2014, at 16:21, Michka Popoff wrote: > MMh, I may have been a little bit too fast here. > The dashboard is failing on vnl_math.h, and Gert?s patch is for itkMathDetail.h. > > Gert?s patch is on gerrit (http://review.source.kitware.com/#/c/16499/) and it?s a different story, > so we can keep the discussion for this specific patch in the gerrit topic. > > What I can not understand is why all the Python dashboard and the Fedora-19-x86_64 machine suddenly started to have this error. > > Michka > > On 3 ao?t 2014, at 16:05, Bradley Lowekamp wrote: > >> Michka, >> >> I am not sure what that patch has to do with VNL. It's looks different. >> >> The patch in that JIRA issue was fixed by adding support that that version of GCC to gcc_xml.. >> >> On Aug 3, 2014, at 6:08 AM, Michka Popoff wrote: >> >>> Hi >>> >>> answering to myself, this is related to this Jira ticket: https://issues.itk.org/jira/browse/ITK-3299 >>> I?ll look at the provided patches and push them to gerrit so that we can fix this. >>> >>> Michka >>> >>> On 2 ao?t 2014, at 15:07, Michka Popoff wrote: >>> >>>> Hi >>>> Some SSE2 errors appeared on the dashboard on the 31 of July, see http://open.cdash.org/buildSummary.php?buildid=3431994 >>>> The errors appear also on the wrapping machines. >>>> Any clue what is causing this ? I was not able to determine the origin of it. >>>> /home/kevin/kitware/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:49:5: error: #error "Required file emmintrin.h for SSE2 not found" >>>> # error "Required file emmintrin.h for SSE2 not found? >>>> Michka >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent.ngai at gmail.com Tue Aug 5 05:26:31 2014 From: vincent.ngai at gmail.com (vincent ngai) Date: Tue, 5 Aug 2014 17:26:31 +0800 Subject: [ITK] [ITK-users] AffineTransform to 4x4 matrix...again maybe Message-ID: Hi all, apologies if this has been asked before, I googled the above but only got 4x4 -> AffineTransform and not the other way around. I need to get the output of an AffineTransform after registration to my OpenGL renderer. >From what I understand, the AffineTransform is composed of a Rotation, Center of Rotation and Translation. So would the following sequence of 4x4 transformation be correct? OGLM = InvCRM * Rot * CRM * TM where CRM = 4x4 identity matrix with indices [ 12, 13, 14] set to XYZ value of GetCenter() InvCRM = Inverse of CRM Rot = 4x4 Identity matrix with 3x3 set to the rotation parameters TM = 4x4 identity matrix with indicies[ 12, 13, 14 ] set to the translation parameters Essentially: 1) translate center to origin 2) perform rotation 3) translate back to where we were 4) slap on translation I am doing the above, but for some reason the translation does not match up. The rotation seems fine. -- Regards, Vincent -------------- 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 DotanG at azimutherapy.com Tue Aug 5 06:50:10 2014 From: DotanG at azimutherapy.com (Dotan Goberman) Date: Tue, 5 Aug 2014 12:50:10 +0200 Subject: [ITK] [ITK-users] ContourExtractor2DImageFilter Message-ID: Hello itk users. I saw the ContourExtractor2DImageFilter in the itkreview module, is there another filter that get as input Image and extract the isocontour as Polyline? Thanx in advance. Dotan -------------- 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 Aug 5 09:12:25 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 5 Aug 2014 09:12:25 -0400 Subject: [ITK] [ITK-users] AffineTransform to 4x4 matrix...again maybe In-Reply-To: References: Message-ID: <4D7F2AA9-48DF-4C78-BC5E-B8609CBF45E0@mail.nih.gov> Hello, That looks pretty close, but I think CRM[12,13,14] should be -GetCenter(), with the negative there. Then the TM should be applied last, using your original notation with the previously mentioned correction I'd expect this to be correct: OGLM = TM * InvCRM * Rot * CRM Hope that helps, Brad [1] http://www.itk.org/Doxygen/html/classitk_1_1MatrixOffsetTransformBase.html On Aug 5, 2014, at 5:26 AM, vincent ngai wrote: > Hi all, apologies if this has been asked before, I googled the above but only got 4x4 -> AffineTransform and not the other way around. > > I need to get the output of an AffineTransform after registration to my OpenGL renderer. > > From what I understand, the AffineTransform is composed of a Rotation, Center of Rotation and Translation. > > So would the following sequence of 4x4 transformation be correct? > > OGLM = InvCRM * Rot * CRM * TM > > where > > CRM = 4x4 identity matrix with indices [ 12, 13, 14] set to XYZ value of GetCenter() > InvCRM = Inverse of CRM > Rot = 4x4 Identity matrix with 3x3 set to the rotation parameters > TM = 4x4 identity matrix with indicies[ 12, 13, 14 ] set to the translation parameters > > Essentially: > > 1) translate center to origin > 2) perform rotation > 3) translate back to where we were > 4) slap on translation > > I am doing the above, but for some reason the translation does not match up. The rotation seems fine. > -- > Regards, > Vincent > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Aug 5 09:03:11 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 5 Aug 2014 09:03:11 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> Message-ID: <85D2068C-A0FC-46EE-8CF8-3F44CDB40E5D@mail.nih.gov> Ali, Glad to hear the registration iteration graphs where effective. Yes, you are right you can initialize the parameters of the second stage affine registration. Specifically the Center. However, it not readily apparent ( no example, no filter/initializer ) how that center fixed parameter should be initialized. And the "CenteredTransformInitializer" is not the correct way. For a Composite transformed defined as ?=T0(T1(x)) where ?:?fixed??moving then if C such that C??moving is the correct center initialization for T1, then the correct center initialization for T0 when in the composite transform is C?=T?10(C). Cool pasting from the IPython Notebook with inline latex appears to have worked :) While it is easy to do this with the MomentsCaluclator and manually doing the transform inverse, I think to make it more readily apparent and easier to use it should be available as a filter/initializer. There are several things that are done manually in the examples that I would think should be updated to use the latest filters and initializers. For example The BSplines are manually initialized instead of using the BSplineTransform Initializer[1]. Additionally, conversion of BSpline to a deformation field[2], and the the upsampling of the BSpine[3], though that last one still looks like ITKv3 framework, so maybe it'll be updated to the adaptors with v4. However I am after simple functions for these common tasks for SimpleITK, so I have a bit different perspective then one who is OK with implementing a 50 line solution in C++ and being OK with the interface. We'll discuss these initialization issue further this afternoon. Brad [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L215-L235 [2] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L401-L430 [3] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration6.cxx#L273-L330 On Aug 4, 2014, at 11:56 PM, Ghayoor, Ali wrote: > Hello Brad, > > It is an awesome way for demonstration, and thanks for verification of my example. It seems that this email is sent on Saturday, but unfortunately I got that this morning! And I should inspect the reason! > Anyway, over the weekend I ran almost the same experiment in ITK and got close results to you. > > Also, today I tried to make the registration process work when Affine Transform is used in a multi stage structure, and here is my suggestion: > > I think we do not need to bother ourselves to think about a new optimizer or a new initializer for the composite transform since we can initialize the fixed parameters of each transform individually at the beginning of each stage. > > Remember how we run a BSpline registration stage after some linear registrations. At the beginning of the BSpline stage, we should instantiate a BSpline transform object and define its fixed parameters (grid size, etc). Then, we pass this initialized transform to the registration filter using ?SetInitialTransform()?, yet we can initialize this stage by passing a composite transform, resultant from the previous stages, to the registration filter by ?SetMovingInitialTransform()?. > > The same condition holds for all other transform types with fixed unoptimizable parameters like the center of rotation in our Affine transform case. Attachment file includes a multi stage registration example that I have created for the new software guide. In this example, we use a simple 2 stages registration process for a multi modal problem that moving image is misaligned from the fixed image by a translation shift and rotation. In registration process, a translation transform is followed by an affine transform. Also, an initial transform is used at the beginning. > > If I do not set the center of the affine transform, the registration fails as you have shown in your Ipython example. However, if at the beginning of the second stage, I compute the geometrical center (or center of the mass) of the fixed image, and pass that to the affine transform using ?SetCenter()? or ?SetFixedParameters()?, the registration succeeds. Please take a quick look in the attached file that also includes lots of explanations. > > Therefore, we can follow the same procedure for all other transform types that their fixed parameters are important in the optimization, but those fixed parameters cannot be set explicitly inside a composite transform. Please let me know with you think about this. > > Thank you, > Ali > > > From: Bradley Lowekamp > Date: Saturday, August 2, 2014 at 6:48 PM > To: Ali Ghayoor > Cc: Hans Johnson , Insight Developers List > Subject: Re: [ITK-dev] [ITK] Optimizing composite transforms and center of transform > > Hello Ali, > > I created a notebook to try to demonstrate the problem you are describing: > http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb > > If the center of an Affine transformation isn't correctly initialized then the optimization is not speedy or robust. I think it's best illustrated with these two graphs: > > > > > Notice that with the Center being the origin, all 1000 iterations are exhausted, and the metric is slowing decreasing. And this is with the translation path being around the length to 10. If the spacing was bigger or more offset from the origin the situation would be worse. > > I don't think this is a bug with the registration framework. I think new initializers for composite transforms are needed, along with documentation how the 2 good ways to initialize the registration methods transforms. > > > Brad > > On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali wrote: > >> Brad, >> >> I have exactly the same issue. I wrote a simple registration program that is run in two stages: >> -Translation >> -Affine >> >> My fixed and moving images are in 2D, and the moving image is created from the fixed image by >> rotation of 10 degree and translation of [13,17] in X and Y directions. >> >> The first stage does a translation registration and the result transform is added to a composite transform >> that is used as the initial moving transform of the second stage. >> >> After the registration the result transform of the second stage is also added to the composite transform >> to be used by the resampler. >> >> I have printed the composite transform to the screen: >> >> 2481: CompositeTransform (0x7fa359a18b00) >> 2481: RTTI typeinfo: itk::CompositeTransform >> 2481: Reference Count: 2 >> 2481: Modified Time: 20949 >> 2481: Debug: Off >> 2481: Object Name: >> 2481: Observers: >> 2481: none >> 2481: Transforms in queue, from begin to end: >> 2481: >>>>>>>>> >> 2481: TranslationTransform (0x7fa359a199b0) >> 2481: RTTI typeinfo: itk::TranslationTransform >> 2481: Reference Count: 7 >> 2481: Modified Time: 1648 >> 2481: Debug: Off >> 2481: Object Name: >> 2481: Observers: >> 2481: none >> 2481: Offset: [12.801, 15.8578] >> 2481: >>>>>>>>> >> 2481: AffineTransform (0x7fa359d095a0) >> 2481: RTTI typeinfo: itk::AffineTransform >> 2481: Reference Count: 5 >> 2481: Modified Time: 20946 >> 2481: Debug: Off >> 2481: Object Name: >> 2481: Observers: >> 2481: none >> 2481: Matrix: >> 2481: 1.01593 -0.0100051 >> 2481: -0.00835669 1.01113 >> 2481: Offset: [-0.358829, -0.290093] >> 2481: Center: [0, 0] >> 2481: Translation: [-0.358829, -0.290093] >> 2481: Inverse: >> 2481: 0.984397 0.00974056 >> 2481: 0.00813575 0.989073 >> 2481: Singular: 0 >> 2481: End of MultiTransform. >> 2481: <<<<<<<<<< >> >> As it can be seen, the translation transform provides a good initialization since its offset (Offset: [12.801, 15.8578]) is close to the shift parameters. >> >> However, the Affine transform fails to rotate the moving image since its Matrix is almost identity. >> Possible reason can be the improper Center of Affine transform that is fixed to [0,0], and not at geometrical center or center of mass. >> >> To make sure that I have not made any crazy mistake in my example, I simulated my example parameters in ANTs, and ANTs returned >> the same results and failed to register the images!! >> >>>>>>> ANTs command line <<<<<<<<<<< >> >> PROGPATH=/scratch/ANTS/release-new/bin >> fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png >> mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png >> >> time ${PROGPATH}/antsRegistration -d 2 \ >> --float \ >> --output [test1, warpedMoving.nii.gz] \ >> --transform "Translation[16]" \ >> --metric MI[${fi},${mi},1,32,None,1] \ >> --convergence [100,1e-2,5] \ >> --shrink-factors 3 \ >> --smoothing-sigmas 2 \ >> --use-histogram-matching 1 \ >> \ >> --transform "Affine[1]" \ >> --metric MI[${fi},${mi},1,32] \ >> --convergence [100x100,1e-2,2] \ >> --shrink-factors 2x1 \ >> --smoothing-sigmas 1x0 \ >> --use-histogram-matching 1 >> >> <<<<<<<<<<<<<<<<<<<<<<<< >> >> Fixed and moving images can be loaded from the ITK data files. What do you think about this example? Is it a bug in ITK or just the parameters are not tuned finely? >> >> Thanks, >> Ali >> >> ________________________________________ >> From: Johnson, Hans J >> Sent: Tuesday, July 29, 2014 6:19 PM >> To: Ghayoor, Ali >> Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of transform >> >> Ali, >> >> You need to follow this discussion. >> >> Hans >> >> On 7/29/14, 6:16 PM, "Bradley Lowekamp" wrote: >> >>> Hello, >>> >>> Ok, to further explore this problem, and hopeful help other people too: I >>> created an IPython Notebook viewable here: >>> http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl >>> ob/master/Transform%20Composition%20And%20Order.ipynb >>> >>> It doesn't come through on the static page, but I added some nifty >>> interactive slider widgets to change the rotation parameter. Which is >>> really the point to enable understanding of the parameters for the >>> transform and how they should be best optimized. The notebook should work >>> with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one >>> to try it out :) IPython Notebooks widget are very cool! >>> >>> EXPLANATION: >>> >>> The the order of the composite transform is that the new transforms are >>> applied first. >>> >>> BUT they map from the virtual domain ( fixed ) to the moving image. >>> Therefore if your first transform moves the center of mass to the origin >>> then the second added transform's space will be centered on the mass, >>> which is good for optimizing rotation and affine parameters. >>> >>> QUESTION: >>> >>> Therefore I am inclined to conclude that its best practices to map the >>> fixed and moving image to the virtual domain such that the center of mass >>> ( or some other "center feature" ) are at the origin. This would then the >>> scale, rotation and other affine parameters around the center, with out >>> having to used the "Center" parameter the transforms currently have. >>> >>> Is this what others are doing in their registration? For general best >>> practices should this be recommend? >>> >>> @Brian I know I have seen this multi-domain description many time, but I >>> think I may have just gotten it... Is the well describe in the literature >>> some place? I think this may be an important part add the software guide. >>> >>> Thanks, >>> Brad >>> >>> >>> >>> >>> On Jul 29, 2014, at 5:38 PM, Matt McCormick >>> wrote: >>> >>>> Hi Brad, >>>> >>>> Your assessment that the fixed center is important is correct. >>>> >>>> In most cases, a transform with a Center is the first transform in a >>>> Composite transform. There not any issues here. However, if the >>>> transform with a Center is further along the chain, then a >>>> CenteredTransformInitializer that was applied before the registration >>>> is started will not generate the desired result. In this case, we >>>> would have to respond to an Event in the registration process and >>>> estimated the center on the imaged after the other transforms have >>>> been applied. It is more work, but it is a more unusual case. >>>> >>>> HTH, >>>> Matt >>>> >>>> >>>> >>>> On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp >>>> wrote: >>>>> Helloo Nick! >>>>> >>>>> I am glad you got back to me. >>>>> >>>>> I suspect that I have spent more time this past week looking at the >>>>> ITK affine transforms than anyone else[1] this week. With that here is >>>>> my current understanding... >>>>> >>>>> 1) The CenterTransformInitializers estimates an initial "Center" and >>>>> an initial "Translation" parameter from either the geometry or the >>>>> first moments. From my problematic experiences, getting the initial >>>>> transform which is a "good" guess is been critical for the optimizer to >>>>> head to the correct solution. >>>>> >>>>> 2) The Center parameter of a transform can either be "Fixed" or an >>>>> optimizable parameter. The transforms with the "Centered" monkier are >>>>> the the ones with the Center parameter optimizable. This issue seems to >>>>> be what you were referring to in to message. >>>>> >>>>> In many ways the point I am trying to make is independent of #2. I >>>>> have observed that it's important to have the "Center" of an affine >>>>> transform ( or sub parameterization thereof ) at the center of the >>>>> object you are trying to register. That is the coordinate space of the >>>>> optimizable parameters' point 0 is near the center. This enables >>>>> rotation to easily rotate around the center, as well as scaling to >>>>> maintain the same relative center when "zooming". This issue is >>>>> independent of wether that center point can be optimized. >>>>> >>>>> For example, consider changing the origin of an image for alignment by >>>>> say 500, and compensating with just an initial translation and not >>>>> setting the "Center" parameter. If we are trying to optimize rotation >>>>> and translation, then the optimization path would be very difficult to >>>>> traverse with these inter-dependent parameters to force it to rotate >>>>> around the center of the object. This scenario may be more common in >>>>> microscopy then medical imaging, due to microscopy frequently having >>>>> multiple subjects across large images. I could write up a IPython >>>>> Notebook to illustrate the case. >>>>> >>>>> So that is my understanding of why using a fixed center is important. >>>>> I thought this may have been shared knowledge, but perhaps is not or is >>>>> incorrect... >>>>> >>>>> Now I am trying to understand how this interacts with all the >>>>> coordinate frames involved with the ITKv4 registration framework, and >>>>> the composite transforms. Specifically the composite transform apply >>>>> the transforms in "reverse order"[2]. As I understand that that means >>>>> that the newest transform get applied first. So that transform >>>>> parameters are being optimized in the images space not in the virtual >>>>> domains we are working towards. Therefore the center of our transforms >>>>> is still important as we composite transforms? >>>>> >>>>> I hope I explained that clearly, a white board may really be needed.... >>>>> >>>>> Thanks, >>>>> Brad >>>>> >>>>> >>>>> [1] >>>>> https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94 >>>>> 099d3519eb23bcc16c7cf015 >>>>> [2] http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html >>>>> >>>>> On Jul 28, 2014, at 8:57 PM, Nicholas Tustison >>>>> wrote: >>>>> >>>>>> Hi Brad, >>>>>> >>>>>> I apologize for the delayed response. I?m still catching up on my >>>>>> workload after moving to CA. We might want to talk to Luis as it >>>>>> was my understanding that the ?center? component of the linear >>>>>> transforms might be a carry-over from all the ?Centered? transforms, >>>>>> e.g., >>>>>> >>>>>> >>>>>> http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm >>>>>> l >>>>>> >>>>>> which, if I remember correctly, Luis said were somewhat sub optimally >>>>>> conceived but this was such a long time ago that I might be completely >>>>>> misremembering. However, fixing the center for all transforms within >>>>>> a composite transform is certainly not necessary within the specified >>>>>> framework. Rather, the matrix and offset are updated with the >>>>>> ?Center? >>>>>> being updated implicitly. >>>>>> >>>>>> Nick >>>>>> >>>>>> >>>>>> >>>>>> On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp >>>>>> wrote: >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> There are a lot of transforms involved in the new registration >>>>>>> framework. >>>>>>> >>>>>>> I am trying to figure out what the implications for the fix >>>>>>> parameters of the transform "Center" ( ie center of rotation/scaling >>>>>>> ) are when combined with composite transforms and the >>>>>>> fixed/moving/registration coordinate frames... >>>>>>> >>>>>>> Based on how the transforms are composed it seems necessary to set >>>>>>> the fix "Center" for subsequent transformations. Additionally, I am >>>>>>> unsure how one would "improve" ( poorly defined? ) the center for a >>>>>>> subsequent transform ie Affine after a similarity... >>>>>>> >>>>>>> Are there some documented guidance or figures to help with this >>>>>>> issue? >>>>>>> Do we have a comprehensive diagram of these transforms? >>>>>>> >>>>>>> Thanks, >>>>>>> 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 >>>>> _______________________________________________ >>>>> 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 >> >> >> >> ________________________________ >> 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. >> ________________________________ > > -------------- 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 skalexander at gmail.com Tue Aug 5 09:34:40 2014 From: skalexander at gmail.com (Simon Alexander) Date: Tue, 5 Aug 2014 09:34:40 -0400 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: <85D2068C-A0FC-46EE-8CF8-3F44CDB40E5D@mail.nih.gov> References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> <85D2068C-A0FC-46EE-8CF8-3F44CDB40E5D@mail.nih.gov> Message-ID: Hi all, I have recently been playing around with this issue also. Has your hangout happened already? Is there a summary of conclusions planned or existing? Thanks! On Tue, Aug 5, 2014 at 9:03 AM, Bradley Lowekamp wrote: > Ali, > > Glad to hear the registration iteration graphs where effective. > > Yes, you are right you can initialize the parameters of the second stage > affine registration. Specifically the Center. However, it not readily > apparent ( no example, no filter/initializer ) how that center fixed > parameter should be initialized. And the "CenteredTransformInitializer" is > not the correct way. > > For a Composite transformed defined as ?=T0(T1(x)) where ?:?fixed??moving then > if C such that C??moving is the correct center initialization for T1, > then the correct center initialization for T0 when in the composite > transform is C?=T?10(C). > > Cool pasting from the IPython Notebook with inline latex appears to have > worked :) > > While it is easy to do this with the MomentsCaluclator and manually doing > the transform inverse, I think to make it more readily apparent and easier > to use it should be available as a filter/initializer. > > There are several things that are done manually in the examples that I > would think should be updated to use the latest filters and initializers. > For example The BSplines are manually initialized instead of using the > BSplineTransform Initializer[1]. Additionally, conversion of BSpline to a > deformation field[2], and the the upsampling of the BSpine[3], though that > last one still looks like ITKv3 framework, so maybe it'll be updated to the > adaptors with v4. However I am after simple functions for these common > tasks for SimpleITK, so I have a bit different perspective then one who is > OK with implementing a 50 line solution in C++ and being OK with the > interface. > > We'll discuss these initialization issue further this afternoon. > > Brad > > [1] > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L215-L235 > [2] > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L401-L430 > [3] > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration6.cxx#L273-L330 > > On Aug 4, 2014, at 11:56 PM, Ghayoor, Ali wrote: > > Hello Brad, > > It is an awesome way for demonstration, and thanks for verification of > my example. It seems that this email is sent on Saturday, but unfortunately > I got that this morning! And I should inspect the reason! > Anyway, over the weekend I ran almost the same experiment in ITK and got > close results to you. > > Also, today I tried to make the registration process work when Affine > Transform is used in a multi stage structure, and here is my suggestion: > > I think we do not need to bother ourselves to think about a new > optimizer or a new initializer for the composite transform since we can > initialize the fixed parameters of each transform individually at the > beginning of each stage. > > Remember how we run a BSpline registration stage after some linear > registrations. At the beginning of the BSpline stage, we should instantiate > a BSpline transform object and define its fixed parameters (grid size, > etc). Then, we pass this initialized transform to the registration filter > using ?SetInitialTransform()?, yet we can initialize this stage by passing > a composite transform, resultant from the previous stages, to the > registration filter by ?SetMovingInitialTransform()?. > > The same condition holds for all other transform types with fixed > unoptimizable parameters like the center of rotation in our Affine > transform case. Attachment file includes a multi stage registration example > that I have created for the new software guide. In this example, we use a > simple 2 stages registration process for a multi modal problem that moving > image is misaligned from the fixed image by a translation shift and > rotation. In registration process, a translation transform is followed by > an affine transform. Also, an initial transform is used at the beginning. > > If I do not set the center of the affine transform, the registration > fails as you have shown in your Ipython example. However, if at the > beginning of the second stage, I compute the geometrical center (or center > of the mass) of the fixed image, and pass that to the affine transform > using ?SetCenter()? or ?SetFixedParameters()?, the registration succeeds. > Please take a quick look in the attached file that also includes lots of > explanations. > > Therefore, we can follow the same procedure for all other transform > types that their fixed parameters are important in the optimization, but > those fixed parameters cannot be set explicitly inside a composite > transform. Please let me know with you think about this. > > Thank you, > Ali > > > From: Bradley Lowekamp > Date: Saturday, August 2, 2014 at 6:48 PM > To: Ali Ghayoor > Cc: Hans Johnson , Insight Developers List < > insight-developers at public.kitware.com> > Subject: Re: [ITK-dev] [ITK] Optimizing composite transforms and center > of transform > > Hello Ali, > > I created a notebook to try to demonstrate the problem you are > describing: > > http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb > > If the center of an Affine transformation isn't correctly initialized > then the optimization is not speedy or robust. I think it's best > illustrated with these two graphs: > > > > > Notice that with the Center being the origin, all 1000 iterations are > exhausted, and the metric is slowing decreasing. And this is with the > translation path being around the length to 10. If the spacing was bigger > or more offset from the origin the situation would be worse. > > I don't think this is a bug with the registration framework. I think new > initializers for composite transforms are needed, along with documentation > how the 2 good ways to initialize the registration methods transforms. > > > Brad > > On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali wrote: > > Brad, > > I have exactly the same issue. I wrote a simple registration program that > is run in two stages: > -Translation > -Affine > > My fixed and moving images are in 2D, and the moving image is created from > the fixed image by > rotation of 10 degree and translation of [13,17] in X and Y directions. > > The first stage does a translation registration and the result transform > is added to a composite transform > that is used as the initial moving transform of the second stage. > > After the registration the result transform of the second stage is also > added to the composite transform > to be used by the resampler. > > I have printed the composite transform to the screen: > > 2481: CompositeTransform (0x7fa359a18b00) > 2481: RTTI typeinfo: itk::CompositeTransform > 2481: Reference Count: 2 > 2481: Modified Time: 20949 > 2481: Debug: Off > 2481: Object Name: > 2481: Observers: > 2481: none > 2481: Transforms in queue, from begin to end: > 2481: >>>>>>>>> > 2481: TranslationTransform (0x7fa359a199b0) > 2481: RTTI typeinfo: itk::TranslationTransform > 2481: Reference Count: 7 > 2481: Modified Time: 1648 > 2481: Debug: Off > 2481: Object Name: > 2481: Observers: > 2481: none > 2481: Offset: [12.801, 15.8578] > 2481: >>>>>>>>> > 2481: AffineTransform (0x7fa359d095a0) > 2481: RTTI typeinfo: itk::AffineTransform > 2481: Reference Count: 5 > 2481: Modified Time: 20946 > 2481: Debug: Off > 2481: Object Name: > 2481: Observers: > 2481: none > 2481: Matrix: > 2481: 1.01593 -0.0100051 > 2481: -0.00835669 1.01113 > 2481: Offset: [-0.358829, -0.290093] > 2481: Center: [0, 0] > 2481: Translation: [-0.358829, -0.290093] > 2481: Inverse: > 2481: 0.984397 0.00974056 > 2481: 0.00813575 0.989073 > 2481: Singular: 0 > 2481: End of MultiTransform. > 2481: <<<<<<<<<< > > As it can be seen, the translation transform provides a good > initialization since its offset (Offset: [12.801, 15.8578]) is close to the > shift parameters. > > However, the Affine transform fails to rotate the moving image since its > Matrix is almost identity. > Possible reason can be the improper Center of Affine transform that is > fixed to [0,0], and not at geometrical center or center of mass. > > To make sure that I have not made any crazy mistake in my example, I > simulated my example parameters in ANTs, and ANTs returned > the same results and failed to register the images!! > > ANTs command line <<<<<<<<<<< > > > PROGPATH=/scratch/ANTS/release-new/bin > > fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png > > mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png > > time ${PROGPATH}/antsRegistration -d 2 \ > --float \ > --output [test1, warpedMoving.nii.gz] \ > --transform "Translation[16]" \ > --metric MI[${fi},${mi},1,32,None,1] \ > --convergence [100,1e-2,5] \ > --shrink-factors 3 \ > --smoothing-sigmas 2 \ > --use-histogram-matching 1 \ > \ > --transform "Affine[1]" \ > --metric MI[${fi},${mi},1,32] \ > --convergence [100x100,1e-2,2] \ > --shrink-factors 2x1 \ > --smoothing-sigmas 1x0 \ > --use-histogram-matching 1 > > <<<<<<<<<<<<<<<<<<<<<<<< > > Fixed and moving images can be loaded from the ITK data files. What do you > think about this example? Is it a bug in ITK or just the parameters are not > tuned finely? > > Thanks, > Ali > > ________________________________________ > From: Johnson, Hans J > Sent: Tuesday, July 29, 2014 6:19 PM > To: Ghayoor, Ali > Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of > transform > > Ali, > > You need to follow this discussion. > > Hans > > On 7/29/14, 6:16 PM, "Bradley Lowekamp" wrote: > > Hello, > > Ok, to further explore this problem, and hopeful help other people too: I > created an IPython Notebook viewable here: > http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl > ob/master/Transform%20Composition%20And%20Order.ipynb > > It doesn't come through on the static page, but I added some nifty > interactive slider widgets to change the rotation parameter. Which is > really the point to enable understanding of the parameters for the > transform and how they should be best optimized. The notebook should work > with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one > to try it out :) IPython Notebooks widget are very cool! > > EXPLANATION: > > The the order of the composite transform is that the new transforms are > applied first. > > BUT they map from the virtual domain ( fixed ) to the moving image. > Therefore if your first transform moves the center of mass to the origin > then the second added transform's space will be centered on the mass, > which is good for optimizing rotation and affine parameters. > > QUESTION: > > Therefore I am inclined to conclude that its best practices to map the > fixed and moving image to the virtual domain such that the center of mass > ( or some other "center feature" ) are at the origin. This would then the > scale, rotation and other affine parameters around the center, with out > having to used the "Center" parameter the transforms currently have. > > Is this what others are doing in their registration? For general best > practices should this be recommend? > > @Brian I know I have seen this multi-domain description many time, but I > think I may have just gotten it... Is the well describe in the literature > some place? I think this may be an important part add the software guide. > > Thanks, > Brad > > > > > On Jul 29, 2014, at 5:38 PM, Matt McCormick > wrote: > > Hi Brad, > > Your assessment that the fixed center is important is correct. > > In most cases, a transform with a Center is the first transform in a > Composite transform. There not any issues here. However, if the > transform with a Center is further along the chain, then a > CenteredTransformInitializer that was applied before the registration > is started will not generate the desired result. In this case, we > would have to respond to an Event in the registration process and > estimated the center on the imaged after the other transforms have > been applied. It is more work, but it is a more unusual case. > > HTH, > Matt > > > > On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp > wrote: > > Helloo Nick! > > I am glad you got back to me. > > I suspect that I have spent more time this past week looking at the > ITK affine transforms than anyone else[1] this week. With that here is > my current understanding... > > 1) The CenterTransformInitializers estimates an initial "Center" and > an initial "Translation" parameter from either the geometry or the > first moments. From my problematic experiences, getting the initial > transform which is a "good" guess is been critical for the optimizer to > head to the correct solution. > > 2) The Center parameter of a transform can either be "Fixed" or an > optimizable parameter. The transforms with the "Centered" monkier are > the the ones with the Center parameter optimizable. This issue seems to > be what you were referring to in to message. > > In many ways the point I am trying to make is independent of #2. I > have observed that it's important to have the "Center" of an affine > transform ( or sub parameterization thereof ) at the center of the > object you are trying to register. That is the coordinate space of the > optimizable parameters' point 0 is near the center. This enables > rotation to easily rotate around the center, as well as scaling to > maintain the same relative center when "zooming". This issue is > independent of wether that center point can be optimized. > > For example, consider changing the origin of an image for alignment by > say 500, and compensating with just an initial translation and not > setting the "Center" parameter. If we are trying to optimize rotation > and translation, then the optimization path would be very difficult to > traverse with these inter-dependent parameters to force it to rotate > around the center of the object. This scenario may be more common in > microscopy then medical imaging, due to microscopy frequently having > multiple subjects across large images. I could write up a IPython > Notebook to illustrate the case. > > So that is my understanding of why using a fixed center is important. > I thought this may have been shared knowledge, but perhaps is not or is > incorrect... > > Now I am trying to understand how this interacts with all the > coordinate frames involved with the ITKv4 registration framework, and > the composite transforms. Specifically the composite transform apply > the transforms in "reverse order"[2]. As I understand that that means > that the newest transform get applied first. So that transform > parameters are being optimized in the images space not in the virtual > domains we are working towards. Therefore the center of our transforms > is still important as we composite transforms? > > I hope I explained that clearly, a white board may really be needed.... > > Thanks, > Brad > > > [1] > https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94 > 099d3519eb23bcc16c7cf015 > [2] http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html > > On Jul 28, 2014, at 8:57 PM, Nicholas Tustison > wrote: > > Hi Brad, > > I apologize for the delayed response. I?m still catching up on my > workload after moving to CA. We might want to talk to Luis as it > was my understanding that the ?center? component of the linear > transforms might be a carry-over from all the ?Centered? transforms, > e.g., > > > http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm > l > > which, if I remember correctly, Luis said were somewhat sub optimally > conceived but this was such a long time ago that I might be completely > misremembering. However, fixing the center for all transforms within > a composite transform is certainly not necessary within the specified > framework. Rather, the matrix and offset are updated with the > ?Center? > being updated implicitly. > > Nick > > > > On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp > wrote: > > Hello, > > There are a lot of transforms involved in the new registration > framework. > > I am trying to figure out what the implications for the fix > parameters of the transform "Center" ( ie center of rotation/scaling > ) are when combined with composite transforms and the > fixed/moving/registration coordinate frames... > > Based on how the transforms are composed it seems necessary to set > the fix "Center" for subsequent transformations. Additionally, I am > unsure how one would "improve" ( poorly defined? ) the center for a > subsequent transform ie Affine after a similarity... > > Are there some documented guidance or figures to help with this > issue? > Do we have a comprehensive diagram of these transforms? > > Thanks, > 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 > _______________________________________________ > 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 > > > > > ________________________________ > 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 > > -------------- 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 Aug 5 11:37:46 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 5 Aug 2014 11:37:46 -0400 Subject: [ITK] [ITK-dev] Upgraded factory.kitware Mac compiler In-Reply-To: References: <96995EF3-CB2E-4DBD-9360-A7D3909D25E6@mail.nih.gov> Message-ID: Hi, I have updated the CDash at Home client configuration to use Clang instead of GCC. Clang will hopefully be more reliable with this new version of XCode. Thanks, Matt On Sat, Aug 2, 2014 at 11:25 AM, Bradley Lowekamp wrote: > OK, > > I think the compiler being used on the system is not a winner. > > Something need to be changes on the system to make this more identifiable, > perhaps changing the build name to be llvm-gcc-4.2. As it's not apparent in > the configuration: > > The C compiler identification is GNU 4.2.1 > -- The CXX compiler identification is GNU 4.2.1 > -- Checking whether C compiler has -isysroot > -- Checking whether C compiler has -isysroot - yes > -- Checking whether C compiler supports OSX deployment target flag > -- Checking whether C compiler supports OSX deployment target flag - yes > -- Check for working C compiler: /usr/bin/cc > -- Check for working C compiler: /usr/bin/cc -- works > -- Detecting C compiler ABI info > -- Detecting C compiler ABI info - done > -- Checking whether CXX compiler has -isysroot > -- Checking whether CXX compiler has -isysroot - yes > -- Checking whether CXX compiler supports OSX deployment target flag > -- Checking whether CXX compiler supports OSX deployment target flag - yes > -- Check for working CXX compiler: /usr/bin/c++ > -- Check for working CXX compiler: /usr/bin/c++ -- works > > Digging into the system information test[1] we can find the following: > > sing built-in specs. > Target: i686-apple-darwin10 > Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~3/src/configure > --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 > --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ > --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ > --with-slibdir=/usr/lib --build=i686-apple-darwin10 > --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~3/dst-llvmCore/Developer/usr/local > --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 > --target=i686-apple-darwin10 --with-gxx-include-dir=/usr/include/c++/4.2.1 > Thread model: posix > gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) > /usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/collect2 > -dynamic -arch x86_64 -macosx_version_min 10.6.8 -weak_reference_mismatches > non-weak -o cmTryCompileExec885700192 -lcrt1.10.6.o > -L/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1/x86_64 > -L/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 > -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 > -L/usr/lib/i686-apple-darwin10/4.2.1 > -L/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1 > -L/usr/llvm-gcc-4.2/bin/../lib/gcc > -L/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1 > -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 > -L/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1/../../.. > -L/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/../../.. > -search_paths_first -headerpad_max_install_names -v > CMakeFiles/cmTryCompileExec885700192.dir/CMakeCCompilerABI.c.o -lSystem > -lgcc -lSystem > collect2 version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build > 2336.1.00) (i686 Darwin) > > > But the GCC masquerading version is not too helpful. > > [1] http://open.cdash.org/testDetails.php?test=272099142&build=3433750 > On Aug 2, 2014, at 11:03 AM, Jean-Christophe Fillion-Robin > wrote: > > Hi Brad, > > All details are captured here: > > http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=23528 > > > XCode before: > > * Xcode: 3.2.6 - uildVersion: 10M2518 > * gcc-4.0: i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build > 5494) > * gcc-4.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build > 5666) (dot 3) > * llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple > Inc. build 5658) (LLVM build 2335.6) > * clang: Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM > 2.9svn > > XCode after: > > * Xcode: 4.2 - Build version 4C199 > * gcc-4.0: i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build > 5494) > * gcc-4.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build > 5666) (dot 3) > * llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple > Inc. build 5658) (LLVM build 2336.1.00) > * clang: Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM > 3.0svn) > > > > Hth > Jc > > > On Sat, Aug 2, 2014 at 8:39 AM, Bradley Lowekamp > wrote: >> >> Hello, >> >> Hello there is recently some regular failing tests on the factory.kitware >> Mac robot build: >> http://open.cdash.org/viewTest.php?onlyfailed&buildid=3433716 >> >> What specific compiler, Xcode, and os version is the system now running? >> Was it recently upgraded? >> >> These failures look vaguely familiar to me, not sure quite why. May have >> been at some point in the GNU gcc->llvm-gcc transition when things didn't >> work too good... >> >> Brad >> >> > > > > -- > +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 mercikd at thomas.edu Tue Aug 5 14:34:06 2014 From: mercikd at thomas.edu (Dan Mercik) Date: Tue, 5 Aug 2014 18:34:06 +0000 Subject: [ITK] [ITK-users] MultiThreader? Message-ID: <2ceb68bacb674825b2ca5e795c48800c@T9.tcnet.thomas.edu> Hey, After running my code I caught an exception trying to write deconstructing output. The error occurred during single method execute. I also got an error That the DownSampleImageFilter subclass should override this method. I took a snippet of error output I received which is located attached to this email. Do you have any idea on how to solve this issue? Daniel Mercik Computer Science Major Service Desk Technician Thomas College -------------- next part -------------- A non-text attachment was scrubbed... Name: Multithreader.JPG Type: image/jpeg Size: 56571 bytes Desc: Multithreader.JPG 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 Aug 5 15:04:45 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 5 Aug 2014 15:04:45 -0400 Subject: [ITK] [ITK-users] MultiThreader? In-Reply-To: <2ceb68bacb674825b2ca5e795c48800c@T9.tcnet.thomas.edu> References: <2ceb68bacb674825b2ca5e795c48800c@T9.tcnet.thomas.edu> Message-ID: Hi Dan, Does your DownSampleImageFilter have a ThreadedGenerateData method? If so, its method may need to be updated to use "ThreadIdType" as indicated in the error message. Hope this helps, Matt On Tue, Aug 5, 2014 at 2:34 PM, Dan Mercik wrote: > Hey, > > After running my code I caught an exception trying to write deconstructing output. The error occurred > > during single method execute. I also got an error That the DownSampleImageFilter subclass should override this method. I took a snippet of error output I received which is located attached to this email. Do you have any idea on how to solve this issue? > > Daniel Mercik > > Computer Science Major > > Service Desk Technician > > Thomas College > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 vincent.ngai at gmail.com Tue Aug 5 22:08:13 2014 From: vincent.ngai at gmail.com (vincent ngai) Date: Wed, 6 Aug 2014 10:08:13 +0800 Subject: [ITK] [ITK-users] AffineTransform to 4x4 matrix...again maybe In-Reply-To: <4D7F2AA9-48DF-4C78-BC5E-B8609CBF45E0@mail.nih.gov> References: <4D7F2AA9-48DF-4C78-BC5E-B8609CBF45E0@mail.nih.gov> Message-ID: Hi Bradley, Hmm, GetCenter() negated should be the same as InvCRM. I'll flip the order of the multiplication and see what happens, it could be the C++ operator*() order being different from the way its written. Its so annoying to get the results close but not exact :( Thanks On Tue, Aug 5, 2014 at 9:12 PM, Bradley Lowekamp wrote: > Hello, > > That looks pretty close, but I think CRM[12,13,14] should be -GetCenter(), > with the negative there. Then the TM should be applied last, using your > original notation with the previously mentioned correction I'd expect this > to be correct: > > OGLM = TM * InvCRM * Rot * CRM > > Hope that helps, > Brad > > [1] > http://www.itk.org/Doxygen/html/classitk_1_1MatrixOffsetTransformBase.html > > On Aug 5, 2014, at 5:26 AM, vincent ngai wrote: > > > Hi all, apologies if this has been asked before, I googled the above but > only got 4x4 -> AffineTransform and not the other way around. > > > > I need to get the output of an AffineTransform after registration to my > OpenGL renderer. > > > > From what I understand, the AffineTransform is composed of a Rotation, > Center of Rotation and Translation. > > > > So would the following sequence of 4x4 transformation be correct? > > > > OGLM = InvCRM * Rot * CRM * TM > > > > where > > > > CRM = 4x4 identity matrix with indices [ 12, 13, 14] set to XYZ > value of GetCenter() > > InvCRM = Inverse of CRM > > Rot = 4x4 Identity matrix with 3x3 set to the rotation parameters > > TM = 4x4 identity matrix with indicies[ 12, 13, 14 ] set to the > translation parameters > > > > Essentially: > > > > 1) translate center to origin > > 2) perform rotation > > 3) translate back to where we were > > 4) slap on translation > > > > I am doing the above, but for some reason the translation does not match > up. The rotation seems fine. > > -- > > Regards, > > Vincent > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > -- Regards, Vincent -------------- 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 Aug 6 00:10:56 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 6 Aug 2014 00:10:56 -0400 Subject: [ITK] [ITK-users] AffineTransform to 4x4 matrix...again maybe In-Reply-To: References: <4D7F2AA9-48DF-4C78-BC5E-B8609CBF45E0@mail.nih.gov> Message-ID: Hi Vincent, The values can also be used directly in the matrix as demonstrated here [1]. HTH, Matt [1] https://gist.github.com/thewtex/8712205 On Tue, Aug 5, 2014 at 10:08 PM, vincent ngai wrote: > Hi Bradley, > > Hmm, GetCenter() negated should be the same as InvCRM. I'll flip the order > of the multiplication and see what happens, it could be the C++ operator*() > order being different from the way its written. Its so annoying to get the > results close but not exact :( > > Thanks > > > On Tue, Aug 5, 2014 at 9:12 PM, Bradley Lowekamp > wrote: >> >> Hello, >> >> That looks pretty close, but I think CRM[12,13,14] should be -GetCenter(), >> with the negative there. Then the TM should be applied last, using your >> original notation with the previously mentioned correction I'd expect this >> to be correct: >> >> OGLM = TM * InvCRM * Rot * CRM >> >> Hope that helps, >> Brad >> >> [1] >> http://www.itk.org/Doxygen/html/classitk_1_1MatrixOffsetTransformBase.html >> >> On Aug 5, 2014, at 5:26 AM, vincent ngai wrote: >> >> > Hi all, apologies if this has been asked before, I googled the above but >> > only got 4x4 -> AffineTransform and not the other way around. >> > >> > I need to get the output of an AffineTransform after registration to my >> > OpenGL renderer. >> > >> > From what I understand, the AffineTransform is composed of a Rotation, >> > Center of Rotation and Translation. >> > >> > So would the following sequence of 4x4 transformation be correct? >> > >> > OGLM = InvCRM * Rot * CRM * TM >> > >> > where >> > >> > CRM = 4x4 identity matrix with indices [ 12, 13, 14] set to XYZ >> > value of GetCenter() >> > InvCRM = Inverse of CRM >> > Rot = 4x4 Identity matrix with 3x3 set to the rotation parameters >> > TM = 4x4 identity matrix with indicies[ 12, 13, 14 ] set to the >> > translation parameters >> > >> > Essentially: >> > >> > 1) translate center to origin >> > 2) perform rotation >> > 3) translate back to where we were >> > 4) slap on translation >> > >> > I am doing the above, but for some reason the translation does not match >> > up. The rotation seems fine. >> > -- >> > Regards, >> > Vincent >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > > > > -- > Regards, > Vincent > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 vincent.ngai at gmail.com Wed Aug 6 02:51:28 2014 From: vincent.ngai at gmail.com (vincent ngai) Date: Wed, 6 Aug 2014 14:51:28 +0800 Subject: [ITK] [ITK-users] AffineTransform to 4x4 matrix...again maybe In-Reply-To: References: <4D7F2AA9-48DF-4C78-BC5E-B8609CBF45E0@mail.nih.gov> Message-ID: Thanks Matt for the link. On Wed, Aug 6, 2014 at 12:10 PM, Matt McCormick wrote: > Hi Vincent, > > The values can also be used directly in the matrix as demonstrated here > [1]. > > HTH, > Matt > > [1] https://gist.github.com/thewtex/8712205 > > On Tue, Aug 5, 2014 at 10:08 PM, vincent ngai > wrote: > > Hi Bradley, > > > > Hmm, GetCenter() negated should be the same as InvCRM. I'll flip the > order > > of the multiplication and see what happens, it could be the C++ > operator*() > > order being different from the way its written. Its so annoying to get > the > > results close but not exact :( > > > > Thanks > > > > > > On Tue, Aug 5, 2014 at 9:12 PM, Bradley Lowekamp > > > wrote: > >> > >> Hello, > >> > >> That looks pretty close, but I think CRM[12,13,14] should be > -GetCenter(), > >> with the negative there. Then the TM should be applied last, using your > >> original notation with the previously mentioned correction I'd expect > this > >> to be correct: > >> > >> OGLM = TM * InvCRM * Rot * CRM > >> > >> Hope that helps, > >> Brad > >> > >> [1] > >> > http://www.itk.org/Doxygen/html/classitk_1_1MatrixOffsetTransformBase.html > >> > >> On Aug 5, 2014, at 5:26 AM, vincent ngai > wrote: > >> > >> > Hi all, apologies if this has been asked before, I googled the above > but > >> > only got 4x4 -> AffineTransform and not the other way around. > >> > > >> > I need to get the output of an AffineTransform after registration to > my > >> > OpenGL renderer. > >> > > >> > From what I understand, the AffineTransform is composed of a Rotation, > >> > Center of Rotation and Translation. > >> > > >> > So would the following sequence of 4x4 transformation be correct? > >> > > >> > OGLM = InvCRM * Rot * CRM * TM > >> > > >> > where > >> > > >> > CRM = 4x4 identity matrix with indices [ 12, 13, 14] set to XYZ > >> > value of GetCenter() > >> > InvCRM = Inverse of CRM > >> > Rot = 4x4 Identity matrix with 3x3 set to the rotation > parameters > >> > TM = 4x4 identity matrix with indicies[ 12, 13, 14 ] set to the > >> > translation parameters > >> > > >> > Essentially: > >> > > >> > 1) translate center to origin > >> > 2) perform rotation > >> > 3) translate back to where we were > >> > 4) slap on translation > >> > > >> > I am doing the above, but for some reason the translation does not > match > >> > up. The rotation seems fine. > >> > -- > >> > Regards, > >> > Vincent > >> > _____________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Kitware offers ITK Training Courses, for more information visit: > >> > http://www.kitware.com/products/protraining.php > >> > > >> > Please keep messages on-topic and check the ITK FAQ at: > >> > http://www.itk.org/Wiki/ITK_FAQ > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > http://public.kitware.com/mailman/listinfo/insight-users > >> > > > > > > > > -- > > Regards, > > Vincent > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the 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 > > > -- Regards, Vincent -------------- 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 mallikarjun49 at gmail.com Wed Aug 6 04:42:35 2014 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Wed, 6 Aug 2014 14:12:35 +0530 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: Message-ID: Hi All, Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . //// typedef itk::QuadEdgeMeshTraits qetraits; typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; itk::OnesMatrixCoefficients< MeshType > coeff0; typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); VtkToItkReader->SetFileName("abc.vtk"); VtkToItkReader->Update(); typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > SmoothingQuadEdgeMeshFilter; SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); QEMeshSmoother->SetNumberOfIterations(5 ); QEMeshSmoother->SetRelaxationFactor( 0.5 ); QEMeshSmoother->SetDelaunayConforming(true ); QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); QEMeshSmoother->Update(); //// On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: > Thanks Bill for your answer. > > The reason I am using this pipeline is that SmoothingQEMeshFilter has an > additional parameter for smoothing which is delaunay conforming which helps > to optimize aspect ratio of triangles while smoothing and thus produces > better output.Is there anything similar filter in the vtk pipeline.I used > vtkWindowedSincPolydatafilter which is not giving the output as good as > QEMeshSmoothing filter. > > Thanks for your help > > > On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen > wrote: > >> If you have it in vtk, I suggest using the vtk pipeline to smooth the >> data. >> >> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K >> wrote: >> > Hi Bill, >> > Thanks for the replay. >> > >> > Yes,I built both ITK and my app with Release ,I forgot to mention it in >> the >> > previous post.Actually the data set is the output of >> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I >> saved >> > this marching cube's output as .vtk file and read it using >> > itkVTKPolyDataReader and then I am giving this reader's output to >> > itkSmoothingQuadEdgeMeshFilter's input. >> > >> > I checked the execution time of each step in the pipeline ,after >> > SmothingQEMeshFilter has got it's input ,it is taking time to process >> the >> > data. >> > >> > Thank you >> > >> > >> > >> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen > > >> > wrote: >> >> >> >> First, make sure you are building ITK and your app with Release. A >> >> Debug build can be 10-50 times slower. >> >> >> >> >> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K < >> mallikarjun49 at gmail.com> >> >> wrote: >> >> > Hi All, >> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >> >> > smoothing.This >> >> > filter is giving good results what I expected but taking more >> execution >> >> > time.can any one suggest me to reduce the execution time( multi >> >> > threading >> >> > or any parameters to add/remove )? >> >> > >> >> > Below is the code snippet >> >> > /////// >> >> > typedef itk::QuadEdgeMeshTraits> double,double >> >> > > >> >> > qetraits; >> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > >> MeshType; >> >> > >> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >> >> > >> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >> >> > >> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >> >> > SmoothingQuadEdgeMeshFilter; >> >> > >> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >> >> > SmoothingQuadEdgeMeshFilter::New(); >> >> > >> >> > QEMeshSmoother->SetInput("abc.vtk"); >> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> >> > QEMeshSmoother->SetDelaunayConforming(true ); >> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> >> > QEMeshSmoother->Update(); >> >> > //// >> >> > >> >> > -- >> >> > Regards: >> >> > Mallik >> >> > >> >> > >> >> > _____________________________________ >> >> > Powered by www.kitware.com >> >> > >> >> > Visit other Kitware open-source projects at >> >> > http://www.kitware.com/opensource/opensource.html >> >> > >> >> > Kitware offers ITK Training Courses, for more information visit: >> >> > http://www.kitware.com/products/protraining.php >> >> > >> >> > Please keep messages on-topic and check the 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 >> > >> > >> > >> > >> > -- >> > Regards: >> > Mallik >> > >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> > > > > -- > *Regards:* > Mallik > > -- *Regards:* Mallik -------------- 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 joseignacio.prieto at gmail.com Wed Aug 6 10:11:38 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Wed, 6 Aug 2014 10:11:38 -0400 Subject: [ITK] [ITK-users] Distance map to 2D polygon Message-ID: Hi all, I need to get a distance (preferably signed) map 2D given a polygon input as polygonSpatialObject. I think it can be done by using SpatialObjectToImageFilter and then applying a distance map, but I was thinking that maybe it is not the optimal way to do it. It is more important that the result is fast rather than accurate. Thank you very much for any input. -- Ignacio Prieto Research Assistant Biomedical Imaging Center Pontificia Universidad Catolica de Chile -------------- 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 Aug 6 15:06:56 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 6 Aug 2014 15:06:56 -0400 Subject: [ITK] [ITK-dev] DisplacementFieldTransform::SetIdentity method missing? Message-ID: <2C3F55CD-43B8-4ECF-BA2B-083F54235AA7@mail.nih.gov> Hello, I noticed there was no SetIdentity method for the DisplacementFields. It seems like it should be pretty easy to add, just fill the displace field with zeros, and inverse if set? 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 matt.mccormick at kitware.com Wed Aug 6 15:16:41 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 6 Aug 2014 15:16:41 -0400 Subject: [ITK] [ITK-dev] DisplacementFieldTransform::SetIdentity method missing? In-Reply-To: <2C3F55CD-43B8-4ECF-BA2B-083F54235AA7@mail.nih.gov> References: <2C3F55CD-43B8-4ECF-BA2B-083F54235AA7@mail.nih.gov> Message-ID: Hi Brad, Sounds like a good plan. Thanks, Matt On Wed, Aug 6, 2014 at 3:06 PM, Bradley Lowekamp wrote: > Hello, > > I noticed there was no SetIdentity method for the DisplacementFields. It seems like it should be pretty easy to add, just fill the displace field with zeros, and inverse if set? > > 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 > _______________________________________________ > 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 Aug 6 16:28:46 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 6 Aug 2014 16:28:46 -0400 Subject: [ITK] Insight Journal downtime today Message-ID: Hi, The Insight Journal [1] will be down today for a few hours for maintenance. Down time will start at 6:30 PM Eastern Time. Thanks for your patience. Matt [1] http://insight-journal.org From arnaudgelas at gmail.com Thu Aug 7 04:52:53 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 7 Aug 2014 10:52:53 +0200 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: Message-ID: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> Hi Malik, First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?). Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal). At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages? How large is your input mesh (number of points)? You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement. Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing). HTH Arnaud On Aug 6, 2014, at 10:42 AM, Mallikarjun K wrote: > Hi All, > > Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . > > > //// > > typedef itk::QuadEdgeMeshTraits qetraits; > > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; > > itk::OnesMatrixCoefficients< MeshType > coeff0; > > typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; > //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; > > //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); > VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); > > VtkToItkReader->SetFileName("abc.vtk"); > VtkToItkReader->Update(); > > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > > SmoothingQuadEdgeMeshFilter; > > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); > > > QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); > QEMeshSmoother->SetNumberOfIterations(5 ); > QEMeshSmoother->SetRelaxationFactor( 0.5 ); > QEMeshSmoother->SetDelaunayConforming(true ); > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); > > QEMeshSmoother->Update(); > > //// > > > On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: > Thanks Bill for your answer. > > The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. > > Thanks for your help > > > On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: > If you have it in vtk, I suggest using the vtk pipeline to smooth the data. > > On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K wrote: > > Hi Bill, > > Thanks for the replay. > > > > Yes,I built both ITK and my app with Release ,I forgot to mention it in the > > previous post.Actually the data set is the output of > > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved > > this marching cube's output as .vtk file and read it using > > itkVTKPolyDataReader and then I am giving this reader's output to > > itkSmoothingQuadEdgeMeshFilter's input. > > > > I checked the execution time of each step in the pipeline ,after > > SmothingQEMeshFilter has got it's input ,it is taking time to process the > > data. > > > > Thank you > > > > > > > > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen > > wrote: > >> > >> First, make sure you are building ITK and your app with Release. A > >> Debug build can be 10-50 times slower. > >> > >> > >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K > >> wrote: > >> > Hi All, > >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh > >> > smoothing.This > >> > filter is giving good results what I expected but taking more execution > >> > time.can any one suggest me to reduce the execution time( multi > >> > threading > >> > or any parameters to add/remove )? > >> > > >> > Below is the code snippet > >> > /////// > >> > typedef itk::QuadEdgeMeshTraits >> > > > >> > qetraits; > >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; > >> > > >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; > >> > > >> > itk::OnesMatrixCoefficients< MeshType > coeff0; > >> > > >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > > >> > SmoothingQuadEdgeMeshFilter; > >> > > >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = > >> > SmoothingQuadEdgeMeshFilter::New(); > >> > > >> > QEMeshSmoother->SetInput("abc.vtk"); > >> > QEMeshSmoother->SetNumberOfIterations(5 ); > >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); > >> > QEMeshSmoother->SetDelaunayConforming(true ); > >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); > >> > QEMeshSmoother->Update(); > >> > //// > >> > > >> > -- > >> > Regards: > >> > Mallik > >> > > >> > > >> > _____________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Kitware offers ITK Training Courses, for more information visit: > >> > http://www.kitware.com/products/protraining.php > >> > > >> > Please keep messages on-topic and check the 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 > > > > > > > > > > -- > > Regards: > > Mallik > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > > > > -- > Regards: > Mallik > > > > > -- > Regards: > Mallik > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 mallikarjun49 at gmail.com Thu Aug 7 06:09:50 2014 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Thu, 7 Aug 2014 15:39:50 +0530 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> Message-ID: Hi Arnaud, Thanks for your reply and valuable suggestions. Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF. Thank you On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas wrote: > Hi Malik, > > First of all, I would recommend using MeshFileReader instead of > VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near > future?). > > Regarding now the smoothing procedure in itself. This class definitively > misses some documentation and I will be adding some in the next few days > (mainly extracted from the corresponding insight journal). > > At the end of each iteration, when the delaunay conforming flag is turned > ON, the conformation is performed. So depending on the mesh configuration, > mesh size and number of iterations, it can take ages? > How large is your input mesh (number of points)? > > You can also check results, by running first a smoothing without delaunay > conforming, then apply a delaunay conforming on the output. Results won't > be as nice, but you should get significant speed improvement. > Another possibility is to first do a clean poly data in vtk, with a small > threshold to remove small edges in the input meshes (which results in lots > of edge flipping after smoothing). > > HTH > Arnaud > > > On Aug 6, 2014, at 10:42 AM, Mallikarjun K > wrote: > > Hi All, > > Can anyone suggest me if anything wrong I am doing in this below pipeline > ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk > QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in > release mode) at itkVtkPolydataReader . > > > //// > > typedef itk::QuadEdgeMeshTraits > qetraits; > > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; > > itk::OnesMatrixCoefficients< MeshType > coeff0; > > typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; > //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; > > //VTKPolyDataWriterType::Pointer > ItkToVtkWriter=VTKPolyDataWriterType::New(); > VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); > > VtkToItkReader->SetFileName("abc.vtk"); > VtkToItkReader->Update(); > > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > > SmoothingQuadEdgeMeshFilter; > > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = > SmoothingQuadEdgeMeshFilter::New(); > > QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); > QEMeshSmoother->SetNumberOfIterations(5 ); > QEMeshSmoother->SetRelaxationFactor( 0.5 ); > QEMeshSmoother->SetDelaunayConforming(true ); > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); > QEMeshSmoother->Update(); > > //// > > > On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K > wrote: > >> Thanks Bill for your answer. >> >> The reason I am using this pipeline is that SmoothingQEMeshFilter has an >> additional parameter for smoothing which is delaunay conforming which helps >> to optimize aspect ratio of triangles while smoothing and thus produces >> better output.Is there anything similar filter in the vtk pipeline.I used >> vtkWindowedSincPolydatafilter which is not giving the output as good as >> QEMeshSmoothing filter. >> >> Thanks for your help >> >> >> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen >> wrote: >> >>> If you have it in vtk, I suggest using the vtk pipeline to smooth the >>> data. >>> >>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K >>> wrote: >>> > Hi Bill, >>> > Thanks for the replay. >>> > >>> > Yes,I built both ITK and my app with Release ,I forgot to mention it >>> in the >>> > previous post.Actually the data set is the output of >>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I >>> saved >>> > this marching cube's output as .vtk file and read it using >>> > itkVTKPolyDataReader and then I am giving this reader's output to >>> > itkSmoothingQuadEdgeMeshFilter's input. >>> > >>> > I checked the execution time of each step in the pipeline ,after >>> > SmothingQEMeshFilter has got it's input ,it is taking time to process >>> the >>> > data. >>> > >>> > Thank you >>> > >>> > >>> > >>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen < >>> bill.lorensen at gmail.com> >>> > wrote: >>> >> >>> >> First, make sure you are building ITK and your app with Release. A >>> >> Debug build can be 10-50 times slower. >>> >> >>> >> >>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K < >>> mallikarjun49 at gmail.com> >>> >> wrote: >>> >> > Hi All, >>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>> >> > smoothing.This >>> >> > filter is giving good results what I expected but taking more >>> execution >>> >> > time.can any one suggest me to reduce the execution time( multi >>> >> > threading >>> >> > or any parameters to add/remove )? >>> >> > >>> >> > Below is the code snippet >>> >> > /////// >>> >> > typedef itk::QuadEdgeMeshTraits>> double,double >>> >> > > >>> >> > qetraits; >>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > >>> MeshType; >>> >> > >>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>> >> > >>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>> >> > >>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>> >> > SmoothingQuadEdgeMeshFilter; >>> >> > >>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>> >> > SmoothingQuadEdgeMeshFilter::New(); >>> >> > >>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>> >> > QEMeshSmoother->Update(); >>> >> > //// >>> >> > >>> >> > -- >>> >> > Regards: >>> >> > Mallik >>> >> > >>> >> > >>> >> > _____________________________________ >>> >> > Powered by www.kitware.com >>> >> > >>> >> > Visit other Kitware open-source projects at >>> >> > http://www.kitware.com/opensource/opensource.html >>> >> > >>> >> > Kitware offers ITK Training Courses, for more information visit: >>> >> > http://www.kitware.com/products/protraining.php >>> >> > >>> >> > Please keep messages on-topic and check the 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 >>> > >>> > >>> > >>> > >>> > -- >>> > Regards: >>> > Mallik >>> > >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >>> >> >> >> >> -- >> *Regards:* >> Mallik >> >> > > > -- > *Regards:* > Mallik > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > -- *Regards:* Mallik -------------- 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 Thu Aug 7 09:21:56 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 7 Aug 2014 09:21:56 -0400 Subject: [ITK] [ITK-dev] A couple minor FFT valgrind defects. Message-ID: <1A49D266-39FE-40F0-B550-6DDFB175E262@mail.nih.gov> Matt, After addressing the large number of ThreadPool defects, there appears to a a minor uninitialized condition with these new complex fft filters: http://open.cdash.org/viewDynamicAnalysis.php?buildid=3440158 Let me know if you have the time. Thanks, 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 mallikarjun49 at gmail.com Thu Aug 7 09:23:15 2014 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Thu, 7 Aug 2014 18:53:15 +0530 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> Message-ID: Hi Arnaud, Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ? ///// #include #include #include #include #include #include #include #include #include #include #include "itkMesh.h" #include "itkQuadEdgeMesh.h" #include "itkQuadEdgeMeshTraits.h" #include "itkSmoothingQuadEdgeMeshFilter.h" #include "vtkSTLWriter.h" #include int main() { std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K typedef itk::QuadEdgeMeshTraits qetraits; typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; itk::OnesMatrixCoefficients< MeshType > coeff0; typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; vtkSmartPointer polyDatawriter=vtkSmartPointer::New(); vtkSmartPointer polyDatareader=vtkSmartPointer::New(); SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); /* polyDatareader->SetFileName(Inputfilename.c_str() ); polyDatareader->ReleaseDataFlagOn(); polyDatareader->Update();*/ /*vtkSmartPointer triangleFilter = vtkSmartPointer::New(); triangleFilter->SetInput(polyDatareader->GetOutput()); triangleFilter->Update();*/ // /* vtkSmartPointer clean = vtkSmartPointer::New(); #if (VTK_MAJOR_VERSION < 6) clean->SetInput(triangleFilter->GetOutput() ); #else clean->SetInputData(triangleFilter->GetOutput() ); #endif clean->ConvertPolysToLinesOff(); clean->ConvertLinesToPointsOff(); clean->Update(); std::string Inputfilename2="D:/cleaned.vtk";*/ //// /*polyDatawriter->SetInput(clean->GetOutput()); polyDatawriter->SetFileName(Inputfilename2.c_str()); polyDatawriter->ReleaseDataFlagOn(); polyDatawriter->Write(); */ typedef itk::MeshFileReader MeshReaderType; MeshReaderType::Pointer Meshreader = MeshReaderType::New(); Meshreader->SetFileName(Inputfilename.c_str( )); Meshreader->Update(); /*MeshType::Pointer mesh = Meshreader->GetOutput(); mesh->DisconnectPipeline();*/ QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); QEMeshSmoother->SetNumberOfIterations(1 ); QEMeshSmoother->SetRelaxationFactor( 0.5 ); QEMeshSmoother->SetDelaunayConforming(true); QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); QEMeshSmoother->ReleaseDataFlagOn(); QEMeshSmoother->Update(); std::string Outputfilename="D:/tempOut.vtk"; typedef itk::MeshFileWriter MeshWriterType; MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); Meshwriter->SetFileName(Outputfilename.c_str( )); Meshwriter->SetInput(QEMeshSmoother->GetOutput()); Meshwriter->Update(); polyDatareader->SetFileName(Outputfilename.c_str() ); polyDatareader->ReleaseDataFlagOn(); polyDatareader->Update(); vtkSmartPointer stlWriter=vtkSmartPointer::New(); stlWriter->SetInput( polyDatareader->GetOutput()); stlWriter->SetFileName("D:/QEoutput.stl"); stlWriter->SetFileTypeToASCII(); stlWriter->Write(); //Here it stops and taking long time return 0; } //// On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K wrote: > Hi Arnaud, > > Thanks for your reply and valuable suggestions. > > Number of points in my input mesh are 78928.In my pipeline I am already > cleaning the polydata using vtkCleanPolyData filter.I will check the speed > improvement and results with delaunay conforming turned OFF. > > Thank you > > > On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas > wrote: > >> Hi Malik, >> >> First of all, I would recommend using MeshFileReader instead of >> VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near >> future?). >> >> Regarding now the smoothing procedure in itself. This class definitively >> misses some documentation and I will be adding some in the next few days >> (mainly extracted from the corresponding insight journal). >> >> At the end of each iteration, when the delaunay conforming flag is turned >> ON, the conformation is performed. So depending on the mesh configuration, >> mesh size and number of iterations, it can take ages? >> How large is your input mesh (number of points)? >> >> You can also check results, by running first a smoothing without delaunay >> conforming, then apply a delaunay conforming on the output. Results won't >> be as nice, but you should get significant speed improvement. >> Another possibility is to first do a clean poly data in vtk, with a small >> threshold to remove small edges in the input meshes (which results in lots >> of edge flipping after smoothing). >> >> HTH >> Arnaud >> >> >> On Aug 6, 2014, at 10:42 AM, Mallikarjun K >> wrote: >> >> Hi All, >> >> Can anyone suggest me if anything wrong I am doing in this below pipeline >> ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk >> QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in >> release mode) at itkVtkPolydataReader . >> >> >> //// >> >> typedef itk::QuadEdgeMeshTraits >> qetraits; >> >> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >> >> itk::OnesMatrixCoefficients< MeshType > coeff0; >> >> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >> >> //VTKPolyDataWriterType::Pointer >> ItkToVtkWriter=VTKPolyDataWriterType::New(); >> VTKPolyDataReaderType::Pointer >> VtkToItkReader=VTKPolyDataReaderType::New(); >> >> VtkToItkReader->SetFileName("abc.vtk"); >> VtkToItkReader->Update(); >> >> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >> SmoothingQuadEdgeMeshFilter; >> >> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >> SmoothingQuadEdgeMeshFilter::New(); >> >> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >> QEMeshSmoother->SetNumberOfIterations(5 ); >> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> QEMeshSmoother->SetDelaunayConforming(true ); >> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> QEMeshSmoother->Update(); >> >> //// >> >> >> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K >> wrote: >> >>> Thanks Bill for your answer. >>> >>> The reason I am using this pipeline is that SmoothingQEMeshFilter has an >>> additional parameter for smoothing which is delaunay conforming which helps >>> to optimize aspect ratio of triangles while smoothing and thus produces >>> better output.Is there anything similar filter in the vtk pipeline.I used >>> vtkWindowedSincPolydatafilter which is not giving the output as good as >>> QEMeshSmoothing filter. >>> >>> Thanks for your help >>> >>> >>> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen >>> wrote: >>> >>>> If you have it in vtk, I suggest using the vtk pipeline to smooth the >>>> data. >>>> >>>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K >>>> wrote: >>>> > Hi Bill, >>>> > Thanks for the replay. >>>> > >>>> > Yes,I built both ITK and my app with Release ,I forgot to mention it >>>> in the >>>> > previous post.Actually the data set is the output of >>>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I >>>> saved >>>> > this marching cube's output as .vtk file and read it using >>>> > itkVTKPolyDataReader and then I am giving this reader's output to >>>> > itkSmoothingQuadEdgeMeshFilter's input. >>>> > >>>> > I checked the execution time of each step in the pipeline ,after >>>> > SmothingQEMeshFilter has got it's input ,it is taking time to process >>>> the >>>> > data. >>>> > >>>> > Thank you >>>> > >>>> > >>>> > >>>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen < >>>> bill.lorensen at gmail.com> >>>> > wrote: >>>> >> >>>> >> First, make sure you are building ITK and your app with Release. A >>>> >> Debug build can be 10-50 times slower. >>>> >> >>>> >> >>>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K < >>>> mallikarjun49 at gmail.com> >>>> >> wrote: >>>> >> > Hi All, >>>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>>> >> > smoothing.This >>>> >> > filter is giving good results what I expected but taking more >>>> execution >>>> >> > time.can any one suggest me to reduce the execution time( multi >>>> >> > threading >>>> >> > or any parameters to add/remove )? >>>> >> > >>>> >> > Below is the code snippet >>>> >> > /////// >>>> >> > typedef itk::QuadEdgeMeshTraits>>> double,double >>>> >> > > >>>> >> > qetraits; >>>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > >>>> MeshType; >>>> >> > >>>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>>> >> > >>>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>>> >> > >>>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>> >> > SmoothingQuadEdgeMeshFilter; >>>> >> > >>>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>>> >> > SmoothingQuadEdgeMeshFilter::New(); >>>> >> > >>>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>> >> > QEMeshSmoother->Update(); >>>> >> > //// >>>> >> > >>>> >> > -- >>>> >> > Regards: >>>> >> > Mallik >>>> >> > >>>> >> > >>>> >> > _____________________________________ >>>> >> > Powered by www.kitware.com >>>> >> > >>>> >> > Visit other Kitware open-source projects at >>>> >> > http://www.kitware.com/opensource/opensource.html >>>> >> > >>>> >> > Kitware offers ITK Training Courses, for more information visit: >>>> >> > http://www.kitware.com/products/protraining.php >>>> >> > >>>> >> > Please keep messages on-topic and check the 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 >>>> > >>>> > >>>> > >>>> > >>>> > -- >>>> > Regards: >>>> > Mallik >>>> > >>>> >>>> >>>> >>>> -- >>>> Unpaid intern in BillsBasement at noware dot com >>>> >>> >>> >>> >>> -- >>> *Regards:* >>> Mallik >>> >>> >> >> >> -- >> *Regards:* >> Mallik >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> > > > -- > *Regards:* > Mallik > > -- *Regards:* Mallik -------------- 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 arnaudgelas at gmail.com Thu Aug 7 09:31:03 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 7 Aug 2014 15:31:03 +0200 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> Message-ID: <305E1509-8EF7-4770-9236-3D639B9BF155@gmail.com> Shouldn't it be D://temp.vtk ? Isn't it missing one '/' ? Can you send this vtk file? On Aug 7, 2014, at 3:23 PM, Mallikarjun K wrote: > Hi Arnaud, > > Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ? > > ///// > #include > #include > > #include > #include > #include > #include > #include > #include > #include > #include > #include "itkMesh.h" > #include "itkQuadEdgeMesh.h" > #include "itkQuadEdgeMeshTraits.h" > #include "itkSmoothingQuadEdgeMeshFilter.h" > #include "vtkSTLWriter.h" > #include > > int main() > { > std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K > > typedef itk::QuadEdgeMeshTraits qetraits; > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; > > itk::OnesMatrixCoefficients< MeshType > coeff0; > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; > > vtkSmartPointer polyDatawriter=vtkSmartPointer::New(); > vtkSmartPointer polyDatareader=vtkSmartPointer::New(); > > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); > > /* polyDatareader->SetFileName(Inputfilename.c_str() ); > polyDatareader->ReleaseDataFlagOn(); > polyDatareader->Update();*/ > > /*vtkSmartPointer triangleFilter = > vtkSmartPointer::New(); > triangleFilter->SetInput(polyDatareader->GetOutput()); > triangleFilter->Update();*/ > > // > /* vtkSmartPointer clean = vtkSmartPointer::New(); > #if (VTK_MAJOR_VERSION < 6) > clean->SetInput(triangleFilter->GetOutput() ); > #else > clean->SetInputData(triangleFilter->GetOutput() ); > #endif > > clean->ConvertPolysToLinesOff(); > clean->ConvertLinesToPointsOff(); > clean->Update(); > > std::string Inputfilename2="D:/cleaned.vtk";*/ > > //// > /*polyDatawriter->SetInput(clean->GetOutput()); > polyDatawriter->SetFileName(Inputfilename2.c_str()); > polyDatawriter->ReleaseDataFlagOn(); > polyDatawriter->Write(); */ > > typedef itk::MeshFileReader MeshReaderType; > MeshReaderType::Pointer Meshreader = MeshReaderType::New(); > Meshreader->SetFileName(Inputfilename.c_str( )); > Meshreader->Update(); > > /*MeshType::Pointer mesh = Meshreader->GetOutput(); > mesh->DisconnectPipeline();*/ > > > QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); > QEMeshSmoother->SetNumberOfIterations(1 ); > QEMeshSmoother->SetRelaxationFactor( 0.5 ); > QEMeshSmoother->SetDelaunayConforming(true); > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); > > QEMeshSmoother->ReleaseDataFlagOn(); > > QEMeshSmoother->Update(); > > std::string Outputfilename="D:/tempOut.vtk"; > > typedef itk::MeshFileWriter MeshWriterType; > MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); > Meshwriter->SetFileName(Outputfilename.c_str( )); > Meshwriter->SetInput(QEMeshSmoother->GetOutput()); > Meshwriter->Update(); > > polyDatareader->SetFileName(Outputfilename.c_str() ); > polyDatareader->ReleaseDataFlagOn(); > polyDatareader->Update(); > > vtkSmartPointer stlWriter=vtkSmartPointer::New(); > > stlWriter->SetInput( polyDatareader->GetOutput()); > stlWriter->SetFileName("D:/QEoutput.stl"); > stlWriter->SetFileTypeToASCII(); > stlWriter->Write(); > > //Here it stops and taking long time > > return 0; > > > } > //// > > > > On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K wrote: > Hi Arnaud, > > Thanks for your reply and valuable suggestions. > > Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF. > > Thank you > > > On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas wrote: > Hi Malik, > > First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?). > > Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal). > > At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages? > How large is your input mesh (number of points)? > > You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement. > Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing). > > HTH > Arnaud > > > On Aug 6, 2014, at 10:42 AM, Mallikarjun K wrote: > >> Hi All, >> >> Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . >> >> >> //// >> >> typedef itk::QuadEdgeMeshTraits qetraits; >> >> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >> >> itk::OnesMatrixCoefficients< MeshType > coeff0; >> >> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >> >> //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); >> VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); >> >> VtkToItkReader->SetFileName("abc.vtk"); >> VtkToItkReader->Update(); >> >> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >> SmoothingQuadEdgeMeshFilter; >> >> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >> >> >> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >> QEMeshSmoother->SetNumberOfIterations(5 ); >> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> QEMeshSmoother->SetDelaunayConforming(true ); >> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> >> QEMeshSmoother->Update(); >> >> //// >> >> >> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: >> Thanks Bill for your answer. >> >> The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. >> >> Thanks for your help >> >> >> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: >> If you have it in vtk, I suggest using the vtk pipeline to smooth the data. >> >> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K wrote: >> > Hi Bill, >> > Thanks for the replay. >> > >> > Yes,I built both ITK and my app with Release ,I forgot to mention it in the >> > previous post.Actually the data set is the output of >> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved >> > this marching cube's output as .vtk file and read it using >> > itkVTKPolyDataReader and then I am giving this reader's output to >> > itkSmoothingQuadEdgeMeshFilter's input. >> > >> > I checked the execution time of each step in the pipeline ,after >> > SmothingQEMeshFilter has got it's input ,it is taking time to process the >> > data. >> > >> > Thank you >> > >> > >> > >> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen >> > wrote: >> >> >> >> First, make sure you are building ITK and your app with Release. A >> >> Debug build can be 10-50 times slower. >> >> >> >> >> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K >> >> wrote: >> >> > Hi All, >> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >> >> > smoothing.This >> >> > filter is giving good results what I expected but taking more execution >> >> > time.can any one suggest me to reduce the execution time( multi >> >> > threading >> >> > or any parameters to add/remove )? >> >> > >> >> > Below is the code snippet >> >> > /////// >> >> > typedef itk::QuadEdgeMeshTraits> >> > > >> >> > qetraits; >> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >> >> > >> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >> >> > >> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >> >> > >> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >> >> > SmoothingQuadEdgeMeshFilter; >> >> > >> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >> >> > SmoothingQuadEdgeMeshFilter::New(); >> >> > >> >> > QEMeshSmoother->SetInput("abc.vtk"); >> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> >> > QEMeshSmoother->SetDelaunayConforming(true ); >> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> >> > QEMeshSmoother->Update(); >> >> > //// >> >> > >> >> > -- >> >> > Regards: >> >> > Mallik >> >> > >> >> > >> >> > _____________________________________ >> >> > Powered by www.kitware.com >> >> > >> >> > Visit other Kitware open-source projects at >> >> > http://www.kitware.com/opensource/opensource.html >> >> > >> >> > Kitware offers ITK Training Courses, for more information visit: >> >> > http://www.kitware.com/products/protraining.php >> >> > >> >> > Please keep messages on-topic and check the 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 >> > >> > >> > >> > >> > -- >> > Regards: >> > Mallik >> > >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> >> >> >> -- >> Regards: >> Mallik >> >> >> >> >> -- >> Regards: >> Mallik >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > > > > -- > Regards: > Mallik > > > > > -- > Regards: > Mallik > -------------- 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 Aug 7 09:33:19 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 7 Aug 2014 09:33:19 -0400 Subject: [ITK] [ITK-dev] A couple minor FFT valgrind defects. In-Reply-To: <1A49D266-39FE-40F0-B550-6DDFB175E262@mail.nih.gov> References: <1A49D266-39FE-40F0-B550-6DDFB175E262@mail.nih.gov> Message-ID: Hi Brad, Happy to see we are getting back to zero :-). Yes, please review this patch: http://review.source.kitware.com/#/c/16542/ Thanks, Matt On Thu, Aug 7, 2014 at 9:21 AM, Bradley Lowekamp wrote: > Matt, > > After addressing the large number of ThreadPool defects, there appears to a a minor uninitialized condition with these new complex fft filters: > > http://open.cdash.org/viewDynamicAnalysis.php?buildid=3440158 > > Let me know if you have the time. > > Thanks, > 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 arnaudgelas at gmail.com Thu Aug 7 10:40:20 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 7 Aug 2014 16:40:20 +0200 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> <305E1509-8EF7-4770-9236-3D639B9BF155@gmail.com> Message-ID: It takes 29s on my machine in debug to run 5 iterations with Delaunay conforming set to true https://gist.github.com/arnaudgelas/0f20ebdaf53956f79997 On Aug 7, 2014, at 3:45 PM, Mallikarjun K wrote: > File path is correct.if it is '\'(backward slash) we have to add "D:\\" .since I used '/' it's not required to add "//". > > please find the attached .vtk file > > Thanks > > > On Thu, Aug 7, 2014 at 7:01 PM, Arnaud Gelas wrote: > Shouldn't it be D://temp.vtk ? Isn't it missing one '/' ? > > Can you send this vtk file? > > > On Aug 7, 2014, at 3:23 PM, Mallikarjun K wrote: > >> Hi Arnaud, >> >> Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ? >> >> ///// >> #include >> #include >> >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include "itkMesh.h" >> #include "itkQuadEdgeMesh.h" >> #include "itkQuadEdgeMeshTraits.h" >> #include "itkSmoothingQuadEdgeMeshFilter.h" >> #include "vtkSTLWriter.h" >> #include >> >> int main() >> { >> std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K >> >> typedef itk::QuadEdgeMeshTraits qetraits; >> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >> >> itk::OnesMatrixCoefficients< MeshType > coeff0; >> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; >> >> vtkSmartPointer polyDatawriter=vtkSmartPointer::New(); >> vtkSmartPointer polyDatareader=vtkSmartPointer::New(); >> >> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >> >> /* polyDatareader->SetFileName(Inputfilename.c_str() ); >> polyDatareader->ReleaseDataFlagOn(); >> polyDatareader->Update();*/ >> >> /*vtkSmartPointer triangleFilter = >> vtkSmartPointer::New(); >> triangleFilter->SetInput(polyDatareader->GetOutput()); >> triangleFilter->Update();*/ >> >> // >> /* vtkSmartPointer clean = vtkSmartPointer::New(); >> #if (VTK_MAJOR_VERSION < 6) >> clean->SetInput(triangleFilter->GetOutput() ); >> #else >> clean->SetInputData(triangleFilter->GetOutput() ); >> #endif >> >> clean->ConvertPolysToLinesOff(); >> clean->ConvertLinesToPointsOff(); >> clean->Update(); >> >> std::string Inputfilename2="D:/cleaned.vtk";*/ >> >> //// >> /*polyDatawriter->SetInput(clean->GetOutput()); >> polyDatawriter->SetFileName(Inputfilename2.c_str()); >> polyDatawriter->ReleaseDataFlagOn(); >> polyDatawriter->Write(); */ >> >> typedef itk::MeshFileReader MeshReaderType; >> MeshReaderType::Pointer Meshreader = MeshReaderType::New(); >> Meshreader->SetFileName(Inputfilename.c_str( )); >> Meshreader->Update(); >> >> /*MeshType::Pointer mesh = Meshreader->GetOutput(); >> mesh->DisconnectPipeline();*/ >> >> >> QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); >> QEMeshSmoother->SetNumberOfIterations(1 ); >> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> QEMeshSmoother->SetDelaunayConforming(true); >> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> >> QEMeshSmoother->ReleaseDataFlagOn(); >> >> QEMeshSmoother->Update(); >> >> std::string Outputfilename="D:/tempOut.vtk"; >> >> typedef itk::MeshFileWriter MeshWriterType; >> MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); >> Meshwriter->SetFileName(Outputfilename.c_str( )); >> Meshwriter->SetInput(QEMeshSmoother->GetOutput()); >> Meshwriter->Update(); >> >> polyDatareader->SetFileName(Outputfilename.c_str() ); >> polyDatareader->ReleaseDataFlagOn(); >> polyDatareader->Update(); >> >> vtkSmartPointer stlWriter=vtkSmartPointer::New(); >> >> stlWriter->SetInput( polyDatareader->GetOutput()); >> stlWriter->SetFileName("D:/QEoutput.stl"); >> stlWriter->SetFileTypeToASCII(); >> stlWriter->Write(); >> >> //Here it stops and taking long time >> >> return 0; >> >> >> } >> //// >> >> >> >> On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K wrote: >> Hi Arnaud, >> >> Thanks for your reply and valuable suggestions. >> >> Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF. >> >> Thank you >> >> >> On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas wrote: >> Hi Malik, >> >> First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?). >> >> Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal). >> >> At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages? >> How large is your input mesh (number of points)? >> >> You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement. >> Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing). >> >> HTH >> Arnaud >> >> >> On Aug 6, 2014, at 10:42 AM, Mallikarjun K wrote: >> >>> Hi All, >>> >>> Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . >>> >>> >>> //// >>> >>> typedef itk::QuadEdgeMeshTraits qetraits; >>> >>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>> >>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>> >>> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >>> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >>> >>> //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); >>> VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); >>> >>> VtkToItkReader->SetFileName("abc.vtk"); >>> VtkToItkReader->Update(); >>> >>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>> SmoothingQuadEdgeMeshFilter; >>> >>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>> >>> >>> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >>> QEMeshSmoother->SetNumberOfIterations(5 ); >>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>> QEMeshSmoother->SetDelaunayConforming(true ); >>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>> >>> QEMeshSmoother->Update(); >>> >>> //// >>> >>> >>> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: >>> Thanks Bill for your answer. >>> >>> The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. >>> >>> Thanks for your help >>> >>> >>> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: >>> If you have it in vtk, I suggest using the vtk pipeline to smooth the data. >>> >>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K wrote: >>> > Hi Bill, >>> > Thanks for the replay. >>> > >>> > Yes,I built both ITK and my app with Release ,I forgot to mention it in the >>> > previous post.Actually the data set is the output of >>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved >>> > this marching cube's output as .vtk file and read it using >>> > itkVTKPolyDataReader and then I am giving this reader's output to >>> > itkSmoothingQuadEdgeMeshFilter's input. >>> > >>> > I checked the execution time of each step in the pipeline ,after >>> > SmothingQEMeshFilter has got it's input ,it is taking time to process the >>> > data. >>> > >>> > Thank you >>> > >>> > >>> > >>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen >>> > wrote: >>> >> >>> >> First, make sure you are building ITK and your app with Release. A >>> >> Debug build can be 10-50 times slower. >>> >> >>> >> >>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K >>> >> wrote: >>> >> > Hi All, >>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>> >> > smoothing.This >>> >> > filter is giving good results what I expected but taking more execution >>> >> > time.can any one suggest me to reduce the execution time( multi >>> >> > threading >>> >> > or any parameters to add/remove )? >>> >> > >>> >> > Below is the code snippet >>> >> > /////// >>> >> > typedef itk::QuadEdgeMeshTraits>> >> > > >>> >> > qetraits; >>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>> >> > >>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>> >> > >>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>> >> > >>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>> >> > SmoothingQuadEdgeMeshFilter; >>> >> > >>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>> >> > SmoothingQuadEdgeMeshFilter::New(); >>> >> > >>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>> >> > QEMeshSmoother->Update(); >>> >> > //// >>> >> > >>> >> > -- >>> >> > Regards: >>> >> > Mallik >>> >> > >>> >> > >>> >> > _____________________________________ >>> >> > Powered by www.kitware.com >>> >> > >>> >> > Visit other Kitware open-source projects at >>> >> > http://www.kitware.com/opensource/opensource.html >>> >> > >>> >> > Kitware offers ITK Training Courses, for more information visit: >>> >> > http://www.kitware.com/products/protraining.php >>> >> > >>> >> > Please keep messages on-topic and check the 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 >>> > >>> > >>> > >>> > >>> > -- >>> > Regards: >>> > Mallik >>> > >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >>> >>> >>> >>> -- >>> Regards: >>> Mallik >>> >>> >>> >>> >>> -- >>> Regards: >>> Mallik >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> >> >> -- >> Regards: >> Mallik >> >> >> >> >> -- >> Regards: >> Mallik >> > > > > > -- > Regards: > Mallik > > -------------- 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 mallikarjun49 at gmail.com Thu Aug 7 11:20:44 2014 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Thu, 7 Aug 2014 20:50:44 +0530 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> <305E1509-8EF7-4770-9236-3D639B9BF155@gmail.com> Message-ID: Hi Arnaud, Thanks,Can you please tell me your machine confuguration. I am running 4GB RAM,i3 on windows7. I have downloaded your project and tried to execute it and it is still the same problem Which I was facing earlier.Any suggestions ..... thank you On Thu, Aug 7, 2014 at 8:10 PM, Arnaud Gelas wrote: > It takes 29s on my machine in debug to run 5 iterations with Delaunay > conforming set to true > > https://gist.github.com/arnaudgelas/0f20ebdaf53956f79997 > > > On Aug 7, 2014, at 3:45 PM, Mallikarjun K wrote: > > File path is correct.if it is '\'(backward slash) we have to add "D:\\" > .since I used '/' it's not required to add "//". > > please find the attached .vtk file > > Thanks > > > On Thu, Aug 7, 2014 at 7:01 PM, Arnaud Gelas > wrote: > >> Shouldn't it be D://temp.vtk ? Isn't it missing one '/' ? >> >> Can you send this vtk file? >> >> >> On Aug 7, 2014, at 3:23 PM, Mallikarjun K >> wrote: >> >> Hi Arnaud, >> >> Kindly have a look in the below code ,the problem is that even after >> QEMeshFilter output is saved as .stl file ,the program is still running for >> long time.I have observed in my tests that MeshFileReader seems to be the >> culprit. Any suggestions ? >> >> ///// >> #include >> #include >> >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include "itkMesh.h" >> #include "itkQuadEdgeMesh.h" >> #include "itkQuadEdgeMeshTraits.h" >> #include "itkSmoothingQuadEdgeMeshFilter.h" >> #include "vtkSTLWriter.h" >> #include >> >> int main() >> { >> std::string Inputfilename="D:/temp.vtk"; //number of points of this >> mesh file is around 78K >> >> typedef itk::QuadEdgeMeshTraits >> qetraits; >> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >> itk::OnesMatrixCoefficients< MeshType > coeff0; >> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >> >SmoothingQuadEdgeMeshFilter; >> >> vtkSmartPointer >> polyDatawriter=vtkSmartPointer::New(); >> vtkSmartPointer >> polyDatareader=vtkSmartPointer::New(); >> >> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >> SmoothingQuadEdgeMeshFilter::New(); >> /* polyDatareader->SetFileName(Inputfilename.c_str() ); >> polyDatareader->ReleaseDataFlagOn(); >> polyDatareader->Update();*/ >> >> /*vtkSmartPointer triangleFilter = >> vtkSmartPointer::New(); >> triangleFilter->SetInput(polyDatareader->GetOutput()); >> triangleFilter->Update();*/ >> >> // >> /* vtkSmartPointer clean = >> vtkSmartPointer::New(); >> #if (VTK_MAJOR_VERSION < 6) >> clean->SetInput(triangleFilter->GetOutput() ); >> #else >> clean->SetInputData(triangleFilter->GetOutput() ); >> #endif >> clean->ConvertPolysToLinesOff(); >> clean->ConvertLinesToPointsOff(); >> clean->Update(); >> >> std::string Inputfilename2="D:/cleaned.vtk";*/ >> >> //// >> /*polyDatawriter->SetInput(clean->GetOutput()); >> polyDatawriter->SetFileName(Inputfilename2.c_str()); >> polyDatawriter->ReleaseDataFlagOn(); >> polyDatawriter->Write(); */ >> >> typedef itk::MeshFileReader MeshReaderType; >> MeshReaderType::Pointer Meshreader = MeshReaderType::New(); >> Meshreader->SetFileName(Inputfilename.c_str( )); >> Meshreader->Update(); >> >> /*MeshType::Pointer mesh = Meshreader->GetOutput(); >> mesh->DisconnectPipeline();*/ >> >> QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); >> QEMeshSmoother->SetNumberOfIterations(1 ); >> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> QEMeshSmoother->SetDelaunayConforming(true); >> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> >> QEMeshSmoother->ReleaseDataFlagOn(); >> >> QEMeshSmoother->Update(); >> >> std::string Outputfilename="D:/tempOut.vtk"; >> >> typedef itk::MeshFileWriter MeshWriterType; >> MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); >> Meshwriter->SetFileName(Outputfilename.c_str( )); >> Meshwriter->SetInput(QEMeshSmoother->GetOutput()); >> Meshwriter->Update(); >> >> polyDatareader->SetFileName(Outputfilename.c_str() ); >> polyDatareader->ReleaseDataFlagOn(); >> polyDatareader->Update(); >> >> vtkSmartPointer >> stlWriter=vtkSmartPointer::New(); >> stlWriter->SetInput( polyDatareader->GetOutput()); >> stlWriter->SetFileName("D:/QEoutput.stl"); >> stlWriter->SetFileTypeToASCII(); >> stlWriter->Write(); >> //Here it stops and taking long time >> >> return 0; >> >> } >> //// >> >> >> >> On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K >> wrote: >> >>> Hi Arnaud, >>> >>> Thanks for your reply and valuable suggestions. >>> >>> Number of points in my input mesh are 78928.In my pipeline I am already >>> cleaning the polydata using vtkCleanPolyData filter.I will check the speed >>> improvement and results with delaunay conforming turned OFF. >>> >>> Thank you >>> >>> >>> On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas >>> wrote: >>> >>>> Hi Malik, >>>> >>>> First of all, I would recommend using MeshFileReader instead of >>>> VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near >>>> future?). >>>> >>>> Regarding now the smoothing procedure in itself. This class >>>> definitively misses some documentation and I will be adding some in the >>>> next few days (mainly extracted from the corresponding insight journal). >>>> >>>> At the end of each iteration, when the delaunay conforming flag is >>>> turned ON, the conformation is performed. So depending on the mesh >>>> configuration, mesh size and number of iterations, it can take ages? >>>> How large is your input mesh (number of points)? >>>> >>>> You can also check results, by running first a smoothing without >>>> delaunay conforming, then apply a delaunay conforming on the output. >>>> Results won't be as nice, but you should get significant speed improvement. >>>> Another possibility is to first do a clean poly data in vtk, with a >>>> small threshold to remove small edges in the input meshes (which results in >>>> lots of edge flipping after smoothing). >>>> >>>> HTH >>>> Arnaud >>>> >>>> >>>> On Aug 6, 2014, at 10:42 AM, Mallikarjun K >>>> wrote: >>>> >>>> Hi All, >>>> >>>> Can anyone suggest me if anything wrong I am doing in this below >>>> pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata >>>> to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 >>>> mins in release mode) at itkVtkPolydataReader . >>>> >>>> >>>> //// >>>> >>>> typedef itk::QuadEdgeMeshTraits>>> > qetraits; >>>> >>>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>> >>>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>>> >>>> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >>>> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >>>> >>>> //VTKPolyDataWriterType::Pointer >>>> ItkToVtkWriter=VTKPolyDataWriterType::New(); >>>> VTKPolyDataReaderType::Pointer >>>> VtkToItkReader=VTKPolyDataReaderType::New(); >>>> >>>> VtkToItkReader->SetFileName("abc.vtk"); >>>> VtkToItkReader->Update(); >>>> >>>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>> SmoothingQuadEdgeMeshFilter; >>>> >>>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>>> SmoothingQuadEdgeMeshFilter::New(); >>>> >>>> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >>>> QEMeshSmoother->SetNumberOfIterations(5 ); >>>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>> QEMeshSmoother->SetDelaunayConforming(true ); >>>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>> QEMeshSmoother->Update(); >>>> >>>> //// >>>> >>>> >>>> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K >>>> wrote: >>>> >>>>> Thanks Bill for your answer. >>>>> >>>>> The reason I am using this pipeline is that SmoothingQEMeshFilter has >>>>> an additional parameter for smoothing which is delaunay conforming which >>>>> helps to optimize aspect ratio of triangles while smoothing and thus >>>>> produces better output.Is there anything similar filter in the vtk >>>>> pipeline.I used vtkWindowedSincPolydatafilter which is not giving the >>>>> output as good as QEMeshSmoothing filter. >>>>> >>>>> Thanks for your help >>>>> >>>>> >>>>> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen < >>>>> bill.lorensen at gmail.com> wrote: >>>>> >>>>>> If you have it in vtk, I suggest using the vtk pipeline to smooth the >>>>>> data. >>>>>> >>>>>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K < >>>>>> mallikarjun49 at gmail.com> wrote: >>>>>> > Hi Bill, >>>>>> > Thanks for the replay. >>>>>> > >>>>>> > Yes,I built both ITK and my app with Release ,I forgot to mention >>>>>> it in the >>>>>> > previous post.Actually the data set is the output of >>>>>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth >>>>>> .I saved >>>>>> > this marching cube's output as .vtk file and read it using >>>>>> > itkVTKPolyDataReader and then I am giving this reader's output to >>>>>> > itkSmoothingQuadEdgeMeshFilter's input. >>>>>> > >>>>>> > I checked the execution time of each step in the pipeline ,after >>>>>> > SmothingQEMeshFilter has got it's input ,it is taking time to >>>>>> process the >>>>>> > data. >>>>>> > >>>>>> > Thank you >>>>>> > >>>>>> > >>>>>> > >>>>>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen < >>>>>> bill.lorensen at gmail.com> >>>>>> > wrote: >>>>>> >> >>>>>> >> First, make sure you are building ITK and your app with Release. A >>>>>> >> Debug build can be 10-50 times slower. >>>>>> >> >>>>>> >> >>>>>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K < >>>>>> mallikarjun49 at gmail.com> >>>>>> >> wrote: >>>>>> >> > Hi All, >>>>>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>>>>> >> > smoothing.This >>>>>> >> > filter is giving good results what I expected but taking more >>>>>> execution >>>>>> >> > time.can any one suggest me to reduce the execution time( multi >>>>>> >> > threading >>>>>> >> > or any parameters to add/remove )? >>>>>> >> > >>>>>> >> > Below is the code snippet >>>>>> >> > /////// >>>>>> >> > typedef itk::QuadEdgeMeshTraits>>>>> double,double >>>>>> >> > > >>>>>> >> > qetraits; >>>>>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > >>>>>> MeshType; >>>>>> >> > >>>>>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>>>>> >> > >>>>>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>>>>> >> > >>>>>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>>>> >> > SmoothingQuadEdgeMeshFilter; >>>>>> >> > >>>>>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>>>>> >> > SmoothingQuadEdgeMeshFilter::New(); >>>>>> >> > >>>>>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>>>>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>>>>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>>>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>>>>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>>>> >> > QEMeshSmoother->Update(); >>>>>> >> > //// >>>>>> >> > >>>>>> >> > -- >>>>>> >> > Regards: >>>>>> >> > Mallik >>>>>> >> > >>>>>> >> > >>>>>> >> > _____________________________________ >>>>>> >> > Powered by www.kitware.com >>>>>> >> > >>>>>> >> > Visit other Kitware open-source projects at >>>>>> >> > http://www.kitware.com/opensource/opensource.html >>>>>> >> > >>>>>> >> > Kitware offers ITK Training Courses, for more information visit: >>>>>> >> > http://www.kitware.com/products/protraining.php >>>>>> >> > >>>>>> >> > Please keep messages on-topic and check the 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 >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > -- >>>>>> > Regards: >>>>>> > Mallik >>>>>> > >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Unpaid intern in BillsBasement at noware dot com >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> *Regards:* >>>>> Mallik >>>>> >>>>> >>>> >>>> >>>> -- >>>> *Regards:* >>>> Mallik >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>>> >>>> >>> >>> >>> -- >>> *Regards:* >>> Mallik >>> >>> >> >> >> -- >> *Regards:* >> Mallik >> >> >> > > > -- > *Regards:* > Mallik > > > > > -- *Regards:* Mallik -------------- 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 Aug 7 14:20:19 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 7 Aug 2014 14:20:19 -0400 Subject: [ITK] ITK Development Meeting Message-ID: Hi, Are we having the development meeting teleconference tomorrow? If not, would folks like to do a Google Hangout at 9 AM? On a positive side note, Google Hangout's no longer require a Google Plus account [1], and it no longer requires plugins with Chrome/ium [2]. I am happy to see the Goog-Monster moving towards greater openness and liberty. Maybe the internal forces for good are becoming stronger :-). Thanks, Matt [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ From blowekamp at mail.nih.gov Thu Aug 7 14:23:07 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 7 Aug 2014 14:23:07 -0400 Subject: [ITK] ITK Development Meeting In-Reply-To: References: Message-ID: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> Hello, I am in favor of using Google Hangout as it appears to be more accessible to people and more seem to be able to join. Brad On Aug 7, 2014, at 2:20 PM, Matt McCormick wrote: > Hi, > > Are we having the development meeting teleconference tomorrow? If > not, would folks like to do a Google Hangout at 9 AM? > > On a positive side note, Google Hangout's no longer require a Google > Plus account [1], and it no longer requires plugins with Chrome/ium > [2]. > > I am happy to see the Goog-Monster moving towards greater openness and > liberty. Maybe the internal forces for good are becoming stronger > :-). > > Thanks, > Matt > > [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ > > [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ From bill.lorensen at gmail.com Thu Aug 7 14:24:40 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 7 Aug 2014 14:24:40 -0400 Subject: [ITK] ITK Development Meeting In-Reply-To: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> References: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> Message-ID: +1 On Thu, Aug 7, 2014 at 2:23 PM, Bradley Lowekamp wrote: > Hello, > > I am in favor of using Google Hangout as it appears to be more accessible to people and more seem to be able to join. > > Brad > > On Aug 7, 2014, at 2:20 PM, Matt McCormick wrote: > >> Hi, >> >> Are we having the development meeting teleconference tomorrow? If >> not, would folks like to do a Google Hangout at 9 AM? >> >> On a positive side note, Google Hangout's no longer require a Google >> Plus account [1], and it no longer requires plugins with Chrome/ium >> [2]. >> >> I am happy to see the Goog-Monster moving towards greater openness and >> liberty. Maybe the internal forces for good are becoming stronger >> :-). >> >> Thanks, >> Matt >> >> [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ >> >> [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -- Unpaid intern in BillsBasement at noware dot com From michkapopoff at gmail.com Thu Aug 7 14:43:54 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Thu, 7 Aug 2014 20:43:54 +0200 Subject: [ITK] ITK Development Meeting In-Reply-To: References: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> Message-ID: <913EF9B6-84A0-4BD3-A154-EBCFD92685E5@gmail.com> +1 9 AM, what timezone ? ;D On 7 ao?t 2014, at 20:24, Bill Lorensen wrote: > +1 > > > On Thu, Aug 7, 2014 at 2:23 PM, Bradley Lowekamp wrote: >> Hello, >> >> I am in favor of using Google Hangout as it appears to be more accessible to people and more seem to be able to join. >> >> Brad >> >> On Aug 7, 2014, at 2:20 PM, Matt McCormick wrote: >> >>> Hi, >>> >>> Are we having the development meeting teleconference tomorrow? If >>> not, would folks like to do a Google Hangout at 9 AM? >>> >>> On a positive side note, Google Hangout's no longer require a Google >>> Plus account [1], and it no longer requires plugins with Chrome/ium >>> [2]. >>> >>> I am happy to see the Goog-Monster moving towards greater openness and >>> liberty. Maybe the internal forces for good are becoming stronger >>> :-). >>> >>> Thanks, >>> Matt >>> >>> [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ >>> >>> [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community > > > > -- > Unpaid intern in BillsBasement at noware dot com > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From matt.mccormick at kitware.com Thu Aug 7 15:19:02 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 7 Aug 2014 15:19:02 -0400 Subject: [ITK] ITK Development Meeting In-Reply-To: <913EF9B6-84A0-4BD3-A154-EBCFD92685E5@gmail.com> References: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> <913EF9B6-84A0-4BD3-A154-EBCFD92685E5@gmail.com> Message-ID: OK, let's do 9 AM Eastern Time Zone (GMT-4). :-) I created an Event here [1]. If you are subscribed to the ITK Bar Camp Community [2], you should already have received an invitation. Thanks, Matt [1] https://plus.google.com/events/cauvj61hvr7kirg5g5vjsupt4pg [2] https://plus.google.com/communities/111375098792764998322 On Thu, Aug 7, 2014 at 2:43 PM, Michka Popoff wrote: > +1 > > 9 AM, what timezone ? ;D > > On 7 ao?t 2014, at 20:24, Bill Lorensen wrote: > >> +1 >> >> >> On Thu, Aug 7, 2014 at 2:23 PM, Bradley Lowekamp wrote: >>> Hello, >>> >>> I am in favor of using Google Hangout as it appears to be more accessible to people and more seem to be able to join. >>> >>> Brad >>> >>> On Aug 7, 2014, at 2:20 PM, Matt McCormick wrote: >>> >>>> Hi, >>>> >>>> Are we having the development meeting teleconference tomorrow? If >>>> not, would folks like to do a Google Hangout at 9 AM? >>>> >>>> On a positive side note, Google Hangout's no longer require a Google >>>> Plus account [1], and it no longer requires plugins with Chrome/ium >>>> [2]. >>>> >>>> I am happy to see the Goog-Monster moving towards greater openness and >>>> liberty. Maybe the internal forces for good are becoming stronger >>>> :-). >>>> >>>> Thanks, >>>> Matt >>>> >>>> [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ >>>> >>>> [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> _______________________________________________ >> 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 From michkapopoff at gmail.com Thu Aug 7 15:50:18 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Thu, 7 Aug 2014 21:50:18 +0200 Subject: [ITK] ITK Development Meeting In-Reply-To: References: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> <913EF9B6-84A0-4BD3-A154-EBCFD92685E5@gmail.com> Message-ID: <5CB49492-605B-434E-BE5D-7F1B33F289CA@gmail.com> Perfect, 3 PM for me :) Thanks On 7 ao?t 2014, at 21:19, Matt McCormick wrote: > OK, let's do 9 AM Eastern Time Zone (GMT-4). :-) > > I created an Event here [1]. > > If you are subscribed to the ITK Bar Camp Community [2], you should > already have received an invitation. > > Thanks, > Matt > > [1] https://plus.google.com/events/cauvj61hvr7kirg5g5vjsupt4pg > > [2] https://plus.google.com/communities/111375098792764998322 > > On Thu, Aug 7, 2014 at 2:43 PM, Michka Popoff wrote: >> +1 >> >> 9 AM, what timezone ? ;D >> >> On 7 ao?t 2014, at 20:24, Bill Lorensen wrote: >> >>> +1 >>> >>> >>> On Thu, Aug 7, 2014 at 2:23 PM, Bradley Lowekamp wrote: >>>> Hello, >>>> >>>> I am in favor of using Google Hangout as it appears to be more accessible to people and more seem to be able to join. >>>> >>>> Brad >>>> >>>> On Aug 7, 2014, at 2:20 PM, Matt McCormick wrote: >>>> >>>>> Hi, >>>>> >>>>> Are we having the development meeting teleconference tomorrow? If >>>>> not, would folks like to do a Google Hangout at 9 AM? >>>>> >>>>> On a positive side note, Google Hangout's no longer require a Google >>>>> Plus account [1], and it no longer requires plugins with Chrome/ium >>>>> [2]. >>>>> >>>>> I am happy to see the Goog-Monster moving towards greater openness and >>>>> liberty. Maybe the internal forces for good are becoming stronger >>>>> :-). >>>>> >>>>> Thanks, >>>>> Matt >>>>> >>>>> [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ >>>>> >>>>> [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ >>>> >>>> _______________________________________________ >>>> Community mailing list >>>> Community at itk.org >>>> http://public.kitware.com/mailman/listinfo/community >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >>> _______________________________________________ >>> 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 From millerjv at ge.com Thu Aug 7 14:30:04 2014 From: millerjv at ge.com (Miller, James V (GE Global Research)) Date: Thu, 7 Aug 2014 18:30:04 +0000 Subject: [ITK] ITK Development Meeting In-Reply-To: References: Message-ID: <2CD24A027ACF154199B5D6F6E5EF830BB487D924@CINMBCNA06.e2k.ad.ge.com> I don't have a strong preference. Note, it looks like Hangouts require either a Google+ or a Google Apps account. It doesn't look like a plain old Google account is supported yet. Jim -----Original Message----- From: Matt McCormick [mailto:matt.mccormick at kitware.com] Sent: Thursday, August 07, 2014 2:20 PM To: ITK; community at itk.org; Bradley Lowekamp; Miller, James V (GE Global Research); Padfield, Dirk R (GE Global Research) Subject: ITK Development Meeting Hi, Are we having the development meeting teleconference tomorrow? If not, would folks like to do a Google Hangout at 9 AM? On a positive side note, Google Hangout's no longer require a Google Plus account [1], and it no longer requires plugins with Chrome/ium [2]. I am happy to see the Goog-Monster moving towards greater openness and liberty. Maybe the internal forces for good are becoming stronger :-). Thanks, Matt [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ From arnaudgelas at gmail.com Fri Aug 8 04:44:26 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Fri, 8 Aug 2014 10:44:26 +0200 Subject: [ITK] [ITK-users] Motion under Mean Curvature with LevelSetv4 Framework In-Reply-To: References: Message-ID: Hi Cagatay, I just came back from vacation... Have you solved this problem? It would be great if we could make the equivalent code in the old framework to compare and fix what could be wrong. Have you done something like this? I'll start looking at it... Best, Arnaud On Tue, Jul 22, 2014 at 9:58 AM, Cagatay Bilgin wrote: > Dear ITK Community, > > I am trying to familiarize myself with the new level set classes. My goal > is to simulate motion under mean curvature using the new design. > > I have put together the following, looking at the examples and tests. > http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3872740/ is a great source to > understand the design and tests in source directory are very helpful, thank > you for the resources! > > The test scenario I have is a L shaped object. I would expect the object > to become somewhat ellipse and then disappear at the end of the evolution. > However I get the following results attached to the email. I don't quite > follow these results. Am I missing something obvious? > > Here is the code and CMakeLists.txt. I ran the program with ./Motion 100 0 > 0 0.05 > > #include "itkBinaryImageToLevelSetImageAdaptor.h" > #include "itkImageFileReader.h" > #include "itkLevelSetContainer.h" > #include "itkLevelSetEquationPropagationTerm.h" > #include "itkLevelSetEquationAdvectionTerm2.h" > #include "itkLevelSetEquationContainer.h" > #include "itkLevelSetEquationTermContainer.h" > #include "itkLevelSetEvolution.h" > #include "itkLevelSetEvolutionNumberOfIterationsStoppingCriterion.h" > #include "itkLevelSetDenseImage.h" > #include "itkVTKVisualizeImageLevelSetIsoValues.h" > #include "itkSinRegularizedHeavisideStepFunction.h" > #include "itkLevelSetIterationUpdateCommand.h" > #include "itkLevelSetEquationCurvatureTerm.h" > #include "itkCastImageFilter.h" > #include "itkWhitakerSparseLevelSetImage.h" > #include "itkSpatialObjectToImageFilter.h" > #include "itkEllipseSpatialObject.h" > > typedef itk::Image< float, 2 > FIT; > > /* > * L Shape > */ > void CreateSquareImage(FIT::Pointer image) > { > FIT::RegionType region; > FIT::IndexType start; > start[0] = 0; > start[1] = 0; > > FIT::SizeType size; > size[0] = 200; > size[1] = 300; > > region.SetSize(size); > region.SetIndex(start); > > image->SetRegions(region); > image->Allocate(); > > // Set pixels in a square to one value > for(unsigned int r = 20; r < 160; r++) > { > for(unsigned int c = 30; c < 100; c++) > { > FIT::IndexType pixelIndex; > pixelIndex[0] = r; > pixelIndex[1] = c; > > image->SetPixel(pixelIndex, 255); > } > } > > for(unsigned int r = 20; r < 80; r++) > { > for(unsigned int c = 100; c < 200; c++) > { > FIT::IndexType pixelIndex; > pixelIndex[0] = r; > pixelIndex[1] = c; > > image->SetPixel(pixelIndex, 255); > } > } > } > > > /* > */ > int main( int argc, char* argv[] ) > { > if( argc != 5) > { > std::cerr << "Missing Arguments" << std::endl; > std::cerr << argv[0] << std::endl; > std::cerr << "1- Number of Iterations" << std::endl; > std::cerr << "2- Propagation Term" << std::endl; > std::cerr << "3- Advection Term" << std::endl; > std::cerr << "4- Curvature Term" << std::endl; > return EXIT_FAILURE; > } > > // Image Dimension > const unsigned int Dimension = 2; > > typedef unsigned char InputPixelType; > typedef itk::Image< InputPixelType, Dimension > IIT; > typedef itk::Image< float, 2 > FIT; > > FIT::Pointer input = FIT::New(); > CreateSquareImage(input); > > int numberOfIterations = atoi( argv[1]); > > typedef float > LevelSetPixelType; > typedef itk::Image< LevelSetPixelType, Dimension > LSIT; > typedef itk::LevelSetDenseImage< LSIT > LST; > //typedef itk::WhitakerSparseLevelSetImage< LevelSetPixelType, 2 > LST; > > typedef LST::OutputType LevelSetOutputType; > typedef LST::OutputRealType LevelSetRealType; > > // convert a binary mask to a level-set function > typedef itk::BinaryImageToLevelSetImageAdaptor BI2LST; > BI2LST::Pointer adaptor = BI2LST::New(); > adaptor->SetInputImage( input ); > adaptor->Initialize(); > LST::Pointer levelSet = adaptor->GetLevelSet(); > > // The Heaviside function > typedef itk::SinRegularizedHeavisideStepFunction< LevelSetRealType, > LevelSetRealType > HeavisideFunctionType; > HeavisideFunctionType::Pointer heaviside = > HeavisideFunctionType::New(); > heaviside->SetEpsilon( 1 ); > > // Create the level set container > typedef itk::LevelSetContainer< itk::IdentifierType, LST > > LSContainerT; > LSContainerT::Pointer levelSetContainer = LSContainerT::New(); > levelSetContainer->SetHeaviside( heaviside ); > levelSetContainer->AddLevelSet( 0, levelSet ); > > // Create the terms. > typedef itk::LevelSetEquationPropagationTerm > PropagationTermType; > PropagationTermType::Pointer propagationTerm = > PropagationTermType::New(); > propagationTerm->SetInput(input); > propagationTerm->SetCoefficient(atof(argv[2])); > > typedef itk::LevelSetEquationAdvectionTerm2 > AdvectionTermType; > AdvectionTermType::Pointer advectionTerm = AdvectionTermType::New(); > advectionTerm->SetInput(input); > advectionTerm->SetCoefficient(atof(argv[3])); > > typedef itk::LevelSetEquationCurvatureTerm > CurvatureTermType; > CurvatureTermType::Pointer curvatureTerm = CurvatureTermType::New(); > //curvatureTerm->SetInput(input); > curvatureTerm->SetCoefficient(atof(argv[4])); > > > // Create term container (equation rhs) > typedef itk::LevelSetEquationTermContainer< FIT, LSContainerT > > TermContainerType; > TermContainerType::Pointer termContainer = TermContainerType::New(); > termContainer->SetLevelSetContainer( levelSetContainer ); > termContainer->SetInput( input ); > //termContainer->AddTerm( 0, propagationTerm ); > //termContainer->AddTerm( 1, advectionTerm ); > termContainer->AddTerm( 0, curvatureTerm ); > > // Create equation container > typedef itk::LevelSetEquationContainer< TermContainerType > > EquationContainerType; > EquationContainerType::Pointer equationContainer = > EquationContainerType::New(); > equationContainer->SetLevelSetContainer( levelSetContainer ); > equationContainer->AddEquation( 0, termContainer ); > > // Create stopping criteria > typedef itk::LevelSetEvolutionNumberOfIterationsStoppingCriterion< > LSContainerT > StoppingCriterionType; > StoppingCriterionType::Pointer criterion = > StoppingCriterionType::New(); > criterion->SetNumberOfIterations( numberOfIterations ); > > // Create the visualizer > typedef itk::VTKVisualizeImageLevelSetIsoValues< FIT, LST > > VisualizationType; > VisualizationType::Pointer visualizer = VisualizationType::New(); > visualizer->SetInputImage( input ); > visualizer->SetLevelSet( levelSet ); > visualizer->SetScreenCapture( true ); > > // Create evolution class > typedef itk::LevelSetEvolution< EquationContainerType, LST > > LevelSetEvolutionType; > LevelSetEvolutionType::Pointer evolution = > LevelSetEvolutionType::New(); > evolution->SetEquationContainer( equationContainer ); > evolution->SetStoppingCriterion( criterion ); > evolution->SetLevelSetContainer( levelSetContainer ); > > typedef itk::LevelSetIterationUpdateCommand< LevelSetEvolutionType, > VisualizationType > IterationUpdateCommandType; > IterationUpdateCommandType::Pointer iterationUpdateCommand = > IterationUpdateCommandType::New(); > iterationUpdateCommand->SetFilterToUpdate( visualizer ); > iterationUpdateCommand->SetUpdatePeriod( 1 ); > > evolution->AddObserver( itk::IterationEvent(), iterationUpdateCommand > ); > > evolution->Update(); > > return EXIT_SUCCESS; > } > > > > cmake_minimum_required(VERSION 2.8) > > project(CurvatureMotion) > > find_package(ITK REQUIRED) > include(${ITK_USE_FILE}) > > find_package(VTK REQUIRED) > include(${VTK_USE_FILE}) > > add_executable(Motion main.cpp) > target_link_libraries(Motion ${ITK_LIBRARIES} ${VTK_LIBRARIES}) > > [image: Inline image 4][image: Inline image 3] > -- > Cemal Cagatay Bilgin, PhD > Life Sciences Division > Lawrence Berkeley National Lab > MS977, One Cyclotron Road > Berkeley, CA 94720, USA > Email: ccbilgin at lbl.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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: levelset_040.png Type: image/png Size: 3421 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: levelset_000.png Type: image/png Size: 2652 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 david.froger.ml at mailoo.org Fri Aug 8 10:48:27 2014 From: david.froger.ml at mailoo.org (David Froger) Date: Fri, 08 Aug 2014 16:48:27 +0200 Subject: [ITK] HDF5 enhancements Message-ID: <20140808144827.12192.3457@otis.rocq.inria.fr> Dear all, I just push this to Gerrit (ITK): http://review.source.kitware.com/16576 http://review.source.kitware.com/16577 http://review.source.kitware.com/16578 http://review.source.kitware.com/16579 to fix the test of HDF5 write streaming, and add pasting support for HDF5. and this (ITKExamples): http://review.source.kitware.com/16580 to add examples about streamnig and pasting HDF5 files. The commits are not perfect, but I would be happy to discuss its content and to have feedback. Especially: - I introduce a 'ChangeRegionImageFilter', that may be replaced by something already existing, but I didn't find what. (Furthermore, the implementation is not optimal, it make a useless copy). - For the ITKExamples, I didn't find how to build the html documentations from the rst files, so I didn't test it. - For the ITKExamples, I didn't succced yet to upload the input binary files. - For the ITKExamples, the last example may not work yet. Best, David From nicgallego at gmail.com Fri Aug 8 12:18:53 2014 From: nicgallego at gmail.com (Nicolas Gallego) Date: Fri, 8 Aug 2014 18:18:53 +0200 Subject: [ITK] [ITK-users] Whole body Segmentation-Identification In-Reply-To: References: Message-ID: Hi Bumpy, It seams that your problem is exploratory and will get benefit of manual interaction. Have you tried visualizing your images in ITKSnap for example? There are tools to do manual segmentation there. Hope that helps Nicol?s Gallego-Ortiz Universit? catholique de Louvain, Belgium 2014-08-01 15:47 GMT+02:00 Bumpy RG : > Dear All, > > I have a dicom series having whole body image sequences, starting from > head up to legs. > > My aim is to write an algorithm to automatically identify the body parts > (lungs, spines, head etc.) from the dicom sequence. > > Although I am very new to the ITK world, I am following these steps in ITK > (*I would appreciate if you comment whether I am following correct idea > or not*): > > 1. Read dicom series using 'DicomSeriesReadImageWrite2.cxx ' to create > a 3D volume and save the result in mhd format. > 2. Use 'ImageReadRegionOfInterestWrite.cxx' for separating various > parts (like left lung, right lung, spines, head etc.) and save them in > respective 3D volumes in mhd format. > 3. Pick the various body parts prepared above, one by one and segment > them using robust algorithm (say > ThresholdSegmentationLevelSetImageFilter.cxx). > 4. Use Mathematical Morphology to get better results. > 5. Using the various results from above, form an algorithm for > identifying the various body parts. > > Currently I am stuck in the second step because it is so hard to choose > the co-ordinates for selecting proper region of interest. > > For example, I chose these points for ROI of right lung (I checked the > co-ordinates using 3D slicer visualizer) and it does not give me good > results : > start[0] = 255; > start[1] =165; > start[2] = 0; > > *However I do not understand how to choose the points properly in ITK.* > > > I would be really glad to have your response. > > Thanking you in advance. > Kind Regards, > Bumpy. > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Fri Aug 8 17:36:36 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 8 Aug 2014 17:36:36 -0400 Subject: [ITK] HDF5 enhancements In-Reply-To: <20140808144827.12192.3457@otis.rocq.inria.fr> References: <20140808144827.12192.3457@otis.rocq.inria.fr> Message-ID: Hi David, Looks like some great work! Thanks for contributing! I'll review over the coming days. Thanks, Matt On Fri, Aug 8, 2014 at 10:48 AM, David Froger wrote: > Dear all, > > I just push this to Gerrit (ITK): > > http://review.source.kitware.com/16576 > http://review.source.kitware.com/16577 > http://review.source.kitware.com/16578 > http://review.source.kitware.com/16579 > > to fix the test of HDF5 write streaming, and add pasting support for HDF5. > > and this (ITKExamples): > > http://review.source.kitware.com/16580 > > to add examples about streamnig and pasting HDF5 files. > > The commits are not perfect, but I would be happy to discuss its content and > to have feedback. > > Especially: > - I introduce a 'ChangeRegionImageFilter', that may be replaced by something > already existing, but I didn't find what. (Furthermore, the implementation is > not optimal, it make a useless copy). > - For the ITKExamples, I didn't find how to build the html documentations from > the rst files, so I didn't test it. > - For the ITKExamples, I didn't succced yet to upload the input binary files. > - For the ITKExamples, the last example may not work yet. > > Best, > David > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From matimontg at gmail.com Sat Aug 9 10:21:47 2014 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 9 Aug 2014 11:21:47 -0300 Subject: [ITK] ResampleDicom | Tags Message-ID: HI, I'm using the ResmpleDicom example to convert a serie of images to a new serie with z spacing=1. Images are CT Everything works fine except that some Tags on the images are deleted during the process, I even see the rescale intercept is srt to 0 and the rescaletype is changed as well. The padding value also changes. Is there a way to avoid all this? My images WL and WC change once I run the Resample.. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Sat Aug 9 10:34:08 2014 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 9 Aug 2014 11:34:08 -0300 Subject: [ITK] [ITK-users] ITK ResampleDicom | Tags Message-ID: Hi, I'm using the ResmpleDicom example to convert a serie of images to a new serie with z spacing=1. Images are CT Everything works fine except that some Tags on the images are deleted during the process, I even see the rescale intercept is srt to 0 and the rescaletype is changed as well. The padding value also changes. Is there a way to avoid all this? My images WL and WC change once I run the Resample.. Thanks! -------------- 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 Sat Aug 9 10:42:28 2014 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 9 Aug 2014 11:42:28 -0300 Subject: [ITK] [ITK-users] ITK ResampleDicom | Tags In-Reply-To: References: Message-ID: I think the key is in this section of the code: CopyDictionary (*inputDict, *dict); Shouldn't copy the entire tags? On Sat, Aug 9, 2014 at 11:34 AM, Matias Montroull wrote: > Hi, > > I'm using the ResmpleDicom example to convert a serie of images to a new > serie with z spacing=1. Images are CT > > Everything works fine except that some Tags on the images are deleted > during the process, I even see the rescale intercept is srt to 0 and the > rescaletype is changed as well. The padding value also changes. > > Is there a way to avoid all this? My images WL and WC change once I run > the Resample.. > > Thanks! > -------------- 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 Aug 11 01:15:45 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Mon, 11 Aug 2014 07:15:45 +0200 Subject: [ITK] [ITK-users] adding a global hierarchical watershed segmentation mode to itksnap Message-ID: <53E85181.8040607@mh-hannover.de> Dear mailing list members, For a long time now I've been searching for a replacement of the old SegmentationEditor (part of the InsightApplications) which I could not get to work even with older ITK-3.x. Somewhere I was told that it was integrated and maintained within itksnap. However the only tool in itksnap based on watershed segmentation seems to be the adaptive brush. It is very handy, but time-consuming in 3D and only for local segmentations. In contrast the SegmentationEditor used a global hierarchical watershed segmentation to pick labels from, see e.g. the video linked here: http://www.insight-journal.org/browse/publication/70 Quite often now I've stumbled over data, that would likely have profited a lot of such a tool for segmentation. If such a tool working with ITK-4.x does not exist any more, I thought of implementing it as a global WS segmentation mode in itksnap. That way making the tool easier to find, to use and to ensure maintenance (should it be integrated into the itksnap code base in the end) and also avoiding recoding a GUI with mouse interaction and such. My current idea is to start, similar to the snake-tool, with pre-filtering like smoothing and optional edge-detection. Then the main edit mode to consist of the usual 4 subwindows showing an overlay of the grey-image and the watershed segmentation of the hierarchical WS-filter (hWS), side-by-side to another label-dataset (loaded like a tiled overlay) which consist of the actually chosen labels from the hWS as the final data (FD). The interaction I'm considering would be to LMB click on a label in the hWS which is then added to the FD as the current fg label, or removed with a RMB. The hierachrchy level of the hWS could be controlled by a slider or the mouse wheel + Shift in nearly real time if some region demands higher or lower detailed segmentation. When the fg label is changed, the segmentation added or removed with further mouse interactions would modify the new fg label. When all is done and the global WS mode is left, the FD label-dataset is added to the main segmentation of itksnap. Would that be possible to implement in itksnap 3.x? What source files of the itksnap code base should I look at for: - the pre-filtering mode of the snake (for the smoothing and edge detection) - the mouse interactions (for e.g. adding the whell + Shift interaction) - possible examples for the dual layout Thanks for any comments, help or hints. 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 iyas.hamdan at gmail.com Mon Aug 11 03:35:25 2014 From: iyas.hamdan at gmail.com (Iyas Hamdan) Date: Mon, 11 Aug 2014 09:35:25 +0200 Subject: [ITK] [ITK-users] 3D multimodal registration Message-ID: Hello all, I?m working on 3D multimodal image registration and I have a problem I've been struggling with for quite a while. I have a 3D MRI volume (fixed volume) and a 3D CT volume (moving volume), but those two volumes have different sizes (different dimensions and different number of slices). First of all I have a general question, how does the 3D registration in itk work basically ? I mean does it take the first slice from the fixed volume and try to find its correspondence in the moving volume ( by optimizing a metric ) and then go on to the next slice and so on? Or does it rather work with the whole volume and not slice by slice ? Because for me, lets imagine I have 50 MRI slices and 150 CT ones for example, but the field of view is different between both volumes. I mean the first MRI slice corresponds ( visually ) to the 50th CT slice for example so the first 49 CT slices don?t exist in the MRI volume. So when I apply my registration method ( affine transformation with the mutual information as the metric ) the registration fails to give a good result. It show no errors but the result volume is not well aligned with the fixed one. Although the transformation ( from the outside let?s say ) is correct, meaning the result volume has the same size as the fixed one and both volumes are on top of each other perfectly but the slices don?t look alike at all when I try to show both volumes on top of each other. Knowing that my initialization is good, and I tuned the parameters of the optimizer ( regular step gradient descent) and always ended up with almost the same result. So is that a normal behavior of itk to fail when the field of view is different ? Because I tried to cut off the first 49 CT slices, and created a new volume with the rest of the slices ( so that I had the same field of view with the MRI volume ), and when I applied the registration between this new volume and the MRI one, the registration worked perfectly and I had a very good result. So what?s wrong here ? and if the field of view is the problem how can I fix that automatically ? because I can delete the extra slices from one volume manually, but what I'm looking for is an automatic approach and I couldn?t think of one. Any hint would be really appreciated, Thanks in advance, Best regards, Iyas -------------- 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 mercikd at thomas.edu Mon Aug 11 10:37:37 2014 From: mercikd at thomas.edu (Dan Mercik) Date: Mon, 11 Aug 2014 14:37:37 +0000 Subject: [ITK] [ITK-users] Image Diffusion Message-ID: Good Morning, I'm doing a project that involves the fusion of multiple images. However, at the end of the fusion process I need to be able to diffuse the fuse imaged back to it's original stack images. I wanted to know if there an algorithm I can use to defuse my fused image? Any thoughts are more than welcome and I would be highly appreciative for your input. Daniel Mercik Computer Science Major Service Desk Technician Thomas College _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 lasso at queensu.ca Mon Aug 11 10:20:58 2014 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 11 Aug 2014 14:20:58 +0000 Subject: [ITK] [ITK-users] adding a global hierarchical watershed segmentation mode to itksnap In-Reply-To: <53E85181.8040607@mh-hannover.de> References: <53E85181.8040607@mh-hannover.de> Message-ID: <0f32755d9980441ca0162728b088f00b@queensu.ca> Have you tried segmentation tools in 3D Slicer? There is a multi-label watershed segmentation tool that works in 3d (http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Editor#WatershedFromMarkers), there are also a number of other generic semi-automatic segmentation tools (such as GrowCut) and a few fully-automatic specialized tools (for brain, airways, etc). Download the nightly build and also checkout the Segmentation category in the Extension Manager. Andras From: Dr. Roman Grothausmann Sent: ?Monday?, ?August? ?11?, ?2014 ?1?:?15? ?AM To: itksnap-users at googlegroups.com Cc: ITK Mailing List Dear mailing list members, For a long time now I've been searching for a replacement of the old SegmentationEditor (part of the InsightApplications) which I could not get to work even with older ITK-3.x. Somewhere I was told that it was integrated and maintained within itksnap. However the only tool in itksnap based on watershed segmentation seems to be the adaptive brush. It is very handy, but time-consuming in 3D and only for local segmentations. In contrast the SegmentationEditor used a global hierarchical watershed segmentation to pick labels from, see e.g. the video linked here: http://www.insight-journal.org/browse/publication/70 Quite often now I've stumbled over data, that would likely have profited a lot of such a tool for segmentation. If such a tool working with ITK-4.x does not exist any more, I thought of implementing it as a global WS segmentation mode in itksnap. That way making the tool easier to find, to use and to ensure maintenance (should it be integrated into the itksnap code base in the end) and also avoiding recoding a GUI with mouse interaction and such. My current idea is to start, similar to the snake-tool, with pre-filtering like smoothing and optional edge-detection. Then the main edit mode to consist of the usual 4 subwindows showing an overlay of the grey-image and the watershed segmentation of the hierarchical WS-filter (hWS), side-by-side to another label-dataset (loaded like a tiled overlay) which consist of the actually chosen labels from the hWS as the final data (FD). The interaction I'm considering would be to LMB click on a label in the hWS which is then added to the FD as the current fg label, or removed with a RMB. The hierachrchy level of the hWS could be controlled by a slider or the mouse wheel + Shift in nearly real time if some region demands higher or lower detailed segmentation. When the fg label is changed, the segmentation added or removed with further mouse interactions would modify the new fg label. When all is done and the global WS mode is left, the FD label-dataset is added to the main segmentation of itksnap. Would that be possible to implement in itksnap 3.x? What source files of the itksnap code base should I look at for: - the pre-filtering mode of the snake (for the smoothing and edge detection) - the mouse interactions (for e.g. adding the whell + Shift interaction) - possible examples for the dual layout Thanks for any comments, help or hints. 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 _______________________________________________ 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 gass at vision.ee.ethz.ch Mon Aug 11 12:18:03 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Mon, 11 Aug 2014 18:18:03 +0200 Subject: [ITK] [ITK-users] Anti-alias filter Message-ID: Dear all, I'm having problems using the anti-alias filter, which I want to use in order to smooth a binary segmentation volume. I'm using essentially the example code from the repository, which for my input file seems to start oscillating after 2 iterations, leading to weird 'pointy' artifacts on the surface as can be seen from the attached screenshot (AA filter output is on the left, input on the right). Is there any parameter to set/implement which could improve the behavior of this filter? I'm assuming that my input is reasonable, or is this something the filter is expected to have problems with? It is notable that such errors seem to mainly appear in 'flat' regions of the volume, and are not apparent in the curved shaft of the bone. Any help, or pointers to further resources are appreciated, thanks, Tobias -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: AAFIlter.jpg Type: image/jpeg Size: 205294 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 norman-k-williams at uiowa.edu Mon Aug 11 12:49:31 2014 From: norman-k-williams at uiowa.edu (Williams, Norman K) Date: Mon, 11 Aug 2014 16:49:31 +0000 Subject: [ITK] [ITK-dev] VtkGlue module -- strange configuration. Message-ID: I?ve been messing with making the VtkGlue module use a more specific signature for find_package(VTK)* In ITK/Modules/Bridge/VtkGlue/itk-module-init.cmake there?s this: set(VERSION_MIN "5.9.20110419") ? which as far as I can tell is nonsense; I checked out the VTK version from April 19th 2011, and the VTK version is set to be 5.9.0 I don?t think the VTK_BUILD_VERSION would ever be set to a specific date stamp. What is required ? in order to use find_package(VTK COMPONENTS ?) -- would be the first revision after VTK Modularization was working. And in fact, given how VTK sets its version numbers ? hard coded in the top level CMakeLists.txt ? I don?t even know how that would work. Any ideas? *This is an outgrowth of the work I?m doing on tailoring BRAINSTools? dependency processing in CMake for Slicer inclusion. Specifically, rather than use find_package(ITK REQUIRED) use find_package(ITK COMPONENTS ? REQUIRED) ? this only adds the include paths (to compiles) and libraries (to link commangs) actually used by the specific programs. There?s no find_package(ITK) at the top level of the build tree; there?s a specific find_package in each subdirectory that only requests the COMPONENTS actually referenced. ________________________________ 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. ________________________________ -------------- 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 michkapopoff at gmail.com Mon Aug 11 13:10:26 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Mon, 11 Aug 2014 19:10:26 +0200 Subject: [ITK] [ITK-dev] VtkGlue module -- strange configuration. In-Reply-To: References: Message-ID: Hi moving this to the new community mailing list. I made a patch some days ago fixing a bug for old VTK versions under 5.5, where VTK_VERSION was not defined, but that is another topic I think. https://github.com/InsightSoftwareConsortium/ITK/commit/1f41404903e50102c2ed5271d9caeec41807d014 This minimal version you see was introduced here: https://github.com/InsightSoftwareConsortium/ITK/commit/913e2164cca521f791aac6d20bce34cba9831e96 I guess we could just set VERSION_MIN to 5.10.0, and make a fix for ITK 4.6.1. Michka On 11 ao?t 2014, at 18:49, Williams, Norman K wrote: > I?ve been messing with making the VtkGlue module use a more specific signature for find_package(VTK)* > > In ITK/Modules/Bridge/VtkGlue/itk-module-init.cmake there?s this: > > set(VERSION_MIN "5.9.20110419") > > ? which as far as I can tell is nonsense; I checked out the VTK version from April 19th 2011, and the VTK version is set to be 5.9.0 > > I don?t think the VTK_BUILD_VERSION would ever be set to a specific date stamp. > > What is required ? in order to use find_package(VTK COMPONENTS ?) -- would be the first revision after VTK Modularization was working. And in fact, given how VTK sets its version numbers ? hard coded in the top level CMakeLists.txt ? I don?t even know how that would work. > > Any ideas? > > *This is an outgrowth of the work I?m doing on tailoring BRAINSTools? dependency processing in CMake for Slicer inclusion. Specifically, rather than use find_package(ITK REQUIRED) use find_package(ITK COMPONENTS ? REQUIRED) ? this only adds the include paths (to compiles) and libraries (to link commangs) actually used by the specific programs. There?s no find_package(ITK) at the top level of the build tree; there?s a specific find_package in each subdirectory that only requests the COMPONENTS actually referenced. > > > > > > 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 > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Aug 11 13:32:21 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 13:32:21 -0400 Subject: [ITK] [ITK-dev] VtkGlue module -- strange configuration. In-Reply-To: References: Message-ID: I set that version. VTK used to use a nightly version stamp. If I recall, there was a fix made in vtk regarding meta library configurations. It could probably be set to 6.0. On Mon, Aug 11, 2014 at 12:49 PM, Williams, Norman K wrote: > I?ve been messing with making the VtkGlue module use a more specific > signature for find_package(VTK)* > > In ITK/Modules/Bridge/VtkGlue/itk-module-init.cmake there?s this: > > set(VERSION_MIN "5.9.20110419") > > ? which as far as I can tell is nonsense; I checked out the VTK version from > April 19th 2011, and the VTK version is set to be 5.9.0 > > I don?t think the VTK_BUILD_VERSION would ever be set to a specific date > stamp. > > What is required ? in order to use find_package(VTK COMPONENTS ?) -- would > be the first revision after VTK Modularization was working. And in fact, > given how VTK sets its version numbers ? hard coded in the top level > CMakeLists.txt ? I don?t even know how that would work. > > Any ideas? > > *This is an outgrowth of the work I?m doing on tailoring BRAINSTools? > dependency processing in CMake for Slicer inclusion. Specifically, rather > than use find_package(ITK REQUIRED) use find_package(ITK COMPONENTS ? > REQUIRED) ? this only adds the include paths (to compiles) and libraries (to > link commangs) actually used by the specific programs. There?s no > find_package(ITK) at the top level of the build tree; there?s a specific > find_package in each subdirectory that only requests the COMPONENTS actually > referenced. > > > > > > ________________________________ > 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 > -- 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 bill.lorensen at gmail.com Mon Aug 11 13:33:00 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 13:33:00 -0400 Subject: [ITK] [ITK-dev] VtkGlue module -- strange configuration. In-Reply-To: References: Message-ID: Or set to VTK 5.10 On Mon, Aug 11, 2014 at 1:32 PM, Bill Lorensen wrote: > I set that version. VTK used to use a nightly version stamp. If I > recall, there was a fix made in vtk regarding meta library > configurations. It could probably be set to 6.0. > > > On Mon, Aug 11, 2014 at 12:49 PM, Williams, Norman K > wrote: >> I?ve been messing with making the VtkGlue module use a more specific >> signature for find_package(VTK)* >> >> In ITK/Modules/Bridge/VtkGlue/itk-module-init.cmake there?s this: >> >> set(VERSION_MIN "5.9.20110419") >> >> ? which as far as I can tell is nonsense; I checked out the VTK version from >> April 19th 2011, and the VTK version is set to be 5.9.0 >> >> I don?t think the VTK_BUILD_VERSION would ever be set to a specific date >> stamp. >> >> What is required ? in order to use find_package(VTK COMPONENTS ?) -- would >> be the first revision after VTK Modularization was working. And in fact, >> given how VTK sets its version numbers ? hard coded in the top level >> CMakeLists.txt ? I don?t even know how that would work. >> >> Any ideas? >> >> *This is an outgrowth of the work I?m doing on tailoring BRAINSTools? >> dependency processing in CMake for Slicer inclusion. Specifically, rather >> than use find_package(ITK REQUIRED) use find_package(ITK COMPONENTS ? >> REQUIRED) ? this only adds the include paths (to compiles) and libraries (to >> link commangs) actually used by the specific programs. There?s no >> find_package(ITK) at the top level of the build tree; there?s a specific >> find_package in each subdirectory that only requests the COMPONENTS actually >> referenced. >> >> >> >> >> >> ________________________________ >> 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 >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- 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 bill.lorensen at gmail.com Mon Aug 11 13:36:06 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 13:36:06 -0400 Subject: [ITK] [ITK-dev] VtkGlue module -- strange configuration. In-Reply-To: References: Message-ID: The commit log for my change says it all: commit 913e2164cca521f791aac6d20bce34cba9831e96 Author: Bill Lorensen Date: Sun Feb 19 08:21:41 2012 -0500 BUG: Older version of VTK cannot be used with ITK Versions of VTK prior to April 19, 2011 cannot be used with ITKv4 because of issues with MetaIO. Note that VTK 5.9 contains this error. These older version will produce the compile errors: MetaObject does not name a type MetaObjectType does not name a type plus others. The errors are caused by a change in the way MetaIO configures itself. Since VTK commit eb532553, (MetaIO: Avoid requiring parent projects to provide "../metaIOConfig.h", 2011-04-06) MetaIO configures a header into it's build tree.) The earliest VTK commit tag that will work is be4c4f115793598f6c8937a98bdd1f227d471540 Change-Id: I58506c09b53344a8550df9aed5a9ceda844597e4 On Mon, Aug 11, 2014 at 1:33 PM, Bill Lorensen wrote: > Or set to VTK 5.10 > > > On Mon, Aug 11, 2014 at 1:32 PM, Bill Lorensen wrote: >> I set that version. VTK used to use a nightly version stamp. If I >> recall, there was a fix made in vtk regarding meta library >> configurations. It could probably be set to 6.0. >> >> >> On Mon, Aug 11, 2014 at 12:49 PM, Williams, Norman K >> wrote: >>> I?ve been messing with making the VtkGlue module use a more specific >>> signature for find_package(VTK)* >>> >>> In ITK/Modules/Bridge/VtkGlue/itk-module-init.cmake there?s this: >>> >>> set(VERSION_MIN "5.9.20110419") >>> >>> ? which as far as I can tell is nonsense; I checked out the VTK version from >>> April 19th 2011, and the VTK version is set to be 5.9.0 >>> >>> I don?t think the VTK_BUILD_VERSION would ever be set to a specific date >>> stamp. >>> >>> What is required ? in order to use find_package(VTK COMPONENTS ?) -- would >>> be the first revision after VTK Modularization was working. And in fact, >>> given how VTK sets its version numbers ? hard coded in the top level >>> CMakeLists.txt ? I don?t even know how that would work. >>> >>> Any ideas? >>> >>> *This is an outgrowth of the work I?m doing on tailoring BRAINSTools? >>> dependency processing in CMake for Slicer inclusion. Specifically, rather >>> than use find_package(ITK REQUIRED) use find_package(ITK COMPONENTS ? >>> REQUIRED) ? this only adds the include paths (to compiles) and libraries (to >>> link commangs) actually used by the specific programs. There?s no >>> find_package(ITK) at the top level of the build tree; there?s a specific >>> find_package in each subdirectory that only requests the COMPONENTS actually >>> referenced. >>> >>> >>> >>> >>> >>> ________________________________ >>> 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 >>> >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com -- 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 bill.lorensen at gmail.com Mon Aug 11 13:39:44 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 13:39:44 -0400 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Can you post your code. The results do not look correct. On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass wrote: > Dear all, > > I'm having problems using the anti-alias filter, which I want to use in > order to smooth a binary segmentation volume. I'm using essentially the > example code from the repository, which for my input file seems to start > oscillating after 2 iterations, leading to weird 'pointy' artifacts on the > surface as can be seen from the attached screenshot (AA filter output is on > the left, input on the right). > > Is there any parameter to set/implement which could improve the behavior of > this filter? I'm assuming that my input is reasonable, or is this something > the filter is expected to have problems with? It is notable that such errors > seem to mainly appear in 'flat' regions of the volume, and are not apparent > in the curved shaft of the bone. > > Any help, or pointers to further resources are appreciated, > thanks, > Tobias > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 gass at vision.ee.ethz.ch Mon Aug 11 14:47:49 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Mon, 11 Aug 2014 20:47:49 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: > Can you post your code. The results do not look correct. Sure. The {write,read}Image functions are just convenient wrappers for the respective ITK tools. #include #include #include "argstream.h" #include "ImageUtils.h" #include "itkAntiAliasBinaryImageFilter.h" using namespace std; using namespace itk; int main(int argc, char ** argv) { feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); typedef short PixelType; typedef double OutputPixelType; const unsigned int D=3; typedef Image ImageType; typedef ImageType::Pointer ImagePointerType; typedef Image OutputImageType; typedef OutputImageType::Pointer OutputImagePointerType; argstream * as=new argstream(argc,argv); string inFile, outFile; double thresh=0.0; (*as) >> parameter ("in", inFile, " filename...", true); (*as) >> parameter ("out", outFile, " filename...", true); (*as) >> help(); as->defaultErrorHandling(); ImagePointerType img = ImageUtils::readImage(inFile); typedef itk::AntiAliasBinaryImageFilter AntiAliasBinaryImageFilterType; AntiAliasBinaryImageFilterType::Pointer antiAliasFilter = AntiAliasBinaryImageFilterType::New (); antiAliasFilter->SetInput(img); antiAliasFilter->SetNumberOfIterations(5); antiAliasFilter->SetMaximumRMSError(0.02); antiAliasFilter->Update(); // For increased code coverage. Does nothing. antiAliasFilter->GetMaximumRMSError(); antiAliasFilter->Update(); std::cout << "Maximum RMS change value threshold was: 0.02 " << std::endl; std::cout << "Last RMS change value was: " << antiAliasFilter->GetRMSChange() << std::endl; std::cout<< antiAliasFilter->GetElapsedIterations() <GetLowerBinaryValue()<<" "<< antiAliasFilter->GetUpperBinaryValue()<GetOutput(); ImageUtils::writeImage(outFile,out); return 1; } I tried different values for maxIter (1,2,3,4,5,10,100,1000) and maxRMSError (0.02 0.07 0.08 0.8), and the best visual results are achieved after one iteration where RMSE changes by about 0.08. This increases for all following iterations, which have an RMSE-change of about 0.25 for all number of iterations tested. All this is using ITK 4.5 pulled from the GIT repository a while ago, running on an intel i7 on Debian. Thanks a lot! Tobias > > On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass > wrote: > > Dear all, > > > > I'm having problems using the anti-alias filter, which I want to use in > > order to smooth a binary segmentation volume. I'm using essentially the > > example code from the repository, which for my input file seems to start > > oscillating after 2 iterations, leading to weird 'pointy' artifacts on > the > > surface as can be seen from the attached screenshot (AA filter output is > on > > the left, input on the right). > > > > Is there any parameter to set/implement which could improve the behavior > of > > this filter? I'm assuming that my input is reasonable, or is this > something > > the filter is expected to have problems with? It is notable that such > errors > > seem to mainly appear in 'flat' regions of the volume, and are not > apparent > > in the curved shaft of the bone. > > > > Any help, or pointers to further resources are appreciated, > > thanks, > > Tobias > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the 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 bill.lorensen at gmail.com Mon Aug 11 15:22:09 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 15:22:09 -0400 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: If you change typedef short PixelType; to typedef double PixelType; do the results change. On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass wrote: > >> Can you post your code. The results do not look correct. > > > Sure. The {write,read}Image functions are just convenient wrappers for the > respective ITK tools. > > > #include > > #include > > #include "argstream.h" > > #include "ImageUtils.h" > > #include "itkAntiAliasBinaryImageFilter.h" > > using namespace std; > > using namespace itk; > > > > > int main(int argc, char ** argv) > > { > > > feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); > > typedef short PixelType; > > typedef double OutputPixelType; > > const unsigned int D=3; > > typedef Image ImageType; > > > > typedef ImageType::Pointer ImagePointerType; > > > > typedef Image OutputImageType; > > typedef OutputImageType::Pointer OutputImagePointerType; > > > > argstream * as=new argstream(argc,argv); > > string inFile, outFile; > > double thresh=0.0; > > (*as) >> parameter ("in", inFile, " filename...", true); > > (*as) >> parameter ("out", outFile, " filename...", true); > > > (*as) >> help(); > > as->defaultErrorHandling(); > > > ImagePointerType img = ImageUtils::readImage(inFile); > > > typedef itk::AntiAliasBinaryImageFilter > > AntiAliasBinaryImageFilterType; > > > > AntiAliasBinaryImageFilterType::Pointer antiAliasFilter > > = AntiAliasBinaryImageFilterType::New (); > > antiAliasFilter->SetInput(img); > > antiAliasFilter->SetNumberOfIterations(5); > > antiAliasFilter->SetMaximumRMSError(0.02); > > > antiAliasFilter->Update(); > > > // For increased code coverage. Does nothing. > > antiAliasFilter->GetMaximumRMSError(); > > > > > antiAliasFilter->Update(); > > > std::cout << "Maximum RMS change value threshold was: 0.02 " << std::endl; > > std::cout << "Last RMS change value was: " << > antiAliasFilter->GetRMSChange() << std::endl; > > > std::cout<< antiAliasFilter->GetElapsedIterations() < > > std::cout<GetLowerBinaryValue()<<" "<< > antiAliasFilter->GetUpperBinaryValue()< > > OutputImagePointerType out=antiAliasFilter->GetOutput(); > > > ImageUtils::writeImage(outFile,out); > > > return 1; > > } > > > I tried different values for maxIter (1,2,3,4,5,10,100,1000) and maxRMSError > (0.02 0.07 0.08 0.8), and the best visual results are achieved after one > iteration where RMSE changes by about 0.08. This increases for all following > iterations, which have an RMSE-change of about 0.25 for all number of > iterations tested. All this is using ITK 4.5 pulled from the GIT repository > a while ago, running on an intel i7 on Debian. > > Thanks a lot! > Tobias > >> >> >> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass >> wrote: >> > Dear all, >> > >> > I'm having problems using the anti-alias filter, which I want to use in >> > order to smooth a binary segmentation volume. I'm using essentially the >> > example code from the repository, which for my input file seems to start >> > oscillating after 2 iterations, leading to weird 'pointy' artifacts on >> > the >> > surface as can be seen from the attached screenshot (AA filter output is >> > on >> > the left, input on the right). >> > >> > Is there any parameter to set/implement which could improve the behavior >> > of >> > this filter? I'm assuming that my input is reasonable, or is this >> > something >> > the filter is expected to have problems with? It is notable that such >> > errors >> > seem to mainly appear in 'flat' regions of the volume, and are not >> > apparent >> > in the curved shaft of the bone. >> > >> > Any help, or pointers to further resources are appreciated, >> > thanks, >> > Tobias >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the 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 > > -- 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 Aug 11 15:22:44 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 15:22:44 -0400 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: How are you extracting the final isosurface? On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen wrote: > If you change > typedef short PixelType; > to > typedef double PixelType; > > do the results change. > > > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass wrote: >> >>> Can you post your code. The results do not look correct. >> >> >> Sure. The {write,read}Image functions are just convenient wrappers for the >> respective ITK tools. >> >> >> #include >> >> #include >> >> #include "argstream.h" >> >> #include "ImageUtils.h" >> >> #include "itkAntiAliasBinaryImageFilter.h" >> >> using namespace std; >> >> using namespace itk; >> >> >> >> >> int main(int argc, char ** argv) >> >> { >> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); >> >> typedef short PixelType; >> >> typedef double OutputPixelType; >> >> const unsigned int D=3; >> >> typedef Image ImageType; >> >> >> >> typedef ImageType::Pointer ImagePointerType; >> >> >> >> typedef Image OutputImageType; >> >> typedef OutputImageType::Pointer OutputImagePointerType; >> >> >> >> argstream * as=new argstream(argc,argv); >> >> string inFile, outFile; >> >> double thresh=0.0; >> >> (*as) >> parameter ("in", inFile, " filename...", true); >> >> (*as) >> parameter ("out", outFile, " filename...", true); >> >> >> (*as) >> help(); >> >> as->defaultErrorHandling(); >> >> >> ImagePointerType img = ImageUtils::readImage(inFile); >> >> >> typedef itk::AntiAliasBinaryImageFilter >> >> AntiAliasBinaryImageFilterType; >> >> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter >> >> = AntiAliasBinaryImageFilterType::New (); >> >> antiAliasFilter->SetInput(img); >> >> antiAliasFilter->SetNumberOfIterations(5); >> >> antiAliasFilter->SetMaximumRMSError(0.02); >> >> >> antiAliasFilter->Update(); >> >> >> // For increased code coverage. Does nothing. >> >> antiAliasFilter->GetMaximumRMSError(); >> >> >> >> >> antiAliasFilter->Update(); >> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " << std::endl; >> >> std::cout << "Last RMS change value was: " << >> antiAliasFilter->GetRMSChange() << std::endl; >> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() <> >> >> std::cout<GetLowerBinaryValue()<<" "<< >> antiAliasFilter->GetUpperBinaryValue()<> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); >> >> >> ImageUtils::writeImage(outFile,out); >> >> >> return 1; >> >> } >> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and maxRMSError >> (0.02 0.07 0.08 0.8), and the best visual results are achieved after one >> iteration where RMSE changes by about 0.08. This increases for all following >> iterations, which have an RMSE-change of about 0.25 for all number of >> iterations tested. All this is using ITK 4.5 pulled from the GIT repository >> a while ago, running on an intel i7 on Debian. >> >> Thanks a lot! >> Tobias >> >>> >>> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass >>> wrote: >>> > Dear all, >>> > >>> > I'm having problems using the anti-alias filter, which I want to use in >>> > order to smooth a binary segmentation volume. I'm using essentially the >>> > example code from the repository, which for my input file seems to start >>> > oscillating after 2 iterations, leading to weird 'pointy' artifacts on >>> > the >>> > surface as can be seen from the attached screenshot (AA filter output is >>> > on >>> > the left, input on the right). >>> > >>> > Is there any parameter to set/implement which could improve the behavior >>> > of >>> > this filter? I'm assuming that my input is reasonable, or is this >>> > something >>> > the filter is expected to have problems with? It is notable that such >>> > errors >>> > seem to mainly appear in 'flat' regions of the volume, and are not >>> > apparent >>> > in the curved shaft of the bone. >>> > >>> > Any help, or pointers to further resources are appreciated, >>> > thanks, >>> > Tobias >>> > >>> > _____________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Kitware offers ITK Training Courses, for more information visit: >>> > http://www.kitware.com/products/protraining.php >>> > >>> > Please keep messages on-topic and check the 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 >> >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- 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 gass at vision.ee.ethz.ch Mon Aug 11 15:38:45 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Mon, 11 Aug 2014 21:38:45 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: I will try that tomorrow morning (living in GMT+1). I used paraview to extract the isosurface, but also looked at the output of the AA-filter directly (which looked fuzzy). I can also post an image of that tomorrow. Thanks for your help! Tobias 2014-08-11 21:22 GMT+02:00 Bill Lorensen : > How are you extracting the final isosurface? > > On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen > wrote: > > If you change > > typedef short PixelType; > > to > > typedef double PixelType; > > > > do the results change. > > > > > > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass > wrote: > >> > >>> Can you post your code. The results do not look correct. > >> > >> > >> Sure. The {write,read}Image functions are just convenient wrappers for > the > >> respective ITK tools. > >> > >> > >> #include > >> > >> #include > >> > >> #include "argstream.h" > >> > >> #include "ImageUtils.h" > >> > >> #include "itkAntiAliasBinaryImageFilter.h" > >> > >> using namespace std; > >> > >> using namespace itk; > >> > >> > >> > >> > >> int main(int argc, char ** argv) > >> > >> { > >> > >> > >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); > >> > >> typedef short PixelType; > >> > >> typedef double OutputPixelType; > >> > >> const unsigned int D=3; > >> > >> typedef Image ImageType; > >> > >> > >> > >> typedef ImageType::Pointer ImagePointerType; > >> > >> > >> > >> typedef Image OutputImageType; > >> > >> typedef OutputImageType::Pointer OutputImagePointerType; > >> > >> > >> > >> argstream * as=new argstream(argc,argv); > >> > >> string inFile, outFile; > >> > >> double thresh=0.0; > >> > >> (*as) >> parameter ("in", inFile, " filename...", true); > >> > >> (*as) >> parameter ("out", outFile, " filename...", true); > >> > >> > >> (*as) >> help(); > >> > >> as->defaultErrorHandling(); > >> > >> > >> ImagePointerType img = ImageUtils::readImage(inFile); > >> > >> > >> typedef itk::AntiAliasBinaryImageFilter > >> > >> AntiAliasBinaryImageFilterType; > >> > >> > >> > >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter > >> > >> = AntiAliasBinaryImageFilterType::New (); > >> > >> antiAliasFilter->SetInput(img); > >> > >> antiAliasFilter->SetNumberOfIterations(5); > >> > >> antiAliasFilter->SetMaximumRMSError(0.02); > >> > >> > >> antiAliasFilter->Update(); > >> > >> > >> // For increased code coverage. Does nothing. > >> > >> antiAliasFilter->GetMaximumRMSError(); > >> > >> > >> > >> > >> antiAliasFilter->Update(); > >> > >> > >> std::cout << "Maximum RMS change value threshold was: 0.02 " << > std::endl; > >> > >> std::cout << "Last RMS change value was: " << > >> antiAliasFilter->GetRMSChange() << std::endl; > >> > >> > >> std::cout<< antiAliasFilter->GetElapsedIterations() < >> > >> > >> std::cout<GetLowerBinaryValue()<<" "<< > >> antiAliasFilter->GetUpperBinaryValue()< >> > >> > >> OutputImagePointerType out=antiAliasFilter->GetOutput(); > >> > >> > >> ImageUtils::writeImage(outFile,out); > >> > >> > >> return 1; > >> > >> } > >> > >> > >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and > maxRMSError > >> (0.02 0.07 0.08 0.8), and the best visual results are achieved after one > >> iteration where RMSE changes by about 0.08. This increases for all > following > >> iterations, which have an RMSE-change of about 0.25 for all number of > >> iterations tested. All this is using ITK 4.5 pulled from the GIT > repository > >> a while ago, running on an intel i7 on Debian. > >> > >> Thanks a lot! > >> Tobias > >> > >>> > >>> > >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass > >>> wrote: > >>> > Dear all, > >>> > > >>> > I'm having problems using the anti-alias filter, which I want to use > in > >>> > order to smooth a binary segmentation volume. I'm using essentially > the > >>> > example code from the repository, which for my input file seems to > start > >>> > oscillating after 2 iterations, leading to weird 'pointy' artifacts > on > >>> > the > >>> > surface as can be seen from the attached screenshot (AA filter > output is > >>> > on > >>> > the left, input on the right). > >>> > > >>> > Is there any parameter to set/implement which could improve the > behavior > >>> > of > >>> > this filter? I'm assuming that my input is reasonable, or is this > >>> > something > >>> > the filter is expected to have problems with? It is notable that such > >>> > errors > >>> > seem to mainly appear in 'flat' regions of the volume, and are not > >>> > apparent > >>> > in the curved shaft of the bone. > >>> > > >>> > Any help, or pointers to further resources are appreciated, > >>> > thanks, > >>> > Tobias > >>> > > >>> > _____________________________________ > >>> > Powered by www.kitware.com > >>> > > >>> > Visit other Kitware open-source projects at > >>> > http://www.kitware.com/opensource/opensource.html > >>> > > >>> > Kitware offers ITK Training Courses, for more information visit: > >>> > http://www.kitware.com/products/protraining.php > >>> > > >>> > Please keep messages on-topic and check the 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 > >> > >> > > > > > > > > -- > > Unpaid intern in BillsBasement at noware dot com > > > > -- > 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 bill.lorensen at gmail.com Mon Aug 11 16:17:10 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 11 Aug 2014 16:17:10 -0400 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Paraview should do the right thing. On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass wrote: > I will try that tomorrow morning (living in GMT+1). I used paraview to > extract the isosurface, but also looked at the output of the AA-filter > directly (which looked fuzzy). I can also post an image of that tomorrow. > > Thanks for your help! > Tobias > > > 2014-08-11 21:22 GMT+02:00 Bill Lorensen : > >> How are you extracting the final isosurface? >> >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen >> wrote: >> > If you change >> > typedef short PixelType; >> > to >> > typedef double PixelType; >> > >> > do the results change. >> > >> > >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass >> > wrote: >> >> >> >>> Can you post your code. The results do not look correct. >> >> >> >> >> >> Sure. The {write,read}Image functions are just convenient wrappers for >> >> the >> >> respective ITK tools. >> >> >> >> >> >> #include >> >> >> >> #include >> >> >> >> #include "argstream.h" >> >> >> >> #include "ImageUtils.h" >> >> >> >> #include "itkAntiAliasBinaryImageFilter.h" >> >> >> >> using namespace std; >> >> >> >> using namespace itk; >> >> >> >> >> >> >> >> >> >> int main(int argc, char ** argv) >> >> >> >> { >> >> >> >> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); >> >> >> >> typedef short PixelType; >> >> >> >> typedef double OutputPixelType; >> >> >> >> const unsigned int D=3; >> >> >> >> typedef Image ImageType; >> >> >> >> >> >> >> >> typedef ImageType::Pointer ImagePointerType; >> >> >> >> >> >> >> >> typedef Image OutputImageType; >> >> >> >> typedef OutputImageType::Pointer OutputImagePointerType; >> >> >> >> >> >> >> >> argstream * as=new argstream(argc,argv); >> >> >> >> string inFile, outFile; >> >> >> >> double thresh=0.0; >> >> >> >> (*as) >> parameter ("in", inFile, " filename...", true); >> >> >> >> (*as) >> parameter ("out", outFile, " filename...", true); >> >> >> >> >> >> (*as) >> help(); >> >> >> >> as->defaultErrorHandling(); >> >> >> >> >> >> ImagePointerType img = ImageUtils::readImage(inFile); >> >> >> >> >> >> typedef itk::AntiAliasBinaryImageFilter > >> OutputImageType> >> >> >> >> AntiAliasBinaryImageFilterType; >> >> >> >> >> >> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter >> >> >> >> = AntiAliasBinaryImageFilterType::New (); >> >> >> >> antiAliasFilter->SetInput(img); >> >> >> >> antiAliasFilter->SetNumberOfIterations(5); >> >> >> >> antiAliasFilter->SetMaximumRMSError(0.02); >> >> >> >> >> >> antiAliasFilter->Update(); >> >> >> >> >> >> // For increased code coverage. Does nothing. >> >> >> >> antiAliasFilter->GetMaximumRMSError(); >> >> >> >> >> >> >> >> >> >> antiAliasFilter->Update(); >> >> >> >> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " << >> >> std::endl; >> >> >> >> std::cout << "Last RMS change value was: " << >> >> antiAliasFilter->GetRMSChange() << std::endl; >> >> >> >> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() <> >> >> >> >> >> std::cout<GetLowerBinaryValue()<<" "<< >> >> antiAliasFilter->GetUpperBinaryValue()<> >> >> >> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); >> >> >> >> >> >> ImageUtils::writeImage(outFile,out); >> >> >> >> >> >> return 1; >> >> >> >> } >> >> >> >> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and >> >> maxRMSError >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved after >> >> one >> >> iteration where RMSE changes by about 0.08. This increases for all >> >> following >> >> iterations, which have an RMSE-change of about 0.25 for all number of >> >> iterations tested. All this is using ITK 4.5 pulled from the GIT >> >> repository >> >> a while ago, running on an intel i7 on Debian. >> >> >> >> Thanks a lot! >> >> Tobias >> >> >> >>> >> >>> >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass >> >>> wrote: >> >>> > Dear all, >> >>> > >> >>> > I'm having problems using the anti-alias filter, which I want to use >> >>> > in >> >>> > order to smooth a binary segmentation volume. I'm using essentially >> >>> > the >> >>> > example code from the repository, which for my input file seems to >> >>> > start >> >>> > oscillating after 2 iterations, leading to weird 'pointy' artifacts >> >>> > on >> >>> > the >> >>> > surface as can be seen from the attached screenshot (AA filter >> >>> > output is >> >>> > on >> >>> > the left, input on the right). >> >>> > >> >>> > Is there any parameter to set/implement which could improve the >> >>> > behavior >> >>> > of >> >>> > this filter? I'm assuming that my input is reasonable, or is this >> >>> > something >> >>> > the filter is expected to have problems with? It is notable that >> >>> > such >> >>> > errors >> >>> > seem to mainly appear in 'flat' regions of the volume, and are not >> >>> > apparent >> >>> > in the curved shaft of the bone. >> >>> > >> >>> > Any help, or pointers to further resources are appreciated, >> >>> > thanks, >> >>> > Tobias >> >>> > >> >>> > _____________________________________ >> >>> > Powered by www.kitware.com >> >>> > >> >>> > Visit other Kitware open-source projects at >> >>> > http://www.kitware.com/opensource/opensource.html >> >>> > >> >>> > Kitware offers ITK Training Courses, for more information visit: >> >>> > http://www.kitware.com/products/protraining.php >> >>> > >> >>> > Please keep messages on-topic and check the 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 >> >> >> >> >> > >> > >> > >> > -- >> > Unpaid intern in BillsBasement at noware dot com >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > -- 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 matt.mccormick at kitware.com Mon Aug 11 23:20:15 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 11 Aug 2014 23:20:15 -0400 Subject: [ITK] Pull requests on github In-Reply-To: <78A8BBD4-D4F6-4D4F-B88D-674D0BD7A27C@gmail.com> References: <78A8BBD4-D4F6-4D4F-B88D-674D0BD7A27C@gmail.com> Message-ID: Hi Michka, I looked around, and apparently it is not possible to disable pull requests [1]. But, getting pull requests forwarded to gerrit, as suggested by Jean-Christophe Fillion-Robin, is on the radar. I see you update the links in the README -- excellent! Thanks, Matt [1] https://github.com/torvalds/linux/pull/17 On Thu, Jul 31, 2014 at 5:59 PM, Michka Popoff wrote: > Hi > > would it be possible to close the pull request feature on the ITK github accounts ? > This will prevent double posting patches (and asking people to move their patch to gerrit). They should directly post on gerrit. > > Maybe we would need to add one sentence in the README, people on github are accustomed to use pull requests, > so they will maybe wonder where to post their patches ? (And maybe also a link to the JIRA bug tracker). > > Thanks > > Michka > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From matt.mccormick at kitware.com Tue Aug 12 00:04:47 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 12 Aug 2014 00:04:47 -0400 Subject: [ITK] "Can We Trust the Libraries We Use?", i.e. "You've got JPEG" Message-ID: Michka, Ho, and Ben pointed out a very good blog post that looked at the output of a static code analysis tool on ITK and the third party libraries that it uses: http://www.viva64.com/en/b/0271/ The post brings up admirable principles, namely: 1) Use automated code quality tools. 2) Avoid duplication of effort and improve overall excellence by using open source libraries. 3) Reduce maintenance costs by pushing fixes upstream. ITK has strong practices in these areas and is continuously making improvements. In particular, 1) The cross-platform continuous testing on the software quality dashboard [1] has long been a strong suit [1]. On the dashboard we configure, build, and test, but we also run valgrind dynamic memory analysis and gcov coverage testing. The latter are available on CDash and also posted to Bill L's website [2]. We also have Coverity static analysis [3]. Following Bill H's setup instructions, Sean and Kent's posts to the list, I will also be setting up scan-build static analysis [4]. [1] http://open.cdash.org/index.php?project=Insight [2] http://lorensen.github.io/VTKCodeCoverage/ITK/index.html [3] https://scan.coverity.com/projects/783 [4] http://clang-analyzer.llvm.org/scan-build.html 2) ITK uses a number of excellent ThirdParty open source libraries, found in the Modules/ThirdParty directory. We are continually improving our CMake configuration to support additional ITK_USE_SYSTEM_ so native system libraries can be utilized. For example, in the last four releases, for example, we have improved support for [1] * ITK_USE_SYSTEM_VXL * ITK_USE_SYSTEM_TIFF * ITK_USE_SYSTEM_EXPAT * ITK_USE_SYSTEM_DCMTK * ITK_USE_SYSTEM_HDF5 [1] http://www.itk.org/Wiki/ITK/Releases 3) We are always trying to improve our efforts to push fixes upstream and stay in sync with upstream. Recently, a big step forward in this area has been led by Brad King and Brian Helba, who have improved and generalized a process to perform git subtree merges of third party libraries [1]. This technical improvement to version management of third party libraries allows us to stay in sync with upstream, push patches upstream, and ensure upstream and our patches pushed upstream retain proper credit. This method is applied to a number of third party libraries in the tree, and we are incrementally adding more. A few that are admittedly in great need of updates, as noted in the article, are OpenJPEG and GDCM. [1] http://review.source.kitware.com/#/c/14175/ All contributions to these efforts are welcome! On a side note, the issues brought up have been addressed in the following patches: http://review.source.kitware.com/#/c/16617/ http://review.source.kitware.com/#/c/16623/ http://review.source.kitware.com/#/c/16626/ http://review.source.kitware.com/#/c/16627/ http://review.source.kitware.com/#/c/16624/ http://review.source.kitware.com/#/c/16628/ http://review.source.kitware.com/#/c/16629/ From michkapopoff at gmail.com Tue Aug 12 02:00:59 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Tue, 12 Aug 2014 08:00:59 +0200 Subject: [ITK] Pull requests on github In-Reply-To: References: <78A8BBD4-D4F6-4D4F-B88D-674D0BD7A27C@gmail.com> Message-ID: <2883176D-23F0-4A87-B68E-DFD2FD81DB59@gmail.com> Thanks matt Integrating with gerrit, if possible, would be cool. It may lower the entry difficulty for new users. The link to the pull request discussion is epic :) Michka On 12 ao?t 2014, at 05:20, Matt McCormick wrote: > Hi Michka, > > I looked around, and apparently it is not possible to disable pull > requests [1]. But, getting pull requests forwarded to gerrit, as > suggested by Jean-Christophe Fillion-Robin, is on the radar. > > I see you update the links in the README -- excellent! > > Thanks, > Matt > > > [1] https://github.com/torvalds/linux/pull/17 > > > On Thu, Jul 31, 2014 at 5:59 PM, Michka Popoff wrote: >> Hi >> >> would it be possible to close the pull request feature on the ITK github accounts ? >> This will prevent double posting patches (and asking people to move their patch to gerrit). They should directly post on gerrit. >> >> Maybe we would need to add one sentence in the README, people on github are accustomed to use pull requests, >> so they will maybe wonder where to post their patches ? (And maybe also a link to the JIRA bug tracker). >> >> Thanks >> >> Michka >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community From grothausmann.roman at mh-hannover.de Tue Aug 12 04:14:37 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Tue, 12 Aug 2014 10:14:37 +0200 Subject: [ITK] [ITK-users] adding a global hierarchical watershed segmentation mode to itksnap In-Reply-To: <0f32755d9980441ca0162728b088f00b@queensu.ca> References: <53E85181.8040607@mh-hannover.de> <0f32755d9980441ca0162728b088f00b@queensu.ca> Message-ID: <53E9CCED.1000604@mh-hannover.de> Hi Andras, Many thanks for Your hints. We'll test them on our data. However, our data is not as standardized in quality as CT or MRT data and from our experience many of the "magic" segmentations demonstrated on CT or MRT data does not work on our data. However, of all the segmentation modules I could find in Slicer or elsewhere none was based on a hierarchical watershed algorithm like the SegmentationEditor of the InsightApplications. Is there any other that I've missed? Concerning my idea to implement this if no tool currently already exists: Would such an extension be of more use in Slicer or itksnap? For which of the both would it likely be easier to integrate the extension? Best wishes Roman On 11/08/14 16:20, Andras Lasso wrote: > Have you tried segmentation tools in 3D Slicer? There is a multi-label watershed > segmentation tool that works in 3d > (http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Editor#WatershedFromMarkers), > there are also a number of other generic semi-automatic segmentation tools (such > as GrowCut) and a few fully-automatic specialized tools (for brain, > airways, etc). Download the nightly build and also checkout the Segmentation > category in the Extension Manager. > > Andras > > *From:* Dr. Roman Grothausmann > *Sent:* ?Monday?, ?August? ?11?, ?2014 ?1?:?15? ?AM > *To:* itksnap-users at googlegroups.com > *Cc:* ITK Mailing List > > Dear mailing list members, > > > For a long time now I've been searching for a replacement of the old > SegmentationEditor (part of the InsightApplications) which I could not get to > work even with older ITK-3.x. Somewhere I was told that it was integrated and > maintained within itksnap. However the only tool in itksnap based on watershed > segmentation seems to be the adaptive brush. It is very handy, but > time-consuming in 3D and only for local segmentations. In contrast the > SegmentationEditor used a global hierarchical watershed segmentation to pick > labels from, see e.g. the video linked here: > http://www.insight-journal.org/browse/publication/70 > Quite often now I've stumbled over data, that would likely have profited a lot > of such a tool for segmentation. > > If such a tool working with ITK-4.x does not exist any more, I thought of > implementing it as a global WS segmentation mode in itksnap. That way making the > tool easier to find, to use and to ensure maintenance (should it be integrated > into the itksnap code base in the end) and also avoiding recoding a GUI with > mouse interaction and such. > > My current idea is to start, similar to the snake-tool, with pre-filtering like > smoothing and optional edge-detection. > Then the main edit mode to consist of the usual 4 subwindows showing an overlay > of the grey-image and the watershed segmentation of the hierarchical WS-filter > (hWS), side-by-side to another label-dataset (loaded like a tiled overlay) which > consist of the actually chosen labels from the hWS as the final data (FD). > The interaction I'm considering would be to LMB click on a label in the hWS > which is then added to the FD as the current fg label, or removed with a RMB. > The hierachrchy level of the hWS could be controlled by a slider or the mouse > wheel + Shift in nearly real time if some region demands higher or lower > detailed segmentation. When the fg label is changed, the segmentation added or > removed with further mouse interactions would modify the new fg label. > When all is done and the global WS mode is left, the FD label-dataset is added > to the main segmentation of itksnap. > > Would that be possible to implement in itksnap 3.x? > What source files of the itksnap code base should I look at for: > - the pre-filtering mode of the snake (for the smoothing and edge detection) > - the mouse interactions (for e.g. adding the whell + Shift interaction) > - possible examples for the dual layout > > Thanks for any comments, help or hints. > 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 > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -- 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 gass at vision.ee.ethz.ch Tue Aug 12 04:44:22 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Tue, 12 Aug 2014 10:44:22 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Hi, changing the PixelType did not yield any change. However, I did some further tests which seem to point at image spacing or total size to be the culprit. My original image is fairly high-res, with 0.25mm in-plane resolution and 0.75mm slice thickness and 512x512x409 voxel size. I tried resampling the image to different isotropic resolutions (0.25, 0.3, 0.34, 0.35, 0.4, 0.5, 0.75, 1)mm isotropic spacing. For all spacings down to 0.35mm, the AA filter converged nicely and the output looks as I'd expect it. Lower than 0.35mm spacing, and it fails in the way I described (from this spacing on the #vox is equal or greater than the #voxels in my original image). Any idea what might cause this, or what to further investigate? Thanks, Tobias 2014-08-11 22:17 GMT+02:00 Bill Lorensen : > Paraview should do the right thing. > > On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass > wrote: > > I will try that tomorrow morning (living in GMT+1). I used paraview to > > extract the isosurface, but also looked at the output of the AA-filter > > directly (which looked fuzzy). I can also post an image of that tomorrow. > > > > Thanks for your help! > > Tobias > > > > > > 2014-08-11 21:22 GMT+02:00 Bill Lorensen : > > > >> How are you extracting the final isosurface? > >> > >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen > > >> wrote: > >> > If you change > >> > typedef short PixelType; > >> > to > >> > typedef double PixelType; > >> > > >> > do the results change. > >> > > >> > > >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass > >> > wrote: > >> >> > >> >>> Can you post your code. The results do not look correct. > >> >> > >> >> > >> >> Sure. The {write,read}Image functions are just convenient wrappers > for > >> >> the > >> >> respective ITK tools. > >> >> > >> >> > >> >> #include > >> >> > >> >> #include > >> >> > >> >> #include "argstream.h" > >> >> > >> >> #include "ImageUtils.h" > >> >> > >> >> #include "itkAntiAliasBinaryImageFilter.h" > >> >> > >> >> using namespace std; > >> >> > >> >> using namespace itk; > >> >> > >> >> > >> >> > >> >> > >> >> int main(int argc, char ** argv) > >> >> > >> >> { > >> >> > >> >> > >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); > >> >> > >> >> typedef short PixelType; > >> >> > >> >> typedef double OutputPixelType; > >> >> > >> >> const unsigned int D=3; > >> >> > >> >> typedef Image ImageType; > >> >> > >> >> > >> >> > >> >> typedef ImageType::Pointer ImagePointerType; > >> >> > >> >> > >> >> > >> >> typedef Image OutputImageType; > >> >> > >> >> typedef OutputImageType::Pointer OutputImagePointerType; > >> >> > >> >> > >> >> > >> >> argstream * as=new argstream(argc,argv); > >> >> > >> >> string inFile, outFile; > >> >> > >> >> double thresh=0.0; > >> >> > >> >> (*as) >> parameter ("in", inFile, " filename...", true); > >> >> > >> >> (*as) >> parameter ("out", outFile, " filename...", true); > >> >> > >> >> > >> >> (*as) >> help(); > >> >> > >> >> as->defaultErrorHandling(); > >> >> > >> >> > >> >> ImagePointerType img = ImageUtils::readImage(inFile); > >> >> > >> >> > >> >> typedef itk::AntiAliasBinaryImageFilter >> >> OutputImageType> > >> >> > >> >> AntiAliasBinaryImageFilterType; > >> >> > >> >> > >> >> > >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter > >> >> > >> >> = AntiAliasBinaryImageFilterType::New (); > >> >> > >> >> antiAliasFilter->SetInput(img); > >> >> > >> >> antiAliasFilter->SetNumberOfIterations(5); > >> >> > >> >> antiAliasFilter->SetMaximumRMSError(0.02); > >> >> > >> >> > >> >> antiAliasFilter->Update(); > >> >> > >> >> > >> >> // For increased code coverage. Does nothing. > >> >> > >> >> antiAliasFilter->GetMaximumRMSError(); > >> >> > >> >> > >> >> > >> >> > >> >> antiAliasFilter->Update(); > >> >> > >> >> > >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " << > >> >> std::endl; > >> >> > >> >> std::cout << "Last RMS change value was: " << > >> >> antiAliasFilter->GetRMSChange() << std::endl; > >> >> > >> >> > >> >> std::cout<< antiAliasFilter->GetElapsedIterations() < >> >> > >> >> > >> >> std::cout<GetLowerBinaryValue()<<" "<< > >> >> antiAliasFilter->GetUpperBinaryValue()< >> >> > >> >> > >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); > >> >> > >> >> > >> >> ImageUtils::writeImage(outFile,out); > >> >> > >> >> > >> >> return 1; > >> >> > >> >> } > >> >> > >> >> > >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and > >> >> maxRMSError > >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved after > >> >> one > >> >> iteration where RMSE changes by about 0.08. This increases for all > >> >> following > >> >> iterations, which have an RMSE-change of about 0.25 for all number of > >> >> iterations tested. All this is using ITK 4.5 pulled from the GIT > >> >> repository > >> >> a while ago, running on an intel i7 on Debian. > >> >> > >> >> Thanks a lot! > >> >> Tobias > >> >> > >> >>> > >> >>> > >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass < > gass at vision.ee.ethz.ch> > >> >>> wrote: > >> >>> > Dear all, > >> >>> > > >> >>> > I'm having problems using the anti-alias filter, which I want to > use > >> >>> > in > >> >>> > order to smooth a binary segmentation volume. I'm using > essentially > >> >>> > the > >> >>> > example code from the repository, which for my input file seems to > >> >>> > start > >> >>> > oscillating after 2 iterations, leading to weird 'pointy' > artifacts > >> >>> > on > >> >>> > the > >> >>> > surface as can be seen from the attached screenshot (AA filter > >> >>> > output is > >> >>> > on > >> >>> > the left, input on the right). > >> >>> > > >> >>> > Is there any parameter to set/implement which could improve the > >> >>> > behavior > >> >>> > of > >> >>> > this filter? I'm assuming that my input is reasonable, or is this > >> >>> > something > >> >>> > the filter is expected to have problems with? It is notable that > >> >>> > such > >> >>> > errors > >> >>> > seem to mainly appear in 'flat' regions of the volume, and are not > >> >>> > apparent > >> >>> > in the curved shaft of the bone. > >> >>> > > >> >>> > Any help, or pointers to further resources are appreciated, > >> >>> > thanks, > >> >>> > Tobias > >> >>> > > >> >>> > _____________________________________ > >> >>> > Powered by www.kitware.com > >> >>> > > >> >>> > Visit other Kitware open-source projects at > >> >>> > http://www.kitware.com/opensource/opensource.html > >> >>> > > >> >>> > Kitware offers ITK Training Courses, for more information visit: > >> >>> > http://www.kitware.com/products/protraining.php > >> >>> > > >> >>> > Please keep messages on-topic and check the 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 > >> >> > >> >> > >> > > >> > > >> > > >> > -- > >> > Unpaid intern in BillsBasement at noware dot com > >> > >> > >> > >> -- > >> Unpaid intern in BillsBasement at noware dot com > > > > > > > > -- > 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 > -------------- 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 gass at vision.ee.ethz.ch Tue Aug 12 08:33:14 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Tue, 12 Aug 2014 14:33:14 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Update: meanwhile I also tried cropping the image to investigate the impact of the overall size (#voxels) of the image. It appears to not have an effect, the same artifacts occur when processing a significantly smaller region (1/2 size). 2014-08-12 10:44 GMT+02:00 Tobias Gass : > Hi, > > changing the PixelType did not yield any change. However, I did some > further tests which seem to point at image spacing or total size to be the > culprit. My original image is fairly high-res, with 0.25mm in-plane > resolution and 0.75mm slice thickness and 512x512x409 voxel size. I tried > resampling the image to different isotropic resolutions (0.25, 0.3, 0.34, > 0.35, 0.4, 0.5, 0.75, 1)mm isotropic spacing. For all spacings down to > 0.35mm, the AA filter converged nicely and the output looks as I'd expect > it. Lower than 0.35mm spacing, and it fails in the way I described (from > this spacing on the #vox is equal or greater than the #voxels in my > original image). > > Any idea what might cause this, or what to further investigate? > > Thanks, > Tobias > > > 2014-08-11 22:17 GMT+02:00 Bill Lorensen : > > Paraview should do the right thing. >> >> On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass >> wrote: >> > I will try that tomorrow morning (living in GMT+1). I used paraview to >> > extract the isosurface, but also looked at the output of the AA-filter >> > directly (which looked fuzzy). I can also post an image of that >> tomorrow. >> > >> > Thanks for your help! >> > Tobias >> > >> > >> > 2014-08-11 21:22 GMT+02:00 Bill Lorensen : >> > >> >> How are you extracting the final isosurface? >> >> >> >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen < >> bill.lorensen at gmail.com> >> >> wrote: >> >> > If you change >> >> > typedef short PixelType; >> >> > to >> >> > typedef double PixelType; >> >> > >> >> > do the results change. >> >> > >> >> > >> >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass > > >> >> > wrote: >> >> >> >> >> >>> Can you post your code. The results do not look correct. >> >> >> >> >> >> >> >> >> Sure. The {write,read}Image functions are just convenient wrappers >> for >> >> >> the >> >> >> respective ITK tools. >> >> >> >> >> >> >> >> >> #include >> >> >> >> >> >> #include >> >> >> >> >> >> #include "argstream.h" >> >> >> >> >> >> #include "ImageUtils.h" >> >> >> >> >> >> #include "itkAntiAliasBinaryImageFilter.h" >> >> >> >> >> >> using namespace std; >> >> >> >> >> >> using namespace itk; >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> int main(int argc, char ** argv) >> >> >> >> >> >> { >> >> >> >> >> >> >> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); >> >> >> >> >> >> typedef short PixelType; >> >> >> >> >> >> typedef double OutputPixelType; >> >> >> >> >> >> const unsigned int D=3; >> >> >> >> >> >> typedef Image ImageType; >> >> >> >> >> >> >> >> >> >> >> >> typedef ImageType::Pointer ImagePointerType; >> >> >> >> >> >> >> >> >> >> >> >> typedef Image OutputImageType; >> >> >> >> >> >> typedef OutputImageType::Pointer OutputImagePointerType; >> >> >> >> >> >> >> >> >> >> >> >> argstream * as=new argstream(argc,argv); >> >> >> >> >> >> string inFile, outFile; >> >> >> >> >> >> double thresh=0.0; >> >> >> >> >> >> (*as) >> parameter ("in", inFile, " filename...", true); >> >> >> >> >> >> (*as) >> parameter ("out", outFile, " filename...", true); >> >> >> >> >> >> >> >> >> (*as) >> help(); >> >> >> >> >> >> as->defaultErrorHandling(); >> >> >> >> >> >> >> >> >> ImagePointerType img = ImageUtils::readImage(inFile); >> >> >> >> >> >> >> >> >> typedef itk::AntiAliasBinaryImageFilter > >> >> OutputImageType> >> >> >> >> >> >> AntiAliasBinaryImageFilterType; >> >> >> >> >> >> >> >> >> >> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter >> >> >> >> >> >> = AntiAliasBinaryImageFilterType::New (); >> >> >> >> >> >> antiAliasFilter->SetInput(img); >> >> >> >> >> >> antiAliasFilter->SetNumberOfIterations(5); >> >> >> >> >> >> antiAliasFilter->SetMaximumRMSError(0.02); >> >> >> >> >> >> >> >> >> antiAliasFilter->Update(); >> >> >> >> >> >> >> >> >> // For increased code coverage. Does nothing. >> >> >> >> >> >> antiAliasFilter->GetMaximumRMSError(); >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> antiAliasFilter->Update(); >> >> >> >> >> >> >> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " << >> >> >> std::endl; >> >> >> >> >> >> std::cout << "Last RMS change value was: " << >> >> >> antiAliasFilter->GetRMSChange() << std::endl; >> >> >> >> >> >> >> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() <> >> >> >> >> >> >> >> >> std::cout<GetLowerBinaryValue()<<" "<< >> >> >> antiAliasFilter->GetUpperBinaryValue()<> >> >> >> >> >> >> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); >> >> >> >> >> >> >> >> >> ImageUtils::writeImage(outFile,out); >> >> >> >> >> >> >> >> >> return 1; >> >> >> >> >> >> } >> >> >> >> >> >> >> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and >> >> >> maxRMSError >> >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved after >> >> >> one >> >> >> iteration where RMSE changes by about 0.08. This increases for all >> >> >> following >> >> >> iterations, which have an RMSE-change of about 0.25 for all number >> of >> >> >> iterations tested. All this is using ITK 4.5 pulled from the GIT >> >> >> repository >> >> >> a while ago, running on an intel i7 on Debian. >> >> >> >> >> >> Thanks a lot! >> >> >> Tobias >> >> >> >> >> >>> >> >> >>> >> >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass < >> gass at vision.ee.ethz.ch> >> >> >>> wrote: >> >> >>> > Dear all, >> >> >>> > >> >> >>> > I'm having problems using the anti-alias filter, which I want to >> use >> >> >>> > in >> >> >>> > order to smooth a binary segmentation volume. I'm using >> essentially >> >> >>> > the >> >> >>> > example code from the repository, which for my input file seems >> to >> >> >>> > start >> >> >>> > oscillating after 2 iterations, leading to weird 'pointy' >> artifacts >> >> >>> > on >> >> >>> > the >> >> >>> > surface as can be seen from the attached screenshot (AA filter >> >> >>> > output is >> >> >>> > on >> >> >>> > the left, input on the right). >> >> >>> > >> >> >>> > Is there any parameter to set/implement which could improve the >> >> >>> > behavior >> >> >>> > of >> >> >>> > this filter? I'm assuming that my input is reasonable, or is this >> >> >>> > something >> >> >>> > the filter is expected to have problems with? It is notable that >> >> >>> > such >> >> >>> > errors >> >> >>> > seem to mainly appear in 'flat' regions of the volume, and are >> not >> >> >>> > apparent >> >> >>> > in the curved shaft of the bone. >> >> >>> > >> >> >>> > Any help, or pointers to further resources are appreciated, >> >> >>> > thanks, >> >> >>> > Tobias >> >> >>> > >> >> >>> > _____________________________________ >> >> >>> > Powered by www.kitware.com >> >> >>> > >> >> >>> > Visit other Kitware open-source projects at >> >> >>> > http://www.kitware.com/opensource/opensource.html >> >> >>> > >> >> >>> > Kitware offers ITK Training Courses, for more information visit: >> >> >>> > http://www.kitware.com/products/protraining.php >> >> >>> > >> >> >>> > Please keep messages on-topic and check the 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 >> >> >> >> >> >> >> >> > >> >> > >> >> > >> >> > -- >> >> > Unpaid intern in BillsBasement at noware dot com >> >> >> >> >> >> >> >> -- >> >> Unpaid intern in BillsBasement at noware dot com >> > >> > >> >> >> >> -- >> 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 >> > > -------------- 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 lasso at queensu.ca Tue Aug 12 08:42:31 2014 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 12 Aug 2014 12:42:31 +0000 Subject: [ITK] [ITK-users] adding a global hierarchical watershed segmentation mode to itksnap In-Reply-To: <53E9CCED.1000604@mh-hannover.de> References: <53E85181.8040607@mh-hannover.de> <0f32755d9980441ca0162728b088f00b@queensu.ca> <53E9CCED.1000604@mh-hannover.de> Message-ID: Hi Roman, Try GrowCut segmentation. You paint a few strokes inside and outside your target(s) on one or a few slices and you may get a nice sementation. Using the FastGrowCut version you can edit/refine your inputs and as it is GPU-accelerated, it's fast (initial segmentation may take 20-30 seconds on a high-resolution volume but then the updates take just a few seconds). I've just used ITKSnap a couple of times, so I don't know it much. Slicer is a large, more comprehensive application framework, with a large user and developer community. You can add new segmentation methods to Slicer by writing a Python script that can use VTK, ITK, numpy, etc. No developer tools are needed, no need to compile anything, just download Slicer and you are ready to go. Of course you can also develop in C++, if you prefer; and if you download Eclipse then you can do step-by-step debugging of your Python module in Slicer, etc. You can share your module with others by uploading it to the extension manager (Slicer app store). More info: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers. Andras -----Original Message----- From: Dr. Roman Grothausmann [mailto:grothausmann.roman at mh-hannover.de] Sent: Tuesday, August 12, 2014 4:15 AM To: Andras Lasso Cc: itksnap-users at googlegroups.com; ITK Mailing List Subject: Re: [ITK] [ITK-users] adding a global hierarchical watershed segmentation mode to itksnap Hi Andras, Many thanks for Your hints. We'll test them on our data. However, our data is not as standardized in quality as CT or MRT data and from our experience many of the "magic" segmentations demonstrated on CT or MRT data does not work on our data. However, of all the segmentation modules I could find in Slicer or elsewhere none was based on a hierarchical watershed algorithm like the SegmentationEditor of the InsightApplications. Is there any other that I've missed? Concerning my idea to implement this if no tool currently already exists: Would such an extension be of more use in Slicer or itksnap? For which of the both would it likely be easier to integrate the extension? Best wishes Roman On 11/08/14 16:20, Andras Lasso wrote: > Have you tried segmentation tools in 3D Slicer? There is a multi-label > watershed segmentation tool that works in 3d > (http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modu > les/Editor#WatershedFromMarkers), there are also a number of other > generic semi-automatic segmentation tools (such as GrowCut) and a few > fully-automatic specialized tools (for brain, airways, etc). Download > the nightly build and also checkout the Segmentation category in the > Extension Manager. > > Andras > > *From:* Dr. Roman Grothausmann > > *Sent:* ?Monday?, ?August? ?11?, ?2014 ?1?:?15? ?AM > *To:* itksnap-users at googlegroups.com > > *Cc:* ITK Mailing List > > Dear mailing list members, > > > For a long time now I've been searching for a replacement of the old > SegmentationEditor (part of the InsightApplications) which I could not > get to work even with older ITK-3.x. Somewhere I was told that it was > integrated and maintained within itksnap. However the only tool in > itksnap based on watershed segmentation seems to be the adaptive > brush. It is very handy, but time-consuming in 3D and only for local > segmentations. In contrast the SegmentationEditor used a global > hierarchical watershed segmentation to pick labels from, see e.g. the video linked here: > http://www.insight-journal.org/browse/publication/70 > Quite often now I've stumbled over data, that would likely have > profited a lot of such a tool for segmentation. > > If such a tool working with ITK-4.x does not exist any more, I thought > of implementing it as a global WS segmentation mode in itksnap. That > way making the tool easier to find, to use and to ensure maintenance > (should it be integrated into the itksnap code base in the end) and > also avoiding recoding a GUI with mouse interaction and such. > > My current idea is to start, similar to the snake-tool, with > pre-filtering like smoothing and optional edge-detection. > Then the main edit mode to consist of the usual 4 subwindows showing > an overlay of the grey-image and the watershed segmentation of the > hierarchical WS-filter (hWS), side-by-side to another label-dataset > (loaded like a tiled overlay) which consist of the actually chosen labels from the hWS as the final data (FD). > The interaction I'm considering would be to LMB click on a label in > the hWS which is then added to the FD as the current fg label, or removed with a RMB. > The hierachrchy level of the hWS could be controlled by a slider or > the mouse wheel + Shift in nearly real time if some region demands > higher or lower detailed segmentation. When the fg label is changed, > the segmentation added or removed with further mouse interactions would modify the new fg label. > When all is done and the global WS mode is left, the FD label-dataset > is added to the main segmentation of itksnap. > > Would that be possible to implement in itksnap 3.x? > What source files of the itksnap code base should I look at for: > - the pre-filtering mode of the snake (for the smoothing and edge > detection) > - the mouse interactions (for e.g. adding the whell + Shift > interaction) > - possible examples for the dual layout > > Thanks for any comments, help or hints. > 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 > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -- 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 gass at vision.ee.ethz.ch Tue Aug 12 08:47:00 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Tue, 12 Aug 2014 14:47:00 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Further update: when manually increasing the spacing of the input image (without resampling, thus not changing the size), the filter works well. This probably indicates numerical instability depending on image spacing somewhere in the code, which would probably be great if it could be fixed. Best, Tobias 2014-08-12 14:33 GMT+02:00 Tobias Gass : > Update: meanwhile I also tried cropping the image to investigate the > impact of the overall size (#voxels) of the image. It appears to not have > an effect, the same artifacts occur when processing a significantly smaller > region (1/2 size). > > > 2014-08-12 10:44 GMT+02:00 Tobias Gass : > > Hi, >> >> changing the PixelType did not yield any change. However, I did some >> further tests which seem to point at image spacing or total size to be the >> culprit. My original image is fairly high-res, with 0.25mm in-plane >> resolution and 0.75mm slice thickness and 512x512x409 voxel size. I tried >> resampling the image to different isotropic resolutions (0.25, 0.3, 0.34, >> 0.35, 0.4, 0.5, 0.75, 1)mm isotropic spacing. For all spacings down to >> 0.35mm, the AA filter converged nicely and the output looks as I'd expect >> it. Lower than 0.35mm spacing, and it fails in the way I described (from >> this spacing on the #vox is equal or greater than the #voxels in my >> original image). >> >> Any idea what might cause this, or what to further investigate? >> >> Thanks, >> Tobias >> >> >> 2014-08-11 22:17 GMT+02:00 Bill Lorensen : >> >> Paraview should do the right thing. >>> >>> On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass >>> wrote: >>> > I will try that tomorrow morning (living in GMT+1). I used paraview to >>> > extract the isosurface, but also looked at the output of the AA-filter >>> > directly (which looked fuzzy). I can also post an image of that >>> tomorrow. >>> > >>> > Thanks for your help! >>> > Tobias >>> > >>> > >>> > 2014-08-11 21:22 GMT+02:00 Bill Lorensen : >>> > >>> >> How are you extracting the final isosurface? >>> >> >>> >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen < >>> bill.lorensen at gmail.com> >>> >> wrote: >>> >> > If you change >>> >> > typedef short PixelType; >>> >> > to >>> >> > typedef double PixelType; >>> >> > >>> >> > do the results change. >>> >> > >>> >> > >>> >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass < >>> gass at vision.ee.ethz.ch> >>> >> > wrote: >>> >> >> >>> >> >>> Can you post your code. The results do not look correct. >>> >> >> >>> >> >> >>> >> >> Sure. The {write,read}Image functions are just convenient wrappers >>> for >>> >> >> the >>> >> >> respective ITK tools. >>> >> >> >>> >> >> >>> >> >> #include >>> >> >> >>> >> >> #include >>> >> >> >>> >> >> #include "argstream.h" >>> >> >> >>> >> >> #include "ImageUtils.h" >>> >> >> >>> >> >> #include "itkAntiAliasBinaryImageFilter.h" >>> >> >> >>> >> >> using namespace std; >>> >> >> >>> >> >> using namespace itk; >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> int main(int argc, char ** argv) >>> >> >> >>> >> >> { >>> >> >> >>> >> >> >>> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); >>> >> >> >>> >> >> typedef short PixelType; >>> >> >> >>> >> >> typedef double OutputPixelType; >>> >> >> >>> >> >> const unsigned int D=3; >>> >> >> >>> >> >> typedef Image ImageType; >>> >> >> >>> >> >> >>> >> >> >>> >> >> typedef ImageType::Pointer ImagePointerType; >>> >> >> >>> >> >> >>> >> >> >>> >> >> typedef Image OutputImageType; >>> >> >> >>> >> >> typedef OutputImageType::Pointer OutputImagePointerType; >>> >> >> >>> >> >> >>> >> >> >>> >> >> argstream * as=new argstream(argc,argv); >>> >> >> >>> >> >> string inFile, outFile; >>> >> >> >>> >> >> double thresh=0.0; >>> >> >> >>> >> >> (*as) >> parameter ("in", inFile, " filename...", true); >>> >> >> >>> >> >> (*as) >> parameter ("out", outFile, " filename...", true); >>> >> >> >>> >> >> >>> >> >> (*as) >> help(); >>> >> >> >>> >> >> as->defaultErrorHandling(); >>> >> >> >>> >> >> >>> >> >> ImagePointerType img = >>> ImageUtils::readImage(inFile); >>> >> >> >>> >> >> >>> >> >> typedef itk::AntiAliasBinaryImageFilter >> >> >> OutputImageType> >>> >> >> >>> >> >> AntiAliasBinaryImageFilterType; >>> >> >> >>> >> >> >>> >> >> >>> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter >>> >> >> >>> >> >> = AntiAliasBinaryImageFilterType::New (); >>> >> >> >>> >> >> antiAliasFilter->SetInput(img); >>> >> >> >>> >> >> antiAliasFilter->SetNumberOfIterations(5); >>> >> >> >>> >> >> antiAliasFilter->SetMaximumRMSError(0.02); >>> >> >> >>> >> >> >>> >> >> antiAliasFilter->Update(); >>> >> >> >>> >> >> >>> >> >> // For increased code coverage. Does nothing. >>> >> >> >>> >> >> antiAliasFilter->GetMaximumRMSError(); >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> antiAliasFilter->Update(); >>> >> >> >>> >> >> >>> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " << >>> >> >> std::endl; >>> >> >> >>> >> >> std::cout << "Last RMS change value was: " << >>> >> >> antiAliasFilter->GetRMSChange() << std::endl; >>> >> >> >>> >> >> >>> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() <>> >> >> >>> >> >> >>> >> >> std::cout<GetLowerBinaryValue()<<" "<< >>> >> >> antiAliasFilter->GetUpperBinaryValue()<>> >> >> >>> >> >> >>> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); >>> >> >> >>> >> >> >>> >> >> ImageUtils::writeImage(outFile,out); >>> >> >> >>> >> >> >>> >> >> return 1; >>> >> >> >>> >> >> } >>> >> >> >>> >> >> >>> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and >>> >> >> maxRMSError >>> >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved >>> after >>> >> >> one >>> >> >> iteration where RMSE changes by about 0.08. This increases for all >>> >> >> following >>> >> >> iterations, which have an RMSE-change of about 0.25 for all number >>> of >>> >> >> iterations tested. All this is using ITK 4.5 pulled from the GIT >>> >> >> repository >>> >> >> a while ago, running on an intel i7 on Debian. >>> >> >> >>> >> >> Thanks a lot! >>> >> >> Tobias >>> >> >> >>> >> >>> >>> >> >>> >>> >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass < >>> gass at vision.ee.ethz.ch> >>> >> >>> wrote: >>> >> >>> > Dear all, >>> >> >>> > >>> >> >>> > I'm having problems using the anti-alias filter, which I want >>> to use >>> >> >>> > in >>> >> >>> > order to smooth a binary segmentation volume. I'm using >>> essentially >>> >> >>> > the >>> >> >>> > example code from the repository, which for my input file seems >>> to >>> >> >>> > start >>> >> >>> > oscillating after 2 iterations, leading to weird 'pointy' >>> artifacts >>> >> >>> > on >>> >> >>> > the >>> >> >>> > surface as can be seen from the attached screenshot (AA filter >>> >> >>> > output is >>> >> >>> > on >>> >> >>> > the left, input on the right). >>> >> >>> > >>> >> >>> > Is there any parameter to set/implement which could improve the >>> >> >>> > behavior >>> >> >>> > of >>> >> >>> > this filter? I'm assuming that my input is reasonable, or is >>> this >>> >> >>> > something >>> >> >>> > the filter is expected to have problems with? It is notable that >>> >> >>> > such >>> >> >>> > errors >>> >> >>> > seem to mainly appear in 'flat' regions of the volume, and are >>> not >>> >> >>> > apparent >>> >> >>> > in the curved shaft of the bone. >>> >> >>> > >>> >> >>> > Any help, or pointers to further resources are appreciated, >>> >> >>> > thanks, >>> >> >>> > Tobias >>> >> >>> > >>> >> >>> > _____________________________________ >>> >> >>> > Powered by www.kitware.com >>> >> >>> > >>> >> >>> > Visit other Kitware open-source projects at >>> >> >>> > http://www.kitware.com/opensource/opensource.html >>> >> >>> > >>> >> >>> > Kitware offers ITK Training Courses, for more information visit: >>> >> >>> > http://www.kitware.com/products/protraining.php >>> >> >>> > >>> >> >>> > Please keep messages on-topic and check the 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 >>> >> >> >>> >> >> >>> >> > >>> >> > >>> >> > >>> >> > -- >>> >> > Unpaid intern in BillsBasement at noware dot com >>> >> >>> >> >>> >> >>> >> -- >>> >> Unpaid intern in BillsBasement at noware dot com >>> > >>> > >>> >>> >>> >>> -- >>> 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 >>> >> >> > -------------- 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 Aug 12 07:58:11 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 12 Aug 2014 06:58:11 -0500 Subject: [ITK] "Can We Trust the Libraries We Use?", i.e. "You've got JPEG" In-Reply-To: References: Message-ID: <4717349A-D8D5-4F54-80EE-F4F6E7085038@mail.nih.gov> Very nice follow up Matt!! These looks like some nice genuine bugs found. Do you have these based on the release branch, to target the fixes for a patch release? Brad On Aug 11, 2014, at 11:04 PM, Matt McCormick wrote: > Michka, Ho, and Ben pointed out a very good blog post that looked at > the output of a static code analysis tool on ITK and the third party > libraries that it uses: > > http://www.viva64.com/en/b/0271/ > > > The post brings up admirable principles, namely: > > 1) Use automated code quality tools. > 2) Avoid duplication of effort and improve overall excellence by using > open source libraries. > 3) Reduce maintenance costs by pushing fixes upstream. > > > ITK has strong practices in these areas and is continuously making > improvements. In particular, > > 1) The cross-platform continuous testing on the software quality > dashboard [1] has long been a strong suit [1]. On the dashboard we > configure, build, and test, but we also run valgrind dynamic memory > analysis and gcov coverage testing. The latter are available on CDash > and also posted to Bill L's website [2]. > > We also have Coverity static analysis [3]. Following Bill H's setup > instructions, Sean and Kent's posts to the list, I will also be > setting up scan-build static analysis [4]. > > [1] http://open.cdash.org/index.php?project=Insight > > [2] http://lorensen.github.io/VTKCodeCoverage/ITK/index.html > > [3] https://scan.coverity.com/projects/783 > > [4] http://clang-analyzer.llvm.org/scan-build.html > > > 2) ITK uses a number of excellent ThirdParty open source libraries, > found in the Modules/ThirdParty directory. We are continually > improving our CMake configuration to support additional > ITK_USE_SYSTEM_ so native system libraries can be utilized. > For example, in the last four releases, for example, we have improved > support for [1] > > * ITK_USE_SYSTEM_VXL > * ITK_USE_SYSTEM_TIFF > * ITK_USE_SYSTEM_EXPAT > * ITK_USE_SYSTEM_DCMTK > * ITK_USE_SYSTEM_HDF5 > > [1] http://www.itk.org/Wiki/ITK/Releases > > > 3) We are always trying to improve our efforts to push fixes upstream > and stay in sync with upstream. Recently, a big step forward in this > area has been led by Brad King and Brian Helba, who have improved and > generalized a process to perform git subtree merges of third party > libraries [1]. > > This technical improvement to version management of third party > libraries allows us to stay in sync with upstream, push patches > upstream, and ensure upstream and our patches pushed upstream retain > proper credit. This method is applied to a number of third party > libraries in the tree, and we are incrementally adding more. A few > that are admittedly in great need of updates, as noted in the article, > are OpenJPEG and GDCM. > > [1] http://review.source.kitware.com/#/c/14175/ > > > All contributions to these efforts are welcome! > > > On a side note, the issues brought up have been addressed in the > following patches: > > http://review.source.kitware.com/#/c/16617/ > http://review.source.kitware.com/#/c/16623/ > http://review.source.kitware.com/#/c/16626/ > http://review.source.kitware.com/#/c/16627/ > http://review.source.kitware.com/#/c/16624/ > http://review.source.kitware.com/#/c/16628/ > http://review.source.kitware.com/#/c/16629/ From bill.lorensen at gmail.com Tue Aug 12 09:06:22 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 12 Aug 2014 09:06:22 -0400 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Have you tried: UseImageSpacingOn(); On Tue, Aug 12, 2014 at 8:47 AM, Tobias Gass wrote: > Further update: when manually increasing the spacing of the input image > (without resampling, thus not changing the size), the filter works well. > This probably indicates numerical instability depending on image spacing > somewhere in the code, which would probably be great if it could be fixed. > > Best, > Tobias > > > 2014-08-12 14:33 GMT+02:00 Tobias Gass : > >> Update: meanwhile I also tried cropping the image to investigate the >> impact of the overall size (#voxels) of the image. It appears to not have an >> effect, the same artifacts occur when processing a significantly smaller >> region (1/2 size). >> >> >> 2014-08-12 10:44 GMT+02:00 Tobias Gass : >> >>> Hi, >>> >>> changing the PixelType did not yield any change. However, I did some >>> further tests which seem to point at image spacing or total size to be the >>> culprit. My original image is fairly high-res, with 0.25mm in-plane >>> resolution and 0.75mm slice thickness and 512x512x409 voxel size. I tried >>> resampling the image to different isotropic resolutions (0.25, 0.3, 0.34, >>> 0.35, 0.4, 0.5, 0.75, 1)mm isotropic spacing. For all spacings down to >>> 0.35mm, the AA filter converged nicely and the output looks as I'd expect >>> it. Lower than 0.35mm spacing, and it fails in the way I described (from >>> this spacing on the #vox is equal or greater than the #voxels in my original >>> image). >>> >>> Any idea what might cause this, or what to further investigate? >>> >>> Thanks, >>> Tobias >>> >>> >>> 2014-08-11 22:17 GMT+02:00 Bill Lorensen : >>> >>>> Paraview should do the right thing. >>>> >>>> On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass >>>> wrote: >>>> > I will try that tomorrow morning (living in GMT+1). I used paraview to >>>> > extract the isosurface, but also looked at the output of the AA-filter >>>> > directly (which looked fuzzy). I can also post an image of that >>>> > tomorrow. >>>> > >>>> > Thanks for your help! >>>> > Tobias >>>> > >>>> > >>>> > 2014-08-11 21:22 GMT+02:00 Bill Lorensen : >>>> > >>>> >> How are you extracting the final isosurface? >>>> >> >>>> >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen >>>> >> >>>> >> wrote: >>>> >> > If you change >>>> >> > typedef short PixelType; >>>> >> > to >>>> >> > typedef double PixelType; >>>> >> > >>>> >> > do the results change. >>>> >> > >>>> >> > >>>> >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass >>>> >> > >>>> >> > wrote: >>>> >> >> >>>> >> >>> Can you post your code. The results do not look correct. >>>> >> >> >>>> >> >> >>>> >> >> Sure. The {write,read}Image functions are just convenient wrappers >>>> >> >> for >>>> >> >> the >>>> >> >> respective ITK tools. >>>> >> >> >>>> >> >> >>>> >> >> #include >>>> >> >> >>>> >> >> #include >>>> >> >> >>>> >> >> #include "argstream.h" >>>> >> >> >>>> >> >> #include "ImageUtils.h" >>>> >> >> >>>> >> >> #include "itkAntiAliasBinaryImageFilter.h" >>>> >> >> >>>> >> >> using namespace std; >>>> >> >> >>>> >> >> using namespace itk; >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> int main(int argc, char ** argv) >>>> >> >> >>>> >> >> { >>>> >> >> >>>> >> >> >>>> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); >>>> >> >> >>>> >> >> typedef short PixelType; >>>> >> >> >>>> >> >> typedef double OutputPixelType; >>>> >> >> >>>> >> >> const unsigned int D=3; >>>> >> >> >>>> >> >> typedef Image ImageType; >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> typedef ImageType::Pointer ImagePointerType; >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> typedef Image OutputImageType; >>>> >> >> >>>> >> >> typedef OutputImageType::Pointer OutputImagePointerType; >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> argstream * as=new argstream(argc,argv); >>>> >> >> >>>> >> >> string inFile, outFile; >>>> >> >> >>>> >> >> double thresh=0.0; >>>> >> >> >>>> >> >> (*as) >> parameter ("in", inFile, " filename...", true); >>>> >> >> >>>> >> >> (*as) >> parameter ("out", outFile, " filename...", true); >>>> >> >> >>>> >> >> >>>> >> >> (*as) >> help(); >>>> >> >> >>>> >> >> as->defaultErrorHandling(); >>>> >> >> >>>> >> >> >>>> >> >> ImagePointerType img = >>>> >> >> ImageUtils::readImage(inFile); >>>> >> >> >>>> >> >> >>>> >> >> typedef itk::AntiAliasBinaryImageFilter >>> >> >> OutputImageType> >>>> >> >> >>>> >> >> AntiAliasBinaryImageFilterType; >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter >>>> >> >> >>>> >> >> = AntiAliasBinaryImageFilterType::New (); >>>> >> >> >>>> >> >> antiAliasFilter->SetInput(img); >>>> >> >> >>>> >> >> antiAliasFilter->SetNumberOfIterations(5); >>>> >> >> >>>> >> >> antiAliasFilter->SetMaximumRMSError(0.02); >>>> >> >> >>>> >> >> >>>> >> >> antiAliasFilter->Update(); >>>> >> >> >>>> >> >> >>>> >> >> // For increased code coverage. Does nothing. >>>> >> >> >>>> >> >> antiAliasFilter->GetMaximumRMSError(); >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> antiAliasFilter->Update(); >>>> >> >> >>>> >> >> >>>> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " << >>>> >> >> std::endl; >>>> >> >> >>>> >> >> std::cout << "Last RMS change value was: " << >>>> >> >> antiAliasFilter->GetRMSChange() << std::endl; >>>> >> >> >>>> >> >> >>>> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() <>>> >> >> >>>> >> >> >>>> >> >> std::cout<GetLowerBinaryValue()<<" "<< >>>> >> >> antiAliasFilter->GetUpperBinaryValue()<>>> >> >> >>>> >> >> >>>> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); >>>> >> >> >>>> >> >> >>>> >> >> ImageUtils::writeImage(outFile,out); >>>> >> >> >>>> >> >> >>>> >> >> return 1; >>>> >> >> >>>> >> >> } >>>> >> >> >>>> >> >> >>>> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and >>>> >> >> maxRMSError >>>> >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved >>>> >> >> after >>>> >> >> one >>>> >> >> iteration where RMSE changes by about 0.08. This increases for all >>>> >> >> following >>>> >> >> iterations, which have an RMSE-change of about 0.25 for all number >>>> >> >> of >>>> >> >> iterations tested. All this is using ITK 4.5 pulled from the GIT >>>> >> >> repository >>>> >> >> a while ago, running on an intel i7 on Debian. >>>> >> >> >>>> >> >> Thanks a lot! >>>> >> >> Tobias >>>> >> >> >>>> >> >>> >>>> >> >>> >>>> >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass >>>> >> >>> >>>> >> >>> wrote: >>>> >> >>> > Dear all, >>>> >> >>> > >>>> >> >>> > I'm having problems using the anti-alias filter, which I want >>>> >> >>> > to use >>>> >> >>> > in >>>> >> >>> > order to smooth a binary segmentation volume. I'm using >>>> >> >>> > essentially >>>> >> >>> > the >>>> >> >>> > example code from the repository, which for my input file seems >>>> >> >>> > to >>>> >> >>> > start >>>> >> >>> > oscillating after 2 iterations, leading to weird 'pointy' >>>> >> >>> > artifacts >>>> >> >>> > on >>>> >> >>> > the >>>> >> >>> > surface as can be seen from the attached screenshot (AA filter >>>> >> >>> > output is >>>> >> >>> > on >>>> >> >>> > the left, input on the right). >>>> >> >>> > >>>> >> >>> > Is there any parameter to set/implement which could improve the >>>> >> >>> > behavior >>>> >> >>> > of >>>> >> >>> > this filter? I'm assuming that my input is reasonable, or is >>>> >> >>> > this >>>> >> >>> > something >>>> >> >>> > the filter is expected to have problems with? It is notable >>>> >> >>> > that >>>> >> >>> > such >>>> >> >>> > errors >>>> >> >>> > seem to mainly appear in 'flat' regions of the volume, and are >>>> >> >>> > not >>>> >> >>> > apparent >>>> >> >>> > in the curved shaft of the bone. >>>> >> >>> > >>>> >> >>> > Any help, or pointers to further resources are appreciated, >>>> >> >>> > thanks, >>>> >> >>> > Tobias >>>> >> >>> > >>>> >> >>> > _____________________________________ >>>> >> >>> > Powered by www.kitware.com >>>> >> >>> > >>>> >> >>> > Visit other Kitware open-source projects at >>>> >> >>> > http://www.kitware.com/opensource/opensource.html >>>> >> >>> > >>>> >> >>> > Kitware offers ITK Training Courses, for more information >>>> >> >>> > visit: >>>> >> >>> > http://www.kitware.com/products/protraining.php >>>> >> >>> > >>>> >> >>> > Please keep messages on-topic and check the 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 >>>> >> >> >>>> >> >> >>>> >> > >>>> >> > >>>> >> > >>>> >> > -- >>>> >> > Unpaid intern in BillsBasement at noware dot com >>>> >> >>>> >> >>>> >> >>>> >> -- >>>> >> Unpaid intern in BillsBasement at noware dot com >>>> > >>>> > >>>> >>>> >>>> >>>> -- >>>> 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 >>> >>> >> > -- 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 matt.mccormick at kitware.com Tue Aug 12 09:50:36 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 12 Aug 2014 09:50:36 -0400 Subject: [ITK] "Can We Trust the Libraries We Use?", i.e. "You've got JPEG" In-Reply-To: <4717349A-D8D5-4F54-80EE-F4F6E7085038@mail.nih.gov> References: <4717349A-D8D5-4F54-80EE-F4F6E7085038@mail.nih.gov> Message-ID: On Tue, Aug 12, 2014 at 7:58 AM, Bradley Lowekamp wrote: > Very nice follow up Matt!! > > These looks like some nice genuine bugs found. Do you have these based on the release branch, to target the fixes for a patch release? Yes, good point. I'll rebase them on release before merging. Thanks, Matt From michkapopoff at gmail.com Tue Aug 12 09:58:46 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Tue, 12 Aug 2014 15:58:46 +0200 Subject: [ITK] "Can We Trust the Libraries We Use?", i.e. "You've got JPEG" In-Reply-To: References: <4717349A-D8D5-4F54-80EE-F4F6E7085038@mail.nih.gov> Message-ID: <7F24E121-F5E2-4F58-9BDE-D3329B67DA43@gmail.com> I already merged 3 from the PointSetToSpatialObjectDemonsReg topic. You will have to cherry pick them. Michka On 12 ao?t 2014, at 15:50, Matt McCormick wrote: > On Tue, Aug 12, 2014 at 7:58 AM, Bradley Lowekamp > wrote: >> Very nice follow up Matt!! >> >> These looks like some nice genuine bugs found. Do you have these based on the release branch, to target the fixes for a patch release? > > Yes, good point. I'll rebase them on release before merging. > > Thanks, > Matt From gass at vision.ee.ethz.ch Tue Aug 12 10:10:34 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Tue, 12 Aug 2014 16:10:34 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Yes, this does result in the same problems as before. 2014-08-12 15:06 GMT+02:00 Bill Lorensen : > Have you tried: > UseImageSpacingOn(); > > > On Tue, Aug 12, 2014 at 8:47 AM, Tobias Gass > wrote: > > Further update: when manually increasing the spacing of the input image > > (without resampling, thus not changing the size), the filter works well. > > This probably indicates numerical instability depending on image spacing > > somewhere in the code, which would probably be great if it could be > fixed. > > > > Best, > > Tobias > > > > > > 2014-08-12 14:33 GMT+02:00 Tobias Gass : > > > >> Update: meanwhile I also tried cropping the image to investigate the > >> impact of the overall size (#voxels) of the image. It appears to not > have an > >> effect, the same artifacts occur when processing a significantly smaller > >> region (1/2 size). > >> > >> > >> 2014-08-12 10:44 GMT+02:00 Tobias Gass : > >> > >>> Hi, > >>> > >>> changing the PixelType did not yield any change. However, I did some > >>> further tests which seem to point at image spacing or total size to be > the > >>> culprit. My original image is fairly high-res, with 0.25mm in-plane > >>> resolution and 0.75mm slice thickness and 512x512x409 voxel size. I > tried > >>> resampling the image to different isotropic resolutions (0.25, 0.3, > 0.34, > >>> 0.35, 0.4, 0.5, 0.75, 1)mm isotropic spacing. For all spacings down to > >>> 0.35mm, the AA filter converged nicely and the output looks as I'd > expect > >>> it. Lower than 0.35mm spacing, and it fails in the way I described > (from > >>> this spacing on the #vox is equal or greater than the #voxels in my > original > >>> image). > >>> > >>> Any idea what might cause this, or what to further investigate? > >>> > >>> Thanks, > >>> Tobias > >>> > >>> > >>> 2014-08-11 22:17 GMT+02:00 Bill Lorensen : > >>> > >>>> Paraview should do the right thing. > >>>> > >>>> On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass > >>>> wrote: > >>>> > I will try that tomorrow morning (living in GMT+1). I used paraview > to > >>>> > extract the isosurface, but also looked at the output of the > AA-filter > >>>> > directly (which looked fuzzy). I can also post an image of that > >>>> > tomorrow. > >>>> > > >>>> > Thanks for your help! > >>>> > Tobias > >>>> > > >>>> > > >>>> > 2014-08-11 21:22 GMT+02:00 Bill Lorensen : > >>>> > > >>>> >> How are you extracting the final isosurface? > >>>> >> > >>>> >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen > >>>> >> > >>>> >> wrote: > >>>> >> > If you change > >>>> >> > typedef short PixelType; > >>>> >> > to > >>>> >> > typedef double PixelType; > >>>> >> > > >>>> >> > do the results change. > >>>> >> > > >>>> >> > > >>>> >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass > >>>> >> > > >>>> >> > wrote: > >>>> >> >> > >>>> >> >>> Can you post your code. The results do not look correct. > >>>> >> >> > >>>> >> >> > >>>> >> >> Sure. The {write,read}Image functions are just convenient > wrappers > >>>> >> >> for > >>>> >> >> the > >>>> >> >> respective ITK tools. > >>>> >> >> > >>>> >> >> > >>>> >> >> #include > >>>> >> >> > >>>> >> >> #include > >>>> >> >> > >>>> >> >> #include "argstream.h" > >>>> >> >> > >>>> >> >> #include "ImageUtils.h" > >>>> >> >> > >>>> >> >> #include "itkAntiAliasBinaryImageFilter.h" > >>>> >> >> > >>>> >> >> using namespace std; > >>>> >> >> > >>>> >> >> using namespace itk; > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> int main(int argc, char ** argv) > >>>> >> >> > >>>> >> >> { > >>>> >> >> > >>>> >> >> > >>>> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); > >>>> >> >> > >>>> >> >> typedef short PixelType; > >>>> >> >> > >>>> >> >> typedef double OutputPixelType; > >>>> >> >> > >>>> >> >> const unsigned int D=3; > >>>> >> >> > >>>> >> >> typedef Image ImageType; > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> typedef ImageType::Pointer ImagePointerType; > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> typedef Image OutputImageType; > >>>> >> >> > >>>> >> >> typedef OutputImageType::Pointer OutputImagePointerType; > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> argstream * as=new argstream(argc,argv); > >>>> >> >> > >>>> >> >> string inFile, outFile; > >>>> >> >> > >>>> >> >> double thresh=0.0; > >>>> >> >> > >>>> >> >> (*as) >> parameter ("in", inFile, " filename...", true); > >>>> >> >> > >>>> >> >> (*as) >> parameter ("out", outFile, " filename...", true); > >>>> >> >> > >>>> >> >> > >>>> >> >> (*as) >> help(); > >>>> >> >> > >>>> >> >> as->defaultErrorHandling(); > >>>> >> >> > >>>> >> >> > >>>> >> >> ImagePointerType img = > >>>> >> >> ImageUtils::readImage(inFile); > >>>> >> >> > >>>> >> >> > >>>> >> >> typedef itk::AntiAliasBinaryImageFilter >>>> >> >> OutputImageType> > >>>> >> >> > >>>> >> >> AntiAliasBinaryImageFilterType; > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter > >>>> >> >> > >>>> >> >> = AntiAliasBinaryImageFilterType::New (); > >>>> >> >> > >>>> >> >> antiAliasFilter->SetInput(img); > >>>> >> >> > >>>> >> >> antiAliasFilter->SetNumberOfIterations(5); > >>>> >> >> > >>>> >> >> antiAliasFilter->SetMaximumRMSError(0.02); > >>>> >> >> > >>>> >> >> > >>>> >> >> antiAliasFilter->Update(); > >>>> >> >> > >>>> >> >> > >>>> >> >> // For increased code coverage. Does nothing. > >>>> >> >> > >>>> >> >> antiAliasFilter->GetMaximumRMSError(); > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> > >>>> >> >> antiAliasFilter->Update(); > >>>> >> >> > >>>> >> >> > >>>> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " > << > >>>> >> >> std::endl; > >>>> >> >> > >>>> >> >> std::cout << "Last RMS change value was: " << > >>>> >> >> antiAliasFilter->GetRMSChange() << std::endl; > >>>> >> >> > >>>> >> >> > >>>> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() < >>>> >> >> > >>>> >> >> > >>>> >> >> std::cout<GetLowerBinaryValue()<<" "<< > >>>> >> >> antiAliasFilter->GetUpperBinaryValue()< >>>> >> >> > >>>> >> >> > >>>> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); > >>>> >> >> > >>>> >> >> > >>>> >> >> ImageUtils::writeImage(outFile,out); > >>>> >> >> > >>>> >> >> > >>>> >> >> return 1; > >>>> >> >> > >>>> >> >> } > >>>> >> >> > >>>> >> >> > >>>> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) and > >>>> >> >> maxRMSError > >>>> >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved > >>>> >> >> after > >>>> >> >> one > >>>> >> >> iteration where RMSE changes by about 0.08. This increases for > all > >>>> >> >> following > >>>> >> >> iterations, which have an RMSE-change of about 0.25 for all > number > >>>> >> >> of > >>>> >> >> iterations tested. All this is using ITK 4.5 pulled from the GIT > >>>> >> >> repository > >>>> >> >> a while ago, running on an intel i7 on Debian. > >>>> >> >> > >>>> >> >> Thanks a lot! > >>>> >> >> Tobias > >>>> >> >> > >>>> >> >>> > >>>> >> >>> > >>>> >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass > >>>> >> >>> > >>>> >> >>> wrote: > >>>> >> >>> > Dear all, > >>>> >> >>> > > >>>> >> >>> > I'm having problems using the anti-alias filter, which I want > >>>> >> >>> > to use > >>>> >> >>> > in > >>>> >> >>> > order to smooth a binary segmentation volume. I'm using > >>>> >> >>> > essentially > >>>> >> >>> > the > >>>> >> >>> > example code from the repository, which for my input file > seems > >>>> >> >>> > to > >>>> >> >>> > start > >>>> >> >>> > oscillating after 2 iterations, leading to weird 'pointy' > >>>> >> >>> > artifacts > >>>> >> >>> > on > >>>> >> >>> > the > >>>> >> >>> > surface as can be seen from the attached screenshot (AA > filter > >>>> >> >>> > output is > >>>> >> >>> > on > >>>> >> >>> > the left, input on the right). > >>>> >> >>> > > >>>> >> >>> > Is there any parameter to set/implement which could improve > the > >>>> >> >>> > behavior > >>>> >> >>> > of > >>>> >> >>> > this filter? I'm assuming that my input is reasonable, or is > >>>> >> >>> > this > >>>> >> >>> > something > >>>> >> >>> > the filter is expected to have problems with? It is notable > >>>> >> >>> > that > >>>> >> >>> > such > >>>> >> >>> > errors > >>>> >> >>> > seem to mainly appear in 'flat' regions of the volume, and > are > >>>> >> >>> > not > >>>> >> >>> > apparent > >>>> >> >>> > in the curved shaft of the bone. > >>>> >> >>> > > >>>> >> >>> > Any help, or pointers to further resources are appreciated, > >>>> >> >>> > thanks, > >>>> >> >>> > Tobias > >>>> >> >>> > > >>>> >> >>> > _____________________________________ > >>>> >> >>> > Powered by www.kitware.com > >>>> >> >>> > > >>>> >> >>> > Visit other Kitware open-source projects at > >>>> >> >>> > http://www.kitware.com/opensource/opensource.html > >>>> >> >>> > > >>>> >> >>> > Kitware offers ITK Training Courses, for more information > >>>> >> >>> > visit: > >>>> >> >>> > http://www.kitware.com/products/protraining.php > >>>> >> >>> > > >>>> >> >>> > Please keep messages on-topic and check the 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 > >>>> >> >> > >>>> >> >> > >>>> >> > > >>>> >> > > >>>> >> > > >>>> >> > -- > >>>> >> > Unpaid intern in BillsBasement at noware dot com > >>>> >> > >>>> >> > >>>> >> > >>>> >> -- > >>>> >> Unpaid intern in BillsBasement at noware dot com > >>>> > > >>>> > > >>>> > >>>> > >>>> > >>>> -- > >>>> 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 > >>> > >>> > >> > > > > > > -- > 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 matt.mccormick at kitware.com Tue Aug 12 10:23:05 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 12 Aug 2014 10:23:05 -0400 Subject: [ITK] "Can We Trust the Libraries We Use?", i.e. "You've got JPEG" In-Reply-To: <7F24E121-F5E2-4F58-9BDE-D3329B67DA43@gmail.com> References: <4717349A-D8D5-4F54-80EE-F4F6E7085038@mail.nih.gov> <7F24E121-F5E2-4F58-9BDE-D3329B67DA43@gmail.com> Message-ID: On Tue, Aug 12, 2014 at 9:58 AM, Michka Popoff wrote: > I already merged 3 from the PointSetToSpatialObjectDemonsReg topic. > You will have to cherry pick them. > Thanks for the note. Will do. Matt From pauloguilhermefreire at gmail.com Tue Aug 12 15:22:25 2014 From: pauloguilhermefreire at gmail.com (Paulo Guilherme Freire) Date: Tue, 12 Aug 2014 16:22:25 -0300 Subject: [ITK] Problem using Size() and iterator with ImageToListSampleAdaptor Message-ID: Hello. I've been having some troubles to understand the use of Size() and iterator when dealing with ImageToListSampleAdaptor. Here's what I've been doing: 1) Read N images (usually N = 3) and store them in an itk::VectorImage container. 2) Set such itk::VectorImage as input for itk::ImageToListSampleAdaptor. 3) Iterate over the list using a for loop (using the Size() method from the ListSample) and an iterator; in both cases, count how many times the loop was executed. Here is my problem: when I iterate over the list using Size() I get a different value of iterations than when I use an iterator. For example, suppose I read three 3D (256 x 256 x 256) images. When I count the number of iterations using an iterator (say, ListSampleType::Iterator), I get 16777216 (which is precisely 256 times 256 times 256). However, when I count the number of iterations using a for loop (for(unsigned int = 0; i < ListSample->Size(); ++i)), I get 50331648 (which is precisely the result of 16777216 times 3). My question is: shouldn't the number of iterations be the same (irregardless of whether I use an iterator or a for loop)? The code I've been using is attached to this email. I would really appreciate it if someone could help me solve this "mystery" :-) Best regards, Paulo -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- CMAKE_MINIMUM_REQUIRED(VERSION 2.8) SET( ProgramName "list_sample" ) PROJECT( ${ProgramName} ) FIND_PACKAGE (ITK REQUIRED) IF (ITK_FOUND) INCLUDE( ${USE_ITK_FILE} ) ENDIF(ITK_FOUND) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ) SET( SRCS ) ADD_EXECUTABLE( ${ProgramName} ListSampleImages.cxx ${SRCS} ) LINK_DIRECTORIES( ${PROJECT_BINARY_DIR}/lib ) TARGET_LINK_LIBRARIES( ${ProgramName} ${ITK_LIBRARIES} ) -------------- next part -------------- A non-text attachment was scrubbed... Name: bipUtils.h Type: text/x-chdr Size: 20020 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CmdLine.h Type: text/x-chdr Size: 10610 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ListSampleImages.cxx Type: text/x-c++src Size: 2649 bytes Desc: not available URL: From mercikd at thomas.edu Tue Aug 12 19:06:35 2014 From: mercikd at thomas.edu (Dan Mercik) Date: Tue, 12 Aug 2014 23:06:35 +0000 Subject: [ITK] [ITK-users] TileImageFilter SideBySide Message-ID: Good Afternoon, I want to know if it's possible to have more than two image be side by side vertically? If so what would I have to change in the algorithm, would I have to make a loop for the amount of input images? Any help would be greatly appreciative. Daniel Mercik Computer Science Major Service Desk Technician Thomas College _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 Wed Aug 13 02:32:21 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Wed, 13 Aug 2014 08:32:21 +0200 Subject: [ITK] [ITK-users] TileImageFilter SideBySide In-Reply-To: References: Message-ID: Hi Moving this mail to the new community mailing list For your problem, you should use the setLayout method [1] For 4 images, that would be: itk::FixedArray< unsigned int, 2 > layout; layout[0] = 4; layout[1] = 0; Michka [1] http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_SideBySide On 13 ao?t 2014, at 01:06, Dan Mercik wrote: > Good Afternoon, > > > > I want to know if it's possible to have more than two image be side by side vertically? If so what would I have to change in the algorithm, would I have to make a loop for the amount of input images? Any help would be greatly appreciative. > > > > Daniel Mercik > > Computer Science Major > > Service Desk Technician > > Thomas College > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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: From blowekamp at mail.nih.gov Wed Aug 13 12:39:26 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 13 Aug 2014 11:39:26 -0500 Subject: [ITK] Problem using Size() and iterator with ImageToListSampleAdaptor In-Reply-To: References: Message-ID: <56639AAD-D477-4C7F-B7FC-B498146000DA@mail.nih.gov> Hello, This sounds like a bug to me. Have you tried using an itk::Image of FixedArray to see if the same thins occurs? Brad On Aug 12, 2014, at 2:22 PM, Paulo Guilherme Freire wrote: > Hello. > > I've been having some troubles to understand the use of Size() and iterator when dealing with ImageToListSampleAdaptor. > > Here's what I've been doing: > > 1) Read N images (usually N = 3) and store them in an itk::VectorImage container. > > 2) Set such itk::VectorImage as input for itk::ImageToListSampleAdaptor. > > 3) Iterate over the list using a for loop (using the Size() method from the ListSample) and an iterator; in both cases, count how many times the loop was executed. > > Here is my problem: when I iterate over the list using Size() I get a different value of iterations than when I use an iterator. For example, suppose I read three 3D (256 x 256 x 256) images. When I count the number of iterations using an iterator (say, ListSampleType::Iterator), I get 16777216 (which is precisely 256 times 256 times 256). However, when I count the number of iterations using a for loop (for(unsigned int = 0; i < ListSample->Size(); ++i)), I get 50331648 (which is precisely the result of 16777216 times 3). > > My question is: shouldn't the number of iterations be the same (irregardless of whether I use an iterator or a for loop)? > > The code I've been using is attached to this email. I would really appreciate it if someone could help me solve this "mystery" :-) > > Best regards, > Paulo > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From ntustison at gmail.com Wed Aug 13 12:39:50 2014 From: ntustison at gmail.com (Nicholas Tustison) Date: Wed, 13 Aug 2014 09:39:50 -0700 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> <85D2068C-A0FC-46EE-8CF8-3F44CDB40E5D@mail.nih.gov> Message-ID: I?ll change it and add an origin far from (0,0) in the example. Nick On Aug 13, 2014, at 9:23 AM, Bradley Lowekamp wrote: > Nick, > > Thanks you for working on the patch. It appears that I was incorrect with my proposed formula for propagating the center. > > Hans, Ali, and myself have continued this discussion over the the last couple of days. After further experimentation with IPython notebooks and composite transform we developed a better test cases to interact with. This lead to the conclusion that the Center parameter is not an point in the moving image's domain, but a point in the fixed. Therefore the same center can be used for all composite affine transforms and it can more simply be just copied along. Here is the corrected statement: > > > For a Composite transformed defined as ?=T0(T1(x)) where ?:?fixed??moving then if C such that C??fixed is the correct center initialization for T0, then the correct center initialization for T1 is still C, as it is set in the in the domain ( not the range ) of the individual transforms. > > And here is a link to a viewer of the revisited notebooks: > > http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/UpdateCompositeTransformCenter/Transform%20Composition%20And%20Order.ipynb > > Brad > > On Aug 5, 2014, at 8:03 AM, Bradley Lowekamp wrote: > >> Ali, >> >> Glad to hear the registration iteration graphs where effective. >> >> Yes, you are right you can initialize the parameters of the second stage affine registration. Specifically the Center. However, it not readily apparent ( no example, no filter/initializer ) how that center fixed parameter should be initialized. And the "CenteredTransformInitializer" is not the correct way. >> >> For a Composite transformed defined as ?=T0(T1(x)) where ?:?fixed??moving then if C such that C??moving is the correct center initialization for T1, then the correct center initialization for T0 when in the composite transform is C?=T?10(C). >> >> Cool pasting from the IPython Notebook with inline latex appears to have worked :) >> >> While it is easy to do this with the MomentsCaluclator and manually doing the transform inverse, I think to make it more readily apparent and easier to use it should be available as a filter/initializer. >> >> There are several things that are done manually in the examples that I would think should be updated to use the latest filters and initializers. For example The BSplines are manually initialized instead of using the BSplineTransform Initializer[1]. Additionally, conversion of BSpline to a deformation field[2], and the the upsampling of the BSpine[3], though that last one still looks like ITKv3 framework, so maybe it'll be updated to the adaptors with v4. However I am after simple functions for these common tasks for SimpleITK, so I have a bit different perspective then one who is OK with implementing a 50 line solution in C++ and being OK with the interface. >> >> We'll discuss these initialization issue further this afternoon. >> >> Brad >> >> [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L215-L235 >> [2] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L401-L430 >> [3] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration6.cxx#L273-L330 >> >> On Aug 4, 2014, at 11:56 PM, Ghayoor, Ali wrote: >> >>> Hello Brad, >>> >>> It is an awesome way for demonstration, and thanks for verification of my example. It seems that this email is sent on Saturday, but unfortunately I got that this morning! And I should inspect the reason! >>> Anyway, over the weekend I ran almost the same experiment in ITK and got close results to you. >>> >>> Also, today I tried to make the registration process work when Affine Transform is used in a multi stage structure, and here is my suggestion: >>> >>> I think we do not need to bother ourselves to think about a new optimizer or a new initializer for the composite transform since we can initialize the fixed parameters of each transform individually at the beginning of each stage. >>> >>> Remember how we run a BSpline registration stage after some linear registrations. At the beginning of the BSpline stage, we should instantiate a BSpline transform object and define its fixed parameters (grid size, etc). Then, we pass this initialized transform to the registration filter using ?SetInitialTransform()?, yet we can initialize this stage by passing a composite transform, resultant from the previous stages, to the registration filter by ?SetMovingInitialTransform()?. >>> >>> The same condition holds for all other transform types with fixed unoptimizable parameters like the center of rotation in our Affine transform case. Attachment file includes a multi stage registration example that I have created for the new software guide. In this example, we use a simple 2 stages registration process for a multi modal problem that moving image is misaligned from the fixed image by a translation shift and rotation. In registration process, a translation transform is followed by an affine transform. Also, an initial transform is used at the beginning. >>> >>> If I do not set the center of the affine transform, the registration fails as you have shown in your Ipython example. However, if at the beginning of the second stage, I compute the geometrical center (or center of the mass) of the fixed image, and pass that to the affine transform using ?SetCenter()? or ?SetFixedParameters()?, the registration succeeds. Please take a quick look in the attached file that also includes lots of explanations. >>> >>> Therefore, we can follow the same procedure for all other transform types that their fixed parameters are important in the optimization, but those fixed parameters cannot be set explicitly inside a composite transform. Please let me know with you think about this. >>> >>> Thank you, >>> Ali >>> >>> >>> From: Bradley Lowekamp >>> Date: Saturday, August 2, 2014 at 6:48 PM >>> To: Ali Ghayoor >>> Cc: Hans Johnson , Insight Developers List >>> Subject: Re: [ITK-dev] [ITK] Optimizing composite transforms and center of transform >>> >>> Hello Ali, >>> >>> I created a notebook to try to demonstrate the problem you are describing: >>> http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb >>> >>> If the center of an Affine transformation isn't correctly initialized then the optimization is not speedy or robust. I think it's best illustrated with these two graphs: >>> >>> >>> >>> >>> Notice that with the Center being the origin, all 1000 iterations are exhausted, and the metric is slowing decreasing. And this is with the translation path being around the length to 10. If the spacing was bigger or more offset from the origin the situation would be worse. >>> >>> I don't think this is a bug with the registration framework. I think new initializers for composite transforms are needed, along with documentation how the 2 good ways to initialize the registration methods transforms. >>> >>> >>> Brad >>> >>> On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali wrote: >>> >>>> Brad, >>>> >>>> I have exactly the same issue. I wrote a simple registration program that is run in two stages: >>>> -Translation >>>> -Affine >>>> >>>> My fixed and moving images are in 2D, and the moving image is created from the fixed image by >>>> rotation of 10 degree and translation of [13,17] in X and Y directions. >>>> >>>> The first stage does a translation registration and the result transform is added to a composite transform >>>> that is used as the initial moving transform of the second stage. >>>> >>>> After the registration the result transform of the second stage is also added to the composite transform >>>> to be used by the resampler. >>>> >>>> I have printed the composite transform to the screen: >>>> >>>> 2481: CompositeTransform (0x7fa359a18b00) >>>> 2481: RTTI typeinfo: itk::CompositeTransform >>>> 2481: Reference Count: 2 >>>> 2481: Modified Time: 20949 >>>> 2481: Debug: Off >>>> 2481: Object Name: >>>> 2481: Observers: >>>> 2481: none >>>> 2481: Transforms in queue, from begin to end: >>>> 2481: >>>>>>>>> >>>> 2481: TranslationTransform (0x7fa359a199b0) >>>> 2481: RTTI typeinfo: itk::TranslationTransform >>>> 2481: Reference Count: 7 >>>> 2481: Modified Time: 1648 >>>> 2481: Debug: Off >>>> 2481: Object Name: >>>> 2481: Observers: >>>> 2481: none >>>> 2481: Offset: [12.801, 15.8578] >>>> 2481: >>>>>>>>> >>>> 2481: AffineTransform (0x7fa359d095a0) >>>> 2481: RTTI typeinfo: itk::AffineTransform >>>> 2481: Reference Count: 5 >>>> 2481: Modified Time: 20946 >>>> 2481: Debug: Off >>>> 2481: Object Name: >>>> 2481: Observers: >>>> 2481: none >>>> 2481: Matrix: >>>> 2481: 1.01593 -0.0100051 >>>> 2481: -0.00835669 1.01113 >>>> 2481: Offset: [-0.358829, -0.290093] >>>> 2481: Center: [0, 0] >>>> 2481: Translation: [-0.358829, -0.290093] >>>> 2481: Inverse: >>>> 2481: 0.984397 0.00974056 >>>> 2481: 0.00813575 0.989073 >>>> 2481: Singular: 0 >>>> 2481: End of MultiTransform. >>>> 2481: <<<<<<<<<< >>>> >>>> As it can be seen, the translation transform provides a good initialization since its offset (Offset: [12.801, 15.8578]) is close to the shift parameters. >>>> >>>> However, the Affine transform fails to rotate the moving image since its Matrix is almost identity. >>>> Possible reason can be the improper Center of Affine transform that is fixed to [0,0], and not at geometrical center or center of mass. >>>> >>>> To make sure that I have not made any crazy mistake in my example, I simulated my example parameters in ANTs, and ANTs returned >>>> the same results and failed to register the images!! >>>> >>>>>>>>> ANTs command line <<<<<<<<<<< >>>> >>>> PROGPATH=/scratch/ANTS/release-new/bin >>>> fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png >>>> mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png >>>> >>>> time ${PROGPATH}/antsRegistration -d 2 \ >>>> --float \ >>>> --output [test1, warpedMoving.nii.gz] \ >>>> --transform "Translation[16]" \ >>>> --metric MI[${fi},${mi},1,32,None,1] \ >>>> --convergence [100,1e-2,5] \ >>>> --shrink-factors 3 \ >>>> --smoothing-sigmas 2 \ >>>> --use-histogram-matching 1 \ >>>> \ >>>> --transform "Affine[1]" \ >>>> --metric MI[${fi},${mi},1,32] \ >>>> --convergence [100x100,1e-2,2] \ >>>> --shrink-factors 2x1 \ >>>> --smoothing-sigmas 1x0 \ >>>> --use-histogram-matching 1 >>>> >>>> <<<<<<<<<<<<<<<<<<<<<<<< >>>> >>>> Fixed and moving images can be loaded from the ITK data files. What do you think about this example? Is it a bug in ITK or just the parameters are not tuned finely? >>>> >>>> Thanks, >>>> Ali >>>> >>>> ________________________________________ >>>> From: Johnson, Hans J >>>> Sent: Tuesday, July 29, 2014 6:19 PM >>>> To: Ghayoor, Ali >>>> Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of transform >>>> >>>> Ali, >>>> >>>> You need to follow this discussion. >>>> >>>> Hans >>>> >>>> On 7/29/14, 6:16 PM, "Bradley Lowekamp" wrote: >>>> >>>>> Hello, >>>>> >>>>> Ok, to further explore this problem, and hopeful help other people too: I >>>>> created an IPython Notebook viewable here: >>>>> http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl >>>>> ob/master/Transform%20Composition%20And%20Order.ipynb >>>>> >>>>> It doesn't come through on the static page, but I added some nifty >>>>> interactive slider widgets to change the rotation parameter. Which is >>>>> really the point to enable understanding of the parameters for the >>>>> transform and how they should be best optimized. The notebook should work >>>>> with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one >>>>> to try it out :) IPython Notebooks widget are very cool! >>>>> >>>>> EXPLANATION: >>>>> >>>>> The the order of the composite transform is that the new transforms are >>>>> applied first. >>>>> >>>>> BUT they map from the virtual domain ( fixed ) to the moving image. >>>>> Therefore if your first transform moves the center of mass to the origin >>>>> then the second added transform's space will be centered on the mass, >>>>> which is good for optimizing rotation and affine parameters. >>>>> >>>>> QUESTION: >>>>> >>>>> Therefore I am inclined to conclude that its best practices to map the >>>>> fixed and moving image to the virtual domain such that the center of mass >>>>> ( or some other "center feature" ) are at the origin. This would then the >>>>> scale, rotation and other affine parameters around the center, with out >>>>> having to used the "Center" parameter the transforms currently have. >>>>> >>>>> Is this what others are doing in their registration? For general best >>>>> practices should this be recommend? >>>>> >>>>> @Brian I know I have seen this multi-domain description many time, but I >>>>> think I may have just gotten it... Is the well describe in the literature >>>>> some place? I think this may be an important part add the software guide. >>>>> >>>>> Thanks, >>>>> Brad >>>>> >>>>> >>>>> >>>>> >>>>> On Jul 29, 2014, at 5:38 PM, Matt McCormick >>>>> wrote: >>>>> >>>>>> Hi Brad, >>>>>> >>>>>> Your assessment that the fixed center is important is correct. >>>>>> >>>>>> In most cases, a transform with a Center is the first transform in a >>>>>> Composite transform. There not any issues here. However, if the >>>>>> transform with a Center is further along the chain, then a >>>>>> CenteredTransformInitializer that was applied before the registration >>>>>> is started will not generate the desired result. In this case, we >>>>>> would have to respond to an Event in the registration process and >>>>>> estimated the center on the imaged after the other transforms have >>>>>> been applied. It is more work, but it is a more unusual case. >>>>>> >>>>>> HTH, >>>>>> Matt >>>>>> >>>>>> >>>>>> >>>>>> On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp >>>>>> wrote: >>>>>>> Helloo Nick! >>>>>>> >>>>>>> I am glad you got back to me. >>>>>>> >>>>>>> I suspect that I have spent more time this past week looking at the >>>>>>> ITK affine transforms than anyone else[1] this week. With that here is >>>>>>> my current understanding... >>>>>>> >>>>>>> 1) The CenterTransformInitializers estimates an initial "Center" and >>>>>>> an initial "Translation" parameter from either the geometry or the >>>>>>> first moments. From my problematic experiences, getting the initial >>>>>>> transform which is a "good" guess is been critical for the optimizer to >>>>>>> head to the correct solution. >>>>>>> >>>>>>> 2) The Center parameter of a transform can either be "Fixed" or an >>>>>>> optimizable parameter. The transforms with the "Centered" monkier are >>>>>>> the the ones with the Center parameter optimizable. This issue seems to >>>>>>> be what you were referring to in to message. >>>>>>> >>>>>>> In many ways the point I am trying to make is independent of #2. I >>>>>>> have observed that it's important to have the "Center" of an affine >>>>>>> transform ( or sub parameterization thereof ) at the center of the >>>>>>> object you are trying to register. That is the coordinate space of the >>>>>>> optimizable parameters' point 0 is near the center. This enables >>>>>>> rotation to easily rotate around the center, as well as scaling to >>>>>>> maintain the same relative center when "zooming". This issue is >>>>>>> independent of wether that center point can be optimized. >>>>>>> >>>>>>> For example, consider changing the origin of an image for alignment by >>>>>>> say 500, and compensating with just an initial translation and not >>>>>>> setting the "Center" parameter. If we are trying to optimize rotation >>>>>>> and translation, then the optimization path would be very difficult to >>>>>>> traverse with these inter-dependent parameters to force it to rotate >>>>>>> around the center of the object. This scenario may be more common in >>>>>>> microscopy then medical imaging, due to microscopy frequently having >>>>>>> multiple subjects across large images. I could write up a IPython >>>>>>> Notebook to illustrate the case. >>>>>>> >>>>>>> So that is my understanding of why using a fixed center is important. >>>>>>> I thought this may have been shared knowledge, but perhaps is not or is >>>>>>> incorrect... >>>>>>> >>>>>>> Now I am trying to understand how this interacts with all the >>>>>>> coordinate frames involved with the ITKv4 registration framework, and >>>>>>> the composite transforms. Specifically the composite transform apply >>>>>>> the transforms in "reverse order"[2]. As I understand that that means >>>>>>> that the newest transform get applied first. So that transform >>>>>>> parameters are being optimized in the images space not in the virtual >>>>>>> domains we are working towards. Therefore the center of our transforms >>>>>>> is still important as we composite transforms? >>>>>>> >>>>>>> I hope I explained that clearly, a white board may really be needed.... >>>>>>> >>>>>>> Thanks, >>>>>>> Brad >>>>>>> >>>>>>> >>>>>>> [1] >>>>>>> https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94 >>>>>>> 099d3519eb23bcc16c7cf015 >>>>>>> [2] http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html >>>>>>> >>>>>>> On Jul 28, 2014, at 8:57 PM, Nicholas Tustison >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Brad, >>>>>>>> >>>>>>>> I apologize for the delayed response. I?m still catching up on my >>>>>>>> workload after moving to CA. We might want to talk to Luis as it >>>>>>>> was my understanding that the ?center? component of the linear >>>>>>>> transforms might be a carry-over from all the ?Centered? transforms, >>>>>>>> e.g., >>>>>>>> >>>>>>>> >>>>>>>> http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm >>>>>>>> l >>>>>>>> >>>>>>>> which, if I remember correctly, Luis said were somewhat sub optimally >>>>>>>> conceived but this was such a long time ago that I might be completely >>>>>>>> misremembering. However, fixing the center for all transforms within >>>>>>>> a composite transform is certainly not necessary within the specified >>>>>>>> framework. Rather, the matrix and offset are updated with the >>>>>>>> ?Center? >>>>>>>> being updated implicitly. >>>>>>>> >>>>>>>> Nick >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hello, >>>>>>>>> >>>>>>>>> There are a lot of transforms involved in the new registration >>>>>>>>> framework. >>>>>>>>> >>>>>>>>> I am trying to figure out what the implications for the fix >>>>>>>>> parameters of the transform "Center" ( ie center of rotation/scaling >>>>>>>>> ) are when combined with composite transforms and the >>>>>>>>> fixed/moving/registration coordinate frames... >>>>>>>>> >>>>>>>>> Based on how the transforms are composed it seems necessary to set >>>>>>>>> the fix "Center" for subsequent transformations. Additionally, I am >>>>>>>>> unsure how one would "improve" ( poorly defined? ) the center for a >>>>>>>>> subsequent transform ie Affine after a similarity... >>>>>>>>> >>>>>>>>> Are there some documented guidance or figures to help with this >>>>>>>>> issue? >>>>>>>>> Do we have a comprehensive diagram of these transforms? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> 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 >>>>>>> _______________________________________________ >>>>>>> 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 >>>> >>>> >>>> >>>> ________________________________ >>>> 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 >> _______________________________________________ >> 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://kitware.com/products/protraining.php Please keep messages on-topic and check 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 Wed Aug 13 12:23:18 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 13 Aug 2014 11:23:18 -0500 Subject: [ITK] [ITK-dev] Optimizing composite transforms and center of transform In-Reply-To: <85D2068C-A0FC-46EE-8CF8-3F44CDB40E5D@mail.nih.gov> References: <1C9E74C7-FD25-45DB-AABB-87A6FD6F48AD@gmail.com> <2A37CDEA-B4F3-4826-BAF8-D64D6C4A53F6@mail.nih.gov> <97C77D92-4BAD-4D90-912D-E2AB95D63E19@mail.nih.gov> <85D2068C-A0FC-46EE-8CF8-3F44CDB40E5D@mail.nih.gov> Message-ID: Nick, Thanks you for working on the patch. It appears that I was incorrect with my proposed formula for propagating the center. Hans, Ali, and myself have continued this discussion over the the last couple of days. After further experimentation with IPython notebooks and composite transform we developed a better test cases to interact with. This lead to the conclusion that the Center parameter is not an point in the moving image's domain, but a point in the fixed. Therefore the same center can be used for all composite affine transforms and it can more simply be just copied along. Here is the corrected statement: For a Composite transformed defined as ?=T0(T1(x)) where ?:?fixed??moving then if C such that C??fixed is the correct center initialization for T0, then the correct center initialization for T1 is still C, as it is set in the in the domain ( not the range ) of the individual transforms. And here is a link to a viewer of the revisited notebooks: http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/UpdateCompositeTransformCenter/Transform%20Composition%20And%20Order.ipynb Brad On Aug 5, 2014, at 8:03 AM, Bradley Lowekamp wrote: > Ali, > > Glad to hear the registration iteration graphs where effective. > > Yes, you are right you can initialize the parameters of the second stage affine registration. Specifically the Center. However, it not readily apparent ( no example, no filter/initializer ) how that center fixed parameter should be initialized. And the "CenteredTransformInitializer" is not the correct way. > > For a Composite transformed defined as ?=T0(T1(x)) where ?:?fixed??moving then if C such that C??moving is the correct center initialization for T1, then the correct center initialization for T0 when in the composite transform is C?=T?10(C). > > Cool pasting from the IPython Notebook with inline latex appears to have worked :) > > While it is easy to do this with the MomentsCaluclator and manually doing the transform inverse, I think to make it more readily apparent and easier to use it should be available as a filter/initializer. > > There are several things that are done manually in the examples that I would think should be updated to use the latest filters and initializers. For example The BSplines are manually initialized instead of using the BSplineTransform Initializer[1]. Additionally, conversion of BSpline to a deformation field[2], and the the upsampling of the BSpine[3], though that last one still looks like ITKv3 framework, so maybe it'll be updated to the adaptors with v4. However I am after simple functions for these common tasks for SimpleITK, so I have a bit different perspective then one who is OK with implementing a 50 line solution in C++ and being OK with the interface. > > We'll discuss these initialization issue further this afternoon. > > Brad > > [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L215-L235 > [2] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L401-L430 > [3] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration6.cxx#L273-L330 > > On Aug 4, 2014, at 11:56 PM, Ghayoor, Ali wrote: > >> Hello Brad, >> >> It is an awesome way for demonstration, and thanks for verification of my example. It seems that this email is sent on Saturday, but unfortunately I got that this morning! And I should inspect the reason! >> Anyway, over the weekend I ran almost the same experiment in ITK and got close results to you. >> >> Also, today I tried to make the registration process work when Affine Transform is used in a multi stage structure, and here is my suggestion: >> >> I think we do not need to bother ourselves to think about a new optimizer or a new initializer for the composite transform since we can initialize the fixed parameters of each transform individually at the beginning of each stage. >> >> Remember how we run a BSpline registration stage after some linear registrations. At the beginning of the BSpline stage, we should instantiate a BSpline transform object and define its fixed parameters (grid size, etc). Then, we pass this initialized transform to the registration filter using ?SetInitialTransform()?, yet we can initialize this stage by passing a composite transform, resultant from the previous stages, to the registration filter by ?SetMovingInitialTransform()?. >> >> The same condition holds for all other transform types with fixed unoptimizable parameters like the center of rotation in our Affine transform case. Attachment file includes a multi stage registration example that I have created for the new software guide. In this example, we use a simple 2 stages registration process for a multi modal problem that moving image is misaligned from the fixed image by a translation shift and rotation. In registration process, a translation transform is followed by an affine transform. Also, an initial transform is used at the beginning. >> >> If I do not set the center of the affine transform, the registration fails as you have shown in your Ipython example. However, if at the beginning of the second stage, I compute the geometrical center (or center of the mass) of the fixed image, and pass that to the affine transform using ?SetCenter()? or ?SetFixedParameters()?, the registration succeeds. Please take a quick look in the attached file that also includes lots of explanations. >> >> Therefore, we can follow the same procedure for all other transform types that their fixed parameters are important in the optimization, but those fixed parameters cannot be set explicitly inside a composite transform. Please let me know with you think about this. >> >> Thank you, >> Ali >> >> >> From: Bradley Lowekamp >> Date: Saturday, August 2, 2014 at 6:48 PM >> To: Ali Ghayoor >> Cc: Hans Johnson , Insight Developers List >> Subject: Re: [ITK-dev] [ITK] Optimizing composite transforms and center of transform >> >> Hello Ali, >> >> I created a notebook to try to demonstrate the problem you are describing: >> http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb >> >> If the center of an Affine transformation isn't correctly initialized then the optimization is not speedy or robust. I think it's best illustrated with these two graphs: >> >> >> >> >> Notice that with the Center being the origin, all 1000 iterations are exhausted, and the metric is slowing decreasing. And this is with the translation path being around the length to 10. If the spacing was bigger or more offset from the origin the situation would be worse. >> >> I don't think this is a bug with the registration framework. I think new initializers for composite transforms are needed, along with documentation how the 2 good ways to initialize the registration methods transforms. >> >> >> Brad >> >> On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali wrote: >> >>> Brad, >>> >>> I have exactly the same issue. I wrote a simple registration program that is run in two stages: >>> -Translation >>> -Affine >>> >>> My fixed and moving images are in 2D, and the moving image is created from the fixed image by >>> rotation of 10 degree and translation of [13,17] in X and Y directions. >>> >>> The first stage does a translation registration and the result transform is added to a composite transform >>> that is used as the initial moving transform of the second stage. >>> >>> After the registration the result transform of the second stage is also added to the composite transform >>> to be used by the resampler. >>> >>> I have printed the composite transform to the screen: >>> >>> 2481: CompositeTransform (0x7fa359a18b00) >>> 2481: RTTI typeinfo: itk::CompositeTransform >>> 2481: Reference Count: 2 >>> 2481: Modified Time: 20949 >>> 2481: Debug: Off >>> 2481: Object Name: >>> 2481: Observers: >>> 2481: none >>> 2481: Transforms in queue, from begin to end: >>> 2481: >>>>>>>>> >>> 2481: TranslationTransform (0x7fa359a199b0) >>> 2481: RTTI typeinfo: itk::TranslationTransform >>> 2481: Reference Count: 7 >>> 2481: Modified Time: 1648 >>> 2481: Debug: Off >>> 2481: Object Name: >>> 2481: Observers: >>> 2481: none >>> 2481: Offset: [12.801, 15.8578] >>> 2481: >>>>>>>>> >>> 2481: AffineTransform (0x7fa359d095a0) >>> 2481: RTTI typeinfo: itk::AffineTransform >>> 2481: Reference Count: 5 >>> 2481: Modified Time: 20946 >>> 2481: Debug: Off >>> 2481: Object Name: >>> 2481: Observers: >>> 2481: none >>> 2481: Matrix: >>> 2481: 1.01593 -0.0100051 >>> 2481: -0.00835669 1.01113 >>> 2481: Offset: [-0.358829, -0.290093] >>> 2481: Center: [0, 0] >>> 2481: Translation: [-0.358829, -0.290093] >>> 2481: Inverse: >>> 2481: 0.984397 0.00974056 >>> 2481: 0.00813575 0.989073 >>> 2481: Singular: 0 >>> 2481: End of MultiTransform. >>> 2481: <<<<<<<<<< >>> >>> As it can be seen, the translation transform provides a good initialization since its offset (Offset: [12.801, 15.8578]) is close to the shift parameters. >>> >>> However, the Affine transform fails to rotate the moving image since its Matrix is almost identity. >>> Possible reason can be the improper Center of Affine transform that is fixed to [0,0], and not at geometrical center or center of mass. >>> >>> To make sure that I have not made any crazy mistake in my example, I simulated my example parameters in ANTs, and ANTs returned >>> the same results and failed to register the images!! >>> >>>>>>>> ANTs command line <<<<<<<<<<< >>> >>> PROGPATH=/scratch/ANTS/release-new/bin >>> fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png >>> mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png >>> >>> time ${PROGPATH}/antsRegistration -d 2 \ >>> --float \ >>> --output [test1, warpedMoving.nii.gz] \ >>> --transform "Translation[16]" \ >>> --metric MI[${fi},${mi},1,32,None,1] \ >>> --convergence [100,1e-2,5] \ >>> --shrink-factors 3 \ >>> --smoothing-sigmas 2 \ >>> --use-histogram-matching 1 \ >>> \ >>> --transform "Affine[1]" \ >>> --metric MI[${fi},${mi},1,32] \ >>> --convergence [100x100,1e-2,2] \ >>> --shrink-factors 2x1 \ >>> --smoothing-sigmas 1x0 \ >>> --use-histogram-matching 1 >>> >>> <<<<<<<<<<<<<<<<<<<<<<<< >>> >>> Fixed and moving images can be loaded from the ITK data files. What do you think about this example? Is it a bug in ITK or just the parameters are not tuned finely? >>> >>> Thanks, >>> Ali >>> >>> ________________________________________ >>> From: Johnson, Hans J >>> Sent: Tuesday, July 29, 2014 6:19 PM >>> To: Ghayoor, Ali >>> Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of transform >>> >>> Ali, >>> >>> You need to follow this discussion. >>> >>> Hans >>> >>> On 7/29/14, 6:16 PM, "Bradley Lowekamp" wrote: >>> >>>> Hello, >>>> >>>> Ok, to further explore this problem, and hopeful help other people too: I >>>> created an IPython Notebook viewable here: >>>> http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl >>>> ob/master/Transform%20Composition%20And%20Order.ipynb >>>> >>>> It doesn't come through on the static page, but I added some nifty >>>> interactive slider widgets to change the rotation parameter. Which is >>>> really the point to enable understanding of the parameters for the >>>> transform and how they should be best optimized. The notebook should work >>>> with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one >>>> to try it out :) IPython Notebooks widget are very cool! >>>> >>>> EXPLANATION: >>>> >>>> The the order of the composite transform is that the new transforms are >>>> applied first. >>>> >>>> BUT they map from the virtual domain ( fixed ) to the moving image. >>>> Therefore if your first transform moves the center of mass to the origin >>>> then the second added transform's space will be centered on the mass, >>>> which is good for optimizing rotation and affine parameters. >>>> >>>> QUESTION: >>>> >>>> Therefore I am inclined to conclude that its best practices to map the >>>> fixed and moving image to the virtual domain such that the center of mass >>>> ( or some other "center feature" ) are at the origin. This would then the >>>> scale, rotation and other affine parameters around the center, with out >>>> having to used the "Center" parameter the transforms currently have. >>>> >>>> Is this what others are doing in their registration? For general best >>>> practices should this be recommend? >>>> >>>> @Brian I know I have seen this multi-domain description many time, but I >>>> think I may have just gotten it... Is the well describe in the literature >>>> some place? I think this may be an important part add the software guide. >>>> >>>> Thanks, >>>> Brad >>>> >>>> >>>> >>>> >>>> On Jul 29, 2014, at 5:38 PM, Matt McCormick >>>> wrote: >>>> >>>>> Hi Brad, >>>>> >>>>> Your assessment that the fixed center is important is correct. >>>>> >>>>> In most cases, a transform with a Center is the first transform in a >>>>> Composite transform. There not any issues here. However, if the >>>>> transform with a Center is further along the chain, then a >>>>> CenteredTransformInitializer that was applied before the registration >>>>> is started will not generate the desired result. In this case, we >>>>> would have to respond to an Event in the registration process and >>>>> estimated the center on the imaged after the other transforms have >>>>> been applied. It is more work, but it is a more unusual case. >>>>> >>>>> HTH, >>>>> Matt >>>>> >>>>> >>>>> >>>>> On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp >>>>> wrote: >>>>>> Helloo Nick! >>>>>> >>>>>> I am glad you got back to me. >>>>>> >>>>>> I suspect that I have spent more time this past week looking at the >>>>>> ITK affine transforms than anyone else[1] this week. With that here is >>>>>> my current understanding... >>>>>> >>>>>> 1) The CenterTransformInitializers estimates an initial "Center" and >>>>>> an initial "Translation" parameter from either the geometry or the >>>>>> first moments. From my problematic experiences, getting the initial >>>>>> transform which is a "good" guess is been critical for the optimizer to >>>>>> head to the correct solution. >>>>>> >>>>>> 2) The Center parameter of a transform can either be "Fixed" or an >>>>>> optimizable parameter. The transforms with the "Centered" monkier are >>>>>> the the ones with the Center parameter optimizable. This issue seems to >>>>>> be what you were referring to in to message. >>>>>> >>>>>> In many ways the point I am trying to make is independent of #2. I >>>>>> have observed that it's important to have the "Center" of an affine >>>>>> transform ( or sub parameterization thereof ) at the center of the >>>>>> object you are trying to register. That is the coordinate space of the >>>>>> optimizable parameters' point 0 is near the center. This enables >>>>>> rotation to easily rotate around the center, as well as scaling to >>>>>> maintain the same relative center when "zooming". This issue is >>>>>> independent of wether that center point can be optimized. >>>>>> >>>>>> For example, consider changing the origin of an image for alignment by >>>>>> say 500, and compensating with just an initial translation and not >>>>>> setting the "Center" parameter. If we are trying to optimize rotation >>>>>> and translation, then the optimization path would be very difficult to >>>>>> traverse with these inter-dependent parameters to force it to rotate >>>>>> around the center of the object. This scenario may be more common in >>>>>> microscopy then medical imaging, due to microscopy frequently having >>>>>> multiple subjects across large images. I could write up a IPython >>>>>> Notebook to illustrate the case. >>>>>> >>>>>> So that is my understanding of why using a fixed center is important. >>>>>> I thought this may have been shared knowledge, but perhaps is not or is >>>>>> incorrect... >>>>>> >>>>>> Now I am trying to understand how this interacts with all the >>>>>> coordinate frames involved with the ITKv4 registration framework, and >>>>>> the composite transforms. Specifically the composite transform apply >>>>>> the transforms in "reverse order"[2]. As I understand that that means >>>>>> that the newest transform get applied first. So that transform >>>>>> parameters are being optimized in the images space not in the virtual >>>>>> domains we are working towards. Therefore the center of our transforms >>>>>> is still important as we composite transforms? >>>>>> >>>>>> I hope I explained that clearly, a white board may really be needed.... >>>>>> >>>>>> Thanks, >>>>>> Brad >>>>>> >>>>>> >>>>>> [1] >>>>>> https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94 >>>>>> 099d3519eb23bcc16c7cf015 >>>>>> [2] http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html >>>>>> >>>>>> On Jul 28, 2014, at 8:57 PM, Nicholas Tustison >>>>>> wrote: >>>>>> >>>>>>> Hi Brad, >>>>>>> >>>>>>> I apologize for the delayed response. I?m still catching up on my >>>>>>> workload after moving to CA. We might want to talk to Luis as it >>>>>>> was my understanding that the ?center? component of the linear >>>>>>> transforms might be a carry-over from all the ?Centered? transforms, >>>>>>> e.g., >>>>>>> >>>>>>> >>>>>>> http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm >>>>>>> l >>>>>>> >>>>>>> which, if I remember correctly, Luis said were somewhat sub optimally >>>>>>> conceived but this was such a long time ago that I might be completely >>>>>>> misremembering. However, fixing the center for all transforms within >>>>>>> a composite transform is certainly not necessary within the specified >>>>>>> framework. Rather, the matrix and offset are updated with the >>>>>>> ?Center? >>>>>>> being updated implicitly. >>>>>>> >>>>>>> Nick >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp >>>>>>> wrote: >>>>>>> >>>>>>>> Hello, >>>>>>>> >>>>>>>> There are a lot of transforms involved in the new registration >>>>>>>> framework. >>>>>>>> >>>>>>>> I am trying to figure out what the implications for the fix >>>>>>>> parameters of the transform "Center" ( ie center of rotation/scaling >>>>>>>> ) are when combined with composite transforms and the >>>>>>>> fixed/moving/registration coordinate frames... >>>>>>>> >>>>>>>> Based on how the transforms are composed it seems necessary to set >>>>>>>> the fix "Center" for subsequent transformations. Additionally, I am >>>>>>>> unsure how one would "improve" ( poorly defined? ) the center for a >>>>>>>> subsequent transform ie Affine after a similarity... >>>>>>>> >>>>>>>> Are there some documented guidance or figures to help with this >>>>>>>> issue? >>>>>>>> Do we have a comprehensive diagram of these transforms? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> 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 >>>>>> _______________________________________________ >>>>>> 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 >>> >>> >>> >>> ________________________________ >>> 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 > _______________________________________________ > 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://kitware.com/products/protraining.php Please keep messages on-topic and check 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 Aug 13 13:36:21 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 13 Aug 2014 13:36:21 -0400 Subject: [ITK] Problem using Size() and iterator with ImageToListSampleAdaptor In-Reply-To: <56639AAD-D477-4C7F-B7FC-B498146000DA@mail.nih.gov> References: <56639AAD-D477-4C7F-B7FC-B498146000DA@mail.nih.gov> Message-ID: Hi, Yes, it is a bug. Thank you for discussing the issue on the list and for including a buildable example that clearly illustrates the issue. Please review [1] this patch [2]. Thanks, Matt [1]http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html [2] http://review.source.kitware.com/#/c/16663/ On Wed, Aug 13, 2014 at 12:39 PM, Bradley Lowekamp wrote: > Hello, > > This sounds like a bug to me. Have you tried using an itk::Image of FixedArray to see if the same thins occurs? > > Brad > > On Aug 12, 2014, at 2:22 PM, Paulo Guilherme Freire wrote: > >> Hello. >> >> I've been having some troubles to understand the use of Size() and iterator when dealing with ImageToListSampleAdaptor. >> >> Here's what I've been doing: >> >> 1) Read N images (usually N = 3) and store them in an itk::VectorImage container. >> >> 2) Set such itk::VectorImage as input for itk::ImageToListSampleAdaptor. >> >> 3) Iterate over the list using a for loop (using the Size() method from the ListSample) and an iterator; in both cases, count how many times the loop was executed. >> >> Here is my problem: when I iterate over the list using Size() I get a different value of iterations than when I use an iterator. For example, suppose I read three 3D (256 x 256 x 256) images. When I count the number of iterations using an iterator (say, ListSampleType::Iterator), I get 16777216 (which is precisely 256 times 256 times 256). However, when I count the number of iterations using a for loop (for(unsigned int = 0; i < ListSample->Size(); ++i)), I get 50331648 (which is precisely the result of 16777216 times 3). >> >> My question is: shouldn't the number of iterations be the same (irregardless of whether I use an iterator or a for loop)? >> >> The code I've been using is attached to this email. I would really appreciate it if someone could help me solve this "mystery" :-) >> >> Best regards, >> Paulo >> >> >> _______________________________________________ >> 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 From nekto1989 at gmail.com Wed Aug 13 13:47:02 2014 From: nekto1989 at gmail.com (=?UTF-8?B?0JzQsNGAJ9GP0L0g0JrQu9C40LzQvtCy?=) Date: Wed, 13 Aug 2014 20:47:02 +0300 Subject: [ITK] Getting ImageType for TIFF Message-ID: Hi, How to properly read 32-bit TIFF? I need to get itk::Image on output. If I use it as ImageType for ImageFileReader, it is read as fully black (checked contrast with Image Watch and it is for sure completely empty). If I read it with pixel type RGBPixel or RGBAPixel, it is read properly. But I need to convert it manually to unsigned short after this. So what is the proper way of reading it? Do I need to create templated methods for every pixeltype with conversions to unsigned short? Best regards, Marian -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Aug 13 13:50:04 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 13 Aug 2014 13:50:04 -0400 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Hi Marian, If itk::Image< unsigned short, 2 > is used for the ImageType, does it work (note the dimension specification). HTH, Matt On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? wrote: > Hi, > > How to properly read 32-bit TIFF? I need to get itk::Image > on output. If I use it as ImageType for ImageFileReader, it is read as fully > black (checked contrast with Image Watch and it is for sure completely > empty). If I read it with pixel type RGBPixel or > RGBAPixel, it is read properly. But I need to convert it > manually to unsigned short after this. So what is the proper way of reading > it? Do I need to create templated methods for every pixeltype with > conversions to unsigned short? > > Best regards, > Marian > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From sebastian.ordas at gmail.com Wed Aug 13 13:50:24 2014 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Wed, 13 Aug 2014 14:50:24 -0300 Subject: [ITK] [ITK-users] FDA agile practices guidance Message-ID: <53EBA560.208@gmail.com> Hello friends, Sorry if it is not the right place for asking this question, but does anyone know about resources about FDA guidances for implementing agile practices in the development of medical device software? In concrete, the document AAMI TIR45:2012 is the one I am seeking online. thank you, sebastian _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 Jared.Becksfort at STJUDE.ORG Wed Aug 13 13:57:54 2014 From: Jared.Becksfort at STJUDE.ORG (Becksfort, Jared) Date: Wed, 13 Aug 2014 12:57:54 -0500 Subject: [ITK] [ITK-users] Rotation or registration by plane Message-ID: Hello, Sorry if this is a dumb question (I feel like it may be). I have a plane in an MRI. I would like to either: * Change the coordinate system to refer to this plane (transform coordinates by plane) * Transform the image so that this plane is in the center (transform image by plane) Is there a registration algorithm that allows this? Thanks, Jared ________________________________ Email Disclaimer: www.stjude.org/emaildisclaimer Consultation Disclaimer: www.stjude.org/consultationdisclaimer _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 pauloguilhermefreire at gmail.com Wed Aug 13 14:26:28 2014 From: pauloguilhermefreire at gmail.com (Paulo Guilherme Freire) Date: Wed, 13 Aug 2014 15:26:28 -0300 Subject: [ITK] Problem using Size() and iterator with ImageToListSampleAdaptor In-Reply-To: References: <56639AAD-D477-4C7F-B7FC-B498146000DA@mail.nih.gov> Message-ID: Hello, Matt. Thank you very much for your reply and for providing a patch. I'll review it as soon as I can. Best regards, Paulo On 13 August 2014 14:36, Matt McCormick wrote: > Hi, > > Yes, it is a bug. Thank you for discussing the issue on the list and > for including a buildable example that clearly illustrates the issue. > > Please review [1] this patch [2]. > > Thanks, > Matt > > [1] > http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html > > [2] http://review.source.kitware.com/#/c/16663/ > > On Wed, Aug 13, 2014 at 12:39 PM, Bradley Lowekamp > wrote: > > Hello, > > > > This sounds like a bug to me. Have you tried using an itk::Image of > FixedArray to see if the same thins occurs? > > > > Brad > > > > On Aug 12, 2014, at 2:22 PM, Paulo Guilherme Freire < > pauloguilhermefreire at gmail.com> wrote: > > > >> Hello. > >> > >> I've been having some troubles to understand the use of Size() and > iterator when dealing with ImageToListSampleAdaptor. > >> > >> Here's what I've been doing: > >> > >> 1) Read N images (usually N = 3) and store them in an itk::VectorImage > container. > >> > >> 2) Set such itk::VectorImage as input for itk::ImageToListSampleAdaptor. > >> > >> 3) Iterate over the list using a for loop (using the Size() method from > the ListSample) and an iterator; in both cases, count how many times the > loop was executed. > >> > >> Here is my problem: when I iterate over the list using Size() I get a > different value of iterations than when I use an iterator. For example, > suppose I read three 3D (256 x 256 x 256) images. When I count the number > of iterations using an iterator (say, ListSampleType::Iterator), I get > 16777216 (which is precisely 256 times 256 times 256). However, when I > count the number of iterations using a for loop (for(unsigned int = 0; i < > ListSample->Size(); ++i)), I get 50331648 (which is precisely the result of > 16777216 times 3). > >> > >> My question is: shouldn't the number of iterations be the same > (irregardless of whether I use an iterator or a for loop)? > >> > >> The code I've been using is attached to this email. I would really > appreciate it if someone could help me solve this "mystery" :-) > >> > >> Best regards, > >> Paulo > >> > >> > >> > _______________________________________________ > >> 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 > -- Paulo Guilherme de Lima Freire Bacharelado em Ci?ncia da Computa??o 010 Universidade Federal de S?o Carlos - UFSCar -------------- next part -------------- An HTML attachment was scrubbed... URL: From nekto1989 at gmail.com Wed Aug 13 14:27:27 2014 From: nekto1989 at gmail.com (=?UTF-8?B?0JzQsNGAJ9GP0L0g0JrQu9C40LzQvtCy?=) Date: Wed, 13 Aug 2014 21:27:27 +0300 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: { typedef unsigned short PixelType; typedef itk::Image ImageType; auto reader = itk::ImageFileReader< ImageType>::New(); reader->SetFileName("D:/TestData/input/input.tif"); reader->SetImageIO(itk::TIFFImageIO::New()); typedef unsigned short OutputPixelType; typedef itk::Image OutputImageType; auto writer = itk::ImageFileWriter::New(); writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); auto image_io = itk::TIFFImageIO::New(); image_io->SetPixelType(itk::ImageIOBase::SCALAR); writer->SetImageIO(image_io); writer->SetInput(reader->GetOutput()); writer->Update(); //produces completely black } { typedef itk::RGBAPixel PixelType; typedef itk::Image ImageType; auto reader = itk::ImageFileReader::New(); reader->SetFileName("D:/TestData/input/input.tif"); reader->SetImageIO(itk::TIFFImageIO::New()); reader->Update(); typedef unsigned short OutputPixelType; typedef itk::Image OutputImageType; auto input_image = reader->GetOutput(); auto output_image = OutputImageType::New(); output_image->CopyInformation(input_image); output_image->SetRegions(input_image->GetLargestPossibleRegion()); output_image->Allocate(); itk::ImageRegionConstIterator const_iterator(input_image, input_image->GetLargestPossibleRegion()); itk::ImageRegionIterator rescaled_iterator(output_image, output_image->GetLargestPossibleRegion()); for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) { const PixelType& pixel = const_iterator.Get(); rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) * 16 + pixel.GetGreen()) * 16 + pixel.GetBlue()); } auto writer = itk::ImageFileWriter::New(); writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); auto image_io = itk::TIFFImageIO::New(); image_io->SetPixelType(itk::ImageIOBase::SCALAR); writer->SetImageIO(image_io); writer->SetInput(output_image); writer->Update(); //output looks the same } 2014-08-13 20:50 GMT+03:00 Matt McCormick : > Hi Marian, > > If > > itk::Image< unsigned short, 2 > > > is used for the ImageType, does it work (note the dimension specification). > > HTH, > Matt > > On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? > wrote: > > Hi, > > > > How to properly read 32-bit TIFF? I need to get itk::Image short> > > on output. If I use it as ImageType for ImageFileReader, it is read as > fully > > black (checked contrast with Image Watch and it is for sure completely > > empty). If I read it with pixel type RGBPixel or > > RGBAPixel, it is read properly. But I need to convert it > > manually to unsigned short after this. So what is the proper way of > reading > > it? Do I need to create templated methods for every pixeltype with > > conversions to unsigned short? > > > > Best regards, > > Marian > > > > _______________________________________________ > > 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 Wed Aug 13 15:52:31 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 13 Aug 2014 15:52:31 -0400 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Hi Marian, Thanks for the update. Offhand, I am not seeing the issue. Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and the input data? Thanks, Matt [1] http://sscce.org/ On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? wrote: > { > typedef unsigned short PixelType; > typedef itk::Image ImageType; > auto reader = itk::ImageFileReader< > ImageType>::New(); > reader->SetFileName("D:/TestData/input/input.tif"); > reader->SetImageIO(itk::TIFFImageIO::New()); > > typedef unsigned short OutputPixelType; > typedef itk::Image OutputImageType; > > auto writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); > auto image_io = itk::TIFFImageIO::New(); > image_io->SetPixelType(itk::ImageIOBase::SCALAR); > writer->SetImageIO(image_io); > writer->SetInput(reader->GetOutput()); > writer->Update(); //produces completely black > } > > { > typedef itk::RGBAPixel PixelType; > typedef itk::Image ImageType; > auto reader = itk::ImageFileReader::New(); > reader->SetFileName("D:/TestData/input/input.tif"); > reader->SetImageIO(itk::TIFFImageIO::New()); > reader->Update(); > > typedef unsigned short OutputPixelType; > typedef itk::Image OutputImageType; > > auto input_image = reader->GetOutput(); > auto output_image = OutputImageType::New(); > output_image->CopyInformation(input_image); > output_image->SetRegions(input_image->GetLargestPossibleRegion()); > output_image->Allocate(); > itk::ImageRegionConstIterator const_iterator(input_image, > input_image->GetLargestPossibleRegion()); > itk::ImageRegionIterator > rescaled_iterator(output_image, output_image->GetLargestPossibleRegion()); > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) > { > const PixelType& pixel = const_iterator.Get(); > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) * 16 + > pixel.GetGreen()) * 16 + pixel.GetBlue()); > } > > auto writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); > auto image_io = itk::TIFFImageIO::New(); > image_io->SetPixelType(itk::ImageIOBase::SCALAR); > writer->SetImageIO(image_io); > writer->SetInput(output_image); > writer->Update(); //output looks the same > } > > > 2014-08-13 20:50 GMT+03:00 Matt McCormick : >> >> Hi Marian, >> >> >> If >> >> itk::Image< unsigned short, 2 > >> >> is used for the ImageType, does it work (note the dimension >> specification). >> >> HTH, >> Matt >> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? >> wrote: >> > Hi, >> > >> > How to properly read 32-bit TIFF? I need to get itk::Image> > short> >> > on output. If I use it as ImageType for ImageFileReader, it is read as >> > fully >> > black (checked contrast with Image Watch and it is for sure completely >> > empty). If I read it with pixel type RGBPixel or >> > RGBAPixel, it is read properly. But I need to convert it >> > manually to unsigned short after this. So what is the proper way of >> > reading >> > it? Do I need to create templated methods for every pixeltype with >> > conversions to unsigned short? >> > >> > Best regards, >> > Marian >> > >> > _______________________________________________ >> > Community mailing list >> > Community at itk.org >> > http://public.kitware.com/mailman/listinfo/community >> > > > From nekto1989 at gmail.com Wed Aug 13 16:55:51 2014 From: nekto1989 at gmail.com (=?UTF-8?B?0JzQsNGAJ9GP0L0g0JrQu9C40LzQvtCy?=) Date: Wed, 13 Aug 2014 23:55:51 +0300 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Hi Matt, I hope this is proper cmakelists.txt. I'm used to using ITK connected through *.props into Visual Studio solution. Best regards, Marian 2014-08-13 22:52 GMT+03:00 Matt McCormick : > Hi Marian, > > Thanks for the update. Offhand, I am not seeing the issue. > > Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and > the input data? > > Thanks, > Matt > > [1] http://sscce.org/ > > On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? > wrote: > > { > > typedef unsigned short PixelType; > > typedef itk::Image ImageType; > > auto reader = itk::ImageFileReader< > > ImageType>::New(); > > reader->SetFileName("D:/TestData/input/input.tif"); > > reader->SetImageIO(itk::TIFFImageIO::New()); > > > > typedef unsigned short OutputPixelType; > > typedef itk::Image OutputImageType; > > > > auto writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); > > auto image_io = itk::TIFFImageIO::New(); > > image_io->SetPixelType(itk::ImageIOBase::SCALAR); > > writer->SetImageIO(image_io); > > writer->SetInput(reader->GetOutput()); > > writer->Update(); //produces completely black > > } > > > > { > > typedef itk::RGBAPixel PixelType; > > typedef itk::Image ImageType; > > auto reader = itk::ImageFileReader::New(); > > reader->SetFileName("D:/TestData/input/input.tif"); > > reader->SetImageIO(itk::TIFFImageIO::New()); > > reader->Update(); > > > > typedef unsigned short OutputPixelType; > > typedef itk::Image OutputImageType; > > > > auto input_image = reader->GetOutput(); > > auto output_image = OutputImageType::New(); > > output_image->CopyInformation(input_image); > > output_image->SetRegions(input_image->GetLargestPossibleRegion()); > > output_image->Allocate(); > > itk::ImageRegionConstIterator const_iterator(input_image, > > input_image->GetLargestPossibleRegion()); > > itk::ImageRegionIterator > > rescaled_iterator(output_image, > output_image->GetLargestPossibleRegion()); > > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); > > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) > > { > > const PixelType& pixel = const_iterator.Get(); > > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) * > 16 + > > pixel.GetGreen()) * 16 + pixel.GetBlue()); > > } > > > > auto writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); > > auto image_io = itk::TIFFImageIO::New(); > > image_io->SetPixelType(itk::ImageIOBase::SCALAR); > > writer->SetImageIO(image_io); > > writer->SetInput(output_image); > > writer->Update(); //output looks the same > > } > > > > > > 2014-08-13 20:50 GMT+03:00 Matt McCormick : > >> > >> Hi Marian, > >> > >> > >> If > >> > >> itk::Image< unsigned short, 2 > > >> > >> is used for the ImageType, does it work (note the dimension > >> specification). > >> > >> HTH, > >> Matt > >> > >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? > >> wrote: > >> > Hi, > >> > > >> > How to properly read 32-bit TIFF? I need to get itk::Image >> > short> > >> > on output. If I use it as ImageType for ImageFileReader, it is read as > >> > fully > >> > black (checked contrast with Image Watch and it is for sure completely > >> > empty). If I read it with pixel type RGBPixel or > >> > RGBAPixel, it is read properly. But I need to convert > it > >> > manually to unsigned short after this. So what is the proper way of > >> > reading > >> > it? Do I need to create templated methods for every pixeltype with > >> > conversions to unsigned short? > >> > > >> > Best regards, > >> > Marian > >> > > >> > _______________________________________________ > >> > 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: ReadTIFF32bit.zip Type: application/zip Size: 63889 bytes Desc: not available URL: From grothausmann.roman at mh-hannover.de Thu Aug 14 06:42:10 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Thu, 14 Aug 2014 12:42:10 +0200 Subject: [ITK] [ITK-users] adding a global hierarchical watershed segmentation mode to itksnap In-Reply-To: References: <53E85181.8040607@mh-hannover.de> <0f32755d9980441ca0162728b088f00b@queensu.ca> <53E9CCED.1000604@mh-hannover.de> Message-ID: <53EC9282.3090904@mh-hannover.de> Hi Paul, Many thanks for Your reply. The main problem that I often face with samples from material science is, that around 1000 labels are needed per tomogram, e.g. individual particles, regions, domains. So setting markers by hand is already very timeconsuming. Expanding each of these one after another is way to cumbersum. I'm not sure if I have tried clustering. At least it was not available as preprocessing mode (possibly because I only have a greyscale tomogram) as described in the ReleaseNotes (is there any other new docu?). I did not try supervised classification because dev32 does not run on our system and the self-compiled binary crashes at start up with a segmentation fault (see below). Anyway it seems not possible to have the snake-tool make multiple labels compete against each other, as e.g. in a global watershed approach. I'd be very happy if there was already a tool in order to achieve what I need but it seems there isn't, so I guess I've to start creating my own. With Andras hint about using Slicer, I'm now wondering whether I should implement it for itksnap or slicer. None of both seem to have a tool to join/remove labels from a base map to a result map by just LMB/RMB clicking, which I would find very helpful. Adding a hierarchical watershed to generate the base map and using the mouse wheel to change the level/granularity on the fly would then just be an extension. A tile view (e.g. both maps side by side) for all three axes as in itksnap would be handy for this join/remove tool. Does Slicer offer something like that as well? Is it possible to get also the overlay id together with the click position? That would even allow to choose an already existing label in the result map for modification by just a click. Any further recommendations for the start are very welcome. Thanks, Roman ______________________ LD_LIBRARY_PATH=/opt/itk-4.5.1/lib/:/opt/qt-5.3.1/5.3/gcc_64/lib/ vglrun ./ITK-SNAP QXcbConnection: Failed to initialize XRandr Qt: XKEYBOARD extension not present on the X server. ************************************* ITK-SNAP: Segmentation fault BACKTRACE: ./ITK-SNAP(_Z24SegmentationFaultHandleri+0x133)[0x7af9c3] /lib/x86_64-linux-gnu/libc.so.6(+0x324f0)[0x7f6e977224f0] /lib/x86_64-linux-gnu/libc.so.6(+0x11aedf)[0x7f6e9780aedf] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5Core.so.5(_ZN16QCoreApplication9argumentsEv+0x8c)[0x7f6ea8dbf6bc] /opt/qt-5.3.1/5.3/gcc_64/plugins/platforms/libqxcb.so(+0x4b213)[0x7f6e907df213] /opt/qt-5.3.1/5.3/gcc_64/plugins/platforms/libqxcb.so(+0x4b5f9)[0x7f6e907df5f9] /opt/qt-5.3.1/5.3/gcc_64/plugins/platforms/libqxcb.so(+0x58127)[0x7f6e907ec127] /opt/qt-5.3.1/5.3/gcc_64/plugins/platforms/libqxcb.so(+0x4b009)[0x7f6e907df009] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5Gui.so.5(_ZN7QWindow6createEv+0x33)[0x7f6ea9e89e03] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5OpenGL.so.5(_ZN10QGLContext13chooseContextEPKS_+0x121)[0x7f6eaad4bf51] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5OpenGL.so.5(_ZN10QGLContext6createEPKS_+0x39)[0x7f6eaad23609] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5OpenGL.so.5(_ZN9QGLWidget10setContextEP10QGLContextPKS0_b+0xa7)[0x7f6eaad4b8b7] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5OpenGL.so.5(_ZN16QGLWidgetPrivate11initContextEP10QGLContextPK9QGLWidget+0x7a)[0x7f6eaad28c2a] /opt/qt-5.3.1/5.3/gcc_64/lib/libQt5OpenGL.so.5(_ZN9QGLWidgetC2EP7QWidgetPKS_6QFlagsIN2Qt10WindowTypeEE+0x111)[0x7f6eaad29031] ./ITK-SNAP(_ZN19QtAbstractOpenGLBoxC1EP7QWidget+0xd)[0x849e3d] ./ITK-SNAP(_ZN16GenericSliceViewC2EP7QWidget+0x10)[0x848310] ./ITK-SNAP(_ZN17Ui_SliceViewPanel7setupUiEP7QWidget+0x235f)[0x840fbf] ./ITK-SNAP(_ZN14SliceViewPanelC1EP7QWidget+0x53)[0x839fc3] ./ITK-SNAP(_ZN18Ui_MainImageWindow7setupUiEP11QMainWindow+0x336b)[0x7d77bb] ./ITK-SNAP(_ZN15MainImageWindowC2EP7QWidget+0x64)[0x7c47b4] ./ITK-SNAP(main+0x1b3)[0x7aa8c3] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f6e9770eead] ./ITK-SNAP[0x7af6f9] ************************************* On 13/08/14 22:15, Paul Yushkevich wrote: > Hi Roman, > > I am not sure, have you experimented with some of the newer segmentation modes > in ITK-SNAP (clustering, available in the 3.0 release, and supervised > classification, available in the dev32 branch). These still operate using active > contours, but can generate per-label probability maps that could then be easily > converted into multilabel segmentations. I guess my main question is whether > heirarchical watershed segmentation offers advantages over these modes, and if > so, whether it may possibly be integrated as another segmentation mode in the > snake pipeline... > > Paul. > > > On Tue, Aug 12, 2014 at 4:14 AM, Dr. Roman Grothausmann > > > wrote: > > Hi Andras, > > > Many thanks for Your hints. We'll test them on our data. However, our data > is not as standardized in quality as CT or MRT data and from our experience > many of the "magic" segmentations demonstrated on CT or MRT data does not > work on our data. > However, of all the segmentation modules I could find in Slicer or elsewhere > none was based on a hierarchical watershed algorithm like the > SegmentationEditor of the InsightApplications. Is there any other that I've > missed? > Concerning my idea to implement this if no tool currently already exists: > Would such an extension be of more use in Slicer or itksnap? > For which of the both would it likely be easier to integrate the extension? > > Best wishes > Roman > > On 11/08/14 16:20, Andras Lasso wrote: > > Have you tried segmentation tools in 3D Slicer? There is a multi-label > watershed > segmentation tool that works in 3d > (http://www.slicer.org/__slicerWiki/index.php/__Documentation/Nightly/Modules/__Editor#WatershedFromMarkers > ), > there are also a number of other generic semi-automatic segmentation > tools (such > as GrowCut) and a few fully-automatic specialized tools (for brain, > airways, etc). Download the nightly build and also checkout the Segmentation > category in the Extension Manager. > > Andras > > *From:* Dr. Roman Grothausmann > > > *Sent:* Monday, August 11, 2014 1:15 AM > *To:* itksnap-users at googlegroups.com > > > > *Cc:* ITK Mailing List > > > > Dear mailing list members, > > > For a long time now I've been searching for a replacement of the old > SegmentationEditor (part of the InsightApplications) which I could not > get to > work even with older ITK-3.x. Somewhere I was told that it was > integrated and > maintained within itksnap. However the only tool in itksnap based on > watershed > segmentation seems to be the adaptive brush. It is very handy, but > time-consuming in 3D and only for local segmentations. In contrast the > SegmentationEditor used a global hierarchical watershed segmentation to pick > labels from, see e.g. the video linked here: > http://www.insight-journal.__org/browse/publication/70 > > Quite often now I've stumbled over data, that would likely have profited > a lot > of such a tool for segmentation. > > If such a tool working with ITK-4.x does not exist any more, I thought of > implementing it as a global WS segmentation mode in itksnap. That way > making the > tool easier to find, to use and to ensure maintenance (should it be > integrated > into the itksnap code base in the end) and also avoiding recoding a GUI with > mouse interaction and such. > > My current idea is to start, similar to the snake-tool, with > pre-filtering like > smoothing and optional edge-detection. > Then the main edit mode to consist of the usual 4 subwindows showing an > overlay > of the grey-image and the watershed segmentation of the hierarchical > WS-filter > (hWS), side-by-side to another label-dataset (loaded like a tiled > overlay) which > consist of the actually chosen labels from the hWS as the final data (FD). > The interaction I'm considering would be to LMB click on a label in the hWS > which is then added to the FD as the current fg label, or removed with a > RMB. > The hierachrchy level of the hWS could be controlled by a slider or the > mouse > wheel + Shift in nearly real time if some region demands higher or lower > detailed segmentation. When the fg label is changed, the segmentation > added or > removed with further mouse interactions would modify the new fg label. > When all is done and the global WS mode is left, the FD label-dataset is > added > to the main segmentation of itksnap. > > Would that be possible to implement in itksnap 3.x? > What source files of the itksnap code base should I look at for: > - the pre-filtering mode of the snake (for the smoothing and edge detection) > - the mouse interactions (for e.g. adding the whell + Shift interaction) > - possible examples for the dual layout > > Thanks for any comments, help or hints. > 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 > > _________________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/__mailman/listinfo/community > > > > -- > 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 > > -- > You received this message because you are subscribed to the Google Groups > "itksnap-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to itksnap-users+unsubscribe at __googlegroups.com > . > To post to this group, send email to itksnap-users at googlegroups.com > __. > Visit this group at http://groups.google.com/__group/itksnap-users > . > For more options, visit https://groups.google.com/d/__optout > . > > > > > -- > Paul A. Yushkevich, Ph.D. > Associate Professor > Penn Image Computing and Science Laboratory > Department of Radiology > University of Pennsylvania > > -- > You received this message because you are subscribed to the Google Groups > "itksnap-users" group. > To unsubscribe from this group and stop receiving emails from it, send an email > to itksnap-users+unsubscribe at googlegroups.com > . > To post to this group, send email to itksnap-users at googlegroups.com > . > Visit this group at http://groups.google.com/group/itksnap-users. > For more options, visit https://groups.google.com/d/optout. -- 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 nekto1989 at gmail.com Thu Aug 14 07:23:14 2014 From: nekto1989 at gmail.com (=?UTF-8?B?0JzQsNGAJ9GP0L0g0JrQu9C40LzQvtCy?=) Date: Thu, 14 Aug 2014 14:23:14 +0300 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Hi, I've tried different methods. Reading to RGBPixel, then using RGBToLuminanceImageFilter and MultiplyImageFilter (2 ^ 8) produces the same visually proper image. Reading directly to fails. Looks like this is bug in TIFFImageIO and not in the way it is being called. http://itk-users.7.n7.nabble.com/TiffIO-strange-behaviour-td32215.html Marian 2014-08-13 23:55 GMT+03:00 ???'?? ?????? : > Hi Matt, > > I hope this is proper cmakelists.txt. I'm used to using ITK connected > through *.props into Visual Studio solution. > > Best regards, > Marian > > > > 2014-08-13 22:52 GMT+03:00 Matt McCormick : > > Hi Marian, >> >> Thanks for the update. Offhand, I am not seeing the issue. >> >> Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and >> the input data? >> >> Thanks, >> Matt >> >> [1] http://sscce.org/ >> >> On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? >> wrote: >> > { >> > typedef unsigned short PixelType; >> > typedef itk::Image ImageType; >> > auto reader = itk::ImageFileReader< >> > ImageType>::New(); >> > reader->SetFileName("D:/TestData/input/input.tif"); >> > reader->SetImageIO(itk::TIFFImageIO::New()); >> > >> > typedef unsigned short OutputPixelType; >> > typedef itk::Image OutputImageType; >> > >> > auto writer = itk::ImageFileWriter::New(); >> > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); >> > auto image_io = itk::TIFFImageIO::New(); >> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >> > writer->SetImageIO(image_io); >> > writer->SetInput(reader->GetOutput()); >> > writer->Update(); //produces completely black >> > } >> > >> > { >> > typedef itk::RGBAPixel PixelType; >> > typedef itk::Image ImageType; >> > auto reader = itk::ImageFileReader::New(); >> > reader->SetFileName("D:/TestData/input/input.tif"); >> > reader->SetImageIO(itk::TIFFImageIO::New()); >> > reader->Update(); >> > >> > typedef unsigned short OutputPixelType; >> > typedef itk::Image OutputImageType; >> > >> > auto input_image = reader->GetOutput(); >> > auto output_image = OutputImageType::New(); >> > output_image->CopyInformation(input_image); >> > output_image->SetRegions(input_image->GetLargestPossibleRegion()); >> > output_image->Allocate(); >> > itk::ImageRegionConstIterator const_iterator(input_image, >> > input_image->GetLargestPossibleRegion()); >> > itk::ImageRegionIterator >> > rescaled_iterator(output_image, >> output_image->GetLargestPossibleRegion()); >> > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); >> > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) >> > { >> > const PixelType& pixel = const_iterator.Get(); >> > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) * >> 16 + >> > pixel.GetGreen()) * 16 + pixel.GetBlue()); >> > } >> > >> > auto writer = itk::ImageFileWriter::New(); >> > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); >> > auto image_io = itk::TIFFImageIO::New(); >> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >> > writer->SetImageIO(image_io); >> > writer->SetInput(output_image); >> > writer->Update(); //output looks the same >> > } >> > >> > >> > 2014-08-13 20:50 GMT+03:00 Matt McCormick : >> >> >> >> Hi Marian, >> >> >> >> >> >> If >> >> >> >> itk::Image< unsigned short, 2 > >> >> >> >> is used for the ImageType, does it work (note the dimension >> >> specification). >> >> >> >> HTH, >> >> Matt >> >> >> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? >> >> wrote: >> >> > Hi, >> >> > >> >> > How to properly read 32-bit TIFF? I need to get itk::Image> >> > short> >> >> > on output. If I use it as ImageType for ImageFileReader, it is read >> as >> >> > fully >> >> > black (checked contrast with Image Watch and it is for sure >> completely >> >> > empty). If I read it with pixel type RGBPixel or >> >> > RGBAPixel, it is read properly. But I need to convert >> it >> >> > manually to unsigned short after this. So what is the proper way of >> >> > reading >> >> > it? Do I need to create templated methods for every pixeltype with >> >> > conversions to unsigned short? >> >> > >> >> > Best regards, >> >> > Marian >> >> > >> >> > _______________________________________________ >> >> > Community mailing list >> >> > Community at itk.org >> >> > http://public.kitware.com/mailman/listinfo/community >> >> > >> > >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gass at vision.ee.ethz.ch Thu Aug 14 07:32:06 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Thu, 14 Aug 2014 13:32:06 +0200 Subject: [ITK] [ITK-users] Anti-alias filter In-Reply-To: References: Message-ID: Dear all, any further ideas on this one? Thanks, Tobias 2014-08-12 16:10 GMT+02:00 Tobias Gass : > Yes, this does result in the same problems as before. > > > 2014-08-12 15:06 GMT+02:00 Bill Lorensen : > > Have you tried: >> UseImageSpacingOn(); >> >> >> On Tue, Aug 12, 2014 at 8:47 AM, Tobias Gass >> wrote: >> > Further update: when manually increasing the spacing of the input image >> > (without resampling, thus not changing the size), the filter works well. >> > This probably indicates numerical instability depending on image spacing >> > somewhere in the code, which would probably be great if it could be >> fixed. >> > >> > Best, >> > Tobias >> > >> > >> > 2014-08-12 14:33 GMT+02:00 Tobias Gass : >> > >> >> Update: meanwhile I also tried cropping the image to investigate the >> >> impact of the overall size (#voxels) of the image. It appears to not >> have an >> >> effect, the same artifacts occur when processing a significantly >> smaller >> >> region (1/2 size). >> >> >> >> >> >> 2014-08-12 10:44 GMT+02:00 Tobias Gass : >> >> >> >>> Hi, >> >>> >> >>> changing the PixelType did not yield any change. However, I did some >> >>> further tests which seem to point at image spacing or total size to >> be the >> >>> culprit. My original image is fairly high-res, with 0.25mm in-plane >> >>> resolution and 0.75mm slice thickness and 512x512x409 voxel size. I >> tried >> >>> resampling the image to different isotropic resolutions (0.25, 0.3, >> 0.34, >> >>> 0.35, 0.4, 0.5, 0.75, 1)mm isotropic spacing. For all spacings down to >> >>> 0.35mm, the AA filter converged nicely and the output looks as I'd >> expect >> >>> it. Lower than 0.35mm spacing, and it fails in the way I described >> (from >> >>> this spacing on the #vox is equal or greater than the #voxels in my >> original >> >>> image). >> >>> >> >>> Any idea what might cause this, or what to further investigate? >> >>> >> >>> Thanks, >> >>> Tobias >> >>> >> >>> >> >>> 2014-08-11 22:17 GMT+02:00 Bill Lorensen : >> >>> >> >>>> Paraview should do the right thing. >> >>>> >> >>>> On Mon, Aug 11, 2014 at 3:38 PM, Tobias Gass > > >> >>>> wrote: >> >>>> > I will try that tomorrow morning (living in GMT+1). I used >> paraview to >> >>>> > extract the isosurface, but also looked at the output of the >> AA-filter >> >>>> > directly (which looked fuzzy). I can also post an image of that >> >>>> > tomorrow. >> >>>> > >> >>>> > Thanks for your help! >> >>>> > Tobias >> >>>> > >> >>>> > >> >>>> > 2014-08-11 21:22 GMT+02:00 Bill Lorensen > >: >> >>>> > >> >>>> >> How are you extracting the final isosurface? >> >>>> >> >> >>>> >> On Mon, Aug 11, 2014 at 3:22 PM, Bill Lorensen >> >>>> >> >> >>>> >> wrote: >> >>>> >> > If you change >> >>>> >> > typedef short PixelType; >> >>>> >> > to >> >>>> >> > typedef double PixelType; >> >>>> >> > >> >>>> >> > do the results change. >> >>>> >> > >> >>>> >> > >> >>>> >> > On Mon, Aug 11, 2014 at 2:47 PM, Tobias Gass >> >>>> >> > >> >>>> >> > wrote: >> >>>> >> >> >> >>>> >> >>> Can you post your code. The results do not look correct. >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> Sure. The {write,read}Image functions are just convenient >> wrappers >> >>>> >> >> for >> >>>> >> >> the >> >>>> >> >> respective ITK tools. >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> #include >> >>>> >> >> >> >>>> >> >> #include >> >>>> >> >> >> >>>> >> >> #include "argstream.h" >> >>>> >> >> >> >>>> >> >> #include "ImageUtils.h" >> >>>> >> >> >> >>>> >> >> #include "itkAntiAliasBinaryImageFilter.h" >> >>>> >> >> >> >>>> >> >> using namespace std; >> >>>> >> >> >> >>>> >> >> using namespace itk; >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> int main(int argc, char ** argv) >> >>>> >> >> >> >>>> >> >> { >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); >> >>>> >> >> >> >>>> >> >> typedef short PixelType; >> >>>> >> >> >> >>>> >> >> typedef double OutputPixelType; >> >>>> >> >> >> >>>> >> >> const unsigned int D=3; >> >>>> >> >> >> >>>> >> >> typedef Image ImageType; >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> typedef ImageType::Pointer ImagePointerType; >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> typedef Image OutputImageType; >> >>>> >> >> >> >>>> >> >> typedef OutputImageType::Pointer OutputImagePointerType; >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> argstream * as=new argstream(argc,argv); >> >>>> >> >> >> >>>> >> >> string inFile, outFile; >> >>>> >> >> >> >>>> >> >> double thresh=0.0; >> >>>> >> >> >> >>>> >> >> (*as) >> parameter ("in", inFile, " filename...", true); >> >>>> >> >> >> >>>> >> >> (*as) >> parameter ("out", outFile, " filename...", true); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> (*as) >> help(); >> >>>> >> >> >> >>>> >> >> as->defaultErrorHandling(); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> ImagePointerType img = >> >>>> >> >> ImageUtils::readImage(inFile); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> typedef itk::AntiAliasBinaryImageFilter > >>>> >> >> OutputImageType> >> >>>> >> >> >> >>>> >> >> AntiAliasBinaryImageFilterType; >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> AntiAliasBinaryImageFilterType::Pointer antiAliasFilter >> >>>> >> >> >> >>>> >> >> = AntiAliasBinaryImageFilterType::New (); >> >>>> >> >> >> >>>> >> >> antiAliasFilter->SetInput(img); >> >>>> >> >> >> >>>> >> >> antiAliasFilter->SetNumberOfIterations(5); >> >>>> >> >> >> >>>> >> >> antiAliasFilter->SetMaximumRMSError(0.02); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> antiAliasFilter->Update(); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> // For increased code coverage. Does nothing. >> >>>> >> >> >> >>>> >> >> antiAliasFilter->GetMaximumRMSError(); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> antiAliasFilter->Update(); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> std::cout << "Maximum RMS change value threshold was: 0.02 " >> << >> >>>> >> >> std::endl; >> >>>> >> >> >> >>>> >> >> std::cout << "Last RMS change value was: " << >> >>>> >> >> antiAliasFilter->GetRMSChange() << std::endl; >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> std::cout<< antiAliasFilter->GetElapsedIterations() <> >>>> >> >> >> >>>> >> >> >> >>>> >> >> std::cout<GetLowerBinaryValue()<<" "<< >> >>>> >> >> antiAliasFilter->GetUpperBinaryValue()<> >>>> >> >> >> >>>> >> >> >> >>>> >> >> OutputImagePointerType out=antiAliasFilter->GetOutput(); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> ImageUtils::writeImage(outFile,out); >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> return 1; >> >>>> >> >> >> >>>> >> >> } >> >>>> >> >> >> >>>> >> >> >> >>>> >> >> I tried different values for maxIter (1,2,3,4,5,10,100,1000) >> and >> >>>> >> >> maxRMSError >> >>>> >> >> (0.02 0.07 0.08 0.8), and the best visual results are achieved >> >>>> >> >> after >> >>>> >> >> one >> >>>> >> >> iteration where RMSE changes by about 0.08. This increases for >> all >> >>>> >> >> following >> >>>> >> >> iterations, which have an RMSE-change of about 0.25 for all >> number >> >>>> >> >> of >> >>>> >> >> iterations tested. All this is using ITK 4.5 pulled from the >> GIT >> >>>> >> >> repository >> >>>> >> >> a while ago, running on an intel i7 on Debian. >> >>>> >> >> >> >>>> >> >> Thanks a lot! >> >>>> >> >> Tobias >> >>>> >> >> >> >>>> >> >>> >> >>>> >> >>> >> >>>> >> >>> On Mon, Aug 11, 2014 at 12:18 PM, Tobias Gass >> >>>> >> >>> >> >>>> >> >>> wrote: >> >>>> >> >>> > Dear all, >> >>>> >> >>> > >> >>>> >> >>> > I'm having problems using the anti-alias filter, which I >> want >> >>>> >> >>> > to use >> >>>> >> >>> > in >> >>>> >> >>> > order to smooth a binary segmentation volume. I'm using >> >>>> >> >>> > essentially >> >>>> >> >>> > the >> >>>> >> >>> > example code from the repository, which for my input file >> seems >> >>>> >> >>> > to >> >>>> >> >>> > start >> >>>> >> >>> > oscillating after 2 iterations, leading to weird 'pointy' >> >>>> >> >>> > artifacts >> >>>> >> >>> > on >> >>>> >> >>> > the >> >>>> >> >>> > surface as can be seen from the attached screenshot (AA >> filter >> >>>> >> >>> > output is >> >>>> >> >>> > on >> >>>> >> >>> > the left, input on the right). >> >>>> >> >>> > >> >>>> >> >>> > Is there any parameter to set/implement which could improve >> the >> >>>> >> >>> > behavior >> >>>> >> >>> > of >> >>>> >> >>> > this filter? I'm assuming that my input is reasonable, or is >> >>>> >> >>> > this >> >>>> >> >>> > something >> >>>> >> >>> > the filter is expected to have problems with? It is notable >> >>>> >> >>> > that >> >>>> >> >>> > such >> >>>> >> >>> > errors >> >>>> >> >>> > seem to mainly appear in 'flat' regions of the volume, and >> are >> >>>> >> >>> > not >> >>>> >> >>> > apparent >> >>>> >> >>> > in the curved shaft of the bone. >> >>>> >> >>> > >> >>>> >> >>> > Any help, or pointers to further resources are appreciated, >> >>>> >> >>> > thanks, >> >>>> >> >>> > Tobias >> >>>> >> >>> > >> >>>> >> >>> > _____________________________________ >> >>>> >> >>> > Powered by www.kitware.com >> >>>> >> >>> > >> >>>> >> >>> > Visit other Kitware open-source projects at >> >>>> >> >>> > http://www.kitware.com/opensource/opensource.html >> >>>> >> >>> > >> >>>> >> >>> > Kitware offers ITK Training Courses, for more information >> >>>> >> >>> > visit: >> >>>> >> >>> > http://www.kitware.com/products/protraining.php >> >>>> >> >>> > >> >>>> >> >>> > Please keep messages on-topic and check the 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 >> >>>> >> >> >> >>>> >> >> >> >>>> >> > >> >>>> >> > >> >>>> >> > >> >>>> >> > -- >> >>>> >> > Unpaid intern in BillsBasement at noware dot com >> >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> -- >> >>>> >> Unpaid intern in BillsBasement at noware dot com >> >>>> > >> >>>> > >> >>>> >> >>>> >> >>>> >> >>>> -- >> >>>> 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 >> >>> >> >>> >> >> >> > >> >> >> >> -- >> 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 bill.lorensen at gmail.com Thu Aug 14 08:35:10 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 14 Aug 2014 08:35:10 -0400 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: How are you displaying the unsigned short image? Many viewers cannot properly display unsigned short. On Aug 14, 2014 7:23 AM, "???'?? ??????" wrote: > Hi, > > I've tried different methods. Reading to RGBPixel, then > using RGBToLuminanceImageFilter and MultiplyImageFilter (2 ^ 8) produces > the same visually proper image. Reading directly to > fails. Looks like this is bug in TIFFImageIO and not in the way it is being > called. > http://itk-users.7.n7.nabble.com/TiffIO-strange-behaviour-td32215.html > > Marian > > > 2014-08-13 23:55 GMT+03:00 ???'?? ?????? : > >> Hi Matt, >> >> I hope this is proper cmakelists.txt. I'm used to using ITK connected >> through *.props into Visual Studio solution. >> >> Best regards, >> Marian >> >> >> >> 2014-08-13 22:52 GMT+03:00 Matt McCormick : >> >> Hi Marian, >>> >>> Thanks for the update. Offhand, I am not seeing the issue. >>> >>> Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and >>> the input data? >>> >>> Thanks, >>> Matt >>> >>> [1] http://sscce.org/ >>> >>> On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? >>> wrote: >>> > { >>> > typedef unsigned short PixelType; >>> > typedef itk::Image ImageType; >>> > auto reader = itk::ImageFileReader< >>> > ImageType>::New(); >>> > reader->SetFileName("D:/TestData/input/input.tif"); >>> > reader->SetImageIO(itk::TIFFImageIO::New()); >>> > >>> > typedef unsigned short OutputPixelType; >>> > typedef itk::Image OutputImageType; >>> > >>> > auto writer = itk::ImageFileWriter::New(); >>> > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); >>> > auto image_io = itk::TIFFImageIO::New(); >>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >>> > writer->SetImageIO(image_io); >>> > writer->SetInput(reader->GetOutput()); >>> > writer->Update(); //produces completely black >>> > } >>> > >>> > { >>> > typedef itk::RGBAPixel PixelType; >>> > typedef itk::Image ImageType; >>> > auto reader = itk::ImageFileReader::New(); >>> > reader->SetFileName("D:/TestData/input/input.tif"); >>> > reader->SetImageIO(itk::TIFFImageIO::New()); >>> > reader->Update(); >>> > >>> > typedef unsigned short OutputPixelType; >>> > typedef itk::Image OutputImageType; >>> > >>> > auto input_image = reader->GetOutput(); >>> > auto output_image = OutputImageType::New(); >>> > output_image->CopyInformation(input_image); >>> > output_image->SetRegions(input_image->GetLargestPossibleRegion()); >>> > output_image->Allocate(); >>> > itk::ImageRegionConstIterator >>> const_iterator(input_image, >>> > input_image->GetLargestPossibleRegion()); >>> > itk::ImageRegionIterator >>> > rescaled_iterator(output_image, >>> output_image->GetLargestPossibleRegion()); >>> > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); >>> > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) >>> > { >>> > const PixelType& pixel = const_iterator.Get(); >>> > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) >>> * 16 + >>> > pixel.GetGreen()) * 16 + pixel.GetBlue()); >>> > } >>> > >>> > auto writer = itk::ImageFileWriter::New(); >>> > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); >>> > auto image_io = itk::TIFFImageIO::New(); >>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >>> > writer->SetImageIO(image_io); >>> > writer->SetInput(output_image); >>> > writer->Update(); //output looks the same >>> > } >>> > >>> > >>> > 2014-08-13 20:50 GMT+03:00 Matt McCormick >> >: >>> >> >>> >> Hi Marian, >>> >> >>> >> >>> >> If >>> >> >>> >> itk::Image< unsigned short, 2 > >>> >> >>> >> is used for the ImageType, does it work (note the dimension >>> >> specification). >>> >> >>> >> HTH, >>> >> Matt >>> >> >>> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? >>> >> wrote: >>> >> > Hi, >>> >> > >>> >> > How to properly read 32-bit TIFF? I need to get itk::Image>> >> > short> >>> >> > on output. If I use it as ImageType for ImageFileReader, it is read >>> as >>> >> > fully >>> >> > black (checked contrast with Image Watch and it is for sure >>> completely >>> >> > empty). If I read it with pixel type RGBPixel or >>> >> > RGBAPixel, it is read properly. But I need to >>> convert it >>> >> > manually to unsigned short after this. So what is the proper way of >>> >> > reading >>> >> > it? Do I need to create templated methods for every pixeltype with >>> >> > conversions to unsigned short? >>> >> > >>> >> > Best regards, >>> >> > Marian >>> >> > >>> >> > _______________________________________________ >>> >> > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nekto1989 at gmail.com Thu Aug 14 09:51:27 2014 From: nekto1989 at gmail.com (=?UTF-8?B?0JzQsNGAJ9GP0L0g0JrQu9C40LzQvtCy?=) Date: Thu, 14 Aug 2014 16:51:27 +0300 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Image Watch during debugging in Visual Studio. Windows Photo Viewer after results dumped to disk. 2014-08-14 15:35 GMT+03:00 Bill Lorensen : > How are you displaying the unsigned short image? Many viewers cannot > properly display unsigned short. > On Aug 14, 2014 7:23 AM, "???'?? ??????" wrote: > >> Hi, >> >> I've tried different methods. Reading to RGBPixel, then >> using RGBToLuminanceImageFilter and MultiplyImageFilter (2 ^ 8) produces >> the same visually proper image. Reading directly to >> fails. Looks like this is bug in TIFFImageIO and not in the way it is being >> called. >> http://itk-users.7.n7.nabble.com/TiffIO-strange-behaviour-td32215.html >> >> Marian >> >> >> 2014-08-13 23:55 GMT+03:00 ???'?? ?????? : >> >>> Hi Matt, >>> >>> I hope this is proper cmakelists.txt. I'm used to using ITK connected >>> through *.props into Visual Studio solution. >>> >>> Best regards, >>> Marian >>> >>> >>> >>> 2014-08-13 22:52 GMT+03:00 Matt McCormick : >>> >>> Hi Marian, >>>> >>>> Thanks for the update. Offhand, I am not seeing the issue. >>>> >>>> Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and >>>> the input data? >>>> >>>> Thanks, >>>> Matt >>>> >>>> [1] http://sscce.org/ >>>> >>>> On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? >>>> wrote: >>>> > { >>>> > typedef unsigned short PixelType; >>>> > typedef itk::Image ImageType; >>>> > auto reader = itk::ImageFileReader< >>>> > ImageType>::New(); >>>> > reader->SetFileName("D:/TestData/input/input.tif"); >>>> > reader->SetImageIO(itk::TIFFImageIO::New()); >>>> > >>>> > typedef unsigned short OutputPixelType; >>>> > typedef itk::Image OutputImageType; >>>> > >>>> > auto writer = itk::ImageFileWriter::New(); >>>> > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); >>>> > auto image_io = itk::TIFFImageIO::New(); >>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >>>> > writer->SetImageIO(image_io); >>>> > writer->SetInput(reader->GetOutput()); >>>> > writer->Update(); //produces completely black >>>> > } >>>> > >>>> > { >>>> > typedef itk::RGBAPixel PixelType; >>>> > typedef itk::Image ImageType; >>>> > auto reader = itk::ImageFileReader::New(); >>>> > reader->SetFileName("D:/TestData/input/input.tif"); >>>> > reader->SetImageIO(itk::TIFFImageIO::New()); >>>> > reader->Update(); >>>> > >>>> > typedef unsigned short OutputPixelType; >>>> > typedef itk::Image OutputImageType; >>>> > >>>> > auto input_image = reader->GetOutput(); >>>> > auto output_image = OutputImageType::New(); >>>> > output_image->CopyInformation(input_image); >>>> > output_image->SetRegions(input_image->GetLargestPossibleRegion()); >>>> > output_image->Allocate(); >>>> > itk::ImageRegionConstIterator >>>> const_iterator(input_image, >>>> > input_image->GetLargestPossibleRegion()); >>>> > itk::ImageRegionIterator >>>> > rescaled_iterator(output_image, >>>> output_image->GetLargestPossibleRegion()); >>>> > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); >>>> > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) >>>> > { >>>> > const PixelType& pixel = const_iterator.Get(); >>>> > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) >>>> * 16 + >>>> > pixel.GetGreen()) * 16 + pixel.GetBlue()); >>>> > } >>>> > >>>> > auto writer = itk::ImageFileWriter::New(); >>>> > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); >>>> > auto image_io = itk::TIFFImageIO::New(); >>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >>>> > writer->SetImageIO(image_io); >>>> > writer->SetInput(output_image); >>>> > writer->Update(); //output looks the same >>>> > } >>>> > >>>> > >>>> > 2014-08-13 20:50 GMT+03:00 Matt McCormick >>> >: >>>> >> >>>> >> Hi Marian, >>>> >> >>>> >> >>>> >> If >>>> >> >>>> >> itk::Image< unsigned short, 2 > >>>> >> >>>> >> is used for the ImageType, does it work (note the dimension >>>> >> specification). >>>> >> >>>> >> HTH, >>>> >> Matt >>>> >> >>>> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? >>>> >> wrote: >>>> >> > Hi, >>>> >> > >>>> >> > How to properly read 32-bit TIFF? I need to get itk::Image>>> >> > short> >>>> >> > on output. If I use it as ImageType for ImageFileReader, it is >>>> read as >>>> >> > fully >>>> >> > black (checked contrast with Image Watch and it is for sure >>>> completely >>>> >> > empty). If I read it with pixel type RGBPixel or >>>> >> > RGBAPixel, it is read properly. But I need to >>>> convert it >>>> >> > manually to unsigned short after this. So what is the proper way of >>>> >> > reading >>>> >> > it? Do I need to create templated methods for every pixeltype with >>>> >> > conversions to unsigned short? >>>> >> > >>>> >> > Best regards, >>>> >> > Marian >>>> >> > >>>> >> > _______________________________________________ >>>> >> > 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 >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Aug 14 10:18:59 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 14 Aug 2014 10:18:59 -0400 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Thanks for the nice example! I have been able to reproduce the output. If it is a bug, can the given image be added to the repository as part of a unit test? Thanks, Matt On Thu, Aug 14, 2014 at 9:51 AM, ???'?? ?????? wrote: > Image Watch during debugging in Visual Studio. > Windows Photo Viewer after results dumped to disk. > > > 2014-08-14 15:35 GMT+03:00 Bill Lorensen : > >> How are you displaying the unsigned short image? Many viewers cannot >> properly display unsigned short. >> >> On Aug 14, 2014 7:23 AM, "???'?? ??????" wrote: >>> >>> Hi, >>> >>> I've tried different methods. Reading to RGBPixel, then >>> using RGBToLuminanceImageFilter and MultiplyImageFilter (2 ^ 8) produces the >>> same visually proper image. Reading directly to fails. >>> Looks like this is bug in TIFFImageIO and not in the way it is being called. >>> http://itk-users.7.n7.nabble.com/TiffIO-strange-behaviour-td32215.html >>> >>> Marian >>> >>> >>> 2014-08-13 23:55 GMT+03:00 ???'?? ?????? : >>>> >>>> Hi Matt, >>>> >>>> I hope this is proper cmakelists.txt. I'm used to using ITK connected >>>> through *.props into Visual Studio solution. >>>> >>>> Best regards, >>>> Marian >>>> >>>> >>>> >>>> 2014-08-13 22:52 GMT+03:00 Matt McCormick : >>>> >>>>> Hi Marian, >>>>> >>>>> Thanks for the update. Offhand, I am not seeing the issue. >>>>> >>>>> Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and >>>>> the input data? >>>>> >>>>> Thanks, >>>>> Matt >>>>> >>>>> [1] http://sscce.org/ >>>>> >>>>> On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? >>>>> wrote: >>>>> > { >>>>> > typedef unsigned short PixelType; >>>>> > typedef itk::Image ImageType; >>>>> > auto reader = itk::ImageFileReader< >>>>> > ImageType>::New(); >>>>> > reader->SetFileName("D:/TestData/input/input.tif"); >>>>> > reader->SetImageIO(itk::TIFFImageIO::New()); >>>>> > >>>>> > typedef unsigned short OutputPixelType; >>>>> > typedef itk::Image OutputImageType; >>>>> > >>>>> > auto writer = itk::ImageFileWriter::New(); >>>>> > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); >>>>> > auto image_io = itk::TIFFImageIO::New(); >>>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> > writer->SetImageIO(image_io); >>>>> > writer->SetInput(reader->GetOutput()); >>>>> > writer->Update(); //produces completely black >>>>> > } >>>>> > >>>>> > { >>>>> > typedef itk::RGBAPixel PixelType; >>>>> > typedef itk::Image ImageType; >>>>> > auto reader = itk::ImageFileReader::New(); >>>>> > reader->SetFileName("D:/TestData/input/input.tif"); >>>>> > reader->SetImageIO(itk::TIFFImageIO::New()); >>>>> > reader->Update(); >>>>> > >>>>> > typedef unsigned short OutputPixelType; >>>>> > typedef itk::Image OutputImageType; >>>>> > >>>>> > auto input_image = reader->GetOutput(); >>>>> > auto output_image = OutputImageType::New(); >>>>> > output_image->CopyInformation(input_image); >>>>> > >>>>> > output_image->SetRegions(input_image->GetLargestPossibleRegion()); >>>>> > output_image->Allocate(); >>>>> > itk::ImageRegionConstIterator >>>>> > const_iterator(input_image, >>>>> > input_image->GetLargestPossibleRegion()); >>>>> > itk::ImageRegionIterator >>>>> > rescaled_iterator(output_image, >>>>> > output_image->GetLargestPossibleRegion()); >>>>> > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); >>>>> > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) >>>>> > { >>>>> > const PixelType& pixel = const_iterator.Get(); >>>>> > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + pixel.GetRed()) >>>>> > * 16 + >>>>> > pixel.GetGreen()) * 16 + pixel.GetBlue()); >>>>> > } >>>>> > >>>>> > auto writer = itk::ImageFileWriter::New(); >>>>> > >>>>> > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); >>>>> > auto image_io = itk::TIFFImageIO::New(); >>>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> > writer->SetImageIO(image_io); >>>>> > writer->SetInput(output_image); >>>>> > writer->Update(); //output looks the same >>>>> > } >>>>> > >>>>> > >>>>> > 2014-08-13 20:50 GMT+03:00 Matt McCormick >>>>> > : >>>>> >> >>>>> >> Hi Marian, >>>>> >> >>>>> >> >>>>> >> If >>>>> >> >>>>> >> itk::Image< unsigned short, 2 > >>>>> >> >>>>> >> is used for the ImageType, does it work (note the dimension >>>>> >> specification). >>>>> >> >>>>> >> HTH, >>>>> >> Matt >>>>> >> >>>>> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? >>>>> >> wrote: >>>>> >> > Hi, >>>>> >> > >>>>> >> > How to properly read 32-bit TIFF? I need to get >>>>> >> > itk::Image>>>> >> > short> >>>>> >> > on output. If I use it as ImageType for ImageFileReader, it is >>>>> >> > read as >>>>> >> > fully >>>>> >> > black (checked contrast with Image Watch and it is for sure >>>>> >> > completely >>>>> >> > empty). If I read it with pixel type RGBPixel or >>>>> >> > RGBAPixel, it is read properly. But I need to >>>>> >> > convert it >>>>> >> > manually to unsigned short after this. So what is the proper way >>>>> >> > of >>>>> >> > reading >>>>> >> > it? Do I need to create templated methods for every pixeltype with >>>>> >> > conversions to unsigned short? >>>>> >> > >>>>> >> > Best regards, >>>>> >> > Marian >>>>> >> > >>>>> >> > _______________________________________________ >>>>> >> > 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 >>> > From matt.mccormick at kitware.com Thu Aug 14 15:05:52 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 14 Aug 2014 15:05:52 -0400 Subject: [ITK] HDF5 enhancements In-Reply-To: References: <20140808144827.12192.3457@otis.rocq.inria.fr> Message-ID: Hi David, Would you be available to discuss these patches more in a Google Hangout sometime next week? Thanks, Matt On Fri, Aug 8, 2014 at 5:36 PM, Matt McCormick wrote: > Hi David, > > Looks like some great work! Thanks for contributing! > > I'll review over the coming days. > > Thanks, > Matt > > On Fri, Aug 8, 2014 at 10:48 AM, David Froger > wrote: >> Dear all, >> >> I just push this to Gerrit (ITK): >> >> http://review.source.kitware.com/16576 >> http://review.source.kitware.com/16577 >> http://review.source.kitware.com/16578 >> http://review.source.kitware.com/16579 >> >> to fix the test of HDF5 write streaming, and add pasting support for HDF5. >> >> and this (ITKExamples): >> >> http://review.source.kitware.com/16580 >> >> to add examples about streamnig and pasting HDF5 files. >> >> The commits are not perfect, but I would be happy to discuss its content and >> to have feedback. >> >> Especially: >> - I introduce a 'ChangeRegionImageFilter', that may be replaced by something >> already existing, but I didn't find what. (Furthermore, the implementation is >> not optimal, it make a useless copy). >> - For the ITKExamples, I didn't find how to build the html documentations from >> the rst files, so I didn't test it. >> - For the ITKExamples, I didn't succced yet to upload the input binary files. >> - For the ITKExamples, the last example may not work yet. >> >> Best, >> David >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community From HIROTATSU.ARMSTRONG at UCDENVER.EDU Thu Aug 14 17:14:59 2014 From: HIROTATSU.ARMSTRONG at UCDENVER.EDU (Armstrong, Hirotatsu) Date: Thu, 14 Aug 2014 21:14:59 +0000 Subject: [ITK] Deformable Registration Field Definition Message-ID: <0f470a9977db47e6a60f1bccc69be9a1@CO1PR05MB411.namprd05.prod.outlook.com> Hello, I was wondering if it would be possible to get information of exactly how the deformable registration field is defined, specifically for the daemons filter. Assuming we have a fixed CT and a moving CT of the same number of pixels in each dimension, the deformable field could be defined as 'To deformation field' For each voxel in moving CT, the vectors point to the location this voxel should be mapped in the fixed CT Or 'From deformation field' For each voxel in fixed CT, the vector points to the location in the moving CT from which we should grab and place here In addition, each of these could be defined as either +/- depending on how you define the starting location of the pixel shifts. I am generating these deformation fields and saving them as VTK files, then applying them in my own implementation. I have switched definitions and tried multiple ways to apply the deformation field, and no single method produces a result that is obviously correct or obviously wrong. Any information on how the deformation field is actually defined would be appreciated. Thanks James Armstrong, Ph.D. PostDoctoral Fellow, Physics Department of Radiation Oncology University of Colorado School of Medicine 1665 Aurora Ct, MS F706 Aurora, CO 80045 720-848-0257 -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Aug 14 17:27:58 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 14 Aug 2014 17:27:58 -0400 Subject: [ITK] Deformable Registration Field Definition In-Reply-To: <0f470a9977db47e6a60f1bccc69be9a1@CO1PR05MB411.namprd05.prod.outlook.com> References: <0f470a9977db47e6a60f1bccc69be9a1@CO1PR05MB411.namprd05.prod.outlook.com> Message-ID: Hi James, The ITK transforms map from the fixed to moving. Also, it helps to conceptually to also use the more precise term "displacement" instead of "deformation", so ?From displacement field? For each voxel in fixed CT, the vector points to the location in the moving CT from which we should grab and place here HTH, Matt On Thu, Aug 14, 2014 at 5:14 PM, Armstrong, Hirotatsu wrote: > Hello, > > > > I was wondering if it would be possible to get information of exactly how > the deformable registration field is defined, specifically for the daemons > filter. Assuming we have a fixed CT and a moving CT of the same number of > pixels in each dimension, the deformable field could be defined as > > > > ?To deformation field? > > For each voxel in moving CT, the vectors point to the location this voxel > should be mapped in the fixed CT > > > > Or > > > > ?From deformation field? > > For each voxel in fixed CT, the vector points to the location in the moving > CT from which we should grab and place here > > > > In addition, each of these could be defined as either +/- depending on how > you define the starting location of the pixel shifts. I am generating these > deformation fields and saving them as VTK files, then applying them in my > own implementation. I have switched definitions and tried multiple ways to > apply the deformation field, and no single method produces a result that is > obviously correct or obviously wrong. Any information on how the > deformation field is actually defined would be appreciated. Thanks > > > > > > James Armstrong, Ph.D. > > PostDoctoral Fellow, Physics > > Department of Radiation Oncology > > University of Colorado School of Medicine > > 1665 Aurora Ct, MS F706 > > Aurora, CO 80045 > > 720-848-0257 > > > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From matt.mccormick at kitware.com Fri Aug 15 01:25:52 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 15 Aug 2014 01:25:52 -0400 Subject: [ITK] ITK Development Meeting In-Reply-To: <5CB49492-605B-434E-BE5D-7F1B33F289CA@gmail.com> References: <09B4CD10-BCDE-4F28-BDB1-D3791E36BBD8@mail.nih.gov> <913EF9B6-84A0-4BD3-A154-EBCFD92685E5@gmail.com> <5CB49492-605B-434E-BE5D-7F1B33F289CA@gmail.com> Message-ID: Follow-up: Following feedback from last week, I have scheduled a Hangout for 11 AM Eastern Time (GMT-4) for today, Friday 2014-08-15. Here is the link: https://plus.google.com/u/1/events/cioior9b5k16e3uaqsjsa1km2t0?authkey=COiD36DYzNGxMg For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423? On Thu, Aug 7, 2014 at 3:50 PM, Michka Popoff wrote: > Perfect, 3 PM for me :) > > Thanks > > On 7 ao?t 2014, at 21:19, Matt McCormick wrote: > >> OK, let's do 9 AM Eastern Time Zone (GMT-4). :-) >> >> I created an Event here [1]. >> >> If you are subscribed to the ITK Bar Camp Community [2], you should >> already have received an invitation. >> >> Thanks, >> Matt >> >> [1] https://plus.google.com/events/cauvj61hvr7kirg5g5vjsupt4pg >> >> [2] https://plus.google.com/communities/111375098792764998322 >> >> On Thu, Aug 7, 2014 at 2:43 PM, Michka Popoff wrote: >>> +1 >>> >>> 9 AM, what timezone ? ;D >>> >>> On 7 ao?t 2014, at 20:24, Bill Lorensen wrote: >>> >>>> +1 >>>> >>>> >>>> On Thu, Aug 7, 2014 at 2:23 PM, Bradley Lowekamp wrote: >>>>> Hello, >>>>> >>>>> I am in favor of using Google Hangout as it appears to be more accessible to people and more seem to be able to join. >>>>> >>>>> Brad >>>>> >>>>> On Aug 7, 2014, at 2:20 PM, Matt McCormick wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> Are we having the development meeting teleconference tomorrow? If >>>>>> not, would folks like to do a Google Hangout at 9 AM? >>>>>> >>>>>> On a positive side note, Google Hangout's no longer require a Google >>>>>> Plus account [1], and it no longer requires plugins with Chrome/ium >>>>>> [2]. >>>>>> >>>>>> I am happy to see the Goog-Monster moving towards greater openness and >>>>>> liberty. Maybe the internal forces for good are becoming stronger >>>>>> :-). >>>>>> >>>>>> Thanks, >>>>>> Matt >>>>>> >>>>>> [1] http://techcrunch.com/2014/07/30/hangouts-now-works-without-google-account-becomes-part-of-google-apps-for-business-and-gets-sla/ >>>>>> >>>>>> [2] http://www.omgchrome.com/google-hangouts-chrome-plugin-free-2/ >>>>> >>>>> _______________________________________________ >>>>> Community mailing list >>>>> Community at itk.org >>>>> http://public.kitware.com/mailman/listinfo/community >>>> >>>> >>>> >>>> -- >>>> Unpaid intern in BillsBasement at noware dot com >>>> _______________________________________________ >>>> 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 > From david.froger.ml at mailoo.org Fri Aug 15 02:41:27 2014 From: david.froger.ml at mailoo.org (David Froger) Date: Fri, 15 Aug 2014 08:41:27 +0200 Subject: [ITK] HDF5 enhancements In-Reply-To: References: <20140808144827.12192.3457@otis.rocq.inria.fr> Message-ID: <20140815064127.31406.74510@otis.rocq.inria.fr> Hi Matt, I would be very pleased, unfortunately from Thursday, August 19 to Thursday, August 26 I will be on a trip and without Internet connection most of the time. I'm available the rest of the year! Thanks, David Quoting Matt McCormick (2014-08-14 21:05:52) > Hi David, > > Would you be available to discuss these patches more in a Google > Hangout sometime next week? > > Thanks, > Matt > > On Fri, Aug 8, 2014 at 5:36 PM, Matt McCormick > wrote: > > Hi David, > > > > Looks like some great work! Thanks for contributing! > > > > I'll review over the coming days. > > > > Thanks, > > Matt > > > > On Fri, Aug 8, 2014 at 10:48 AM, David Froger > > wrote: > >> Dear all, > >> > >> I just push this to Gerrit (ITK): > >> > >> http://review.source.kitware.com/16576 > >> http://review.source.kitware.com/16577 > >> http://review.source.kitware.com/16578 > >> http://review.source.kitware.com/16579 > >> > >> to fix the test of HDF5 write streaming, and add pasting support for HDF5. > >> > >> and this (ITKExamples): > >> > >> http://review.source.kitware.com/16580 > >> > >> to add examples about streamnig and pasting HDF5 files. > >> > >> The commits are not perfect, but I would be happy to discuss its content and > >> to have feedback. > >> > >> Especially: > >> - I introduce a 'ChangeRegionImageFilter', that may be replaced by something > >> already existing, but I didn't find what. (Furthermore, the implementation is > >> not optimal, it make a useless copy). > >> - For the ITKExamples, I didn't find how to build the html documentations from > >> the rst files, so I didn't test it. > >> - For the ITKExamples, I didn't succced yet to upload the input binary files. > >> - For the ITKExamples, the last example may not work yet. > >> > >> Best, > >> David > >> > >> _______________________________________________ > >> Community mailing list > >> Community at itk.org > >> http://public.kitware.com/mailman/listinfo/community From nekto1989 at gmail.com Fri Aug 15 04:53:41 2014 From: nekto1989 at gmail.com (=?UTF-8?B?0JzQsNGAJ9GP0L0g0JrQu9C40LzQvtCy?=) Date: Fri, 15 Aug 2014 11:53:41 +0300 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Hi, I don't mind. After changes that Ivan Kubarev proposed this image is being read to unsigned short properly for me. Problem may be the same for 64-bit TIFF. Marian 2014-08-14 17:18 GMT+03:00 Matt McCormick : > Thanks for the nice example! > > > I have been able to reproduce the output. If it is a bug, can the > given image be added to the repository as part of a unit test? > > Thanks, > Matt > > On Thu, Aug 14, 2014 at 9:51 AM, ???'?? ?????? > wrote: > > Image Watch during debugging in Visual Studio. > > Windows Photo Viewer after results dumped to disk. > > > > > > 2014-08-14 15:35 GMT+03:00 Bill Lorensen : > > > >> How are you displaying the unsigned short image? Many viewers cannot > >> properly display unsigned short. > >> > >> On Aug 14, 2014 7:23 AM, "???'?? ??????" wrote: > >>> > >>> Hi, > >>> > >>> I've tried different methods. Reading to RGBPixel, then > >>> using RGBToLuminanceImageFilter and MultiplyImageFilter (2 ^ 8) > produces the > >>> same visually proper image. Reading directly to > fails. > >>> Looks like this is bug in TIFFImageIO and not in the way it is being > called. > >>> http://itk-users.7.n7.nabble.com/TiffIO-strange-behaviour-td32215.html > >>> > >>> Marian > >>> > >>> > >>> 2014-08-13 23:55 GMT+03:00 ???'?? ?????? : > >>>> > >>>> Hi Matt, > >>>> > >>>> I hope this is proper cmakelists.txt. I'm used to using ITK connected > >>>> through *.props into Visual Studio solution. > >>>> > >>>> Best regards, > >>>> Marian > >>>> > >>>> > >>>> > >>>> 2014-08-13 22:52 GMT+03:00 Matt McCormick >: > >>>> > >>>>> Hi Marian, > >>>>> > >>>>> Thanks for the update. Offhand, I am not seeing the issue. > >>>>> > >>>>> Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, and > >>>>> the input data? > >>>>> > >>>>> Thanks, > >>>>> Matt > >>>>> > >>>>> [1] http://sscce.org/ > >>>>> > >>>>> On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? > >>>>> wrote: > >>>>> > { > >>>>> > typedef unsigned short PixelType; > >>>>> > typedef itk::Image ImageType; > >>>>> > auto reader = itk::ImageFileReader< > >>>>> > ImageType>::New(); > >>>>> > reader->SetFileName("D:/TestData/input/input.tif"); > >>>>> > reader->SetImageIO(itk::TIFFImageIO::New()); > >>>>> > > >>>>> > typedef unsigned short OutputPixelType; > >>>>> > typedef itk::Image OutputImageType; > >>>>> > > >>>>> > auto writer = itk::ImageFileWriter::New(); > >>>>> > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); > >>>>> > auto image_io = itk::TIFFImageIO::New(); > >>>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> > writer->SetImageIO(image_io); > >>>>> > writer->SetInput(reader->GetOutput()); > >>>>> > writer->Update(); //produces completely black > >>>>> > } > >>>>> > > >>>>> > { > >>>>> > typedef itk::RGBAPixel PixelType; > >>>>> > typedef itk::Image ImageType; > >>>>> > auto reader = itk::ImageFileReader::New(); > >>>>> > reader->SetFileName("D:/TestData/input/input.tif"); > >>>>> > reader->SetImageIO(itk::TIFFImageIO::New()); > >>>>> > reader->Update(); > >>>>> > > >>>>> > typedef unsigned short OutputPixelType; > >>>>> > typedef itk::Image OutputImageType; > >>>>> > > >>>>> > auto input_image = reader->GetOutput(); > >>>>> > auto output_image = OutputImageType::New(); > >>>>> > output_image->CopyInformation(input_image); > >>>>> > > >>>>> > output_image->SetRegions(input_image->GetLargestPossibleRegion()); > >>>>> > output_image->Allocate(); > >>>>> > itk::ImageRegionConstIterator > >>>>> > const_iterator(input_image, > >>>>> > input_image->GetLargestPossibleRegion()); > >>>>> > itk::ImageRegionIterator > >>>>> > rescaled_iterator(output_image, > >>>>> > output_image->GetLargestPossibleRegion()); > >>>>> > for (const_iterator.GoToBegin(), rescaled_iterator.GoToBegin(); > >>>>> > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) > >>>>> > { > >>>>> > const PixelType& pixel = const_iterator.Get(); > >>>>> > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + > pixel.GetRed()) > >>>>> > * 16 + > >>>>> > pixel.GetGreen()) * 16 + pixel.GetBlue()); > >>>>> > } > >>>>> > > >>>>> > auto writer = itk::ImageFileWriter::New(); > >>>>> > > >>>>> > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); > >>>>> > auto image_io = itk::TIFFImageIO::New(); > >>>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> > writer->SetImageIO(image_io); > >>>>> > writer->SetInput(output_image); > >>>>> > writer->Update(); //output looks the same > >>>>> > } > >>>>> > > >>>>> > > >>>>> > 2014-08-13 20:50 GMT+03:00 Matt McCormick > >>>>> > : > >>>>> >> > >>>>> >> Hi Marian, > >>>>> >> > >>>>> >> > >>>>> >> If > >>>>> >> > >>>>> >> itk::Image< unsigned short, 2 > > >>>>> >> > >>>>> >> is used for the ImageType, does it work (note the dimension > >>>>> >> specification). > >>>>> >> > >>>>> >> HTH, > >>>>> >> Matt > >>>>> >> > >>>>> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? < > nekto1989 at gmail.com> > >>>>> >> wrote: > >>>>> >> > Hi, > >>>>> >> > > >>>>> >> > How to properly read 32-bit TIFF? I need to get > >>>>> >> > itk::Image >>>>> >> > short> > >>>>> >> > on output. If I use it as ImageType for ImageFileReader, it is > >>>>> >> > read as > >>>>> >> > fully > >>>>> >> > black (checked contrast with Image Watch and it is for sure > >>>>> >> > completely > >>>>> >> > empty). If I read it with pixel type RGBPixel or > >>>>> >> > RGBAPixel, it is read properly. But I need to > >>>>> >> > convert it > >>>>> >> > manually to unsigned short after this. So what is the proper way > >>>>> >> > of > >>>>> >> > reading > >>>>> >> > it? Do I need to create templated methods for every pixeltype > with > >>>>> >> > conversions to unsigned short? > >>>>> >> > > >>>>> >> > Best regards, > >>>>> >> > Marian > >>>>> >> > > >>>>> >> > _______________________________________________ > >>>>> >> > 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 > >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Fri Aug 15 08:44:40 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Fri, 15 Aug 2014 14:44:40 +0200 Subject: [ITK] [ITK-users] [Insight-users] enhancing plate like structures (by modifying itkHessianSmoothed3DToVesselnessMeasureImageFilter) In-Reply-To: <22EC75E8215562428ACADFA35877A25A02F9FE@JANEWAY.ts.odu.edu> References: <22EC75E8215562428ACADFA35877A25A02F9FE@JANEWAY.ts.odu.edu> Message-ID: <53EE00B8.3030605@mh-hannover.de> Dear Michel, dear Luca, Coming back to Hessian-based measures of Yours, which I've tried out two years ago: Is my understanding correct that the response function V of [Desc?teaux et. al.MICCAI 2006] and [Luca ITK-Journal 2007] differ for N=3 and M=2? i.e. for N=3, M=2: Rblob = vnl_math_abs( l3 + l3 - l2 - l1 ) / l3 in itkDescoteauxSheetnessImageFilter corresponding to Ra (NOT Rb) in itkHessianToObjectnessMeasureImageFilter, which is undefined for N=3, M=2. Rsheet = l2 / l3 in itkDescoteauxSheetnessImageFilter corresponds to Rb in itkHessianToObjectnessMeasureImageFilter, both equal for N=3, M=2. When has each definition its optimal use? Additionally, In Desc?teaux2006 a zero level-set segmentation approach is described based on a vector field constructed from initial ellipsoids positioned at high sheetness measures. Are there ITK-Filters to achieve that same approach or something similar? Which would I need? Many thanks again for Your replies and help. Roman On 05/09/12 17:10, Audette, Michel A. wrote: > Do a google on sheetness. Maxime Desc?teaux and I had modified this type of > operator a few years back to improve the detection of curviplanar bones (MICCAI > paper, republished in J. Computer Assisted Surgery), which was a tweak of his > and Frangi's work on vesselness operators. > > Michel > > Michel Audette, Ph.D. > Assistant Professor, > Department of Modeling, Simulation and Visualization Engineering, > Old Dominion University, > Norfolk, VA. > ________________________________________ > From: insight-users-bounces at itk.org [insight-users-bounces at itk.org] on behalf of > Ho Cheung [hocheung20 at gmail.com] > Sent: Wednesday, September 05, 2012 8:41 AM > To: Dr. Roman Grothausmann > Cc: insight-users at itk.org; vmtk-users at lists.sourceforge.net; Luca Antiga > Subject: Re: [Insight-users] enhancing plate like structures (by modifying > itkHessianSmoothed3DToVesselnessMeasureImageFilter) > > Hi Dr. Grothausmann, > > The measure in ITK appears to be based on Sato > (http://www.spl.harvard.edu/archive/spl-pre2007/pages/papers/yoshi/node3.html#SECTION00021000000000000000) > and I don't see an easy way to modify it so that it detects plate like > structures instead of line like structures. > > If speed is not a major concern for you, may I suggest you implement a similar > measure? Frangi's original vesselness enhancement formula > (http://www.dtic.upf.edu/~afrangi/articles/miccai1998.pdf) can be easily > modified for what you need and is based on Eigenvalues like Sato. > > According to equations 10, 11, 12, 13 in Frangi's paper and my interpretation of > what the measures do, what you need is high Ra, Rb, and S values, so the formula > becomes: > > V = [1 - exp(-Ra^2/2a^2)][1 - exp(-Rb^2/2b^2)][1 - exp(-S^2/2c62)] > > Hope, this helps, > > Ho Cheung > Research Assistant > Bio-Image Analytics Laboratory - University of Houston > (832) 215-6347 > > > > On Sep 5, 2012, at 3:36 AM, Dr. Roman Grothausmann > wrote: > > > Dear mailing list members, dear Luca, > > > > > > Recently I was trying to enhance vascular structures from airways with the > vessel enhancement filters from ITK (objectness and vessel enhancement). The > problem is that these vessels are not filled in the tomograms our imaging > technique yields. Only the airway walls are imaged, which corresponds to an > uneven 2D surface. Since it is only a 3D not an ND problem, I tried to modify > itkHessianSmoothed3DToVesselnessMeasureImageFilter to enhance not vessels (1D) > structures but plates/walls. Therefore I exchanged lambda 1 and 3 in the > weighting function. Sadly, I could not get the filter to enhance the airway walls. > > Have I missed anything or would enhancing plateness this way only work for > not-curved planes? > > > > > > Here the important part of the diff of my changes: > > > > diff -au > itk/IJ-Vessel_Enhancement_Diffusion.1/itkHessianSmoothed3DToVesselnessMeasureImageFilter.txx > itk/plateness3D_01/itkHessianSmoothed3DToPlatenessMeasureImageFilter.txx > > > > > > > > + ////swap Lambda1 and Lambda3 to enhance "plateness" > > + double swap_tmp= Lambda1; > > + Lambda3= Lambda1; > > + Lambda1= swap_tmp; > > + ///swapping done > > + > > double Lambda1Abs = vnl_math_abs( Lambda1 ); > > double Lambda2Abs = vnl_math_abs( Lambda2 ); > > double Lambda3Abs = vnl_math_abs( Lambda3 ); > > @@ -162,14 +168,13 @@ > > double vesMeasure_3 = > > ( 1 - vcl_exp( -1.0 * (( vnl_math_sqr( S )) / ( 2.0 * ( GammaSqr))))); > > > > - double vesMeasure_4 = > > - vcl_exp ( -1.0 * ( 2.0 * vnl_math_sqr( m_C )) / > > - ( Lambda2Abs * (Lambda3Sqr))); > > + double vesMeasure_4 = 1; ////plateness for now not smoothed > > + //double vesMeasure_4 = vcl_exp ( -1.0 * ( 2.0 * vnl_math_sqr( m_C )) > / ( Lambda2Abs * (Lambda3Sqr))); ////check if this makes sense for plateness > > > > > > Many thanks for any help or hints. > > 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 > > 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://www.itk.org/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://www.itk.org/mailman/listinfo/insight-users > > > -- > BEGIN-ANTISPAM-VOTING-LINKS > ------------------------------------------------------ > > Teach CanIt if this mail (ID 699566122) is spam: > Spam: https://www.spamtrap.odu.edu/b.php?i=699566122&m=6758d860fb26&t=20120905&c=s > Not spam: > https://www.spamtrap.odu.edu/b.php?i=699566122&m=6758d860fb26&t=20120905&c=n > Forget vote: > https://www.spamtrap.odu.edu/b.php?i=699566122&m=6758d860fb26&t=20120905&c=f > ------------------------------------------------------ > END-ANTISPAM-VOTING-LINKS > -- 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 matt.mccormick at kitware.com Fri Aug 15 09:31:45 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 15 Aug 2014 09:31:45 -0400 Subject: [ITK] HDF5 enhancements In-Reply-To: <20140815064127.31406.74510@otis.rocq.inria.fr> References: <20140808144827.12192.3457@otis.rocq.inria.fr> <20140815064127.31406.74510@otis.rocq.inria.fr> Message-ID: Hi David, That is fine -- have a great trip! Does sometime the first week of September work? Thanks, Matt On Fri, Aug 15, 2014 at 2:41 AM, David Froger wrote: > Hi Matt, > > I would be very pleased, unfortunately from Thursday, August 19 to Thursday, > August 26 I will be on a trip and without Internet connection most of the > time. I'm available the rest of the year! > > Thanks, > David > > Quoting Matt McCormick (2014-08-14 21:05:52) >> Hi David, >> >> Would you be available to discuss these patches more in a Google >> Hangout sometime next week? >> >> Thanks, >> Matt >> >> On Fri, Aug 8, 2014 at 5:36 PM, Matt McCormick >> wrote: >> > Hi David, >> > >> > Looks like some great work! Thanks for contributing! >> > >> > I'll review over the coming days. >> > >> > Thanks, >> > Matt >> > >> > On Fri, Aug 8, 2014 at 10:48 AM, David Froger >> > wrote: >> >> Dear all, >> >> >> >> I just push this to Gerrit (ITK): >> >> >> >> http://review.source.kitware.com/16576 >> >> http://review.source.kitware.com/16577 >> >> http://review.source.kitware.com/16578 >> >> http://review.source.kitware.com/16579 >> >> >> >> to fix the test of HDF5 write streaming, and add pasting support for HDF5. >> >> >> >> and this (ITKExamples): >> >> >> >> http://review.source.kitware.com/16580 >> >> >> >> to add examples about streamnig and pasting HDF5 files. >> >> >> >> The commits are not perfect, but I would be happy to discuss its content and >> >> to have feedback. >> >> >> >> Especially: >> >> - I introduce a 'ChangeRegionImageFilter', that may be replaced by something >> >> already existing, but I didn't find what. (Furthermore, the implementation is >> >> not optimal, it make a useless copy). >> >> - For the ITKExamples, I didn't find how to build the html documentations from >> >> the rst files, so I didn't test it. >> >> - For the ITKExamples, I didn't succced yet to upload the input binary files. >> >> - For the ITKExamples, the last example may not work yet. >> >> >> >> Best, >> >> David >> >> >> >> _______________________________________________ >> >> Community mailing list >> >> Community at itk.org >> >> http://public.kitware.com/mailman/listinfo/community From david.froger.ml at mailoo.org Fri Aug 15 13:11:13 2014 From: david.froger.ml at mailoo.org (David Froger) Date: Fri, 15 Aug 2014 19:11:13 +0200 Subject: [ITK] HDF5 enhancements In-Reply-To: References: <20140808144827.12192.3457@otis.rocq.inria.fr> <20140815064127.31406.74510@otis.rocq.inria.fr> Message-ID: <20140815171113.8127.83369@otis.rocq.inria.fr> Hi Matt, The first week of September is perfect. Thanks, David Quoting Matt McCormick (2014-08-15 15:31:45) > Hi David, > > That is fine -- have a great trip! > > Does sometime the first week of September work? > > Thanks, > Matt > > On Fri, Aug 15, 2014 at 2:41 AM, David Froger > wrote: > > Hi Matt, > > > > I would be very pleased, unfortunately from Thursday, August 19 to Thursday, > > August 26 I will be on a trip and without Internet connection most of the > > time. I'm available the rest of the year! > > > > Thanks, > > David > > > > Quoting Matt McCormick (2014-08-14 21:05:52) > >> Hi David, > >> > >> Would you be available to discuss these patches more in a Google > >> Hangout sometime next week? > >> > >> Thanks, > >> Matt > >> > >> On Fri, Aug 8, 2014 at 5:36 PM, Matt McCormick > >> wrote: > >> > Hi David, > >> > > >> > Looks like some great work! Thanks for contributing! > >> > > >> > I'll review over the coming days. > >> > > >> > Thanks, > >> > Matt > >> > > >> > On Fri, Aug 8, 2014 at 10:48 AM, David Froger > >> > wrote: > >> >> Dear all, > >> >> > >> >> I just push this to Gerrit (ITK): > >> >> > >> >> http://review.source.kitware.com/16576 > >> >> http://review.source.kitware.com/16577 > >> >> http://review.source.kitware.com/16578 > >> >> http://review.source.kitware.com/16579 > >> >> > >> >> to fix the test of HDF5 write streaming, and add pasting support for HDF5. > >> >> > >> >> and this (ITKExamples): > >> >> > >> >> http://review.source.kitware.com/16580 > >> >> > >> >> to add examples about streamnig and pasting HDF5 files. > >> >> > >> >> The commits are not perfect, but I would be happy to discuss its content and > >> >> to have feedback. > >> >> > >> >> Especially: > >> >> - I introduce a 'ChangeRegionImageFilter', that may be replaced by something > >> >> already existing, but I didn't find what. (Furthermore, the implementation is > >> >> not optimal, it make a useless copy). > >> >> - For the ITKExamples, I didn't find how to build the html documentations from > >> >> the rst files, so I didn't test it. > >> >> - For the ITKExamples, I didn't succced yet to upload the input binary files. > >> >> - For the ITKExamples, the last example may not work yet. > >> >> > >> >> Best, > >> >> David > >> >> > >> >> _______________________________________________ > >> >> Community mailing list > >> >> Community at itk.org > >> >> http://public.kitware.com/mailman/listinfo/community From bill.lorensen at gmail.com Fri Aug 15 14:59:42 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 15 Aug 2014 14:59:42 -0400 Subject: [ITK] [ITK-dev] The patch you merged does not work Message-ID: Matt, That patch does not work. http://review.source.kitware.com/#/c/16697/ I merged the original patch as a temporary fix. Now I'm not sure what state we are in... Bill _______________________________________________ Powered by www.kitware.com 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 Aug 15 15:08:39 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 15 Aug 2014 15:08:39 -0400 Subject: [ITK] [ITK-dev] The patch you merged does not work In-Reply-To: References: Message-ID: Ooops. Sorry. I think we are OK. Too many pathes/topics... We'll see tomorrow. Bill On Fri, Aug 15, 2014 at 2:59 PM, Bill Lorensen wrote: > Matt, > > That patch does not work. http://review.source.kitware.com/#/c/16697/ > > I merged the original patch as a temporary fix. Now I'm not sure what > state we are in... > > Bill -- 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 matt.mccormick at kitware.com Fri Aug 15 18:53:42 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 15 Aug 2014 18:53:42 -0400 Subject: [ITK] [ITK-dev] The patch you merged does not work In-Reply-To: References: Message-ID: Looking a bit closer at how the merge occurred, I think it will still need more work. :-( Here is another patch: http://review.source.kitware.com/#/c/16703 Thanks, Matt On Fri, Aug 15, 2014 at 3:08 PM, Bill Lorensen wrote: > Ooops. Sorry. I think we are OK. Too many pathes/topics... We'll see tomorrow. > > Bill > > > On Fri, Aug 15, 2014 at 2:59 PM, Bill Lorensen wrote: >> Matt, >> >> That patch does not work. http://review.source.kitware.com/#/c/16697/ >> >> I merged the original patch as a temporary fix. Now I'm not sure what >> state we are in... >> >> Bill > > > > -- > 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 bill.lorensen at gmail.com Fri Aug 15 19:17:33 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 15 Aug 2014 19:17:33 -0400 Subject: [ITK] [ITK-dev] The patch you merged does not work In-Reply-To: References: Message-ID: master seems to be ok now? On Fri, Aug 15, 2014 at 6:53 PM, Matt McCormick wrote: > Looking a bit closer at how the merge occurred, I think it will still > need more work. :-( > > Here is another patch: > > http://review.source.kitware.com/#/c/16703 > > Thanks, > Matt > > On Fri, Aug 15, 2014 at 3:08 PM, Bill Lorensen wrote: >> Ooops. Sorry. I think we are OK. Too many pathes/topics... We'll see tomorrow. >> >> Bill >> >> >> On Fri, Aug 15, 2014 at 2:59 PM, Bill Lorensen wrote: >>> Matt, >>> >>> That patch does not work. http://review.source.kitware.com/#/c/16697/ >>> >>> I merged the original patch as a temporary fix. Now I'm not sure what >>> state we are in... >>> >>> Bill >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com -- 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 mtaquet at gmail.com Sat Aug 16 10:18:38 2014 From: mtaquet at gmail.com (Maxime Taquet) Date: Sat, 16 Aug 2014 16:18:38 +0200 Subject: [ITK] Create an itk transform file from a vector image Message-ID: <09BF8708-9EAE-4057-865F-5AE12D74CB7F@gmail.com> Hi all, I am trying to create an itk transform file (tfm file) representing a dense deformation field that itkTransformFileReader can open from a vector image (stored as a nrrd file) that contains the deformation field and the geometry of the image. Would you know how to do this? Thank you, Maxime From matt.mccormick at kitware.com Sat Aug 16 12:56:42 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 16 Aug 2014 12:56:42 -0400 Subject: [ITK] Getting ImageType for TIFF In-Reply-To: References: Message-ID: Hi Marian, Sounds great. I added the file to the regression test suite. Please review [1] this patch [2]. Thanks, Matt [1] http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html#perform-a-gerrit-review [2] http://review.source.kitware.com/#/c/16705/ On Fri, Aug 15, 2014 at 4:53 AM, ???'?? ?????? wrote: > Hi, > > I don't mind. After changes that Ivan Kubarev proposed this image is being > read to unsigned short properly for me. Problem may be the same for 64-bit > TIFF. > > Marian > > > 2014-08-14 17:18 GMT+03:00 Matt McCormick : > >> Thanks for the nice example! >> >> >> I have been able to reproduce the output. If it is a bug, can the >> given image be added to the repository as part of a unit test? >> >> Thanks, >> Matt >> >> On Thu, Aug 14, 2014 at 9:51 AM, ???'?? ?????? >> wrote: >> > Image Watch during debugging in Visual Studio. >> > Windows Photo Viewer after results dumped to disk. >> > >> > >> > 2014-08-14 15:35 GMT+03:00 Bill Lorensen : >> > >> >> How are you displaying the unsigned short image? Many viewers cannot >> >> properly display unsigned short. >> >> >> >> On Aug 14, 2014 7:23 AM, "???'?? ??????" wrote: >> >>> >> >>> Hi, >> >>> >> >>> I've tried different methods. Reading to RGBPixel, then >> >>> using RGBToLuminanceImageFilter and MultiplyImageFilter (2 ^ 8) >> >>> produces the >> >>> same visually proper image. Reading directly to >> >>> fails. >> >>> Looks like this is bug in TIFFImageIO and not in the way it is being >> >>> called. >> >>> http://itk-users.7.n7.nabble.com/TiffIO-strange-behaviour-td32215.html >> >>> >> >>> Marian >> >>> >> >>> >> >>> 2014-08-13 23:55 GMT+03:00 ???'?? ?????? : >> >>>> >> >>>> Hi Matt, >> >>>> >> >>>> I hope this is proper cmakelists.txt. I'm used to using ITK connected >> >>>> through *.props into Visual Studio solution. >> >>>> >> >>>> Best regards, >> >>>> Marian >> >>>> >> >>>> >> >>>> >> >>>> 2014-08-13 22:52 GMT+03:00 Matt McCormick >> >>>> : >> >>>> >> >>>>> Hi Marian, >> >>>>> >> >>>>> Thanks for the update. Offhand, I am not seeing the issue. >> >>>>> >> >>>>> Could you please post a SSCCE [1], i.e. CMakeLists.txt, the code, >> >>>>> and >> >>>>> the input data? >> >>>>> >> >>>>> Thanks, >> >>>>> Matt >> >>>>> >> >>>>> [1] http://sscce.org/ >> >>>>> >> >>>>> On Wed, Aug 13, 2014 at 2:27 PM, ???'?? ?????? >> >>>>> wrote: >> >>>>> > { >> >>>>> > typedef unsigned short PixelType; >> >>>>> > typedef itk::Image ImageType; >> >>>>> > auto reader = itk::ImageFileReader< >> >>>>> > ImageType>::New(); >> >>>>> > reader->SetFileName("D:/TestData/input/input.tif"); >> >>>>> > reader->SetImageIO(itk::TIFFImageIO::New()); >> >>>>> > >> >>>>> > typedef unsigned short OutputPixelType; >> >>>>> > typedef itk::Image OutputImageType; >> >>>>> > >> >>>>> > auto writer = itk::ImageFileWriter::New(); >> >>>>> > >> >>>>> > writer->SetFileName("D:/TestData/output/ushort_to_ushort.tif"); >> >>>>> > auto image_io = itk::TIFFImageIO::New(); >> >>>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >> >>>>> > writer->SetImageIO(image_io); >> >>>>> > writer->SetInput(reader->GetOutput()); >> >>>>> > writer->Update(); //produces completely black >> >>>>> > } >> >>>>> > >> >>>>> > { >> >>>>> > typedef itk::RGBAPixel PixelType; >> >>>>> > typedef itk::Image ImageType; >> >>>>> > auto reader = itk::ImageFileReader::New(); >> >>>>> > reader->SetFileName("D:/TestData/input/input.tif"); >> >>>>> > reader->SetImageIO(itk::TIFFImageIO::New()); >> >>>>> > reader->Update(); >> >>>>> > >> >>>>> > typedef unsigned short OutputPixelType; >> >>>>> > typedef itk::Image OutputImageType; >> >>>>> > >> >>>>> > auto input_image = reader->GetOutput(); >> >>>>> > auto output_image = OutputImageType::New(); >> >>>>> > output_image->CopyInformation(input_image); >> >>>>> > >> >>>>> > output_image->SetRegions(input_image->GetLargestPossibleRegion()); >> >>>>> > output_image->Allocate(); >> >>>>> > itk::ImageRegionConstIterator >> >>>>> > const_iterator(input_image, >> >>>>> > input_image->GetLargestPossibleRegion()); >> >>>>> > itk::ImageRegionIterator >> >>>>> > rescaled_iterator(output_image, >> >>>>> > output_image->GetLargestPossibleRegion()); >> >>>>> > for (const_iterator.GoToBegin(), >> >>>>> > rescaled_iterator.GoToBegin(); >> >>>>> > !const_iterator.IsAtEnd(); ++const_iterator, ++rescaled_iterator) >> >>>>> > { >> >>>>> > const PixelType& pixel = const_iterator.Get(); >> >>>>> > rescaled_iterator.Set(((pixel.GetAlpha() * 16 + >> >>>>> > pixel.GetRed()) >> >>>>> > * 16 + >> >>>>> > pixel.GetGreen()) * 16 + pixel.GetBlue()); >> >>>>> > } >> >>>>> > >> >>>>> > auto writer = itk::ImageFileWriter::New(); >> >>>>> > >> >>>>> > writer->SetFileName("D:/TestData/output/rgba_char_to_ushort.tif"); >> >>>>> > auto image_io = itk::TIFFImageIO::New(); >> >>>>> > image_io->SetPixelType(itk::ImageIOBase::SCALAR); >> >>>>> > writer->SetImageIO(image_io); >> >>>>> > writer->SetInput(output_image); >> >>>>> > writer->Update(); //output looks the same >> >>>>> > } >> >>>>> > >> >>>>> > >> >>>>> > 2014-08-13 20:50 GMT+03:00 Matt McCormick >> >>>>> > : >> >>>>> >> >> >>>>> >> Hi Marian, >> >>>>> >> >> >>>>> >> >> >>>>> >> If >> >>>>> >> >> >>>>> >> itk::Image< unsigned short, 2 > >> >>>>> >> >> >>>>> >> is used for the ImageType, does it work (note the dimension >> >>>>> >> specification). >> >>>>> >> >> >>>>> >> HTH, >> >>>>> >> Matt >> >>>>> >> >> >>>>> >> On Wed, Aug 13, 2014 at 1:47 PM, ???'?? ?????? >> >>>>> >> >> >>>>> >> wrote: >> >>>>> >> > Hi, >> >>>>> >> > >> >>>>> >> > How to properly read 32-bit TIFF? I need to get >> >>>>> >> > itk::Image> >>>>> >> > short> >> >>>>> >> > on output. If I use it as ImageType for ImageFileReader, it is >> >>>>> >> > read as >> >>>>> >> > fully >> >>>>> >> > black (checked contrast with Image Watch and it is for sure >> >>>>> >> > completely >> >>>>> >> > empty). If I read it with pixel type RGBPixel or >> >>>>> >> > RGBAPixel, it is read properly. But I need to >> >>>>> >> > convert it >> >>>>> >> > manually to unsigned short after this. So what is the proper >> >>>>> >> > way >> >>>>> >> > of >> >>>>> >> > reading >> >>>>> >> > it? Do I need to create templated methods for every pixeltype >> >>>>> >> > with >> >>>>> >> > conversions to unsigned short? >> >>>>> >> > >> >>>>> >> > Best regards, >> >>>>> >> > Marian >> >>>>> >> > >> >>>>> >> > _______________________________________________ >> >>>>> >> > 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 >> >>> >> > > > From matt.mccormick at kitware.com Sat Aug 16 14:17:49 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 16 Aug 2014 14:17:49 -0400 Subject: [ITK] Create an itk transform file from a vector image In-Reply-To: <09BF8708-9EAE-4057-865F-5AE12D74CB7F@gmail.com> References: <09BF8708-9EAE-4057-865F-5AE12D74CB7F@gmail.com> Message-ID: Hi Maxime, You can read in the vector image with an itk::ImageFileReader, then create a DisplacementFieldTransform out of it with SetDisplacementField [1]. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1DisplacementFieldTransform.html#ab0b5ac8b6792ed0acddbd0a6666b39d2 On Sat, Aug 16, 2014 at 10:18 AM, Maxime Taquet wrote: > Hi all, > > I am trying to create an itk transform file (tfm file) representing a dense deformation field that itkTransformFileReader can open from a vector image (stored as a nrrd file) that contains the deformation field and the geometry of the image. Would you know how to do this? > > Thank you, > Maxime > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From kris.f.thielemans at gmail.com Sun Aug 17 09:42:50 2014 From: kris.f.thielemans at gmail.com (Kris Thielemans) Date: Sun, 17 Aug 2014 14:42:50 +0100 Subject: [ITK] problem (and fix?) for Nifti IO with very large number of elements in file Message-ID: <01d201cfba21$2431bc00$6c953400$@gmail.com> Dear all My Nifti file is very large (448x512x176 x141). After a lot of pain, I discovered that it doesn't get read completely by the ITK Nifti IO image reader. The reason is that the number of elements is computed as an integer, which is 32bit on my system (Ubuntu 12.04, gcc 4.6.3). Below is an easy patch that seems to solve the problem. (It also fixes a compilation error in the file when __USE_VERY_VERBOSE_NIFTI_DEBUGGING__ is on, as then it refers to a nonexisting variable tobuffer, so I've just commented that line out). I'm afraid I don't have the resources to put in a bug report (in fact, I couldn't register as https://issues.itk.org/jira/secure/Signup.jspa seems to ask for a captcha, but I can't see any in my firefox window), nor for adding a test case etc, so I'm hoping somebody else will take this further. Please also reply to my email address as I might miss anything sent to the list. Kris Thielemans Senior Lecturer at University College London Institute for Nuclear Medicine, UCL Hospital diff --git a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx index 25d85d3..491bcd1 100644 --- a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx +++ b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx @@ -409,7 +409,7 @@ void RescaleFunction(TBuffer *buffer, double intercept, size_t size) { - for ( unsigned int i = 0; i < size; i++ ) + for ( size_t i = 0; i < size; i++ ) { double tmp = static_cast< double >( buffer[i] ) * slope; tmp += intercept; @@ -437,7 +437,7 @@ void NiftiImageIO::Read(void *buffer) ImageIORegion::SizeType size = regionToRead.GetSize(); ImageIORegion::IndexType start = regionToRead.GetIndex(); - int numElts = 1; + size_t numElts = 1; int _origin[7]; int _size[7]; unsigned int i; @@ -1933,7 +1933,7 @@ NiftiImageIO } delete[] vecOrder; dumpdata(buffer); - dumpdata(tobuffer); + //dumpdata(tobuffer); //Need a const cast here so that we don't have to copy the memory for //writing. this->m_NiftiImage->data = (void *)nifti_buf; From matt.mccormick at kitware.com Sun Aug 17 17:25:55 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 17 Aug 2014 17:25:55 -0400 Subject: [ITK] problem (and fix?) for Nifti IO with very large number of elements in file In-Reply-To: <01d201cfba21$2431bc00$6c953400$@gmail.com> References: <01d201cfba21$2431bc00$6c953400$@gmail.com> Message-ID: Hi Kris, Thank you for the report and patch. Please review [1] these patches [2] [3]. For future reference, it is not necessary to file a bug report to submit a patch. Essentially, ./Utilities/SetupForDevelopment.sh git gerrit-push will submit the patch. More details can be found here [4]. Thanks, Matt [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html [2] http://review.source.kitware.com/#/c/16729/ [3] http://review.source.kitware.com/#/c/16728/ [4] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html On Sun, Aug 17, 2014 at 9:42 AM, Kris Thielemans wrote: > Dear all > > My Nifti file is very large (448x512x176 x141). After a lot of pain, I > discovered that it doesn't get read completely by the ITK Nifti IO image > reader. The reason is that the number of elements is computed as an integer, > which is 32bit on my system (Ubuntu 12.04, gcc 4.6.3). Below is an easy > patch that seems to solve the problem. (It also fixes a compilation error in > the file when __USE_VERY_VERBOSE_NIFTI_DEBUGGING__ is on, as then it refers > to a nonexisting variable tobuffer, so I've just commented that line out). > > I'm afraid I don't have the resources to put in a bug report (in fact, I > couldn't register as https://issues.itk.org/jira/secure/Signup.jspa seems to > ask for a captcha, but I can't see any in my firefox window), nor for adding > a test case etc, so I'm hoping somebody else will take this further. > > Please also reply to my email address as I might miss anything sent to the > list. > > > Kris Thielemans > Senior Lecturer at University College London > Institute for Nuclear Medicine, UCL Hospital > > > > diff --git a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx > b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx > index 25d85d3..491bcd1 100644 > --- a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx > +++ b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx > @@ -409,7 +409,7 @@ void RescaleFunction(TBuffer *buffer, > double intercept, > size_t size) > { > - for ( unsigned int i = 0; i < size; i++ ) > + for ( size_t i = 0; i < size; i++ ) > { > double tmp = static_cast< double >( buffer[i] ) * slope; > tmp += intercept; > @@ -437,7 +437,7 @@ void NiftiImageIO::Read(void *buffer) > ImageIORegion::SizeType size = regionToRead.GetSize(); > ImageIORegion::IndexType start = regionToRead.GetIndex(); > > - int numElts = 1; > + size_t numElts = 1; > int _origin[7]; > int _size[7]; > unsigned int i; > @@ -1933,7 +1933,7 @@ NiftiImageIO > } > delete[] vecOrder; > dumpdata(buffer); > - dumpdata(tobuffer); > + //dumpdata(tobuffer); > //Need a const cast here so that we don't have to copy the memory for > //writing. > this->m_NiftiImage->data = (void *)nifti_buf; > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From constantine.zakkaroff at canterbury.ac.nz Sun Aug 17 22:52:23 2014 From: constantine.zakkaroff at canterbury.ac.nz (Kon Zakkaroff) Date: Mon, 18 Aug 2014 02:52:23 +0000 Subject: [ITK] Advice on Vessel/Bifurcation Quad Mesh Surface, Please? Message-ID: Hello ALL, I need to generate some good quality quad surface meshes for vessel bifurcations or segmented coronary arteries. In both cases the input can be replaced with centrelines with the associated radiuses for every point. Would anyone offer a perspective on how ITK can help with this? It seems the experience on quad surface mesh generation is quite sparse. Also I would appreciate any advice on any tools for generating quad surface meshes if there are any out there in the wild. Many thanks, Constantine This email may be confidential and subject to legal privilege, it may not reflect the views of the University of Canterbury, and it is not guaranteed to be virus free. If you are not an intended recipient, please notify the sender immediately and erase all copies of the message and any attachments. Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more information. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hms96 at scarletmail.rutgers.edu Mon Aug 18 10:01:22 2014 From: hms96 at scarletmail.rutgers.edu (Harsh Shah) Date: Mon, 18 Aug 2014 10:01:22 -0400 Subject: [ITK] [ITK-users] Question About Buffers Message-ID: Hello, I wanted to know if itk had any resources that would allow me to set the value of an itk::Image m_buffer to a buffer I read in from my camera. If you could point me in the direction of a good example, I would appreciate it. 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 grothausmann.roman at mh-hannover.de Mon Aug 18 10:03:25 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Mon, 18 Aug 2014 16:03:25 +0200 Subject: [ITK] [ITK-users] difference between trees constructed in itkWatershedImageFilter and itkComponentTree Message-ID: <53F207AD.3030503@mh-hannover.de> Dear mailing list members, Wherein lies the difference in the tree constructed in itkWatershedImageFilter and itkComponentTree contributed by Ga?tan Lehmann in http://www.insight-journal.org/browse/publication/210? In the article about the itkComponentTree (http://www.insight-journal.org/browse/publication/210) it says there is a contribution for the binary case in ITK. Which is it? ConnectedComponentImageFilter? Further in the text single template attribute are mentioned. Would these have to be computed separately with e.g. itkLabelImageToShapeLabelMapFilter? Thanks for any answers and explanations 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 mercikd at thomas.edu Mon Aug 18 10:05:49 2014 From: mercikd at thomas.edu (Dan Mercik) Date: Mon, 18 Aug 2014 14:05:49 +0000 Subject: [ITK] [ITK-users] TileImageFilter SideBySide In-Reply-To: References: , Message-ID: Good Morning, The demonstration you showed me works great, however if I wanted to do 20 images that would take some time. So, I tried doing a for loop which didn't work exactly how I wanted it to work. I would like the program to take any amount of images and output them side by side , any ideas? The attachment shows the for loop I used similar to TileImageFilter CreateVolume example however when I use it for some odd reason only one image is being display side by side multiple times. Daniel Mercik Computer Science Major Service Desk Technician Thomas College ________________________________ From: Michka Popoff Sent: Wednesday, August 13, 2014 2:32 AM To: Dan Mercik Cc: ITK Mailing List; community at itk.org Subject: Re: [ITK-users] TileImageFilter SideBySide Hi Moving this mail to the new community mailing list For your problem, you should use the setLayout method [1] For 4 images, that would be: itk::FixedArray< unsigned int, 2 > layout; layout[0] = 4; layout[1] = 0; Michka [1] http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_SideBySide On 13 ao?t 2014, at 01:06, Dan Mercik > wrote: Good Afternoon, I want to know if it's possible to have more than two image be side by side vertically? If so what would I have to change in the algorithm, would I have to make a loop for the amount of input images? Any help would be greatly appreciative. Daniel Mercik Computer Science Major Service Desk Technician Thomas College _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 embedded and charset-unspecified text was scrubbed... Name: TileImageFilter_SideBySide.cxx URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Tilesidebyside.JPG Type: image/jpeg Size: 59821 bytes Desc: Tilesidebyside.JPG 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 yves.frederix+itk at gmail.com Mon Aug 18 10:30:36 2014 From: yves.frederix+itk at gmail.com (Yves Frederix) Date: Mon, 18 Aug 2014 16:30:36 +0200 Subject: [ITK] [ITK-dev] Problem with itkPCAShapeSignedDistanceFunction in multithreaded environment when using a 'dense' solver Message-ID: Hi all, I am writing you with a crash I encountered while experimenting with the GeodesicActiveContour image filter with shape guidance. Although I did not find the root cause of the problem, I did implement a small change which might be a useful contribution. Currently, the GeodesicActiveContourShapePriorLevelSetImageFilter is based on a SparseField solver. For my application, this was not very suitable and I implemented a version of this image filter based on a dense solver. After doing this, however, I consistently experienced a crash in the algorithm when more than one thread was used. After some debugging, I tracked down the problem to itkPCAShapeSignedDistanceFunction, which contains a smart pointer member variable which caused the crash in the multithreaded run. In particular, it seemed to me that the reference counting somehow got confused, and things went wrong. I did not feel comfortable enough to dig deeper into the root cause of the problem, but I did do a simple fix to the itkPCAShapeSignedDistanceFunction code that avoids the problem, which I would like to share (see attach). Basically, I replaced the problematic reference counting member variable by a raw pointer, so that during iteration no reference counting takes place. In this particular case, I think that this change does not impose any risks as there is no issue with ownership or life time management. I am unsure if this mailing list is the best or correct medium to report this, so if not, please point me to the right direction. If somebody would be interested in looking at the root cause of this issue, I should be able to provide some code to reproduce the crash. Just let me know. Best regards, Yves -------------- next part -------------- A non-text attachment was scrubbed... Name: fix.patch Type: application/octet-stream Size: 2277 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 mtaquet at gmail.com Mon Aug 18 10:46:02 2014 From: mtaquet at gmail.com (Maxime Taquet) Date: Mon, 18 Aug 2014 16:46:02 +0200 Subject: [ITK] Create an itk transform file from a vector image In-Reply-To: References: <09BF8708-9EAE-4057-865F-5AE12D74CB7F@gmail.com> Message-ID: Thank you, Matt! For the record, here is the piece of code that solved my problem (it creates a transform named "transform" that contains the deformation field contained in ?myfield.nrrd"): // Read the input vector image typedef itk::Image::OutputVectorType, 3> FieldImageType; FieldImageType::Pointer fieldImage; itk::ImageFileReader::Pointer fieldReader = itk::ImageFileReader::New(); std::string myFieldFileName = "myfield.nrrd"; fieldReader->SetFileName(myFieldFileName); fieldReader->Update(); fieldImage = fieldReader->GetOutput(); // Define a transform from the field itk::DisplacementFieldTransform::Pointer transform = itk::DisplacementFieldTransform::New(); transform->SetDisplacementField(fieldImage.GetPointer()); -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Mon Aug 18 11:01:57 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Mon, 18 Aug 2014 17:01:57 +0200 Subject: [ITK] [ITK-users] TileImageFilter SideBySide In-Reply-To: References: , Message-ID: Hi Going the way described in the CreateVolume example is the way to go. Why did you uncomment the DisconnectPipeline() call and Update() call in the for loop ? They need to stay there, else you will always use the last image. That?s why you see the same image, the single update call will be triggered at the end of the script and read only one image. You don?t need to call tileFilter->Update(), you can remove this line. The writer->Update() will take care of the pipeline update. As a bonus, you may wrap your writer->Update() call, to fetch errors at the end of the pipeline: try { writer->Update(); } catch( itk::ExceptionObject & error ) { std::cerr << "Error: " << error << std::endl; return EXIT_FAILURE; } I made a little Python prototype, the syntax is a little bit different than in C++ but it gives you the main idea. Michka On 18 ao?t 2014, at 16:05, Dan Mercik wrote: > Good Morning, > > > > The demonstration you showed me works great, however if I wanted to do 20 images that would take some time. So, I tried doing a for loop which didn't work exactly how I wanted it to work. I would like the program to take any amount of images and output them side by side , any ideas? The attachment shows the for loop I used similar to TileImageFilter CreateVolume example however when I use it for some odd reason only one image is being display side by side multiple times. > > > > Daniel Mercik > > Computer Science Major > > Service Desk Technician > > Thomas College > > ________________________________ > From: Michka Popoff > Sent: Wednesday, August 13, 2014 2:32 AM > To: Dan Mercik > Cc: ITK Mailing List; community at itk.org > Subject: Re: [ITK-users] TileImageFilter SideBySide > > Hi > > > Moving this mail to the new community mailing list > > > For your problem, you should use the setLayout method [1] > > > For 4 images, that would be: > > > > itk::FixedArray< unsigned int, 2 > layout; > > layout[0] = 4; > layout[1] = 0; > > > Michka > > > [1] http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_SideBySide > > On 13 ao?t 2014, at 01:06, Dan Mercik > wrote: > > Good Afternoon, > > > > I want to know if it's possible to have more than two image be side by side vertically? If so what would I have to change in the algorithm, would I have to make a loop for the amount of input images? Any help would be greatly appreciative. > > > > Daniel Mercik > > Computer Science Major > > Service Desk Technician > > Thomas College > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 -------------- A non-text attachment was scrubbed... Name: tiling.py Type: text/x-python-script Size: 881 bytes Desc: not available URL: -------------- 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 jan.bergmeier at imes.uni-hannover.de Mon Aug 18 11:20:48 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Mon, 18 Aug 2014 08:20:48 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation Message-ID: <1408375248616-7586081.post@n2.nabble.com> Hello, I want to perform a registration between two images without any transformation or optimization. I like to use the itk::MutualInformationImageToImageMetric. As I understand the itk metric, you have to use a transformation, an optimizer, an interpolator and so on. I want to compare one image to a set of images with mutual information as metric. So basically, I like to use the GetValue() method, without giving any parameters to it. Is there a way to do that, or another way to get just one mutual information value between two images? Thanks in advance, Jan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081.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 b.haghighi at yahoo.com Mon Aug 18 11:55:47 2014 From: b.haghighi at yahoo.com (Babak Haghighi) Date: Mon, 18 Aug 2014 08:55:47 -0700 Subject: [ITK] Change the axis of a DICOM image Message-ID: <1408377347.24864.YahooMailNeo@web140503.mail.bf1.yahoo.com> Hi, I converted a file with .img extension to a DICOM image via "ImageReadDicomSeriesWrite.cxx". After that I tried to open the DICOM images in VTK or Apollo software but I encountered a problem with axis a the DICOM image. My question is how I can change the axis of a DICOM image? Thank you. Babak -------------- next part -------------- An HTML attachment was scrubbed... URL: From anton.delehony at gmail.com Mon Aug 18 22:37:22 2014 From: anton.delehony at gmail.com (Anton Delehony) Date: Mon, 18 Aug 2014 22:37:22 -0400 Subject: [ITK] [ITK-users] Deformation Field Modulation Message-ID: Hello, I have a general image processing question that I hope I can get some guidance from more experienced researchers. My data is composed of two 3d MRI volumes taken at end-inhale and end-exhale. I do non-rigid registration (demons) to estimate the overall transformation field between the two volumes. Then, I also have dynamic 2D slices that are taken continuously throughout the breathing cycle. I would like to "modulate" the overall field measured from registration by the measured 2D planes. Any suggestions? -------------- 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 Aug 19 00:31:19 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 19 Aug 2014 00:31:19 -0400 Subject: [ITK] [ITK-users] Question About Buffers In-Reply-To: References: Message-ID: Hi Harsh, Yes, you can use ImportImageFilter [1] as in this example [2]. Hope this helps, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1ImportImageFilter.html [2] http://www.itk.org/Doxygen/html/DataRepresentation_2Image_2Image5_8cxx-example.html#_a1 On Mon, Aug 18, 2014 at 10:01 AM, Harsh Shah wrote: > Hello, > > I wanted to know if itk had any resources that would allow me to set the > value of an itk::Image m_buffer to a buffer I read in from my camera. If > you could point me in the direction of a good example, I would appreciate > 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://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 grothausmann.roman at mh-hannover.de Wed Aug 20 03:37:40 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Wed, 20 Aug 2014 09:37:40 +0200 Subject: [ITK] [ITK-users] TileImageFilter SideBySide In-Reply-To: References: , Message-ID: <53F45044.8010702@mh-hannover.de> Hi As this is a nice case of a question I have always had: In the case of the c++ example (http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume) InputImageType::Pointer inputImageTile; for (int i = 1; i < argc - 1; i++) { reader->SetFileName( argv[i] ); reader->UpdateLargestPossibleRegion(); inputImageTile = reader->GetOutput(); inputImageTile->DisconnectPipeline(); tiler->SetInput( inputImageNumber++, inputImageTile ); } When the reader output is assigned to inputImageTile, I thought this is only a pointer assignment and not a full copy of the image. However, I wonder, what makes sure the address space in the memory is not used (partially) again for the next image read? Is there a full copy created "behind the scene" at any point in the code? Or does the reader remember the address space of former images read even though DisconnectPipeline was called? Thanks for any explanations Roman On 18/08/14 17:01, Michka Popoff wrote: > Hi > > Going the way described in the CreateVolume example is the way to go. > > Why did you uncomment the DisconnectPipeline() call and Update() call in the for > loop ? They need to stay there, else you will always use the last image. > That?s why you see the same image, the single update call will be triggered at > the end of the script and read only one image. > > You don?t need to call tileFilter->Update(), you can remove this line. The > writer->Update() will take care of the pipeline update. > As a bonus, you may wrap your writer->Update() call, to fetch errors at the end > of the pipeline: > > try > { > writer->Update(); > } > catch( itk::ExceptionObject & error ) > { > std::cerr << "Error: " << error << std::endl; > return EXIT_FAILURE; > } > > I made a little Python prototype, the syntax is a little bit different than in > C++ but it gives you the main idea. > > Michka > > > > > On 18 ao?t 2014, at 16:05, Dan Mercik > wrote: > >> Good Morning, >> >> >> >> The demonstration you showed me works great, however if >> I wanted to do 20 images that would take some time. So, I tried doing a for >> loop which didn't work exactly how I wanted it to work. I would like the >> program to take any amount of images and output them side by side , any ideas? >> The attachment shows the for loop I used similar to TileImageFilter >> CreateVolume example however when I use it for some odd reason only one image >> is being display side by side multiple times. >> >> >> >> Daniel Mercik >> >> Computer Science Major >> >> Service Desk Technician >> >> Thomas College >> >> ________________________________ >> From: Michka Popoff > >> Sent: Wednesday, August 13, 2014 2:32 AM >> To: Dan Mercik >> Cc: ITK Mailing List;community at itk.org >> Subject: Re: [ITK-users] TileImageFilter SideBySide >> >> Hi >> >> >> Moving this mail to the new community mailing list >> >> >> For your problem, you should use the setLayout method [1] >> >> >> For 4 images, that would be: >> >> >> >> itk::FixedArray< unsigned int, 2 > layout; >> >> layout[0] = 4; >> layout[1] = 0; >> >> >> Michka >> >> >> [1] >> http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_SideBySide >> >> On 13 ao?t 2014, at 01:06, Dan Mercik > > wrote: >> >> Good Afternoon, >> >> >> >> I want to know if it's possible to have more than two image >> be side by side vertically? If so what would I have to change in the >> algorithm, would I have to make a loop for the amount of input images? Any >> help would be greatly appreciative. >> >> >> >> Daniel Mercik >> >> Computer Science Major >> >> Service Desk Technician >> >> Thomas College >> _____________________________________ >> Powered bywww.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 > -- 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 millerjv at gmail.com Wed Aug 20 07:16:59 2014 From: millerjv at gmail.com (Jim Miller) Date: Wed, 20 Aug 2014 07:16:59 -0400 Subject: [ITK] [ITK-users] TileImageFilter SideBySide In-Reply-To: <53F45044.8010702@mh-hannover.de> References: <53F45044.8010702@mh-hannover.de> Message-ID: <2D7CC2D6-CD96-4778-8DFA-86382739FA01@gmail.com> Once DisconnectPipeline is called the Image object is completely disassociated with the source filter (in this case a reader). The source filter then constructs a new a Image object to serve as its output. For instance, if you call GetOutput() after calling DisconnectPipeline, you will get a different Image object than one retrieved before DisconnectPipeline is called. The pixel buffer is managed by the Image object, not the source/filter/reader. So after a call to DisconnectPipeline(), the reader has a new Image object as it its output and that new Image object has a distinct pixel buffer. Initially this pixel buffer is not even allocated. The act of reading the next image causes the reader to request the Image object to allocate the pixel buffer to an appropriate size. If DisconnectPipeline() was not called and the reader was asked to read another image of the same size or smaller, its output Image object would already have an allocated pixel buffer. The reader would still ask the Image object to allocate a pixel buffer of the appropriate size. But in this case, the Image object would recognize that it already has a block of memory of sufficient size and not do another allocation. Jim > On Aug 20, 2014, at 3:37 AM, "Dr. Roman Grothausmann" wrote: > > Hi > > > As this is a nice case of a question I have always had: In the case of the c++ example (http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume) > > InputImageType::Pointer inputImageTile; > > for (int i = 1; i < argc - 1; i++) > { > reader->SetFileName( argv[i] ); > reader->UpdateLargestPossibleRegion(); > inputImageTile = reader->GetOutput(); > inputImageTile->DisconnectPipeline(); > tiler->SetInput( inputImageNumber++, inputImageTile ); > } > > When the reader output is assigned to inputImageTile, I thought this is only a pointer assignment and not a full copy of the image. However, I wonder, what makes sure the address space in the memory is not used (partially) again for the next image read? Is there a full copy created "behind the scene" at any point in the code? Or does the reader remember the address space of former images read even though DisconnectPipeline was called? > > Thanks for any explanations > Roman > >> On 18/08/14 17:01, Michka Popoff wrote: >> Hi >> >> Going the way described in the CreateVolume example is the way to go. >> >> Why did you uncomment the DisconnectPipeline() call and Update() call in the for >> loop ? They need to stay there, else you will always use the last image. >> That?s why you see the same image, the single update call will be triggered at >> the end of the script and read only one image. >> >> You don?t need to call tileFilter->Update(), you can remove this line. The >> writer->Update() will take care of the pipeline update. >> As a bonus, you may wrap your writer->Update() call, to fetch errors at the end >> of the pipeline: >> >> try >> { >> writer->Update(); >> } >> catch( itk::ExceptionObject & error ) >> { >> std::cerr << "Error: " << error << std::endl; >> return EXIT_FAILURE; >> } >> >> I made a little Python prototype, the syntax is a little bit different than in >> C++ but it gives you the main idea. >> >> Michka >> >> >> >> >> On 18 ao?t 2014, at 16:05, Dan Mercik > > wrote: >> >>> Good Morning, >>> >>> >>> >>> The demonstration you showed me works great, however if >>> I wanted to do 20 images that would take some time. So, I tried doing a for >>> loop which didn't work exactly how I wanted it to work. I would like the >>> program to take any amount of images and output them side by side , any ideas? >>> The attachment shows the for loop I used similar to TileImageFilter >>> CreateVolume example however when I use it for some odd reason only one image >>> is being display side by side multiple times. >>> >>> >>> >>> Daniel Mercik >>> >>> Computer Science Major >>> >>> Service Desk Technician >>> >>> Thomas College >>> >>> ________________________________ >>> From: Michka Popoff > >>> Sent: Wednesday, August 13, 2014 2:32 AM >>> To: Dan Mercik >>> Cc: ITK Mailing List;community at itk.org >>> Subject: Re: [ITK-users] TileImageFilter SideBySide >>> >>> Hi >>> >>> >>> Moving this mail to the new community mailing list >>> >>> >>> For your problem, you should use the setLayout method [1] >>> >>> >>> For 4 images, that would be: >>> >>> >>> >>> itk::FixedArray< unsigned int, 2 > layout; >>> >>> layout[0] = 4; >>> layout[1] = 0; >>> >>> >>> Michka >>> >>> >>> [1] >>> http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_SideBySide >>> >>> On 13 ao?t 2014, at 01:06, Dan Mercik >> > wrote: >>> >>> Good Afternoon, >>> >>> >>> >>> I want to know if it's possible to have more than two image >>> be side by side vertically? If so what would I have to change in the >>> algorithm, would I have to make a loop for the amount of input images? Any >>> help would be greatly appreciative. >>> >>> >>> >>> Daniel Mercik >>> >>> Computer Science Major >>> >>> Service Desk Technician >>> >>> Thomas College >>> _____________________________________ >>> Powered bywww.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 > > -- > 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 grothausmann.roman at mh-hannover.de Wed Aug 20 07:59:40 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Wed, 20 Aug 2014 13:59:40 +0200 Subject: [ITK] [ITK-users] TileImageFilter SideBySide In-Reply-To: <2D7CC2D6-CD96-4778-8DFA-86382739FA01@gmail.com> References: <53F45044.8010702@mh-hannover.de> <2D7CC2D6-CD96-4778-8DFA-86382739FA01@gmail.com> Message-ID: <53F48DAC.5040005@mh-hannover.de> Thanks Jim for the great explanation, I understand now. So in simple CLI programs where an ITK pipeline is only updated once by the final writer: In order to limit maximum memory used during execution, would it be best to always store the output of a filter in the pipeline in an image object and then call DisconnectPipeline (and setting ReleaseDataFlagOn for the filter)? Many thanks again for the answer. Roman On 20/08/14 13:16, Jim Miller wrote: > Once DisconnectPipeline is called the Image object is completely > disassociated with the source filter (in this case a reader). The source > filter then constructs a new a Image object to serve as its output. For > instance, if you call GetOutput() after calling DisconnectPipeline, you will > get a different Image object than one retrieved before DisconnectPipeline is > called. > > The pixel buffer is managed by the Image object, not the > source/filter/reader. So after a call to DisconnectPipeline(), the reader has > a new Image object as it its output and that new Image object has a distinct > pixel buffer. Initially this pixel buffer is not even allocated. The act of > reading the next image causes the reader to request the Image object to > allocate the pixel buffer to an appropriate size. > > If DisconnectPipeline() was not called and the reader was asked to read > another image of the same size or smaller, its output Image object would > already have an allocated pixel buffer. The reader would still ask the Image > object to allocate a pixel buffer of the appropriate size. But in this case, > the Image object would recognize that it already has a block of memory of > sufficient size and not do another allocation. > > Jim > >> On Aug 20, 2014, at 3:37 AM, "Dr. Roman Grothausmann" >> wrote: >> >> Hi >> >> >> As this is a nice case of a question I have always had: In the case of the >> c++ example >> (http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume) >> >> >> InputImageType::Pointer inputImageTile; >> >> for (int i = 1; i < argc - 1; i++) { reader->SetFileName( argv[i] ); >> reader->UpdateLargestPossibleRegion(); inputImageTile = >> reader->GetOutput(); inputImageTile->DisconnectPipeline(); tiler->SetInput( >> inputImageNumber++, inputImageTile ); } >> >> When the reader output is assigned to inputImageTile, I thought this is >> only a pointer assignment and not a full copy of the image. However, I >> wonder, what makes sure the address space in the memory is not used >> (partially) again for the next image read? Is there a full copy created >> "behind the scene" at any point in the code? Or does the reader remember >> the address space of former images read even though DisconnectPipeline was >> called? >> >> Thanks for any explanations Roman >> >>> On 18/08/14 17:01, Michka Popoff wrote: Hi >>> >>> Going the way described in the CreateVolume example is the way to go. >>> >>> Why did you uncomment the DisconnectPipeline() call and Update() call in >>> the for loop ? They need to stay there, else you will always use the last >>> image. That?s why you see the same image, the single update call will be >>> triggered at the end of the script and read only one image. >>> >>> You don?t need to call tileFilter->Update(), you can remove this line. >>> The writer->Update() will take care of the pipeline update. As a bonus, >>> you may wrap your writer->Update() call, to fetch errors at the end of >>> the pipeline: >>> >>> try { writer->Update(); } catch( itk::ExceptionObject & error ) { >>> std::cerr << "Error: " << error << std::endl; return EXIT_FAILURE; } >>> >>> I made a little Python prototype, the syntax is a little bit different >>> than in C++ but it gives you the main idea. >>> >>> Michka >>> >>> >>> >>> >>> On 18 ao?t 2014, at 16:05, Dan Mercik >> > wrote: >>> >>>> Good Morning, >>>> >>>> >>>> >>>> The demonstration you showed me works great, however if I wanted to do >>>> 20 images that would take some time. So, I tried doing a for loop >>>> which didn't work exactly how I wanted it to work. I would like the >>>> program to take any amount of images and output them side by side , any >>>> ideas? The attachment shows the for loop I used similar to >>>> TileImageFilter CreateVolume example however when I use it for some odd >>>> reason only one image is being display side by side multiple times. >>>> >>>> >>>> >>>> Daniel Mercik >>>> >>>> Computer Science Major >>>> >>>> Service Desk Technician >>>> >>>> Thomas College >>>> >>>> ________________________________ From: Michka Popoff >>>> > Sent: >>>> Wednesday, August 13, 2014 2:32 AM To: Dan Mercik Cc: ITK Mailing >>>> List;community at itk.org Subject: Re: >>>> [ITK-users] TileImageFilter SideBySide >>>> >>>> Hi >>>> >>>> >>>> Moving this mail to the new community mailing list >>>> >>>> >>>> For your problem, you should use the setLayout method [1] >>>> >>>> >>>> For 4 images, that would be: >>>> >>>> >>>> >>>> itk::FixedArray< unsigned int, 2 > layout; >>>> >>>> layout[0] = 4; layout[1] = 0; >>>> >>>> >>>> Michka >>>> >>>> >>>> [1] >>>> http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_SideBySide >>>> >>>> >>>> On 13 ao?t 2014, at 01:06, Dan Mercik >>> > wrote: >>>> >>>> Good Afternoon, >>>> >>>> >>>> >>>> I want to know if it's possible to have more than two image be side by >>>> side vertically? If so what would I have to change in the algorithm, >>>> would I have to make a loop for the amount of input images? Any help >>>> would be greatly appreciative. >>>> >>>> >>>> >>>> Daniel Mercik >>>> >>>> Computer Science Major >>>> >>>> Service Desk Technician >>>> >>>> Thomas College _____________________________________ Powered >>>> bywww.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the 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 >> >> -- 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 _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 Wed Aug 20 10:03:32 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Wed, 20 Aug 2014 16:03:32 +0200 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> <305E1509-8EF7-4770-9236-3D639B9BF155@gmail.com> Message-ID: <8E777677-5A6C-47A1-9ED6-030C85AB48B5@gmail.com> Hi, I have just submitted this patch for the documentation, can you please review it? http://review.source.kitware.com/#/c/16755/ I was running this code on Mac i5 with 4GB RAM, with both ITK and this program compiled in Debug? Best, Arnaud On Aug 7, 2014, at 5:20 PM, Mallikarjun K wrote: > Hi Arnaud, > > Thanks,Can you please tell me your machine confuguration. I am running 4GB RAM,i3 on windows7. > I have downloaded your project and tried to execute it and it is still the same problem Which I was facing earlier.Any suggestions ..... > > thank you > > > On Thu, Aug 7, 2014 at 8:10 PM, Arnaud Gelas wrote: > It takes 29s on my machine in debug to run 5 iterations with Delaunay conforming set to true > > https://gist.github.com/arnaudgelas/0f20ebdaf53956f79997 > > > On Aug 7, 2014, at 3:45 PM, Mallikarjun K wrote: > >> File path is correct.if it is '\'(backward slash) we have to add "D:\\" .since I used '/' it's not required to add "//". >> >> please find the attached .vtk file >> >> Thanks >> >> >> On Thu, Aug 7, 2014 at 7:01 PM, Arnaud Gelas wrote: >> Shouldn't it be D://temp.vtk ? Isn't it missing one '/' ? >> >> Can you send this vtk file? >> >> >> On Aug 7, 2014, at 3:23 PM, Mallikarjun K wrote: >> >>> Hi Arnaud, >>> >>> Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ? >>> >>> ///// >>> #include >>> #include >>> >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include "itkMesh.h" >>> #include "itkQuadEdgeMesh.h" >>> #include "itkQuadEdgeMeshTraits.h" >>> #include "itkSmoothingQuadEdgeMeshFilter.h" >>> #include "vtkSTLWriter.h" >>> #include >>> >>> int main() >>> { >>> std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K >>> >>> typedef itk::QuadEdgeMeshTraits qetraits; >>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>> >>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; >>> >>> vtkSmartPointer polyDatawriter=vtkSmartPointer::New(); >>> vtkSmartPointer polyDatareader=vtkSmartPointer::New(); >>> >>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>> >>> /* polyDatareader->SetFileName(Inputfilename.c_str() ); >>> polyDatareader->ReleaseDataFlagOn(); >>> polyDatareader->Update();*/ >>> >>> /*vtkSmartPointer triangleFilter = >>> vtkSmartPointer::New(); >>> triangleFilter->SetInput(polyDatareader->GetOutput()); >>> triangleFilter->Update();*/ >>> >>> // >>> /* vtkSmartPointer clean = vtkSmartPointer::New(); >>> #if (VTK_MAJOR_VERSION < 6) >>> clean->SetInput(triangleFilter->GetOutput() ); >>> #else >>> clean->SetInputData(triangleFilter->GetOutput() ); >>> #endif >>> >>> clean->ConvertPolysToLinesOff(); >>> clean->ConvertLinesToPointsOff(); >>> clean->Update(); >>> >>> std::string Inputfilename2="D:/cleaned.vtk";*/ >>> >>> //// >>> /*polyDatawriter->SetInput(clean->GetOutput()); >>> polyDatawriter->SetFileName(Inputfilename2.c_str()); >>> polyDatawriter->ReleaseDataFlagOn(); >>> polyDatawriter->Write(); */ >>> >>> typedef itk::MeshFileReader MeshReaderType; >>> MeshReaderType::Pointer Meshreader = MeshReaderType::New(); >>> Meshreader->SetFileName(Inputfilename.c_str( )); >>> Meshreader->Update(); >>> >>> /*MeshType::Pointer mesh = Meshreader->GetOutput(); >>> mesh->DisconnectPipeline();*/ >>> >>> >>> QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); >>> QEMeshSmoother->SetNumberOfIterations(1 ); >>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>> QEMeshSmoother->SetDelaunayConforming(true); >>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>> >>> QEMeshSmoother->ReleaseDataFlagOn(); >>> >>> QEMeshSmoother->Update(); >>> >>> std::string Outputfilename="D:/tempOut.vtk"; >>> >>> typedef itk::MeshFileWriter MeshWriterType; >>> MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); >>> Meshwriter->SetFileName(Outputfilename.c_str( )); >>> Meshwriter->SetInput(QEMeshSmoother->GetOutput()); >>> Meshwriter->Update(); >>> >>> polyDatareader->SetFileName(Outputfilename.c_str() ); >>> polyDatareader->ReleaseDataFlagOn(); >>> polyDatareader->Update(); >>> >>> vtkSmartPointer stlWriter=vtkSmartPointer::New(); >>> >>> stlWriter->SetInput( polyDatareader->GetOutput()); >>> stlWriter->SetFileName("D:/QEoutput.stl"); >>> stlWriter->SetFileTypeToASCII(); >>> stlWriter->Write(); >>> >>> //Here it stops and taking long time >>> >>> return 0; >>> >>> >>> } >>> //// >>> >>> >>> >>> On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K wrote: >>> Hi Arnaud, >>> >>> Thanks for your reply and valuable suggestions. >>> >>> Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF. >>> >>> Thank you >>> >>> >>> On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas wrote: >>> Hi Malik, >>> >>> First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?). >>> >>> Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal). >>> >>> At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages? >>> How large is your input mesh (number of points)? >>> >>> You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement. >>> Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing). >>> >>> HTH >>> Arnaud >>> >>> >>> On Aug 6, 2014, at 10:42 AM, Mallikarjun K wrote: >>> >>>> Hi All, >>>> >>>> Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . >>>> >>>> >>>> //// >>>> >>>> typedef itk::QuadEdgeMeshTraits qetraits; >>>> >>>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>> >>>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>>> >>>> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >>>> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >>>> >>>> //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); >>>> VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); >>>> >>>> VtkToItkReader->SetFileName("abc.vtk"); >>>> VtkToItkReader->Update(); >>>> >>>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>> SmoothingQuadEdgeMeshFilter; >>>> >>>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>>> >>>> >>>> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >>>> QEMeshSmoother->SetNumberOfIterations(5 ); >>>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>> QEMeshSmoother->SetDelaunayConforming(true ); >>>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>> >>>> QEMeshSmoother->Update(); >>>> >>>> //// >>>> >>>> >>>> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: >>>> Thanks Bill for your answer. >>>> >>>> The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. >>>> >>>> Thanks for your help >>>> >>>> >>>> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: >>>> If you have it in vtk, I suggest using the vtk pipeline to smooth the data. >>>> >>>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K wrote: >>>> > Hi Bill, >>>> > Thanks for the replay. >>>> > >>>> > Yes,I built both ITK and my app with Release ,I forgot to mention it in the >>>> > previous post.Actually the data set is the output of >>>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved >>>> > this marching cube's output as .vtk file and read it using >>>> > itkVTKPolyDataReader and then I am giving this reader's output to >>>> > itkSmoothingQuadEdgeMeshFilter's input. >>>> > >>>> > I checked the execution time of each step in the pipeline ,after >>>> > SmothingQEMeshFilter has got it's input ,it is taking time to process the >>>> > data. >>>> > >>>> > Thank you >>>> > >>>> > >>>> > >>>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen >>>> > wrote: >>>> >> >>>> >> First, make sure you are building ITK and your app with Release. A >>>> >> Debug build can be 10-50 times slower. >>>> >> >>>> >> >>>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K >>>> >> wrote: >>>> >> > Hi All, >>>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>>> >> > smoothing.This >>>> >> > filter is giving good results what I expected but taking more execution >>>> >> > time.can any one suggest me to reduce the execution time( multi >>>> >> > threading >>>> >> > or any parameters to add/remove )? >>>> >> > >>>> >> > Below is the code snippet >>>> >> > /////// >>>> >> > typedef itk::QuadEdgeMeshTraits>>> >> > > >>>> >> > qetraits; >>>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>> >> > >>>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>>> >> > >>>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>>> >> > >>>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>> >> > SmoothingQuadEdgeMeshFilter; >>>> >> > >>>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>>> >> > SmoothingQuadEdgeMeshFilter::New(); >>>> >> > >>>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>> >> > QEMeshSmoother->Update(); >>>> >> > //// >>>> >> > >>>> >> > -- >>>> >> > Regards: >>>> >> > Mallik >>>> >> > >>>> >> > >>>> >> > _____________________________________ >>>> >> > Powered by www.kitware.com >>>> >> > >>>> >> > Visit other Kitware open-source projects at >>>> >> > http://www.kitware.com/opensource/opensource.html >>>> >> > >>>> >> > Kitware offers ITK Training Courses, for more information visit: >>>> >> > http://www.kitware.com/products/protraining.php >>>> >> > >>>> >> > Please keep messages on-topic and check the 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 >>>> > >>>> > >>>> > >>>> > >>>> > -- >>>> > Regards: >>>> > Mallik >>>> > >>>> >>>> >>>> >>>> -- >>>> Unpaid intern in BillsBasement at noware dot com >>>> >>>> >>>> >>>> -- >>>> Regards: >>>> Mallik >>>> >>>> >>>> >>>> >>>> -- >>>> Regards: >>>> Mallik >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >>> >>> >>> -- >>> Regards: >>> Mallik >>> >>> >>> >>> >>> -- >>> Regards: >>> Mallik >>> >> >> >> >> >> -- >> Regards: >> Mallik >> >> > > > > > -- > Regards: > Mallik > -------------- 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 arnaudgelas at gmail.com Wed Aug 20 10:28:58 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Wed, 20 Aug 2014 16:28:58 +0200 Subject: [ITK] [ITK-users] combining N images Message-ID: Hi all, I am trying to combine N images together into a single image of the same dimension. These N images have the same direction, but can have different origin, start index, spacing, size (there is no overlap). Then gaps in between images would be filled with a given constant value. Is there such a filter? or assuming I have already resampled all images to a common ground, is there a filter to do this? 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 joseignacio.prieto at gmail.com Wed Aug 20 11:00:51 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Wed, 20 Aug 2014 11:00:51 -0400 Subject: [ITK] [ITK-users] Composite Filter with variable stdvector of filters inside Message-ID: Hi all, I am trying to create a composite filter for a 4D dataset that will use different cascaded 2D filters on the inside. For this, I have created a double std vector that holds all the 2D filters. I have also set some param setters for this filters (that perform a double for inside, setting the param to each filter and then calling modified() on the outside one). I have another method called UpdateNumberofFilters, that depending on 2 ints (num of Z slices, num of T timeframes) will push back more filters to the 2D array of filters. My problem is that I dont know which function should call the UpdateNumofFilters. It should be done before the setters but after the constructor and after setting those two ints. I want to design it so that if I change a param after calling update I dont have to run the whole filter again, so I dont want it to be under the GenerateData() method. Thank you very much for your insights. Ignacio Prieto -- Ignacio Prieto Research Assistant Biomedical Imaging Center Pontificia Universida Catolica de Chile -------------- 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 mercikd at thomas.edu Wed Aug 20 11:48:43 2014 From: mercikd at thomas.edu (Dan Mercik) Date: Wed, 20 Aug 2014 15:48:43 +0000 Subject: [ITK] [ITK-users] Tiling Side by Side Question Message-ID: <5a78d43e709547e49519d34f2e74838e@T9.tcnet.thomas.edu> Hey, In my program I'm using a If Else statement to decide which direction I want my images to tile. So far, the If statement works if I want my images to tile horizontally, but It not working vertically. In my code if I input 1 my images would tile horizontally, anything input other than 1 should display my images vertically. Do anyone happen to see the problem in my if Else statement? Daniel Mercik Computer Science Major Service Desk Technician Thomas College -------------- next part -------------- A non-text attachment was scrubbed... Name: sidebyside tiling.JPG Type: image/jpeg Size: 67308 bytes Desc: sidebyside tiling.JPG 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 arnaudgelas at gmail.com Wed Aug 20 11:51:19 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Wed, 20 Aug 2014 17:51:19 +0200 Subject: [ITK] [ITK-users] combining N images In-Reply-To: References: Message-ID: Hi, I do not want to add images, it is more something like pasting but I do not know in advance what would be the output image size, but it would be at least the bounding box of all images... Arnaud On Wednesday, August 20, 2014, Mordig, Maximilian Oliver < maximilian_oliver.mordig at roche.com> wrote: > Once you have resampled all images, you can use the itk AddFilter. > > > On Wed, Aug 20, 2014 at 4:28 PM, Arnaud Gelas > wrote: > >> Hi all, >> >> I am trying to combine N images together into a single image of the same >> dimension. >> >> These N images have the same direction, but can have different origin, >> start index, spacing, size (there is no overlap). Then gaps in between >> images would be filled with a given constant value. >> >> Is there such a filter? or assuming I have already resampled all images >> to a common ground, is there a filter to do this? >> >> 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 >> >> _______________________________________________ >> 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 brad at lowekamp.net Wed Aug 20 12:53:18 2014 From: brad at lowekamp.net (Bradley Lowekamp) Date: Wed, 20 Aug 2014 12:53:18 -0400 Subject: [ITK] [ITK-users] combining N images In-Reply-To: References: Message-ID: <41BB5486-E3F6-4196-8E58-C59F514C8800@mail.nih.gov> This may be of some use: https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkBoundingRegionImageSinc.h > On Aug 20, 2014, at 11:51 AM, Arnaud Gelas wrote: > > Hi, > > I do not want to add images, it is more something like pasting but I do not know in advance what would be the output image size, but it would be at least the bounding box of all images... > > Arnaud > >> On Wednesday, August 20, 2014, Mordig, Maximilian Oliver wrote: >> Once you have resampled all images, you can use the itk AddFilter. >> >> >>> On Wed, Aug 20, 2014 at 4:28 PM, Arnaud Gelas wrote: >>> Hi all, >>> >>> I am trying to combine N images together into a single image of the same dimension. >>> >>> These N images have the same direction, but can have different origin, start index, spacing, size (there is no overlap). Then gaps in between images would be filled with a given constant value. >>> >>> Is there such a filter? or assuming I have already resampled all images to a common ground, is there a filter to do this? >>> >>> 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 >>> >>> _______________________________________________ >>> 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 > _______________________________________________ > 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 yxp233 at postech.ac.kr Wed Aug 20 13:07:38 2014 From: yxp233 at postech.ac.kr (Xiaopeng Yang) Date: Thu, 21 Aug 2014 02:07:38 +0900 Subject: [ITK] [ITK-users] Compiling ITK for GPU support In-Reply-To: <1405141094987070.021539.ptmail03@ptmail03> References: <1405141094987070.021539.ptmail03@ptmail03> Message-ID: <023f01cfbc99$3ecc2c60$bc648520$@ac.kr> Hello, I would like to develop GPU based program for image processing, so I tried to compile ITK with GPU support. My question is whether I shall install 3rd party program like CUDDA first? Thank you. Xiaopeng -------------- 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 Thu Aug 21 03:30:02 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Thu, 21 Aug 2014 09:30:02 +0200 Subject: [ITK] [ITK-users] Tiling Side by Side Question In-Reply-To: <5a78d43e709547e49519d34f2e74838e@T9.tcnet.thomas.edu> References: <5a78d43e709547e49519d34f2e74838e@T9.tcnet.thomas.edu> Message-ID: <53F59FFA.2070002@mh-hannover.de> Hm, haven't used that filter before but I'd think that you need to change layout[2] to layout[1]. On 20/08/14 17:48, Dan Mercik wrote: > Hey, > > > > In my program I'm using a If Else statement to decide which direction I want > my images to tile. So far, the If statement works if I want my images to tile > horizontally, but It not working vertically. In my code if I input 1 my > images would tile horizontally, anything input other than 1 should display my > images vertically. Do anyone happen to see the problem in my if Else > statement? > > > > > > Daniel Mercik > > Computer Science Major > > Service Desk Technician > > Thomas College > > > > _____________________________________ Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 Aug 21 03:37:31 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Thu, 21 Aug 2014 09:37:31 +0200 Subject: [ITK] [ITK-users] Tiling Side by Side Question In-Reply-To: <53F59FFA.2070002@mh-hannover.de> References: <5a78d43e709547e49519d34f2e74838e@T9.tcnet.thomas.edu> <53F59FFA.2070002@mh-hannover.de> Message-ID: <8BA6CC8C-BAFC-496A-8FA3-B2998B9745B6@gmail.com> Yes, layout[2] is for the third direction, when you do a stack. Do not set layout[2], as you set your FixedArray to be 2 dimensional. (else you should do itk::FixedArray< unsigned int, 3 > layout; So for vertical tiling it is: layout[0] = 0; layout[1] = i + 1; Michka On 21 ao?t 2014, at 09:30, Dr. Roman Grothausmann wrote: > Hm, haven't used that filter before but I'd think that you need to change layout[2] to layout[1]. > > On 20/08/14 17:48, Dan Mercik wrote: >> Hey, >> >> >> >> In my program I'm using a If Else statement to decide which direction I want >> my images to tile. So far, the If statement works if I want my images to tile >> horizontally, but It not working vertically. In my code if I input 1 my >> images would tile horizontally, anything input other than 1 should display my >> images vertically. Do anyone happen to see the problem in my if Else >> statement? >> >> >> >> >> >> Daniel Mercik >> >> Computer Science Major >> >> Service Desk Technician >> >> Thomas College >> >> >> >> _____________________________________ Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 yuetian926 at 163.com Thu Aug 21 04:55:17 2014 From: yuetian926 at 163.com (Yuetian Liu) Date: Thu, 21 Aug 2014 16:55:17 +0800 (CST) Subject: [ITK] [ITK-users] How to fusion the MR volume to the CT volume Message-ID: <40b48479.b227.147f7c6f61b.Coremail.yuetian926@163.com> Hi itkusers, Recently I want to fuse the MR volume to the CT volume, but I search the itk mailist. I haven;t known how to realise it. And there isn't example in the InsightSoftwareGuide-4.5.0.pdf and InsightSphinxExamplesPDF-4.5.0.pdf. So I want to ask how to fuse the MR volume to the CT volume by itk. Thank you for helping me! Best Yuetian -------------- 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 yuetian926 at 163.com Thu Aug 21 04:44:11 2014 From: yuetian926 at 163.com (Yuetian Liu) Date: Thu, 21 Aug 2014 16:44:11 +0800 (CST) Subject: [ITK] [ITK-users] How to fusion the MR volume to the CT volume Message-ID: <49b24f0c.ad8d.147f7bccdd9.Coremail.yuetian926@163.com> Hi itkusers, Recently I want to fuse the MR volume to the CT volume, but I search the itk mailist. I haven;t known how to realise it. And there isn't example in the InsightSoftwareGuide-4.5.0.pdf and InsightSphinxExamplesPDF-4.5.0.pdf. So I want to ask how to fuse the MR volume to the CT volume by itk. Thank you for helping me! Best Yuetian -------------- 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 arnaudgelas at gmail.com Thu Aug 21 06:47:17 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 21 Aug 2014 12:47:17 +0200 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> <305E1509-8EF7-4770-9236-3D639B9BF155@gmail.com> <8E777677-5A6C-47A1-9ED6-030C85AB48B5@gmail.com> Message-ID: Hi, As of now, there is no progress event on this filter, so it is normal nothing happened. I'll submit another patch for progress event later today. To review the patch, you need to create an account on gerrit: http://review.source.kitware.com Then you ca volunteer to the review patch, you can add comments, accept, refuse? Else once you are registered, you can send me an email and I will add you as a reviewer. Best, Arnaud On Aug 21, 2014, at 12:11 PM, Mallikarjun K wrote: > Hi, > I am trying observe the progressEvent by using AddObserver method of this filter but I couldn't. Could you check the below code once. > > And one more thing,Could you guide me what exactly I have to do to Review the patch you have submitted. > > Thank you > > > ///progress > > #include > #include > > #include > #include > #include > #include > #include "itkMesh.h" > #include "itkQuadEdgeMesh.h" > #include "itkQuadEdgeMeshTraits.h" > #include "itkSmoothingQuadEdgeMeshFilter.h" > #include "itkCommand.h" > > class MyCommand : public itk::Command > { > public: > itkNewMacro( MyCommand ); > > public: > > void Execute(itk::Object *caller, const itk::EventObject & event) > { > Execute( (const itk::Object *)caller, event); > } > > void Execute(const itk::Object * object, const itk::EventObject & event) > { > std::cout << "Command called." << std::endl; > > if( typeid( itk::ProgressEvent ) == typeid( event ) ) > { > ::itk::ProcessObject::ConstPointer process = > dynamic_cast< const itk::ProcessObject *>( object/*caller*/ ); > > const int value = static_cast(process->GetProgress() * 100 ); > std::cout<<"progress:"< > > > } > > } > > }; > > int main( int argc, char* argv[] ) > { > > /*if( argc < 2 ) > { > std::cerr << "Usage: " << std::endl; > std::cerr << argv[0] << " inputImageFile outputImageFile flipAxisX flipAxisY" << std::endl; > return EXIT_FAILURE; > }*/ > > std::string Inputfilename="D:\\temp.vtk"; > typedef itk::QuadEdgeMeshTraits qetraits; > typedef itk::QuadEdgeMesh< double, 3,qetraits > MeshType; > > itk::OnesMatrixCoefficients< MeshType > coeff0; > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; > > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); > > typedef itk::MeshFileReader MeshReaderType; > MeshReaderType::Pointer Meshreader = MeshReaderType::New(); > Meshreader->SetFileName( Inputfilename.c_str()/*argv[1]*/ ); > // Meshreader->Update(); > > > MyCommand::Pointer myCommand = MyCommand::New(); > > QEMeshSmoother->SetInput(Meshreader->GetOutput() ); > QEMeshSmoother->SetNumberOfIterations( 1 ); > QEMeshSmoother->SetRelaxationFactor( 0.5 ); > QEMeshSmoother->SetDelaunayConforming(true); > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); > QEMeshSmoother->AddObserver(itk::ProgressEvent, myCommand); > > // QEMeshSmoother->Update(); > std::string Outputfilename="D:\\tempOut2.vtk"; > > typedef itk::MeshFileWriter MeshWriterType; > MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); > Meshwriter->SetFileName(Outputfilename.c_str() /*argv[2]*/ ); > Meshwriter->SetInput(QEMeshSmoother->GetOutput()); > > try > { > Meshwriter->Update(); > } > catch( itk::ExceptionObject& e ) > { > std::cerr << e.what() << std::endl; > } > > return 0; > > > } > > > On Wed, Aug 20, 2014 at 7:33 PM, Arnaud Gelas wrote: > Hi, > > I have just submitted this patch for the documentation, can you please review it? > > http://review.source.kitware.com/#/c/16755/ > > I was running this code on Mac i5 with 4GB RAM, with both ITK and this program compiled in Debug? > > Best, > Arnaud > > On Aug 7, 2014, at 5:20 PM, Mallikarjun K wrote: > >> Hi Arnaud, >> >> Thanks,Can you please tell me your machine confuguration. I am running 4GB RAM,i3 on windows7. >> I have downloaded your project and tried to execute it and it is still the same problem Which I was facing earlier.Any suggestions ..... >> >> thank you >> >> >> On Thu, Aug 7, 2014 at 8:10 PM, Arnaud Gelas wrote: >> It takes 29s on my machine in debug to run 5 iterations with Delaunay conforming set to true >> >> https://gist.github.com/arnaudgelas/0f20ebdaf53956f79997 >> >> >> On Aug 7, 2014, at 3:45 PM, Mallikarjun K wrote: >> >>> File path is correct.if it is '\'(backward slash) we have to add "D:\\" .since I used '/' it's not required to add "//". >>> >>> please find the attached .vtk file >>> >>> Thanks >>> >>> >>> On Thu, Aug 7, 2014 at 7:01 PM, Arnaud Gelas wrote: >>> Shouldn't it be D://temp.vtk ? Isn't it missing one '/' ? >>> >>> Can you send this vtk file? >>> >>> >>> On Aug 7, 2014, at 3:23 PM, Mallikarjun K wrote: >>> >>>> Hi Arnaud, >>>> >>>> Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ? >>>> >>>> ///// >>>> #include >>>> #include >>>> >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include >>>> #include "itkMesh.h" >>>> #include "itkQuadEdgeMesh.h" >>>> #include "itkQuadEdgeMeshTraits.h" >>>> #include "itkSmoothingQuadEdgeMeshFilter.h" >>>> #include "vtkSTLWriter.h" >>>> #include >>>> >>>> int main() >>>> { >>>> std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K >>>> >>>> typedef itk::QuadEdgeMeshTraits qetraits; >>>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>> >>>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; >>>> >>>> vtkSmartPointer polyDatawriter=vtkSmartPointer::New(); >>>> vtkSmartPointer polyDatareader=vtkSmartPointer::New(); >>>> >>>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>>> >>>> /* polyDatareader->SetFileName(Inputfilename.c_str() ); >>>> polyDatareader->ReleaseDataFlagOn(); >>>> polyDatareader->Update();*/ >>>> >>>> /*vtkSmartPointer triangleFilter = >>>> vtkSmartPointer::New(); >>>> triangleFilter->SetInput(polyDatareader->GetOutput()); >>>> triangleFilter->Update();*/ >>>> >>>> // >>>> /* vtkSmartPointer clean = vtkSmartPointer::New(); >>>> #if (VTK_MAJOR_VERSION < 6) >>>> clean->SetInput(triangleFilter->GetOutput() ); >>>> #else >>>> clean->SetInputData(triangleFilter->GetOutput() ); >>>> #endif >>>> >>>> clean->ConvertPolysToLinesOff(); >>>> clean->ConvertLinesToPointsOff(); >>>> clean->Update(); >>>> >>>> std::string Inputfilename2="D:/cleaned.vtk";*/ >>>> >>>> //// >>>> /*polyDatawriter->SetInput(clean->GetOutput()); >>>> polyDatawriter->SetFileName(Inputfilename2.c_str()); >>>> polyDatawriter->ReleaseDataFlagOn(); >>>> polyDatawriter->Write(); */ >>>> >>>> typedef itk::MeshFileReader MeshReaderType; >>>> MeshReaderType::Pointer Meshreader = MeshReaderType::New(); >>>> Meshreader->SetFileName(Inputfilename.c_str( )); >>>> Meshreader->Update(); >>>> >>>> /*MeshType::Pointer mesh = Meshreader->GetOutput(); >>>> mesh->DisconnectPipeline();*/ >>>> >>>> >>>> QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); >>>> QEMeshSmoother->SetNumberOfIterations(1 ); >>>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>> QEMeshSmoother->SetDelaunayConforming(true); >>>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>> >>>> QEMeshSmoother->ReleaseDataFlagOn(); >>>> >>>> QEMeshSmoother->Update(); >>>> >>>> std::string Outputfilename="D:/tempOut.vtk"; >>>> >>>> typedef itk::MeshFileWriter MeshWriterType; >>>> MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); >>>> Meshwriter->SetFileName(Outputfilename.c_str( )); >>>> Meshwriter->SetInput(QEMeshSmoother->GetOutput()); >>>> Meshwriter->Update(); >>>> >>>> polyDatareader->SetFileName(Outputfilename.c_str() ); >>>> polyDatareader->ReleaseDataFlagOn(); >>>> polyDatareader->Update(); >>>> >>>> vtkSmartPointer stlWriter=vtkSmartPointer::New(); >>>> >>>> stlWriter->SetInput( polyDatareader->GetOutput()); >>>> stlWriter->SetFileName("D:/QEoutput.stl"); >>>> stlWriter->SetFileTypeToASCII(); >>>> stlWriter->Write(); >>>> >>>> //Here it stops and taking long time >>>> >>>> return 0; >>>> >>>> >>>> } >>>> //// >>>> >>>> >>>> >>>> On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K wrote: >>>> Hi Arnaud, >>>> >>>> Thanks for your reply and valuable suggestions. >>>> >>>> Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF. >>>> >>>> Thank you >>>> >>>> >>>> On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas wrote: >>>> Hi Malik, >>>> >>>> First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?). >>>> >>>> Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal). >>>> >>>> At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages? >>>> How large is your input mesh (number of points)? >>>> >>>> You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement. >>>> Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing). >>>> >>>> HTH >>>> Arnaud >>>> >>>> >>>> On Aug 6, 2014, at 10:42 AM, Mallikarjun K wrote: >>>> >>>>> Hi All, >>>>> >>>>> Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . >>>>> >>>>> >>>>> //// >>>>> >>>>> typedef itk::QuadEdgeMeshTraits qetraits; >>>>> >>>>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>>> >>>>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>>>> >>>>> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >>>>> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >>>>> >>>>> //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); >>>>> VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); >>>>> >>>>> VtkToItkReader->SetFileName("abc.vtk"); >>>>> VtkToItkReader->Update(); >>>>> >>>>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>>> SmoothingQuadEdgeMeshFilter; >>>>> >>>>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>>>> >>>>> >>>>> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >>>>> QEMeshSmoother->SetNumberOfIterations(5 ); >>>>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>>> QEMeshSmoother->SetDelaunayConforming(true ); >>>>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>>> >>>>> QEMeshSmoother->Update(); >>>>> >>>>> //// >>>>> >>>>> >>>>> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: >>>>> Thanks Bill for your answer. >>>>> >>>>> The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. >>>>> >>>>> Thanks for your help >>>>> >>>>> >>>>> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: >>>>> If you have it in vtk, I suggest using the vtk pipeline to smooth the data. >>>>> >>>>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K wrote: >>>>> > Hi Bill, >>>>> > Thanks for the replay. >>>>> > >>>>> > Yes,I built both ITK and my app with Release ,I forgot to mention it in the >>>>> > previous post.Actually the data set is the output of >>>>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved >>>>> > this marching cube's output as .vtk file and read it using >>>>> > itkVTKPolyDataReader and then I am giving this reader's output to >>>>> > itkSmoothingQuadEdgeMeshFilter's input. >>>>> > >>>>> > I checked the execution time of each step in the pipeline ,after >>>>> > SmothingQEMeshFilter has got it's input ,it is taking time to process the >>>>> > data. >>>>> > >>>>> > Thank you >>>>> > >>>>> > >>>>> > >>>>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen >>>>> > wrote: >>>>> >> >>>>> >> First, make sure you are building ITK and your app with Release. A >>>>> >> Debug build can be 10-50 times slower. >>>>> >> >>>>> >> >>>>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K >>>>> >> wrote: >>>>> >> > Hi All, >>>>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>>>> >> > smoothing.This >>>>> >> > filter is giving good results what I expected but taking more execution >>>>> >> > time.can any one suggest me to reduce the execution time( multi >>>>> >> > threading >>>>> >> > or any parameters to add/remove )? >>>>> >> > >>>>> >> > Below is the code snippet >>>>> >> > /////// >>>>> >> > typedef itk::QuadEdgeMeshTraits>>>> >> > > >>>>> >> > qetraits; >>>>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>>> >> > >>>>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>>>> >> > >>>>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>>>> >> > >>>>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>>> >> > SmoothingQuadEdgeMeshFilter; >>>>> >> > >>>>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>>>> >> > SmoothingQuadEdgeMeshFilter::New(); >>>>> >> > >>>>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>>>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>>>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>>>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>>> >> > QEMeshSmoother->Update(); >>>>> >> > //// >>>>> >> > >>>>> >> > -- >>>>> >> > Regards: >>>>> >> > Mallik >>>>> >> > >>>>> >> > >>>>> >> > _____________________________________ >>>>> >> > Powered by www.kitware.com >>>>> >> > >>>>> >> > Visit other Kitware open-source projects at >>>>> >> > http://www.kitware.com/opensource/opensource.html >>>>> >> > >>>>> >> > Kitware offers ITK Training Courses, for more information visit: >>>>> >> > http://www.kitware.com/products/protraining.php >>>>> >> > >>>>> >> > Please keep messages on-topic and check the 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 >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > -- >>>>> > Regards: >>>>> > Mallik >>>>> > >>>>> >>>>> >>>>> >>>>> -- >>>>> Unpaid intern in BillsBasement at noware dot com >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards: >>>>> Mallik >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards: >>>>> Mallik >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>>> >>>> >>>> >>>> -- >>>> Regards: >>>> Mallik >>>> >>>> >>>> >>>> >>>> -- >>>> Regards: >>>> Mallik >>>> >>> >>> >>> >>> >>> -- >>> Regards: >>> Mallik >>> >>> >> >> >> >> >> -- >> Regards: >> Mallik >> > > > > > -- > Regards: > Mallik > -------------- 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 arnaudgelas at gmail.com Thu Aug 21 07:00:52 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 21 Aug 2014 13:00:52 +0200 Subject: [ITK] [ITK-users] itkSmoothingQuadEdgeMeshFilter Help!! In-Reply-To: References: <20566F1B-1B71-411D-8C31-B25D4B24397A@gmail.com> <305E1509-8EF7-4770-9236-3D639B9BF155@gmail.com> <8E777677-5A6C-47A1-9ED6-030C85AB48B5@gmail.com> Message-ID: <997CA50D-FE3F-4620-BBDD-CCCD9EB440E0@gmail.com> Here is the patch (for progress report): http://review.source.kitware.com/#/c/16769/ On Aug 21, 2014, at 12:47 PM, Arnaud Gelas wrote: > Hi, > > As of now, there is no progress event on this filter, so it is normal nothing happened. > > I'll submit another patch for progress event later today. > > To review the patch, you need to create an account on gerrit: > > http://review.source.kitware.com > > Then you ca volunteer to the review patch, you can add comments, accept, refuse? > Else once you are registered, you can send me an email and I will add you as a reviewer. > > Best, > Arnaud > > On Aug 21, 2014, at 12:11 PM, Mallikarjun K wrote: > >> Hi, >> I am trying observe the progressEvent by using AddObserver method of this filter but I couldn't. Could you check the below code once. >> >> And one more thing,Could you guide me what exactly I have to do to Review the patch you have submitted. >> >> Thank you >> >> >> ///progress >> >> #include >> #include >> >> #include >> #include >> #include >> #include >> #include "itkMesh.h" >> #include "itkQuadEdgeMesh.h" >> #include "itkQuadEdgeMeshTraits.h" >> #include "itkSmoothingQuadEdgeMeshFilter.h" >> #include "itkCommand.h" >> >> class MyCommand : public itk::Command >> { >> public: >> itkNewMacro( MyCommand ); >> >> public: >> >> void Execute(itk::Object *caller, const itk::EventObject & event) >> { >> Execute( (const itk::Object *)caller, event); >> } >> >> void Execute(const itk::Object * object, const itk::EventObject & event) >> { >> std::cout << "Command called." << std::endl; >> >> if( typeid( itk::ProgressEvent ) == typeid( event ) ) >> { >> ::itk::ProcessObject::ConstPointer process = >> dynamic_cast< const itk::ProcessObject *>( object/*caller*/ ); >> >> const int value = static_cast(process->GetProgress() * 100 ); >> std::cout<<"progress:"<> >> >> >> } >> >> } >> >> }; >> >> int main( int argc, char* argv[] ) >> { >> >> /*if( argc < 2 ) >> { >> std::cerr << "Usage: " << std::endl; >> std::cerr << argv[0] << " inputImageFile outputImageFile flipAxisX flipAxisY" << std::endl; >> return EXIT_FAILURE; >> }*/ >> >> std::string Inputfilename="D:\\temp.vtk"; >> typedef itk::QuadEdgeMeshTraits qetraits; >> typedef itk::QuadEdgeMesh< double, 3,qetraits > MeshType; >> >> itk::OnesMatrixCoefficients< MeshType > coeff0; >> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; >> >> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >> >> typedef itk::MeshFileReader MeshReaderType; >> MeshReaderType::Pointer Meshreader = MeshReaderType::New(); >> Meshreader->SetFileName( Inputfilename.c_str()/*argv[1]*/ ); >> // Meshreader->Update(); >> >> >> MyCommand::Pointer myCommand = MyCommand::New(); >> >> QEMeshSmoother->SetInput(Meshreader->GetOutput() ); >> QEMeshSmoother->SetNumberOfIterations( 1 ); >> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >> QEMeshSmoother->SetDelaunayConforming(true); >> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >> QEMeshSmoother->AddObserver(itk::ProgressEvent, myCommand); >> >> // QEMeshSmoother->Update(); >> std::string Outputfilename="D:\\tempOut2.vtk"; >> >> typedef itk::MeshFileWriter MeshWriterType; >> MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); >> Meshwriter->SetFileName(Outputfilename.c_str() /*argv[2]*/ ); >> Meshwriter->SetInput(QEMeshSmoother->GetOutput()); >> >> try >> { >> Meshwriter->Update(); >> } >> catch( itk::ExceptionObject& e ) >> { >> std::cerr << e.what() << std::endl; >> } >> >> return 0; >> >> >> } >> >> >> On Wed, Aug 20, 2014 at 7:33 PM, Arnaud Gelas wrote: >> Hi, >> >> I have just submitted this patch for the documentation, can you please review it? >> >> http://review.source.kitware.com/#/c/16755/ >> >> I was running this code on Mac i5 with 4GB RAM, with both ITK and this program compiled in Debug? >> >> Best, >> Arnaud >> >> On Aug 7, 2014, at 5:20 PM, Mallikarjun K wrote: >> >>> Hi Arnaud, >>> >>> Thanks,Can you please tell me your machine confuguration. I am running 4GB RAM,i3 on windows7. >>> I have downloaded your project and tried to execute it and it is still the same problem Which I was facing earlier.Any suggestions ..... >>> >>> thank you >>> >>> >>> On Thu, Aug 7, 2014 at 8:10 PM, Arnaud Gelas wrote: >>> It takes 29s on my machine in debug to run 5 iterations with Delaunay conforming set to true >>> >>> https://gist.github.com/arnaudgelas/0f20ebdaf53956f79997 >>> >>> >>> On Aug 7, 2014, at 3:45 PM, Mallikarjun K wrote: >>> >>>> File path is correct.if it is '\'(backward slash) we have to add "D:\\" .since I used '/' it's not required to add "//". >>>> >>>> please find the attached .vtk file >>>> >>>> Thanks >>>> >>>> >>>> On Thu, Aug 7, 2014 at 7:01 PM, Arnaud Gelas wrote: >>>> Shouldn't it be D://temp.vtk ? Isn't it missing one '/' ? >>>> >>>> Can you send this vtk file? >>>> >>>> >>>> On Aug 7, 2014, at 3:23 PM, Mallikarjun K wrote: >>>> >>>>> Hi Arnaud, >>>>> >>>>> Kindly have a look in the below code ,the problem is that even after QEMeshFilter output is saved as .stl file ,the program is still running for long time.I have observed in my tests that MeshFileReader seems to be the culprit. Any suggestions ? >>>>> >>>>> ///// >>>>> #include >>>>> #include >>>>> >>>>> #include >>>>> #include >>>>> #include >>>>> #include >>>>> #include >>>>> #include >>>>> #include >>>>> #include >>>>> #include "itkMesh.h" >>>>> #include "itkQuadEdgeMesh.h" >>>>> #include "itkQuadEdgeMeshTraits.h" >>>>> #include "itkSmoothingQuadEdgeMeshFilter.h" >>>>> #include "vtkSTLWriter.h" >>>>> #include >>>>> >>>>> int main() >>>>> { >>>>> std::string Inputfilename="D:/temp.vtk"; //number of points of this mesh file is around 78K >>>>> >>>>> typedef itk::QuadEdgeMeshTraits qetraits; >>>>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>>> >>>>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>>>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType >SmoothingQuadEdgeMeshFilter; >>>>> >>>>> vtkSmartPointer polyDatawriter=vtkSmartPointer::New(); >>>>> vtkSmartPointer polyDatareader=vtkSmartPointer::New(); >>>>> >>>>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>>>> >>>>> /* polyDatareader->SetFileName(Inputfilename.c_str() ); >>>>> polyDatareader->ReleaseDataFlagOn(); >>>>> polyDatareader->Update();*/ >>>>> >>>>> /*vtkSmartPointer triangleFilter = >>>>> vtkSmartPointer::New(); >>>>> triangleFilter->SetInput(polyDatareader->GetOutput()); >>>>> triangleFilter->Update();*/ >>>>> >>>>> // >>>>> /* vtkSmartPointer clean = vtkSmartPointer::New(); >>>>> #if (VTK_MAJOR_VERSION < 6) >>>>> clean->SetInput(triangleFilter->GetOutput() ); >>>>> #else >>>>> clean->SetInputData(triangleFilter->GetOutput() ); >>>>> #endif >>>>> >>>>> clean->ConvertPolysToLinesOff(); >>>>> clean->ConvertLinesToPointsOff(); >>>>> clean->Update(); >>>>> >>>>> std::string Inputfilename2="D:/cleaned.vtk";*/ >>>>> >>>>> //// >>>>> /*polyDatawriter->SetInput(clean->GetOutput()); >>>>> polyDatawriter->SetFileName(Inputfilename2.c_str()); >>>>> polyDatawriter->ReleaseDataFlagOn(); >>>>> polyDatawriter->Write(); */ >>>>> >>>>> typedef itk::MeshFileReader MeshReaderType; >>>>> MeshReaderType::Pointer Meshreader = MeshReaderType::New(); >>>>> Meshreader->SetFileName(Inputfilename.c_str( )); >>>>> Meshreader->Update(); >>>>> >>>>> /*MeshType::Pointer mesh = Meshreader->GetOutput(); >>>>> mesh->DisconnectPipeline();*/ >>>>> >>>>> >>>>> QEMeshSmoother->SetInput(Meshreader->GetOutput()/*mesh*/ ); >>>>> QEMeshSmoother->SetNumberOfIterations(1 ); >>>>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>>> QEMeshSmoother->SetDelaunayConforming(true); >>>>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>>> >>>>> QEMeshSmoother->ReleaseDataFlagOn(); >>>>> >>>>> QEMeshSmoother->Update(); >>>>> >>>>> std::string Outputfilename="D:/tempOut.vtk"; >>>>> >>>>> typedef itk::MeshFileWriter MeshWriterType; >>>>> MeshWriterType::Pointer Meshwriter = MeshWriterType::New(); >>>>> Meshwriter->SetFileName(Outputfilename.c_str( )); >>>>> Meshwriter->SetInput(QEMeshSmoother->GetOutput()); >>>>> Meshwriter->Update(); >>>>> >>>>> polyDatareader->SetFileName(Outputfilename.c_str() ); >>>>> polyDatareader->ReleaseDataFlagOn(); >>>>> polyDatareader->Update(); >>>>> >>>>> vtkSmartPointer stlWriter=vtkSmartPointer::New(); >>>>> >>>>> stlWriter->SetInput( polyDatareader->GetOutput()); >>>>> stlWriter->SetFileName("D:/QEoutput.stl"); >>>>> stlWriter->SetFileTypeToASCII(); >>>>> stlWriter->Write(); >>>>> >>>>> //Here it stops and taking long time >>>>> >>>>> return 0; >>>>> >>>>> >>>>> } >>>>> //// >>>>> >>>>> >>>>> >>>>> On Thu, Aug 7, 2014 at 3:39 PM, Mallikarjun K wrote: >>>>> Hi Arnaud, >>>>> >>>>> Thanks for your reply and valuable suggestions. >>>>> >>>>> Number of points in my input mesh are 78928.In my pipeline I am already cleaning the polydata using vtkCleanPolyData filter.I will check the speed improvement and results with delaunay conforming turned OFF. >>>>> >>>>> Thank you >>>>> >>>>> >>>>> On Thu, Aug 7, 2014 at 2:22 PM, Arnaud Gelas wrote: >>>>> Hi Malik, >>>>> >>>>> First of all, I would recommend using MeshFileReader instead of VTKPolyDataReader (I guess VTKPolyDataReader will be deprecated in near future?). >>>>> >>>>> Regarding now the smoothing procedure in itself. This class definitively misses some documentation and I will be adding some in the next few days (mainly extracted from the corresponding insight journal). >>>>> >>>>> At the end of each iteration, when the delaunay conforming flag is turned ON, the conformation is performed. So depending on the mesh configuration, mesh size and number of iterations, it can take ages? >>>>> How large is your input mesh (number of points)? >>>>> >>>>> You can also check results, by running first a smoothing without delaunay conforming, then apply a delaunay conforming on the output. Results won't be as nice, but you should get significant speed improvement. >>>>> Another possibility is to first do a clean poly data in vtk, with a small threshold to remove small edges in the input meshes (which results in lots of edge flipping after smoothing). >>>>> >>>>> HTH >>>>> Arnaud >>>>> >>>>> >>>>> On Aug 6, 2014, at 10:42 AM, Mallikarjun K wrote: >>>>> >>>>>> Hi All, >>>>>> >>>>>> Can anyone suggest me if anything wrong I am doing in this below pipeline ,Where I used itkVtkPolydataReader to convert vtk Surface polydata to Itk QuadedgeMesh. Execution loop is being hung up for sometime(4 to 5 mins in release mode) at itkVtkPolydataReader . >>>>>> >>>>>> >>>>>> //// >>>>>> >>>>>> typedef itk::QuadEdgeMeshTraits qetraits; >>>>>> >>>>>> typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>>>> >>>>>> itk::OnesMatrixCoefficients< MeshType > coeff0; >>>>>> >>>>>> typedef itk::VTKPolyDataReader< MeshType >VTKPolyDataReaderType; >>>>>> //typedef itk::VTKPolyDataWriter< MeshType >VTKPolyDataWriterType; >>>>>> >>>>>> //VTKPolyDataWriterType::Pointer ItkToVtkWriter=VTKPolyDataWriterType::New(); >>>>>> VTKPolyDataReaderType::Pointer VtkToItkReader=VTKPolyDataReaderType::New(); >>>>>> >>>>>> VtkToItkReader->SetFileName("abc.vtk"); >>>>>> VtkToItkReader->Update(); >>>>>> >>>>>> typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>>>> SmoothingQuadEdgeMeshFilter; >>>>>> >>>>>> SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = SmoothingQuadEdgeMeshFilter::New(); >>>>>> >>>>>> >>>>>> QEMeshSmoother->SetInput(VtkToItkReader->GetOutPut()); >>>>>> QEMeshSmoother->SetNumberOfIterations(5 ); >>>>>> QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>>>> QEMeshSmoother->SetDelaunayConforming(true ); >>>>>> QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>>>> >>>>>> QEMeshSmoother->Update(); >>>>>> >>>>>> //// >>>>>> >>>>>> >>>>>> On Fri, Aug 1, 2014 at 4:36 PM, Mallikarjun K wrote: >>>>>> Thanks Bill for your answer. >>>>>> >>>>>> The reason I am using this pipeline is that SmoothingQEMeshFilter has an additional parameter for smoothing which is delaunay conforming which helps to optimize aspect ratio of triangles while smoothing and thus produces better output.Is there anything similar filter in the vtk pipeline.I used vtkWindowedSincPolydatafilter which is not giving the output as good as QEMeshSmoothing filter. >>>>>> >>>>>> Thanks for your help >>>>>> >>>>>> >>>>>> On Thu, Jul 31, 2014 at 5:14 PM, Bill Lorensen wrote: >>>>>> If you have it in vtk, I suggest using the vtk pipeline to smooth the data. >>>>>> >>>>>> On Thu, Jul 31, 2014 at 1:35 AM, Mallikarjun K wrote: >>>>>> > Hi Bill, >>>>>> > Thanks for the replay. >>>>>> > >>>>>> > Yes,I built both ITK and my app with Release ,I forgot to mention it in the >>>>>> > previous post.Actually the data set is the output of >>>>>> > vtkDiscreteMarchingCubes algorithm(around 5MB) and need to smooth .I saved >>>>>> > this marching cube's output as .vtk file and read it using >>>>>> > itkVTKPolyDataReader and then I am giving this reader's output to >>>>>> > itkSmoothingQuadEdgeMeshFilter's input. >>>>>> > >>>>>> > I checked the execution time of each step in the pipeline ,after >>>>>> > SmothingQEMeshFilter has got it's input ,it is taking time to process the >>>>>> > data. >>>>>> > >>>>>> > Thank you >>>>>> > >>>>>> > >>>>>> > >>>>>> > On Wed, Jul 30, 2014 at 9:29 PM, Bill Lorensen >>>>>> > wrote: >>>>>> >> >>>>>> >> First, make sure you are building ITK and your app with Release. A >>>>>> >> Debug build can be 10-50 times slower. >>>>>> >> >>>>>> >> >>>>>> >> On Wed, Jul 30, 2014 at 10:18 AM, Mallikarjun K >>>>>> >> wrote: >>>>>> >> > Hi All, >>>>>> >> > I am using itkSmoothingQuadEdgeMeshFilter for Surface Mesh >>>>>> >> > smoothing.This >>>>>> >> > filter is giving good results what I expected but taking more execution >>>>>> >> > time.can any one suggest me to reduce the execution time( multi >>>>>> >> > threading >>>>>> >> > or any parameters to add/remove )? >>>>>> >> > >>>>>> >> > Below is the code snippet >>>>>> >> > /////// >>>>>> >> > typedef itk::QuadEdgeMeshTraits>>>>> >> > > >>>>>> >> > qetraits; >>>>>> >> > typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3,qetraits > MeshType; >>>>>> >> > >>>>>> >> > //typedef itk::QuadEdgeMesh< vtkFloatingPointType, 3 > MeshType; >>>>>> >> > >>>>>> >> > itk::OnesMatrixCoefficients< MeshType > coeff0; >>>>>> >> > >>>>>> >> > typedef itk::SmoothingQuadEdgeMeshFilter< MeshType, MeshType > >>>>>> >> > SmoothingQuadEdgeMeshFilter; >>>>>> >> > >>>>>> >> > SmoothingQuadEdgeMeshFilter::Pointer QEMeshSmoother = >>>>>> >> > SmoothingQuadEdgeMeshFilter::New(); >>>>>> >> > >>>>>> >> > QEMeshSmoother->SetInput("abc.vtk"); >>>>>> >> > QEMeshSmoother->SetNumberOfIterations(5 ); >>>>>> >> > QEMeshSmoother->SetRelaxationFactor( 0.5 ); >>>>>> >> > QEMeshSmoother->SetDelaunayConforming(true ); >>>>>> >> > QEMeshSmoother->SetCoefficientsMethod( &coeff0 ); >>>>>> >> > QEMeshSmoother->Update(); >>>>>> >> > //// >>>>>> >> > >>>>>> >> > -- >>>>>> >> > Regards: >>>>>> >> > Mallik >>>>>> >> > >>>>>> >> > >>>>>> >> > _____________________________________ >>>>>> >> > Powered by www.kitware.com >>>>>> >> > >>>>>> >> > Visit other Kitware open-source projects at >>>>>> >> > http://www.kitware.com/opensource/opensource.html >>>>>> >> > >>>>>> >> > Kitware offers ITK Training Courses, for more information visit: >>>>>> >> > http://www.kitware.com/products/protraining.php >>>>>> >> > >>>>>> >> > Please keep messages on-topic and check the 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 >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > -- >>>>>> > Regards: >>>>>> > Mallik >>>>>> > >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Unpaid intern in BillsBasement at noware dot com >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Regards: >>>>>> Mallik >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Regards: >>>>>> Mallik >>>>>> >>>>>> _____________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>> http://www.kitware.com/products/protraining.php >>>>>> >>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards: >>>>> Mallik >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards: >>>>> Mallik >>>>> >>>> >>>> >>>> >>>> >>>> -- >>>> Regards: >>>> Mallik >>>> >>>> >>> >>> >>> >>> >>> -- >>> Regards: >>> Mallik >>> >> >> >> >> >> -- >> Regards: >> Mallik >> > -------------- 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 maximilian_oliver.mordig at roche.com Thu Aug 21 10:52:53 2014 From: maximilian_oliver.mordig at roche.com (maximilian) Date: Thu, 21 Aug 2014 07:52:53 -0700 (PDT) Subject: [ITK] [ITK-users] Modifying ValueAt function of SpatialObject Message-ID: <1408632773158-7586101.post@n2.nabble.com> Dear all, I am using the itk::SpatialObjectToImageFilter to convert a GroupSpatialObject (collection of several spatial objects) to an image. This filter is fine, however, if several spatial objects overlap at a location, the image's pixel value of that location is the first value returned by any spatial object in GroupSpatialObject (the ValueAt function is implemented in SpatialObject.hxx and iterates through its children; if one children matches, its value is immediately returned). I wanted the change the ValueAt() function to add up all the values returned by the ValueAt function if several SpatialObjects overlap at a location. To change the behavior, I have to inherit my new class, let's call it A, from GroupSpatialObject (collection of SpatialObjects) and redefine the method ValueAt(). The ValueAt() function in A has to be very similar to the ValueAt() defined in SpatialObject, but add up the values returned by its children spatial objects (instead of returning just the first match as it is currently implemented). The problem is that I need access m_TreeNode that is a list of all children (i.e. all objects contained in the GroupSpatialObject) to get the values of each child. However, m_TreeNode is declared private in the SpatialObject class. How can I circumvent this? Of course, I could copy-paste SpatialObject into a new class, but I consider this a very ugly solution, because I have to do so for all derived classes (like GroupSpatialObject, among others). Regards, Maximilian -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Modifying-ValueAt-function-of-SpatialObject-tp7586101.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 nicgallego at gmail.com Thu Aug 21 12:55:09 2014 From: nicgallego at gmail.com (Nicolas Gallego) Date: Thu, 21 Aug 2014 18:55:09 +0200 Subject: [ITK] Compiling ITK tests and examples, can It done module by module In-Reply-To: References: Message-ID: Hi Matt, Hello everybody, Just a further question of this issue I asked a while ago, I am trying to build, as you said, selected examples using the build target as make ExampleName, I am on Ubuntu and I just built itk 4.5 without the BUILD_EXAMPLES flag. Compilation went Ok. Now on the build directory, say I need the example Mesh1.cxx, the try on the built directory make Mesh1 but I get the following error, make: *** No rule to make target `Mesh1'. Stop. What I am missing? Thank you Nicol?s Gallego-Ortiz Universit? catholique de Louvain, Belgium 2014-07-10 18:42 GMT+02:00 Matt McCormick : > Hi Nicolas, > > If individual modules are selected during CMake configuration, only > those tests will be built an run. Unfortunately, when BUILD_EXAMPLES > is ON, all examples will be built. To just build select examples the > best current option is to select the corresponding build target. This > is build system specific. With Unix Makefiles, for example, > > make ExampleName > > Hope this helps, > Matt > > > > On Thu, Jul 10, 2014 at 12:15 PM, Nicolas Gallego > wrote: > > Hi, > > > > Here is a naive question, after waiting long time and seeing how much > disk > > space a complete compilation of ITK library takes, with all examples and > > tests. > > > > Is it possible to specify to compile just a subset of examples and tests? > > Before I have copied and pasted out some source code to achieve this but > I > > guess there should be a nicer way to do it. > > > > Thank you, > > > > Nicol?s Gallego-Ortiz > > Universit? catholique de Louvain, Belgium > > > > _______________________________________________ > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Aug 21 12:57:35 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 21 Aug 2014 12:57:35 -0400 Subject: [ITK] Compiling ITK tests and examples, can It done module by module In-Reply-To: References: Message-ID: You must turn BUILD_EXAMPLES on. Then you can build individual examples. On Thu, Aug 21, 2014 at 12:55 PM, Nicolas Gallego wrote: > Hi Matt, Hello everybody, > > Just a further question of this issue I asked a while ago, > > I am trying to build, as you said, selected examples using the build target > > as > > make ExampleName, > > I am on Ubuntu and I just built itk 4.5 without the BUILD_EXAMPLES flag. > Compilation went Ok. > Now on the build directory, say I need the example Mesh1.cxx, the try on the > built directory > > make Mesh1 > > but I get the following error, > > make: *** No rule to make target `Mesh1'. Stop. > > What I am missing? Thank you > > Nicol?s Gallego-Ortiz > Universit? catholique de Louvain, Belgium > > > 2014-07-10 18:42 GMT+02:00 Matt McCormick : > >> Hi Nicolas, >> >> If individual modules are selected during CMake configuration, only >> those tests will be built an run. Unfortunately, when BUILD_EXAMPLES >> is ON, all examples will be built. To just build select examples the >> best current option is to select the corresponding build target. This >> is build system specific. With Unix Makefiles, for example, >> >> make ExampleName >> >> Hope this helps, >> Matt >> >> >> >> On Thu, Jul 10, 2014 at 12:15 PM, Nicolas Gallego >> wrote: >> > Hi, >> > >> > Here is a naive question, after waiting long time and seeing how much >> > disk >> > space a complete compilation of ITK library takes, with all examples and >> > tests. >> > >> > Is it possible to specify to compile just a subset of examples and >> > tests? >> > Before I have copied and pasted out some source code to achieve this but >> > I >> > guess there should be a nicer way to do it. >> > >> > Thank you, >> > >> > Nicol?s Gallego-Ortiz >> > Universit? catholique de Louvain, Belgium >> > >> > _______________________________________________ >> > 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 > > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > -- Unpaid intern in BillsBasement at noware dot com From nicgallego at gmail.com Thu Aug 21 12:59:08 2014 From: nicgallego at gmail.com (Nicolas Gallego) Date: Thu, 21 Aug 2014 18:59:08 +0200 Subject: [ITK] Compiling ITK tests and examples, can It done module by module In-Reply-To: References: Message-ID: Sorry, I just figured it out BUILD_EXAMPLES should be ON then make ExampleName works Nicol?s Gallego-Ortiz Universit? catholique de Louvain, Belgium 2014-08-21 18:55 GMT+02:00 Nicolas Gallego : > Hi Matt, Hello everybody, > > Just a further question of this issue I asked a while ago, > > I am trying to build, as you said, selected examples using the build target > > as > > make ExampleName, > > I am on Ubuntu and I just built itk 4.5 without the BUILD_EXAMPLES flag. > Compilation went Ok. > Now on the build directory, say I need the example Mesh1.cxx, the try on > the built directory > > make Mesh1 > > but I get the following error, > > make: *** No rule to make target `Mesh1'. Stop. > > What I am missing? Thank you > > Nicol?s Gallego-Ortiz > Universit? catholique de Louvain, Belgium > > > 2014-07-10 18:42 GMT+02:00 Matt McCormick : > > Hi Nicolas, >> >> If individual modules are selected during CMake configuration, only >> those tests will be built an run. Unfortunately, when BUILD_EXAMPLES >> is ON, all examples will be built. To just build select examples the >> best current option is to select the corresponding build target. This >> is build system specific. With Unix Makefiles, for example, >> >> make ExampleName >> >> Hope this helps, >> Matt >> >> >> >> On Thu, Jul 10, 2014 at 12:15 PM, Nicolas Gallego >> wrote: >> > Hi, >> > >> > Here is a naive question, after waiting long time and seeing how much >> disk >> > space a complete compilation of ITK library takes, with all examples and >> > tests. >> > >> > Is it possible to specify to compile just a subset of examples and >> tests? >> > Before I have copied and pasted out some source code to achieve this >> but I >> > guess there should be a nicer way to do it. >> > >> > Thank you, >> > >> > Nicol?s Gallego-Ortiz >> > Universit? catholique de Louvain, Belgium >> > >> > _______________________________________________ >> > 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 >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bilgincc at gmail.com Thu Aug 21 13:33:53 2014 From: bilgincc at gmail.com (Cagatay Bilgin) Date: Thu, 21 Aug 2014 10:33:53 -0700 Subject: [ITK] [ITK-users] Different output with dense and sparse level set representations Message-ID: Hello everybody, I continue with my exploration of the new level set framework. I have modified one of the examples and have an advection field in the positive x direction. I would expect the initial contour to move in that direction and that's the case with the sparse representation. Using the dense representation however, only half of the contour moves to my surprise. Is this a bug or I am missing something here. Here is the code and the cmake file and snapshots of the movements. [image: Inline image 2][image: Inline image 1] #include "itkBinaryImageToLevelSetImageAdaptor.h" #include "itkLevelSetContainer.h" #include "itkLevelSetEquationPropagationTerm.h" #include "itkLevelSetEquationAdvectionTerm.h" #include "itkLevelSetEquationContainer.h" #include "itkLevelSetEquationTermContainer.h" #include "itkLevelSetEvolution.h" #include "itkLevelSetEvolutionNumberOfIterationsStoppingCriterion.h" #include "itkLevelSetDenseImage.h" #include "itkVTKVisualizeImageLevelSetIsoValues.h" #include "itkSinRegularizedHeavisideStepFunction.h" #include "itkLevelSetIterationUpdateCommand.h" #include "itkLevelSetEquationCurvatureTerm.h" #include "itkWhitakerSparseLevelSetImage.h" #include "itkLevelSetSparseImage.h" typedef itk::Image< float, 2 > FIT; void CreateSquareImage(FIT::Pointer image, FIT::Pointer prop, FIT::Pointer advec) { FIT::RegionType region; FIT::IndexType start; start[0] = 0; start[1] = 0; FIT::SizeType size; size[0] = 100; size[1] = 100; region.SetSize(size); region.SetIndex(start); image->SetRegions(region); image->Allocate(); image->FillBuffer(0); //constant grow in all directions prop->SetRegions(image->GetLargestPossibleRegion()); prop->Allocate(); prop->FillBuffer(1); //advec will increase in positive x direction advec->SetRegions(image->GetLargestPossibleRegion()); advec->Allocate(); advec->FillBuffer(0); // Set pixels in a square to one value for(unsigned int x = 35; x < 65; x++){ for(unsigned int y = 35; y < 65; y++){ FIT::IndexType pixelIndex; pixelIndex[0] = x; pixelIndex[1] = y; image->SetPixel(pixelIndex, 255); } } //advection in positive x direction for(unsigned int x = 0; x < 100; x++){ for(unsigned int y = 0; y < 100; y++){ FIT::IndexType pixelIndex; pixelIndex[0] = x; pixelIndex[1] = y; advec->SetPixel(pixelIndex, x); } } } /* */ int main(int argc, char* argv[] ) { using namespace itk; if(argc != 5) { std::cerr << "Missing Arguments" << std::endl; std::cerr << argv[0] << std::endl; std::cerr << "1- Number of Iterations" << std::endl; std::cerr << "2- Propagation Term" << std::endl; std::cerr << "3- Advection Term" << std::endl; std::cerr << "4- Curvature Term" << std::endl; return EXIT_FAILURE; } FIT::Pointer input = FIT::New(); FIT::Pointer prop = FIT::New(); FIT::Pointer advec = FIT::New(); CreateSquareImage(input, prop, advec); int numberOfIterations = atoi(argv[1]); typedef float LSPT; typedef Image< LSPT, 2 > LSIT; typedef LevelSetDenseImage< LSIT > LST; //typedef WhitakerSparseLevelSetImage< LSPT, 2 > LST; typedef LST::OutputRealType LSOutputT; // convert a binary mask to a level-set function typedef BinaryImageToLevelSetImageAdaptor BI2LST; BI2LST::Pointer adaptor = BI2LST::New(); adaptor->SetInputImage(input ); adaptor->Initialize(); LST::Pointer levelSet = adaptor->GetLevelSet(); // The Heaviside function typedef SinRegularizedHeavisideStepFunction HeavisideFunctionType; HeavisideFunctionType::Pointer heaviside = HeavisideFunctionType::New(); heaviside->SetEpsilon(1 ); // Create the level set container typedef LevelSetContainer< IdentifierType, LST > LSContainerT; LSContainerT::Pointer levelSetContainer = LSContainerT::New(); levelSetContainer->SetHeaviside(heaviside ); levelSetContainer->AddLevelSet(0, levelSet ); // Create the terms. typedef LevelSetEquationPropagationTerm PropT; PropT::Pointer propagationTerm = PropT::New(); propagationTerm->SetInput(prop); propagationTerm->SetCoefficient(atof(argv[2])); typedef LevelSetEquationAdvectionTerm AdvecT; AdvecT::Pointer advectionTerm = AdvecT::New(); advectionTerm->SetInput(advec); advectionTerm->SetCoefficient(atof(argv[3])); typedef LevelSetEquationCurvatureTerm CurvT; CurvT::Pointer curvatureTerm = CurvT::New(); curvatureTerm->SetCoefficient(atof(argv[4])); // Create term container (equation rhs) typedef LevelSetEquationTermContainer< FIT, LSContainerT > TermContainerT; TermContainerT::Pointer termContainer = TermContainerT::New(); termContainer->SetLevelSetContainer(levelSetContainer ); termContainer->SetInput(input ); termContainer->AddTerm(0, curvatureTerm ); termContainer->AddTerm(1, advectionTerm ); termContainer->AddTerm(2, propagationTerm ); // Create equation container typedef LevelSetEquationContainer< TermContainerT > EquationContainerType; EquationContainerType::Pointer equationContainer = EquationContainerType::New(); equationContainer->SetLevelSetContainer(levelSetContainer ); equationContainer->AddEquation(0, termContainer ); // Create stopping criteria typedef LevelSetEvolutionNumberOfIterationsStoppingCriterion< LSContainerT > StoppingCriterionType; StoppingCriterionType::Pointer criterion = StoppingCriterionType::New(); criterion->SetNumberOfIterations(numberOfIterations ); // Create the visualizer typedef VTKVisualizeImageLevelSetIsoValues< FIT, LST > VisT; VisT::Pointer visualizer = VisT::New(); visualizer->SetInputImage(input ); visualizer->SetLevelSet(levelSet ); visualizer->SetScreenCapture(true ); // Create evolution class typedef LevelSetEvolution< EquationContainerType, LST > LSEvolT; LSEvolT::Pointer evolution = LSEvolT::New(); evolution->SetEquationContainer(equationContainer ); evolution->SetStoppingCriterion(criterion ); evolution->SetLevelSetContainer(levelSetContainer ); typedef LevelSetIterationUpdateCommand< LSEvolT, VisT > IterationUpdateCommandType; IterationUpdateCommandType::Pointer iterationUpdateCommand = IterationUpdateCommandType::New(); iterationUpdateCommand->SetFilterToUpdate(visualizer ); iterationUpdateCommand->SetUpdatePeriod(1 ); evolution->AddObserver(IterationEvent(), iterationUpdateCommand ); evolution->Update(); return EXIT_SUCCESS; } cmake_minimum_required(VERSION 2.8) project(Motion) find_package(ITK REQUIRED) include(${ITK_USE_FILE}) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(Motion main.cpp) target_link_libraries(Motion ${ITK_LIBRARIES} ${VTK_LIBRARIES}) Params used for the experiment: Ran sparse representation with ./Motion 15 0 1 1 Ran dense representation with ./Motion 15 0 1 0 Cemal Cagatay Bilgin, PhD Life Sciences Division Lawrence Berkeley National Lab MS977, One Cyclotron Road Berkeley, CA 94720, USA Email: ccbilgin at lbl.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sparse_00015.png Type: image/png Size: 2848 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dense_00010.png Type: image/png Size: 2737 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 matt.mccormick at kitware.com Thu Aug 21 17:54:56 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 21 Aug 2014 17:54:56 -0400 Subject: [ITK] Friday gathering Message-ID: Hi, I will not be able to host or attend the regular gathering tomorrow. If someone is interested in hosting, please do so. Thanks, Matt From arnaudgelas at gmail.com Fri Aug 22 02:58:34 2014 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Fri, 22 Aug 2014 08:58:34 +0200 Subject: [ITK] [ITK-users] combining N images In-Reply-To: <41BB5486-E3F6-4196-8E58-C59F514C8800@mail.nih.gov> References: <41BB5486-E3F6-4196-8E58-C59F514C8800@mail.nih.gov> Message-ID: Hi Brad, Thanks for the link! It helped me to get on track... In the end, it was not that complicated to do all in one filter (let me know if anyone is interested). Arnaud On Wed, Aug 20, 2014 at 6:53 PM, Bradley Lowekamp wrote: > This may be of some use: > > > https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkBoundingRegionImageSinc.h > > On Aug 20, 2014, at 11:51 AM, Arnaud Gelas wrote: > > Hi, > > I do not want to add images, it is more something like pasting but I do > not know in advance what would be the output image size, but it would be at > least the bounding box of all images... > > Arnaud > > On Wednesday, August 20, 2014, Mordig, Maximilian Oliver < > maximilian_oliver.mordig at roche.com> wrote: > >> Once you have resampled all images, you can use the itk AddFilter. >> >> >> On Wed, Aug 20, 2014 at 4:28 PM, Arnaud Gelas >> wrote: >> >>> Hi all, >>> >>> I am trying to combine N images together into a single image of the same >>> dimension. >>> >>> These N images have the same direction, but can have different origin, >>> start index, spacing, size (there is no overlap). Then gaps in between >>> images would be filled with a given constant value. >>> >>> Is there such a filter? or assuming I have already resampled all images >>> to a common ground, is there a filter to do this? >>> >>> 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 >>> >>> _______________________________________________ >>> 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 > > _______________________________________________ > 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 vincent.ngai at gmail.com Fri Aug 22 03:30:44 2014 From: vincent.ngai at gmail.com (vincent ngai) Date: Fri, 22 Aug 2014 15:30:44 +0800 Subject: [ITK] [ITK-users] Silly question on itk::Matrix Message-ID: Hi all, pardon me for this silly question on itk::Matrix. Why do I need to transpose a translation matrix after I copy the [x,y,z] translation values to the matrix[3]. I know conceptually it should not really matter whether its row or col major so long as you can post multiply or pre multiply with another vector. But the way operator*() works only allows for Matrix * P, and when I test the simple case of TranslationMatrix * Point, I would have to transpose the matrix. If I could also do Point * TranslationMatrix, then i wouldn't need to transpose. Any ideas? -- Regards, Vincent -------------- 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 millerjv at gmail.com Fri Aug 22 07:14:11 2014 From: millerjv at gmail.com (Jim Miller) Date: Fri, 22 Aug 2014 07:14:11 -0400 Subject: [ITK] [ITK-users] Silly question on itk::Matrix In-Reply-To: References: Message-ID: <0BBC89C9-0F67-48F1-99F4-AC89AF5C394B@gmail.com> ITK standard is that points are column vectors. Thus, matrix times a point a point is defined as Mat * P Jim > On Aug 22, 2014, at 3:30 AM, vincent ngai wrote: > > Hi all, pardon me for this silly question on itk::Matrix. Why do I need to transpose a translation matrix after I copy the [x,y,z] translation values to the matrix[3]. > > I know conceptually it should not really matter whether its row or col major so long as you can > post multiply or pre multiply with another vector. But the way operator*() works only allows for > Matrix * P, and when I test the simple case of TranslationMatrix * Point, I would have to transpose the matrix. If I could also do Point * TranslationMatrix, then i wouldn't need to transpose. > > Any ideas? > > -- > Regards, > Vincent > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 gowithking at googlemail.com Fri Aug 22 10:06:42 2014 From: gowithking at googlemail.com (gowith king) Date: Fri, 22 Aug 2014 16:06:42 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: gowith king Date: Fri, Aug 22, 2014 at 1:32 PM Subject: ITK and python wrap problem To: community at itk.org Dear ITK friends I am not sure this is an appropriate place to issue my problem in the wrapping process: I followed the instruction of ' http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. Then I tried one line for test : >>> import itk >>> inputimage=itk.Image[itk.UC,3] Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ itkBase.LoadModule(module, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule module = loader.load(swigModuleName) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load return imp.load_module(name, fp, pathname, description) File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in _ITKCommonPython = swig_import_helper() File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory I got totally lost for this, what should I do to fix this? Any suggestion would be appreciated -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Fri Aug 22 10:15:57 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Fri, 22 Aug 2014 16:15:57 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: Message-ID: Hi Some important questions first: What was the warning for the library mismatch ? On what OS are you installing ? Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? If the warnings were about the python library, it is quite important. It may happen that you have two different python installations, and cmake is not able to find the right libraries. I wrote some instructions to install ITK with python wrapping on Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora There is a list of cmake flags you can set to help cmake find the right python, if it?s the problem you had. I think the error is just because the library is not in your path. If you are using Fedora, just follow the instructions I wrote down. For other OS?es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this) Feedback is welcome so I can improve the installation instructions :) Michka On 22 ao?t 2014, at 16:06, gowith king wrote: > > > ---------- Forwarded message ---------- > From: gowith king > Date: Fri, Aug 22, 2014 at 1:32 PM > Subject: ITK and python wrap problem > To: community at itk.org > > > Dear ITK friends > I am not sure this is an appropriate place to issue my problem in the wrapping process: > I followed the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. > Then I tried one line for test : > >>> import itk > >>> inputimage=itk.Image[itk.UC,3] > Traceback (most recent call last): > File "", line 1, in > File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ > itkBase.LoadModule(module, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule > module = loader.load(swigModuleName) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load > return imp.load_module(name, fp, pathname, description) > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in > _ITKCommonPython = swig_import_helper() > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper > _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) > ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory > > I got totally lost for this, what should I do to fix this? > Any suggestion would be appreciated > > > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Fri Aug 22 11:30:00 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Fri, 22 Aug 2014 17:30:00 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: Message-ID: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Please keep the discussion on the mailing list :) Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. Seems on ubuntu the procedure is the same for loading the shared libraries: http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. Michka On 22 ao?t 2014, at 17:21, gowith king wrote: > Dear Popoff > I am using Ubuntu 12.04 LTS. the warning is the mismatching of python library and python executable : python executable "2.7.3" and library "" is mismatched. Here is the option setting: > > > PYTHON_EXECUTABLE /usr/bin/python > PYTHON_INCLUDE_DIR /usr/include/python2.7 > PYTHON_LIBRARY /usr/lib/libpython2.7.so > PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages > > The libitkvnl_algo-4.7.so file exist in /usr/local/lib . > > I do have few python versions been installed in the same OS. > The flags in the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' are not exact as the same as the description. I will try your instruction step be step in my system. > By the way, your instruction is so practical. > > Have a nice day. > > > > > > On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff wrote: > Hi > > Some important questions first: > > What was the warning for the library mismatch ? > On what OS are you installing ? > Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? > > If the warnings were about the python library, it is quite important. > It may happen that you have two different python installations, and cmake is not able to find the right libraries. > > I wrote some instructions to install ITK with python wrapping on Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora > There is a list of cmake flags you can set to help cmake find the right python, if it?s the problem you had. > I think the error is just because the library is not in your path. If you are using Fedora, just follow the instructions I wrote down. > For other OS?es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this) > > Feedback is welcome so I can improve the installation instructions :) > > Michka > > On 22 ao?t 2014, at 16:06, gowith king wrote: > >> >> >> ---------- Forwarded message ---------- >> From: gowith king >> Date: Fri, Aug 22, 2014 at 1:32 PM >> Subject: ITK and python wrap problem >> To: community at itk.org >> >> >> Dear ITK friends >> I am not sure this is an appropriate place to issue my problem in the wrapping process: >> I followed the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. >> Then I tried one line for test : >> >>> import itk >> >>> inputimage=itk.Image[itk.UC,3] >> Traceback (most recent call last): >> File "", line 1, in >> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ >> itkBase.LoadModule(module, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule >> module = loader.load(swigModuleName) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >> return imp.load_module(name, fp, pathname, description) >> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >> _ITKCommonPython = swig_import_helper() >> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper >> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) >> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory >> >> I got totally lost for this, what should I do to fix this? >> Any suggestion would be appreciated >> >> >> >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gowithking at googlemail.com Fri Aug 22 12:13:23 2014 From: gowithking at googlemail.com (gowith king) Date: Fri, 22 Aug 2014 18:13:23 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: I recorded my procedure as follow: cd ~ git clone git://itk.org/ITK.git cd ITK git pull mkdir BUILD cd BUILD ccmake .. in the ccmake configure options the follow flags were selected: BUILD_EXAMPLES OFF BUILD_SHARED_LIBS ON BUILD_TESTING OFF CMAKE_BUILD_TYPE Release ITK_WRAP_PERL OFF ITK_WRAP_PYTHON ON PERL_EXECUTABLE /usr/bin/perl PYTHON_EXECUTABLE /usr/bin/python PYTHON_INCLUDE_DIR /usr/include/python2.7 PYTHON_LIBRARY /usr/lib/libpython2.7.so PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages SCPCOMMAND /usr/bin/scp Then the configure warning of executable and library mismatch comes, ignore the warning g to generation sudo make sudo make install for the test : python >>>import itk >>> inputimage=itk.Image[itk.UC,3] --- errors report here : in eclispe : undefined variable from import UC in terminal :Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ itkBase.LoadModule(module, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule LoadModule(dep, namespace) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule module = loader.load(swigModuleName) File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load return imp.load_module(name, fp, pathname, description) File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in _ITKCommonPython = swig_import_helper() File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory On Fri, Aug 22, 2014 at 5:55 PM, gowith king wrote: > Please keep the discussion on the mailing list :) > > This is my first post in mailing list system " if this is a sort of > system, :)" > I guess that means I should always do not forget to cc to community? or > what else should I do to keep it? > > > Okay, so you will have to find the paths to the right folders/files to be > consistent in your python choice. > > > I have no idea Howto identify the python2.7.3 working library, normally > they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a > similar .so file in /usr/lib/libpython2.7.so . > However in your instruction :PYTHON_LIBRARY = > /usr/lib64/libpython2.7.so.1.0 > The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/ > libpython2.7.so.1.0 ; should I use this file? > > I would be happy if you could communicate me the paths for Ubuntu 12.04, > so I could extend the installation procedure. > > How could I send you the path of ubuntu 12.04? I can try to switch on a > remote assistant if necessary. > > > Seems on ubuntu the procedure is the same for loading the shared libraries: > > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run > ldconfig. > > > On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff > wrote: > >> Please keep the discussion on the mailing list :) >> >> Okay, so you will have to find the paths to the right folders/files to be >> consistent in your python choice. >> I would be happy if you could communicate me the paths for Ubuntu 12.04, >> so I could extend the installation procedure. >> >> Seems on ubuntu the procedure is the same for loading the shared >> libraries: >> >> http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib >> On Ubuntu you should have a /etc/ld.so.conf file. Then you should run >> ldconfig. >> >> Michka >> >> On 22 ao?t 2014, at 17:21, gowith king wrote: >> >> Dear Popoff >> I am using Ubuntu 12.04 LTS. the warning is the mismatching of >> python library and python executable : python executable "2.7.3" and >> library "" is mismatched. Here is the option setting: >> >> >> PYTHON_EXECUTABLE >> /usr/bin/python >> PYTHON_INCLUDE_DIR >> /usr/include/python2.7 >> PYTHON_LIBRARY /usr/lib/libpython2.7.so >> >> PY_SITE_PACKAGES_PATH >> /usr/lib/python2.7/dist-packages >> >> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . >> >> I do have few python versions been installed in the same OS. >> The flags in the instruction of ' >> http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' are >> not exact as the same as the description. I will try your instruction step >> be step in my system. >> By the way, your instruction is so practical. >> >> Have a nice day. >> >> >> >> >> >> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff >> wrote: >> >>> Hi >>> >>> Some important questions first: >>> >>> What was the warning for the library mismatch ? >>> On what OS are you installing ? >>> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? >>> >>> If the warnings were about the python library, it is quite important. >>> It may happen that you have two different python installations, and >>> cmake is not able to find the right libraries. >>> >>> I wrote some instructions to install ITK with python wrapping on Fedora >>> http://www.itk.org/Wiki/ITK/WrapITKInstallFedora >>> There is a list of cmake flags you can set to help cmake find the right >>> python, if it?s the problem you had. >>> I think the error is just because the library is not in your path. If >>> you are using Fedora, just follow the instructions I wrote down. >>> For other OS?es there are ways to do this, like setting the >>> LD_LIBRARY_PATH for example (you'll have to google this) >>> >>> Feedback is welcome so I can improve the installation instructions :) >>> >>> Michka >>> >>> On 22 ao?t 2014, at 16:06, gowith king >>> wrote: >>> >>> >>> >>> ---------- Forwarded message ---------- >>> From: gowith king >>> Date: Fri, Aug 22, 2014 at 1:32 PM >>> Subject: ITK and python wrap problem >>> To: community at itk.org >>> >>> >>> Dear ITK friends >>> I am not sure this is an appropriate place to issue my problem in >>> the wrapping process: >>> I followed the instruction of ' >>> http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to >>> finish the compiling and installing process. it look good so far except a >>> warning of mismatching library version, I think it could be ignored. >>> Then I tried one line for test : >>> >>> import itk >>> >>> inputimage=itk.Image[itk.UC,3] >>> Traceback (most recent call last): >>> File "", line 1, in >>> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in >>> __getattribute__ >>> itkBase.LoadModule(module, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>> LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>> LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>> LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>> LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in >>> LoadModule >>> module = loader.load(swigModuleName) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >>> return imp.load_module(name, fp, pathname, description) >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >>> >>> _ITKCommonPython = swig_import_helper() >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in >>> swig_import_helper >>> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) >>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No >>> such file or directory >>> >>> I got totally lost for this, what should I do to fix this? >>> Any suggestion would be appreciated >>> >>> >>> >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Fri Aug 22 12:52:29 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Fri, 22 Aug 2014 18:52:29 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: Yes, just cc the community (or reply to all), so that all the discussion is archived as a thread by the mailing list system. It?s easier for users to search for an answer when there are no missing messages in the thread. The answer to a problem/bug should be public. Sending a mail to only one person from the list is okay though, but only for private/off topic discussions. Michka On 22 ao?t 2014, at 17:55, gowith king wrote: > Please keep the discussion on the mailing list :) > > This is my first post in mailing list system " if this is a sort of system, :)" > I guess that means I should always do not forget to cc to community? or what else should I do to keep it? > > > Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. > > > I have no idea Howto identify the python2.7.3 working library, normally they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a similar .so file in /usr/lib/libpython2.7.so . > However in your instruction :PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0 > The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/libpython2.7.so.1.0 ; should I use this file? > > I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. > > How could I send you the path of ubuntu 12.04? I can try to switch on a remote assistant if necessary. > > > Seems on ubuntu the procedure is the same for loading the shared libraries: > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. > > > On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff wrote: > Please keep the discussion on the mailing list :) > > Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. > I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. > > Seems on ubuntu the procedure is the same for loading the shared libraries: > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. > > Michka > > On 22 ao?t 2014, at 17:21, gowith king wrote: > >> Dear Popoff >> I am using Ubuntu 12.04 LTS. the warning is the mismatching of python library and python executable : python executable "2.7.3" and library "" is mismatched. Here is the option setting: >> >> >> PYTHON_EXECUTABLE /usr/bin/python >> PYTHON_INCLUDE_DIR /usr/include/python2.7 >> PYTHON_LIBRARY /usr/lib/libpython2.7.so >> PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages >> >> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . >> >> I do have few python versions been installed in the same OS. >> The flags in the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' are not exact as the same as the description. I will try your instruction step be step in my system. >> By the way, your instruction is so practical. >> >> Have a nice day. >> >> >> >> >> >> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff wrote: >> Hi >> >> Some important questions first: >> >> What was the warning for the library mismatch ? >> On what OS are you installing ? >> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? >> >> If the warnings were about the python library, it is quite important. >> It may happen that you have two different python installations, and cmake is not able to find the right libraries. >> >> I wrote some instructions to install ITK with python wrapping on Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora >> There is a list of cmake flags you can set to help cmake find the right python, if it?s the problem you had. >> I think the error is just because the library is not in your path. If you are using Fedora, just follow the instructions I wrote down. >> For other OS?es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this) >> >> Feedback is welcome so I can improve the installation instructions :) >> >> Michka >> >> On 22 ao?t 2014, at 16:06, gowith king wrote: >> >>> >>> >>> ---------- Forwarded message ---------- >>> From: gowith king >>> Date: Fri, Aug 22, 2014 at 1:32 PM >>> Subject: ITK and python wrap problem >>> To: community at itk.org >>> >>> >>> Dear ITK friends >>> I am not sure this is an appropriate place to issue my problem in the wrapping process: >>> I followed the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. >>> Then I tried one line for test : >>> >>> import itk >>> >>> inputimage=itk.Image[itk.UC,3] >>> Traceback (most recent call last): >>> File "", line 1, in >>> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ >>> itkBase.LoadModule(module, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule >>> module = loader.load(swigModuleName) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >>> return imp.load_module(name, fp, pathname, description) >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >>> _ITKCommonPython = swig_import_helper() >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper >>> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) >>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory >>> >>> I got totally lost for this, what should I do to fix this? >>> Any suggestion would be appreciated >>> >>> >>> >>> >>> _______________________________________________ >>> 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 Fri Aug 22 14:04:39 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 22 Aug 2014 14:04:39 -0400 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: Hi, Please see inline comments below On Fri, Aug 22, 2014 at 12:13 PM, gowith king wrote: > I recorded my procedure as follow: > cd ~ > git clone git://itk.org/ITK.git > cd ITK > git pull > mkdir BUILD > cd BUILD > ccmake .. > in the ccmake configure options the follow flags were selected: > BUILD_EXAMPLES OFF > BUILD_SHARED_LIBS ON > BUILD_TESTING OFF > CMAKE_BUILD_TYPE Release > ITK_WRAP_PERL OFF > ITK_WRAP_PYTHON ON > PERL_EXECUTABLE /usr/bin/perl > PYTHON_EXECUTABLE /usr/bin/python Try /usr/bin/python2.7 or /usr/bin/python2 > PYTHON_INCLUDE_DIR /usr/include/python2.7 > PYTHON_LIBRARY /usr/lib/libpython2.7.so > PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages > SCPCOMMAND /usr/bin/scp > > Then the configure warning of executable and library mismatch comes, ignore > the warning > g to generation > sudo make > sudo make install > > for the test : > python >>>>import itk >>>> inputimage=itk.Image[itk.UC,3] --- errors report here : > in eclispe : undefined variable from import UC Here "UC" stands for "unsigned char". In your CMake configuration options, make sure ITK_WRAP_unsigned_char is ON to support this pixel type. Hope this helps, Matt From joseignacio.prieto at gmail.com Fri Aug 22 19:45:37 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Fri, 22 Aug 2014 19:45:37 -0400 Subject: [ITK] [ITK-users] 2D polygon stack to 3d mesh Message-ID: Hi all, I am dubious to which mail list use. I have an array of 2d snake segmentations for the left ventricle( a std vector of 20 rows with a closed convex 2d polygon each row) on ITK and I would like it to turn it into a mesh that can be visualized. Should I use QuadMeshEdge and then a Delaunay in ITk, or use Delaunay methods in VTK. Or maybe I should write an ad-hoc method given that the points are sorted so a triangle can be made with two consecutive polygon points and the closest one on the following slice. Thank you very much, Ignacio Prieto -- Ignacio Prieto Research Assistant Biomedical Imaging Center Pontificia Universidad Catolica de Chile -------------- 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 vincent.ngai at gmail.com Fri Aug 22 21:49:32 2014 From: vincent.ngai at gmail.com (vincent ngai) Date: Sat, 23 Aug 2014 09:49:32 +0800 Subject: [ITK] [ITK-users] Silly question on itk::Matrix In-Reply-To: <0BBC89C9-0F67-48F1-99F4-AC89AF5C394B@gmail.com> References: <0BBC89C9-0F67-48F1-99F4-AC89AF5C394B@gmail.com> Message-ID: Ah yes, so my question is why is the [] accessor not column major? If points are columns, the matrix elements for the Tx,Ty,Tz translation components should also be columnar? It just seems like extra work to need to get the matrix transpose just to do a Mat * P Regards, Vincent On Fri, Aug 22, 2014 at 7:14 PM, Jim Miller wrote: > ITK standard is that points are column vectors. Thus, matrix times a point > a point is defined as Mat * P > > Jim > > > On Aug 22, 2014, at 3:30 AM, vincent ngai > wrote: > > > > Hi all, pardon me for this silly question on itk::Matrix. Why do I need > to transpose a translation matrix after I copy the [x,y,z] translation > values to the matrix[3]. > > > > I know conceptually it should not really matter whether its row or col > major so long as you can > > post multiply or pre multiply with another vector. But the way > operator*() works only allows for > > Matrix * P, and when I test the simple case of TranslationMatrix * > Point, I would have to transpose the matrix. If I could also do Point * > TranslationMatrix, then i wouldn't need to transpose. > > > > Any ideas? > > > > -- > > Regards, > > Vincent > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > -- Regards, Vincent -------------- 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 millerjv at gmail.com Sat Aug 23 08:12:10 2014 From: millerjv at gmail.com (Jim Miller) Date: Sat, 23 Aug 2014 08:12:10 -0400 Subject: [ITK] [ITK-users] Silly question on itk::Matrix In-Reply-To: References: <0BBC89C9-0F67-48F1-99F4-AC89AF5C394B@gmail.com> Message-ID: Matrices and images are row major order. Points and vectors are column vectors. No transpose is necessary. You can index element by element directly to set the column you want. Row major ordering is more popular than column major ordering. I think there are regional preferences as to the"proper" way. I also think electrical engineers prefer one way whereas mechanical engineers prefer the other. Probably is partially based on how disciplines view the composition of coordinate frames (inside out or outside in). Some systems allow you to use either convention. We found that leads to a lot of confusion and errors. So 15 years ago, when we started ITK, we chose to pick a single standard for the code. Jim > On Aug 22, 2014, at 9:49 PM, vincent ngai wrote: > > Ah yes, so my question is why is the [] accessor not column major? If points are columns, the matrix elements for the Tx,Ty,Tz translation components should also be columnar? It just seems like extra work to need to get the matrix transpose just to do a Mat * P > > Regards, > Vincent > > >> On Fri, Aug 22, 2014 at 7:14 PM, Jim Miller wrote: >> ITK standard is that points are column vectors. Thus, matrix times a point a point is defined as Mat * P >> >> Jim >> >> > On Aug 22, 2014, at 3:30 AM, vincent ngai wrote: >> > >> > Hi all, pardon me for this silly question on itk::Matrix. Why do I need to transpose a translation matrix after I copy the [x,y,z] translation values to the matrix[3]. >> > >> > I know conceptually it should not really matter whether its row or col major so long as you can >> > post multiply or pre multiply with another vector. But the way operator*() works only allows for >> > Matrix * P, and when I test the simple case of TranslationMatrix * Point, I would have to transpose the matrix. If I could also do Point * TranslationMatrix, then i wouldn't need to transpose. >> > >> > Any ideas? >> > >> > -- >> > Regards, >> > Vincent >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users > > > > -- > Regards, > Vincent -------------- 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 gowithking at googlemail.com Sat Aug 23 09:41:01 2014 From: gowithking at googlemail.com (gowith king) Date: Sat, 23 Aug 2014 15:41:01 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: update : following Mr. Popoff 's instruction, I add these few command to active ldconfig - cd /etc/ld.so.conf.d/ - add a file called itk-46.conf, which should contain only one line: /usr/local/lib - ldconfig # tells the system to read the files in ld.so.conf.d - then python - import itk - itk.image - lots warning reported : - Warning: Unknown parameter 'itk::Matrix< float, 2, 2 >' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::Matrix< double, 2, 2 >' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::Matrix< float, 3, 3 >' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::Matrix< double, 3, 3 >' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,2,2,double,double,double >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,3,3,double,double,double >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix ,2,2,float,float,itk::Matrix >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix ,3,3,float,float,itk::Matrix >' in template 'itk::PointSet' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::Mesh' Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::Mesh' Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::Mesh' Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::Mesh' Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultStaticMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter' Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultDynamicMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter' Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultStaticMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter' Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultDynamicMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter' On Fri, Aug 22, 2014 at 6:13 PM, gowith king wrote: > I recorded my procedure as follow: > cd ~ > git clone git://itk.org/ITK.git > cd ITK > git pull > mkdir BUILD > cd BUILD > ccmake .. > in the ccmake configure options the follow flags were selected: > BUILD_EXAMPLES > OFF > BUILD_SHARED_LIBS > ON > BUILD_TESTING > OFF > CMAKE_BUILD_TYPE Release > ITK_WRAP_PERL > OFF > ITK_WRAP_PYTHON ON > PERL_EXECUTABLE > /usr/bin/perl > PYTHON_EXECUTABLE > /usr/bin/python > PYTHON_INCLUDE_DIR > /usr/include/python2.7 > PYTHON_LIBRARY /usr/lib/libpython2.7.so > > PY_SITE_PACKAGES_PATH > /usr/lib/python2.7/dist-packages > SCPCOMMAND /usr/bin/scp > > Then the configure warning of executable and library mismatch comes, > ignore the warning > g to generation > sudo make > sudo make install > > for the test : > python > >>>import itk > >>> inputimage=itk.Image[itk.UC,3] --- errors report here : > in eclispe : undefined variable from import UC > in terminal :Traceback (most recent call last): > > File "", line 1, in > File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in > __getattribute__ > itkBase.LoadModule(module, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule > module = loader.load(swigModuleName) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load > return imp.load_module(name, fp, pathname, description) > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in > > _ITKCommonPython = swig_import_helper() > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in > swig_import_helper > _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) > ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No > such file or directory > > > > > > > On Fri, Aug 22, 2014 at 5:55 PM, gowith king > wrote: > >> Please keep the discussion on the mailing list :) >> >> This is my first post in mailing list system " if this is a sort of >> system, :)" >> I guess that means I should always do not forget to cc to community? or >> what else should I do to keep it? >> >> >> Okay, so you will have to find the paths to the right folders/files to be >> consistent in your python choice. >> >> >> I have no idea Howto identify the python2.7.3 working library, normally >> they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a >> similar .so file in /usr/lib/libpython2.7.so . >> However in your instruction :PYTHON_LIBRARY = >> /usr/lib64/libpython2.7.so.1.0 >> The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/ >> libpython2.7.so.1.0 ; should I use this file? >> >> I would be happy if you could communicate me the paths for Ubuntu 12.04, >> so I could extend the installation procedure. >> >> How could I send you the path of ubuntu 12.04? I can try to switch on a >> remote assistant if necessary. >> >> >> Seems on ubuntu the procedure is the same for loading the shared >> libraries: >> >> http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib >> On Ubuntu you should have a /etc/ld.so.conf file. Then you should run >> ldconfig. >> >> >> On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff >> wrote: >> >>> Please keep the discussion on the mailing list :) >>> >>> Okay, so you will have to find the paths to the right folders/files to >>> be consistent in your python choice. >>> I would be happy if you could communicate me the paths for Ubuntu 12.04, >>> so I could extend the installation procedure. >>> >>> Seems on ubuntu the procedure is the same for loading the shared >>> libraries: >>> >>> http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib >>> On Ubuntu you should have a /etc/ld.so.conf file. Then you should run >>> ldconfig. >>> >>> Michka >>> >>> On 22 ao?t 2014, at 17:21, gowith king >>> wrote: >>> >>> Dear Popoff >>> I am using Ubuntu 12.04 LTS. the warning is the mismatching of >>> python library and python executable : python executable "2.7.3" and >>> library "" is mismatched. Here is the option setting: >>> >>> >>> PYTHON_EXECUTABLE >>> /usr/bin/python >>> PYTHON_INCLUDE_DIR >>> /usr/include/python2.7 >>> PYTHON_LIBRARY /usr/lib/libpython2.7.so >>> >>> PY_SITE_PACKAGES_PATH >>> /usr/lib/python2.7/dist-packages >>> >>> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . >>> >>> I do have few python versions been installed in the same OS. >>> The flags in the instruction of ' >>> http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' >>> are not exact as the same as the description. I will try your instruction >>> step be step in my system. >>> By the way, your instruction is so practical. >>> >>> Have a nice day. >>> >>> >>> >>> >>> >>> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff >>> wrote: >>> >>>> Hi >>>> >>>> Some important questions first: >>>> >>>> What was the warning for the library mismatch ? >>>> On what OS are you installing ? >>>> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? >>>> >>>> If the warnings were about the python library, it is quite important. >>>> It may happen that you have two different python installations, and >>>> cmake is not able to find the right libraries. >>>> >>>> I wrote some instructions to install ITK with python wrapping on Fedora >>>> http://www.itk.org/Wiki/ITK/WrapITKInstallFedora >>>> There is a list of cmake flags you can set to help cmake find the right >>>> python, if it?s the problem you had. >>>> I think the error is just because the library is not in your path. If >>>> you are using Fedora, just follow the instructions I wrote down. >>>> For other OS?es there are ways to do this, like setting the >>>> LD_LIBRARY_PATH for example (you'll have to google this) >>>> >>>> Feedback is welcome so I can improve the installation instructions :) >>>> >>>> Michka >>>> >>>> On 22 ao?t 2014, at 16:06, gowith king >>>> wrote: >>>> >>>> >>>> >>>> ---------- Forwarded message ---------- >>>> From: gowith king >>>> Date: Fri, Aug 22, 2014 at 1:32 PM >>>> Subject: ITK and python wrap problem >>>> To: community at itk.org >>>> >>>> >>>> Dear ITK friends >>>> I am not sure this is an appropriate place to issue my problem in >>>> the wrapping process: >>>> I followed the instruction of ' >>>> http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' >>>> to finish the compiling and installing process. it look good so far except >>>> a warning of mismatching library version, I think it could be ignored. >>>> Then I tried one line for test : >>>> >>> import itk >>>> >>> inputimage=itk.Image[itk.UC,3] >>>> Traceback (most recent call last): >>>> File "", line 1, in >>>> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in >>>> __getattribute__ >>>> itkBase.LoadModule(module, namespace) >>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>> LoadModule >>>> LoadModule(dep, namespace) >>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>> LoadModule >>>> LoadModule(dep, namespace) >>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>> LoadModule >>>> LoadModule(dep, namespace) >>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>> LoadModule >>>> LoadModule(dep, namespace) >>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in >>>> LoadModule >>>> module = loader.load(swigModuleName) >>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >>>> return imp.load_module(name, fp, pathname, description) >>>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >>>> >>>> _ITKCommonPython = swig_import_helper() >>>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in >>>> swig_import_helper >>>> _mod = imp.load_module('_ITKCommonPython', fp, pathname, >>>> description) >>>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: >>>> No such file or directory >>>> >>>> I got totally lost for this, what should I do to fix this? >>>> Any suggestion would be appreciated >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Community mailing list >>>> Community at itk.org >>>> http://public.kitware.com/mailman/listinfo/community >>>> >>>> >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Sat Aug 23 09:49:09 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Sat, 23 Aug 2014 15:49:09 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: <7E0D1109-E4CA-484A-9110-AF53E616BE45@gmail.com> Yes, these warnings are known, it?s because we did not finish and clean up all the wrappings. I changed the code some time ago for the warnings, you may disable them following the instructions below. This is a temporary solution, until we get this sorted out. Users can now disable warnings with the following lines before importing ITK : import warnings warnings.filterwarnings("ignore?) import itk or by running python with : python -W ignore foo.py On 23 ao?t 2014, at 15:41, gowith king wrote: > update : > following Mr. Popoff 's instruction, I add these few command to active ldconfig > cd /etc/ld.so.conf.d/ > add a file called itk-46.conf, which should contain only one line: /usr/local/lib > ldconfig # tells the system to read the files in ld.so.conf.d > then python > import itk > itk.image > lots warning reported : > Warning: Unknown parameter 'itk::Matrix< float, 2, 2 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< double, 2, 2 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< float, 3, 3 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< double, 3, 3 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,2,2,double,double,double >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,3,3,double,double,double >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix ,2,2,float,float,itk::Matrix >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix ,3,3,float,float,itk::Matrix >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultStaticMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultDynamicMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultStaticMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultDynamicMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter' > > > > > On Fri, Aug 22, 2014 at 6:13 PM, gowith king wrote: > I recorded my procedure as follow: > cd ~ > git clone git://itk.org/ITK.git > cd ITK > git pull > mkdir BUILD > cd BUILD > ccmake .. > in the ccmake configure options the follow flags were selected: > BUILD_EXAMPLES OFF > BUILD_SHARED_LIBS ON > BUILD_TESTING OFF > CMAKE_BUILD_TYPE Release > ITK_WRAP_PERL OFF > ITK_WRAP_PYTHON ON > PERL_EXECUTABLE /usr/bin/perl > PYTHON_EXECUTABLE /usr/bin/python > PYTHON_INCLUDE_DIR /usr/include/python2.7 > PYTHON_LIBRARY /usr/lib/libpython2.7.so > PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages > SCPCOMMAND /usr/bin/scp > > Then the configure warning of executable and library mismatch comes, ignore the warning > g to generation > sudo make > sudo make install > > for the test : > python > >>>import itk > >>> inputimage=itk.Image[itk.UC,3] --- errors report here : > in eclispe : undefined variable from import UC > in terminal :Traceback (most recent call last): > > File "", line 1, in > File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ > itkBase.LoadModule(module, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule > module = loader.load(swigModuleName) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load > return imp.load_module(name, fp, pathname, description) > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in > _ITKCommonPython = swig_import_helper() > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper > _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) > ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory > > > > > > > On Fri, Aug 22, 2014 at 5:55 PM, gowith king wrote: > Please keep the discussion on the mailing list :) > > This is my first post in mailing list system " if this is a sort of system, :)" > I guess that means I should always do not forget to cc to community? or what else should I do to keep it? > > > Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. > > > I have no idea Howto identify the python2.7.3 working library, normally they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a similar .so file in /usr/lib/libpython2.7.so . > However in your instruction :PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0 > The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/libpython2.7.so.1.0 ; should I use this file? > > I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. > > How could I send you the path of ubuntu 12.04? I can try to switch on a remote assistant if necessary. > > > Seems on ubuntu the procedure is the same for loading the shared libraries: > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. > > > On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff wrote: > Please keep the discussion on the mailing list :) > > Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. > I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. > > Seems on ubuntu the procedure is the same for loading the shared libraries: > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. > > Michka > > On 22 ao?t 2014, at 17:21, gowith king wrote: > >> Dear Popoff >> I am using Ubuntu 12.04 LTS. the warning is the mismatching of python library and python executable : python executable "2.7.3" and library "" is mismatched. Here is the option setting: >> >> >> PYTHON_EXECUTABLE /usr/bin/python >> PYTHON_INCLUDE_DIR /usr/include/python2.7 >> PYTHON_LIBRARY /usr/lib/libpython2.7.so >> PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages >> >> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . >> >> I do have few python versions been installed in the same OS. >> The flags in the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' are not exact as the same as the description. I will try your instruction step be step in my system. >> By the way, your instruction is so practical. >> >> Have a nice day. >> >> >> >> >> >> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff wrote: >> Hi >> >> Some important questions first: >> >> What was the warning for the library mismatch ? >> On what OS are you installing ? >> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? >> >> If the warnings were about the python library, it is quite important. >> It may happen that you have two different python installations, and cmake is not able to find the right libraries. >> >> I wrote some instructions to install ITK with python wrapping on Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora >> There is a list of cmake flags you can set to help cmake find the right python, if it?s the problem you had. >> I think the error is just because the library is not in your path. If you are using Fedora, just follow the instructions I wrote down. >> For other OS?es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this) >> >> Feedback is welcome so I can improve the installation instructions :) >> >> Michka >> >> On 22 ao?t 2014, at 16:06, gowith king wrote: >> >>> >>> >>> ---------- Forwarded message ---------- >>> From: gowith king >>> Date: Fri, Aug 22, 2014 at 1:32 PM >>> Subject: ITK and python wrap problem >>> To: community at itk.org >>> >>> >>> Dear ITK friends >>> I am not sure this is an appropriate place to issue my problem in the wrapping process: >>> I followed the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. >>> Then I tried one line for test : >>> >>> import itk >>> >>> inputimage=itk.Image[itk.UC,3] >>> Traceback (most recent call last): >>> File "", line 1, in >>> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ >>> itkBase.LoadModule(module, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule >>> module = loader.load(swigModuleName) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >>> return imp.load_module(name, fp, pathname, description) >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >>> _ITKCommonPython = swig_import_helper() >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper >>> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) >>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory >>> >>> I got totally lost for this, what should I do to fix this? >>> Any suggestion would be appreciated >>> >>> >>> >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gowithking at googlemail.com Sat Aug 23 10:08:43 2014 From: gowithking at googlemail.com (gowith king) Date: Sat, 23 Aug 2014 16:08:43 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: That means the mismatching is not really matter and the essential problem is the valence of idconfig activation. So I will write a summary to end our discussion to emailling list and recommend your wrapping protocol, which should also work on Ubuntu. have a nice weekend. On Sat, Aug 23, 2014 at 3:41 PM, gowith king wrote: > update : > following Mr. Popoff 's instruction, I add these few command to active > ldconfig > > - cd /etc/ld.so.conf.d/ > - add a file called itk-46.conf, which should contain only one line: > /usr/local/lib > - ldconfig # tells the system to read the files in ld.so.conf.d > - then python > - import itk > - itk.image > - lots warning reported : > - Warning: Unknown parameter 'itk::Matrix< float, 2, 2 >' in template > 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< double, 2, 2 >' in template > 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< float, 3, 3 >' in template > 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< double, 3, 3 >' in template > 'itk::VectorContainer' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< > float,2,2,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< > float,2,2,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< > float,3,3,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< > float,3,3,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< > double,2,2,double,double,double >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< > double,3,3,double,double,double >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix > ,2,2,float,float,itk::Matrix >' in template > 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix > ,3,3,float,float,itk::Matrix >' in template > 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< > float,2,2,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< > float,2,2,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< > float,3,3,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< > float,3,3,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::CellInterface< float, > itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned > long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< > float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< double, > itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned > long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< > double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< float, > itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned > long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< > float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< double, > itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned > long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< > double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< float, > itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned > long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< > float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< double, > itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned > long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< > double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< float, > itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned > long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< > float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< double, > itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned > long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< > double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' > in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 > >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< > unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< > double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, > std::set< unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 > >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< > unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< > double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, > std::set< unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 > >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< > unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< > double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, > std::set< unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 > >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< > unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< > 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< > double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, > std::set< unsigned long, std::less< unsigned long > > >' in template > 'itk::CellInterface' > Warning: Unknown parameter 'itk::Mesh< > float,2,itk::DefaultStaticMeshTraits< float,2,2,float > >' in template > 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< > float,2,itk::DefaultDynamicMeshTraits< float,2,2,float > >' in template > 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< > float,3,itk::DefaultStaticMeshTraits< float,3,3,float > >' in template > 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< > float,3,itk::DefaultDynamicMeshTraits< float,3,3,float > >' in template > 'itk::MeshToMeshFilter' > > > > > > On Fri, Aug 22, 2014 at 6:13 PM, gowith king > wrote: > >> I recorded my procedure as follow: >> cd ~ >> git clone git://itk.org/ITK.git >> cd ITK >> git pull >> mkdir BUILD >> cd BUILD >> ccmake .. >> in the ccmake configure options the follow flags were selected: >> BUILD_EXAMPLES >> OFF >> BUILD_SHARED_LIBS >> ON >> BUILD_TESTING >> OFF >> CMAKE_BUILD_TYPE Release >> ITK_WRAP_PERL >> OFF >> ITK_WRAP_PYTHON ON >> PERL_EXECUTABLE >> /usr/bin/perl >> PYTHON_EXECUTABLE >> /usr/bin/python >> PYTHON_INCLUDE_DIR >> /usr/include/python2.7 >> PYTHON_LIBRARY /usr/lib/libpython2.7.so >> >> PY_SITE_PACKAGES_PATH >> /usr/lib/python2.7/dist-packages >> SCPCOMMAND /usr/bin/scp >> >> Then the configure warning of executable and library mismatch comes, >> ignore the warning >> g to generation >> sudo make >> sudo make install >> >> for the test : >> python >> >>>import itk >> >>> inputimage=itk.Image[itk.UC,3] --- errors report here : >> in eclispe : undefined variable from import UC >> in terminal :Traceback (most recent call last): >> >> File "", line 1, in >> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in >> __getattribute__ >> itkBase.LoadModule(module, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >> LoadModule(dep, namespace) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule >> module = loader.load(swigModuleName) >> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >> return imp.load_module(name, fp, pathname, description) >> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >> >> _ITKCommonPython = swig_import_helper() >> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in >> swig_import_helper >> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) >> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No >> such file or directory >> >> >> >> >> >> >> On Fri, Aug 22, 2014 at 5:55 PM, gowith king >> wrote: >> >>> Please keep the discussion on the mailing list :) >>> >>> This is my first post in mailing list system " if this is a sort of >>> system, :)" >>> I guess that means I should always do not forget to cc to community? or >>> what else should I do to keep it? >>> >>> >>> Okay, so you will have to find the paths to the right folders/files to >>> be consistent in your python choice. >>> >>> >>> I have no idea Howto identify the python2.7.3 working library, normally >>> they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a >>> similar .so file in /usr/lib/libpython2.7.so . >>> However in your instruction :PYTHON_LIBRARY = >>> /usr/lib64/libpython2.7.so.1.0 >>> The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/ >>> libpython2.7.so.1.0 ; should I use this file? >>> >>> I would be happy if you could communicate me the paths for Ubuntu 12.04, >>> so I could extend the installation procedure. >>> >>> How could I send you the path of ubuntu 12.04? I can try to switch on a >>> remote assistant if necessary. >>> >>> >>> Seems on ubuntu the procedure is the same for loading the shared >>> libraries: >>> >>> http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib >>> On Ubuntu you should have a /etc/ld.so.conf file. Then you should run >>> ldconfig. >>> >>> >>> On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff >>> wrote: >>> >>>> Please keep the discussion on the mailing list :) >>>> >>>> Okay, so you will have to find the paths to the right folders/files to >>>> be consistent in your python choice. >>>> I would be happy if you could communicate me the paths for Ubuntu >>>> 12.04, so I could extend the installation procedure. >>>> >>>> Seems on ubuntu the procedure is the same for loading the shared >>>> libraries: >>>> >>>> http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib >>>> On Ubuntu you should have a /etc/ld.so.conf file. Then you should run >>>> ldconfig. >>>> >>>> Michka >>>> >>>> On 22 ao?t 2014, at 17:21, gowith king >>>> wrote: >>>> >>>> Dear Popoff >>>> I am using Ubuntu 12.04 LTS. the warning is the mismatching of >>>> python library and python executable : python executable "2.7.3" and >>>> library "" is mismatched. Here is the option setting: >>>> >>>> >>>> PYTHON_EXECUTABLE >>>> /usr/bin/python >>>> PYTHON_INCLUDE_DIR >>>> /usr/include/python2.7 >>>> PYTHON_LIBRARY /usr/lib/libpython2.7.so >>>> >>>> PY_SITE_PACKAGES_PATH >>>> /usr/lib/python2.7/dist-packages >>>> >>>> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . >>>> >>>> I do have few python versions been installed in the same OS. >>>> The flags in the instruction of ' >>>> http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' >>>> are not exact as the same as the description. I will try your instruction >>>> step be step in my system. >>>> By the way, your instruction is so practical. >>>> >>>> Have a nice day. >>>> >>>> >>>> >>>> >>>> >>>> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff >>>> wrote: >>>> >>>>> Hi >>>>> >>>>> Some important questions first: >>>>> >>>>> What was the warning for the library mismatch ? >>>>> On what OS are you installing ? >>>>> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? >>>>> >>>>> If the warnings were about the python library, it is quite important. >>>>> It may happen that you have two different python installations, and >>>>> cmake is not able to find the right libraries. >>>>> >>>>> I wrote some instructions to install ITK with python wrapping on >>>>> Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora >>>>> There is a list of cmake flags you can set to help cmake find the >>>>> right python, if it?s the problem you had. >>>>> I think the error is just because the library is not in your path. If >>>>> you are using Fedora, just follow the instructions I wrote down. >>>>> For other OS?es there are ways to do this, like setting the >>>>> LD_LIBRARY_PATH for example (you'll have to google this) >>>>> >>>>> Feedback is welcome so I can improve the installation instructions :) >>>>> >>>>> Michka >>>>> >>>>> On 22 ao?t 2014, at 16:06, gowith king >>>>> wrote: >>>>> >>>>> >>>>> >>>>> ---------- Forwarded message ---------- >>>>> From: gowith king >>>>> Date: Fri, Aug 22, 2014 at 1:32 PM >>>>> Subject: ITK and python wrap problem >>>>> To: community at itk.org >>>>> >>>>> >>>>> Dear ITK friends >>>>> I am not sure this is an appropriate place to issue my problem >>>>> in the wrapping process: >>>>> I followed the instruction of ' >>>>> http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' >>>>> to finish the compiling and installing process. it look good so far except >>>>> a warning of mismatching library version, I think it could be ignored. >>>>> Then I tried one line for test : >>>>> >>> import itk >>>>> >>> inputimage=itk.Image[itk.UC,3] >>>>> Traceback (most recent call last): >>>>> File "", line 1, in >>>>> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in >>>>> __getattribute__ >>>>> itkBase.LoadModule(module, namespace) >>>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>>> LoadModule >>>>> LoadModule(dep, namespace) >>>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>>> LoadModule >>>>> LoadModule(dep, namespace) >>>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>>> LoadModule >>>>> LoadModule(dep, namespace) >>>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in >>>>> LoadModule >>>>> LoadModule(dep, namespace) >>>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in >>>>> LoadModule >>>>> module = loader.load(swigModuleName) >>>>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >>>>> return imp.load_module(name, fp, pathname, description) >>>>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >>>>> >>>>> _ITKCommonPython = swig_import_helper() >>>>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in >>>>> swig_import_helper >>>>> _mod = imp.load_module('_ITKCommonPython', fp, pathname, >>>>> description) >>>>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: >>>>> No such file or directory >>>>> >>>>> I got totally lost for this, what should I do to fix this? >>>>> Any suggestion would be appreciated >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Community mailing list >>>>> Community at itk.org >>>>> http://public.kitware.com/mailman/listinfo/community >>>>> >>>>> >>>>> >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Sat Aug 23 10:16:07 2014 From: michkapopoff at gmail.com (Michka Popoff) Date: Sat, 23 Aug 2014 16:16:07 +0200 Subject: [ITK] Fwd: ITK and python wrap problem In-Reply-To: References: <82D56167-AEA7-4672-8AD6-68712665163E@gmail.com> Message-ID: <6E017549-03E9-499E-9461-84EE13E220E8@gmail.com> Yes your initial problem was the ldconfig one. I?m glad it works for you now. Yes please if you have some notes on the protocol for Ubuntu, just send it to the list so that I can update it on the wiki. Michka On 23 ao?t 2014, at 16:08, gowith king wrote: > That means the mismatching is not really matter and the essential problem is the valence of idconfig activation. > So I will write a summary to end our discussion to emailling list and recommend your wrapping protocol, which should also work on Ubuntu. > have a nice weekend. > > > > On Sat, Aug 23, 2014 at 3:41 PM, gowith king wrote: > update : > following Mr. Popoff 's instruction, I add these few command to active ldconfig > cd /etc/ld.so.conf.d/ > add a file called itk-46.conf, which should contain only one line: /usr/local/lib > ldconfig # tells the system to read the files in ld.so.conf.d > then python > import itk > itk.image > lots warning reported : > Warning: Unknown parameter 'itk::Matrix< float, 2, 2 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< double, 2, 2 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< float, 3, 3 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::Matrix< double, 3, 3 >' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,2,2,double,double,double >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,3,3,double,double,double >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix ,2,2,float,float,itk::Matrix >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix ,3,3,float,float,itk::Matrix >' in template 'itk::PointSet' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::Mesh' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface' > Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultStaticMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultDynamicMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultStaticMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter' > Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultDynamicMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter' > > > > > On Fri, Aug 22, 2014 at 6:13 PM, gowith king wrote: > I recorded my procedure as follow: > cd ~ > git clone git://itk.org/ITK.git > cd ITK > git pull > mkdir BUILD > cd BUILD > ccmake .. > in the ccmake configure options the follow flags were selected: > BUILD_EXAMPLES OFF > BUILD_SHARED_LIBS ON > BUILD_TESTING OFF > CMAKE_BUILD_TYPE Release > ITK_WRAP_PERL OFF > ITK_WRAP_PYTHON ON > PERL_EXECUTABLE /usr/bin/perl > PYTHON_EXECUTABLE /usr/bin/python > PYTHON_INCLUDE_DIR /usr/include/python2.7 > PYTHON_LIBRARY /usr/lib/libpython2.7.so > PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages > SCPCOMMAND /usr/bin/scp > > Then the configure warning of executable and library mismatch comes, ignore the warning > g to generation > sudo make > sudo make install > > for the test : > python > >>>import itk > >>> inputimage=itk.Image[itk.UC,3] --- errors report here : > in eclispe : undefined variable from import UC > in terminal :Traceback (most recent call last): > > File "", line 1, in > File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ > itkBase.LoadModule(module, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule > LoadModule(dep, namespace) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule > module = loader.load(swigModuleName) > File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load > return imp.load_module(name, fp, pathname, description) > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in > _ITKCommonPython = swig_import_helper() > File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper > _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) > ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory > > > > > > > On Fri, Aug 22, 2014 at 5:55 PM, gowith king wrote: > Please keep the discussion on the mailing list :) > > This is my first post in mailing list system " if this is a sort of system, :)" > I guess that means I should always do not forget to cc to community? or what else should I do to keep it? > > > Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. > > > I have no idea Howto identify the python2.7.3 working library, normally they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a similar .so file in /usr/lib/libpython2.7.so . > However in your instruction :PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0 > The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/libpython2.7.so.1.0 ; should I use this file? > > I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. > > How could I send you the path of ubuntu 12.04? I can try to switch on a remote assistant if necessary. > > > Seems on ubuntu the procedure is the same for loading the shared libraries: > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. > > > On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff wrote: > Please keep the discussion on the mailing list :) > > Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice. > I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure. > > Seems on ubuntu the procedure is the same for loading the shared libraries: > http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib > On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig. > > Michka > > On 22 ao?t 2014, at 17:21, gowith king wrote: > >> Dear Popoff >> I am using Ubuntu 12.04 LTS. the warning is the mismatching of python library and python executable : python executable "2.7.3" and library "" is mismatched. Here is the option setting: >> >> >> PYTHON_EXECUTABLE /usr/bin/python >> PYTHON_INCLUDE_DIR /usr/include/python2.7 >> PYTHON_LIBRARY /usr/lib/libpython2.7.so >> PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages >> >> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . >> >> I do have few python versions been installed in the same OS. >> The flags in the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' are not exact as the same as the description. I will try your instruction step be step in my system. >> By the way, your instruction is so practical. >> >> Have a nice day. >> >> >> >> >> >> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff wrote: >> Hi >> >> Some important questions first: >> >> What was the warning for the library mismatch ? >> On what OS are you installing ? >> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ? >> >> If the warnings were about the python library, it is quite important. >> It may happen that you have two different python installations, and cmake is not able to find the right libraries. >> >> I wrote some instructions to install ITK with python wrapping on Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora >> There is a list of cmake flags you can set to help cmake find the right python, if it?s the problem you had. >> I think the error is just because the library is not in your path. If you are using Fedora, just follow the instructions I wrote down. >> For other OS?es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this) >> >> Feedback is welcome so I can improve the installation instructions :) >> >> Michka >> >> On 22 ao?t 2014, at 16:06, gowith king wrote: >> >>> >>> >>> ---------- Forwarded message ---------- >>> From: gowith king >>> Date: Fri, Aug 22, 2014 at 1:32 PM >>> Subject: ITK and python wrap problem >>> To: community at itk.org >>> >>> >>> Dear ITK friends >>> I am not sure this is an appropriate place to issue my problem in the wrapping process: >>> I followed the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. >>> Then I tried one line for test : >>> >>> import itk >>> >>> inputimage=itk.Image[itk.UC,3] >>> Traceback (most recent call last): >>> File "", line 1, in >>> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__ >>> itkBase.LoadModule(module, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule >>> LoadModule(dep, namespace) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule >>> module = loader.load(swigModuleName) >>> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load >>> return imp.load_module(name, fp, pathname, description) >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in >>> _ITKCommonPython = swig_import_helper() >>> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper >>> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) >>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory >>> >>> I got totally lost for this, what should I do to fix this? >>> Any suggestion would be appreciated >>> >>> >>> >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >> >> > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent.ngai at gmail.com Sun Aug 24 22:38:37 2014 From: vincent.ngai at gmail.com (vincent ngai) Date: Mon, 25 Aug 2014 10:38:37 +0800 Subject: [ITK] [ITK-users] Silly question on itk::Matrix In-Reply-To: References: <0BBC89C9-0F67-48F1-99F4-AC89AF5C394B@gmail.com> Message-ID: Hi Jim, thanks for the background, that clarified things for me. Regards, Vincent On Sat, Aug 23, 2014 at 8:12 PM, Jim Miller wrote: > Matrices and images are row major order. Points and vectors are column > vectors. > > No transpose is necessary. You can index element by element directly to > set the column you want. > > Row major ordering is more popular than column major ordering. I think > there are regional preferences as to the"proper" way. I also think > electrical engineers prefer one way whereas mechanical engineers prefer the > other. Probably is partially based on how disciplines view the composition > of coordinate frames (inside out or outside in). > > Some systems allow you to use either convention. We found that leads to a > lot of confusion and errors. So 15 years ago, when we started ITK, we chose > to pick a single standard for the code. > > Jim > > On Aug 22, 2014, at 9:49 PM, vincent ngai wrote: > > Ah yes, so my question is why is the [] accessor not column major? If > points are columns, the matrix elements for the Tx,Ty,Tz translation > components should also be columnar? It just seems like extra work to need > to get the matrix transpose just to do a Mat * P > > Regards, > Vincent > > > On Fri, Aug 22, 2014 at 7:14 PM, Jim Miller wrote: > >> ITK standard is that points are column vectors. Thus, matrix times a >> point a point is defined as Mat * P >> >> Jim >> >> > On Aug 22, 2014, at 3:30 AM, vincent ngai >> wrote: >> > >> > Hi all, pardon me for this silly question on itk::Matrix. Why do I need >> to transpose a translation matrix after I copy the [x,y,z] translation >> values to the matrix[3]. >> > >> > I know conceptually it should not really matter whether its row or col >> major so long as you can >> > post multiply or pre multiply with another vector. But the way >> operator*() works only allows for >> > Matrix * P, and when I test the simple case of TranslationMatrix * >> Point, I would have to transpose the matrix. If I could also do Point * >> TranslationMatrix, then i wouldn't need to transpose. >> > >> > Any ideas? >> > >> > -- >> > Regards, >> > Vincent >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > > > > -- > Regards, > Vincent > > -- Regards, Vincent -------------- 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 CHernando at telespazio.es Mon Aug 25 04:36:44 2014 From: CHernando at telespazio.es (Carlos Hernando Ramiro) Date: Mon, 25 Aug 2014 10:36:44 +0200 Subject: [ITK] [ITK-users] UseAllPixelsOn with Mutual Information In-Reply-To: <800D4DFDAF353641B990F5CEB49F05E179B9C9@GORDONS.aurensis.com> References: <800D4DFDAF353641B990F5CEB49F05E179B9C9@GORDONS.aurensis.com> Message-ID: <53FAF59C.3040602@telespazio.es> Dear all, is seems that the method UseAllPixelsOn() does not work for the class itkMutualInformationImageToImageMetric. Then, what I can do to assure that all the pixels of an specific region are used to calculate this metric? Is there any alternative to UseAllPixelsOn()? Best regards Carlos _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 chernando at telespazio.es Mon Aug 25 05:20:45 2014 From: chernando at telespazio.es (carlos) Date: Mon, 25 Aug 2014 02:20:45 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1408375248616-7586081.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> Message-ID: <1408958445955-7586112.post@n2.nabble.com> Dear Jan, I think that you can use the metric without optimizer, but that you need a transformation and an interpolator. You can use the translation transform (and the interpolator you prefer, although it will not influence): typedef itk::MutualInformationImageToImageMetric MIMetricType; MIMetricType::Pointer MImetric; typedef itk::TranslationTransform< double, ImageDimension > TransformType; TransformType::Pointer transform = TransformType::New(); MImetric->SetTransform(transform); and then call GetValue with the translation parameters [0,0] MIMetricType::TransformParametersType displacementMI(transform->ParametersDimension); displacementMI[0] = 0; displacementMI[1] = 0; MImetric->GetValue(displacementMI); Best regards Carlos -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586112.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 payalprajapati2808 at gmail.com Mon Aug 25 13:01:36 2014 From: payalprajapati2808 at gmail.com (mahi) Date: Mon, 25 Aug 2014 10:01:36 -0700 (PDT) Subject: [ITK] [ITK-users] Problem in computing Eigenvalue for swir band of hdf taken by Imager payload Message-ID: <1408986096189-34456.post@n7.nabble.com> Hello All, I am new to ITK.I want to compute eigenvalue of SWIR band of .h5 File.I have tried it using itkSymmetricEigenAnalysis and vnl_symmetric_eigen .Both Programs work fine for a .tiff file(which i am using for experimental purpose) having dimension 256*256 and it works fine. SWIR band has dimension of 11220*11264. so I made it of 11264*11264 by padding extra zeros at rows starting from 11221. My problem is when i apply both program on this extended matrix it shows no error but also doesnt give any output.It gets stuck...Am i going in a right direction or not?Why this happen?I have attached both code. itk_image_to_matrix.cxx newsvd.cxx Q_matrixfinal.cxx Any help would be appriciated. Thank You, Payal -- View this message in context: http://itk-users.7.n7.nabble.com/Problem-in-computing-Eigenvalue-for-swir-band-of-hdf-taken-by-Imager-payload-tp34456.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 mercikd at thomas.edu Mon Aug 25 14:44:28 2014 From: mercikd at thomas.edu (Dan Mercik) Date: Mon, 25 Aug 2014 18:44:28 +0000 Subject: [ITK] [ITK-users] Tiling Side by Side Question Message-ID: <5d84846dd31f482d88152b7c19c56632@T9.tcnet.thomas.edu> Hey, I have 7 images to tile but only want 2 images to be tile horizontally and the other 5 other images to be tile vertically. When I declare the layouts like layout[0] = 2; layout[1] = 5; The x axis is always being filled. Is it possible to not fill that tile with an image? Daniel Mercik Computer Science Major Service Desk Technician Thomas College _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 millerjv at gmail.com Mon Aug 25 15:42:04 2014 From: millerjv at gmail.com (Jim Miller) Date: Mon, 25 Aug 2014 15:42:04 -0400 Subject: [ITK] [ITK-users] Tiling Side by Side Question In-Reply-To: <5d84846dd31f482d88152b7c19c56632@T9.tcnet.thomas.edu> References: <5d84846dd31f482d88152b7c19c56632@T9.tcnet.thomas.edu> Message-ID: In this, I think you want to cascade two TileImage filters. One to tile the first two images horizontally. The second to Tile that result with your others vertically. Jim > On Aug 25, 2014, at 2:44 PM, Dan Mercik wrote: > > Hey, > > I have 7 images to tile but only want 2 images to be tile horizontally and the other 5 other images to be tile vertically. When I declare the layouts like > > layout[0] = 2; > > layout[1] = 5; > > The x axis is always being filled. Is it possible to not fill that tile with an image? > > > > Daniel Mercik > > Computer Science Major > > Service Desk Technician > > Thomas College > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Aug 25 23:31:16 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 25 Aug 2014 23:31:16 -0400 Subject: [ITK] [ITK-dev] Problem with itkPCAShapeSignedDistanceFunction in multithreaded environment when using a 'dense' solver In-Reply-To: References: Message-ID: Hi Yves, Yes, your comments are very welcome. Thank you for discussing this issue with the list! Regarding the issue described and the patch, I think it is a good start. As you not, the smart pointers are not very effective from an efficiency perspect, and it would be fine to replace them by raw pointer since there is no issue with ownership or life time management. However, the thread-safety is still an issue. Digging into the code, it looks like the m_Selectors member in PCAShapeSignedDistanceFunction can be removed altogether. Please review this patch: http://review.source.kitware.com/#/c/16824/ Thanks, Matt On Mon, Aug 18, 2014 at 10:30 AM, Yves Frederix wrote: > Hi all, > > I am writing you with a crash I encountered while experimenting with > the GeodesicActiveContour image filter with shape guidance. Although > I did not find the root cause of the problem, I did implement a small > change which might be a useful contribution. > > Currently, the GeodesicActiveContourShapePriorLevelSetImageFilter is > based on a SparseField solver. For my application, this was not very > suitable and I implemented a version of this image filter based on a > dense solver. After doing this, however, I consistently experienced a > crash in the algorithm when more than one thread was used. After some > debugging, I tracked down the problem to > itkPCAShapeSignedDistanceFunction, which contains a smart pointer > member variable which caused the crash in the multithreaded run. In > particular, it seemed to me that the reference counting somehow got > confused, and things went wrong. > I did not feel comfortable enough to dig deeper into the root cause of > the problem, but I did do a simple fix to the > itkPCAShapeSignedDistanceFunction code that avoids the problem, which > I would like to share (see attach). Basically, I replaced the > problematic reference counting member variable by a raw pointer, so > that during iteration no reference counting takes place. In this > particular case, I think that this change does not impose any risks as > there is no issue with ownership or life time management. > > I am unsure if this mailing list is the best or correct medium to > report this, so if not, please point me to the right direction. If > somebody would be interested in looking at the root cause of this > issue, I should be able to provide some code to reproduce the crash. > Just let me know. > > Best regards, > Yves > > _______________________________________________ > Powered by www.kitware.com > > 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 Mon Aug 25 23:46:52 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 25 Aug 2014 23:46:52 -0400 Subject: [ITK] [ITK-users] Composite Filter with variable stdvector of filters inside In-Reply-To: References: Message-ID: Hi Ignacio, If I understand corrections, this may do want is desired: void SetNumberOfZSlices( int slices ) { if( m_NumberOfZSlices != slices ) { this->m_NumberOfZSlices = slices; this->UpdateNumberOfFilters(); this->Modified(); } } and a similar implementation for SetNumberOfTimeFrames(). Hope this helps, Matt On Wed, Aug 20, 2014 at 11:00 AM, Jose Ignacio Prieto wrote: > Hi all, > I am trying to create a composite filter for a 4D dataset that will use > different cascaded 2D filters on the inside. For this, I have created a > double std vector that holds all the 2D filters. I have also set some param > setters for this filters (that perform a double for inside, setting the > param to each filter and then calling modified() on the outside one). I have > another method called UpdateNumberofFilters, that depending on 2 ints (num > of Z slices, num of T timeframes) will push back more filters to the 2D > array of filters. > My problem is that I dont know which function should call the > UpdateNumofFilters. It should be done before the setters but after the > constructor and after setting those two ints. I want to design it so that if > I change a param after calling update I dont have to run the whole filter > again, so I dont want it to be under the GenerateData() method. > > Thank you very much for your insights. > > Ignacio Prieto > > -- > Ignacio Prieto > Research Assistant > Biomedical Imaging Center > Pontificia Universida Catolica de Chile > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 yves.frederix+itk at gmail.com Tue Aug 26 02:42:17 2014 From: yves.frederix+itk at gmail.com (Yves Frederix) Date: Tue, 26 Aug 2014 08:42:17 +0200 Subject: [ITK] [ITK-dev] Problem with itkPCAShapeSignedDistanceFunction in multithreaded environment when using a 'dense' solver In-Reply-To: References: Message-ID: Hi Matt, You are right, the troublesome member variable can be removed entirely, making your solution the correct fix. Thank you. Best regards, Yves On Tue, Aug 26, 2014 at 5:31 AM, Matt McCormick wrote: > Hi Yves, > > Yes, your comments are very welcome. Thank you for discussing this > issue with the list! > > Regarding the issue described and the patch, I think it is a good > start. As you not, the smart pointers are not very effective from an > efficiency perspect, and it would be fine to replace them by raw > pointer since there is no issue with ownership or life time > management. However, the thread-safety is still an issue. Digging > into the code, it looks like the m_Selectors member in > PCAShapeSignedDistanceFunction can be removed altogether. Please > review this patch: > > http://review.source.kitware.com/#/c/16824/ > > Thanks, > Matt > > On Mon, Aug 18, 2014 at 10:30 AM, Yves Frederix > wrote: >> Hi all, >> >> I am writing you with a crash I encountered while experimenting with >> the GeodesicActiveContour image filter with shape guidance. Although >> I did not find the root cause of the problem, I did implement a small >> change which might be a useful contribution. >> >> Currently, the GeodesicActiveContourShapePriorLevelSetImageFilter is >> based on a SparseField solver. For my application, this was not very >> suitable and I implemented a version of this image filter based on a >> dense solver. After doing this, however, I consistently experienced a >> crash in the algorithm when more than one thread was used. After some >> debugging, I tracked down the problem to >> itkPCAShapeSignedDistanceFunction, which contains a smart pointer >> member variable which caused the crash in the multithreaded run. In >> particular, it seemed to me that the reference counting somehow got >> confused, and things went wrong. >> I did not feel comfortable enough to dig deeper into the root cause of >> the problem, but I did do a simple fix to the >> itkPCAShapeSignedDistanceFunction code that avoids the problem, which >> I would like to share (see attach). Basically, I replaced the >> problematic reference counting member variable by a raw pointer, so >> that during iteration no reference counting takes place. In this >> particular case, I think that this change does not impose any risks as >> there is no issue with ownership or life time management. >> >> I am unsure if this mailing list is the best or correct medium to >> report this, so if not, please point me to the right direction. If >> somebody would be interested in looking at the root cause of this >> issue, I should be able to provide some code to reproduce the crash. >> Just let me know. >> >> Best regards, >> Yves >> >> _______________________________________________ >> Powered by www.kitware.com >> >> 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 jan.bergmeier at imes.uni-hannover.de Tue Aug 26 09:08:26 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Tue, 26 Aug 2014 06:08:26 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1408958445955-7586112.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> <1408958445955-7586112.post@n2.nabble.com> Message-ID: <1409058506727-7586118.post@n2.nabble.com> Dear Carlos, thank you for your help. i'm still experiencing some difficulties. I tried your proposed way like this: typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, UChar2DImageType > MetricType; typedef itk::TranslationTransform< double, 2 > TransformType; typedef itk::GradientDescentOptimizer OptimizerType; MetricType::Pointer metric = MetricType::New(); TransformType::Pointer transform = TransformType::New(); MetricType::TransformParametersType displacement( transform->ParametersDimension ); displacement[0] = 0.0; displacement[1] = 0.0; metric->SetFixedImage( fixedImage ); metric->SetMovingImage( movingImage); metric->SetTransform( transform ); metric->GetValue( displacement ); When I am trying to get the MI-value with the displacement parameters, my program crashes. i tried another way with an optimizer that does only one iteration: typedef itk::TranslationTransform< double, 2 > TransformType; typedef itk::GradientDescentOptimizer OptimizerType; typedef itk::LinearInterpolateImageFunction< UChar2DImageType, double > InterpolatorType; typedef itk::ImageRegistrationMethod< UChar2DImageType, UChar2DImageType > RegistrationType; typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, UChar2DImageType > MetricType; typedef RegistrationType::ParametersType ParametersType; TransformType::Pointer transform = TransformType::New(); OptimizerType::Pointer optimizer = OptimizerType::New(); InterpolatorType::Pointer interpolator = InterpolatorType::New(); RegistrationType::Pointer registration = RegistrationType::New(); MetricType::Pointer metric = MetricType::New(); registration->SetOptimizer( optimizer ); registration->SetTransform( transform ); registration->SetInterpolator( interpolator ); registration->SetMetric( metric ); registration->SetFixedImage( fixedImage ); registration->SetMovingImage( movingImage ); ParametersType initialParameters( transform->GetNumberOfParameters() ); initialParameters[0] = 0.0; initialParameters[1] = 0.0; registration->SetInitialTransformParameters( initialParameters ); optimizer->SetNumberOfIterations( 1 ); try { registration->Update(); } catch( itk::ExceptionObject & err ) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; } double bestValue = optimizer->GetValue(); The problem here is that I get the following Error: "Description: itk::ERROR: MutualInformationImageToImageMetric(0x48e0860): Standard deviation is too small" Any suggestions for a convenient solution? Thanks, Jan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586118.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 gass at vision.ee.ethz.ch Tue Aug 26 09:22:33 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Tue, 26 Aug 2014 15:22:33 +0200 Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1408375248616-7586081.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> Message-ID: Hi Jan, ITK also offers a convenient identity transform for this: http://www.itk.org/Doxygen/html/classitk_1_1IdentityTransform.html Hope that helps, Tobias 2014-08-18 17:20 GMT+02:00 jan : > Hello, > > I want to perform a registration between two images without any > transformation or optimization. I like to use the > itk::MutualInformationImageToImageMetric. As I understand the itk metric, > you have to use a transformation, an optimizer, an interpolator and so on. > > I want to compare one image to a set of images with mutual information as > metric. > > So basically, I like to use the GetValue() method, without giving any > parameters to it. Is there a way to do that, or another way to get just one > mutual information value between two images? > > Thanks in advance, > > Jan > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081.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 jan.bergmeier at imes.uni-hannover.de Tue Aug 26 09:31:46 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Tue, 26 Aug 2014 06:31:46 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: References: <1408375248616-7586081.post@n2.nabble.com> Message-ID: <1409059906690-7586120.post@n2.nabble.com> Hi, my attempt with the identity transform would be this: typedef itk::IdentityTransform< double, 2 > TransformType; typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, UChar2DImageType > MetricType; TransformType::Pointer transform = TransformType::New(); MetricType::Pointer metric = MetricType::New(); metric->SetFixedImage( fixedImage ); metric->SetMovingImage( movingImage ); metric->GetValue( transform->GetParameters() ); For me it's the same problem. The program crashes when I use GetValue(). It seems to me as if the parameters need to be OptimizerParameters.... Thanks, Jan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586120.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 gass at vision.ee.ethz.ch Tue Aug 26 09:36:46 2014 From: gass at vision.ee.ethz.ch (Tobias Gass) Date: Tue, 26 Aug 2014 15:36:46 +0200 Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1409059906690-7586120.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> Message-ID: Have you checked whether your images are physically overlapping? You could also try to change the number of MI samples to avoid accidentally sampling only from homogeneous regions. Best of luck, Tobias 2014-08-26 15:31 GMT+02:00 jan : > Hi, > > my attempt with the identity transform would be this: > > typedef itk::IdentityTransform< double, 2 > TransformType; > typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, > UChar2DImageType > MetricType; > > TransformType::Pointer transform = TransformType::New(); > MetricType::Pointer metric = MetricType::New(); > > metric->SetFixedImage( fixedImage ); > metric->SetMovingImage( movingImage ); > metric->GetValue( transform->GetParameters() ); > > For me it's the same problem. The program crashes when I use GetValue(). It > seems to me as if the parameters need to be OptimizerParameters.... > > Thanks, > Jan > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586120.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 joseignacio.prieto at gmail.com Tue Aug 26 09:38:16 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Tue, 26 Aug 2014 09:38:16 -0400 Subject: [ITK] [ITK-users] Composite Filter with variable stdvector of filters inside In-Reply-To: References: Message-ID: Thanks Matt, my problem was that I didn't know when to call this methods. I finally put them into GenerateInputRequestedRegion and this way seems to be called before Update(). I don't know under what conditions GenerateInputRequestedRegion is called, for example if a parameter is changed after an update call, will it be called again or only GenerateData would be called. Is there a good developer manual? The ITK user manual seems a little short on this. Thanks Ignacio Prieto On Mon, Aug 25, 2014 at 11:46 PM, Matt McCormick wrote: > Hi Ignacio, > > If I understand corrections, this may do want is desired: > > void SetNumberOfZSlices( int slices ) > { > if( m_NumberOfZSlices != slices ) > { > this->m_NumberOfZSlices = slices; > this->UpdateNumberOfFilters(); > this->Modified(); > } > } > > and a similar implementation for SetNumberOfTimeFrames(). > > Hope this helps, > Matt > > On Wed, Aug 20, 2014 at 11:00 AM, Jose Ignacio Prieto > wrote: > > Hi all, > > I am trying to create a composite filter for a 4D dataset that will use > > different cascaded 2D filters on the inside. For this, I have created a > > double std vector that holds all the 2D filters. I have also set some > param > > setters for this filters (that perform a double for inside, setting the > > param to each filter and then calling modified() on the outside one). I > have > > another method called UpdateNumberofFilters, that depending on 2 ints > (num > > of Z slices, num of T timeframes) will push back more filters to the 2D > > array of filters. > > My problem is that I dont know which function should call the > > UpdateNumofFilters. It should be done before the setters but after the > > constructor and after setting those two ints. I want to design it so > that if > > I change a param after calling update I dont have to run the whole filter > > again, so I dont want it to be under the GenerateData() method. > > > > Thank you very much for your insights. > > > > Ignacio Prieto > > > > -- > > Ignacio Prieto > > Research Assistant > > Biomedical Imaging Center > > Pontificia Universida Catolica de Chile > > > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -- Jos? Ignacio Prieto celular(nuevo): 94348182 -------------- 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 jan.bergmeier at imes.uni-hannover.de Tue Aug 26 10:17:05 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Tue, 26 Aug 2014 07:17:05 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> Message-ID: <1409062625902-7586123.post@n2.nabble.com> Increasing the NumberOfSpatialSamples fixes the way with the one-iteration optimizer but unfortunately not the attempts without the optimizer (which I would prefer, since I like to keep it simple). -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586123.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 joseignacio.prieto at gmail.com Tue Aug 26 11:35:50 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Tue, 26 Aug 2014 11:35:50 -0400 Subject: [ITK] [ITK-dev] Create PolygonToMeshFilter Message-ID: Hi all, I am trying to create a filter that receives many 2D polygons in the form of PolyLineParametricPath (which in turn has an itkImage as input) and returns an itkMesh for later visualization. I have completed the GenerateData() method by calling internally to itkAutomaticTopologyMeshSource. The problem seems to be that before GenerateData, the filter fails in itkPointSet::CopyInformation (because it tries to cast the polygon as a mesh). I discovered that the call stack comes from UpdateOutputInformation on my PolygonToMeshFilter and then GenerateOutputInformation, then itkMesh::CopyInformation and itkPointset::CopyInformation. I think I should edit my PolygonToMesh::GenerateOutputInformation() but I don't know how. Inside it I just called Superclass::GenerateOutputInformation. My filter PolygonToMeshFilter is a copy of MeshToMesh filter and inherits from MeshSource. Maybe I should inherit from anothe filter. Thank you very much Ignacio Prieto -- Ignacio Prieto Research Assistant Biomedical Imaging Center Pontificia Universidad Catolica de Chile -------------- 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 joseignacio.prieto at gmail.com Tue Aug 26 11:35:50 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Tue, 26 Aug 2014 11:35:50 -0400 Subject: [ITK] [ITK-users] Create PolygonToMeshFilter Message-ID: Hi all, I am trying to create a filter that receives many 2D polygons in the form of PolyLineParametricPath (which in turn has an itkImage as input) and returns an itkMesh for later visualization. I have completed the GenerateData() method by calling internally to itkAutomaticTopologyMeshSource. The problem seems to be that before GenerateData, the filter fails in itkPointSet::CopyInformation (because it tries to cast the polygon as a mesh). I discovered that the call stack comes from UpdateOutputInformation on my PolygonToMeshFilter and then GenerateOutputInformation, then itkMesh::CopyInformation and itkPointset::CopyInformation. I think I should edit my PolygonToMesh::GenerateOutputInformation() but I don't know how. Inside it I just called Superclass::GenerateOutputInformation. My filter PolygonToMeshFilter is a copy of MeshToMesh filter and inherits from MeshSource. Maybe I should inherit from anothe filter. Thank you very much Ignacio Prieto -- Ignacio Prieto Research Assistant Biomedical Imaging Center Pontificia Universidad Catolica de Chile -------------- 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 Aug 26 11:38:34 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 26 Aug 2014 11:38:34 -0400 Subject: [ITK] [ITK-users] Composite Filter with variable stdvector of filters inside In-Reply-To: References: Message-ID: Hi Ignacio, GenerateInputRequestedRegion() may be a good place, too. When an Update() is called, GenerateInputRequestedRegion() will get called during the pipeline update if the filter's Modified time indicates this is necessary. If the filter needs to be updated, the GenerateData will also get called as appropriate. The best manual I am aware of is the ITK Software Guide [1]. More information on this subject comes in Section 8.3.2 Details of Pipeline Execution and section 8.3 Streaming Large Data. HTH, Matt [1] http://sourceforge.net/projects/itk/files/itk/4.6/InsightSoftwareGuide-Book1-4.6.0.pdf/download On Tue, Aug 26, 2014 at 9:38 AM, Jose Ignacio Prieto wrote: > Thanks Matt, my problem was that I didn't know when to call this methods. I > finally put them into GenerateInputRequestedRegion and this way seems to be > called before Update(). I don't know under what conditions > GenerateInputRequestedRegion is called, for example if a parameter is > changed after an update call, will it be called again or only GenerateData > would be called. Is there a good developer manual? The ITK user manual seems > a little short on this. > > Thanks > > Ignacio Prieto > > > On Mon, Aug 25, 2014 at 11:46 PM, Matt McCormick > wrote: >> >> Hi Ignacio, >> >> If I understand corrections, this may do want is desired: >> >> void SetNumberOfZSlices( int slices ) >> { >> if( m_NumberOfZSlices != slices ) >> { >> this->m_NumberOfZSlices = slices; >> this->UpdateNumberOfFilters(); >> this->Modified(); >> } >> } >> >> and a similar implementation for SetNumberOfTimeFrames(). >> >> Hope this helps, >> Matt >> >> On Wed, Aug 20, 2014 at 11:00 AM, Jose Ignacio Prieto >> wrote: >> > Hi all, >> > I am trying to create a composite filter for a 4D dataset that will use >> > different cascaded 2D filters on the inside. For this, I have created a >> > double std vector that holds all the 2D filters. I have also set some >> > param >> > setters for this filters (that perform a double for inside, setting the >> > param to each filter and then calling modified() on the outside one). I >> > have >> > another method called UpdateNumberofFilters, that depending on 2 ints >> > (num >> > of Z slices, num of T timeframes) will push back more filters to the 2D >> > array of filters. >> > My problem is that I dont know which function should call the >> > UpdateNumofFilters. It should be done before the setters but after the >> > constructor and after setting those two ints. I want to design it so >> > that if >> > I change a param after calling update I dont have to run the whole >> > filter >> > again, so I dont want it to be under the GenerateData() method. >> > >> > Thank you very much for your insights. >> > >> > Ignacio Prieto >> > >> > -- >> > Ignacio Prieto >> > Research Assistant >> > Biomedical Imaging Center >> > Pontificia Universida Catolica de Chile >> > >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > > > > > > -- > Jos? Ignacio Prieto > celular(nuevo): 94348182 _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 joseignacio.prieto at gmail.com Tue Aug 26 11:56:27 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Tue, 26 Aug 2014 11:56:27 -0400 Subject: [ITK] [ITK-dev] Create PolygonToMeshFilter In-Reply-To: References: Message-ID: I solved it partially but don't know why it works. I just set GenerateOutputInformation(){} on my .h file as it is done on itkSpatialObjecToPointSetFilter so it goes straight to GenerateInputRequestedRegion. On Tue, Aug 26, 2014 at 11:35 AM, Jose Ignacio Prieto < joseignacio.prieto at gmail.com> wrote: > Hi all, > I am trying to create a filter that receives many 2D polygons in the form > of PolyLineParametricPath (which in turn has an itkImage as input) and > returns an itkMesh for later visualization. I have completed the > GenerateData() method by calling internally to > itkAutomaticTopologyMeshSource. The problem seems to be that before > GenerateData, the filter fails in itkPointSet::CopyInformation (because it > tries to cast the polygon as a mesh). I discovered that the call stack > comes from UpdateOutputInformation on my PolygonToMeshFilter and then > GenerateOutputInformation, then itkMesh::CopyInformation and > itkPointset::CopyInformation. > I think I should edit my PolygonToMesh::GenerateOutputInformation() but I > don't know how. Inside it I just called > Superclass::GenerateOutputInformation. > My filter PolygonToMeshFilter is a copy of MeshToMesh filter and inherits > from MeshSource. Maybe I should inherit from anothe filter. > Thank you very much > > Ignacio Prieto > > -- > Ignacio Prieto > Research Assistant > Biomedical Imaging Center > Pontificia Universidad Catolica de Chile > -- Jos? Ignacio Prieto celular(nuevo): 94348182 -------------- 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 joseignacio.prieto at gmail.com Tue Aug 26 11:56:27 2014 From: joseignacio.prieto at gmail.com (Jose Ignacio Prieto) Date: Tue, 26 Aug 2014 11:56:27 -0400 Subject: [ITK] [ITK-users] Create PolygonToMeshFilter In-Reply-To: References: Message-ID: I solved it partially but don't know why it works. I just set GenerateOutputInformation(){} on my .h file as it is done on itkSpatialObjecToPointSetFilter so it goes straight to GenerateInputRequestedRegion. On Tue, Aug 26, 2014 at 11:35 AM, Jose Ignacio Prieto < joseignacio.prieto at gmail.com> wrote: > Hi all, > I am trying to create a filter that receives many 2D polygons in the form > of PolyLineParametricPath (which in turn has an itkImage as input) and > returns an itkMesh for later visualization. I have completed the > GenerateData() method by calling internally to > itkAutomaticTopologyMeshSource. The problem seems to be that before > GenerateData, the filter fails in itkPointSet::CopyInformation (because it > tries to cast the polygon as a mesh). I discovered that the call stack > comes from UpdateOutputInformation on my PolygonToMeshFilter and then > GenerateOutputInformation, then itkMesh::CopyInformation and > itkPointset::CopyInformation. > I think I should edit my PolygonToMesh::GenerateOutputInformation() but I > don't know how. Inside it I just called > Superclass::GenerateOutputInformation. > My filter PolygonToMeshFilter is a copy of MeshToMesh filter and inherits > from MeshSource. Maybe I should inherit from anothe filter. > Thank you very much > > Ignacio Prieto > > -- > Ignacio Prieto > Research Assistant > Biomedical Imaging Center > Pontificia Universidad Catolica de Chile > -- Jos? Ignacio Prieto celular(nuevo): 94348182 -------------- 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 chernando at telespazio.es Wed Aug 27 04:55:38 2014 From: chernando at telespazio.es (carlos) Date: Wed, 27 Aug 2014 01:55:38 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1409062625902-7586123.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> <1409062625902-7586123.post@n2.nabble.com> Message-ID: <1409129738759-7586127.post@n2.nabble.com> When the program crashes, no error appears? Take also into account, that having the same size does not mean always that they overlap. You have to check also their origin and spacing in case they have different physical locations. Regarding the standard deviation issue, if you previously normalize the image, then a standard deviation of 0.4 works, please see this example: http://www.itk.org/Doxygen/html/RegistrationITKv4_2ImageRegistration2_8cxx-example.html -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586127.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 maximilian_oliver.mordig at roche.com Wed Aug 27 08:29:12 2014 From: maximilian_oliver.mordig at roche.com (maximilian) Date: Wed, 27 Aug 2014 05:29:12 -0700 (PDT) Subject: [ITK] [ITK-users] Problem with itk::ImageToHistogramFilter Message-ID: <1409142552492-7586128.post@n2.nabble.com> I am having problems with the itk::ImageToHistogramFilter. I am generating ellipses that I want to add to an image that already contains some ellipses (in each iteration step, I add one ellipse to an image being the result of previous iterations). To see if the new ellipse overlaps by more than (let's say) 10%, I use the ImageToHistogramFilter. The previous image has objects that all have pixel values of 1. The newly added ellipse has value of 2. So, to get the number of overlapping pixels, I add up both images and I count the number of pixels = 3 in that image. I set the histogram bin minimum to 0 (background) and the histogram bin maximum to 3 (+ some constant c) and the number of bins such that the step is = 1 (here, it is 3 + c). However, when I output the average frequencies associated to each bin, I get values between 0 and 2 (number like 1.92) and not between 0 and 3 + c (see output of program of attached file). Why? GenerateCells.cxx -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Problem-with-itk-ImageToHistogramFilter-tp7586128.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 Aug 27 09:52:20 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 27 Aug 2014 09:52:20 -0400 Subject: [ITK] [ITK-dev] System PNG sCal issue Message-ID: <060332A9-7A8F-4E15-B9AF-BCB308A597DD@mail.nih.gov> Kent, I am getting a failing test when using a new system PNG. It appears to be related to this issue: https://issues.itk.org/jira/browse/ITK-3067 and commit: https://github.com/InsightSoftwareConsortium/ITK/commit/74b5e6e4bbcbebcee860dd7b52ed76a4941c9efe I have just upgraded my system to redhat7 and I now have libpng 1.5.13. Here is the build on the dashboard: http://open.cdash.org/buildSummary.php?buildid=3465169 There are compiler warnings related to unused variables, and then the failing test has sCal warnings. So I am assuming the failing test is due to sCal issue. As I am diving into the libPNG API and its changes, I thought I'd post up to case someone knows more about this issue. Thanks, Brtad -------------- 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 blowekamp at mail.nih.gov Wed Aug 27 10:35:54 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 27 Aug 2014 10:35:54 -0400 Subject: [ITK] [ITK-dev] System PNG sCal issue In-Reply-To: <060332A9-7A8F-4E15-B9AF-BCB308A597DD@mail.nih.gov> References: <060332A9-7A8F-4E15-B9AF-BCB308A597DD@mail.nih.gov> Message-ID: It looks this there was also a discussion about this on the user mailing list to with a proposed patch: http://public.kitware.com/pipermail/insight-users/2012-December/046756.html Anyone know the state of this? Brad On Aug 27, 2014, at 9:52 AM, Bradley Lowekamp wrote: > Kent, > > I am getting a failing test when using a new system PNG. It appears to be related to this issue: > > https://issues.itk.org/jira/browse/ITK-3067 > > and commit: > > https://github.com/InsightSoftwareConsortium/ITK/commit/74b5e6e4bbcbebcee860dd7b52ed76a4941c9efe > > I have just upgraded my system to redhat7 and I now have libpng 1.5.13. > > Here is the build on the dashboard: > > http://open.cdash.org/buildSummary.php?buildid=3465169 > > There are compiler warnings related to unused variables, and then the failing test has sCal warnings. So I am assuming the failing test is due to sCal issue. As I am diving into the libPNG API and its changes, I thought I'd post up to case someone knows more about this issue. > > Thanks, > Brtad > _______________________________________________ > Powered by www.kitware.com > > 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 Wed Aug 27 10:56:38 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 27 Aug 2014 10:56:38 -0400 Subject: [ITK] [ITK-dev] System PNG sCal issue In-Reply-To: References: <060332A9-7A8F-4E15-B9AF-BCB308A597DD@mail.nih.gov> Message-ID: Here is the patch in Gerrit: http://review.source.kitware.com/#/c/8884/ HTH, Matt On Wed, Aug 27, 2014 at 10:35 AM, Bradley Lowekamp wrote: > It looks this there was also a discussion about this on the user mailing > list to with a proposed patch: > http://public.kitware.com/pipermail/insight-users/2012-December/046756.html > > Anyone know the state of this? > > Brad > > On Aug 27, 2014, at 9:52 AM, Bradley Lowekamp > wrote: > > Kent, > > I am getting a failing test when using a new system PNG. It appears to be > related to this issue: > > https://issues.itk.org/jira/browse/ITK-3067 > > and commit: > > https://github.com/InsightSoftwareConsortium/ITK/commit/74b5e6e4bbcbebcee860dd7b52ed76a4941c9efe > > I have just upgraded my system to redhat7 and I now have libpng 1.5.13. > > Here is the build on the dashboard: > > http://open.cdash.org/buildSummary.php?buildid=3465169 > > There are compiler warnings related to unused variables, and then the > failing test has sCal warnings. So I am assuming the failing test is due to > sCal issue. As I am diving into the libPNG API and its changes, I thought > I'd post up to case someone knows more about this issue. > > Thanks, > Brtad > _______________________________________________ > Powered by www.kitware.com > > 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 Wed Aug 27 11:06:41 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 27 Aug 2014 11:06:41 -0400 Subject: [ITK] [ITK-dev] System PNG sCal issue In-Reply-To: References: <060332A9-7A8F-4E15-B9AF-BCB308A597DD@mail.nih.gov> Message-ID: Great! That is what I was looking for and why I kept thinking I have seen this issue around... Not sure what the real issue is... maybe the png file in the test in invalid, and the lib png change the behavior for this case.... I just don't know yet. I did determine that the spacing of the output put image for this system in 1, while the passing tests have 0.25. So this is the right problem... just need to figure out where the behavior is going wrong. Brad On Aug 27, 2014, at 10:56 AM, Matt McCormick wrote: > Here is the patch in Gerrit: > > http://review.source.kitware.com/#/c/8884/ > > HTH, > Matt > > On Wed, Aug 27, 2014 at 10:35 AM, Bradley Lowekamp > wrote: >> It looks this there was also a discussion about this on the user mailing >> list to with a proposed patch: >> http://public.kitware.com/pipermail/insight-users/2012-December/046756.html >> >> Anyone know the state of this? >> >> Brad >> >> On Aug 27, 2014, at 9:52 AM, Bradley Lowekamp >> wrote: >> >> Kent, >> >> I am getting a failing test when using a new system PNG. It appears to be >> related to this issue: >> >> https://issues.itk.org/jira/browse/ITK-3067 >> >> and commit: >> >> https://github.com/InsightSoftwareConsortium/ITK/commit/74b5e6e4bbcbebcee860dd7b52ed76a4941c9efe >> >> I have just upgraded my system to redhat7 and I now have libpng 1.5.13. >> >> Here is the build on the dashboard: >> >> http://open.cdash.org/buildSummary.php?buildid=3465169 >> >> There are compiler warnings related to unused variables, and then the >> failing test has sCal warnings. So I am assuming the failing test is due to >> sCal issue. As I am diving into the libPNG API and its changes, I thought >> I'd post up to case someone knows more about this issue. >> >> Thanks, >> Brtad >> _______________________________________________ >> Powered by www.kitware.com >> >> 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 pattersonnp.work at gmail.com Wed Aug 27 12:28:19 2014 From: pattersonnp.work at gmail.com (Nick Patterson) Date: Wed, 27 Aug 2014 17:28:19 +0100 Subject: [ITK] [ITK-users] ResampleDICOM example and DCMTK Message-ID: <95FBA78F-1DFC-4F33-9572-DA0DD9DE1E73@gmail.com> Hi, I have been trying to test the ResampledDICOM ITK example using DCMTK instead of GDCM. I have attached the code below. The code compiles and runs, but does not output the resultant files - which is strange, as all of the expected parameters are good (i.e. number of files, origin of image, image dimensions etc). Can anyone possibly comment on any possible reason why the code execute without error, but does not result in any output files? Regards, Nick #include "itkVersion.h" #include "itkImage.h" #include "itkMinimumMaximumImageFilter.h" #include "itkDCMTKImageIO.h" #include "itkDCMTKSeriesFileNames.h" #include "itkNumericSeriesFileNames.h" #include "itkImageSeriesReader.h" #include "itkImageSeriesWriter.h" #include "itkResampleImageFilter.h" #include "itkShiftScaleImageFilter.h" #include "itkIdentityTransform.h" #include "itkLinearInterpolateImageFunction.h" #include #include "dcmdata/dcuid.h" #include static void CopyDictionary (itk::MetaDataDictionary &fromDict, itk::MetaDataDictionary &toDict); int main( int argc, char* argv[] ) { // Validate input parameters if( argc < 4 ) { std::cerr << "Usage: " << argv[0] << " InputDicomDirectory OutputDicomDirectory spacing_x spacing_y spacing_z" << std::endl; return EXIT_FAILURE; } const unsigned int InputDimension = 3; const unsigned int OutputDimension = 2; typedef signed short PixelType; typedef itk::Image< PixelType, InputDimension > InputImageType; typedef itk::Image< PixelType, OutputDimension > OutputImageType; typedef itk::ImageSeriesReader< InputImageType >ReaderType; typedef itk::DCMTKImageIO ImageIOType; typedef itk::DCMTKSeriesFileNames InputNamesGeneratorType; typedef itk::NumericSeriesFileNames OutputNamesGeneratorType; typedef itk::IdentityTransform< double, InputDimension > TransformType; typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; typedef itk::ResampleImageFilter< InputImageType, InputImageType > ResampleFilterType; typedef itk::ShiftScaleImageFilter< InputImageType, InputImageType > ShiftScaleType; typedef itk::ImageSeriesWriter< InputImageType, OutputImageType > SeriesWriterType; //////////////////////////////////////////////// // 1) Read the input series ImageIOType::Pointer gdcmIO = ImageIOType::New(); InputNamesGeneratorType::Pointer inputNames = InputNamesGeneratorType::New(); inputNames->SetInputDirectory( argv[1] ); const ReaderType::FileNamesContainer & filenames = inputNames->GetInputFileNames(); ReaderType::Pointer reader = ReaderType::New(); reader->SetImageIO( gdcmIO ); reader->SetFileNames( filenames ); try { reader->Update(); } catch (itk::ExceptionObject &excp) { std::cerr << "Exception thrown while reading the series" << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } //////////////////////////////////////////////// // 2) Resample the series InterpolatorType::Pointer interpolator = InterpolatorType::New(); TransformType::Pointer transform = TransformType::New(); transform->SetIdentity(); const InputImageType::SpacingType& inputSpacing = reader->GetOutput()->GetSpacing(); const InputImageType::RegionType& inputRegion = reader->GetOutput()->GetLargestPossibleRegion(); const InputImageType::SizeType& inputSize = inputRegion.GetSize(); std::cout << "The input series in directory " << argv[1] << " has " << filenames.size() << " files with spacing " << inputSpacing << std::endl; // Compute the size of the output. The user specifies a spacing on // the command line. If the spacing is 0, the input spacing will be // used. The size (# of pixels) in the output is recomputed using // the ratio of the input and output sizes. InputImageType::SpacingType outputSpacing; outputSpacing[0] = atof(argv[3]); outputSpacing[1] = atof(argv[4]); outputSpacing[2] = atof(argv[5]); bool changeInSpacing = false; for (unsigned int i = 0; i < 3; i++) { if (outputSpacing[i] == 0.0) { outputSpacing[i] = inputSpacing[i]; } else { changeInSpacing = true; } } InputImageType::SizeType outputSize; typedef InputImageType::SizeType::SizeValueType SizeValueType; outputSize[0] = static_cast(inputSize[0] * inputSpacing[0] / outputSpacing[0] + .5); outputSize[1] = static_cast(inputSize[1] * inputSpacing[1] / outputSpacing[1] + .5); outputSize[2] = static_cast(inputSize[2] * inputSpacing[2] / outputSpacing[2] + .5); ResampleFilterType::Pointer resampler = ResampleFilterType::New(); resampler->SetInput( reader->GetOutput() ); resampler->SetTransform( transform ); resampler->SetInterpolator( interpolator ); resampler->SetOutputOrigin ( reader->GetOutput()->GetOrigin()); resampler->SetOutputSpacing ( outputSpacing ); resampler->SetOutputDirection ( reader->GetOutput()->GetDirection()); resampler->SetSize ( outputSize ); resampler->Update (); //////////////////////////////////////////////// // 3) Create a MetaDataDictionary for each slice. // Copy the dictionary from the first image and override slice // specific fields ReaderType::DictionaryRawPointer inputDict = (*(reader->GetMetaDataDictionaryArray()))[0]; ReaderType::DictionaryArrayType outputArray; // To keep the new series in the same study as the original we need // to keep the same study UID. But we need new series and frame of // reference UID's. char seriesUID[100]; dcmGenerateUniqueIdentifier(seriesUID); char frameOfReferenceUID[100]; dcmGenerateUniqueIdentifier(frameOfReferenceUID); std::string studyUID; std::string sopClassUID; itk::ExposeMetaData(*inputDict, "0020|000d", studyUID); itk::ExposeMetaData(*inputDict, "0008|0016", sopClassUID); // gdcmIO->KeepOriginalUIDOn(); for (unsigned int f = 0; f < outputSize[2]; f++) { // Create a new dictionary for this slice ReaderType::DictionaryRawPointer dict = new ReaderType::DictionaryType; // Copy the dictionary from the first slice CopyDictionary (*inputDict, *dict); // Set the UID's for the study, series, SOP and frame of reference itk::EncapsulateMetaData(*dict,"0020|000d", studyUID); itk::EncapsulateMetaData(*dict,"0020|000e", seriesUID); itk::EncapsulateMetaData(*dict,"0020|0052", frameOfReferenceUID); char sopInstanceUID[100]; dcmGenerateUniqueIdentifier(sopInstanceUID); itk::EncapsulateMetaData(*dict,"0008|0018", sopInstanceUID); itk::EncapsulateMetaData(*dict,"0002|0003", sopInstanceUID); // Change fields that are slice specific itksys_ios::ostringstream value; value.str(""); value << f + 1; // Image Number itk::EncapsulateMetaData(*dict,"0020|0013", value.str()); // Series Description - Append new description to current series // description std::string oldSeriesDesc; itk::ExposeMetaData(*inputDict, "0008|103e", oldSeriesDesc); value.str(""); value << oldSeriesDesc << ": Resampled with pixel spacing " << outputSpacing[0] << ", "<< outputSpacing[1] << ", "<< outputSpacing[2]; // This is an long string and there is a 64 character limit in the // standard unsigned lengthDesc = value.str().length(); std::string seriesDesc( value.str(), 0,lengthDesc > 64 ? 64 : lengthDesc); itk::EncapsulateMetaData(*dict,"0008|103e", seriesDesc); // Series Number value.str(""); value << 1001; itk::EncapsulateMetaData(*dict,"0020|0011", value.str()); // Derivation Description - How this image was derived value.str(""); for (int i = 0; i < argc; i++) { value << argv[i] << " "; } value << ": " << ITK_SOURCE_VERSION; lengthDesc = value.str().length(); std::string derivationDesc( value.str(), 0, lengthDesc > 1024 ? 1024 : lengthDesc); itk::EncapsulateMetaData(*dict,"0008|2111", derivationDesc); // Image Position Patient: This is calculated by computing the // physical coordinate of the first pixel in each slice. InputImageType::PointType position; InputImageType::IndexType index; index[0] = 0; index[1] = 0; index[2] = f; resampler->GetOutput()->TransformIndexToPhysicalPoint(index, position); value.str(""); value << position[0] << "\\" << position[1] << "\\" << position[2]; itk::EncapsulateMetaData(*dict,"0020|0032", value.str()); // Slice Location: For now, we store the z component of the Image // Position Patient. value.str(""); value << position[2]; itk::EncapsulateMetaData(*dict,"0020|1041", value.str()); if (changeInSpacing) { // Slice Thickness: For now, we store the z spacing value.str(""); value << outputSpacing[2]; itk::EncapsulateMetaData(*dict,"0018|0050",value.str()); // Spacing Between Slices itk::EncapsulateMetaData(*dict,"0018|0088",value.str()); } // Save the dictionary outputArray.push_back(dict); } //////////////////////////////////////////////// // 4) Shift data to undo the effect of a rescale intercept by the // DICOM reader std::string interceptTag("0028|1052"); typedef itk::MetaDataObject< std::string > MetaDataStringType; itk::MetaDataObjectBase::Pointer entry = (*inputDict)[interceptTag]; MetaDataStringType::ConstPointer interceptValue = dynamic_cast( entry.GetPointer() ) ; int interceptShift = 0; if( interceptValue ) { std::string tagValue = interceptValue->GetMetaDataObjectValue(); interceptShift = -atoi ( tagValue.c_str() ); } ShiftScaleType::Pointer shiftScale = ShiftScaleType::New(); shiftScale->SetInput( resampler->GetOutput()); shiftScale->SetShift( interceptShift ); //////////////////////////////////////////////// // 5) Write the new DICOM series // Make the output directory and generate the file names. itksys::SystemTools::MakeDirectory( argv[2] ); // Generate the file names OutputNamesGeneratorType::Pointer outputNames = OutputNamesGeneratorType::New(); std::string seriesFormat(argv[2]); seriesFormat = seriesFormat + "IM%d.dcm"; outputNames->SetSeriesFormat (seriesFormat.c_str()); outputNames->SetStartIndex (1); outputNames->SetEndIndex (outputSize[2]); std::cout << "Output Size: " << outputSize[2] << std::endl; std::cout << outputNames->GetFileNames().at(0) << std::endl; SeriesWriterType::Pointer seriesWriter = SeriesWriterType::New(); seriesWriter->SetInput( shiftScale->GetOutput() ); seriesWriter->SetImageIO( gdcmIO ); seriesWriter->SetFileNames( outputNames->GetFileNames() ); seriesWriter->SetMetaDataDictionaryArray( &outputArray ); std::cout << seriesWriter->GetImageIO()->GetOrigin(0) << " " << seriesWriter->GetImageIO()->GetOrigin(1) << " " << seriesWriter->GetImageIO()->GetOrigin(2) << std::endl; try { seriesWriter->Update(); } catch( itk::ExceptionObject & excp ) { std::cerr << "Exception thrown while writing the series " << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } std::cout << "The output series in directory " << argv[2] << " has " << outputSize[2] << " files with spacing "<< outputSpacing << std::endl; return EXIT_SUCCESS; } void CopyDictionary (itk::MetaDataDictionary &fromDict, itk::MetaDataDictionary &toDict) { typedef itk::MetaDataDictionary DictionaryType; DictionaryType::ConstIterator itr = fromDict.Begin(); DictionaryType::ConstIterator end = fromDict.End(); typedef itk::MetaDataObject< std::string > MetaDataStringType; while( itr != end ) { itk::MetaDataObjectBase::Pointer entry = itr->second; MetaDataStringType::Pointer entryvalue = dynamic_cast( entry.GetPointer() ) ; if( entryvalue ) { std::string tagkey = itr->first; std::string tagvalue = entryvalue->GetMetaDataObjectValue(); itk::EncapsulateMetaData(toDict, tagkey, tagvalue); } ++itr; } } -------------- 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 Aug 27 13:30:56 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 27 Aug 2014 13:30:56 -0400 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 (tomorow), 9 AM Eastern USA time, there will be a Google+ Hangout where we will be doing code reviews: https://plus.google.com/u/0/events/cj4tf2heirsligiim1blh9j3498 On Friday, 10 AM Eastern USA time, an ITK development teleconference, (866) 546-4138 USA or +1 (404) 602-0798 International Access code 5687046# All are welcome. Hope to talk to you then! From mohammedrashadkm at gmail.com Thu Aug 28 04:48:44 2014 From: mohammedrashadkm at gmail.com (Rashad M) Date: Thu, 28 Aug 2014 10:48:44 +0200 Subject: [ITK] [ITK-dev] System PNG sCal issue In-Reply-To: References: <060332A9-7A8F-4E15-B9AF-BCB308A597DD@mail.nih.gov> Message-ID: Hello, Here is another related issuse regarding png sCal. - http://public.kitware.com/pipermail/insight-developers/2014-July/023918.html On Wed, Aug 27, 2014 at 5:06 PM, Bradley Lowekamp wrote: > Great! That is what I was looking for and why I kept thinking I have seen > this issue around... > > Not sure what the real issue is... maybe the png file in the test in > invalid, and the lib png change the behavior for this case.... I just don't > know yet. > > I did determine that the spacing of the output put image for this system > in 1, while the passing tests have 0.25. So this is the right problem... > just need to figure out where the behavior is going wrong. > > Brad > > On Aug 27, 2014, at 10:56 AM, Matt McCormick > wrote: > > > Here is the patch in Gerrit: > > > > http://review.source.kitware.com/#/c/8884/ > > > > HTH, > > Matt > > > > On Wed, Aug 27, 2014 at 10:35 AM, Bradley Lowekamp > > wrote: > >> It looks this there was also a discussion about this on the user mailing > >> list to with a proposed patch: > >> > http://public.kitware.com/pipermail/insight-users/2012-December/046756.html > >> > >> Anyone know the state of this? > >> > >> Brad > >> > >> On Aug 27, 2014, at 9:52 AM, Bradley Lowekamp > >> wrote: > >> > >> Kent, > >> > >> I am getting a failing test when using a new system PNG. It appears to > be > >> related to this issue: > >> > >> https://issues.itk.org/jira/browse/ITK-3067 > >> > >> and commit: > >> > >> > https://github.com/InsightSoftwareConsortium/ITK/commit/74b5e6e4bbcbebcee860dd7b52ed76a4941c9efe > >> > >> I have just upgraded my system to redhat7 and I now have libpng 1.5.13. > >> > >> Here is the build on the dashboard: > >> > >> http://open.cdash.org/buildSummary.php?buildid=3465169 > >> > >> There are compiler warnings related to unused variables, and then the > >> failing test has sCal warnings. So I am assuming the failing test is > due to > >> sCal issue. As I am diving into the libPNG API and its changes, I > thought > >> I'd post up to case someone knows more about this issue. > >> > >> Thanks, > >> Brtad > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> 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 > -- Regards, Rashad -------------- 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 jan.bergmeier at imes.uni-hannover.de Thu Aug 28 07:43:45 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Thu, 28 Aug 2014 04:43:45 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1409129738759-7586127.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> <1409062625902-7586123.post@n2.nabble.com> <1409129738759-7586127.post@n2.nabble.com> Message-ID: <1409226225974-7586133.post@n2.nabble.com> Hey, no error appears when the program crashes. i checked the origin and the spacing. Both are the same for both images. Thanks, Jan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586133.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 jan.bergmeier at imes.uni-hannover.de Thu Aug 28 09:24:40 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Thu, 28 Aug 2014 06:24:40 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1409226225974-7586133.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> <1409062625902-7586123.post@n2.nabble.com> <1409129738759-7586127.post@n2.nabble.com> <1409226225974-7586133.post@n2.nabble.com> Message-ID: <1409232280489-7586134.post@n2.nabble.com> Hi, I will use this way, because it's the most convenient that's working for me. //Typedefs typedef itk::IdentityTransform< double, 2 > TransformType; typedef itk::GradientDescentOptimizer OptimizerType; typedef itk::LinearInterpolateImageFunction< UChar2DImageType, double > InterpolatorType; typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, UChar2DImageType > MiMetricType; typedef itk::ImageRegistrationMethod< UChar2DImageType, UChar2DImageType > RegistrationType; //Create registration components TransformType::Pointer transform = TransformType::New(); OptimizerType::Pointer optimizer = OptimizerType::New(); InterpolatorType::Pointer interpolator = InterpolatorType::New(); RegistrationType::Pointer registration = RegistrationType::New(); //Configure transform transform->SetIdentity(); //Configure optimizer optimizer->SetNumberOfIterations( 1 ); //Configure metric MetricType::Pointer metric = MetricType::New(); metric->SetNumberOfSpatialSamples( 1000 ); //Set up registration registration->SetOptimizer( optimizer ); registration->SetTransform( transform ); registration->SetInterpolator( interpolator ); registration->SetMetric( metric ); registration->SetFixedImage( fixedImageIn ); registration->SetMovingImage( movingImageIn ); registration->SetInitialTransformParameters( transform->GetParameters() ); //Perform registration try { registration->Update(); } catch( itk::ExceptionObject & err ) { std::cout << "ExceptionObject caught !" << std::endl; std::cout << err << std::endl; } //Get output double bestValue = optimizer->GetValue(); Thank you all for your help, Jan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586134.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 hans-johnson at uiowa.edu Thu Aug 28 14:37:29 2014 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Thu, 28 Aug 2014 18:37:29 +0000 Subject: [ITK] [ITK-dev] issues.itk.org maintenance Message-ID: The ITK bug tracker will be down for approximately 30 minutes at 4:30CST today for routine maintenance. Hans ________________________________ 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. ________________________________ -------------- 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 krismz at sci.utah.edu Thu Aug 28 16:13:23 2014 From: krismz at sci.utah.edu (Kristen Zygmunt) Date: Thu, 28 Aug 2014 14:13:23 -0600 Subject: [ITK] [ITK-users] Compiling ITK for GPU support In-Reply-To: References: Message-ID: <911AFB65-CD92-45BB-9880-D830B2D8FFE5@sci.utah.edu> You will need to install OpenCL first. If you install it where OpenCL recommends to be installed, CMake should then be able to find it. -Kris > Date: Thu, 21 Aug 2014 02:07:38 +0900 > From: "Xiaopeng Yang" > To: > Subject: [ITK] [ITK-users] Compiling ITK for GPU support > Message-ID: <023f01cfbc99$3ecc2c60$bc648520$@ac.kr> > Content-Type: text/plain; charset="utf-8" > > Hello, > > > > I would like to develop GPU based program for image processing, so I tried to compile ITK with GPU support. > > > > My question is whether I shall install 3rd party program like CUDDA first? > > > > Thank you. > > > > Xiaopeng > > -------------- 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 Aug 28 22:35:03 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 28 Aug 2014 22:35:03 -0400 Subject: [ITK] [ITK-users] [ITK-dev] Create PolygonToMeshFilter In-Reply-To: References: Message-ID: Hi Ignacio, The default implementation of GenerateOutputInformation() in itk::ProcessObject is to call ::CopyInformation() on all the pipeline objects from the input to the output DataObjects. The information that is copied for itk::PointSet / itk::Mesh is related to Region's (see their implementations of ::CopyInformation()). You may write a GenerateOutputInformation() that sets these regions, or you could leave the default values given in the constructors, which is what the SpatialObjectToPointSetFilter does. Hope this helps, Matt On Tue, Aug 26, 2014 at 11:56 AM, Jose Ignacio Prieto wrote: > I solved it partially but don't know why it works. I just set > GenerateOutputInformation(){} on my .h file as it is done on > itkSpatialObjecToPointSetFilter so it goes straight to > GenerateInputRequestedRegion. > > > > On Tue, Aug 26, 2014 at 11:35 AM, Jose Ignacio Prieto > wrote: >> >> Hi all, >> I am trying to create a filter that receives many 2D polygons in the form >> of PolyLineParametricPath (which in turn has an itkImage as input) and >> returns an itkMesh for later visualization. I have completed the >> GenerateData() method by calling internally to >> itkAutomaticTopologyMeshSource. The problem seems to be that before >> GenerateData, the filter fails in itkPointSet::CopyInformation (because it >> tries to cast the polygon as a mesh). I discovered that the call stack comes >> from UpdateOutputInformation on my PolygonToMeshFilter and then >> GenerateOutputInformation, then itkMesh::CopyInformation and >> itkPointset::CopyInformation. >> I think I should edit my PolygonToMesh::GenerateOutputInformation() but I >> don't know how. Inside it I just called >> Superclass::GenerateOutputInformation. >> My filter PolygonToMeshFilter is a copy of MeshToMesh filter and inherits >> from MeshSource. Maybe I should inherit from anothe filter. >> Thank you very much >> >> Ignacio Prieto >> >> -- >> Ignacio Prieto >> Research Assistant >> Biomedical Imaging Center >> Pontificia Universidad Catolica de Chile > > > > > -- > Jos? Ignacio Prieto > celular(nuevo): 94348182 > > _______________________________________________ > Powered by www.kitware.com > > 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://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 Aug 28 22:35:03 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 28 Aug 2014 22:35:03 -0400 Subject: [ITK] [ITK-dev] Create PolygonToMeshFilter In-Reply-To: References: Message-ID: Hi Ignacio, The default implementation of GenerateOutputInformation() in itk::ProcessObject is to call ::CopyInformation() on all the pipeline objects from the input to the output DataObjects. The information that is copied for itk::PointSet / itk::Mesh is related to Region's (see their implementations of ::CopyInformation()). You may write a GenerateOutputInformation() that sets these regions, or you could leave the default values given in the constructors, which is what the SpatialObjectToPointSetFilter does. Hope this helps, Matt On Tue, Aug 26, 2014 at 11:56 AM, Jose Ignacio Prieto wrote: > I solved it partially but don't know why it works. I just set > GenerateOutputInformation(){} on my .h file as it is done on > itkSpatialObjecToPointSetFilter so it goes straight to > GenerateInputRequestedRegion. > > > > On Tue, Aug 26, 2014 at 11:35 AM, Jose Ignacio Prieto > wrote: >> >> Hi all, >> I am trying to create a filter that receives many 2D polygons in the form >> of PolyLineParametricPath (which in turn has an itkImage as input) and >> returns an itkMesh for later visualization. I have completed the >> GenerateData() method by calling internally to >> itkAutomaticTopologyMeshSource. The problem seems to be that before >> GenerateData, the filter fails in itkPointSet::CopyInformation (because it >> tries to cast the polygon as a mesh). I discovered that the call stack comes >> from UpdateOutputInformation on my PolygonToMeshFilter and then >> GenerateOutputInformation, then itkMesh::CopyInformation and >> itkPointset::CopyInformation. >> I think I should edit my PolygonToMesh::GenerateOutputInformation() but I >> don't know how. Inside it I just called >> Superclass::GenerateOutputInformation. >> My filter PolygonToMeshFilter is a copy of MeshToMesh filter and inherits >> from MeshSource. Maybe I should inherit from anothe filter. >> Thank you very much >> >> Ignacio Prieto >> >> -- >> Ignacio Prieto >> Research Assistant >> Biomedical Imaging Center >> Pontificia Universidad Catolica de Chile > > > > > -- > Jos? Ignacio Prieto > celular(nuevo): 94348182 > > _______________________________________________ > Powered by www.kitware.com > > 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 Aug 28 22:39:54 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 28 Aug 2014 22:39:54 -0400 Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: <1409232280489-7586134.post@n2.nabble.com> References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> <1409062625902-7586123.post@n2.nabble.com> <1409129738759-7586127.post@n2.nabble.com> <1409226225974-7586133.post@n2.nabble.com> <1409232280489-7586134.post@n2.nabble.com> Message-ID: Hi Jan, Make sure to call Initialize() [1]. See also the MeanSquareImageMetric1.cxx file from the Examples/ directory. Hope this helps, Matt [1] http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageToImageMetric.html#a2bd5955a3bedf31e701aed3ee1d4e473 On Thu, Aug 28, 2014 at 9:24 AM, jan wrote: > Hi, I will use this way, because it's the most convenient that's working for > me. > > //Typedefs > typedef itk::IdentityTransform< double, 2 > TransformType; > typedef itk::GradientDescentOptimizer OptimizerType; > typedef itk::LinearInterpolateImageFunction< UChar2DImageType, double > > InterpolatorType; > typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, > UChar2DImageType > MiMetricType; > typedef itk::ImageRegistrationMethod< UChar2DImageType, UChar2DImageType >> RegistrationType; > > //Create registration components > TransformType::Pointer transform = TransformType::New(); > OptimizerType::Pointer optimizer = OptimizerType::New(); > InterpolatorType::Pointer interpolator = InterpolatorType::New(); > RegistrationType::Pointer registration = RegistrationType::New(); > > //Configure transform > transform->SetIdentity(); > > //Configure optimizer > optimizer->SetNumberOfIterations( 1 ); > > //Configure metric > MetricType::Pointer metric = MetricType::New(); > metric->SetNumberOfSpatialSamples( 1000 ); > > //Set up registration > registration->SetOptimizer( optimizer ); > registration->SetTransform( transform ); > registration->SetInterpolator( interpolator ); > registration->SetMetric( metric ); > > registration->SetFixedImage( fixedImageIn ); > registration->SetMovingImage( movingImageIn ); > registration->SetInitialTransformParameters( transform->GetParameters() > ); > > //Perform registration > try > { > registration->Update(); > } > catch( itk::ExceptionObject & err ) > { > std::cout << "ExceptionObject caught !" << std::endl; > std::cout << err << std::endl; > } > > //Get output > double bestValue = optimizer->GetValue(); > > Thank you all for your help, > > Jan > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586134.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 g.bogle at auckland.ac.nz Fri Aug 29 04:09:30 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 08:09:30 +0000 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem Message-ID: I've been using Visual Studio 10 for a few years without any problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my programs with the new libraries the build fails with (for example) this message: crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory Looking at the Project Properties I see in Additional Include Directories: crop.cpp(18): \include\ITK-4.5 For some reason cmake has not used the ITK_DIR prefix. In addition I see in Linker > Additional Dependencies that all the ITK libraries are expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, although in this case the ITK_DIR prefix has been used. This is a bit of a mess. I presume the problem lies with cmake. My version is 2.8.12.2, which I would have thought was recent enough - maybe it's too recent. Has anyone else run into this problem, and is there a solution? Thanks Gib -------------- 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 indianzeppelin at gmail.com Fri Aug 29 04:29:47 2014 From: indianzeppelin at gmail.com (Girish Mallya Udupi) Date: Fri, 29 Aug 2014 09:29:47 +0100 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: Message-ID: Could you paste the part of your CMakeLists.txt where you find/include/link ITK? On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle wrote: > I've been using Visual Studio 10 for a few years without any problems. > Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I > have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK > environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my > programs with the new libraries the build fails with (for example) this > message: > > crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': > No such file or directory > > Looking at the Project Properties I see in Additional Include Directories: > crop.cpp(18): \include\ITK-4.5 > For some reason cmake has not used the ITK_DIR prefix. In addition I see > in Linker > Additional Dependencies that all the ITK libraries are expected > to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, > although in this case the ITK_DIR prefix has been used. > > This is a bit of a mess. I presume the problem lies with cmake. My > version is 2.8.12.2, which I would have thought was recent enough - maybe > it's too recent. Has anyone else run into this problem, and is there a > solution? > > Thanks > Gib > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 > > -- Regards, Girish -------------- 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 g.bogle at auckland.ac.nz Fri Aug 29 05:10:05 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 09:10:05 +0000 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: , Message-ID: I just remembered that I forgot to paste that: cmake_minimum_required(VERSION 2.6) PROJECT(crop) FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.") ENDIF(ITK_FOUND) set(PROJECTNAME "crop") ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 8:25 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem Could you paste the part of your CMakeLists.txt where you find/include ITK? On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle > wrote: I've been using Visual Studio 10 for a few years without any problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my programs with the new libraries the build fails with (for example) this message: crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory Looking at the Project Properties I see in Additional Include Directories: crop.cpp(18): \include\ITK-4.5 For some reason cmake has not used the ITK_DIR prefix. In addition I see in Linker > Additional Dependencies that all the ITK libraries are expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, although in this case the ITK_DIR prefix has been used. This is a bit of a mess. I presume the problem lies with cmake. My version is 2.8.12.2, which I would have thought was recent enough - maybe it's too recent. Has anyone else run into this problem, and is there a solution? Thanks Gib _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 -- Regards, Girish -------------- 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 indianzeppelin at gmail.com Fri Aug 29 05:29:51 2014 From: indianzeppelin at gmail.com (Girish Mallya Udupi) Date: Fri, 29 Aug 2014 10:29:51 +0100 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: Message-ID: That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE (${ITK_INCLUDE_DIRS})? On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle wrote: > I just remembered that I forgot to paste that: > > > cmake_minimum_required(VERSION 2.6) > > PROJECT(crop) > FIND_PACKAGE(ITK) > IF(ITK_FOUND) > INCLUDE(${ITK_USE_FILE}) > ELSE(ITK_FOUND) > MESSAGE(FATAL_ERROR > "ITK not found. Please set ITK_DIR.") > ENDIF(ITK_FOUND) > > set(PROJECTNAME "crop") > ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) > TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) > ------------------------------ > *From:* Girish Mallya Udupi [indianzeppelin at gmail.com] > *Sent:* Friday, 29 August 2014 8:25 p.m. > *To:* Gib Bogle > *Cc:* insight-users at itk.org > *Subject:* Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem > > Could you paste the part of your CMakeLists.txt where you find/include > ITK? > > > On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle wrote: > >> I've been using Visual Studio 10 for a few years without any problems. >> Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I >> have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK >> environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my >> programs with the new libraries the build fails with (for example) this >> message: >> >> crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': >> No such file or directory >> >> Looking at the Project Properties I see in Additional Include >> Directories: crop.cpp(18): \include\ITK-4.5 >> For some reason cmake has not used the ITK_DIR prefix. In addition I see >> in Linker > Additional Dependencies that all the ITK libraries are expected >> to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, >> although in this case the ITK_DIR prefix has been used. >> >> This is a bit of a mess. I presume the problem lies with cmake. My >> version is 2.8.12.2, which I would have thought was recent enough - maybe >> it's too recent. Has anyone else run into this problem, and is there a >> solution? >> >> Thanks >> Gib >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 >> >> > > > -- > Regards, > Girish > -- Regards, Girish -------------- 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 g.bogle at auckland.ac.nz Fri Aug 29 05:33:19 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 09:33:19 +0000 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: , Message-ID: OK, I just did that, and got: D:/InsightToolkit-4.5.2/CMake/UseITK.cmake /include/ITK-4.5 ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 9:29 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE (${ITK_INCLUDE_DIRS})? On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle > wrote: I just remembered that I forgot to paste that: cmake_minimum_required(VERSION 2.6) PROJECT(crop) FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.") ENDIF(ITK_FOUND) set(PROJECTNAME "crop") ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 8:25 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem Could you paste the part of your CMakeLists.txt where you find/include ITK? On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle > wrote: I've been using Visual Studio 10 for a few years without any problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my programs with the new libraries the build fails with (for example) this message: crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory Looking at the Project Properties I see in Additional Include Directories: crop.cpp(18): \include\ITK-4.5 For some reason cmake has not used the ITK_DIR prefix. In addition I see in Linker > Additional Dependencies that all the ITK libraries are expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, although in this case the ITK_DIR prefix has been used. This is a bit of a mess. I presume the problem lies with cmake. My version is 2.8.12.2, which I would have thought was recent enough - maybe it's too recent. Has anyone else run into this problem, and is there a solution? Thanks Gib _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 -- Regards, Girish -- Regards, Girish -------------- 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 g.bogle at auckland.ac.nz Fri Aug 29 05:47:46 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 09:47:46 +0000 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: , Message-ID: Hold everything, Girish! I see that D:\ITK-VS11-x64 does not have the directory structure of an ITK installation, from which I conclude that I did something wrong. I am now checking the build of ITK and will report back. ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 9:29 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE (${ITK_INCLUDE_DIRS})? On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle > wrote: I just remembered that I forgot to paste that: cmake_minimum_required(VERSION 2.6) PROJECT(crop) FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.") ENDIF(ITK_FOUND) set(PROJECTNAME "crop") ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 8:25 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem Could you paste the part of your CMakeLists.txt where you find/include ITK? On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle > wrote: I've been using Visual Studio 10 for a few years without any problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my programs with the new libraries the build fails with (for example) this message: crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory Looking at the Project Properties I see in Additional Include Directories: crop.cpp(18): \include\ITK-4.5 For some reason cmake has not used the ITK_DIR prefix. In addition I see in Linker > Additional Dependencies that all the ITK libraries are expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, although in this case the ITK_DIR prefix has been used. This is a bit of a mess. I presume the problem lies with cmake. My version is 2.8.12.2, which I would have thought was recent enough - maybe it's too recent. Has anyone else run into this problem, and is there a solution? Thanks Gib _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 -- Regards, Girish -- Regards, Girish -------------- 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 g.bogle at auckland.ac.nz Fri Aug 29 05:57:24 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 09:57:24 +0000 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: , Message-ID: Now I'm more confused. I thought that D:\ITK-VS11-x64 didn't look like an ITK installation directory because on my other machine there are only the subdirectories 'bin', 'include', 'lib', and 'share', while on the new machine I have those and many more, including 'CMakeFiles', 'config', 'ExternalData', 'Modules', 'Utilities'. But I did Build Install again and it left things unchanged. So it appears that the ITK install has changed from ITK-4.0 to ITK-4.5. Should I go back to 4.0? Life was simpler then... ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 9:29 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE (${ITK_INCLUDE_DIRS})? On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle > wrote: I just remembered that I forgot to paste that: cmake_minimum_required(VERSION 2.6) PROJECT(crop) FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.") ENDIF(ITK_FOUND) set(PROJECTNAME "crop") ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 8:25 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem Could you paste the part of your CMakeLists.txt where you find/include ITK? On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle > wrote: I've been using Visual Studio 10 for a few years without any problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my programs with the new libraries the build fails with (for example) this message: crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory Looking at the Project Properties I see in Additional Include Directories: crop.cpp(18): \include\ITK-4.5 For some reason cmake has not used the ITK_DIR prefix. In addition I see in Linker > Additional Dependencies that all the ITK libraries are expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, although in this case the ITK_DIR prefix has been used. This is a bit of a mess. I presume the problem lies with cmake. My version is 2.8.12.2, which I would have thought was recent enough - maybe it's too recent. Has anyone else run into this problem, and is there a solution? Thanks Gib _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 -- Regards, Girish -- Regards, Girish -------------- 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 g.bogle at auckland.ac.nz Fri Aug 29 06:16:14 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 10:16:14 +0000 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: , Message-ID: I just checked the build configuration in cmake and everything looks fine. ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 9:29 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE (${ITK_INCLUDE_DIRS})? On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle > wrote: I just remembered that I forgot to paste that: cmake_minimum_required(VERSION 2.6) PROJECT(crop) FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.") ENDIF(ITK_FOUND) set(PROJECTNAME "crop") ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Friday, 29 August 2014 8:25 p.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem Could you paste the part of your CMakeLists.txt where you find/include ITK? On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle > wrote: I've been using Visual Studio 10 for a few years without any problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to build my programs with the new libraries the build fails with (for example) this message: crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory Looking at the Project Properties I see in Additional Include Directories: crop.cpp(18): \include\ITK-4.5 For some reason cmake has not used the ITK_DIR prefix. In addition I see in Linker > Additional Dependencies that all the ITK libraries are expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent directory, although in this case the ITK_DIR prefix has been used. This is a bit of a mess. I presume the problem lies with cmake. My version is 2.8.12.2, which I would have thought was recent enough - maybe it's too recent. Has anyone else run into this problem, and is there a solution? Thanks Gib _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 -- Regards, Girish -- Regards, Girish -------------- 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 indianzeppelin at gmail.com Fri Aug 29 06:35:44 2014 From: indianzeppelin at gmail.com (Girish Mallya Udupi) Date: Fri, 29 Aug 2014 11:35:44 +0100 Subject: [ITK] [ITK-users] Strange Visual Studio 2012 problem In-Reply-To: References: Message-ID: Ok, I've never actually built the "INSTALL" project and the oldest ITK version I have used is ITK-4.5.1. The folders you see ('CMakeFiles' etc) look normal to me since those are present in the build folder. Anyway, it might be worth trying to build ITK again using the following simple steps. (You might be aware of all the steps, but mentioning them all here just for the sake of completeness). 1) Create a root folder e.g., D:\ITK-4.5 2) Create two folders in the root folder "src" and "bin" 3) Put the ITK source tree in the src folder. So this folder would have the main ITK CMakeLists.txt. 4) Configure and generate using CMake with "D:\ITK-4.5\src" as source folder and "D:\ITK-4.5\bin" as binary directory 5) Then open the ITK.sln from "D:\ITK-4.5\bin" and build the solution. 6) Once built, edit the ITK environment variable ITK_DIR to point to " D:\ITK-4.5\bin" I've never faced any problem using ITK in my projects after building it this way. I am still a beginner, so someone more knowledgeable could point out what exactly the problem was with your build. On Fri, Aug 29, 2014 at 11:16 AM, Gib Bogle wrote: > I just checked the build configuration in cmake and everything looks > fine. > ------------------------------ > *From:* Girish Mallya Udupi [indianzeppelin at gmail.com] > *Sent:* Friday, 29 August 2014 9:29 p.m. > > *To:* Gib Bogle > *Cc:* insight-users at itk.org > *Subject:* Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem > > That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE > (${ITK_INCLUDE_DIRS})? > > > On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle > wrote: > >> I just remembered that I forgot to paste that: >> >> >> cmake_minimum_required(VERSION 2.6) >> >> PROJECT(crop) >> FIND_PACKAGE(ITK) >> IF(ITK_FOUND) >> INCLUDE(${ITK_USE_FILE}) >> ELSE(ITK_FOUND) >> MESSAGE(FATAL_ERROR >> "ITK not found. Please set ITK_DIR.") >> ENDIF(ITK_FOUND) >> >> set(PROJECTNAME "crop") >> ADD_EXECUTABLE(${PROJECTNAME} crop.cpp) >> TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} ) >> ------------------------------ >> *From:* Girish Mallya Udupi [indianzeppelin at gmail.com] >> *Sent:* Friday, 29 August 2014 8:25 p.m. >> *To:* Gib Bogle >> *Cc:* insight-users at itk.org >> *Subject:* Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem >> >> Could you paste the part of your CMakeLists.txt where you >> find/include ITK? >> >> >> On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle >> wrote: >> >>> I've been using Visual Studio 10 for a few years without any >>> problems. Now I have a new machine with Visual Studio 11 (i.e. 2012) >>> installed. I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64. >>> The ITK environment variable ITK_DIR = D:\ITK-VS11-x64. When I try to >>> build my programs with the new libraries the build fails with (for example) >>> this message: >>> >>> crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h': >>> No such file or directory >>> >>> Looking at the Project Properties I see in Additional Include >>> Directories: crop.cpp(18): \include\ITK-4.5 >>> For some reason cmake has not used the ITK_DIR prefix. In addition I >>> see in Linker > Additional Dependencies that all the ITK libraries are >>> expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent >>> directory, although in this case the ITK_DIR prefix has been used. >>> >>> This is a bit of a mess. I presume the problem lies with cmake. My >>> version is 2.8.12.2, which I would have thought was recent enough - maybe >>> it's too recent. Has anyone else run into this problem, and is there a >>> solution? >>> >>> Thanks >>> Gib >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 >>> >>> >> >> >> -- >> Regards, >> Girish >> > > > > -- > Regards, > Girish > -- Regards, Girish -------------- 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 jan.bergmeier at imes.uni-hannover.de Fri Aug 29 09:10:41 2014 From: jan.bergmeier at imes.uni-hannover.de (jan) Date: Fri, 29 Aug 2014 06:10:41 -0700 (PDT) Subject: [ITK] [ITK-users] MutualInformationImageToImageMetric without transformation In-Reply-To: References: <1408375248616-7586081.post@n2.nabble.com> <1409059906690-7586120.post@n2.nabble.com> <1409062625902-7586123.post@n2.nabble.com> <1409129738759-7586127.post@n2.nabble.com> <1409226225974-7586133.post@n2.nabble.com> <1409232280489-7586134.post@n2.nabble.com> Message-ID: <1409317841331-7586146.post@n2.nabble.com> Thanks Matt, this example was exactly what I was searching in the first place. My new minimal version is now this: typedef itk::MutualInformationImageToImageMetric< UChar2DImageType, UChar2DImageType > MetricType; typedef itk::LinearInterpolateImageFunction< UChar2DImageType, double > InterpolatorType; typedef itk::IdentityTransform< double, 2 > TransformType; MetricType::Pointer metric = MetricType::New(); TransformType::Pointer transform = TransformType::New(); InterpolatorType::Pointer interpolator = InterpolatorType::New(); metric->SetFixedImage( fixedImage ); metric->SetMovingImage( movingImage ); metric->SetFixedImageRegion( fixedImage->GetLargestPossibleRegion() ); metric->SetTransform( transform ); metric->SetInterpolator( interpolator ); metric->SetNumberOfSpatialSamples( 1000 ); metric->Initialize(); double mutualInformation = metric->GetValue( transform->GetParameters() ); Regards, Jan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MutualInformationImageToImageMetric-without-transformation-tp7586081p7586146.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 Fri Aug 29 12:24:39 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 29 Aug 2014 12:24:39 -0400 Subject: [ITK] [ITK-users] Problem with itk::ImageToHistogramFilter In-Reply-To: <1409142552492-7586128.post@n2.nabble.com> References: <1409142552492-7586128.post@n2.nabble.com> Message-ID: Hi Maximilian, It is necessary to call imageToHistogramFilter->SetAutoMinimumMaximum( false ); http://www.itk.org/Doxygen/html/classitk_1_1Statistics_1_1ImageToHistogramFilter.html#ab0f2c568bbb0ec3ff22e27e10b6af295 Usually, the range of values are computed from the input image. HTH, Matt On Wed, Aug 27, 2014 at 8:29 AM, maximilian wrote: > I am having problems with the itk::ImageToHistogramFilter. > > I am generating ellipses that I want to add to an image that already > contains some ellipses (in each iteration step, I add one ellipse to an > image being the result of previous iterations). To see if the new ellipse > overlaps by more than (let's say) 10%, I use the ImageToHistogramFilter. > The previous image has objects that all have pixel values of 1. The newly > added ellipse has value of 2. So, to get the number of overlapping pixels, I > add up both images and I count the number of pixels = 3 in that image. > > I set the histogram bin minimum to 0 (background) and the histogram bin > maximum to 3 (+ some constant c) and the number of bins such that the step > is = 1 (here, it is 3 + c). However, when I output the average frequencies > associated to each bin, I get values between 0 and 2 (number like 1.92) and > not between 0 and 3 + c (see output of program of attached file). Why? > > GenerateCells.cxx > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Problem-with-itk-ImageToHistogramFilter-tp7586128.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 g.bogle at auckland.ac.nz Fri Aug 29 16:00:48 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 20:00:48 +0000 Subject: [ITK] [ITK-users] VS 2012 Message-ID: Has anyone built ITK-4.5 with Visual Studio 2012? -------------- 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 g.bogle at auckland.ac.nz Fri Aug 29 17:15:36 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Fri, 29 Aug 2014 21:15:36 +0000 Subject: [ITK] [ITK-users] VS 2012 In-Reply-To: References: , Message-ID: When I build ITK-4.0 with VS2010, Build INSTALL creates the directory that I specified, with four subdirectories: bin. include, lib, share. I set ITK_DIR to the install directory, and my programs build correctly. When I build ITK-4.5 with VS2012, Build INSTALL creates the install directory with a completely different structure, with many additional files and subdirectories, and if ITK_DIR is set to this install directory program builds fail. To build my programs successfully I need to set ITK_DIR to the name of the ITK build directory. What I'm trying to ascertain is whether this is the result of an ITK change or a VS change. When you build ITK-3.20 with VS2012 do you do Build INSTALL, and if so what does the install directory look like? ________________________________ From: ???'?? ?????? [nekto1989 at gmail.com] Sent: Saturday, 30 August 2014 8:52 a.m. To: Gib Bogle Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] VS 2012 Hi, Same way as 3.20-vs2010 or 3.20-vs2012. 2014-08-29 23:00 GMT+03:00 Gib Bogle >: Has anyone built ITK-4.5 with Visual Studio 2012? _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 drescherjm at gmail.com Fri Aug 29 20:46:16 2014 From: drescherjm at gmail.com (John Drescher) Date: Fri, 29 Aug 2014 20:46:16 -0400 Subject: [ITK] [ITK-users] Fwd: VS 2012 In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: John Drescher Date: Fri, Aug 29, 2014 at 8:45 PM Subject: Re: [ITK-users] VS 2012 To: Gib Bogle On Fri, Aug 29, 2014 at 4:00 PM, Gib Bogle wrote: > Has anyone built ITK-4.5 with Visual Studio 2012? Yes dozens of times with no issues at all.. John -- John M. Drescher _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 drescherjm at gmail.com Fri Aug 29 21:19:48 2014 From: drescherjm at gmail.com (John Drescher) Date: Fri, 29 Aug 2014 21:19:48 -0400 Subject: [ITK] [ITK-users] VS 2012 In-Reply-To: References: Message-ID: > Do you do Build INSTALL in the VS IDE? If so, what does your install directory look like, i.e. what are the subdirectories? I do not build INSTALL ever because that prevents me from using both Release and Debug. I build itk using cmake --build from the command line. John _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 g.bogle at auckland.ac.nz Fri Aug 29 21:33:15 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sat, 30 Aug 2014 01:33:15 +0000 Subject: [ITK] [ITK-users] VS 2012 In-Reply-To: References: , Message-ID: It seems that there is a problem with Build INSTALL. The build itself is fine, and I can use it if I set ITK_DIR to the build directory, but the installation done with Build INSTALL is not usable. It's probably a cmake issue, since the wrong paths for include and library files are configured in the VS project file. I'm pursuing this issue because having different build procedures on different machines is a recipe for confusion down the line, when I've forgotten what I had to do to get things working. It's puzzling to me that Kitware now have a divergence between ITK and VTK build-install procedures - the Build INSTALL path works with VTK. ________________________________________ From: John Drescher [drescherjm at gmail.com] Sent: Saturday, 30 August 2014 1:19 p.m. To: Gib Bogle; Insight-Users Subject: Re: [ITK-users] VS 2012 > Do you do Build INSTALL in the VS IDE? If so, what does your install directory look like, i.e. what are the subdirectories? I do not build INSTALL ever because that prevents me from using both Release and Debug. I build itk using cmake --build from the command line. John _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 indianzeppelin at gmail.com Sat Aug 30 02:40:24 2014 From: indianzeppelin at gmail.com (Girish Mallya Udupi) Date: Sat, 30 Aug 2014 07:40:24 +0100 Subject: [ITK] [ITK-users] VS 2012 In-Reply-To: References: Message-ID: I don't think this is an ITK version issue. I built INSTALL for ITK-4.5.1 and ITK-4.6.0 using VS2010 and the install directories have only those sub-directories that you mentioned (bin. include, lib, share). Also, did you try the latest CMake 3.0.1? Just a couple of weeks ago, I faced an issue (can't remember the specific details) when building my project using 2.8.12 while 3.0.1 worked without any problems. On Sat, Aug 30, 2014 at 2:33 AM, Gib Bogle wrote: > It seems that there is a problem with Build INSTALL. The build itself is > fine, and I can use it if I set ITK_DIR to the build directory, but the > installation done with Build INSTALL is not usable. It's probably a cmake > issue, since the wrong paths for include and library files are configured > in the VS project file. > > I'm pursuing this issue because having different build procedures on > different machines is a recipe for confusion down the line, when I've > forgotten what I had to do to get things working. It's puzzling to me that > Kitware now have a divergence between ITK and VTK build-install procedures > - the Build INSTALL path works with VTK. > ________________________________________ > From: John Drescher [drescherjm at gmail.com] > Sent: Saturday, 30 August 2014 1:19 p.m. > To: Gib Bogle; Insight-Users > Subject: Re: [ITK-users] VS 2012 > > > Do you do Build INSTALL in the VS IDE? If so, what does your install > directory look like, i.e. what are the subdirectories? > > I do not build INSTALL ever because that prevents me from using both > Release and Debug. I build itk using cmake --build from the command > line. > > John > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -- Regards, Girish -------------- 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 g.bogle at auckland.ac.nz Sat Aug 30 05:59:17 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sat, 30 Aug 2014 09:59:17 +0000 Subject: [ITK] [ITK-users] VS 2012 In-Reply-To: References: , Message-ID: Thanks Girish! I installed cmake 3.0.1 and rebuilt ITK, and now it all works as expected. Whew! Gib ________________________________ From: Girish Mallya Udupi [indianzeppelin at gmail.com] Sent: Saturday, 30 August 2014 6:40 p.m. To: Gib Bogle Cc: John Drescher; Insight-Users Subject: Re: [ITK-users] VS 2012 I don't think this is an ITK version issue. I built INSTALL for ITK-4.5.1 and ITK-4.6.0 using VS2010 and the install directories have only those sub-directories that you mentioned (bin. include, lib, share). Also, did you try the latest CMake 3.0.1? Just a couple of weeks ago, I faced an issue (can't remember the specific details) when building my project using 2.8.12 while 3.0.1 worked without any problems. On Sat, Aug 30, 2014 at 2:33 AM, Gib Bogle > wrote: It seems that there is a problem with Build INSTALL. The build itself is fine, and I can use it if I set ITK_DIR to the build directory, but the installation done with Build INSTALL is not usable. It's probably a cmake issue, since the wrong paths for include and library files are configured in the VS project file. I'm pursuing this issue because having different build procedures on different machines is a recipe for confusion down the line, when I've forgotten what I had to do to get things working. It's puzzling to me that Kitware now have a divergence between ITK and VTK build-install procedures - the Build INSTALL path works with VTK. ________________________________________ From: John Drescher [drescherjm at gmail.com] Sent: Saturday, 30 August 2014 1:19 p.m. To: Gib Bogle; Insight-Users Subject: Re: [ITK-users] VS 2012 > Do you do Build INSTALL in the VS IDE? If so, what does your install directory look like, i.e. what are the subdirectories? I do not build INSTALL ever because that prevents me from using both Release and Debug. I build itk using cmake --build from the command line. John _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users -- Regards, Girish -------------- 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 marco.ulge at gmail.com Sat Aug 30 06:16:57 2014 From: marco.ulge at gmail.com (Marco Ulge) Date: Sat, 30 Aug 2014 03:16:57 -0700 (PDT) Subject: [ITK] [ITK-users] Convert Matrix to itk::Image Message-ID: <1409393816990-34497.post@n7.nabble.com> Hello, I used the vnl_matrix_ref class to extract the matrix from the itk::Image and then perform some calculations. What i need to do now, is convert the matrix back to an itk::Image and i read that i should use the itkImportImageFilter class to achieve this. I am having difficulties understanding what should be my input to SetImportPointer method. Can anyone help me with this? Regards, Marco -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Convert-Matrix-to-itk-Image-tp34497.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 millerjv at gmail.com Sat Aug 30 08:23:20 2014 From: millerjv at gmail.com (Jim Miller) Date: Sat, 30 Aug 2014 08:23:20 -0400 Subject: [ITK] [ITK-users] Convert Matrix to itk::Image In-Reply-To: <1409393816990-34497.post@n7.nabble.com> References: <1409393816990-34497.post@n7.nabble.com> Message-ID: You pass the pointer to the pixels you want to ITK image to wrap. There is a Boolean in the methods to control whether ITK should manage the memory from that point forward (deleting the pixels when the ITK Image is destroyed) or whether you want your program to maintain control of that memory block and you will be carefule to ensure the buffer is freed at the appropriate time. Jim > On Aug 30, 2014, at 6:16 AM, Marco Ulge wrote: > > Hello, > > I used the vnl_matrix_ref class to extract the matrix from the itk::Image > and then perform some calculations. What i need to do now, is convert the > matrix back to an itk::Image and i read that i should use the > itkImportImageFilter class to achieve this. I am having difficulties > understanding what should be my input to SetImportPointer method. Can anyone > help me with this? > > Regards, > > Marco > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Convert-Matrix-to-itk-Image-tp34497.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 wechen5 at vt.edu Sat Aug 30 18:36:29 2014 From: wechen5 at vt.edu (blueridge) Date: Sat, 30 Aug 2014 15:36:29 -0700 (PDT) Subject: [ITK] [ITK-users] Using RGB file for GMM module Message-ID: <1409438189857-34499.post@n7.nabble.com> Is it possible to use ImageToListSampleAdaptor to convert RGB image to a list of samples and then use ExpectationMaximizationMixtureModelEstimator to estimate components of this RGB image? thanks -- View this message in context: http://itk-users.7.n7.nabble.com/Using-RGB-file-for-GMM-module-tp34499.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 mohammedrashadkm at gmail.com Sun Aug 31 01:28:21 2014 From: mohammedrashadkm at gmail.com (Rashad M) Date: Sun, 31 Aug 2014 10:58:21 +0530 Subject: [ITK] [ITK-dev] ITKVideo module Message-ID: Hi all, I have trying to process a video from UAV along with a GPS data to try generate a stream in KLV[1] format. So far I had found[2],[3], [4]. The github.io page gives an sample code and a demo video which looks great! So I would to know if there is more examples as with other ITK modules? Using OpenCV bridge is it possible to have a mix of algorithms in opencv and itk? [1] http://en.wikipedia.org/wiki/KLV [2] http://www.itk.org/Wiki/ITK_Release_4/Video [3] http://www.itk.org/Wiki/ITK_Release_4/Video/HowToBuildVideoModules [4] http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/ITK/VideoProcessingUsingOpenCVBridge/index.html -- Regards, Rashad -------------- 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 Sun Aug 31 08:09:14 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 31 Aug 2014 08:09:14 -0400 Subject: [ITK] [ITK-dev] ITKVideo module In-Reply-To: References: Message-ID: Hi Rashad, Here is one more example that shows how to work with ITK-OpenCV [1]. HTH, Matt [1] http://itk.org/ITKExamples/src/Video/BridgeOpenCV/ConvertAnITKGrayScaleImageToCVMat/Documentation.html On Sun, Aug 31, 2014 at 1:28 AM, Rashad M wrote: > Hi all, > > I have trying to process a video from UAV along with a GPS data to try > generate a stream in KLV[1] format. So far I had found[2],[3], [4]. The > github.io page gives an sample code and a demo video which looks great! > > So I would to know if there is more examples as with other ITK modules? > Using OpenCV bridge is it possible to have a mix of algorithms in opencv and > itk? > > [1] http://en.wikipedia.org/wiki/KLV > [2] http://www.itk.org/Wiki/ITK_Release_4/Video > [3] http://www.itk.org/Wiki/ITK_Release_4/Video/HowToBuildVideoModules > [4] > http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/ITK/VideoProcessingUsingOpenCVBridge/index.html > > > -- > Regards, > Rashad > > _______________________________________________ > Powered by www.kitware.com > > 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 pattersonnp.work at gmail.com Sun Aug 31 16:06:53 2014 From: pattersonnp.work at gmail.com (NPatterson) Date: Sun, 31 Aug 2014 13:06:53 -0700 (PDT) Subject: [ITK] [ITK-users] ResampleDICOM example and DCMTK In-Reply-To: <95FBA78F-1DFC-4F33-9572-DA0DD9DE1E73@gmail.com> References: <95FBA78F-1DFC-4F33-9572-DA0DD9DE1E73@gmail.com> Message-ID: <1409515613801-7586158.post@n2.nabble.com> Hi, I wondered if anyone could test the code attached in the thread header "ResampleDICOM example and DCMTK" regarding the use of DCMTK for DICOM reading writing in ITK. I adapted the ResampleDICOM example to work with DCMTK instead of GDCM, and although I get no errors, I also do not get any output dicom images. If someone has the time to test this code to see if they observe the same behaviour/or can suggest a fix, I would be very appreciative. Regards, Nick. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-ResampleDICOM-example-and-DCMTK-tp7586131p7586158.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 wechen5 at vt.edu Sun Aug 31 16:40:52 2014 From: wechen5 at vt.edu (blueridge) Date: Sun, 31 Aug 2014 13:40:52 -0700 (PDT) Subject: [ITK] [ITK-users] ExpectationMaximizationMixtureModelEstimator use of WeightedMeanSampleFilter In-Reply-To: References: Message-ID: <1409517652082-34501.post@n7.nabble.com> It's kind of late, but just for the record since I ran into same error message. My problem was that I did not initialize the component parameters correctly, ( I did not initialize it at all, use default constructor, with set all zeros), then the weights of first iteration are all zeros, which triggers the error message. -- View this message in context: http://itk-users.7.n7.nabble.com/ExpectationMaximizationMixtureModelEstimator-error-tp31798p34501.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 Sun Aug 31 17:38:39 2014 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 31 Aug 2014 17:38:39 -0400 Subject: [ITK] [ITK-users] ResampleDICOM example and DCMTK In-Reply-To: <1409515613801-7586158.post@n2.nabble.com> References: <95FBA78F-1DFC-4F33-9572-DA0DD9DE1E73@gmail.com> <1409515613801-7586158.post@n2.nabble.com> Message-ID: Hi Nick, Nothing stands out from inspecting the code. Could you please send an example dataset? Thanks, Matt On Sun, Aug 31, 2014 at 4:06 PM, NPatterson wrote: > Hi, I wondered if anyone could test the code attached in the thread header > "ResampleDICOM example and DCMTK" regarding the use of DCMTK for DICOM > reading writing in ITK. I adapted the ResampleDICOM example to work with > DCMTK instead of GDCM, and although I get no errors, I also do not get any > output dicom images. If someone has the time to test this code to see if > they observe the same behaviour/or can suggest a fix, I would be very > appreciative. > > Regards, Nick. > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-ResampleDICOM-example-and-DCMTK-tp7586131p7586158.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