From grothausmann.roman at mh-hannover.de Wed Apr 1 10:30:13 2015 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Wed, 01 Apr 2015 16:30:13 +0200 Subject: [ITK-users] automated splitting and pasting of volumes for use in external programs In-Reply-To: <551AF134.4080804@mh-hannover.de> References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> <55191685.9020706@mh-hannover.de> <551AF134.4080804@mh-hannover.de> Message-ID: <551C00F5.1060608@mh-hannover.de> It seems the the Minipipeline-example (http://www.itk.org/Wiki/ITK/Examples/Developer/Minipipeline) and the Itk User Guide (http://www.itk.org/Doxygen/html/classitk_1_1ImageSource.html#ab988dcc743020c2f4381996ba6503306) differ concerning grafting. With the User Guide grafting of the input it works up to some percent of the StreamingImageFilter execution progress but then crashes with a Segmentation fault. (see https://github.com/romangrothausmann/ITK-CLIs/commit/51d6a3ffc3a74cfb2ccf711b1e3b18f0c65a9876) With the infos given in the User Guide I'm confused what of a general Streaming Filter is needed for a simple Minipipeline Filter (Composit Filter). What I would need is a combination of the Streaming/Threaded example and the Minipipeline-example or the info what needs to be added/modified in the Minipipeline-example. Is my understanding correct that grep-ing the itk sources for ThreadedGenerateData will list all filters that are capable of streaming unless they have special conditions on the InputRequestedRegion? Will a multi-threaded filter pipeline be only single-threaded if connected to itkStreamingImageFilter? Thanks for any help or hints. Roman On 31/03/15 21:10, Dr. Roman Grothausmann wrote: > Dear Matt, > > > Thanks for Your quick reply. If I got Your hint right, You suggest writing my > own filter (that e.g. does the writing of the chunk to a file) and put an > itkStreamingImageFilter after it supplying it with the # of chunks and the type > of splitter. If I understand the ITK Software Guide correctly, such a filter > needs to be threaded, i.e. have a ThreadedGenerateData. > I tried that with a simple AddFilter that should just add a constant according > to the chunk number to the region it is supposed to process (files attached). > However it stops due to region miss-matches. I can't see why. With just > GenerateData it seems like it is not streaming, according to the > PipelineMonitorImageFilter. > What would be the correct way to go? > > Many thanks for looking into this. > Roman > > On 30/03/15 16:02, Matt McCormick wrote: >> Hi Roman, >> >> You probably want to use the streaming capabilities of the ITK >> pipeline. This is covered in more detailed in the ITK Software Guide. >> The pipeline internally uses ImageRegionSplitter classes. Overlaps are >> handled by propagation of the RequestedRegion throughout the pipeline. >> To monitor the changes in the regions, use the >> PipelineMonitorImageFilter [1]. >> >> HTH, >> Matt >> >> [1] http://www.itk.org/Doxygen/html/classitk_1_1PipelineMonitorImageFilter.html >> >> On Mon, Mar 30, 2015 at 5:25 AM, Dr. Roman Grothausmann >> wrote: >>> Dear mailing list members, >>> >>> >>> A dataset I work on is too big to load completely into itksnap for manual >>> adjustment of the automatic pre-segementation with watersheds. The full >>> resolution is needed, so I cannot work with a re-sampled version. The only >>> possible easy solution I see at the moment is to split up the 3D image into >>> smaller blocks of sizes as equal as possible, do the itsnap interaction, and >>> finally paste all blocks of the resulting segmentation back together. >>> Would itkImageRegionSplitterMultidimensional be the right filter for the >>> splitting of blocks as equal in size as possible? >>> Is there a "logger" like e.g. itkXMLFileOutputWindow (as used in >>> itkStreamingImageFilterTest2.cxx) that could be used to store the regions >>> corresponding to each block-file to use that for itkPasteImageFilter to >>> combine these blocks later again? >>> Not needed now, but perhaps lager: Is there some nice way to handle overlaps >>> in this case that is already implemented in itk, something like >>> itkImageRegionSplitterMultidimensional::SetOverlap()? >>> >>> Many thanks for any help or hints. >>> Roman >>> >>> On 17/03/15 18:13, Pol Mons? Purt? wrote: >>>> >>>> I guess the way to go would be to take the splitter (probably >>>> ImageRegionSplitterMultidimensional now that I look at it) and extend it >>>> to >>>> support overlap. If I do it, I'll let you know in case it is of interest >>>> to >>>> anyone. For now I'll stick to my class. >>> >>> >>> >>> -- >>> Dr. Roman Grothausmann >>> >>> Tomographie und Digitale Bildverarbeitung >>> Tomography and Digital Image Analysis >>> >>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>> Medizinische Hochschule Hannover >>> Carl-Neuberg-Str. 1 >>> D-30625 Hannover >>> >>> Tel. +49 511 532-9574 >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 From blowekamp at mail.nih.gov Wed Apr 1 10:53:24 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 1 Apr 2015 10:53:24 -0400 Subject: [ITK-users] automated splitting and pasting of volumes for use in external programs In-Reply-To: <551C00F5.1060608@mh-hannover.de> References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> <55191685.9020706@mh-hannover.de> <551AF134.4080804@mh-hannover.de> <551C00F5.1060608@mh-hannover.de> Message-ID: Hello, Looking at your code the first big problem is that you are trying to do a mini-pipeline in the ThreadedGenerateData method. You have having each thread modify the m_AddImageFilter concurrently. Generally mini-pipelines should be done in the more general GenerateDataMethod as is done int he ITKExample Minipipeline. Then the mini-piple filters will be multi-threaded. ( a couple more comments below ) HTH, Brad On Apr 1, 2015, at 10:30 AM, Dr. Roman Grothausmann wrote: > It seems the the Minipipeline-example (http://www.itk.org/Wiki/ITK/Examples/Developer/Minipipeline) and the Itk User Guide (http://www.itk.org/Doxygen/html/classitk_1_1ImageSource.html#ab988dcc743020c2f4381996ba6503306) differ concerning grafting. > With the User Guide grafting of the input it works up to some percent of the StreamingImageFilter execution progress but then crashes with a Segmentation fault. (see https://github.com/romangrothausmann/ITK-CLIs/commit/51d6a3ffc3a74cfb2ccf711b1e3b18f0c65a9876) > With the infos given in the User Guide I'm confused what of a general Streaming Filter is needed for a simple Minipipeline Filter (Composit Filter). What I would need is a combination of the Streaming/Threaded example and the Minipipeline-example or the info what needs to be added/modified in the Minipipeline-example. > Is my understanding correct that grep-ing the itk sources for ThreadedGenerateData will list all filters that are capable of streaming unless they have special conditions on the InputRequestedRegion? By default the ITK pipeline is streamable for the ImageSource derived filters. To make it a filter not streamable the regions do need to be modified. There pipeline methods are general and customizable. There do exists streamable filters which are not multi-threaded. And there exists filters which need their entire output but can an arbitrary output region. > Will a multi-threaded filter pipeline be only single-threaded if connected to itkStreamingImageFilter? The pipeline should not be multi-threaded only the individual filters are > > Thanks for any help or hints. > Roman > > > On 31/03/15 21:10, Dr. Roman Grothausmann wrote: >> Dear Matt, >> >> >> Thanks for Your quick reply. If I got Your hint right, You suggest writing my >> own filter (that e.g. does the writing of the chunk to a file) and put an >> itkStreamingImageFilter after it supplying it with the # of chunks and the type >> of splitter. If I understand the ITK Software Guide correctly, such a filter >> needs to be threaded, i.e. have a ThreadedGenerateData. >> I tried that with a simple AddFilter that should just add a constant according >> to the chunk number to the region it is supposed to process (files attached). >> However it stops due to region miss-matches. I can't see why. With just >> GenerateData it seems like it is not streaming, according to the >> PipelineMonitorImageFilter. >> What would be the correct way to go? >> >> Many thanks for looking into this. >> Roman >> >> On 30/03/15 16:02, Matt McCormick wrote: >>> Hi Roman, >>> >>> You probably want to use the streaming capabilities of the ITK >>> pipeline. This is covered in more detailed in the ITK Software Guide. >>> The pipeline internally uses ImageRegionSplitter classes. Overlaps are >>> handled by propagation of the RequestedRegion throughout the pipeline. >>> To monitor the changes in the regions, use the >>> PipelineMonitorImageFilter [1]. >>> >>> HTH, >>> Matt >>> >>> [1] http://www.itk.org/Doxygen/html/classitk_1_1PipelineMonitorImageFilter.html >>> >>> On Mon, Mar 30, 2015 at 5:25 AM, Dr. Roman Grothausmann >>> wrote: >>>> Dear mailing list members, >>>> >>>> >>>> A dataset I work on is too big to load completely into itksnap for manual >>>> adjustment of the automatic pre-segementation with watersheds. The full >>>> resolution is needed, so I cannot work with a re-sampled version. The only >>>> possible easy solution I see at the moment is to split up the 3D image into >>>> smaller blocks of sizes as equal as possible, do the itsnap interaction, and >>>> finally paste all blocks of the resulting segmentation back together. >>>> Would itkImageRegionSplitterMultidimensional be the right filter for the >>>> splitting of blocks as equal in size as possible? >>>> Is there a "logger" like e.g. itkXMLFileOutputWindow (as used in >>>> itkStreamingImageFilterTest2.cxx) that could be used to store the regions >>>> corresponding to each block-file to use that for itkPasteImageFilter to >>>> combine these blocks later again? >>>> Not needed now, but perhaps lager: Is there some nice way to handle overlaps >>>> in this case that is already implemented in itk, something like >>>> itkImageRegionSplitterMultidimensional::SetOverlap()? >>>> >>>> Many thanks for any help or hints. >>>> Roman >>>> >>>> On 17/03/15 18:13, Pol Mons? Purt? wrote: >>>>> >>>>> I guess the way to go would be to take the splitter (probably >>>>> ImageRegionSplitterMultidimensional now that I look at it) and extend it >>>>> to >>>>> support overlap. If I do it, I'll let you know in case it is of interest >>>>> to >>>>> anyone. For now I'll stick to my class. >>>> >>>> >>>> >>>> -- >>>> Dr. Roman Grothausmann >>>> >>>> Tomographie und Digitale Bildverarbeitung >>>> Tomography and Digital Image Analysis >>>> >>>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>>> Medizinische Hochschule Hannover >>>> Carl-Neuberg-Str. 1 >>>> D-30625 Hannover >>>> >>>> Tel. +49 511 532-9574 >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 matt.mccormick at kitware.com Wed Apr 1 11:49:49 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 1 Apr 2015 11:49:49 -0400 Subject: [ITK-users] Constrain a transform for optimizer In-Reply-To: References: Message-ID: Hi Laurent, Only some of the optimizers, such as the LBFGSBOptimizerv4 [1] currently can be constrained. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1LBFGSBOptimizerv4.html On Tue, Mar 31, 2015 at 10:21 AM, Laurent Chauvin wrote: > Hello ITK users, > > I'm trying to use a Levenberg-Marquardt optimizer to find a point in a plane > (based on a cost function). > For now I create a itk::TranslationTransform< double, 3 > and set it to the > Levenberg-Marquardt optmizer. > > However, I know the point I'm looking for is included in a plane. > > I was wondering if there is a way to constrain the transform to only check > points in the plane (to avoid looking for points out of the plane to speed > up the optimization process) ? > > Thank you very much. > > -- > Laurent Chauvin, MS > Surgical Navigation and Robotics Laboratory, Radiology Department > Brigham And Women's Hospital, Harvard Medical School > http://wiki.ncigt.org/index.php/User:Lchauvin > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK 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 Apr 1 11:59:55 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 1 Apr 2015 11:59:55 -0400 Subject: [ITK-users] Working with RIRE Datasets In-Reply-To: <1427860323074-7587099.post@n2.nabble.com> References: <1427860323074-7587099.post@n2.nabble.com> Message-ID: Hi Gabriel, > Hi! how are you? Doing great! Thanks for asking questions on the list. :-) > I'm trying to use RIRE datasets..., for example: > > In the RIRE terminology we say "From CT to MR", this means that the "moving > image" is the CT image and the fixed image is the MR image. Then, I need a > transformation "T" to apply to the CT test points for the comparison with > the "ground truth"...I'm not wrong about this? Usually, a transformation "From CT to MR" implies that CT is the Fixed Image and MR is the Moving Image in ITK terminology. > But my problem is that the ITK provides a transformation that maps poins of > the fixed (MR) image on the moving image (CT) , I guess I need to get the > inverse transformation...is that possible? I'm misunderstanding something? Yes, you can easily get an inverse for a transform with the GetInverse [1] method. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1Transform.html#aec45529ed771515f684b96c5bbff6fc6 From gabrielgimenez85 at gmail.com Wed Apr 1 21:46:32 2015 From: gabrielgimenez85 at gmail.com (=?UTF-8?Q?Gabriel_A=2E_Gim=C3=A9nez?=) Date: Wed, 1 Apr 2015 21:46:32 -0400 Subject: [ITK-users] Working with RIRE Datasets In-Reply-To: References: <1427860323074-7587099.post@n2.nabble.com> Message-ID: > > Doing great! Thanks for asking questions on the list. :-) great!, thank you for answer ! Usually, a transformation "From CT to MR" implies that CT is the Fixed > Image and MR is the Moving Image in ITK terminology. Yes, but in RIRE is different...[1]: "A given transformation maps points from one volume on the left, which we will call the ?From? image, to one volume on the right, which we will call the ?To? image." Yes, you can easily get an inverse for a transform with the GetInverse Excellent !, I tried it and it worked great ...: TransformType::Pointer inverseTransform = TransformType::New(); bool response = finalTransform->GetInverse(inverseTransform); Thanks and regards! [1] http://www.insight-journal.org/rire/transform_format.php 2015-04-01 11:59 GMT-04:00 Matt McCormick : > Hi Gabriel, > > > Hi! how are you? > > Doing great! Thanks for asking questions on the list. :-) > > > I'm trying to use RIRE datasets..., for example: > > > > In the RIRE terminology we say "From CT to MR", this means that the > "moving > > image" is the CT image and the fixed image is the MR image. Then, I need > a > > transformation "T" to apply to the CT test points for the comparison > with > > the "ground truth"...I'm not wrong about this? > > Usually, a transformation "From CT to MR" implies that CT is the Fixed > Image and MR is the Moving Image in ITK terminology. > > > But my problem is that the ITK provides a transformation that maps poins > of > > the fixed (MR) image on the moving image (CT) , I guess I need to get the > > inverse transformation...is that possible? I'm misunderstanding > something? > > Yes, you can easily get an inverse for a transform with the GetInverse > [1] method. > > HTH, > Matt > > [1] > http://www.itk.org/Doxygen/html/classitk_1_1Transform.html#aec45529ed771515f684b96c5bbff6fc6 > -- *Gabriel Alberto Gim?nez.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From gaetan.lehmann at gmail.com Thu Apr 2 08:32:57 2015 From: gaetan.lehmann at gmail.com (Gaetan Lehmann) Date: Thu, 2 Apr 2015 14:32:57 +0200 Subject: [ITK-users] Region of two labelObjects In-Reply-To: References: Message-ID: Hi Pol, 2015-03-30 23:02 GMT+02:00 Pol Mons? Purt? : > > Hello all, > > I have two label objects, how can I merge the two BoundingBoxes together > so I know the necessary size of the image? (other than creating it myself > by searching max/min of each dimension) > > How come LabelMap doesn't resize automatically when objects are added? It > could. > The LabelMap class was designed to work as much as possible as the Image class, that does not have this kind of behavior, and to avoid as much as possible the costly operations. So while I don't think this should be done automatically, we should have some methods or filters to make this easy to do. There are a few filters to manipulate the regions of a LabelMap, but none of them does exactly what you need: * PadLabelMapFilter that can enlarge the LabelMap region, but not based on its content * CropLabelMapFilter that can shrink the LabelMap region, but not based on its content * RegionFromReferenceLabelMapFilter that makes the LabelMap region match the region of a reference input image * AutoCropLabelMapFilter that reduce the region covered by a label map based on its content, but can't enlarge it In my opinion, we should have a ComputeBoundingBox() method in LabelMap that compute the region covered by all the label objects - the code can be moved from AutoCropLabelMapFilter. We could then do labelMap->AddLabelObject(labelObject1); labelMap->AddLabelObject(labelObject2); labelMap->SetRegions(labelMap->ComputeBoundingBox()); to update the region. Would you agree to implement such a method for the LabelMap class? Optionally, we could also think to a filter to do that in a pipeline. Regards, Ga?tan -------------- next part -------------- An HTML attachment was scrubbed... URL: From lluna.nova at gmail.com Thu Apr 2 08:52:23 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Thu, 2 Apr 2015 14:52:23 +0200 Subject: [ITK-users] Region of two labelObjects In-Reply-To: References: Message-ID: Hello Ga?tan, Yes I agree, Thinking about it later I also reached the same conclusion that a filter that changes the regions internally without warning could be a pitfall. The RegionFromReferenceLabelMapFilter might actually work for me given that I do have the original ROI region and roi image, but I can implement the ComputeBoundingBox() function anyway, it's cleaner if I don't use the original ROI. What's the workflow for submitting code? Fork the itk repository, add the method and PR or something else? If you'd rather have a filter that does this, I unfortunatelly won't have the time to do it this month (and maybe next)... Cheers, Pol 2015-04-02 14:32 GMT+02:00 Gaetan Lehmann : > Hi Pol, > > 2015-03-30 23:02 GMT+02:00 Pol Mons? Purt? : > >> >> Hello all, >> >> I have two label objects, how can I merge the two BoundingBoxes together >> so I know the necessary size of the image? (other than creating it myself >> by searching max/min of each dimension) >> >> How come LabelMap doesn't resize automatically when objects are added? It >> could. >> > > The LabelMap class was designed to work as much as possible as the Image > class, that does not have this kind of behavior, and to avoid as much as > possible the costly operations. > > So while I don't think this should be done automatically, we should have > some methods or filters to make this easy to do. > > There are a few filters to manipulate the regions of a LabelMap, but none > of them does exactly what you need: > > * PadLabelMapFilter that can enlarge the LabelMap region, but not based on > its content > * CropLabelMapFilter that can shrink the LabelMap region, but not based on > its content > * RegionFromReferenceLabelMapFilter that makes the LabelMap region match > the region of a reference input image > * AutoCropLabelMapFilter that reduce the region covered by a label map > based on its content, but can't enlarge it > > In my opinion, we should have a ComputeBoundingBox() method in LabelMap > that compute the region covered by all the label objects - the code can be > moved from AutoCropLabelMapFilter. We could then do > > labelMap->AddLabelObject(labelObject1); > labelMap->AddLabelObject(labelObject2); > labelMap->SetRegions(labelMap->ComputeBoundingBox()); > > to update the region. > > Would you agree to implement such a method for the LabelMap class? > > Optionally, we could also think to a filter to do that in a pipeline. > > Regards, > > Ga?tan > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Thu Apr 2 09:00:54 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 2 Apr 2015 09:00:54 -0400 Subject: [ITK-users] Region of two labelObjects In-Reply-To: References: Message-ID: Hello, Since I believe that the LabelMap filters change the regions do next to no work, as they can just change the meta-data and the label object can be just grafted when the filter is run in place. Practically speaking you could just Pad by 10000, then use the AutoCrop to get the desired results? This should still be very efficient since there is not per-pixel based operations done. HTH, Brad On Apr 2, 2015, at 8:52 AM, Pol Mons? Purt? wrote: > Hello Ga?tan, > > Yes I agree, Thinking about it later I also reached the same conclusion that a filter that changes the regions internally without warning could be a pitfall. > > The RegionFromReferenceLabelMapFilter might actually work for me given that I do have the original ROI region and roi image, but I can implement the ComputeBoundingBox() function anyway, it's cleaner if I don't use the original ROI. > > What's the workflow for submitting code? Fork the itk repository, add the method and PR or something else? > > If you'd rather have a filter that does this, I unfortunatelly won't have the time to do it this month (and maybe next)... > > Cheers, > > Pol > > > > 2015-04-02 14:32 GMT+02:00 Gaetan Lehmann : > Hi Pol, > > 2015-03-30 23:02 GMT+02:00 Pol Mons? Purt? : > > Hello all, > > I have two label objects, how can I merge the two BoundingBoxes together so I know the necessary size of the image? (other than creating it myself by searching max/min of each dimension) > > How come LabelMap doesn't resize automatically when objects are added? It could. > > The LabelMap class was designed to work as much as possible as the Image class, that does not have this kind of behavior, and to avoid as much as possible the costly operations. > > So while I don't think this should be done automatically, we should have some methods or filters to make this easy to do. > > There are a few filters to manipulate the regions of a LabelMap, but none of them does exactly what you need: > > * PadLabelMapFilter that can enlarge the LabelMap region, but not based on its content > * CropLabelMapFilter that can shrink the LabelMap region, but not based on its content > * RegionFromReferenceLabelMapFilter that makes the LabelMap region match the region of a reference input image > * AutoCropLabelMapFilter that reduce the region covered by a label map based on its content, but can't enlarge it > > In my opinion, we should have a ComputeBoundingBox() method in LabelMap that compute the region covered by all the label objects - the code can be moved from AutoCropLabelMapFilter. We could then do > > labelMap->AddLabelObject(labelObject1); > labelMap->AddLabelObject(labelObject2); > labelMap->SetRegions(labelMap->ComputeBoundingBox()); > > to update the region. > > Would you agree to implement such a method for the LabelMap class? > > Optionally, we could also think to a filter to do that in a pipeline. > > Regards, > > Ga?tan > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 zeinsalah at gmail.com Thu Apr 2 09:06:01 2015 From: zeinsalah at gmail.com (Zein Salah) Date: Thu, 2 Apr 2015 15:06:01 +0200 Subject: [ITK-users] running DanielssonDistanceMapImageFilter on a subregion of the input image Message-ID: Hi, Is it actually possible to run an ITK filter (in particular, I am interested in DanielssonDistanceMapImageFilter) on a subregion of image, rather that the whole image extension? Thanks, Zeno From blowekamp at mail.nih.gov Thu Apr 2 09:15:51 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 2 Apr 2015 09:15:51 -0400 Subject: [ITK-users] running DanielssonDistanceMapImageFilter on a subregion of the input image In-Reply-To: References: Message-ID: <5BBF792F-DC11-4061-92ED-A811D8F02D05@mail.nih.gov> Hello, You can certainly crop or extract a sub-region and set that as input to the Danielsson distance filter. However, this filter required its full input image and produces its full output. This is an intrinsic property of distance map generators because produces a map which contains global information not local. HTH, Brad On Apr 2, 2015, at 9:06 AM, Zein Salah wrote: > Hi, > > Is it actually possible to run an ITK filter (in particular, I am > interested in DanielssonDistanceMapImageFilter) on a subregion of > image, rather that the whole image extension? > > Thanks, > > Zeno > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Thu Apr 2 09:22:01 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 2 Apr 2015 09:22:01 -0400 Subject: [ITK-users] Region of two labelObjects In-Reply-To: References: Message-ID: Hi Pol, Thanks for considering make improvements to this code. Instructions to submit a patch can be found here [1]. Please let us know if you have any questions. Thanks, Matt [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html On Thu, Apr 2, 2015 at 8:52 AM, Pol Mons? Purt? wrote: > Hello Ga?tan, > > Yes I agree, Thinking about it later I also reached the same conclusion that > a filter that changes the regions internally without warning could be a > pitfall. > > The RegionFromReferenceLabelMapFilter might actually work for me given that > I do have the original ROI region and roi image, but I can implement the > ComputeBoundingBox() function anyway, it's cleaner if I don't use the > original ROI. > > What's the workflow for submitting code? Fork the itk repository, add the > method and PR or something else? > > If you'd rather have a filter that does this, I unfortunatelly won't have > the time to do it this month (and maybe next)... > > Cheers, > > Pol > > > > 2015-04-02 14:32 GMT+02:00 Gaetan Lehmann : >> >> Hi Pol, >> >> 2015-03-30 23:02 GMT+02:00 Pol Mons? Purt? : >>> >>> >>> Hello all, >>> >>> I have two label objects, how can I merge the two BoundingBoxes together >>> so I know the necessary size of the image? (other than creating it myself by >>> searching max/min of each dimension) >>> >>> How come LabelMap doesn't resize automatically when objects are added? It >>> could. >> >> >> The LabelMap class was designed to work as much as possible as the Image >> class, that does not have this kind of behavior, and to avoid as much as >> possible the costly operations. >> >> So while I don't think this should be done automatically, we should have >> some methods or filters to make this easy to do. >> >> There are a few filters to manipulate the regions of a LabelMap, but none >> of them does exactly what you need: >> >> * PadLabelMapFilter that can enlarge the LabelMap region, but not based on >> its content >> * CropLabelMapFilter that can shrink the LabelMap region, but not based on >> its content >> * RegionFromReferenceLabelMapFilter that makes the LabelMap region match >> the region of a reference input image >> * AutoCropLabelMapFilter that reduce the region covered by a label map >> based on its content, but can't enlarge it >> >> In my opinion, we should have a ComputeBoundingBox() method in LabelMap >> that compute the region covered by all the label objects - the code can be >> moved from AutoCropLabelMapFilter. We could then do >> >> labelMap->AddLabelObject(labelObject1); >> labelMap->AddLabelObject(labelObject2); >> labelMap->SetRegions(labelMap->ComputeBoundingBox()); >> >> to update the region. >> >> Would you agree to implement such a method for the LabelMap class? >> >> Optionally, we could also think to a filter to do that in a pipeline. >> >> Regards, >> >> Ga?tan >> > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From gaetan.lehmann at gmail.com Thu Apr 2 09:47:25 2015 From: gaetan.lehmann at gmail.com (Gaetan Lehmann) Date: Thu, 2 Apr 2015 15:47:25 +0200 Subject: [ITK-users] SimpleITK FFTConvolution Message-ID: Hi Brad, I'm trying to use SimpleITK's FFTConvolution from python: import SimpleITK as sitk img = sitk.ReadImage("/tmp/cthead1.png") kernel = sitk.ReadImage("/tmp/kernel2.png") conv = sitk.FFTConvolution(img, kernel) the last line fails with the error: Traceback (most recent call last): File "/tmp/test.py", line 5, in conv = sitk.FFTConvolution(img, kernel) File "/Users/glehmann/Library/Python/2.7/lib/python/site-packages/SimpleITK/SimpleITK.py", line 17771, in FFTConvolution return _SimpleITK.FFTConvolution(*args, **kwargs) RuntimeError: Exception thrown in SimpleITK FFTConvolution: /scratch/dashboards/SimpleITK-OSX10.7-intel-pkg/SimpleITK/Code/Common/include/sitkMemberFunctionFactory.hxx:193: sitk::ERROR: Pixel type: vector of 8-bit unsigned integer is not supported in 2D byN3itk6simple25FFTConvolutionImageFilterE I get the same error when building from source and when installing SimpleITK with pip install --user SimpleITK This is on a mac running yosemite. Would you have an idea of what is wrong? Thanks, Ga?tan -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Thu Apr 2 09:54:30 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 2 Apr 2015 09:54:30 -0400 Subject: [ITK-users] SimpleITK FFTConvolution In-Reply-To: References: Message-ID: <54FBFE7D-D3C3-4481-A546-396293420227@mail.nih.gov> Gaetan, Nice to see you taking SimpleITK for a spin :) You need to inspect the input image types a little. It's reading them an RGB images into a VectorImage type. Implicit types can be a pain. You can utilize the second argument of the ReadImage method to specify the desired pixel type, say "sitk.sitkFloat32". Brad BTW, I have been wanting to pick you brain about way to make the LabelMaps more extendible. I did some classes [1] where the parents was a template argument, so that you could compose different label map objects, and similarly filters. The usage got a little complicated though[2]. [1] https://github.com/blowekamp/itkOBBLabelMap/tree/master/include [2] https://github.com/blowekamp/itkOBBLabelMap/blob/master/test/itkOrientedBoundingBoxImageLabelMapFilterTest1.cxx#L42 On Apr 2, 2015, at 9:47 AM, Gaetan Lehmann wrote: > Hi Brad, > > I'm trying to use SimpleITK's FFTConvolution from python: > > import SimpleITK as sitk > img = sitk.ReadImage("/tmp/cthead1.png") > kernel = sitk.ReadImage("/tmp/kernel2.png") > conv = sitk.FFTConvolution(img, kernel) > > the last line fails with the error: > > Traceback (most recent call last): > File "/tmp/test.py", line 5, in > conv = sitk.FFTConvolution(img, kernel) > File "/Users/glehmann/Library/Python/2.7/lib/python/site-packages/SimpleITK/SimpleITK.py", line 17771, in FFTConvolution > return _SimpleITK.FFTConvolution(*args, **kwargs) > RuntimeError: Exception thrown in SimpleITK FFTConvolution: /scratch/dashboards/SimpleITK-OSX10.7-intel-pkg/SimpleITK/Code/Common/include/sitkMemberFunctionFactory.hxx:193: > sitk::ERROR: Pixel type: vector of 8-bit unsigned integer is not supported in 2D byN3itk6simple25FFTConvolutionImageFilterE > > I get the same error when building from source and when installing SimpleITK with > > pip install --user SimpleITK > > This is on a mac running yosemite. > > Would you have an idea of what is wrong? > > Thanks, > > Ga?tan > From matt.mccormick at kitware.com Thu Apr 2 17:18:22 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 2 Apr 2015 17:18:22 -0400 Subject: [ITK-users] [Paraview] compile itk (VTKGlue ON) with vtk from paraview In-Reply-To: <54CF5465.9050009@mh-hannover.de> References: <54C0CF2E.3060106@mh-hannover.de> <54C2125D.7090801@mh-hannover.de> <54C6029C.4040600@mh-hannover.de> <54C8CFC2.4000305@mh-hannover.de> <54CF5465.9050009@mh-hannover.de> Message-ID: Hi Roman, The VTK version that ParaView uses does change often, but to build against ParaView's VTK, the best result will still be obtained from building VTK independently, then building ParaView and any other dependencies, like ITK, against that version of VTK. To find the version of VTK that ParaView is using, cd ~/src/ParaView git submodule status VTK The process to build will then be something like cd ~/bin/VTK cmake ~/src/VTK make cd ~/bin/ITK cmake -DVTK_DIR=~/bin/VTK -DModule_ITKVtkGlue=ON ~/src/ITK make cd ~/bin/ParaView cmake -DVTK_DIR=~/bin/VTK -DUSE_EXTERNAL_VTK:BOOL=ON ~/src/ParaView HTH, Matt From cgodshall at enthought.com Thu Apr 2 20:10:21 2015 From: cgodshall at enthought.com (Courtenay Godshall (Enthought)) Date: Thu, 2 Apr 2015 19:10:21 -0500 Subject: [ITK-users] FW: SciPy 2015 Conference Updates - LAST CALL for talks - 4/10 extension, registration open, keynotes announced, John Hunter Plotting Contest In-Reply-To: <054801d06da2$37e57ae0$a7b070a0$@enthought.com> References: <054801d06da2$37e57ae0$a7b070a0$@enthought.com> Message-ID: <055801d06da2$94715810$bd540830$@enthought.com> --------------------------------------------------------------------------- **LAST CALL FOR SCIPY 2015 TALK AND POSTER SUBMISSIONS - EXTENSION TO 4/10* --------------------------------------------------------------------------- SciPy 2015 will include 3 major topic tracks and 7 mini-symposia tracks. Submit a proposal on the SciPy 2015 website: http://scipy2015.scipy.org. If you have any questions or comments, feel free to contact us at: scipy-organizers at scipy.org. You can also follow @scipyconf on Twitter or sign up for the mailing list on the website for the latest updates! Major topic tracks include: - Scientific Computing in Python (General track) - Python in Data Science - Quantitative Finance and Computational Social Sciences Mini-symposia will include the applications of Python in: - Astronomy and astrophysics - Computational life and medical sciences - Engineering - Geographic information systems (GIS) - Geophysics - Oceanography and meteorology - Visualization, vision and imaging -------------------------------------------------------------------------- **SCIPY 2015 REGISTRATION IS OPEN** Please register ASAP to help us get a good headcount and open the conference to as many people as we can. PLUS, everyone who registers before May 15 will not only get early bird discounts, but will also be entered in a drawing for a free registration (via refund or extra)! Register on the website at http://scipy2015.scipy.org -------------------------------------------------------------------------- **SCIPY 2015 KEYNOTE SPEAKERS ANNOUNCED** Keynote speakers were just announced and include Wes McKinney, author of Pandas; Chris Wiggins, Chief Data Scientist for The New York Times; and Jake VanderPlas, director of research at the University of Washington's eScience Institute and core contributor to a number of scientific Python libraries including sci-kit learn and AstroML. -------------------------------------------------------------------------- **ENTER THE SCIPY JOHN HUNTER EXCELLENCE IN PLOTTING CONTEST - DUE 4/13** In memory of John Hunter, creator of matplotlib, we are pleased to announce the Third Annual SciPy John Hunter Excellence in Plotting Competition. This open competition aims to highlight the importance of quality plotting to scientific progress and showcase the capabilities of the current generation of plotting software. Participants are invited to submit scientific plots to be judged by a panel. The winning entries will be announced and displayed at the conference. John Hunter's family is graciously sponsoring cash prizes up to $1,000 for the winners. We look forward to exciting submissions that push the boundaries of plotting! See details here: http://scipy2015.scipy.org/ehome/115969/276538/ Entries must be submitted by April 13, 2015 via e-mail to plotting-contest at scipy.org -------------------------------------------------------------------------- **CALENDAR AND IMPORTANT DATES** --Sprint, Birds of a Feather, Financial Aid and Talk submissions OPEN NOW --Apr 10, 2015: Talk and Poster submission deadline --Apr 13, 2015: Plotting contest submissions due --Apr 15, 2015: Financial aid application deadline --Apr 17, 2015: Tutorial schedule announced --May 1, 2015: General conference speakers & schedule announced --May 15, 2015 (or 150 registrants): Early-bird registration ends --Jun 1, 2015: BoF submission deadline --Jul 6-7, 2015: SciPy 2015 Tutorials --Jul 8-10, 2015: SciPy 2015 General Conference --Jul 11-12, 2015: SciPy 2015 Sprints -------------- next part -------------- An HTML attachment was scrubbed... URL: From lluna.nova at gmail.com Fri Apr 3 12:44:19 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Fri, 3 Apr 2015 18:44:19 +0200 Subject: [ITK-users] Region of two labelObjects In-Reply-To: References: Message-ID: Thanks Matt, I've set the Git and Gerrit access. I believe everything's ok. I'll get to it next Tuesday. Cheers, Pol 2015-04-02 15:22 GMT+02:00 Matt McCormick : > Hi Pol, > > Thanks for considering make improvements to this code. Instructions > to submit a patch can be found here [1]. Please let us know if you > have any questions. > > Thanks, > Matt > > [1] > https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html > > On Thu, Apr 2, 2015 at 8:52 AM, Pol Mons? Purt? > wrote: > > Hello Ga?tan, > > > > Yes I agree, Thinking about it later I also reached the same conclusion > that > > a filter that changes the regions internally without warning could be a > > pitfall. > > > > The RegionFromReferenceLabelMapFilter might actually work for me given > that > > I do have the original ROI region and roi image, but I can implement the > > ComputeBoundingBox() function anyway, it's cleaner if I don't use the > > original ROI. > > > > What's the workflow for submitting code? Fork the itk repository, add the > > method and PR or something else? > > > > If you'd rather have a filter that does this, I unfortunatelly won't have > > the time to do it this month (and maybe next)... > > > > Cheers, > > > > Pol > > > > > > > > 2015-04-02 14:32 GMT+02:00 Gaetan Lehmann : > >> > >> Hi Pol, > >> > >> 2015-03-30 23:02 GMT+02:00 Pol Mons? Purt? : > >>> > >>> > >>> Hello all, > >>> > >>> I have two label objects, how can I merge the two BoundingBoxes > together > >>> so I know the necessary size of the image? (other than creating it > myself by > >>> searching max/min of each dimension) > >>> > >>> How come LabelMap doesn't resize automatically when objects are added? > It > >>> could. > >> > >> > >> The LabelMap class was designed to work as much as possible as the Image > >> class, that does not have this kind of behavior, and to avoid as much as > >> possible the costly operations. > >> > >> So while I don't think this should be done automatically, we should have > >> some methods or filters to make this easy to do. > >> > >> There are a few filters to manipulate the regions of a LabelMap, but > none > >> of them does exactly what you need: > >> > >> * PadLabelMapFilter that can enlarge the LabelMap region, but not based > on > >> its content > >> * CropLabelMapFilter that can shrink the LabelMap region, but not based > on > >> its content > >> * RegionFromReferenceLabelMapFilter that makes the LabelMap region match > >> the region of a reference input image > >> * AutoCropLabelMapFilter that reduce the region covered by a label map > >> based on its content, but can't enlarge it > >> > >> In my opinion, we should have a ComputeBoundingBox() method in LabelMap > >> that compute the region covered by all the label objects - the code can > be > >> moved from AutoCropLabelMapFilter. We could then do > >> > >> labelMap->AddLabelObject(labelObject1); > >> labelMap->AddLabelObject(labelObject2); > >> labelMap->SetRegions(labelMap->ComputeBoundingBox()); > >> > >> to update the region. > >> > >> Would you agree to implement such a method for the LabelMap class? > >> > >> Optionally, we could also think to a filter to do that in a pipeline. > >> > >> Regards, > >> > >> Ga?tan > >> > > > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the 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 lchauvin at bwh.harvard.edu Fri Apr 3 16:17:27 2015 From: lchauvin at bwh.harvard.edu (Laurent Chauvin) Date: Fri, 3 Apr 2015 16:17:27 -0400 Subject: [ITK-users] Constrain a transform for optimizer In-Reply-To: References: Message-ID: Thank you Matt for your help. I finally found another way. Thank you. -Laurent On Wed, Apr 1, 2015 at 11:49 AM, Matt McCormick wrote: > Hi Laurent, > > Only some of the optimizers, such as the LBFGSBOptimizerv4 [1] > currently can be constrained. > > HTH, > Matt > > [1] http://www.itk.org/Doxygen/html/classitk_1_1LBFGSBOptimizerv4.html > > > > On Tue, Mar 31, 2015 at 10:21 AM, Laurent Chauvin > wrote: > > Hello ITK users, > > > > I'm trying to use a Levenberg-Marquardt optimizer to find a point in a > plane > > (based on a cost function). > > For now I create a itk::TranslationTransform< double, 3 > and set it to > the > > Levenberg-Marquardt optmizer. > > > > However, I know the point I'm looking for is included in a plane. > > > > I was wondering if there is a way to constrain the transform to only > check > > points in the plane (to avoid looking for points out of the plane to > speed > > up the optimization process) ? > > > > Thank you very much. > > > > -- > > Laurent Chauvin, MS > > Surgical Navigation and Robotics Laboratory, Radiology Department > > Brigham And Women's Hospital, Harvard Medical School > > http://wiki.ncigt.org/index.php/User:Lchauvin > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > > > The information in this e-mail is intended only for the person to whom it > is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > -- Laurent Chauvin, MS Surgical Navigation and Robotics Laboratory, Radiology Department Brigham And Women's Hospital, Harvard Medical School http://wiki.ncigt.org/index.php/User:Lchauvin -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Sat Apr 4 10:52:29 2015 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 4 Apr 2015 11:52:29 -0300 Subject: [ITK-users] SimpleITK | Tolerance 4.7\itkImageToImageFilter.hxx Message-ID: Hi, I've ran into an issue when trying to create a checkerboard, here's the problem: An unhandled exception of type 'System.ApplicationException' occurred in SimpleITKCSharpManaged.dll Additional information: Exception thrown in SimpleITK CheckerBoardImageFilter_Execute: c:\d\vs9-pkg\simpleitk-build\itk-prefix\include\itk-4.7\itkImageToImageFilter.hxx:248: itk::ERROR: CheckerBoardImageFilter(0000000038E46D40): Inputs do not occupy the same physical space! InputImage Origin: [-4.8500000e+002, -4.8429028e+002, 6.5235924e+001], InputImage_1 Origin: [-4.8500000e+002, -4.8429001e+002, 6.5235901e+001] Tolerance: 9.4730000e-007 InputImage Spacing: [9.4730000e-001, 9.4730000e-001, 1.9692001e+000], InputImage_1 Spacing: [9.4730002e-001, 9.4730002e-001, 1.9691986e+000] Tolerance: 9.4730000e-007 Any ways to solve this? I would solve it manually in ITK by changing the tolerance in the ImagetoImageFilter class but not sure how to do it in SimpleITK Thanks, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Sat Apr 4 11:20:45 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sat, 04 Apr 2015 11:20:45 -0400 Subject: [ITK-users] SimpleITK | Tolerance 4.7\itkImageToImageFilter.hxx In-Reply-To: References: Message-ID: <04CA1C10-98F8-4070-AD8E-2321D86EC2C3@mail.nih.gov> Hello, The method you are looking for is itk::simple::ProcessObject::SetGlobalDefaultCoordinateTolerace [1]. http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ProcessObject.html#a61dc7bc36a573d0f4a133bca60ed598c Or you can always just copy the meta data from one input to the other. Brad On Apr 4, 2015, at 10:52 AM, Matias Montroull wrote: > Hi, > > I've ran into an issue when trying to create a checkerboard, here's the problem: > > An unhandled exception of type 'System.ApplicationException' occurred in SimpleITKCSharpManaged.dll > > Additional information: Exception thrown in SimpleITK CheckerBoardImageFilter_Execute: c:\d\vs9-pkg\simpleitk-build\itk-prefix\include\itk-4.7\itkImageToImageFilter.hxx:248: > > itk::ERROR: CheckerBoardImageFilter(0000000038E46D40): Inputs do not occupy the same physical space! > > InputImage Origin: [-4.8500000e+002, -4.8429028e+002, 6.5235924e+001], InputImage_1 Origin: [-4.8500000e+002, -4.8429001e+002, 6.5235901e+001] > > Tolerance: 9.4730000e-007 > > InputImage Spacing: [9.4730000e-001, 9.4730000e-001, 1.9692001e+000], InputImage_1 Spacing: [9.4730002e-001, 9.4730002e-001, 1.9691986e+000] > > Tolerance: 9.4730000e-007 > > Any ways to solve this? I would solve it manually in ITK by changing the tolerance in the ImagetoImageFilter class but not sure how to do it in SimpleITK > > Thanks, > > Matias. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matimontg at gmail.com Sat Apr 4 13:29:01 2015 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 4 Apr 2015 14:29:01 -0300 Subject: [ITK-users] SimpleITK | Tolerance 4.7\itkImageToImageFilter.hxx In-Reply-To: <04CA1C10-98F8-4070-AD8E-2321D86EC2C3@mail.nih.gov> References: <04CA1C10-98F8-4070-AD8E-2321D86EC2C3@mail.nih.gov> Message-ID: Thanks Bradley, it worked like a charm. This is what I did: * ProcessObject.SetGlobalDefaultCoordinateTolerance(0.001);* Matias. On Sat, Apr 4, 2015 at 12:20 PM, Bradley Lowekamp wrote: > Hello, > > The method you are looking for is > itk::simple::ProcessObject::SetGlobalDefaultCoordinateTolerace [1]. > > > http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ProcessObject.html#a61dc7bc36a573d0f4a133bca60ed598c > > Or you can always just copy the meta data from one input to the other. > > Brad > > On Apr 4, 2015, at 10:52 AM, Matias Montroull wrote: > > > Hi, > > > > I've ran into an issue when trying to create a checkerboard, here's the > problem: > > > > An unhandled exception of type 'System.ApplicationException' occurred in > SimpleITKCSharpManaged.dll > > > > Additional information: Exception thrown in SimpleITK > CheckerBoardImageFilter_Execute: > c:\d\vs9-pkg\simpleitk-build\itk-prefix\include\itk-4.7\itkImageToImageFilter.hxx:248: > > > > itk::ERROR: CheckerBoardImageFilter(0000000038E46D40): Inputs do not > occupy the same physical space! > > > > InputImage Origin: [-4.8500000e+002, -4.8429028e+002, 6.5235924e+001], > InputImage_1 Origin: [-4.8500000e+002, -4.8429001e+002, 6.5235901e+001] > > > > Tolerance: 9.4730000e-007 > > > > InputImage Spacing: [9.4730000e-001, 9.4730000e-001, 1.9692001e+000], > InputImage_1 Spacing: [9.4730002e-001, 9.4730002e-001, 1.9691986e+000] > > > > Tolerance: 9.4730000e-007 > > > > Any ways to solve this? I would solve it manually in ITK by changing the > tolerance in the ImagetoImageFilter class but not sure how to do it in > SimpleITK > > > > Thanks, > > > > Matias. > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From seidel at cvrti.utah.edu Sun Apr 5 13:09:41 2015 From: seidel at cvrti.utah.edu (Thomas Seidel) Date: Sun, 5 Apr 2015 11:09:41 -0600 Subject: [ITK-users] LabelGeometryImageFilter: empty output of GetOrientedLabelImage and GetOrientedIntensityImage Message-ID: <71CC49524A194841A0E15CE508C098F0@Rechenknecht> Hi all, I am using the itkLabelGeometryImageFilter to get information about the orientation of labeled objects. I provide a LabelImage and a IntensityImage. I set CalculateOrientedLabelRegionsOn() and CalculateOrientedIntensityRegionsOn(). However, when I use writer->SetInput(filter->GetOrientedLabelImage()); writer->Update(); or writer->SetInput(filter->GetOrientedIntensityImage()); writer->Update(); it just generates empty images (all values 0) with the size of the oriented bounding box. Is this how the filter is supposed to work?? I was expecting the rotated labels and the rotated region of the intensity image defined by the oriented bounding box, respectively. Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sun Apr 5 14:10:50 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 5 Apr 2015 11:10:50 -0700 Subject: [ITK-users] LabelGeometryImageFilter: empty output of GetOrientedLabelImage and GetOrientedIntensityImage In-Reply-To: <71CC49524A194841A0E15CE508C098F0@Rechenknecht> References: <71CC49524A194841A0E15CE508C098F0@Rechenknecht> Message-ID: Do you have a small, compilable example that illustrates the problem? On Sun, Apr 5, 2015 at 10:09 AM, Thomas Seidel wrote: > Hi all, > > I am using the itkLabelGeometryImageFilter to get information about the > orientation of labeled objects. > I provide a LabelImage and a IntensityImage. > I set CalculateOrientedLabelRegionsOn() and > CalculateOrientedIntensityRegionsOn(). > > However, when I use > writer->SetInput(filter->GetOrientedLabelImage()); > writer->Update(); > or > writer->SetInput(filter->GetOrientedIntensityImage()); > writer->Update(); > > it just generates empty images (all values 0) with the size of the oriented > bounding box. > > Is this how the filter is supposed to work?? I was expecting the rotated > labels and the rotated region of the intensity image defined by the oriented > bounding box, respectively. > > Thanks, > Thomas > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Mon Apr 6 02:02:02 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 5 Apr 2015 23:02:02 -0700 Subject: [ITK-users] LabelGeometryImageFilter: empty output of GetOrientedLabelImage and GetOrientedIntensityImage In-Reply-To: References: <71CC49524A194841A0E15CE508C098F0@Rechenknecht> Message-ID: Thomas, I compiled your program and ran it on one of my labeled images and it produces the expected output. On Sun, Apr 5, 2015 at 2:52 PM, Thomas Seidel wrote: > Hi Bill, > > Thanks for your answer. Here is (part of the) source I am using. > Do you need the image or source files? > > > > > #include "itkImage.h" > #include "itkImageFileReader.h" > #include "itkImageFileWriter.h" > #include "itkLabelGeometryImageFilter.h" > > #include "itksys/SystemTools.hxx" > > #include > > > int main(int argc, char * argv[]) > { > // Verify command line arguments > if( argc < 2 ) > { > std::cerr << "Usage: " << std::endl; > std::cerr << argv[0] << " InputImageFile [-intensity > ]" << std::endl; > return EXIT_FAILURE; > } > std::string inputFilename = argv[1]; > std::string intensityFile; > bool calcIntensity = false; > > > int argcounter = 2; > while (argc>argcounter) > { > if (!strncmp(argv[argcounter],"-intensity",10) ) {intensityFile = > argv[argcounter + 1]; calcIntensity = true; } > argcounter++; > } > > // Setup types > typedef itk::Image IntImageType; > typedef itk::Image FloatImageType; > typedef itk::ImageFileReader ReaderType; > typedef itk::ImageFileReader > FloatReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > reader->SetFileName( inputFilename ); > FloatReaderType::Pointer FloatReader = FloatReaderType::New(); > > > > typedef itk::LabelGeometryImageFilter< IntImageType, FloatImageType > > LabelGeometryImageFilterType; > LabelGeometryImageFilterType::Pointer labelGeometryImageFilter = > LabelGeometryImageFilterType::New(); > labelGeometryImageFilter->SetInput( reader->GetOutput() ); > > > if (calcIntensity) > { > FloatReader->SetFileName(intensityFile); > FloatReader->Update(); > labelGeometryImageFilter->SetIntensityInput(FloatReader->GetOutput()); > labelGeometryImageFilter->CalculateOrientedIntensityRegionsOn(); > > } > > > labelGeometryImageFilter->CalculatePixelIndicesOn(); > labelGeometryImageFilter->CalculateOrientedBoundingBoxOn(); > labelGeometryImageFilter->CalculateOrientedLabelRegionsOn(); > > labelGeometryImageFilter->Update(); > > LabelGeometryImageFilterType::LabelsType allLabels = > labelGeometryImageFilter->GetLabels(); > LabelGeometryImageFilterType::LabelsType::iterator allLabelsIt; > std::cout << "Number of labels: " << > labelGeometryImageFilter->GetNumberOfLabels() << std::endl; > std::cout << std::endl; > > > > for( allLabelsIt = allLabels.begin(); allLabelsIt != allLabels.end(); > allLabelsIt++ ) > { > > LabelGeometryImageFilterType::LabelPixelType labelValue = *allLabelsIt; > > > std::ostringstream stream; > stream << labelValue << ".vtk"; > typedef itk::ImageFileWriter WriterType; > WriterType::Pointer writer = WriterType::New(); > writer->SetFileName(stream.str()); > writer->SetInput(labelGeometryImageFilter->GetOrientedLabelImage(labelValu > e)); > writer->Update(); > > std::ostringstream stream2; > stream2 << labelValue << "-intensity.vtk"; > > if (calcIntensity) { > typedef itk::ImageFileWriter FloatWriterType; > FloatWriterType::Pointer Floatwriter = FloatWriterType::New(); > Floatwriter->SetFileName(stream2.str()); > Floatwriter->SetInput(labelGeometryImageFilter->GetOrientedIntensityImage > (labelValue)); > Floatwriter->Update(); > } > } > > > > > > > return EXIT_SUCCESS; > } > > > > > > > On 4/5/15 12:10 PM, "Bill Lorensen" wrote: > >>Do you have a small, compilable example that illustrates the problem? >> >>On Sun, Apr 5, 2015 at 10:09 AM, Thomas Seidel >>wrote: >>> Hi all, >>> >>> I am using the itkLabelGeometryImageFilter to get information about the >>> orientation of labeled objects. >>> I provide a LabelImage and a IntensityImage. >>> I set CalculateOrientedLabelRegionsOn() and >>> CalculateOrientedIntensityRegionsOn(). >>> >>> However, when I use >>> writer->SetInput(filter->GetOrientedLabelImage()); >>> writer->Update(); >>> or >>> writer->SetInput(filter->GetOrientedIntensityImage()); >>> writer->Update(); >>> >>> it just generates empty images (all values 0) with the size of the >>>oriented >>> bounding box. >>> >>> Is this how the filter is supposed to work?? I was expecting the rotated >>> labels and the rotated region of the intensity image defined by the >>>oriented >>> bounding box, respectively. >>> >>> Thanks, >>> Thomas >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >> >> >> >>-- >>Unpaid intern in BillsBasement at noware dot com > > > -- Unpaid intern in BillsBasement at noware dot com From Ivan.Kubarev at materialise.kiev.ua Mon Apr 6 05:50:00 2015 From: Ivan.Kubarev at materialise.kiev.ua (Ivan Kubarev) Date: Mon, 6 Apr 2015 09:50:00 +0000 Subject: [ITK-users] Tests don't run Message-ID: Hi itk-users, I've successfully built itk on my local PC(Win7) but when I try to run some tests I get : d:\projects\ITK\build>ctest -V -R itkBMPImageIOTest5 UpdateCTestConfiguration from :D:/projects/ITK/build/DartConfiguration.tcl Parse Config file:D:/projects/ITK/build/DartConfiguration.tcl Add coverage exclude regular expressions. Add coverage exclude: /CMakeFiles/CMakeTmp/ Add coverage exclude: .*/Examples/.* Add coverage exclude: .*/test/.* Add coverage exclude: .*/Testing/.* Add coverage exclude: .*/ThirdParty/.* Add coverage exclude: .*/Utilities/.* Add coverage exclude: .*/Wrapping/.* Add coverage glob: Source/.*/*.h Add coverage glob: Source/.*/*.txx Add coverage glob: Source/.*/*.cxx UpdateCTestConfiguration from :D:/projects/ITK/build/DartConfiguration.tcl Parse Config file:D:/projects/ITK/build/DartConfiguration.tcl Test project D:/projects/ITK/build Constructing a list of tests Done constructing a list of tests Checking test dependency graph... Checking test dependency graph end test 644 Start 644: itkBMPImageIOTest5 644: Test command: NOT_AVAILABLE Test not available without configuration. (Missing "-C "?) 1/1 Test #644: itkBMPImageIOTest5 ...............***Not Run 0.00 sec 0% tests passed, 1 tests failed out of 1 Total Test time (real) = 0.72 sec The following tests FAILED: 644 - itkBMPImageIOTest5 (Not Run) Errors while running CTest Could you help me? Ivan -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Mon Apr 6 08:23:24 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 6 Apr 2015 08:23:24 -0400 Subject: [ITK-users] Tests don't run In-Reply-To: References: Message-ID: Here is the important part of the error message: On Apr 6, 2015, at 5:50 AM, Ivan Kubarev wrote: > 644: Test command: NOT_AVAILABLE > Test not available without configuration. (Missing "-C "?) > 1/1 Test #644: itkBMPImageIOTest5 ...............***Not Run 0.00 sec > http://www.cmake.org/cmake/help/v3.2/manual/ctest.1.html HTH, Brad -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Apr 6 13:13:33 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 6 Apr 2015 10:13:33 -0700 Subject: [ITK-users] LabelGeometryImageFilter: empty output of GetOrientedLabelImage and GetOrientedIntensityImage In-Reply-To: References: <71CC49524A194841A0E15CE508C098F0@Rechenknecht> Message-ID: Could be a bug. Need to find a smaller test case that fails. Maybe because of non-zero origin. I'll take a look. On Mon, Apr 6, 2015 at 9:55 AM, Thomas Seidel wrote: > I tried it again. I am quite sure there is nothing wrong with my input > files because the filter apparently creates correct output measures for > all labels (e.g. eigenvalues, bounding box, volume, etc). > But the orientedlabelimages are all zero, except for label 0 (which is my > background). The dimension of these images corresponds to the size > (length, width, depth) of the oriented bounding boxes. > > I think the image origins are all messed up. May there something be wrong > with the center of rotation? > > E.g.: label 0, which is background, has the same bounding box size as the > input label image. > Input LabelImage: > dimensions: 512 1024 130 (in pixels) > origin: [102.273, 0, 5.96985] (in physical size) > > oriented image of label 0: > dimensions: 1026 515 131 > origin: [-51.2878, 50.6859, -0.132971] > > > Is this a bug, or did I forget to set a parameter? > > Thanks, > Thomas > > > > > > On 4/6/15 12:02 AM, "Bill Lorensen" wrote: > >>Thomas, >> >>I compiled your program and ran it on one of my labeled images and it >>produces the expected output. >> >>On Sun, Apr 5, 2015 at 2:52 PM, Thomas Seidel >>wrote: >>> Hi Bill, >>> >>> Thanks for your answer. Here is (part of the) source I am using. >>> Do you need the image or source files? >>> >>> >>> >>> >>> #include "itkImage.h" >>> #include "itkImageFileReader.h" >>> #include "itkImageFileWriter.h" >>> #include "itkLabelGeometryImageFilter.h" >>> >>> #include "itksys/SystemTools.hxx" >>> >>> #include >>> >>> >>> int main(int argc, char * argv[]) >>> { >>> // Verify command line arguments >>> if( argc < 2 ) >>> { >>> std::cerr << "Usage: " << std::endl; >>> std::cerr << argv[0] << " InputImageFile [-intensity >>> ]" << std::endl; >>> return EXIT_FAILURE; >>> } >>> std::string inputFilename = argv[1]; >>> std::string intensityFile; >>> bool calcIntensity = false; >>> >>> >>> int argcounter = 2; >>> while (argc>argcounter) >>> { >>> if (!strncmp(argv[argcounter],"-intensity",10) ) {intensityFile >>>= >>> argv[argcounter + 1]; calcIntensity = true; } >>> argcounter++; >>> } >>> >>> // Setup types >>> typedef itk::Image IntImageType; >>> typedef itk::Image FloatImageType; >>> typedef itk::ImageFileReader ReaderType; >>> typedef itk::ImageFileReader >>> FloatReaderType; >>> >>> ReaderType::Pointer reader = ReaderType::New(); >>> reader->SetFileName( inputFilename ); >>> FloatReaderType::Pointer FloatReader = FloatReaderType::New(); >>> >>> >>> >>> typedef itk::LabelGeometryImageFilter< IntImageType, FloatImageType > >>> LabelGeometryImageFilterType; >>> LabelGeometryImageFilterType::Pointer labelGeometryImageFilter = >>> LabelGeometryImageFilterType::New(); >>> labelGeometryImageFilter->SetInput( reader->GetOutput() ); >>> >>> >>> if (calcIntensity) >>> { >>> FloatReader->SetFileName(intensityFile); >>> FloatReader->Update(); >>> >>>labelGeometryImageFilter->SetIntensityInput(FloatReader->GetOutput()); >>> labelGeometryImageFilter->CalculateOrientedIntensityRegionsOn(); >>> >>> } >>> >>> >>> labelGeometryImageFilter->CalculatePixelIndicesOn(); >>> labelGeometryImageFilter->CalculateOrientedBoundingBoxOn(); >>> labelGeometryImageFilter->CalculateOrientedLabelRegionsOn(); >>> >>> labelGeometryImageFilter->Update(); >>> >>> LabelGeometryImageFilterType::LabelsType allLabels = >>> labelGeometryImageFilter->GetLabels(); >>> LabelGeometryImageFilterType::LabelsType::iterator allLabelsIt; >>> std::cout << "Number of labels: " << >>> labelGeometryImageFilter->GetNumberOfLabels() << std::endl; >>> std::cout << std::endl; >>> >>> >>> >>> for( allLabelsIt = allLabels.begin(); allLabelsIt != allLabels.end(); >>> allLabelsIt++ ) >>> { >>> >>> LabelGeometryImageFilterType::LabelPixelType labelValue = >>>*allLabelsIt; >>> >>> >>> std::ostringstream stream; >>> stream << labelValue << ".vtk"; >>> typedef itk::ImageFileWriter WriterType; >>> WriterType::Pointer writer = WriterType::New(); >>> writer->SetFileName(stream.str()); >>> >>>writer->SetInput(labelGeometryImageFilter->GetOrientedLabelImage(labelVal >>>u >>> e)); >>> writer->Update(); >>> >>> std::ostringstream stream2; >>> stream2 << labelValue << "-intensity.vtk"; >>> >>> if (calcIntensity) { >>> typedef itk::ImageFileWriter >>>FloatWriterType; >>> FloatWriterType::Pointer Floatwriter = >>>FloatWriterType::New(); >>> Floatwriter->SetFileName(stream2.str()); >>> >>>Floatwriter->SetInput(labelGeometryImageFilter->GetOrientedIntensityImage >>> (labelValue)); >>> Floatwriter->Update(); >>> } >>> } >>> >>> >>> >>> >>> >>> >>> return EXIT_SUCCESS; >>> } >>> >>> >>> >>> >>> >>> >>> On 4/5/15 12:10 PM, "Bill Lorensen" wrote: >>> >>>>Do you have a small, compilable example that illustrates the problem? >>>> >>>>On Sun, Apr 5, 2015 at 10:09 AM, Thomas Seidel >>>>wrote: >>>>> Hi all, >>>>> >>>>> I am using the itkLabelGeometryImageFilter to get information about >>>>>the >>>>> orientation of labeled objects. >>>>> I provide a LabelImage and a IntensityImage. >>>>> I set CalculateOrientedLabelRegionsOn() and >>>>> CalculateOrientedIntensityRegionsOn(). >>>>> >>>>> However, when I use >>>>> writer->SetInput(filter->GetOrientedLabelImage()); >>>>> writer->Update(); >>>>> or >>>>> writer->SetInput(filter->GetOrientedIntensityImage()); >>>>> writer->Update(); >>>>> >>>>> it just generates empty images (all values 0) with the size of the >>>>>oriented >>>>> bounding box. >>>>> >>>>> Is this how the filter is supposed to work?? I was expecting the >>>>>rotated >>>>> labels and the rotated region of the intensity image defined by the >>>>>oriented >>>>> bounding box, respectively. >>>>> >>>>> Thanks, >>>>> Thomas >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>>> >>>> >>>> >>>>-- >>>>Unpaid intern in BillsBasement at noware dot com >>> >>> >>> >> >> >> >>-- >>Unpaid intern in BillsBasement at noware dot com > > > -- Unpaid intern in BillsBasement at noware dot com From gabrielgimenez85 at gmail.com Mon Apr 6 22:24:08 2015 From: gabrielgimenez85 at gmail.com (=?UTF-8?Q?Gabriel_A=2E_Gim=C3=A9nez?=) Date: Mon, 6 Apr 2015 19:24:08 -0700 (MST) Subject: [ITK-users] Inverse of Versor Rigid Transform and RIRE Message-ID: <1428373448494-7587127.post@n2.nabble.com> Hello everyone again, hope you are well! I am use RIRE project, specifically CT (movig) and MR_PD (fixed) images. Basically, I hava a set of point (in millimeters) of the CT image to which apply the trasform result of the registration and updaload this results in the web for the evaluation. Example of set of points and his "ground truth" : Point x y z new_x new_y new_z 1 0.0000 0.0000 0.0000 -7.5731 -41.2534 -27.3093 2 333.9870 0.0000 0.0000 324.8722 -72.8159 -32.9063 3 0.0000 333.9870 0.0000 24.1607 291.0393 -16.2727 4 333.9870 333.9870 0.0000 356.6060 259.4768 -21.8697 5 0.0000 0.0000 112.0000 -6.0554 -45.1157 84.6137 6 333.9870 0.0000 112.0000 326.3899 -76.6782 79.0168 7 0.0000 333.9870 112.0000 25.6784 287.1769 95.6503 8 333.9870 333.9870 112.0000 358.1237 255.6145 90.0534 So, the first I need is the transformation to apply, for that I do the following : //get the inverse transform TransformType::Pointer inverseTransform = TransformType::New(); inverseTransform->SetCenter( finalTransform->GetCenter() ); bool response = finalTransform->GetInverse(inverseTransform); It makes sense to use the same center in the inverse transform?. A "quaternion" define an "axis" (right part) of rotation and an angle to use for rotate the image about this axis...why use a center of rotation...? Second, apply this transform...as follows: NewPoint = RotationMatrix * OriginalPoint + Offset The rotation matrix and the offset are obtained from the inverse transforme objetc. Found something wrong? something that is not taking into account ? The results do not appear to be correct...the calculated error is too big and does not correspond with the visual result. Thanks in advance ... -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Inverse-of-Versor-Rigid-Transform-and-RIRE-tp7587127.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Tue Apr 7 01:38:00 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 6 Apr 2015 22:38:00 -0700 Subject: [ITK-users] LabelGeometryImageFilter: empty output of GetOrientedLabelImage and GetOrientedIntensityImage In-Reply-To: References: <71CC49524A194841A0E15CE508C098F0@Rechenknecht> Message-ID: I have a 2D example that fails when the origin is not 0.0. Now I'll try to find the bug. On Mon, Apr 6, 2015 at 10:13 AM, Bill Lorensen wrote: > Could be a bug. Need to find a smaller test case that fails. Maybe > because of non-zero origin. I'll take a look. > > > On Mon, Apr 6, 2015 at 9:55 AM, Thomas Seidel wrote: >> I tried it again. I am quite sure there is nothing wrong with my input >> files because the filter apparently creates correct output measures for >> all labels (e.g. eigenvalues, bounding box, volume, etc). >> But the orientedlabelimages are all zero, except for label 0 (which is my >> background). The dimension of these images corresponds to the size >> (length, width, depth) of the oriented bounding boxes. >> >> I think the image origins are all messed up. May there something be wrong >> with the center of rotation? >> >> E.g.: label 0, which is background, has the same bounding box size as the >> input label image. >> Input LabelImage: >> dimensions: 512 1024 130 (in pixels) >> origin: [102.273, 0, 5.96985] (in physical size) >> >> oriented image of label 0: >> dimensions: 1026 515 131 >> origin: [-51.2878, 50.6859, -0.132971] >> >> >> Is this a bug, or did I forget to set a parameter? >> >> Thanks, >> Thomas >> >> >> >> >> >> On 4/6/15 12:02 AM, "Bill Lorensen" wrote: >> >>>Thomas, >>> >>>I compiled your program and ran it on one of my labeled images and it >>>produces the expected output. >>> >>>On Sun, Apr 5, 2015 at 2:52 PM, Thomas Seidel >>>wrote: >>>> Hi Bill, >>>> >>>> Thanks for your answer. Here is (part of the) source I am using. >>>> Do you need the image or source files? >>>> >>>> >>>> >>>> >>>> #include "itkImage.h" >>>> #include "itkImageFileReader.h" >>>> #include "itkImageFileWriter.h" >>>> #include "itkLabelGeometryImageFilter.h" >>>> >>>> #include "itksys/SystemTools.hxx" >>>> >>>> #include >>>> >>>> >>>> int main(int argc, char * argv[]) >>>> { >>>> // Verify command line arguments >>>> if( argc < 2 ) >>>> { >>>> std::cerr << "Usage: " << std::endl; >>>> std::cerr << argv[0] << " InputImageFile [-intensity >>>> ]" << std::endl; >>>> return EXIT_FAILURE; >>>> } >>>> std::string inputFilename = argv[1]; >>>> std::string intensityFile; >>>> bool calcIntensity = false; >>>> >>>> >>>> int argcounter = 2; >>>> while (argc>argcounter) >>>> { >>>> if (!strncmp(argv[argcounter],"-intensity",10) ) {intensityFile >>>>= >>>> argv[argcounter + 1]; calcIntensity = true; } >>>> argcounter++; >>>> } >>>> >>>> // Setup types >>>> typedef itk::Image IntImageType; >>>> typedef itk::Image FloatImageType; >>>> typedef itk::ImageFileReader ReaderType; >>>> typedef itk::ImageFileReader >>>> FloatReaderType; >>>> >>>> ReaderType::Pointer reader = ReaderType::New(); >>>> reader->SetFileName( inputFilename ); >>>> FloatReaderType::Pointer FloatReader = FloatReaderType::New(); >>>> >>>> >>>> >>>> typedef itk::LabelGeometryImageFilter< IntImageType, FloatImageType > >>>> LabelGeometryImageFilterType; >>>> LabelGeometryImageFilterType::Pointer labelGeometryImageFilter = >>>> LabelGeometryImageFilterType::New(); >>>> labelGeometryImageFilter->SetInput( reader->GetOutput() ); >>>> >>>> >>>> if (calcIntensity) >>>> { >>>> FloatReader->SetFileName(intensityFile); >>>> FloatReader->Update(); >>>> >>>>labelGeometryImageFilter->SetIntensityInput(FloatReader->GetOutput()); >>>> labelGeometryImageFilter->CalculateOrientedIntensityRegionsOn(); >>>> >>>> } >>>> >>>> >>>> labelGeometryImageFilter->CalculatePixelIndicesOn(); >>>> labelGeometryImageFilter->CalculateOrientedBoundingBoxOn(); >>>> labelGeometryImageFilter->CalculateOrientedLabelRegionsOn(); >>>> >>>> labelGeometryImageFilter->Update(); >>>> >>>> LabelGeometryImageFilterType::LabelsType allLabels = >>>> labelGeometryImageFilter->GetLabels(); >>>> LabelGeometryImageFilterType::LabelsType::iterator allLabelsIt; >>>> std::cout << "Number of labels: " << >>>> labelGeometryImageFilter->GetNumberOfLabels() << std::endl; >>>> std::cout << std::endl; >>>> >>>> >>>> >>>> for( allLabelsIt = allLabels.begin(); allLabelsIt != allLabels.end(); >>>> allLabelsIt++ ) >>>> { >>>> >>>> LabelGeometryImageFilterType::LabelPixelType labelValue = >>>>*allLabelsIt; >>>> >>>> >>>> std::ostringstream stream; >>>> stream << labelValue << ".vtk"; >>>> typedef itk::ImageFileWriter WriterType; >>>> WriterType::Pointer writer = WriterType::New(); >>>> writer->SetFileName(stream.str()); >>>> >>>>writer->SetInput(labelGeometryImageFilter->GetOrientedLabelImage(labelVal >>>>u >>>> e)); >>>> writer->Update(); >>>> >>>> std::ostringstream stream2; >>>> stream2 << labelValue << "-intensity.vtk"; >>>> >>>> if (calcIntensity) { >>>> typedef itk::ImageFileWriter >>>>FloatWriterType; >>>> FloatWriterType::Pointer Floatwriter = >>>>FloatWriterType::New(); >>>> Floatwriter->SetFileName(stream2.str()); >>>> >>>>Floatwriter->SetInput(labelGeometryImageFilter->GetOrientedIntensityImage >>>> (labelValue)); >>>> Floatwriter->Update(); >>>> } >>>> } >>>> >>>> >>>> >>>> >>>> >>>> >>>> return EXIT_SUCCESS; >>>> } >>>> >>>> >>>> >>>> >>>> >>>> >>>> On 4/5/15 12:10 PM, "Bill Lorensen" wrote: >>>> >>>>>Do you have a small, compilable example that illustrates the problem? >>>>> >>>>>On Sun, Apr 5, 2015 at 10:09 AM, Thomas Seidel >>>>>wrote: >>>>>> Hi all, >>>>>> >>>>>> I am using the itkLabelGeometryImageFilter to get information about >>>>>>the >>>>>> orientation of labeled objects. >>>>>> I provide a LabelImage and a IntensityImage. >>>>>> I set CalculateOrientedLabelRegionsOn() and >>>>>> CalculateOrientedIntensityRegionsOn(). >>>>>> >>>>>> However, when I use >>>>>> writer->SetInput(filter->GetOrientedLabelImage()); >>>>>> writer->Update(); >>>>>> or >>>>>> writer->SetInput(filter->GetOrientedIntensityImage()); >>>>>> writer->Update(); >>>>>> >>>>>> it just generates empty images (all values 0) with the size of the >>>>>>oriented >>>>>> bounding box. >>>>>> >>>>>> Is this how the filter is supposed to work?? I was expecting the >>>>>>rotated >>>>>> labels and the rotated region of the intensity image defined by the >>>>>>oriented >>>>>> bounding box, respectively. >>>>>> >>>>>> Thanks, >>>>>> Thomas >>>>>> >>>>>> _____________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>> http://www.kitware.com/products/protraining.php >>>>>> >>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>>> >>>>> >>>>> >>>>> >>>>>-- >>>>>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 From esuarez at itccanarias.org Tue Apr 7 03:30:19 2015 From: esuarez at itccanarias.org (Eduardo Suarez-Santana) Date: Tue, 7 Apr 2015 08:30:19 +0100 Subject: [ITK-users] python for AnisotropicDiffusionImageFilter Message-ID: <5523878B.4020502@itccanarias.org> I can't use 'itk.AnisotropicDiffusionImageFilter'. It does not get rendered as its filter object, but as a common object. I can't see any of the filter methods. I tried with other filters and they seem to work fine. Tried with Itk-4.7 and git version from yesterday. $ ipython In [1]: import itk; ... In [7]: anifilter = itk.AnisotropicDiffusionImageFilter.IF3IF3.New() In [8]: anifilter Out[8]: > In [9]: otherfilter=itk.CurvatureAnisotropicDiffusionImageFilter.IF3IF3.New() In [10]: otherfilter Out[10]: > From blowekamp at mail.nih.gov Tue Apr 7 08:37:49 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 7 Apr 2015 08:37:49 -0400 Subject: [ITK-users] LabelGeometryImageFilter: empty output of GetOrientedLabelImage and GetOrientedIntensityImage In-Reply-To: References: <71CC49524A194841A0E15CE508C098F0@Rechenknecht> Message-ID: <345ED569-21AA-4421-908F-22B5C46E6D59@mail.nih.gov> Hello, I have a much improved version of the algorithm to compute oriented bounding boxes here: https://github.com/blowekamp/itkOBBLabelMap It is correctly accounts for the image's physical spacing, origin, and direction cosines, significantly faster, and more memory efficient. Here would be a close to turn-key test/example for this task: https://github.com/blowekamp/itkOBBLabelMap/blob/master/test/itkOrientedBoundingBoxImageLabelMapFilterTest2.cxx HTH, Brad On Apr 7, 2015, at 1:38 AM, Bill Lorensen wrote: > I have a 2D example that fails when the origin is not 0.0. Now I'll > try to find the bug. > > > On Mon, Apr 6, 2015 at 10:13 AM, Bill Lorensen wrote: >> Could be a bug. Need to find a smaller test case that fails. Maybe >> because of non-zero origin. I'll take a look. >> >> >> On Mon, Apr 6, 2015 at 9:55 AM, Thomas Seidel wrote: >>> I tried it again. I am quite sure there is nothing wrong with my input >>> files because the filter apparently creates correct output measures for >>> all labels (e.g. eigenvalues, bounding box, volume, etc). >>> But the orientedlabelimages are all zero, except for label 0 (which is my >>> background). The dimension of these images corresponds to the size >>> (length, width, depth) of the oriented bounding boxes. >>> >>> I think the image origins are all messed up. May there something be wrong >>> with the center of rotation? >>> >>> E.g.: label 0, which is background, has the same bounding box size as the >>> input label image. >>> Input LabelImage: >>> dimensions: 512 1024 130 (in pixels) >>> origin: [102.273, 0, 5.96985] (in physical size) >>> >>> oriented image of label 0: >>> dimensions: 1026 515 131 >>> origin: [-51.2878, 50.6859, -0.132971] >>> >>> >>> Is this a bug, or did I forget to set a parameter? >>> >>> Thanks, >>> Thomas >>> >>> >>> >>> >>> >>> On 4/6/15 12:02 AM, "Bill Lorensen" wrote: >>> >>>> Thomas, >>>> >>>> I compiled your program and ran it on one of my labeled images and it >>>> produces the expected output. >>>> >>>> On Sun, Apr 5, 2015 at 2:52 PM, Thomas Seidel >>>> wrote: >>>>> Hi Bill, >>>>> >>>>> Thanks for your answer. Here is (part of the) source I am using. >>>>> Do you need the image or source files? >>>>> >>>>> >>>>> >>>>> >>>>> #include "itkImage.h" >>>>> #include "itkImageFileReader.h" >>>>> #include "itkImageFileWriter.h" >>>>> #include "itkLabelGeometryImageFilter.h" >>>>> >>>>> #include "itksys/SystemTools.hxx" >>>>> >>>>> #include >>>>> >>>>> >>>>> int main(int argc, char * argv[]) >>>>> { >>>>> // Verify command line arguments >>>>> if( argc < 2 ) >>>>> { >>>>> std::cerr << "Usage: " << std::endl; >>>>> std::cerr << argv[0] << " InputImageFile [-intensity >>>>> ]" << std::endl; >>>>> return EXIT_FAILURE; >>>>> } >>>>> std::string inputFilename = argv[1]; >>>>> std::string intensityFile; >>>>> bool calcIntensity = false; >>>>> >>>>> >>>>> int argcounter = 2; >>>>> while (argc>argcounter) >>>>> { >>>>> if (!strncmp(argv[argcounter],"-intensity",10) ) {intensityFile >>>>> = >>>>> argv[argcounter + 1]; calcIntensity = true; } >>>>> argcounter++; >>>>> } >>>>> >>>>> // Setup types >>>>> typedef itk::Image IntImageType; >>>>> typedef itk::Image FloatImageType; >>>>> typedef itk::ImageFileReader ReaderType; >>>>> typedef itk::ImageFileReader >>>>> FloatReaderType; >>>>> >>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>> reader->SetFileName( inputFilename ); >>>>> FloatReaderType::Pointer FloatReader = FloatReaderType::New(); >>>>> >>>>> >>>>> >>>>> typedef itk::LabelGeometryImageFilter< IntImageType, FloatImageType > >>>>> LabelGeometryImageFilterType; >>>>> LabelGeometryImageFilterType::Pointer labelGeometryImageFilter = >>>>> LabelGeometryImageFilterType::New(); >>>>> labelGeometryImageFilter->SetInput( reader->GetOutput() ); >>>>> >>>>> >>>>> if (calcIntensity) >>>>> { >>>>> FloatReader->SetFileName(intensityFile); >>>>> FloatReader->Update(); >>>>> >>>>> labelGeometryImageFilter->SetIntensityInput(FloatReader->GetOutput()); >>>>> labelGeometryImageFilter->CalculateOrientedIntensityRegionsOn(); >>>>> >>>>> } >>>>> >>>>> >>>>> labelGeometryImageFilter->CalculatePixelIndicesOn(); >>>>> labelGeometryImageFilter->CalculateOrientedBoundingBoxOn(); >>>>> labelGeometryImageFilter->CalculateOrientedLabelRegionsOn(); >>>>> >>>>> labelGeometryImageFilter->Update(); >>>>> >>>>> LabelGeometryImageFilterType::LabelsType allLabels = >>>>> labelGeometryImageFilter->GetLabels(); >>>>> LabelGeometryImageFilterType::LabelsType::iterator allLabelsIt; >>>>> std::cout << "Number of labels: " << >>>>> labelGeometryImageFilter->GetNumberOfLabels() << std::endl; >>>>> std::cout << std::endl; >>>>> >>>>> >>>>> >>>>> for( allLabelsIt = allLabels.begin(); allLabelsIt != allLabels.end(); >>>>> allLabelsIt++ ) >>>>> { >>>>> >>>>> LabelGeometryImageFilterType::LabelPixelType labelValue = >>>>> *allLabelsIt; >>>>> >>>>> >>>>> std::ostringstream stream; >>>>> stream << labelValue << ".vtk"; >>>>> typedef itk::ImageFileWriter WriterType; >>>>> WriterType::Pointer writer = WriterType::New(); >>>>> writer->SetFileName(stream.str()); >>>>> >>>>> writer->SetInput(labelGeometryImageFilter->GetOrientedLabelImage(labelVal >>>>> u >>>>> e)); >>>>> writer->Update(); >>>>> >>>>> std::ostringstream stream2; >>>>> stream2 << labelValue << "-intensity.vtk"; >>>>> >>>>> if (calcIntensity) { >>>>> typedef itk::ImageFileWriter >>>>> FloatWriterType; >>>>> FloatWriterType::Pointer Floatwriter = >>>>> FloatWriterType::New(); >>>>> Floatwriter->SetFileName(stream2.str()); >>>>> >>>>> Floatwriter->SetInput(labelGeometryImageFilter->GetOrientedIntensityImage >>>>> (labelValue)); >>>>> Floatwriter->Update(); >>>>> } >>>>> } >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> return EXIT_SUCCESS; >>>>> } >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On 4/5/15 12:10 PM, "Bill Lorensen" wrote: >>>>> >>>>>> Do you have a small, compilable example that illustrates the problem? >>>>>> >>>>>> On Sun, Apr 5, 2015 at 10:09 AM, Thomas Seidel >>>>>> wrote: >>>>>>> Hi all, >>>>>>> >>>>>>> I am using the itkLabelGeometryImageFilter to get information about >>>>>>> the >>>>>>> orientation of labeled objects. >>>>>>> I provide a LabelImage and a IntensityImage. >>>>>>> I set CalculateOrientedLabelRegionsOn() and >>>>>>> CalculateOrientedIntensityRegionsOn(). >>>>>>> >>>>>>> However, when I use >>>>>>> writer->SetInput(filter->GetOrientedLabelImage()); >>>>>>> writer->Update(); >>>>>>> or >>>>>>> writer->SetInput(filter->GetOrientedIntensityImage()); >>>>>>> writer->Update(); >>>>>>> >>>>>>> it just generates empty images (all values 0) with the size of the >>>>>>> oriented >>>>>>> bounding box. >>>>>>> >>>>>>> Is this how the filter is supposed to work?? I was expecting the >>>>>>> rotated >>>>>>> labels and the rotated region of the intensity image defined by the >>>>>>> oriented >>>>>>> bounding box, respectively. >>>>>>> >>>>>>> Thanks, >>>>>>> Thomas >>>>>>> >>>>>>> _____________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>>> http://www.kitware.com/products/protraining.php >>>>>>> >>>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> 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 bill.lorensen at gmail.com Tue Apr 7 14:51:14 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 7 Apr 2015 11:51:14 -0700 Subject: [ITK-users] LabelGeometryImageFilter: empty output of GetOrientedLabelImage and GetOrientedIntensityImage In-Reply-To: <345ED569-21AA-4421-908F-22B5C46E6D59@mail.nih.gov> References: <71CC49524A194841A0E15CE508C098F0@Rechenknecht> <345ED569-21AA-4421-908F-22B5C46E6D59@mail.nih.gov> Message-ID: Brad, I don't see a remote.cmake file for your external module. Bill On Tue, Apr 7, 2015 at 5:37 AM, Bradley Lowekamp wrote: > Hello, > > I have a much improved version of the algorithm to compute oriented bounding boxes here: > > https://github.com/blowekamp/itkOBBLabelMap > > It is correctly accounts for the image's physical spacing, origin, and direction cosines, significantly faster, and more memory efficient. Here would be a close to turn-key test/example for this task: > > https://github.com/blowekamp/itkOBBLabelMap/blob/master/test/itkOrientedBoundingBoxImageLabelMapFilterTest2.cxx > > HTH, > Brad > > On Apr 7, 2015, at 1:38 AM, Bill Lorensen wrote: > >> I have a 2D example that fails when the origin is not 0.0. Now I'll >> try to find the bug. >> >> >> On Mon, Apr 6, 2015 at 10:13 AM, Bill Lorensen wrote: >>> Could be a bug. Need to find a smaller test case that fails. Maybe >>> because of non-zero origin. I'll take a look. >>> >>> >>> On Mon, Apr 6, 2015 at 9:55 AM, Thomas Seidel wrote: >>>> I tried it again. I am quite sure there is nothing wrong with my input >>>> files because the filter apparently creates correct output measures for >>>> all labels (e.g. eigenvalues, bounding box, volume, etc). >>>> But the orientedlabelimages are all zero, except for label 0 (which is my >>>> background). The dimension of these images corresponds to the size >>>> (length, width, depth) of the oriented bounding boxes. >>>> >>>> I think the image origins are all messed up. May there something be wrong >>>> with the center of rotation? >>>> >>>> E.g.: label 0, which is background, has the same bounding box size as the >>>> input label image. >>>> Input LabelImage: >>>> dimensions: 512 1024 130 (in pixels) >>>> origin: [102.273, 0, 5.96985] (in physical size) >>>> >>>> oriented image of label 0: >>>> dimensions: 1026 515 131 >>>> origin: [-51.2878, 50.6859, -0.132971] >>>> >>>> >>>> Is this a bug, or did I forget to set a parameter? >>>> >>>> Thanks, >>>> Thomas >>>> >>>> >>>> >>>> >>>> >>>> On 4/6/15 12:02 AM, "Bill Lorensen" wrote: >>>> >>>>> Thomas, >>>>> >>>>> I compiled your program and ran it on one of my labeled images and it >>>>> produces the expected output. >>>>> >>>>> On Sun, Apr 5, 2015 at 2:52 PM, Thomas Seidel >>>>> wrote: >>>>>> Hi Bill, >>>>>> >>>>>> Thanks for your answer. Here is (part of the) source I am using. >>>>>> Do you need the image or source files? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> #include "itkImage.h" >>>>>> #include "itkImageFileReader.h" >>>>>> #include "itkImageFileWriter.h" >>>>>> #include "itkLabelGeometryImageFilter.h" >>>>>> >>>>>> #include "itksys/SystemTools.hxx" >>>>>> >>>>>> #include >>>>>> >>>>>> >>>>>> int main(int argc, char * argv[]) >>>>>> { >>>>>> // Verify command line arguments >>>>>> if( argc < 2 ) >>>>>> { >>>>>> std::cerr << "Usage: " << std::endl; >>>>>> std::cerr << argv[0] << " InputImageFile [-intensity >>>>>> ]" << std::endl; >>>>>> return EXIT_FAILURE; >>>>>> } >>>>>> std::string inputFilename = argv[1]; >>>>>> std::string intensityFile; >>>>>> bool calcIntensity = false; >>>>>> >>>>>> >>>>>> int argcounter = 2; >>>>>> while (argc>argcounter) >>>>>> { >>>>>> if (!strncmp(argv[argcounter],"-intensity",10) ) {intensityFile >>>>>> = >>>>>> argv[argcounter + 1]; calcIntensity = true; } >>>>>> argcounter++; >>>>>> } >>>>>> >>>>>> // Setup types >>>>>> typedef itk::Image IntImageType; >>>>>> typedef itk::Image FloatImageType; >>>>>> typedef itk::ImageFileReader ReaderType; >>>>>> typedef itk::ImageFileReader >>>>>> FloatReaderType; >>>>>> >>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>> reader->SetFileName( inputFilename ); >>>>>> FloatReaderType::Pointer FloatReader = FloatReaderType::New(); >>>>>> >>>>>> >>>>>> >>>>>> typedef itk::LabelGeometryImageFilter< IntImageType, FloatImageType > >>>>>> LabelGeometryImageFilterType; >>>>>> LabelGeometryImageFilterType::Pointer labelGeometryImageFilter = >>>>>> LabelGeometryImageFilterType::New(); >>>>>> labelGeometryImageFilter->SetInput( reader->GetOutput() ); >>>>>> >>>>>> >>>>>> if (calcIntensity) >>>>>> { >>>>>> FloatReader->SetFileName(intensityFile); >>>>>> FloatReader->Update(); >>>>>> >>>>>> labelGeometryImageFilter->SetIntensityInput(FloatReader->GetOutput()); >>>>>> labelGeometryImageFilter->CalculateOrientedIntensityRegionsOn(); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> labelGeometryImageFilter->CalculatePixelIndicesOn(); >>>>>> labelGeometryImageFilter->CalculateOrientedBoundingBoxOn(); >>>>>> labelGeometryImageFilter->CalculateOrientedLabelRegionsOn(); >>>>>> >>>>>> labelGeometryImageFilter->Update(); >>>>>> >>>>>> LabelGeometryImageFilterType::LabelsType allLabels = >>>>>> labelGeometryImageFilter->GetLabels(); >>>>>> LabelGeometryImageFilterType::LabelsType::iterator allLabelsIt; >>>>>> std::cout << "Number of labels: " << >>>>>> labelGeometryImageFilter->GetNumberOfLabels() << std::endl; >>>>>> std::cout << std::endl; >>>>>> >>>>>> >>>>>> >>>>>> for( allLabelsIt = allLabels.begin(); allLabelsIt != allLabels.end(); >>>>>> allLabelsIt++ ) >>>>>> { >>>>>> >>>>>> LabelGeometryImageFilterType::LabelPixelType labelValue = >>>>>> *allLabelsIt; >>>>>> >>>>>> >>>>>> std::ostringstream stream; >>>>>> stream << labelValue << ".vtk"; >>>>>> typedef itk::ImageFileWriter WriterType; >>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>> writer->SetFileName(stream.str()); >>>>>> >>>>>> writer->SetInput(labelGeometryImageFilter->GetOrientedLabelImage(labelVal >>>>>> u >>>>>> e)); >>>>>> writer->Update(); >>>>>> >>>>>> std::ostringstream stream2; >>>>>> stream2 << labelValue << "-intensity.vtk"; >>>>>> >>>>>> if (calcIntensity) { >>>>>> typedef itk::ImageFileWriter >>>>>> FloatWriterType; >>>>>> FloatWriterType::Pointer Floatwriter = >>>>>> FloatWriterType::New(); >>>>>> Floatwriter->SetFileName(stream2.str()); >>>>>> >>>>>> Floatwriter->SetInput(labelGeometryImageFilter->GetOrientedIntensityImage >>>>>> (labelValue)); >>>>>> Floatwriter->Update(); >>>>>> } >>>>>> } >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> return EXIT_SUCCESS; >>>>>> } >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On 4/5/15 12:10 PM, "Bill Lorensen" wrote: >>>>>> >>>>>>> Do you have a small, compilable example that illustrates the problem? >>>>>>> >>>>>>> On Sun, Apr 5, 2015 at 10:09 AM, Thomas Seidel >>>>>>> wrote: >>>>>>>> Hi all, >>>>>>>> >>>>>>>> I am using the itkLabelGeometryImageFilter to get information about >>>>>>>> the >>>>>>>> orientation of labeled objects. >>>>>>>> I provide a LabelImage and a IntensityImage. >>>>>>>> I set CalculateOrientedLabelRegionsOn() and >>>>>>>> CalculateOrientedIntensityRegionsOn(). >>>>>>>> >>>>>>>> However, when I use >>>>>>>> writer->SetInput(filter->GetOrientedLabelImage()); >>>>>>>> writer->Update(); >>>>>>>> or >>>>>>>> writer->SetInput(filter->GetOrientedIntensityImage()); >>>>>>>> writer->Update(); >>>>>>>> >>>>>>>> it just generates empty images (all values 0) with the size of the >>>>>>>> oriented >>>>>>>> bounding box. >>>>>>>> >>>>>>>> Is this how the filter is supposed to work?? I was expecting the >>>>>>>> rotated >>>>>>>> labels and the rotated region of the intensity image defined by the >>>>>>>> oriented >>>>>>>> bounding box, respectively. >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Thomas >>>>>>>> >>>>>>>> _____________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>>>> http://www.kitware.com/products/protraining.php >>>>>>>> >>>>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> 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 From blowekamp at mail.nih.gov Tue Apr 7 14:56:29 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 7 Apr 2015 14:56:29 -0400 Subject: [ITK-users] LabelGeometryImageFilter: empty output of GetOrientedLabelImage and GetOrientedIntensityImage In-Reply-To: References: <71CC49524A194841A0E15CE508C098F0@Rechenknecht> <345ED569-21AA-4421-908F-22B5C46E6D59@mail.nih.gov> Message-ID: <95BF09CE-8BE0-496D-B203-38F2B67F25D5@mail.nih.gov> Bill, I just have my external modules in the "ITK/Modules/External" directory. I manually manage the git process. Just do: cd ITK/Modules/External git clone https://github.com/blowekamp/itkOBBLabelMap.git When you run ccmake the "ITKOBBLabelMap" module should show up where you can enable it. HTH, Brad On Apr 7, 2015, at 2:51 PM, Bill Lorensen wrote: > Brad, > > I don't see a remote.cmake file for your external module. > > Bill > > On Tue, Apr 7, 2015 at 5:37 AM, Bradley Lowekamp wrote: >> Hello, >> >> I have a much improved version of the algorithm to compute oriented bounding boxes here: >> >> https://github.com/blowekamp/itkOBBLabelMap >> >> It is correctly accounts for the image's physical spacing, origin, and direction cosines, significantly faster, and more memory efficient. Here would be a close to turn-key test/example for this task: >> >> https://github.com/blowekamp/itkOBBLabelMap/blob/master/test/itkOrientedBoundingBoxImageLabelMapFilterTest2.cxx >> >> HTH, >> Brad >> >> On Apr 7, 2015, at 1:38 AM, Bill Lorensen wrote: >> >>> I have a 2D example that fails when the origin is not 0.0. Now I'll >>> try to find the bug. >>> >>> >>> On Mon, Apr 6, 2015 at 10:13 AM, Bill Lorensen wrote: >>>> Could be a bug. Need to find a smaller test case that fails. Maybe >>>> because of non-zero origin. I'll take a look. >>>> >>>> >>>> On Mon, Apr 6, 2015 at 9:55 AM, Thomas Seidel wrote: >>>>> I tried it again. I am quite sure there is nothing wrong with my input >>>>> files because the filter apparently creates correct output measures for >>>>> all labels (e.g. eigenvalues, bounding box, volume, etc). >>>>> But the orientedlabelimages are all zero, except for label 0 (which is my >>>>> background). The dimension of these images corresponds to the size >>>>> (length, width, depth) of the oriented bounding boxes. >>>>> >>>>> I think the image origins are all messed up. May there something be wrong >>>>> with the center of rotation? >>>>> >>>>> E.g.: label 0, which is background, has the same bounding box size as the >>>>> input label image. >>>>> Input LabelImage: >>>>> dimensions: 512 1024 130 (in pixels) >>>>> origin: [102.273, 0, 5.96985] (in physical size) >>>>> >>>>> oriented image of label 0: >>>>> dimensions: 1026 515 131 >>>>> origin: [-51.2878, 50.6859, -0.132971] >>>>> >>>>> >>>>> Is this a bug, or did I forget to set a parameter? >>>>> >>>>> Thanks, >>>>> Thomas >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On 4/6/15 12:02 AM, "Bill Lorensen" wrote: >>>>> >>>>>> Thomas, >>>>>> >>>>>> I compiled your program and ran it on one of my labeled images and it >>>>>> produces the expected output. >>>>>> >>>>>> On Sun, Apr 5, 2015 at 2:52 PM, Thomas Seidel >>>>>> wrote: >>>>>>> Hi Bill, >>>>>>> >>>>>>> Thanks for your answer. Here is (part of the) source I am using. >>>>>>> Do you need the image or source files? >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> #include "itkImage.h" >>>>>>> #include "itkImageFileReader.h" >>>>>>> #include "itkImageFileWriter.h" >>>>>>> #include "itkLabelGeometryImageFilter.h" >>>>>>> >>>>>>> #include "itksys/SystemTools.hxx" >>>>>>> >>>>>>> #include >>>>>>> >>>>>>> >>>>>>> int main(int argc, char * argv[]) >>>>>>> { >>>>>>> // Verify command line arguments >>>>>>> if( argc < 2 ) >>>>>>> { >>>>>>> std::cerr << "Usage: " << std::endl; >>>>>>> std::cerr << argv[0] << " InputImageFile [-intensity >>>>>>> ]" << std::endl; >>>>>>> return EXIT_FAILURE; >>>>>>> } >>>>>>> std::string inputFilename = argv[1]; >>>>>>> std::string intensityFile; >>>>>>> bool calcIntensity = false; >>>>>>> >>>>>>> >>>>>>> int argcounter = 2; >>>>>>> while (argc>argcounter) >>>>>>> { >>>>>>> if (!strncmp(argv[argcounter],"-intensity",10) ) {intensityFile >>>>>>> = >>>>>>> argv[argcounter + 1]; calcIntensity = true; } >>>>>>> argcounter++; >>>>>>> } >>>>>>> >>>>>>> // Setup types >>>>>>> typedef itk::Image IntImageType; >>>>>>> typedef itk::Image FloatImageType; >>>>>>> typedef itk::ImageFileReader ReaderType; >>>>>>> typedef itk::ImageFileReader >>>>>>> FloatReaderType; >>>>>>> >>>>>>> ReaderType::Pointer reader = ReaderType::New(); >>>>>>> reader->SetFileName( inputFilename ); >>>>>>> FloatReaderType::Pointer FloatReader = FloatReaderType::New(); >>>>>>> >>>>>>> >>>>>>> >>>>>>> typedef itk::LabelGeometryImageFilter< IntImageType, FloatImageType > >>>>>>> LabelGeometryImageFilterType; >>>>>>> LabelGeometryImageFilterType::Pointer labelGeometryImageFilter = >>>>>>> LabelGeometryImageFilterType::New(); >>>>>>> labelGeometryImageFilter->SetInput( reader->GetOutput() ); >>>>>>> >>>>>>> >>>>>>> if (calcIntensity) >>>>>>> { >>>>>>> FloatReader->SetFileName(intensityFile); >>>>>>> FloatReader->Update(); >>>>>>> >>>>>>> labelGeometryImageFilter->SetIntensityInput(FloatReader->GetOutput()); >>>>>>> labelGeometryImageFilter->CalculateOrientedIntensityRegionsOn(); >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> labelGeometryImageFilter->CalculatePixelIndicesOn(); >>>>>>> labelGeometryImageFilter->CalculateOrientedBoundingBoxOn(); >>>>>>> labelGeometryImageFilter->CalculateOrientedLabelRegionsOn(); >>>>>>> >>>>>>> labelGeometryImageFilter->Update(); >>>>>>> >>>>>>> LabelGeometryImageFilterType::LabelsType allLabels = >>>>>>> labelGeometryImageFilter->GetLabels(); >>>>>>> LabelGeometryImageFilterType::LabelsType::iterator allLabelsIt; >>>>>>> std::cout << "Number of labels: " << >>>>>>> labelGeometryImageFilter->GetNumberOfLabels() << std::endl; >>>>>>> std::cout << std::endl; >>>>>>> >>>>>>> >>>>>>> >>>>>>> for( allLabelsIt = allLabels.begin(); allLabelsIt != allLabels.end(); >>>>>>> allLabelsIt++ ) >>>>>>> { >>>>>>> >>>>>>> LabelGeometryImageFilterType::LabelPixelType labelValue = >>>>>>> *allLabelsIt; >>>>>>> >>>>>>> >>>>>>> std::ostringstream stream; >>>>>>> stream << labelValue << ".vtk"; >>>>>>> typedef itk::ImageFileWriter WriterType; >>>>>>> WriterType::Pointer writer = WriterType::New(); >>>>>>> writer->SetFileName(stream.str()); >>>>>>> >>>>>>> writer->SetInput(labelGeometryImageFilter->GetOrientedLabelImage(labelVal >>>>>>> u >>>>>>> e)); >>>>>>> writer->Update(); >>>>>>> >>>>>>> std::ostringstream stream2; >>>>>>> stream2 << labelValue << "-intensity.vtk"; >>>>>>> >>>>>>> if (calcIntensity) { >>>>>>> typedef itk::ImageFileWriter >>>>>>> FloatWriterType; >>>>>>> FloatWriterType::Pointer Floatwriter = >>>>>>> FloatWriterType::New(); >>>>>>> Floatwriter->SetFileName(stream2.str()); >>>>>>> >>>>>>> Floatwriter->SetInput(labelGeometryImageFilter->GetOrientedIntensityImage >>>>>>> (labelValue)); >>>>>>> Floatwriter->Update(); >>>>>>> } >>>>>>> } >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> return EXIT_SUCCESS; >>>>>>> } >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 4/5/15 12:10 PM, "Bill Lorensen" wrote: >>>>>>> >>>>>>>> Do you have a small, compilable example that illustrates the problem? >>>>>>>> >>>>>>>> On Sun, Apr 5, 2015 at 10:09 AM, Thomas Seidel >>>>>>>> wrote: >>>>>>>>> Hi all, >>>>>>>>> >>>>>>>>> I am using the itkLabelGeometryImageFilter to get information about >>>>>>>>> the >>>>>>>>> orientation of labeled objects. >>>>>>>>> I provide a LabelImage and a IntensityImage. >>>>>>>>> I set CalculateOrientedLabelRegionsOn() and >>>>>>>>> CalculateOrientedIntensityRegionsOn(). >>>>>>>>> >>>>>>>>> However, when I use >>>>>>>>> writer->SetInput(filter->GetOrientedLabelImage()); >>>>>>>>> writer->Update(); >>>>>>>>> or >>>>>>>>> writer->SetInput(filter->GetOrientedIntensityImage()); >>>>>>>>> writer->Update(); >>>>>>>>> >>>>>>>>> it just generates empty images (all values 0) with the size of the >>>>>>>>> oriented >>>>>>>>> bounding box. >>>>>>>>> >>>>>>>>> Is this how the filter is supposed to work?? I was expecting the >>>>>>>>> rotated >>>>>>>>> labels and the rotated region of the intensity image defined by the >>>>>>>>> oriented >>>>>>>>> bounding box, respectively. >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Thomas >>>>>>>>> >>>>>>>>> _____________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>>>>> http://www.kitware.com/products/protraining.php >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> 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: From bill.lorensen at gmail.com Tue Apr 7 15:01:23 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 7 Apr 2015 12:01:23 -0700 Subject: [ITK-users] LabelGeometryImageFilter: empty output of GetOrientedLabelImage and GetOrientedIntensityImage In-Reply-To: <95BF09CE-8BE0-496D-B203-38F2B67F25D5@mail.nih.gov> References: <71CC49524A194841A0E15CE508C098F0@Rechenknecht> <345ED569-21AA-4421-908F-22B5C46E6D59@mail.nih.gov> <95BF09CE-8BE0-496D-B203-38F2B67F25D5@mail.nih.gov> Message-ID: Great! I'll give it a look see. Bill On Tue, Apr 7, 2015 at 11:56 AM, Bradley Lowekamp wrote: > Bill, > > I just have my external modules in the "ITK/Modules/External" directory. I > manually manage the git process. Just do: > > cd ITK/Modules/External > git clone https://github.com/blowekamp/itkOBBLabelMap.git > > When you run ccmake the "ITKOBBLabelMap" module should show up where you can > enable it. > > HTH, > Brad > > On Apr 7, 2015, at 2:51 PM, Bill Lorensen wrote: > > Brad, > > I don't see a remote.cmake file for your external module. > > Bill > > On Tue, Apr 7, 2015 at 5:37 AM, Bradley Lowekamp > wrote: > > Hello, > > I have a much improved version of the algorithm to compute oriented bounding > boxes here: > > https://github.com/blowekamp/itkOBBLabelMap > > It is correctly accounts for the image's physical spacing, origin, and > direction cosines, significantly faster, and more memory efficient. Here > would be a close to turn-key test/example for this task: > > https://github.com/blowekamp/itkOBBLabelMap/blob/master/test/itkOrientedBoundingBoxImageLabelMapFilterTest2.cxx > > HTH, > Brad > > On Apr 7, 2015, at 1:38 AM, Bill Lorensen wrote: > > I have a 2D example that fails when the origin is not 0.0. Now I'll > try to find the bug. > > > On Mon, Apr 6, 2015 at 10:13 AM, Bill Lorensen > wrote: > > Could be a bug. Need to find a smaller test case that fails. Maybe > because of non-zero origin. I'll take a look. > > > On Mon, Apr 6, 2015 at 9:55 AM, Thomas Seidel wrote: > > I tried it again. I am quite sure there is nothing wrong with my input > files because the filter apparently creates correct output measures for > all labels (e.g. eigenvalues, bounding box, volume, etc). > But the orientedlabelimages are all zero, except for label 0 (which is my > background). The dimension of these images corresponds to the size > (length, width, depth) of the oriented bounding boxes. > > I think the image origins are all messed up. May there something be wrong > with the center of rotation? > > E.g.: label 0, which is background, has the same bounding box size as the > input label image. > Input LabelImage: > dimensions: 512 1024 130 (in pixels) > origin: [102.273, 0, 5.96985] (in physical size) > > oriented image of label 0: > dimensions: 1026 515 131 > origin: [-51.2878, 50.6859, -0.132971] > > > Is this a bug, or did I forget to set a parameter? > > Thanks, > Thomas > > > > > > On 4/6/15 12:02 AM, "Bill Lorensen" wrote: > > Thomas, > > I compiled your program and ran it on one of my labeled images and it > produces the expected output. > > On Sun, Apr 5, 2015 at 2:52 PM, Thomas Seidel > wrote: > > Hi Bill, > > Thanks for your answer. Here is (part of the) source I am using. > Do you need the image or source files? > > > > > #include "itkImage.h" > #include "itkImageFileReader.h" > #include "itkImageFileWriter.h" > #include "itkLabelGeometryImageFilter.h" > > #include "itksys/SystemTools.hxx" > > #include > > > int main(int argc, char * argv[]) > { > // Verify command line arguments > if( argc < 2 ) > { > std::cerr << "Usage: " << std::endl; > std::cerr << argv[0] << " InputImageFile [-intensity > ]" << std::endl; > return EXIT_FAILURE; > } > std::string inputFilename = argv[1]; > std::string intensityFile; > bool calcIntensity = false; > > > int argcounter = 2; > while (argc>argcounter) > { > if (!strncmp(argv[argcounter],"-intensity",10) ) {intensityFile > = > argv[argcounter + 1]; calcIntensity = true; } > argcounter++; > } > > // Setup types > typedef itk::Image IntImageType; > typedef itk::Image FloatImageType; > typedef itk::ImageFileReader ReaderType; > typedef itk::ImageFileReader > FloatReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > reader->SetFileName( inputFilename ); > FloatReaderType::Pointer FloatReader = FloatReaderType::New(); > > > > typedef itk::LabelGeometryImageFilter< IntImageType, FloatImageType > > LabelGeometryImageFilterType; > LabelGeometryImageFilterType::Pointer labelGeometryImageFilter = > LabelGeometryImageFilterType::New(); > labelGeometryImageFilter->SetInput( reader->GetOutput() ); > > > if (calcIntensity) > { > FloatReader->SetFileName(intensityFile); > FloatReader->Update(); > > labelGeometryImageFilter->SetIntensityInput(FloatReader->GetOutput()); > labelGeometryImageFilter->CalculateOrientedIntensityRegionsOn(); > > } > > > labelGeometryImageFilter->CalculatePixelIndicesOn(); > labelGeometryImageFilter->CalculateOrientedBoundingBoxOn(); > labelGeometryImageFilter->CalculateOrientedLabelRegionsOn(); > > labelGeometryImageFilter->Update(); > > LabelGeometryImageFilterType::LabelsType allLabels = > labelGeometryImageFilter->GetLabels(); > LabelGeometryImageFilterType::LabelsType::iterator allLabelsIt; > std::cout << "Number of labels: " << > labelGeometryImageFilter->GetNumberOfLabels() << std::endl; > std::cout << std::endl; > > > > for( allLabelsIt = allLabels.begin(); allLabelsIt != allLabels.end(); > allLabelsIt++ ) > { > > LabelGeometryImageFilterType::LabelPixelType labelValue = > *allLabelsIt; > > > std::ostringstream stream; > stream << labelValue << ".vtk"; > typedef itk::ImageFileWriter WriterType; > WriterType::Pointer writer = WriterType::New(); > writer->SetFileName(stream.str()); > > writer->SetInput(labelGeometryImageFilter->GetOrientedLabelImage(labelVal > u > e)); > writer->Update(); > > std::ostringstream stream2; > stream2 << labelValue << "-intensity.vtk"; > > if (calcIntensity) { > typedef itk::ImageFileWriter > FloatWriterType; > FloatWriterType::Pointer Floatwriter = > FloatWriterType::New(); > Floatwriter->SetFileName(stream2.str()); > > Floatwriter->SetInput(labelGeometryImageFilter->GetOrientedIntensityImage > (labelValue)); > Floatwriter->Update(); > } > } > > > > > > > return EXIT_SUCCESS; > } > > > > > > > On 4/5/15 12:10 PM, "Bill Lorensen" wrote: > > Do you have a small, compilable example that illustrates the problem? > > On Sun, Apr 5, 2015 at 10:09 AM, Thomas Seidel > wrote: > > Hi all, > > I am using the itkLabelGeometryImageFilter to get information about > the > orientation of labeled objects. > I provide a LabelImage and a IntensityImage. > I set CalculateOrientedLabelRegionsOn() and > CalculateOrientedIntensityRegionsOn(). > > However, when I use > writer->SetInput(filter->GetOrientedLabelImage()); > writer->Update(); > or > writer->SetInput(filter->GetOrientedIntensityImage()); > writer->Update(); > > it just generates empty images (all values 0) with the size of the > oriented > bounding box. > > Is this how the filter is supposed to work?? I was expecting the > rotated > labels and the rotated region of the intensity image defined by the > oriented > bounding box, respectively. > > Thanks, > Thomas > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > > > -- > 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 > > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Tue Apr 7 15:02:20 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 7 Apr 2015 12:02:20 -0700 Subject: [ITK-users] LabelGeometryImageFilter: empty output of GetOrientedLabelImage and GetOrientedIntensityImage In-Reply-To: References: <71CC49524A194841A0E15CE508C098F0@Rechenknecht> <345ED569-21AA-4421-908F-22B5C46E6D59@mail.nih.gov> <95BF09CE-8BE0-496D-B203-38F2B67F25D5@mail.nih.gov> Message-ID: Brad, You should mention this on the repo comments. Bill On Tue, Apr 7, 2015 at 12:01 PM, Bill Lorensen wrote: > Great! I'll give it a look see. > > Bill > > > On Tue, Apr 7, 2015 at 11:56 AM, Bradley Lowekamp > wrote: >> Bill, >> >> I just have my external modules in the "ITK/Modules/External" directory. I >> manually manage the git process. Just do: >> >> cd ITK/Modules/External >> git clone https://github.com/blowekamp/itkOBBLabelMap.git >> >> When you run ccmake the "ITKOBBLabelMap" module should show up where you can >> enable it. >> >> HTH, >> Brad >> >> On Apr 7, 2015, at 2:51 PM, Bill Lorensen wrote: >> >> Brad, >> >> I don't see a remote.cmake file for your external module. >> >> Bill >> >> On Tue, Apr 7, 2015 at 5:37 AM, Bradley Lowekamp >> wrote: >> >> Hello, >> >> I have a much improved version of the algorithm to compute oriented bounding >> boxes here: >> >> https://github.com/blowekamp/itkOBBLabelMap >> >> It is correctly accounts for the image's physical spacing, origin, and >> direction cosines, significantly faster, and more memory efficient. Here >> would be a close to turn-key test/example for this task: >> >> https://github.com/blowekamp/itkOBBLabelMap/blob/master/test/itkOrientedBoundingBoxImageLabelMapFilterTest2.cxx >> >> HTH, >> Brad >> >> On Apr 7, 2015, at 1:38 AM, Bill Lorensen wrote: >> >> I have a 2D example that fails when the origin is not 0.0. Now I'll >> try to find the bug. >> >> >> On Mon, Apr 6, 2015 at 10:13 AM, Bill Lorensen >> wrote: >> >> Could be a bug. Need to find a smaller test case that fails. Maybe >> because of non-zero origin. I'll take a look. >> >> >> On Mon, Apr 6, 2015 at 9:55 AM, Thomas Seidel wrote: >> >> I tried it again. I am quite sure there is nothing wrong with my input >> files because the filter apparently creates correct output measures for >> all labels (e.g. eigenvalues, bounding box, volume, etc). >> But the orientedlabelimages are all zero, except for label 0 (which is my >> background). The dimension of these images corresponds to the size >> (length, width, depth) of the oriented bounding boxes. >> >> I think the image origins are all messed up. May there something be wrong >> with the center of rotation? >> >> E.g.: label 0, which is background, has the same bounding box size as the >> input label image. >> Input LabelImage: >> dimensions: 512 1024 130 (in pixels) >> origin: [102.273, 0, 5.96985] (in physical size) >> >> oriented image of label 0: >> dimensions: 1026 515 131 >> origin: [-51.2878, 50.6859, -0.132971] >> >> >> Is this a bug, or did I forget to set a parameter? >> >> Thanks, >> Thomas >> >> >> >> >> >> On 4/6/15 12:02 AM, "Bill Lorensen" wrote: >> >> Thomas, >> >> I compiled your program and ran it on one of my labeled images and it >> produces the expected output. >> >> On Sun, Apr 5, 2015 at 2:52 PM, Thomas Seidel >> wrote: >> >> Hi Bill, >> >> Thanks for your answer. Here is (part of the) source I am using. >> Do you need the image or source files? >> >> >> >> >> #include "itkImage.h" >> #include "itkImageFileReader.h" >> #include "itkImageFileWriter.h" >> #include "itkLabelGeometryImageFilter.h" >> >> #include "itksys/SystemTools.hxx" >> >> #include >> >> >> int main(int argc, char * argv[]) >> { >> // Verify command line arguments >> if( argc < 2 ) >> { >> std::cerr << "Usage: " << std::endl; >> std::cerr << argv[0] << " InputImageFile [-intensity >> ]" << std::endl; >> return EXIT_FAILURE; >> } >> std::string inputFilename = argv[1]; >> std::string intensityFile; >> bool calcIntensity = false; >> >> >> int argcounter = 2; >> while (argc>argcounter) >> { >> if (!strncmp(argv[argcounter],"-intensity",10) ) {intensityFile >> = >> argv[argcounter + 1]; calcIntensity = true; } >> argcounter++; >> } >> >> // Setup types >> typedef itk::Image IntImageType; >> typedef itk::Image FloatImageType; >> typedef itk::ImageFileReader ReaderType; >> typedef itk::ImageFileReader >> FloatReaderType; >> >> ReaderType::Pointer reader = ReaderType::New(); >> reader->SetFileName( inputFilename ); >> FloatReaderType::Pointer FloatReader = FloatReaderType::New(); >> >> >> >> typedef itk::LabelGeometryImageFilter< IntImageType, FloatImageType > >> LabelGeometryImageFilterType; >> LabelGeometryImageFilterType::Pointer labelGeometryImageFilter = >> LabelGeometryImageFilterType::New(); >> labelGeometryImageFilter->SetInput( reader->GetOutput() ); >> >> >> if (calcIntensity) >> { >> FloatReader->SetFileName(intensityFile); >> FloatReader->Update(); >> >> labelGeometryImageFilter->SetIntensityInput(FloatReader->GetOutput()); >> labelGeometryImageFilter->CalculateOrientedIntensityRegionsOn(); >> >> } >> >> >> labelGeometryImageFilter->CalculatePixelIndicesOn(); >> labelGeometryImageFilter->CalculateOrientedBoundingBoxOn(); >> labelGeometryImageFilter->CalculateOrientedLabelRegionsOn(); >> >> labelGeometryImageFilter->Update(); >> >> LabelGeometryImageFilterType::LabelsType allLabels = >> labelGeometryImageFilter->GetLabels(); >> LabelGeometryImageFilterType::LabelsType::iterator allLabelsIt; >> std::cout << "Number of labels: " << >> labelGeometryImageFilter->GetNumberOfLabels() << std::endl; >> std::cout << std::endl; >> >> >> >> for( allLabelsIt = allLabels.begin(); allLabelsIt != allLabels.end(); >> allLabelsIt++ ) >> { >> >> LabelGeometryImageFilterType::LabelPixelType labelValue = >> *allLabelsIt; >> >> >> std::ostringstream stream; >> stream << labelValue << ".vtk"; >> typedef itk::ImageFileWriter WriterType; >> WriterType::Pointer writer = WriterType::New(); >> writer->SetFileName(stream.str()); >> >> writer->SetInput(labelGeometryImageFilter->GetOrientedLabelImage(labelVal >> u >> e)); >> writer->Update(); >> >> std::ostringstream stream2; >> stream2 << labelValue << "-intensity.vtk"; >> >> if (calcIntensity) { >> typedef itk::ImageFileWriter >> FloatWriterType; >> FloatWriterType::Pointer Floatwriter = >> FloatWriterType::New(); >> Floatwriter->SetFileName(stream2.str()); >> >> Floatwriter->SetInput(labelGeometryImageFilter->GetOrientedIntensityImage >> (labelValue)); >> Floatwriter->Update(); >> } >> } >> >> >> >> >> >> >> return EXIT_SUCCESS; >> } >> >> >> >> >> >> >> On 4/5/15 12:10 PM, "Bill Lorensen" wrote: >> >> Do you have a small, compilable example that illustrates the problem? >> >> On Sun, Apr 5, 2015 at 10:09 AM, Thomas Seidel >> wrote: >> >> Hi all, >> >> I am using the itkLabelGeometryImageFilter to get information about >> the >> orientation of labeled objects. >> I provide a LabelImage and a IntensityImage. >> I set CalculateOrientedLabelRegionsOn() and >> CalculateOrientedIntensityRegionsOn(). >> >> However, when I use >> writer->SetInput(filter->GetOrientedLabelImage()); >> writer->Update(); >> or >> writer->SetInput(filter->GetOrientedIntensityImage()); >> writer->Update(); >> >> it just generates empty images (all values 0) with the size of the >> oriented >> bounding box. >> >> Is this how the filter is supposed to work?? I was expecting the >> rotated >> labels and the rotated region of the intensity image defined by the >> oriented >> bounding box, respectively. >> >> Thanks, >> Thomas >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> >> >> -- >> 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 >> >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From matt.mccormick at kitware.com Tue Apr 7 15:03:10 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 7 Apr 2015 15:03:10 -0400 Subject: [ITK-users] Inverse of Versor Rigid Transform and RIRE In-Reply-To: <1428373448494-7587127.post@n2.nabble.com> References: <1428373448494-7587127.post@n2.nabble.com> Message-ID: Hi Gabriel! > I am use RIRE project, specifically CT (movig) and MR_PD (fixed) images. > Basically, I hava a set of point (in millimeters) of the CT image to which > apply the trasform result of the registration and updaload this results in > the web for the evaluation. Example of set of points and his "ground truth" > : > > Point x y z new_x new_y new_z > > 1 0.0000 0.0000 0.0000 -7.5731 -41.2534 -27.3093 > 2 333.9870 0.0000 0.0000 324.8722 -72.8159 -32.9063 > 3 0.0000 333.9870 0.0000 24.1607 291.0393 -16.2727 > 4 333.9870 333.9870 0.0000 356.6060 259.4768 -21.8697 > 5 0.0000 0.0000 112.0000 -6.0554 -45.1157 84.6137 > 6 333.9870 0.0000 112.0000 326.3899 -76.6782 79.0168 > 7 0.0000 333.9870 112.0000 25.6784 287.1769 95.6503 > 8 333.9870 333.9870 112.0000 358.1237 255.6145 90.0534 Trying to reproduce previous results is a good path forward. > So, the first I need is the transformation to apply, for that I do the > following : > > //get the inverse transform > TransformType::Pointer inverseTransform = TransformType::New(); > inverseTransform->SetCenter( finalTransform->GetCenter() ); > bool response = finalTransform->GetInverse(inverseTransform); > > > It makes sense to use the same center in the inverse transform?. A > "quaternion" define an "axis" (right part) of rotation and an angle to use > for rotate the image about this axis...why use a center of rotation...? If you are working with a current version of ITK, when you get the inverse transform, it should transfer the Center for you. The Center point locations are the FixedParameters for the parent class, MatrixOffsetTransformBase. The relationship with parent classes can be found by examining the Doxygen page for the class [1]. > Second, apply this transform...as follows: > > NewPoint = RotationMatrix * OriginalPoint + Offset > > The rotation matrix and the offset are obtained from the inverse transforme > objetc. Found something wrong? something that is not taking into account ? > The results do not appear to be correct...the calculated error is too big > and does not correspond with the visual result. Do you get the same result by applying the TransformPoint() method of the inverse transform? This is the API call that should be applied to transform a point. Thanks, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1VersorRigid3DTransform.html From matt.mccormick at kitware.com Tue Apr 7 15:10:18 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 7 Apr 2015 15:10:18 -0400 Subject: [ITK-users] python for AnisotropicDiffusionImageFilter In-Reply-To: <5523878B.4020502@itccanarias.org> References: <5523878B.4020502@itccanarias.org> Message-ID: Hi Eduardo, The itk.AnisotropicDiffusionImageFilter is a base class that is not intended to be instantiated. As you have observed, it returns an 'itkObject *' type when we attempt to use .New() in Python. Other ways to confirm this are to look for the New() method in its Doxygen page [1], or for the 'itkNewMacro' in its header file [2]. To get an instance of this class, create one of its derived classes instead. See the Doxygen inheritance diagram [1] for one of the four options. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1AnisotropicDiffusionImageFilter.html [2] http://www.itk.org/Doxygen/html/itkAnisotropicDiffusionImageFilter_8h_source.html On Tue, Apr 7, 2015 at 3:30 AM, Eduardo Suarez-Santana wrote: > I can't use 'itk.AnisotropicDiffusionImageFilter'. It does not get rendered > as its filter object, but as a common object. I can't see any of the filter > methods. I tried with other filters and they seem to work fine. > > Tried with Itk-4.7 and git version from yesterday. > > $ ipython > > In [1]: import itk; > > ... > > In [7]: anifilter = itk.AnisotropicDiffusionImageFilter.IF3IF3.New() > > In [8]: anifilter > Out[8]: 'itkObject *' at 0x7f5891326030> > > > In [9]: > otherfilter=itk.CurvatureAnisotropicDiffusionImageFilter.IF3IF3.New() > > In [10]: otherfilter > Out[10]: > proxy of 'itkCurvatureAnisotropicDiffusionImageFilterIF3IF3 *' at 0x7f5893be0420> > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From gaetan.lehmann at gmail.com Wed Apr 8 09:45:11 2015 From: gaetan.lehmann at gmail.com (Gaetan Lehmann) Date: Wed, 8 Apr 2015 15:45:11 +0200 Subject: [ITK-users] Fwd: SimpleITK FFTConvolution In-Reply-To: References: <54FBFE7D-D3C3-4481-A546-396293420227@mail.nih.gov> Message-ID: Sorry, forgot to keep the list in copy. Ga?tan 2015-04-02 15:54 GMT+02:00 Bradley Lowekamp : > Gaetan, > > Nice to see you taking SimpleITK for a spin :) > > You need to inspect the input image types a little. It's reading them an > RGB images into a VectorImage type. Implicit types can be a pain. > > You can utilize the second argument of the ReadImage method to specify the > desired pixel type, say "sitk.sitkFloat32". > Thanks, it works a lot better that way :-) > > Brad > > BTW, > I have been wanting to pick you brain about way to make the LabelMaps more > extendible. I did some classes [1] where the parents was a template > argument, so that you could compose different label map objects, and > similarly filters. The usage got a little complicated though[2]. > > [1] https://github.com/blowekamp/itkOBBLabelMap/tree/master/include > [2] > https://github.com/blowekamp/itkOBBLabelMap/blob/master/test/itkOrientedBoundingBoxImageLabelMapFilterTest1.cxx#L42 > > I think your approach is quite good actually. I'm not sure it can be simpler with a static implementation. The the label type and image dimension in the type declaration repetition could be avoided - they could be taken from the superclass passed in parameter, but then it wouldn't be possible to provide a default superclass. typedef itk::OrientedBoundingBoxLabelObject< LabelPixelType, ImageDimension > OBBLabelObjectType; typedef itk::AttributeImageLabelObject< LabelPixelType, ImageDimension, ImageType, OBBLabelObjectType > LabelObjectType; would be typedef itk::AttributeImageLabelObject > > LabelObjectType; Not sure that's any better. My main concern is that it would be quite hard to wrap. I thought about something to add attributes but at runtime ? that would be a lot easier to wrap ? using a mechanism similar to what is done in the metadata dictionary. I've never completed the implementation, mainly because of the negative comments I've heard on the metadata dictionary implementation. This would also have some API and performance impact because the attribute must be retrieved with a string and the value casted to its actual type. ImageType* img = lo->GetAttribute< ImageType* >("FeatureImage); instead of ImageType * img = lo->GetFeatureImage(); Ga?tan > > On Apr 2, 2015, at 9:47 AM, Gaetan Lehmann > wrote: > > > Hi Brad, > > > > I'm trying to use SimpleITK's FFTConvolution from python: > > > > import SimpleITK as sitk > > img = sitk.ReadImage("/tmp/cthead1.png") > > kernel = sitk.ReadImage("/tmp/kernel2.png") > > conv = sitk.FFTConvolution(img, kernel) > > > > the last line fails with the error: > > > > Traceback (most recent call last): > > File "/tmp/test.py", line 5, in > > conv = sitk.FFTConvolution(img, kernel) > > File > "/Users/glehmann/Library/Python/2.7/lib/python/site-packages/SimpleITK/SimpleITK.py", > line 17771, in FFTConvolution > > return _SimpleITK.FFTConvolution(*args, **kwargs) > > RuntimeError: Exception thrown in SimpleITK FFTConvolution: > /scratch/dashboards/SimpleITK-OSX10.7-intel-pkg/SimpleITK/Code/Common/include/sitkMemberFunctionFactory.hxx:193: > > sitk::ERROR: Pixel type: vector of 8-bit unsigned integer is not > supported in 2D byN3itk6simple25FFTConvolutionImageFilterE > > > > I get the same error when building from source and when installing > SimpleITK with > > > > pip install --user SimpleITK > > > > This is on a mac running yosemite. > > > > Would you have an idea of what is wrong? > > > > Thanks, > > > > Ga?tan > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From samaneh.kazemi at gmail.com Wed Apr 8 10:14:18 2015 From: samaneh.kazemi at gmail.com (Samaneh Kazemi) Date: Wed, 8 Apr 2015 10:14:18 -0400 Subject: [ITK-users] InsightToolkit-3.20.0 Message-ID: Hi, I need the source code of InsightToolkit-3.20.0. There is not available this version on ITK website. Would you please send me if someone has it? Thank you, Samaneh -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Wed Apr 8 10:22:06 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 8 Apr 2015 10:22:06 -0400 Subject: [ITK-users] InsightToolkit-3.20.0 In-Reply-To: References: Message-ID: <1A53BAD4-88DA-42D4-A006-54029434FD99@mail.nih.gov> Hello, You can find source code for just about any version of ITK on SourceForge: http://sourceforge.net/projects/itk/files/itk/ Also you can always checkout a tag from ITK's git repository [1] [2]. HTH, Brad [1] http://www.itk.org/Wiki/ITK/Git/Download [2] http://stackoverflow.com/questions/791959/download-a-specific-tag-with-git On Apr 8, 2015, at 10:14 AM, Samaneh Kazemi wrote: > Hi, > > I need the source code of InsightToolkit-3.20.0. There is not available this version on ITK website. Would you please send me if someone has it? > > Thank you, > Samaneh > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From cervellone at gmail.com Wed Apr 8 10:46:11 2015 From: cervellone at gmail.com (jp) Date: Wed, 8 Apr 2015 07:46:11 -0700 (MST) Subject: [ITK-users] one dimensional median filter, incredibly slow Message-ID: <1428504371356-35473.post@n7.nabble.com> Dear all, i would like to apply a median filter but only in one image dimension, so i use the rank image filter with a box structuring element. of radius 0,0,1. While the result is what i want the speed is abysmal. Does anyone have an idea ? I am currenlly using itk 4.4.2 through python. Here is the code: strel = itk.FlatStructuringElement[3].Box([0,0,1]) median = itk.RankImageFilter[itkType,itkType, strel].New(reader, Kernel=strel) Thanks very much jp -- View this message in context: http://itk-users.7.n7.nabble.com/one-dimensional-median-filter-incredibly-slow-tp35473.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Wed Apr 8 22:01:53 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 8 Apr 2015 22:01:53 -0400 Subject: [ITK-users] one dimensional median filter, incredibly slow In-Reply-To: <1428504371356-35473.post@n7.nabble.com> References: <1428504371356-35473.post@n7.nabble.com> Message-ID: Hi jp, How does the MedianImageFilter compare? Thanks, Matt On Wed, Apr 8, 2015 at 10:46 AM, jp wrote: > Dear all, > i would like to apply a median filter but only in one image dimension, so i > use the rank image filter with a box structuring element. of radius 0,0,1. > While the result is what i want the speed is abysmal. > Does anyone have an idea ? > > I am currenlly using itk 4.4.2 through python. > > Here is the code: > > strel = itk.FlatStructuringElement[3].Box([0,0,1]) > median = itk.RankImageFilter[itkType,itkType, strel].New(reader, > Kernel=strel) > > Thanks very much > > jp > > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/one-dimensional-median-filter-incredibly-slow-tp35473.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 richard.beare at gmail.com Thu Apr 9 02:29:02 2015 From: richard.beare at gmail.com (Richard Beare) Date: Thu, 9 Apr 2015 16:29:02 +1000 Subject: [ITK-users] one dimensional median filter, incredibly slow In-Reply-To: References: <1428504371356-35473.post@n7.nabble.com> Message-ID: Those old rank filters were designed to do big kernels quickly - they summarize the contents of the kernel in a histogram which needs to be updated as the kernel goes from one voxel to the next. For a tiny kernel the histogram overhead is going to kill the performance, and a direct approach will be better. On Thu, Apr 9, 2015 at 12:01 PM, Matt McCormick wrote: > Hi jp, > > How does the MedianImageFilter compare? > > Thanks, > Matt > > On Wed, Apr 8, 2015 at 10:46 AM, jp wrote: > > Dear all, > > i would like to apply a median filter but only in one image dimension, > so i > > use the rank image filter with a box structuring element. of radius > 0,0,1. > > While the result is what i want the speed is abysmal. > > Does anyone have an idea ? > > > > I am currenlly using itk 4.4.2 through python. > > > > Here is the code: > > > > strel = itk.FlatStructuringElement[3].Box([0,0,1]) > > median = itk.RankImageFilter[itkType,itkType, strel].New(reader, > > Kernel=strel) > > > > Thanks very much > > > > jp > > > > > > > > > > -- > > View this message in context: > http://itk-users.7.n7.nabble.com/one-dimensional-median-filter-incredibly-slow-tp35473.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cervellone at gmail.com Thu Apr 9 07:31:47 2015 From: cervellone at gmail.com (jp) Date: Thu, 9 Apr 2015 04:31:47 -0700 (MST) Subject: [ITK-users] one dimensional median filter, incredibly slow In-Reply-To: <1428504371356-35473.post@n7.nabble.com> References: <1428504371356-35473.post@n7.nabble.com> Message-ID: <1428579107494-35476.post@n7.nabble.com> Thanks for the reply I didnt know the median filter accepted a list for every image dimension :-). the rankimage filter takes 1595 seconds ! whereas the median filter takes 0.37 seconds. Also the results seem to be similar: When dividing the rank filtered picture by the median filtered picture i get a picture of ones, except for the first and the last slice in the volume which means that the border condition of rank and medianfilter is different but that does not matter. So ill use the medianfilter instead Cheers JP -- View this message in context: http://itk-users.7.n7.nabble.com/one-dimensional-median-filter-incredibly-slow-tp35473p35476.html Sent from the ITK - Users mailing list archive at Nabble.com. From scapegoat.sarthak at gmail.com Thu Apr 9 07:35:41 2015 From: scapegoat.sarthak at gmail.com (scapegoat.sarthak) Date: Thu, 9 Apr 2015 04:35:41 -0700 (MST) Subject: [ITK-users] gdcm::Image to itk::Image and vice-versa Message-ID: <1428579341027-35477.post@n7.nabble.com> Hi, Is there an easy way to switch from gdcm::Image to itk::Image and vice-versa? There are a few methods in GDCM which I want to use while using the file handling capabilities of ITK. I know of the itk::GDCMImageIO class but it doesn't really do this explicit conversion. Thanks, Sarthak -- View this message in context: http://itk-users.7.n7.nabble.com/gdcm-Image-to-itk-Image-and-vice-versa-tp35477.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Thu Apr 9 09:40:43 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 9 Apr 2015 09:40:43 -0400 Subject: [ITK-users] 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. Today, 1:00 PM Eastern USA time, there will be a Google+ Hangout where we will be doing code reviews: https://plus.google.com/events/cfn4h91mb26l1coq9hu63kugoi8 On Friday, 11:00 AM Eastern USA time, an ITK development conference, https://plus.google.com/events/cv779d1fdghhko68eef25a9e30c For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423 To get regular invites to these events, join the ITK Bar Camp G+ Community: https://plus.google.com/u/0/communities/111375098792764998322 All are welcome. Hope to talk to you then! From ogdenk at upstate.edu Thu Apr 9 12:42:53 2015 From: ogdenk at upstate.edu (Kent Ogden) Date: Thu, 09 Apr 2015 12:42:53 -0400 Subject: [ITK-users] Problem adding ITK to project In-Reply-To: References: <54FBFE7D-D3C3-4481-A546-396293420227@mail.nih.gov> Message-ID: <552673CD02000082000C8131@gatedom1.upstate.edu> Hi, I am trying to do something really simple, I have a VTK project (I'm trying this with the cone.cxx example, about as simple as it gets) and I want to add ITK functionality. In the past I had used a modified version of the ITKQuickView example, and it used to work: cmake_minimum_required(VERSION 2.8) project(Cone) find_package(ITK REQUIRED) include(${ITK_USE_FILE}) if (ITKVtkGlue_LOADED) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) else() find_package(ItkVtkGlue REQUIRED) include(${ItkVtkGlue_USE_FILE}) set(Glue ItkVtkGlue) endif() add_executable(Cone MACOSX_BUNDLE Cone.cxx) target_link_libraries(Cone ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) Now, however, I get the following compile error (VS 2012 64 bit on Win 7): 2>C:\KW\VTKBuild\Rendering\Core\vtkRenderingCoreModule.h(37): error C2006: '#include' : expected a filename, found 'newline' The vicinity of that line in vtkRenderingCoreModule.h is /* AutoInit implementations. */ #if defined(vtkRenderingCore_INCLUDE) # include vtkRenderingCore_INCLUDE // Error is from this line #endif #if defined(vtkRenderingCore_AUTOINIT) # include "vtkAutoInit.h" VTK_AUTOINIT(vtkRenderingCore) #endif I do not have any ITK functionality added to the program yet, it is just the cone.cxx example. If I use a very simple CMakelists.txt file the program compiles and runs just fine: cmake_minimum_required(VERSION 2.8) project(Cone) set(VTK_DIR "C:/KW/VTKBuild") set(ITK_DIR "C:/KW/ITKBuild") find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(Cone MACOSX_BUNDLE Cone.cxx) target_link_libraries(Cone ${VTK_LIBRARIES} ) But if I try to add find_package(ITK REQUIRED) include(${ITK_USE_FILE}) I get the same error as above. I am sure this is a simple issue but my understanding of CMake is limited. I know this isn't precisely an ITK problem per se but I hoped someone could point out what I am doing wrong. Any help greatly appreciated! Kent Kent Ogden PhD Associate Professor, Radiology SUNY Upstate Medical University 750 E. Adams Street Syracuse, NY 13210 email: ogdenk at upstate.edu voice: (315) 464-5083 fax: (315) 464-8789 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lluna.nova at gmail.com Thu Apr 9 13:47:51 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Thu, 9 Apr 2015 19:47:51 +0200 Subject: [ITK-users] Problem adding ITK to project In-Reply-To: <552673CD02000082000C8131@gatedom1.upstate.edu> References: <54FBFE7D-D3C3-4481-A546-396293420227@mail.nih.gov> <552673CD02000082000C8131@gatedom1.upstate.edu> Message-ID: Hello Kent, vtkRenderingCore_INCLUDE is probably empty so it then results on #include and that's it. Maybe try adding #warning vtkRenderingCore_INCLUDE to see it's contents, but that's probably what's happening. 2015-04-09 18:42 GMT+02:00 Kent Ogden : > Hi, > > I am trying to do something really simple, I have a VTK project (I'm > trying this with the cone.cxx example, about as simple as it gets) and I > want to add ITK functionality. In the past I had used a modified version > of the ITKQuickView example, and it used to work: > > cmake_minimum_required(VERSION 2.8) > > project(Cone) > > find_package(ITK REQUIRED) > include(${ITK_USE_FILE}) > if (ITKVtkGlue_LOADED) > find_package(VTK REQUIRED) > include(${VTK_USE_FILE}) > else() > find_package(ItkVtkGlue REQUIRED) > include(${ItkVtkGlue_USE_FILE}) > set(Glue ItkVtkGlue) > endif() > > add_executable(Cone MACOSX_BUNDLE Cone.cxx) > target_link_libraries(Cone > ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) > > Now, however, I get the following compile error (VS 2012 64 bit on Win 7): > > 2>C:\KW\VTKBuild\Rendering\Core\vtkRenderingCoreModule.h(37): error C2006: > '#include' : expected a filename, found 'newline' > The vicinity of that line in vtkRenderingCoreModule.h is > > /* AutoInit implementations. */ > #if defined(vtkRenderingCore_INCLUDE) > # include vtkRenderingCore_INCLUDE // Error is from this line > #endif > #if defined(vtkRenderingCore_AUTOINIT) > # include "vtkAutoInit.h" > VTK_AUTOINIT(vtkRenderingCore) > #endif > > I do not have any ITK functionality added to the program yet, it is just > the cone.cxx example. If I use a very simple CMakelists.txt file the > program compiles and runs just fine: > > cmake_minimum_required(VERSION 2.8) > > project(Cone) > set(VTK_DIR "C:/KW/VTKBuild") > set(ITK_DIR "C:/KW/ITKBuild") > > find_package(VTK REQUIRED) > include(${VTK_USE_FILE}) > > add_executable(Cone MACOSX_BUNDLE Cone.cxx) > target_link_libraries(Cone ${VTK_LIBRARIES} ) > > But if I try to add > > find_package(ITK REQUIRED) > include(${ITK_USE_FILE}) > > I get the same error as above. I am sure this is a simple issue but my > understanding of CMake is limited. I know this isn't precisely an ITK > problem per se but I hoped someone could point out what I am doing wrong. > > Any help greatly appreciated! > > Kent > > > > > > > > > > Kent Ogden PhD > Associate Professor, Radiology > SUNY Upstate Medical University > 750 E. Adams Street > Syracuse, NY 13210 > > email: ogdenk at upstate.edu > voice: (315) 464-5083 > fax: (315) 464-8789 > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 scapegoat.sarthak at gmail.com Thu Apr 9 14:59:25 2015 From: scapegoat.sarthak at gmail.com (Scapegoat Sarthak) Date: Thu, 9 Apr 2015 14:59:25 -0400 Subject: [ITK-users] GDCM-ITK Bridge Message-ID: Hi, Is there an easy way to switch from gdcm::Image to itk::Image and vice-versa? There are a few methods in GDCM which I want to use while using the file handling capabilities of ITK. I know of the itk::GDCMImageIO class but it doesn't really do this explicit conversion. Thanks, Sarthak -------------- next part -------------- An HTML attachment was scrubbed... URL: From ogdenk at upstate.edu Thu Apr 9 15:19:02 2015 From: ogdenk at upstate.edu (Kent Ogden) Date: Thu, 09 Apr 2015 15:19:02 -0400 Subject: [ITK-users] Problem adding ITK to project Message-ID: <5526986602000082000C81BE@gatedom1.upstate.edu> I think I realized what the problem is. I don't have time to verify this now but I will report back when I do. When I did this last (about a year ago) I was using a VTK build that was set to create shared libraries. As I recall that was required when I built ITK with ITKVTKGlue turned on. My current build is using static VTK libraries (nice not to have to deal with .dll's) and I didn't get the error in CMake when setting up ITK, and the Quickviewer worked just fine. I suspect that my problem now is that I don't have VTK built with shared libraries. Does this make sense to anyone? Kent >>> Pol Mons? Purt? 04/09/15 1:48 PM >>> Hello Kent, vtkRenderingCore_INCLUDE is probably empty so it then results on #include and that's it. Maybe try adding #warning vtkRenderingCore_INCLUDE to see it's contents, but that's probably what's happening. 2015-04-09 18:42 GMT+02:00 Kent Ogden : Hi, I am trying to do something really simple, I have a VTK project (I'm trying this with the cone.cxx example, about as simple as it gets) and I want to add ITK functionality. In the past I had used a modified version of the ITKQuickView example, and it used to work: cmake_minimum_required(VERSION 2.8) project(Cone) find_package(ITK REQUIRED) include(${ITK_USE_FILE}) if (ITKVtkGlue_LOADED) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) else() find_package(ItkVtkGlue REQUIRED) include(${ItkVtkGlue_USE_FILE}) set(Glue ItkVtkGlue) endif() add_executable(Cone MACOSX_BUNDLE Cone.cxx) target_link_libraries(Cone ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) Now, however, I get the following compile error (VS 2012 64 bit on Win 7): 2>C:\KW\VTKBuild\Rendering\Core\vtkRenderingCoreModule.h(37): error C2006: '#include' : expected a filename, found 'newline' The vicinity of that line in vtkRenderingCoreModule.h is /* AutoInit implementations. */ #if defined(vtkRenderingCore_INCLUDE) # include vtkRenderingCore_INCLUDE // Error is from this line #endif #if defined(vtkRenderingCore_AUTOINIT) # include "vtkAutoInit.h" VTK_AUTOINIT(vtkRenderingCore) #endif I do not have any ITK functionality added to the program yet, it is just the cone.cxx example. If I use a very simple CMakelists.txt file the program compiles and runs just fine: cmake_minimum_required(VERSION 2.8) project(Cone) set(VTK_DIR "C:/KW/VTKBuild") set(ITK_DIR "C:/KW/ITKBuild") find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(Cone MACOSX_BUNDLE Cone.cxx) target_link_libraries(Cone ${VTK_LIBRARIES} ) But if I try to add find_package(ITK REQUIRED) include(${ITK_USE_FILE}) I get the same error as above. I am sure this is a simple issue but my understanding of CMake is limited. I know this isn't precisely an ITK problem per se but I hoped someone could point out what I am doing wrong. Any help greatly appreciated! Kent Kent Ogden PhD Associate Professor, Radiology SUNY Upstate Medical University 750 E. Adams Street Syracuse, NY 13210 email: ogdenk at upstate.edu voice: (315) 464-5083 fax: (315) 464-8789 _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 matt.mccormick at kitware.com Thu Apr 9 17:13:08 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 9 Apr 2015 17:13:08 -0400 Subject: [ITK-users] GDCM-ITK Bridge In-Reply-To: References: Message-ID: Hi Sarthak, Not to my knowledge. What capabilities are you looking for? Thanks, Matt On Thu, Apr 9, 2015 at 2:59 PM, Scapegoat Sarthak wrote: > Hi, > > Is there an easy way to switch from gdcm::Image to itk::Image and > vice-versa? There are a few methods in GDCM which I want to use while using > the file handling capabilities of ITK. I know of the itk::GDCMImageIO class > but it doesn't really do this explicit conversion. > > Thanks, > Sarthak > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Thu Apr 9 17:31:18 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 9 Apr 2015 17:31:18 -0400 Subject: [ITK-users] Problem adding ITK to project In-Reply-To: <5526986602000082000C81BE@gatedom1.upstate.edu> References: <5526986602000082000C81BE@gatedom1.upstate.edu> Message-ID: Hi Kent, Thanks for discussing this on the list. A restriction on static libraries is not a known issue -- it would be interesting to get your report on whether shared libraries help. What version of ITK and VTK is this? Thanks, Matt On Thu, Apr 9, 2015 at 3:19 PM, Kent Ogden wrote: > I think I realized what the problem is. I don't have time to verify this > now but I will report back when I do. > > When I did this last (about a year ago) I was using a VTK build that was set > to create shared libraries. As I recall that was required when I built ITK > with ITKVTKGlue turned on. My current build is using static VTK libraries > (nice not to have to deal with .dll's) and I didn't get the error in CMake > when setting up ITK, and the Quickviewer worked just fine. I suspect that > my problem now is that I don't have VTK built with shared libraries. Does > this make sense to anyone? > > Kent > > >>>> Pol Mons? Purt? 04/09/15 1:48 PM >>> > > Hello Kent, > > vtkRenderingCore_INCLUDE is probably empty so it then results on #include > and that's it. > > Maybe try adding #warning vtkRenderingCore_INCLUDE to see it's contents, but > that's probably what's happening. > > 2015-04-09 18:42 GMT+02:00 Kent Ogden : >> >> Hi, >> >> I am trying to do something really simple, I have a VTK project (I'm >> trying this with the cone.cxx example, about as simple as it gets) and I >> want to add ITK functionality. In the past I had used a modified version of >> the ITKQuickView example, and it used to work: >> >> cmake_minimum_required(VERSION 2.8) >> >> project(Cone) >> >> find_package(ITK REQUIRED) >> include(${ITK_USE_FILE}) >> if (ITKVtkGlue_LOADED) >> find_package(VTK REQUIRED) >> include(${VTK_USE_FILE}) >> else() >> find_package(ItkVtkGlue REQUIRED) >> include(${ItkVtkGlue_USE_FILE}) >> set(Glue ItkVtkGlue) >> endif() >> >> add_executable(Cone MACOSX_BUNDLE Cone.cxx) >> target_link_libraries(Cone >> ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) >> >> Now, however, I get the following compile error (VS 2012 64 bit on Win 7): >> >> 2>C:\KW\VTKBuild\Rendering\Core\vtkRenderingCoreModule.h(37): error C2006: >> '#include' : expected a filename, found 'newline' >> The vicinity of that line in vtkRenderingCoreModule.h is >> >> /* AutoInit implementations. */ >> #if defined(vtkRenderingCore_INCLUDE) >> # include vtkRenderingCore_INCLUDE // Error is from this line >> #endif >> #if defined(vtkRenderingCore_AUTOINIT) >> # include "vtkAutoInit.h" >> VTK_AUTOINIT(vtkRenderingCore) >> #endif >> >> I do not have any ITK functionality added to the program yet, it is just >> the cone.cxx example. If I use a very simple CMakelists.txt file the >> program compiles and runs just fine: >> >> cmake_minimum_required(VERSION 2.8) >> >> project(Cone) >> set(VTK_DIR "C:/KW/VTKBuild") >> set(ITK_DIR "C:/KW/ITKBuild") >> >> find_package(VTK REQUIRED) >> include(${VTK_USE_FILE}) >> >> add_executable(Cone MACOSX_BUNDLE Cone.cxx) >> target_link_libraries(Cone ${VTK_LIBRARIES} ) >> >> But if I try to add >> >> find_package(ITK REQUIRED) >> include(${ITK_USE_FILE}) >> >> I get the same error as above. I am sure this is a simple issue but my >> understanding of CMake is limited. I know this isn't precisely an ITK >> problem per se but I hoped someone could point out what I am doing wrong. >> >> Any help greatly appreciated! >> >> Kent >> >> >> >> >> >> >> >> >> >> Kent Ogden PhD >> Associate Professor, Radiology >> SUNY Upstate Medical University >> 750 E. Adams Street >> Syracuse, NY 13210 >> >> email: ogdenk at upstate.edu >> voice: (315) 464-5083 >> fax: (315) 464-8789 >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From scapegoat.sarthak at gmail.com Thu Apr 9 18:48:06 2015 From: scapegoat.sarthak at gmail.com (Scapegoat Sarthak) Date: Thu, 9 Apr 2015 18:48:06 -0400 Subject: [ITK-users] GDCM-ITK Bridge In-Reply-To: References: Message-ID: Hi Matt, Thanks for replying. I am looking to use the mosaicing class in GDCM ( http://gdcm.sourceforge.net/html/classgdcm_1_1SplitMosaicFilter.html) on a series of DICOM images read using ITK. In the future, I would also like to incorporate some more functionality using ITK. Best, Sarthak On 9 April 2015 at 17:13, Matt McCormick wrote: > Hi Sarthak, > > Not to my knowledge. > > What capabilities are you looking for? > > Thanks, > Matt > > On Thu, Apr 9, 2015 at 2:59 PM, Scapegoat Sarthak > wrote: > > Hi, > > > > Is there an easy way to switch from gdcm::Image to itk::Image and > > vice-versa? There are a few methods in GDCM which I want to use while > using > > the file handling capabilities of ITK. I know of the itk::GDCMImageIO > class > > but it doesn't really do this explicit conversion. > > > > Thanks, > > Sarthak > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gabrielgimenez85 at gmail.com Thu Apr 9 21:17:21 2015 From: gabrielgimenez85 at gmail.com (=?UTF-8?Q?Gabriel_A=2E_Gim=C3=A9nez?=) Date: Thu, 9 Apr 2015 21:17:21 -0400 Subject: [ITK-users] Inverse of Versor Rigid Transform and RIRE In-Reply-To: References: <1428373448494-7587127.post@n2.nabble.com> Message-ID: Hi Matt! If you are working with a current version of ITK, when you get the > inverse transform, it should transfer the Center for you. The Center > point locations are the FixedParameters for the parent class, > MatrixOffsetTransformBase. The relationship with parent classes can be > found by examining the Doxygen page for the class [1]. I took a few days to read the RIRE documentation and I came to the conclusion that the direction of registration is not really relevant...taking up CT as the fexed image and MR as the moving image can be used the transformation that provides ITK...without having to calculate the inverse. Do you get the same result by applying the TransformPoint() method of > the inverse transform? This is the API call that should be applied to > transform a point. Yes Matt, I get the same results using the API. But...I made some changes in my optimizers and I got very good results, like this ( with RegularStepGradientDescentOptimizerv4 and MattesMutualInformationImageToImageMetricv4): iterations = 200 Metric value = -0.709388 versor X = 0.0155583 versor Y = 0.00642035 versor Z = -0.0487144 Translation X = 7.82977 Translation Y = -60.1034 Translation Z = -23.6258 +-----------------------------------------------------------------------------------------------+ | X GT| Y GT| Z GT| X R| Y R| Z R| -----------------------------------------------------------------------------------------------+ | -7.573100| -41.253400| -27.309300| -7.661395| -40.915138| -26.044441| | 324.872200| -72.815900| -32.906300| 324.712907| -73.345104| -30.833635| | 24.160700| 291.039300| -16.272700| 24.902019| 291.325008| -15.874605| | 356.606000| 259.476800| -21.869700| 357.276322| 258.895042| -20.663798| | -6.055400| -45.115700| 84.613700| -6.394922| -44.465633| 85.892103| | 326.389900| -76.678200| 79.016800| 325.979381| -76.895599| 81.102910| | 25.678400| 287.176900| 95.650300| 26.168493| 287.774513| 96.061940| | 358.123700| 255.614500| 90.053400| 358.542796| 255.344547| 91.272747| +-----------------------------------------------------------------------------------------------+ [X, Y, Z]GT are the "ground truth" values and [X, Y, Z]R are my results Now, something I find strange is that when increasing the number of iterations...metric value limprovement is too little but the result is little worse..., example: Iterations = 334 Metric value = -0.710918 versor X = 0.0216566 versor Y = 0.00700629 versor Z = -0.0508766 Translation X = 7.80722 Translation Y = -60.5124 Translation Z = -24.1047 +-----------------------------------------------------------------------------------------------+ | X GT| Y GT| Z GT| X R| Y R| Z R| +-----------------------------------------------------------------------------------------------+ | -7.573100| -41.253400| -27.309300| -8.342271| -39.764911| -28.121895| | 324.872200| -72.815900| -32.906300| 323.882938| -73.594962| -33.530625| | 24.160700| 291.039300| -16.272700| 25.690487| 292.179801| -13.916412| | 356.606000| 259.476800| -21.869700| 357.915696| 258.349750| -19.325143| | -6.055400| -45.115700| 84.613700| -7.022108| -44.688304| 83.762051| | 326.389900| -76.678200| 79.016800| 325.203101| -78.518355| 78.353321| | 25.678400| 287.176900| 95.650300| 27.010650| 287.256408| 97.967534| | 358.123700| 255.614500| 90.053400| 359.235859| 253.426357| 92.558803| +-----------------------------------------------------------------------------------------------+ This pattern is repeated with other optimizers ( like OnePlusOne and a GA approach that I am implementing ), that you think about it? Other questions Matt...: How works the multithreaded in metrics ? is customizable? improve performance? specifically in the case of Mattes Mutual Information... I tried using the helper CenteredVersorTransformInitializer... but the transformation that generates makes, incredibly and also very strange,the optimizers does not advance...using CenteredTransformInitializer this does not happen... Really Thanks in advance Matt! Regards, 2015-04-07 15:03 GMT-04:00 Matt McCormick : > Hi Gabriel! > > > I am use RIRE project, specifically CT (movig) and MR_PD (fixed) images. > > Basically, I hava a set of point (in millimeters) of the CT image to > which > > apply the trasform result of the registration and updaload this results > in > > the web for the evaluation. Example of set of points and his "ground > truth" > > : > > > > Point x y z new_x new_y new_z > > > > 1 0.0000 0.0000 0.0000 -7.5731 -41.2534 -27.3093 > > 2 333.9870 0.0000 0.0000 324.8722 -72.8159 -32.9063 > > 3 0.0000 333.9870 0.0000 24.1607 291.0393 -16.2727 > > 4 333.9870 333.9870 0.0000 356.6060 259.4768 -21.8697 > > 5 0.0000 0.0000 112.0000 -6.0554 -45.1157 84.6137 > > 6 333.9870 0.0000 112.0000 326.3899 -76.6782 79.0168 > > 7 0.0000 333.9870 112.0000 25.6784 287.1769 95.6503 > > 8 333.9870 333.9870 112.0000 358.1237 255.6145 90.0534 > > Trying to reproduce previous results is a good path forward. > > > So, the first I need is the transformation to apply, for that I do the > > following : > > > > //get the inverse transform > > TransformType::Pointer inverseTransform = TransformType::New(); > > inverseTransform->SetCenter( finalTransform->GetCenter() ); > > bool response = finalTransform->GetInverse(inverseTransform); > > > > > > It makes sense to use the same center in the inverse transform?. A > > "quaternion" define an "axis" (right part) of rotation and an angle to > use > > for rotate the image about this axis...why use a center of rotation...? > > If you are working with a current version of ITK, when you get the > inverse transform, it should transfer the Center for you. The Center > point locations are the FixedParameters for the parent class, > MatrixOffsetTransformBase. The relationship with parent classes can be > found by examining the Doxygen page for the class [1]. > > > > Second, apply this transform...as follows: > > > > NewPoint = RotationMatrix * OriginalPoint + Offset > > > > The rotation matrix and the offset are obtained from the inverse > transforme > > objetc. Found something wrong? something that is not taking into account > ? > > The results do not appear to be correct...the calculated error is too big > > and does not correspond with the visual result. > > Do you get the same result by applying the TransformPoint() method of > the inverse transform? This is the API call that should be applied to > transform a point. > > Thanks, > Matt > > > [1] > http://www.itk.org/Doxygen/html/classitk_1_1VersorRigid3DTransform.html > -- *Gabriel Alberto Gim?nez.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From lsustc at mail.ustc.edu.cn Thu Apr 9 21:48:09 2015 From: lsustc at mail.ustc.edu.cn (LiuShuai) Date: Thu, 9 Apr 2015 18:48:09 -0700 (MST) Subject: [ITK-users] Problem about GetRotationMatrix Message-ID: <1428630489911-35487.post@n7.nabble.com> Hello everyone, I am a newer in ITK. ,My tutor give me a program and when I run it, it notes : 1225 error C2039: ?GetRotationMatrix?: is not the member of ?itk::QuaternionRigidTransform? .Please help me. Thanks. LiuShuai -- View this message in context: http://itk-users.7.n7.nabble.com/Problem-about-GetRotationMatrix-tp35487.html Sent from the ITK - Users mailing list archive at Nabble.com. From cyril.mory at creatis.insa-lyon.fr Fri Apr 10 06:02:19 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 10 Apr 2015 12:02:19 +0200 Subject: [ITK-users] Smallest region containing the physical space covered by another image's region Message-ID: <55279FAB.7060304@creatis.insa-lyon.fr> Hi ITK users, I am preparing a patch for the itkWarpImageFilter, and I came to realize that computing the requestedRegion of the inputs from the output's requested region is non trivial. - the displacement in the deformation field can be very large, in any direction, ... therefore there is no choice but to load the full input image into memory (unless we want to go through the whole deformation field to evaluate the maximum displacement, but in a method like GenerateInputRequestedRegion we do not want such heavy processing) => Input image's requested region should be the largest possible region - the requested region in the deformation field, on the other hand, can be computed. But it is not trivial. If the output and the DF have identical information (spacing, origin, direction), then the requested region in the DF should be copied from the output. If their information differs, computing the requested region would require a method to compute the smallest rectangular region that contains the physical space covered by an other image's region, the other image having (potentially) a different spacing, origin and/or direction. Does such a method exist somewhere in ITK ? Cyril From franciscolopezdelafranca at gmail.com Fri Apr 10 08:32:39 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Fri, 10 Apr 2015 14:32:39 +0200 Subject: [ITK-users] Too many label objects detected when only 3 Message-ID: Hi all. I've just tested itk::BinaryImageToShapeLabelMapFilter with an B/W image (see attachment) containing only 3 object. I call the following methods: > binaryImageToShapeLabelMapFilter->ComputePerimeterOn(); > binaryImageToShapeLabelMapFilter->SetInputForegroundValue(255); > binaryImageToShapeLabelMapFilter->SetOutputBackgroundValue(0); > binaryImageToShapeLabelMapFilter->Update(); > LabelMapType::Pointer labelMap = binaryImageToShapeLabelMapFilter->GetOutput(); > int nrOfLabelObjects = labelMap->GetNumberOfLabelObjects(); When I display the number of of label objects, the result is 246. Does anybody know why this behaviour? Thanks a lot. My best regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: poligonos.jpg Type: image/jpeg Size: 9122 bytes Desc: not available URL: From cr at neuro.ma.uni-heidelberg.de Fri Apr 10 10:11:37 2015 From: cr at neuro.ma.uni-heidelberg.de (Chr. Rossmanith) Date: Fri, 10 Apr 2015 16:11:37 +0200 Subject: [ITK-users] Too many label objects detected when only 3 In-Reply-To: References: Message-ID: <5527DA19.7030804@neuro.ma.uni-heidelberg.de> Hi, your image isn't a true binary image but has some gray values close to 0 (black) and some gray values close to 255 (white). I've converted it to a pure black-white PNG and now three regions should be detected. I guess JPG does some anti aliasing which introduces the additional grey values. Christina Rossmanith On 10.04.2015 14:32, Francisco Lopez de la Franca wrote: > Hi all. > I've just tested itk::BinaryImageToShapeLabelMapFilter with an B/W > image (see attachment) containing only 3 object. > > I call the following methods: > > > binaryImageToShapeLabelMapFilter->ComputePerimeterOn(); > > binaryImageToShapeLabelMapFilter->SetInputForegroundValue(255); > > binaryImageToShapeLabelMapFilter->SetOutputBackgroundValue(0); > > binaryImageToShapeLabelMapFilter->Update(); > > > LabelMapType::Pointer labelMap = > binaryImageToShapeLabelMapFilter->GetOutput(); > > > int nrOfLabelObjects = labelMap->GetNumberOfLabelObjects(); > > When I display the number of of label objects, the result is 246. > > Does anybody know why this behaviour? > > Thanks a lot. > My best regards. > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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: poligonos_bw.png Type: image/png Size: 758 bytes Desc: not available URL: From indianzeppelin at gmail.com Fri Apr 10 12:07:47 2015 From: indianzeppelin at gmail.com (Girish Mallya Udupi) Date: Fri, 10 Apr 2015 17:07:47 +0100 Subject: [ITK-users] Too many label objects detected when only 3 In-Reply-To: <5527DA19.7030804@neuro.ma.uni-heidelberg.de> References: <5527DA19.7030804@neuro.ma.uni-heidelberg.de> Message-ID: That's correct. Apart from looking at the number of label objects to confirm the correctness of the labeling, it is also usually useful to convert the label map to a label image and display/save that image (especially when the input binary image is not coming from an internal binarization process). On Fri, Apr 10, 2015 at 3:11 PM, Chr. Rossmanith < cr at neuro.ma.uni-heidelberg.de> wrote: > Hi, > > your image isn't a true binary image but has some gray values close to 0 > (black) and some gray values close to 255 (white). I've converted it to a > pure black-white PNG and now three regions should be detected. I guess JPG > does some anti aliasing which introduces the additional grey values. > > Christina Rossmanith > > > > > On 10.04.2015 14:32, Francisco Lopez de la Franca wrote: > > Hi all. > I've just tested itk::BinaryImageToShapeLabelMapFilter with an B/W image > (see attachment) containing only 3 object. > > I call the following methods: > > > binaryImageToShapeLabelMapFilter->ComputePerimeterOn(); > > binaryImageToShapeLabelMapFilter->SetInputForegroundValue(255); > > binaryImageToShapeLabelMapFilter->SetOutputBackgroundValue(0); > > binaryImageToShapeLabelMapFilter->Update(); > > > LabelMapType::Pointer labelMap = > binaryImageToShapeLabelMapFilter->GetOutput(); > > > int nrOfLabelObjects = labelMap->GetNumberOfLabelObjects(); > > When I display the number of of label objects, the result is 246. > > Does anybody know why this behaviour? > > Thanks a lot. > My best regards. > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects athttp://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit:http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 > > -- Regards, Girish -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Fri Apr 10 15:59:13 2015 From: matimontg at gmail.com (Matias Montroull) Date: Fri, 10 Apr 2015 16:59:13 -0300 Subject: [ITK-users] MattesMutual or Mutual? Message-ID: Hi, I'm using MattesMutual metric and was wondering what's the difference between this metric and the MutualInformation metric? thank you, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivier.commowick at inria.fr Sun Apr 12 04:50:59 2015 From: olivier.commowick at inria.fr (Olivier Commowick) Date: Sun, 12 Apr 2015 10:50:59 +0200 Subject: [ITK-users] Scan line iterators, region iterators and indexes Message-ID: Hello I have recently discovered that many ITK filters have switched to scan line iterators, apparently for speed reasons. I was therefore wondering about switching to them as well in our local code, but I have a few questions regarding them. First, I looked at the code and it seems to me that both region and scan line iterators explore regions in the exact same way (apart from the fact that you manually need to switch to the next line in the scan line iterator). I think the answer is yes, but does that mean that if I explore a corresponding sub region of a 4D and a 3D image, the pixel exploration order will be the same (e.g. exploring a 3D sub image of a 4d volume and an other 3d image)? Then, there is no scan line iterator with index. Is that something that would be doable and if yes, is it something planned or not ? I have the feeling that If no the most efficient (in a filter with access to the index at each pixel), region iterator with index would be more efficient. Thanks in advance Olivier From jose.de.paula at live.com Mon Apr 13 10:45:29 2015 From: jose.de.paula at live.com (JoseBarretoT) Date: Mon, 13 Apr 2015 07:45:29 -0700 (MST) Subject: [ITK-users] Dental Panoramic Image In-Reply-To: References: Message-ID: <1428936329443-7587161.post@n2.nabble.com> Hello, you managed to make the panoramic view? -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Dental-Panoramic-Image-tp4437494p7587161.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From grothausmann.roman at mh-hannover.de Mon Apr 13 10:58:07 2015 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Mon, 13 Apr 2015 16:58:07 +0200 Subject: [ITK-users] automated splitting and pasting of volumes for use in external programs In-Reply-To: References: <0B31CB6B-D4D0-48B1-A019-775E1E09E686@mail.nih.gov> <55191685.9020706@mh-hannover.de> <551AF134.4080804@mh-hannover.de> <551C00F5.1060608@mh-hannover.de> Message-ID: <552BD97F.4050407@mh-hannover.de> Dear Brad, Many thanks for Your reply. Just switching back to GenerateData(), according to Your suggestion, did the trick of getting streaming to work for this example. However, the mini-pipeline filters (AddImageFilter in this case) seem not to run multi-threaded (even though the AddImageFilter is based on itkBinaryFunctorImageFilter, which is multi-threaded). Any ideas why? What confuses me in the User Guide is on page 195 point 4: "It subdivides data into subpieces for multithreading. (Note that the division of data into subpieces is exactly same problem as dividing data into pieces for streaming; hence multithreading comes for free as part of the streaming architecture.)" Is the subdivision also done if the Filter has no ThreadedGenerateData but only a GenerateData? Another problem I stumbled into now is that if I define the InputPixelType not to equal the OutputPixelType the program aborts with: Description: itk::ERROR: Image(0x19f8770): itk::Image::Graft() cannot cast PKN3itk10DataObjectE to PKN3itk5ImageIdLj3EEE Why is that? My filter itkLabelShiftImageFilter is templated over the input and the output image and so is the internal AddImageFilter. If I set the NumberOfStreamDivisions to the number of slices in the 3D Stack Input, is it guaranteed that each slice will be processed on its own? Or would I have to use an approach as in itkJoinSeriesImageFilterStreamingTest.cxx employing itkExtractImageFilter for each slice? Many thanks again for Your help. Roman On 01/04/15 16:53, Bradley Lowekamp wrote: > Hello, > > Looking at your code the first big problem is that you are trying to do a > mini-pipeline in the ThreadedGenerateData method. You have having each thread > modify the m_AddImageFilter concurrently. > > Generally mini-pipelines should be done in the more general > GenerateDataMethod as is done int he ITKExample Minipipeline. Then the > mini-piple filters will be multi-threaded. > > ( a couple more comments below ) > > HTH, Brad > > On Apr 1, 2015, at 10:30 AM, Dr. Roman Grothausmann wrote: > >> It seems the the Minipipeline-example (http://www.itk.org/Wiki/ITK/Examples/Developer/Minipipeline) and the Itk User Guide (http://www.itk.org/Doxygen/html/classitk_1_1ImageSource.html#ab988dcc743020c2f4381996ba6503306) differ concerning grafting. >> With the User Guide grafting of the input it works up to some percent of the StreamingImageFilter execution progress but then crashes with a Segmentation fault. (see https://github.com/romangrothausmann/ITK-CLIs/commit/51d6a3ffc3a74cfb2ccf711b1e3b18f0c65a9876) >> With the infos given in the User Guide I'm confused what of a general Streaming Filter is needed for a simple Minipipeline Filter (Composit Filter). What I would need is a combination of the Streaming/Threaded example and the Minipipeline-example or the info what needs to be added/modified in the Minipipeline-example. >> Is my understanding correct that grep-ing the itk sources for ThreadedGenerateData will list all filters that are capable of streaming unless they have special conditions on the InputRequestedRegion? > > By default the ITK pipeline is streamable for the ImageSource derived filters. To make it a filter not streamable the regions do need to be modified. > > There pipeline methods are general and customizable. There do exists streamable filters which are not multi-threaded. And there exists filters which need their entire output but can an arbitrary output region. > >> Will a multi-threaded filter pipeline be only single-threaded if connected to itkStreamingImageFilter? > > The pipeline should not be multi-threaded only the individual filters are > >> >> Thanks for any help or hints. >> Roman >> >> >> On 31/03/15 21:10, Dr. Roman Grothausmann wrote: >>> Dear Matt, >>> >>> >>> Thanks for Your quick reply. If I got Your hint right, You suggest writing my >>> own filter (that e.g. does the writing of the chunk to a file) and put an >>> itkStreamingImageFilter after it supplying it with the # of chunks and the type >>> of splitter. If I understand the ITK Software Guide correctly, such a filter >>> needs to be threaded, i.e. have a ThreadedGenerateData. >>> I tried that with a simple AddFilter that should just add a constant according >>> to the chunk number to the region it is supposed to process (files attached). >>> However it stops due to region miss-matches. I can't see why. With just >>> GenerateData it seems like it is not streaming, according to the >>> PipelineMonitorImageFilter. >>> What would be the correct way to go? >>> >>> Many thanks for looking into this. >>> Roman >>> >>> On 30/03/15 16:02, Matt McCormick wrote: >>>> Hi Roman, >>>> >>>> You probably want to use the streaming capabilities of the ITK >>>> pipeline. This is covered in more detailed in the ITK Software Guide. >>>> The pipeline internally uses ImageRegionSplitter classes. Overlaps are >>>> handled by propagation of the RequestedRegion throughout the pipeline. >>>> To monitor the changes in the regions, use the >>>> PipelineMonitorImageFilter [1]. >>>> >>>> HTH, >>>> Matt >>>> >>>> [1] http://www.itk.org/Doxygen/html/classitk_1_1PipelineMonitorImageFilter.html >>>> >>>> On Mon, Mar 30, 2015 at 5:25 AM, Dr. Roman Grothausmann >>>> wrote: >>>>> Dear mailing list members, >>>>> >>>>> >>>>> A dataset I work on is too big to load completely into itksnap for manual >>>>> adjustment of the automatic pre-segementation with watersheds. The full >>>>> resolution is needed, so I cannot work with a re-sampled version. The only >>>>> possible easy solution I see at the moment is to split up the 3D image into >>>>> smaller blocks of sizes as equal as possible, do the itsnap interaction, and >>>>> finally paste all blocks of the resulting segmentation back together. >>>>> Would itkImageRegionSplitterMultidimensional be the right filter for the >>>>> splitting of blocks as equal in size as possible? >>>>> Is there a "logger" like e.g. itkXMLFileOutputWindow (as used in >>>>> itkStreamingImageFilterTest2.cxx) that could be used to store the regions >>>>> corresponding to each block-file to use that for itkPasteImageFilter to >>>>> combine these blocks later again? >>>>> Not needed now, but perhaps lager: Is there some nice way to handle overlaps >>>>> in this case that is already implemented in itk, something like >>>>> itkImageRegionSplitterMultidimensional::SetOverlap()? >>>>> >>>>> Many thanks for any help or hints. >>>>> Roman >>>>> -- 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 From matt.mccormick at kitware.com Mon Apr 13 12:38:56 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 13 Apr 2015 12:38:56 -0400 Subject: [ITK-users] Inverse of Versor Rigid Transform and RIRE In-Reply-To: References: <1428373448494-7587127.post@n2.nabble.com> Message-ID: Hi Gabriel, Good to hear about your progress! To get a better idea of what is happening in the optimization, it may insightful to visualize the cost function and where the optimizer is moving over that space. There may be that there is a local minima that is catching the optimizer. See, for example, the later parts of this video, which displays the cost function as a surface and the progression of the optimization [1]. See the Metrics section of the ITK Software Guide for another example and discussion on how to do this. We can make use of the ITK Command class, the IterationEvent, and the ExhaustiveOptimizer. The code itself is the best place to find details on multithreading in the metrics. As a first step, you can call SetNumberOfThreads on an Object or call itk::MultiThreader::SetGlobalDefaultNumberOfThreads. There is a lot of interest in improving the mutual information metric performance -- please keep the list informed of your experiences. Thanks, Matt [1] https://drive.google.com/file/d/0B986LSX8iqF-bl9qQWZobmRWeEk/view?usp=sharing On Thu, Apr 9, 2015 at 9:17 PM, Gabriel A. Gim?nez wrote: > Hi Matt! > >> If you are working with a current version of ITK, when you get the >> inverse transform, it should transfer the Center for you. The Center >> point locations are the FixedParameters for the parent class, >> MatrixOffsetTransformBase. The relationship with parent classes can be >> found by examining the Doxygen page for the class [1]. > > > I took a few days to read the RIRE documentation and I came to the > conclusion that the direction of registration is not really > relevant...taking up CT as the fexed image and MR as the moving image can be > used the transformation that provides ITK...without having to calculate the > inverse. > > >> Do you get the same result by applying the TransformPoint() method of >> the inverse transform? This is the API call that should be applied to >> transform a point. > > > Yes Matt, I get the same results using the API. > > But...I made some changes in my optimizers and I got very good results, like > this ( with RegularStepGradientDescentOptimizerv4 and > MattesMutualInformationImageToImageMetricv4): > > iterations = 200 > Metric value = -0.709388 > versor X = 0.0155583 > versor Y = 0.00642035 > versor Z = -0.0487144 > Translation X = 7.82977 > Translation Y = -60.1034 > Translation Z = -23.6258 > +-----------------------------------------------------------------------------------------------+ > | X GT| Y GT| Z GT| X R| > Y R| Z R| > -----------------------------------------------------------------------------------------------+ > | -7.573100| -41.253400| -27.309300| -7.661395| > -40.915138| -26.044441| > | 324.872200| -72.815900| -32.906300| 324.712907| > -73.345104| -30.833635| > | 24.160700| 291.039300| -16.272700| 24.902019| > 291.325008| -15.874605| > | 356.606000| 259.476800| -21.869700| 357.276322| > 258.895042| -20.663798| > | -6.055400| -45.115700| 84.613700| -6.394922| > -44.465633| 85.892103| > | 326.389900| -76.678200| 79.016800| 325.979381| > -76.895599| 81.102910| > | 25.678400| 287.176900| 95.650300| 26.168493| > 287.774513| 96.061940| > | 358.123700| 255.614500| 90.053400| 358.542796| > 255.344547| 91.272747| > +-----------------------------------------------------------------------------------------------+ > [X, Y, Z]GT are the "ground truth" values and [X, Y, Z]R are my results > > Now, something I find strange is that when increasing the number of > iterations...metric value limprovement is too little but the result is > little worse..., example: > > Iterations = 334 > Metric value = -0.710918 > versor X = 0.0216566 > versor Y = 0.00700629 > versor Z = -0.0508766 > Translation X = 7.80722 > Translation Y = -60.5124 > Translation Z = -24.1047 > > +-----------------------------------------------------------------------------------------------+ > | X GT| Y GT| Z GT| X R| > Y R| Z R| > +-----------------------------------------------------------------------------------------------+ > | -7.573100| -41.253400| -27.309300| -8.342271| > -39.764911| -28.121895| > | 324.872200| -72.815900| -32.906300| 323.882938| > -73.594962| -33.530625| > | 24.160700| 291.039300| -16.272700| 25.690487| > 292.179801| -13.916412| > | 356.606000| 259.476800| -21.869700| 357.915696| > 258.349750| -19.325143| > | -6.055400| -45.115700| 84.613700| -7.022108| > -44.688304| 83.762051| > | 326.389900| -76.678200| 79.016800| 325.203101| > -78.518355| 78.353321| > | 25.678400| 287.176900| 95.650300| 27.010650| > 287.256408| 97.967534| > | 358.123700| 255.614500| 90.053400| 359.235859| > 253.426357| 92.558803| > +-----------------------------------------------------------------------------------------------+ > > This pattern is repeated with other optimizers ( like OnePlusOne and a GA > approach that I am implementing ), that you think about it? > > Other questions Matt...: > > How works the multithreaded in metrics ? is customizable? improve > performance? specifically in the case of Mattes Mutual Information... > > I tried using the helper CenteredVersorTransformInitializer... but the > transformation that generates makes, incredibly and also very strange,the > optimizers does not advance...using CenteredTransformInitializer this does > not happen... > > Really Thanks in advance Matt! > Regards, > > > > 2015-04-07 15:03 GMT-04:00 Matt McCormick : > >> Hi Gabriel! >> >> > I am use RIRE project, specifically CT (movig) and MR_PD (fixed) >> > images. >> > Basically, I hava a set of point (in millimeters) of the CT image to >> > which >> > apply the trasform result of the registration and updaload this results >> > in >> > the web for the evaluation. Example of set of points and his "ground >> > truth" >> > : >> > >> > Point x y z new_x new_y new_z >> > >> > 1 0.0000 0.0000 0.0000 -7.5731 -41.2534 -27.3093 >> > 2 333.9870 0.0000 0.0000 324.8722 -72.8159 -32.9063 >> > 3 0.0000 333.9870 0.0000 24.1607 291.0393 -16.2727 >> > 4 333.9870 333.9870 0.0000 356.6060 259.4768 -21.8697 >> > 5 0.0000 0.0000 112.0000 -6.0554 -45.1157 84.6137 >> > 6 333.9870 0.0000 112.0000 326.3899 -76.6782 79.0168 >> > 7 0.0000 333.9870 112.0000 25.6784 287.1769 95.6503 >> > 8 333.9870 333.9870 112.0000 358.1237 255.6145 90.0534 >> >> Trying to reproduce previous results is a good path forward. >> >> > So, the first I need is the transformation to apply, for that I do the >> > following : >> > >> > //get the inverse transform >> > TransformType::Pointer inverseTransform = TransformType::New(); >> > inverseTransform->SetCenter( finalTransform->GetCenter() ); >> > bool response = finalTransform->GetInverse(inverseTransform); >> > >> > >> > It makes sense to use the same center in the inverse transform?. A >> > "quaternion" define an "axis" (right part) of rotation and an angle to >> > use >> > for rotate the image about this axis...why use a center of rotation...? >> >> If you are working with a current version of ITK, when you get the >> inverse transform, it should transfer the Center for you. The Center >> point locations are the FixedParameters for the parent class, >> MatrixOffsetTransformBase. The relationship with parent classes can be >> found by examining the Doxygen page for the class [1]. >> >> >> > Second, apply this transform...as follows: >> > >> > NewPoint = RotationMatrix * OriginalPoint + Offset >> > >> > The rotation matrix and the offset are obtained from the inverse >> > transforme >> > objetc. Found something wrong? something that is not taking into account >> > ? >> > The results do not appear to be correct...the calculated error is too >> > big >> > and does not correspond with the visual result. >> >> Do you get the same result by applying the TransformPoint() method of >> the inverse transform? This is the API call that should be applied to >> transform a point. >> >> Thanks, >> Matt >> >> >> [1] >> http://www.itk.org/Doxygen/html/classitk_1_1VersorRigid3DTransform.html > > > > > -- > Gabriel Alberto Gim?nez. From matt.mccormick at kitware.com Mon Apr 13 13:53:14 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 13 Apr 2015 13:53:14 -0400 Subject: [ITK-users] Problem about GetRotationMatrix In-Reply-To: <1428630489911-35487.post@n7.nabble.com> References: <1428630489911-35487.post@n7.nabble.com> Message-ID: Hi LiuShuai, Welcome to ITK! To find the methods on a class like QuaternionRigidTransform, check its Doxygen page [1]. Here we see that there is a method GetRotation. Maybe that is the one you are looking for? Hope this helps, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1QuaternionRigidTransform.html On Thu, Apr 9, 2015 at 9:48 PM, LiuShuai wrote: > Hello everyone, > I am a newer in ITK. ,My tutor give me a program and when I run it, it > notes : 1225 error C2039: ?GetRotationMatrix?: is not the member of > ?itk::QuaternionRigidTransform? .Please help me. Thanks. > > > LiuShuai > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/Problem-about-GetRotationMatrix-tp35487.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 Mon Apr 13 15:12:57 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 13 Apr 2015 15:12:57 -0400 Subject: [ITK-users] Smallest region containing the physical space covered by another image's region In-Reply-To: <55279FAB.7060304@creatis.insa-lyon.fr> References: <55279FAB.7060304@creatis.insa-lyon.fr> Message-ID: Hi Cyril, > I am preparing a patch for the itkWarpImageFilter, and I came to realize > that computing the requestedRegion of the inputs from the output's requested > region is non trivial. Great job on the patch submission! :-) > - the displacement in the deformation field can be very large, in any > direction, ... therefore there is no choice but to load the full input image > into memory (unless we want to go through the whole deformation field to > evaluate the maximum displacement, but in a method like > GenerateInputRequestedRegion we do not want such heavy processing) > => Input image's requested region should be the largest possible region Yes, this is a good assessment. > - the requested region in the deformation field, on the other hand, can be > computed. But it is not trivial. If the output and the DF have identical > information (spacing, origin, direction), then the requested region in the > DF should be copied from the output. If their information differs, computing > the requested region would require a method to compute the smallest > rectangular region that contains the physical space covered by an other > image's region, the other image having (potentially) a different spacing, > origin and/or direction. Does such a method exist somewhere in ITK ? A possible approach here could transform all corner indexes of the output to physical space points, transform physical points to index space of the DF, and compute a bounding box of these index points. The methods to apply could be TransformIndexToPhysicalPoint TransformPhysicalPointToIndex on the ImageBase class and the itk::BoundingBox class. HTH, Matt From matt.mccormick at kitware.com Mon Apr 13 15:56:09 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 13 Apr 2015 15:56:09 -0400 Subject: [ITK-users] MattesMutual or Mutual? In-Reply-To: References: Message-ID: Hi Matias, What classes specifically are you referring to? Thanks, Matt On Fri, Apr 10, 2015 at 3:59 PM, Matias Montroull wrote: > Hi, > > I'm using MattesMutual metric and was wondering what's the difference > between this metric and the MutualInformation metric? > > thank you, > > Matias. > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matimontg at gmail.com Mon Apr 13 16:03:55 2015 From: matimontg at gmail.com (Matias Montroull) Date: Mon, 13 Apr 2015 17:03:55 -0300 Subject: [ITK-users] MattesMutual or Mutual? In-Reply-To: References: Message-ID: Hi Matt, I'm referring to the itk::MattesMutualInformationImageToImageMetric and the itk::MutualInformationImageToImageMetric Classes. I've noticed the Mattes is faster than Mutual. Regards, Matias. On Mon, Apr 13, 2015 at 4:56 PM, Matt McCormick wrote: > Hi Matias, > > What classes specifically are you referring to? > > Thanks, > Matt > > On Fri, Apr 10, 2015 at 3:59 PM, Matias Montroull > wrote: > > Hi, > > > > I'm using MattesMutual metric and was wondering what's the difference > > between this metric and the MutualInformation metric? > > > > thank you, > > > > Matias. > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Mon Apr 13 16:13:59 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 13 Apr 2015 16:13:59 -0400 Subject: [ITK-users] MattesMutual or Mutual? In-Reply-To: References: Message-ID: Hi Matias, There are variations in the algorithm and implementation. The MutualInformationImageToImageMetric is based on the Viola and Wells paper. HTH, Matt On Mon, Apr 13, 2015 at 4:03 PM, Matias Montroull wrote: > Hi Matt, > > I'm referring to the itk::MattesMutualInformationImageToImageMetric and the > itk::MutualInformationImageToImageMetric Classes. > > I've noticed the Mattes is faster than Mutual. > > Regards, > > Matias. > > On Mon, Apr 13, 2015 at 4:56 PM, Matt McCormick > wrote: >> >> Hi Matias, >> >> What classes specifically are you referring to? >> >> Thanks, >> Matt >> >> On Fri, Apr 10, 2015 at 3:59 PM, Matias Montroull >> wrote: >> > Hi, >> > >> > I'm using MattesMutual metric and was wondering what's the difference >> > between this metric and the MutualInformation metric? >> > >> > thank you, >> > >> > Matias. >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > > > From gabrielgimenez85 at gmail.com Mon Apr 13 22:54:31 2015 From: gabrielgimenez85 at gmail.com (=?UTF-8?Q?Gabriel_A=2E_Gim=C3=A9nez?=) Date: Mon, 13 Apr 2015 22:54:31 -0400 Subject: [ITK-users] Inverse of Versor Rigid Transform and RIRE In-Reply-To: References: <1428373448494-7587127.post@n2.nabble.com> Message-ID: Hi Matt, Good to hear about your progress! your answers help me a lot! There may be that there is a local minima that > is catching the optimizer Yes Matt, but the strange thing is that while the value of a metric is little better the result is worse...should not be better? or nearly equal ? As a first step, you can call SetNumberOfThreads on an > Object I had a compile error when trying to use this method (no exist member funtion), I think it is no available in the ITKv4. I tried to use a SetMaximumNumberOfThreads method, but do not notice any improvement in performance. or call itk::MultiThreader::SetGlobalDefaultNumberOfThreads It seems a bit complicated to use Matt ... There is a lot of interest in improving the mutual information metric > performance Yes, in my GA approach is critical the execution time of the Metric...because it must be calculated for each individual in the population. I think I have to use an alternative like a GA-Surrogate model to improve my implementation. Thanks Matt, 2015-04-13 12:38 GMT-04:00 Matt McCormick : > Hi Gabriel, > > Good to hear about your progress! > > To get a better idea of what is happening in the optimization, it may > insightful to visualize the cost function and where the optimizer is > moving over that space. There may be that there is a local minima that > is catching the optimizer. See, for example, the later parts of this > video, which displays the cost function as a surface and the > progression of the optimization [1]. See the Metrics section of the > ITK Software Guide for another example and discussion on how to do > this. We can make use of the ITK Command class, the IterationEvent, > and the ExhaustiveOptimizer. > > The code itself is the best place to find details on multithreading in > the metrics. As a first step, you can call SetNumberOfThreads on an > Object or call itk::MultiThreader::SetGlobalDefaultNumberOfThreads. > There is a lot of interest in improving the mutual information metric > performance -- please keep the list informed of your experiences. > > Thanks, > Matt > > [1] > https://drive.google.com/file/d/0B986LSX8iqF-bl9qQWZobmRWeEk/view?usp=sharing > > On Thu, Apr 9, 2015 at 9:17 PM, Gabriel A. Gim?nez > wrote: > > Hi Matt! > > > >> If you are working with a current version of ITK, when you get the > >> inverse transform, it should transfer the Center for you. The Center > >> point locations are the FixedParameters for the parent class, > >> MatrixOffsetTransformBase. The relationship with parent classes can be > >> found by examining the Doxygen page for the class [1]. > > > > > > I took a few days to read the RIRE documentation and I came to the > > conclusion that the direction of registration is not really > > relevant...taking up CT as the fexed image and MR as the moving image > can be > > used the transformation that provides ITK...without having to calculate > the > > inverse. > > > > > >> Do you get the same result by applying the TransformPoint() method of > >> the inverse transform? This is the API call that should be applied to > >> transform a point. > > > > > > Yes Matt, I get the same results using the API. > > > > But...I made some changes in my optimizers and I got very good results, > like > > this ( with RegularStepGradientDescentOptimizerv4 and > > MattesMutualInformationImageToImageMetricv4): > > > > iterations = 200 > > Metric value = -0.709388 > > versor X = 0.0155583 > > versor Y = 0.00642035 > > versor Z = -0.0487144 > > Translation X = 7.82977 > > Translation Y = -60.1034 > > Translation Z = -23.6258 > > > +-----------------------------------------------------------------------------------------------+ > > | X GT| Y GT| Z GT| X R| > > Y R| Z R| > > > -----------------------------------------------------------------------------------------------+ > > | -7.573100| -41.253400| -27.309300| -7.661395| > > -40.915138| -26.044441| > > | 324.872200| -72.815900| -32.906300| 324.712907| > > -73.345104| -30.833635| > > | 24.160700| 291.039300| -16.272700| 24.902019| > > 291.325008| -15.874605| > > | 356.606000| 259.476800| -21.869700| 357.276322| > > 258.895042| -20.663798| > > | -6.055400| -45.115700| 84.613700| -6.394922| > > -44.465633| 85.892103| > > | 326.389900| -76.678200| 79.016800| 325.979381| > > -76.895599| 81.102910| > > | 25.678400| 287.176900| 95.650300| 26.168493| > > 287.774513| 96.061940| > > | 358.123700| 255.614500| 90.053400| 358.542796| > > 255.344547| 91.272747| > > > +-----------------------------------------------------------------------------------------------+ > > [X, Y, Z]GT are the "ground truth" values and [X, Y, Z]R are my results > > > > Now, something I find strange is that when increasing the number of > > iterations...metric value limprovement is too little but the result is > > little worse..., example: > > > > Iterations = 334 > > Metric value = -0.710918 > > versor X = 0.0216566 > > versor Y = 0.00700629 > > versor Z = -0.0508766 > > Translation X = 7.80722 > > Translation Y = -60.5124 > > Translation Z = -24.1047 > > > > > +-----------------------------------------------------------------------------------------------+ > > | X GT| Y GT| Z GT| X R| > > Y R| Z R| > > > +-----------------------------------------------------------------------------------------------+ > > | -7.573100| -41.253400| -27.309300| -8.342271| > > -39.764911| -28.121895| > > | 324.872200| -72.815900| -32.906300| 323.882938| > > -73.594962| -33.530625| > > | 24.160700| 291.039300| -16.272700| 25.690487| > > 292.179801| -13.916412| > > | 356.606000| 259.476800| -21.869700| 357.915696| > > 258.349750| -19.325143| > > | -6.055400| -45.115700| 84.613700| -7.022108| > > -44.688304| 83.762051| > > | 326.389900| -76.678200| 79.016800| 325.203101| > > -78.518355| 78.353321| > > | 25.678400| 287.176900| 95.650300| 27.010650| > > 287.256408| 97.967534| > > | 358.123700| 255.614500| 90.053400| 359.235859| > > 253.426357| 92.558803| > > > +-----------------------------------------------------------------------------------------------+ > > > > This pattern is repeated with other optimizers ( like OnePlusOne and a > GA > > approach that I am implementing ), that you think about it? > > > > Other questions Matt...: > > > > How works the multithreaded in metrics ? is customizable? improve > > performance? specifically in the case of Mattes Mutual Information... > > > > I tried using the helper CenteredVersorTransformInitializer... but the > > transformation that generates makes, incredibly and also very strange,the > > optimizers does not advance...using CenteredTransformInitializer this > does > > not happen... > > > > Really Thanks in advance Matt! > > Regards, > > > > > > > > 2015-04-07 15:03 GMT-04:00 Matt McCormick : > > > >> Hi Gabriel! > >> > >> > I am use RIRE project, specifically CT (movig) and MR_PD (fixed) > >> > images. > >> > Basically, I hava a set of point (in millimeters) of the CT image to > >> > which > >> > apply the trasform result of the registration and updaload this > results > >> > in > >> > the web for the evaluation. Example of set of points and his "ground > >> > truth" > >> > : > >> > > >> > Point x y z new_x new_y > new_z > >> > > >> > 1 0.0000 0.0000 0.0000 -7.5731 -41.2534 > -27.3093 > >> > 2 333.9870 0.0000 0.0000 324.8722 -72.8159 > -32.9063 > >> > 3 0.0000 333.9870 0.0000 24.1607 291.0393 > -16.2727 > >> > 4 333.9870 333.9870 0.0000 356.6060 259.4768 > -21.8697 > >> > 5 0.0000 0.0000 112.0000 -6.0554 -45.1157 > 84.6137 > >> > 6 333.9870 0.0000 112.0000 326.3899 -76.6782 > 79.0168 > >> > 7 0.0000 333.9870 112.0000 25.6784 287.1769 > 95.6503 > >> > 8 333.9870 333.9870 112.0000 358.1237 255.6145 > 90.0534 > >> > >> Trying to reproduce previous results is a good path forward. > >> > >> > So, the first I need is the transformation to apply, for that I do the > >> > following : > >> > > >> > //get the inverse transform > >> > TransformType::Pointer inverseTransform = TransformType::New(); > >> > inverseTransform->SetCenter( finalTransform->GetCenter() ); > >> > bool response = finalTransform->GetInverse(inverseTransform); > >> > > >> > > >> > It makes sense to use the same center in the inverse transform?. A > >> > "quaternion" define an "axis" (right part) of rotation and an angle to > >> > use > >> > for rotate the image about this axis...why use a center of > rotation...? > >> > >> If you are working with a current version of ITK, when you get the > >> inverse transform, it should transfer the Center for you. The Center > >> point locations are the FixedParameters for the parent class, > >> MatrixOffsetTransformBase. The relationship with parent classes can be > >> found by examining the Doxygen page for the class [1]. > >> > >> > >> > Second, apply this transform...as follows: > >> > > >> > NewPoint = RotationMatrix * OriginalPoint + Offset > >> > > >> > The rotation matrix and the offset are obtained from the inverse > >> > transforme > >> > objetc. Found something wrong? something that is not taking into > account > >> > ? > >> > The results do not appear to be correct...the calculated error is too > >> > big > >> > and does not correspond with the visual result. > >> > >> Do you get the same result by applying the TransformPoint() method of > >> the inverse transform? This is the API call that should be applied to > >> transform a point. > >> > >> Thanks, > >> Matt > >> > >> > >> [1] > >> http://www.itk.org/Doxygen/html/classitk_1_1VersorRigid3DTransform.html > > > > > > > > > > -- > > Gabriel Alberto Gim?nez. > -- *Gabriel Alberto Gim?nez.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Mon Apr 13 23:23:45 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 13 Apr 2015 23:23:45 -0400 Subject: [ITK-users] Inverse of Versor Rigid Transform and RIRE In-Reply-To: References: <1428373448494-7587127.post@n2.nabble.com> Message-ID: Hi Gabriel, > Yes Matt, but the strange thing is that while the value of a metric is > little better the result is worse...should not be better? or nearly equal ? Looking at the resampled image at both positions may be informative. > Yes, in my GA approach is critical the execution time of the > Metric...because it must be calculated for each individual in the > population. I think I have to use an alternative like a GA-Surrogate model > to improve my implementation. Another interesting optimizer that does well with local minima is the ParticleSwarmOptimizer [1]. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1ParticleSwarmOptimizer.html From cyril.mory at creatis.insa-lyon.fr Wed Apr 15 07:23:16 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 15 Apr 2015 13:23:16 +0200 Subject: [ITK-users] Smallest region containing the physical space covered by another image's region In-Reply-To: References: <55279FAB.7060304@creatis.insa-lyon.fr> Message-ID: <552E4A24.8020606@creatis.insa-lyon.fr> Hi Matt, I have added such a method to itkImageBase, it is called GetSmallestRegionContainingRegion. The patch is submitted on a branch with the same name. I made my best, but I think it will require more improvements than the previous one before it can get merged. In particular, I haven't used the itk::BoundingBox class, because from its description it seems to handle only itk::Point. Should I convert indexes to points, run the BoundingBox calculation, and convert back ? I'll wait for the comments Cyril On 04/13/2015 09:12 PM, Matt McCormick wrote: > Hi Cyril, > >> I am preparing a patch for the itkWarpImageFilter, and I came to realize >> that computing the requestedRegion of the inputs from the output's requested >> region is non trivial. > Great job on the patch submission! :-) > > >> - the displacement in the deformation field can be very large, in any >> direction, ... therefore there is no choice but to load the full input image >> into memory (unless we want to go through the whole deformation field to >> evaluate the maximum displacement, but in a method like >> GenerateInputRequestedRegion we do not want such heavy processing) >> => Input image's requested region should be the largest possible region > Yes, this is a good assessment. > > >> - the requested region in the deformation field, on the other hand, can be >> computed. But it is not trivial. If the output and the DF have identical >> information (spacing, origin, direction), then the requested region in the >> DF should be copied from the output. If their information differs, computing >> the requested region would require a method to compute the smallest >> rectangular region that contains the physical space covered by an other >> image's region, the other image having (potentially) a different spacing, >> origin and/or direction. Does such a method exist somewhere in ITK ? > A possible approach here could transform all corner indexes of the > output to physical space points, transform physical points to index > space of the DF, and compute a bounding box of these index points. > > The methods to apply could be > > TransformIndexToPhysicalPoint > TransformPhysicalPointToIndex > > on the ImageBase class and the itk::BoundingBox class. > > > HTH, > Matt From lluna.nova at gmail.com Wed Apr 15 10:25:49 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Wed, 15 Apr 2015 16:25:49 +0200 Subject: [ITK-users] Inverse gradient Message-ID: Hello all, Is there a filter to compute 1 / (1 + gradient^p) ? As in Eq. 17 of http://www.dtic.upf.edu/~vcaselles/papers_v/GAC_article.pdf If not, a better way than doing it pixel by pixel? If there isn't I would write a filter myself but I'm really clogged with work this month :S Cheers, Pol -------------- next part -------------- An HTML attachment was scrubbed... URL: From lluna.nova at gmail.com Wed Apr 15 12:22:08 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Wed, 15 Apr 2015 18:22:08 +0200 Subject: [ITK-users] Offset and Index Message-ID: Hello all, Similar to [1], I have some questions regarding the use of Indexes and Offsets. The client will give me a set of coordinates (IndexType). But I'm extracting a ROI with ROIImageFilter which will have the indices corrected (and I want them to be). Therefore I have to correct the aforementioned coordinates too. The problem I've encountered is that (typewise) offset = index - index and, as said on [1], supporting GetPixel(offset) is problematic, so, how do I get an index from an offset? Bizarrely, ImageBase::ComputeIndex takes OffsetValueType, not OffsetType. So how I am supposed to do this, other than foreach coordinate offset = index - index for(dim : dimension) remappedindex[dim] = offset[dim] ? [1] http://public.kitware.com/pipermail/insight-developers/2006-December/008806.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Apr 15 13:22:31 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 15 Apr 2015 13:22:31 -0400 Subject: [ITK-users] Smallest region containing the physical space covered by another image's region In-Reply-To: <552E4A24.8020606@creatis.insa-lyon.fr> References: <55279FAB.7060304@creatis.insa-lyon.fr> <552E4A24.8020606@creatis.insa-lyon.fr> Message-ID: Hi Cyril, Thanks for contributing the patch! I added a comments for some minor things on Gerrit. If it is more convenient to do the computations manually than use BoundingBox, that is fine. In terms of where to put it, the ImageRegion class may be a better spot than ImageBase since there already are the PadByRadius, ShrinkByRadius, and Crop methods. In terms of the name, perhaps EnlargeOverBox or similar may be better. This is not a Get method like other Get'ers, we avoid the passive 'ing verb, and Box or something similar indicates we have done the computation in physical space instead of index space, which "Region" may imply. Thanks, Matt On Wed, Apr 15, 2015 at 7:23 AM, Cyril Mory wrote: > Hi Matt, > > I have added such a method to itkImageBase, it is called > GetSmallestRegionContainingRegion. The patch is submitted on a branch with > the same name. I made my best, but I think it will require more improvements > than the previous one before it can get merged. > > In particular, I haven't used the itk::BoundingBox class, because from its > description it seems to handle only itk::Point. Should I convert indexes to > points, run the BoundingBox calculation, and convert back ? > > I'll wait for the comments > Cyril > > > On 04/13/2015 09:12 PM, Matt McCormick wrote: >> >> Hi Cyril, >> >>> I am preparing a patch for the itkWarpImageFilter, and I came to realize >>> that computing the requestedRegion of the inputs from the output's >>> requested >>> region is non trivial. >> >> Great job on the patch submission! :-) >> >> >>> - the displacement in the deformation field can be very large, in any >>> direction, ... therefore there is no choice but to load the full input >>> image >>> into memory (unless we want to go through the whole deformation field to >>> evaluate the maximum displacement, but in a method like >>> GenerateInputRequestedRegion we do not want such heavy processing) >>> => Input image's requested region should be the largest possible region >> >> Yes, this is a good assessment. >> >> >>> - the requested region in the deformation field, on the other hand, can >>> be >>> computed. But it is not trivial. If the output and the DF have identical >>> information (spacing, origin, direction), then the requested region in >>> the >>> DF should be copied from the output. If their information differs, >>> computing >>> the requested region would require a method to compute the smallest >>> rectangular region that contains the physical space covered by an other >>> image's region, the other image having (potentially) a different spacing, >>> origin and/or direction. Does such a method exist somewhere in ITK ? >> >> A possible approach here could transform all corner indexes of the >> output to physical space points, transform physical points to index >> space of the DF, and compute a bounding box of these index points. >> >> The methods to apply could be >> >> TransformIndexToPhysicalPoint >> TransformPhysicalPointToIndex >> >> on the ImageBase class and the itk::BoundingBox class. >> >> >> HTH, >> Matt > > From bakkari.abdelkhalek at hotmail.fr Wed Apr 15 16:51:36 2015 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek) Date: Wed, 15 Apr 2015 13:51:36 -0700 (MST) Subject: [ITK-users] Fuzzy c-means In-Reply-To: <1429093948659-7587171.post@n2.nabble.com> References: <9A3A873E68A0894089C335AA14CF7F803BF13B@FBCMST18V02.fbc.local> <9A3A873E68A0894089C335AA14CF7F803BF13D@FBCMST18V02.fbc.local> <1362958470227-7582528.post@n2.nabble.com> <1362999706304-7582532.post@n2.nabble.com> <1429093948659-7587171.post@n2.nabble.com> Message-ID: <1429131096828-7587176.post@n2.nabble.com> Hi Alberto, I tried with your code millions of times but still not working with Visual studio 2010 and ITK 4.0 as you told me about this configuration. Could you please help me to run this code. I need it for my state of the art of my PhD. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Fuzzy-c-means-tp4838130p7587176.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Wed Apr 15 20:37:14 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 15 Apr 2015 20:37:14 -0400 Subject: [ITK-users] Opportunities to share, discuss, design, and learn with other ITK community members Message-ID: There are a couple of upcoming opportunities to share, discuss, design, and learn with your fellow ITK community members. On Thursday (tomorrow), 1:00 PM Eastern USA time, there will be a Google+ Hangout where we will be doing code reviews: https://plus.google.com/u/1/events/chh04itdo3em787ufpcijut268k On Friday, 11:00 AM Eastern USA time, an ITK development conference, https://plus.google.com/u/1/events/cuio9b3tcelhir3so1nhtgjdm9k For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423 To get regular invites to these events, join the ITK Bar Camp G+ Community: https://plus.google.com/u/0/communities/111375098792764998322 All are welcome. Hope to talk to you then! From cyril.mory at creatis.insa-lyon.fr Thu Apr 16 05:03:26 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 16 Apr 2015 11:03:26 +0200 Subject: [ITK-users] Smallest region containing the physical space covered by another image's region In-Reply-To: References: <55279FAB.7060304@creatis.insa-lyon.fr> <552E4A24.8020606@creatis.insa-lyon.fr> Message-ID: <552F7ADE.9040909@creatis.insa-lyon.fr> Hi Matt, Thank you for your detailed comments. I fixed most of the issues you spotted and amended the patch. Unfortunately, I was unable to move the method to itkImageRegion: from there I could not use the itkImageBase methods TransformIndexToPhysicalPoint and TransformPhysicalPointToIndex. I am note familiar with forward declarations, friend classes and how they are meant to be used, so maybe it was possible indeed and I just did it wrong. Cyril On 04/15/2015 07:22 PM, Matt McCormick wrote: > Hi Cyril, > > Thanks for contributing the patch! > > I added a comments for some minor things on Gerrit. If it is more > convenient to do the computations manually than use BoundingBox, that > is fine. In terms of where to put it, the ImageRegion class may be a > better spot than ImageBase since there already are the PadByRadius, > ShrinkByRadius, and Crop methods. In terms of the name, perhaps > EnlargeOverBox or similar may be better. This is not a Get method like > other Get'ers, we avoid the passive 'ing verb, and Box or something > similar indicates we have done the computation in physical space > instead of index space, which "Region" may imply. > > Thanks, > Matt > > On Wed, Apr 15, 2015 at 7:23 AM, Cyril Mory > wrote: >> Hi Matt, >> >> I have added such a method to itkImageBase, it is called >> GetSmallestRegionContainingRegion. The patch is submitted on a branch with >> the same name. I made my best, but I think it will require more improvements >> than the previous one before it can get merged. >> >> In particular, I haven't used the itk::BoundingBox class, because from its >> description it seems to handle only itk::Point. Should I convert indexes to >> points, run the BoundingBox calculation, and convert back ? >> >> I'll wait for the comments >> Cyril >> >> >> On 04/13/2015 09:12 PM, Matt McCormick wrote: >>> Hi Cyril, >>> >>>> I am preparing a patch for the itkWarpImageFilter, and I came to realize >>>> that computing the requestedRegion of the inputs from the output's >>>> requested >>>> region is non trivial. >>> Great job on the patch submission! :-) >>> >>> >>>> - the displacement in the deformation field can be very large, in any >>>> direction, ... therefore there is no choice but to load the full input >>>> image >>>> into memory (unless we want to go through the whole deformation field to >>>> evaluate the maximum displacement, but in a method like >>>> GenerateInputRequestedRegion we do not want such heavy processing) >>>> => Input image's requested region should be the largest possible region >>> Yes, this is a good assessment. >>> >>> >>>> - the requested region in the deformation field, on the other hand, can >>>> be >>>> computed. But it is not trivial. If the output and the DF have identical >>>> information (spacing, origin, direction), then the requested region in >>>> the >>>> DF should be copied from the output. If their information differs, >>>> computing >>>> the requested region would require a method to compute the smallest >>>> rectangular region that contains the physical space covered by an other >>>> image's region, the other image having (potentially) a different spacing, >>>> origin and/or direction. Does such a method exist somewhere in ITK ? >>> A possible approach here could transform all corner indexes of the >>> output to physical space points, transform physical points to index >>> space of the DF, and compute a bounding box of these index points. >>> >>> The methods to apply could be >>> >>> TransformIndexToPhysicalPoint >>> TransformPhysicalPointToIndex >>> >>> on the ImageBase class and the itk::BoundingBox class. >>> >>> >>> HTH, >>> Matt >> From arnaudgelas at gmail.com Thu Apr 16 05:18:13 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 16 Apr 2015 11:18:13 +0200 Subject: [ITK-users] processing one LabelObject into one LabelMap? Message-ID: <34A2D7C5-C92A-4857-8FD7-3AE31CABA953@gmail.com> Hi all, I would like to be able to run one mini pipeline on one LabelObject of one given LabelMap (other LabelObjects would remain identical). I have found itk::ObjectByObjectLabelMapFilter which basically does it but for all LabelObjects? Is there such a filter in ITK? If not what would be the best approach to implement such a filter? Thanks in advance Best, Arnaud From arnaudgelas at gmail.com Thu Apr 16 07:07:14 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 16 Apr 2015 13:07:14 +0200 Subject: [ITK-users] processing one LabelObject into one LabelMap? In-Reply-To: <34A2D7C5-C92A-4857-8FD7-3AE31CABA953@gmail.com> References: <34A2D7C5-C92A-4857-8FD7-3AE31CABA953@gmail.com> Message-ID: <580E5E6B-FB6A-4EBA-B0BE-D5AF09DE4025@gmail.com> If this filter does not exist, please have a look at this patch http://review.source.kitware.com/#/c/19622/ thanks Arnaud > On 16 Apr 2015, at 11:18, Arnaud Gelas wrote: > > Hi all, > > I would like to be able to run one mini pipeline on one LabelObject of one given LabelMap (other LabelObjects would remain identical). > > I have found itk::ObjectByObjectLabelMapFilter which basically does it but for all LabelObjects? > > Is there such a filter in ITK? > If not what would be the best approach to implement such a filter? > > Thanks in advance > > Best, > Arnaud -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Thu Apr 16 07:37:01 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 16 Apr 2015 07:37:01 -0400 Subject: [ITK-users] processing one LabelObject into one LabelMap? In-Reply-To: <580E5E6B-FB6A-4EBA-B0BE-D5AF09DE4025@gmail.com> References: <34A2D7C5-C92A-4857-8FD7-3AE31CABA953@gmail.com> <580E5E6B-FB6A-4EBA-B0BE-D5AF09DE4025@gmail.com> Message-ID: <5A567AEB-EE2A-4C3B-86DA-91B32C624E30@mail.nih.gov> Arnaud, I believe there is a Label Map filter to select a label object and another to merge them. There are very efficient and on the complexity the number of object not the number of pixels. So you should be able to do something like: Select Object->Your Single Label Algorithm->Merge Them I know this is not an all in one filter, but it should be too hard to run a couple filters for your mini-pipeline. HTH, Brad On Apr 16, 2015, at 7:07 AM, Arnaud Gelas wrote: > If this filter does not exist, please have a look at this patch > > http://review.source.kitware.com/#/c/19622/ > > thanks > Arnaud > >> On 16 Apr 2015, at 11:18, Arnaud Gelas wrote: >> >> Hi all, >> >> I would like to be able to run one mini pipeline on one LabelObject of one given LabelMap (other LabelObjects would remain identical). >> >> I have found itk::ObjectByObjectLabelMapFilter which basically does it but for all LabelObjects? >> >> Is there such a filter in ITK? >> If not what would be the best approach to implement such a filter? >> >> Thanks in advance >> >> Best, >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lluna.nova at gmail.com Thu Apr 16 09:30:32 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Thu, 16 Apr 2015 15:30:32 +0200 Subject: [ITK-users] extracting each component of the GradientRecursiveGaussianImageFilter Message-ID: Hello all, The declaration of thefilter is template::RealType, TInputImage::ImageDimension >, TInputImage::ImageDimension >> In my case, ImageDimension = 3 So I have two questions. Question number 1: Does the output image hold, for each pixel, the three derivatives? Can they be accessed by it.Get()[0] it.Get()[1] it.Get()[2] where it is itk::ImageRegionIterator< GradientImageType > it( gradientImage, gradientImage->GetRequestedRegion() ); ? Question number 2: (just for curiosity) what happens when TOutputImage = Image< PixelType, Dimension> ? and what happens when you create a writer with the default TOutputImage and write to disk? Do the derivatives end in different channels or a magnitude is computed? -------------- next part -------------- An HTML attachment was scrubbed... URL: From kishoreraom at gmail.com Thu Apr 16 10:57:30 2015 From: kishoreraom at gmail.com (Kishore Mosaliganti) Date: Thu, 16 Apr 2015 10:57:30 -0400 Subject: [ITK-users] fast marching minimal path extraction Message-ID: Hi all, Is the code in the fast marching minimal path extraction publication integrated into the ITK 4.8 toolkit: http://www.insight-journal.org/browse/publication/213 If not, the downloaded code does not compile with ITK 4.8. I was going to fix it but just checking if a patch/update exists somewhere? Kishore -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnaudgelas at gmail.com Thu Apr 16 10:59:48 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Thu, 16 Apr 2015 16:59:48 +0200 Subject: [ITK-users] fast marching minimal path extraction In-Reply-To: References: Message-ID: Hi Kishore, Yes, it has been integrated by the means of remote module, you only need to turn ON the appropriate option at CMake time https://github.com/Kitware/ITK/commit/da17ae4d4955bb92d5259c6ac47bfce6c474be18 Cheers, Arnaud > On 16 Apr 2015, at 16:57, Kishore Mosaliganti wrote: > > Hi all, > > Is the code in the fast marching minimal path extraction publication integrated into the ITK 4.8 toolkit: > http://www.insight-journal.org/browse/publication/213 > > If not, the downloaded code does not compile with ITK 4.8. I was going to fix it but just checking if a patch/update exists somewhere? > > Kishore > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 kishoreraom at gmail.com Thu Apr 16 11:01:03 2015 From: kishoreraom at gmail.com (Kishore Mosaliganti) Date: Thu, 16 Apr 2015 11:01:03 -0400 Subject: [ITK-users] fast marching minimal path extraction In-Reply-To: References: Message-ID: Thank you Arnaud! Kishore On Thu, Apr 16, 2015 at 10:59 AM, Arnaud Gelas wrote: > Hi Kishore, > > Yes, it has been integrated by the means of remote module, you only need > to turn ON the appropriate option at CMake time > > > https://github.com/Kitware/ITK/commit/da17ae4d4955bb92d5259c6ac47bfce6c474be18 > > Cheers, > Arnaud > > On 16 Apr 2015, at 16:57, Kishore Mosaliganti > wrote: > > Hi all, > > Is the code in the fast marching minimal path extraction publication > integrated into the ITK 4.8 toolkit: > http://www.insight-journal.org/browse/publication/213 > > If not, the downloaded code does not compile with ITK 4.8. I was going to > fix it but just checking if a patch/update exists somewhere? > > Kishore > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 matt.mccormick at kitware.com Thu Apr 16 11:18:25 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 16 Apr 2015 11:18:25 -0400 Subject: [ITK-users] Smallest region containing the physical space covered by another image's region In-Reply-To: <552F7ADE.9040909@creatis.insa-lyon.fr> References: <55279FAB.7060304@creatis.insa-lyon.fr> <552E4A24.8020606@creatis.insa-lyon.fr> <552F7ADE.9040909@creatis.insa-lyon.fr> Message-ID: Hi Cyril, Excellent, thanks for the update! Yes, avoiding the circular dependency between ImageBase and ImageRegion could be tricky. Please push what you have. I may take a shot at getting around the circular dependency. Thanks, Matt On Thu, Apr 16, 2015 at 5:03 AM, Cyril Mory wrote: > Hi Matt, > > Thank you for your detailed comments. I fixed most of the issues you spotted > and amended the patch. Unfortunately, I was unable to move the method to > itkImageRegion: from there I could not use the itkImageBase methods > TransformIndexToPhysicalPoint and TransformPhysicalPointToIndex. > > I am note familiar with forward declarations, friend classes and how they > are meant to be used, so maybe it was possible indeed and I just did it > wrong. > > Cyril > > > On 04/15/2015 07:22 PM, Matt McCormick wrote: >> >> Hi Cyril, >> >> Thanks for contributing the patch! >> >> I added a comments for some minor things on Gerrit. If it is more >> convenient to do the computations manually than use BoundingBox, that >> is fine. In terms of where to put it, the ImageRegion class may be a >> better spot than ImageBase since there already are the PadByRadius, >> ShrinkByRadius, and Crop methods. In terms of the name, perhaps >> EnlargeOverBox or similar may be better. This is not a Get method like >> other Get'ers, we avoid the passive 'ing verb, and Box or something >> similar indicates we have done the computation in physical space >> instead of index space, which "Region" may imply. >> >> Thanks, >> Matt >> >> On Wed, Apr 15, 2015 at 7:23 AM, Cyril Mory >> wrote: >>> >>> Hi Matt, >>> >>> I have added such a method to itkImageBase, it is called >>> GetSmallestRegionContainingRegion. The patch is submitted on a branch >>> with >>> the same name. I made my best, but I think it will require more >>> improvements >>> than the previous one before it can get merged. >>> >>> In particular, I haven't used the itk::BoundingBox class, because from >>> its >>> description it seems to handle only itk::Point. Should I convert indexes >>> to >>> points, run the BoundingBox calculation, and convert back ? >>> >>> I'll wait for the comments >>> Cyril >>> >>> >>> On 04/13/2015 09:12 PM, Matt McCormick wrote: >>>> >>>> Hi Cyril, >>>> >>>>> I am preparing a patch for the itkWarpImageFilter, and I came to >>>>> realize >>>>> that computing the requestedRegion of the inputs from the output's >>>>> requested >>>>> region is non trivial. >>>> >>>> Great job on the patch submission! :-) >>>> >>>> >>>>> - the displacement in the deformation field can be very large, in any >>>>> direction, ... therefore there is no choice but to load the full input >>>>> image >>>>> into memory (unless we want to go through the whole deformation field >>>>> to >>>>> evaluate the maximum displacement, but in a method like >>>>> GenerateInputRequestedRegion we do not want such heavy processing) >>>>> => Input image's requested region should be the largest possible region >>>> >>>> Yes, this is a good assessment. >>>> >>>> >>>>> - the requested region in the deformation field, on the other hand, can >>>>> be >>>>> computed. But it is not trivial. If the output and the DF have >>>>> identical >>>>> information (spacing, origin, direction), then the requested region in >>>>> the >>>>> DF should be copied from the output. If their information differs, >>>>> computing >>>>> the requested region would require a method to compute the smallest >>>>> rectangular region that contains the physical space covered by an other >>>>> image's region, the other image having (potentially) a different >>>>> spacing, >>>>> origin and/or direction. Does such a method exist somewhere in ITK ? >>>> >>>> A possible approach here could transform all corner indexes of the >>>> output to physical space points, transform physical points to index >>>> space of the DF, and compute a bounding box of these index points. >>>> >>>> The methods to apply could be >>>> >>>> TransformIndexToPhysicalPoint >>>> TransformPhysicalPointToIndex >>>> >>>> on the ImageBase class and the itk::BoundingBox class. >>>> >>>> >>>> HTH, >>>> Matt >>> >>> > From blowekamp at mail.nih.gov Thu Apr 16 12:53:52 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 16 Apr 2015 12:53:52 -0400 Subject: [ITK-users] fast marching minimal path extraction In-Reply-To: References: Message-ID: <58518126-4A6D-4C9A-AED9-2DD56F0A5DB3@mail.nih.gov> That's get! I don't think we have any nightly builds for that remote module. I'll add one for linux. Brad On Apr 16, 2015, at 10:59 AM, Arnaud Gelas wrote: > Hi Kishore, > > Yes, it has been integrated by the means of remote module, you only need to turn ON the appropriate option at CMake time > > https://github.com/Kitware/ITK/commit/da17ae4d4955bb92d5259c6ac47bfce6c474be18 > > Cheers, > Arnaud > >> On 16 Apr 2015, at 16:57, Kishore Mosaliganti wrote: >> >> Hi all, >> >> Is the code in the fast marching minimal path extraction publication integrated into the ITK 4.8 toolkit: >> http://www.insight-journal.org/browse/publication/213 >> >> If not, the downloaded code does not compile with ITK 4.8. I was going to fix it but just checking if a patch/update exists somewhere? >> >> Kishore >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Fri Apr 17 05:08:50 2015 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Fri, 17 Apr 2015 11:08:50 +0200 Subject: [ITK-users] why can the itkStatisticsImageFilter not stream? Message-ID: <5530CDA2.6050603@mh-hannover.de> Dear mailing list members, I'm wondering why the itkStatisticsImageFilter cannot stream? Looking into itkStatisticsImageFilter.hxx it requests the whole input in GenerateInputRequestedRegion and EnlargeOutputRequestedRegion but in ThreadedGenerateData only iterates over the outputRegionForThread. Where in the code is the whole input image needed as one single block? Thanks for any 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-2900 From arnaudgelas at gmail.com Fri Apr 17 06:09:23 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Fri, 17 Apr 2015 12:09:23 +0200 Subject: [ITK-users] Region of two labelObjects In-Reply-To: References: Message-ID: Hi Pol, I am extremely interested in this change!!! Do you have any idea when you think you could submit a patch for it? thanks, Arnaud On Fri, Apr 3, 2015 at 6:44 PM, Pol Mons? Purt? wrote: > Thanks Matt, > > I've set the Git and Gerrit access. I believe everything's ok. I'll get to > it next Tuesday. > > Cheers, > > Pol > > 2015-04-02 15:22 GMT+02:00 Matt McCormick : > >> Hi Pol, >> >> Thanks for considering make improvements to this code. Instructions >> to submit a patch can be found here [1]. Please let us know if you >> have any questions. >> >> Thanks, >> Matt >> >> [1] >> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html >> >> On Thu, Apr 2, 2015 at 8:52 AM, Pol Mons? Purt? >> wrote: >> > Hello Ga?tan, >> > >> > Yes I agree, Thinking about it later I also reached the same conclusion >> that >> > a filter that changes the regions internally without warning could be a >> > pitfall. >> > >> > The RegionFromReferenceLabelMapFilter might actually work for me given >> that >> > I do have the original ROI region and roi image, but I can implement the >> > ComputeBoundingBox() function anyway, it's cleaner if I don't use the >> > original ROI. >> > >> > What's the workflow for submitting code? Fork the itk repository, add >> the >> > method and PR or something else? >> > >> > If you'd rather have a filter that does this, I unfortunatelly won't >> have >> > the time to do it this month (and maybe next)... >> > >> > Cheers, >> > >> > Pol >> > >> > >> > >> > 2015-04-02 14:32 GMT+02:00 Gaetan Lehmann : >> >> >> >> Hi Pol, >> >> >> >> 2015-03-30 23:02 GMT+02:00 Pol Mons? Purt? : >> >>> >> >>> >> >>> Hello all, >> >>> >> >>> I have two label objects, how can I merge the two BoundingBoxes >> together >> >>> so I know the necessary size of the image? (other than creating it >> myself by >> >>> searching max/min of each dimension) >> >>> >> >>> How come LabelMap doesn't resize automatically when objects are >> added? It >> >>> could. >> >> >> >> >> >> The LabelMap class was designed to work as much as possible as the >> Image >> >> class, that does not have this kind of behavior, and to avoid as much >> as >> >> possible the costly operations. >> >> >> >> So while I don't think this should be done automatically, we should >> have >> >> some methods or filters to make this easy to do. >> >> >> >> There are a few filters to manipulate the regions of a LabelMap, but >> none >> >> of them does exactly what you need: >> >> >> >> * PadLabelMapFilter that can enlarge the LabelMap region, but not >> based on >> >> its content >> >> * CropLabelMapFilter that can shrink the LabelMap region, but not >> based on >> >> its content >> >> * RegionFromReferenceLabelMapFilter that makes the LabelMap region >> match >> >> the region of a reference input image >> >> * AutoCropLabelMapFilter that reduce the region covered by a label map >> >> based on its content, but can't enlarge it >> >> >> >> In my opinion, we should have a ComputeBoundingBox() method in LabelMap >> >> that compute the region covered by all the label objects - the code >> can be >> >> moved from AutoCropLabelMapFilter. We could then do >> >> >> >> labelMap->AddLabelObject(labelObject1); >> >> labelMap->AddLabelObject(labelObject2); >> >> labelMap->SetRegions(labelMap->ComputeBoundingBox()); >> >> >> >> to update the region. >> >> >> >> Would you agree to implement such a method for the LabelMap class? >> >> >> >> Optionally, we could also think to a filter to do that in a pipeline. >> >> >> >> Regards, >> >> >> >> Ga?tan >> >> >> > >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lluna.nova at gmail.com Fri Apr 17 06:52:38 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Fri, 17 Apr 2015 12:52:38 +0200 Subject: [ITK-users] How do I create ITK images inside a loop? Message-ID: Hello all, How can I create n images inside a for loop? The smart pointer would go out of scope. How could I use a container? Cheers, Pol -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Apr 17 07:14:42 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 17 Apr 2015 07:14:42 -0400 Subject: [ITK-users] why can the itkStatisticsImageFilter not stream? In-Reply-To: <5530CDA2.6050603@mh-hannover.de> References: <5530CDA2.6050603@mh-hannover.de> Message-ID: <9FFA219D-8E98-4524-9E59-3164AF8DE0DD@mail.nih.gov> Hello fellow mailing list member, Currently in ITK there are two base classes for streaming images in ITK. The ImageToImageFilter provide the framework of streaming one input region to one output region. The other is the StreamingImageFilter which provides the framework to stream multiple image regions and merge them together into a single output image. This StatisticsImageFilter needs a framework which consumes multiple input image regions and reduces the data produced. I happen to have implemented such a framework here [1]. It currently has the LabelStatisticsImageFilter implemented in a streaming fashion. Let me give it a try and see how quickly I can get the StatisticsImageFilter in this framework. Help writing tests would be appreciated. Thanks, Brad [1] https://github.com/blowekamp/itkStreamingSinc On Apr 17, 2015, at 5:08 AM, Dr. Roman Grothausmann wrote: > Dear mailing list members, > > > I'm wondering why the itkStatisticsImageFilter cannot stream? > Looking into itkStatisticsImageFilter.hxx it requests the whole input in GenerateInputRequestedRegion and EnlargeOutputRequestedRegion but in ThreadedGenerateData only iterates over the outputRegionForThread. > Where in the code is the whole input image needed as one single block? > > Thanks for any 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-2900 > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From lluna.nova at gmail.com Fri Apr 17 08:24:20 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Fri, 17 Apr 2015 14:24:20 +0200 Subject: [ITK-users] Region of two labelObjects In-Reply-To: References: Message-ID: Yes sorry I had to pospone it because of an stressful deadline I have, but hopefully next week, two tops. 2015-04-17 12:09 GMT+02:00 Arnaud Gelas : > Hi Pol, > > I am extremely interested in this change!!! > Do you have any idea when you think you could submit a patch for it? > > thanks, > Arnaud > > On Fri, Apr 3, 2015 at 6:44 PM, Pol Mons? Purt? > wrote: > >> Thanks Matt, >> >> I've set the Git and Gerrit access. I believe everything's ok. I'll get >> to it next Tuesday. >> >> Cheers, >> >> Pol >> >> 2015-04-02 15:22 GMT+02:00 Matt McCormick : >> >>> Hi Pol, >>> >>> Thanks for considering make improvements to this code. Instructions >>> to submit a patch can be found here [1]. Please let us know if you >>> have any questions. >>> >>> Thanks, >>> Matt >>> >>> [1] >>> https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html >>> >>> On Thu, Apr 2, 2015 at 8:52 AM, Pol Mons? Purt? >>> wrote: >>> > Hello Ga?tan, >>> > >>> > Yes I agree, Thinking about it later I also reached the same >>> conclusion that >>> > a filter that changes the regions internally without warning could be a >>> > pitfall. >>> > >>> > The RegionFromReferenceLabelMapFilter might actually work for me given >>> that >>> > I do have the original ROI region and roi image, but I can implement >>> the >>> > ComputeBoundingBox() function anyway, it's cleaner if I don't use the >>> > original ROI. >>> > >>> > What's the workflow for submitting code? Fork the itk repository, add >>> the >>> > method and PR or something else? >>> > >>> > If you'd rather have a filter that does this, I unfortunatelly won't >>> have >>> > the time to do it this month (and maybe next)... >>> > >>> > Cheers, >>> > >>> > Pol >>> > >>> > >>> > >>> > 2015-04-02 14:32 GMT+02:00 Gaetan Lehmann : >>> >> >>> >> Hi Pol, >>> >> >>> >> 2015-03-30 23:02 GMT+02:00 Pol Mons? Purt? : >>> >>> >>> >>> >>> >>> Hello all, >>> >>> >>> >>> I have two label objects, how can I merge the two BoundingBoxes >>> together >>> >>> so I know the necessary size of the image? (other than creating it >>> myself by >>> >>> searching max/min of each dimension) >>> >>> >>> >>> How come LabelMap doesn't resize automatically when objects are >>> added? It >>> >>> could. >>> >> >>> >> >>> >> The LabelMap class was designed to work as much as possible as the >>> Image >>> >> class, that does not have this kind of behavior, and to avoid as much >>> as >>> >> possible the costly operations. >>> >> >>> >> So while I don't think this should be done automatically, we should >>> have >>> >> some methods or filters to make this easy to do. >>> >> >>> >> There are a few filters to manipulate the regions of a LabelMap, but >>> none >>> >> of them does exactly what you need: >>> >> >>> >> * PadLabelMapFilter that can enlarge the LabelMap region, but not >>> based on >>> >> its content >>> >> * CropLabelMapFilter that can shrink the LabelMap region, but not >>> based on >>> >> its content >>> >> * RegionFromReferenceLabelMapFilter that makes the LabelMap region >>> match >>> >> the region of a reference input image >>> >> * AutoCropLabelMapFilter that reduce the region covered by a label map >>> >> based on its content, but can't enlarge it >>> >> >>> >> In my opinion, we should have a ComputeBoundingBox() method in >>> LabelMap >>> >> that compute the region covered by all the label objects - the code >>> can be >>> >> moved from AutoCropLabelMapFilter. We could then do >>> >> >>> >> labelMap->AddLabelObject(labelObject1); >>> >> labelMap->AddLabelObject(labelObject2); >>> >> labelMap->SetRegions(labelMap->ComputeBoundingBox()); >>> >> >>> >> to update the region. >>> >> >>> >> Would you agree to implement such a method for the LabelMap class? >>> >> >>> >> Optionally, we could also think to a filter to do that in a pipeline. >>> >> >>> >> Regards, >>> >> >>> >> Ga?tan >>> >> >>> > >>> > >>> > >>> > _____________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Kitware offers ITK Training Courses, for more information visit: >>> > http://www.kitware.com/products/protraining.php >>> > >>> > Please keep messages on-topic and check the ITK FAQ at: >>> > http://www.itk.org/Wiki/ITK_FAQ >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/insight-users >>> > >>> >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnaudgelas at gmail.com Fri Apr 17 08:47:04 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Fri, 17 Apr 2015 14:47:04 +0200 Subject: [ITK-users] Region of two labelObjects In-Reply-To: References: Message-ID: <13424006-AC9F-454F-9F95-9F94EEF5FBC3@gmail.com> More precisely, I?d be really interested in having a BoundingBox or Region for each LabelObject by using one method (I do not really need to maintain it), and then it can be directly be deduced form each LabelObject. If that?s ok with you, early next week I could add one method to the LabelObject to get such information (?), then you can still work main features you need. Arnaud > On 17 Apr 2015, at 14:24, Pol Mons? Purt? wrote: > > Yes sorry I had to pospone it because of an stressful deadline I have, but hopefully next week, two tops. > > 2015-04-17 12:09 GMT+02:00 Arnaud Gelas >: > Hi Pol, > > I am extremely interested in this change!!! > Do you have any idea when you think you could submit a patch for it? > > thanks, > Arnaud > > On Fri, Apr 3, 2015 at 6:44 PM, Pol Mons? Purt? > wrote: > Thanks Matt, > > I've set the Git and Gerrit access. I believe everything's ok. I'll get to it next Tuesday. > > Cheers, > > Pol > > 2015-04-02 15:22 GMT+02:00 Matt McCormick >: > Hi Pol, > > Thanks for considering make improvements to this code. Instructions > to submit a patch can be found here [1]. Please let us know if you > have any questions. > > Thanks, > Matt > > [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html > > On Thu, Apr 2, 2015 at 8:52 AM, Pol Mons? Purt? > wrote: > > Hello Ga?tan, > > > > Yes I agree, Thinking about it later I also reached the same conclusion that > > a filter that changes the regions internally without warning could be a > > pitfall. > > > > The RegionFromReferenceLabelMapFilter might actually work for me given that > > I do have the original ROI region and roi image, but I can implement the > > ComputeBoundingBox() function anyway, it's cleaner if I don't use the > > original ROI. > > > > What's the workflow for submitting code? Fork the itk repository, add the > > method and PR or something else? > > > > If you'd rather have a filter that does this, I unfortunatelly won't have > > the time to do it this month (and maybe next)... > > > > Cheers, > > > > Pol > > > > > > > > 2015-04-02 14:32 GMT+02:00 Gaetan Lehmann >: > >> > >> Hi Pol, > >> > >> 2015-03-30 23:02 GMT+02:00 Pol Mons? Purt? >: > >>> > >>> > >>> Hello all, > >>> > >>> I have two label objects, how can I merge the two BoundingBoxes together > >>> so I know the necessary size of the image? (other than creating it myself by > >>> searching max/min of each dimension) > >>> > >>> How come LabelMap doesn't resize automatically when objects are added? It > >>> could. > >> > >> > >> The LabelMap class was designed to work as much as possible as the Image > >> class, that does not have this kind of behavior, and to avoid as much as > >> possible the costly operations. > >> > >> So while I don't think this should be done automatically, we should have > >> some methods or filters to make this easy to do. > >> > >> There are a few filters to manipulate the regions of a LabelMap, but none > >> of them does exactly what you need: > >> > >> * PadLabelMapFilter that can enlarge the LabelMap region, but not based on > >> its content > >> * CropLabelMapFilter that can shrink the LabelMap region, but not based on > >> its content > >> * RegionFromReferenceLabelMapFilter that makes the LabelMap region match > >> the region of a reference input image > >> * AutoCropLabelMapFilter that reduce the region covered by a label map > >> based on its content, but can't enlarge it > >> > >> In my opinion, we should have a ComputeBoundingBox() method in LabelMap > >> that compute the region covered by all the label objects - the code can be > >> moved from AutoCropLabelMapFilter. We could then do > >> > >> labelMap->AddLabelObject(labelObject1); > >> labelMap->AddLabelObject(labelObject2); > >> labelMap->SetRegions(labelMap->ComputeBoundingBox()); > >> > >> to update the region. > >> > >> Would you agree to implement such a method for the LabelMap class? > >> > >> Optionally, we could also think to a filter to do that in a pipeline. > >> > >> Regards, > >> > >> Ga?tan > >> > > > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Fri Apr 17 09:02:41 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Fri, 17 Apr 2015 15:02:41 +0200 Subject: [ITK-users] Classification from a training text file Message-ID: Hi. I have a text file made up of N rows and M columns. Each row represents a measurement of M features, that is, Weka-styled. I could add a last column with the class of every measurement but it is optional. I've been havinig a look at the ITK classification classes (Bayesian, k-means, etc.), but they receive an image as input (e.g. a vector image). I'd like to know what is the best way, in my case, to perform the classification of the measurements stored in my training text file. Thank you very much in advance. My best regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Apr 17 09:04:39 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 17 Apr 2015 09:04:39 -0400 Subject: [ITK-users] Region of two labelObjects In-Reply-To: <13424006-AC9F-454F-9F95-9F94EEF5FBC3@gmail.com> References: <13424006-AC9F-454F-9F95-9F94EEF5FBC3@gmail.com> Message-ID: Hi, So essentially you are talking about moving some computational code from the ShapeLabelMapFilter [1] into the LabelObject class? As there is already an ShapeLabelObject::GetBoundingBox method perhaps the naming of LabelObject::ComputeBoundingBox would be appropriate? In general the design of the LabelMap frame work should be considered. Currently, it's a very pipeline focus approach, where all the LabelMap attributes are computed as in filters. This is different than other label statistics frameworks where the the attributes are computed on demand when needed. It's a slippery slope to add procedural computational methods one by one to classes. One option to consider to to refactor the code which calculates attributes in the ShapeLabelMapFilter and StatisticsLabelMapFilter in to a type of Calculator support class? So that the same code can be reused by multiple filters and procedural methods? Just a thought, HTH, Brad [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx#L272-L283 On Apr 17, 2015, at 8:47 AM, Arnaud Gelas wrote: > More precisely, I?d be really interested in having a BoundingBox or Region for each LabelObject by using one method (I do not really need to maintain it), and then it can be directly be deduced form each LabelObject. > > If that?s ok with you, early next week I could add one method to the LabelObject to get such information (?), then you can still work main features you need. > > Arnaud > >> On 17 Apr 2015, at 14:24, Pol Mons? Purt? wrote: >> >> Yes sorry I had to pospone it because of an stressful deadline I have, but hopefully next week, two tops. >> >> 2015-04-17 12:09 GMT+02:00 Arnaud Gelas : >> Hi Pol, >> >> I am extremely interested in this change!!! >> Do you have any idea when you think you could submit a patch for it? >> >> thanks, >> Arnaud >> >> On Fri, Apr 3, 2015 at 6:44 PM, Pol Mons? Purt? wrote: >> Thanks Matt, >> >> I've set the Git and Gerrit access. I believe everything's ok. I'll get to it next Tuesday. >> >> Cheers, >> >> Pol >> >> 2015-04-02 15:22 GMT+02:00 Matt McCormick : >> Hi Pol, >> >> Thanks for considering make improvements to this code. Instructions >> to submit a patch can be found here [1]. Please let us know if you >> have any questions. >> >> Thanks, >> Matt >> >> [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html >> >> On Thu, Apr 2, 2015 at 8:52 AM, Pol Mons? Purt? wrote: >> > Hello Ga?tan, >> > >> > Yes I agree, Thinking about it later I also reached the same conclusion that >> > a filter that changes the regions internally without warning could be a >> > pitfall. >> > >> > The RegionFromReferenceLabelMapFilter might actually work for me given that >> > I do have the original ROI region and roi image, but I can implement the >> > ComputeBoundingBox() function anyway, it's cleaner if I don't use the >> > original ROI. >> > >> > What's the workflow for submitting code? Fork the itk repository, add the >> > method and PR or something else? >> > >> > If you'd rather have a filter that does this, I unfortunatelly won't have >> > the time to do it this month (and maybe next)... >> > >> > Cheers, >> > >> > Pol >> > >> > >> > >> > 2015-04-02 14:32 GMT+02:00 Gaetan Lehmann : >> >> >> >> Hi Pol, >> >> >> >> 2015-03-30 23:02 GMT+02:00 Pol Mons? Purt? : >> >>> >> >>> >> >>> Hello all, >> >>> >> >>> I have two label objects, how can I merge the two BoundingBoxes together >> >>> so I know the necessary size of the image? (other than creating it myself by >> >>> searching max/min of each dimension) >> >>> >> >>> How come LabelMap doesn't resize automatically when objects are added? It >> >>> could. >> >> >> >> >> >> The LabelMap class was designed to work as much as possible as the Image >> >> class, that does not have this kind of behavior, and to avoid as much as >> >> possible the costly operations. >> >> >> >> So while I don't think this should be done automatically, we should have >> >> some methods or filters to make this easy to do. >> >> >> >> There are a few filters to manipulate the regions of a LabelMap, but none >> >> of them does exactly what you need: >> >> >> >> * PadLabelMapFilter that can enlarge the LabelMap region, but not based on >> >> its content >> >> * CropLabelMapFilter that can shrink the LabelMap region, but not based on >> >> its content >> >> * RegionFromReferenceLabelMapFilter that makes the LabelMap region match >> >> the region of a reference input image >> >> * AutoCropLabelMapFilter that reduce the region covered by a label map >> >> based on its content, but can't enlarge it >> >> >> >> In my opinion, we should have a ComputeBoundingBox() method in LabelMap >> >> that compute the region covered by all the label objects - the code can be >> >> moved from AutoCropLabelMapFilter. We could then do >> >> >> >> labelMap->AddLabelObject(labelObject1); >> >> labelMap->AddLabelObject(labelObject2); >> >> labelMap->SetRegions(labelMap->ComputeBoundingBox()); >> >> >> >> to update the region. >> >> >> >> Would you agree to implement such a method for the LabelMap class? >> >> >> >> Optionally, we could also think to a filter to do that in a pipeline. >> >> >> >> Regards, >> >> >> >> Ga?tan >> >> >> > >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnaudgelas at gmail.com Fri Apr 17 09:24:59 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Fri, 17 Apr 2015 15:24:59 +0200 Subject: [ITK-users] Region of two labelObjects In-Reply-To: References: <13424006-AC9F-454F-9F95-9F94EEF5FBC3@gmail.com> Message-ID: <6AC30E89-26E8-4159-A14A-4332AF63100A@gmail.com> Hi Brad, It is an excellent idea to extract attributes calculation from Shape/StatisticsLabelMapFilter to be able to reuse it. I can give a hand on this effort, but to be honest I have really high interest on the bounding box / region and can work this one out from early next week. Arnaud > On 17 Apr 2015, at 15:04, Bradley Lowekamp wrote: > > Hi, > > So essentially you are talking about moving some computational code from the ShapeLabelMapFilter [1] into the LabelObject class? As there is already an ShapeLabelObject::GetBoundingBox method perhaps the naming of LabelObject::ComputeBoundingBox would be appropriate? > > In general the design of the LabelMap frame work should be considered. Currently, it's a very pipeline focus approach, where all the LabelMap attributes are computed as in filters. This is different than other label statistics frameworks where the the attributes are computed on demand when needed. It's a slippery slope to add procedural computational methods one by one to classes. > > One option to consider to to refactor the code which calculates attributes in the ShapeLabelMapFilter and StatisticsLabelMapFilter in to a type of Calculator support class? So that the same code can be reused by multiple filters and procedural methods? > > Just a thought, > HTH, > Brad > > [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx#L272-L283 > > On Apr 17, 2015, at 8:47 AM, Arnaud Gelas > wrote: > >> More precisely, I?d be really interested in having a BoundingBox or Region for each LabelObject by using one method (I do not really need to maintain it), and then it can be directly be deduced form each LabelObject. >> >> If that?s ok with you, early next week I could add one method to the LabelObject to get such information (?), then you can still work main features you need. >> >> Arnaud >> >>> On 17 Apr 2015, at 14:24, Pol Mons? Purt? > wrote: >>> >>> Yes sorry I had to pospone it because of an stressful deadline I have, but hopefully next week, two tops. >>> >>> 2015-04-17 12:09 GMT+02:00 Arnaud Gelas >: >>> Hi Pol, >>> >>> I am extremely interested in this change!!! >>> Do you have any idea when you think you could submit a patch for it? >>> >>> thanks, >>> Arnaud >>> >>> On Fri, Apr 3, 2015 at 6:44 PM, Pol Mons? Purt? > wrote: >>> Thanks Matt, >>> >>> I've set the Git and Gerrit access. I believe everything's ok. I'll get to it next Tuesday. >>> >>> Cheers, >>> >>> Pol >>> >>> 2015-04-02 15:22 GMT+02:00 Matt McCormick >: >>> Hi Pol, >>> >>> Thanks for considering make improvements to this code. Instructions >>> to submit a patch can be found here [1]. Please let us know if you >>> have any questions. >>> >>> Thanks, >>> Matt >>> >>> [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html >>> >>> On Thu, Apr 2, 2015 at 8:52 AM, Pol Mons? Purt? > wrote: >>> > Hello Ga?tan, >>> > >>> > Yes I agree, Thinking about it later I also reached the same conclusion that >>> > a filter that changes the regions internally without warning could be a >>> > pitfall. >>> > >>> > The RegionFromReferenceLabelMapFilter might actually work for me given that >>> > I do have the original ROI region and roi image, but I can implement the >>> > ComputeBoundingBox() function anyway, it's cleaner if I don't use the >>> > original ROI. >>> > >>> > What's the workflow for submitting code? Fork the itk repository, add the >>> > method and PR or something else? >>> > >>> > If you'd rather have a filter that does this, I unfortunatelly won't have >>> > the time to do it this month (and maybe next)... >>> > >>> > Cheers, >>> > >>> > Pol >>> > >>> > >>> > >>> > 2015-04-02 14:32 GMT+02:00 Gaetan Lehmann >: >>> >> >>> >> Hi Pol, >>> >> >>> >> 2015-03-30 23:02 GMT+02:00 Pol Mons? Purt? >: >>> >>> >>> >>> >>> >>> Hello all, >>> >>> >>> >>> I have two label objects, how can I merge the two BoundingBoxes together >>> >>> so I know the necessary size of the image? (other than creating it myself by >>> >>> searching max/min of each dimension) >>> >>> >>> >>> How come LabelMap doesn't resize automatically when objects are added? It >>> >>> could. >>> >> >>> >> >>> >> The LabelMap class was designed to work as much as possible as the Image >>> >> class, that does not have this kind of behavior, and to avoid as much as >>> >> possible the costly operations. >>> >> >>> >> So while I don't think this should be done automatically, we should have >>> >> some methods or filters to make this easy to do. >>> >> >>> >> There are a few filters to manipulate the regions of a LabelMap, but none >>> >> of them does exactly what you need: >>> >> >>> >> * PadLabelMapFilter that can enlarge the LabelMap region, but not based on >>> >> its content >>> >> * CropLabelMapFilter that can shrink the LabelMap region, but not based on >>> >> its content >>> >> * RegionFromReferenceLabelMapFilter that makes the LabelMap region match >>> >> the region of a reference input image >>> >> * AutoCropLabelMapFilter that reduce the region covered by a label map >>> >> based on its content, but can't enlarge it >>> >> >>> >> In my opinion, we should have a ComputeBoundingBox() method in LabelMap >>> >> that compute the region covered by all the label objects - the code can be >>> >> moved from AutoCropLabelMapFilter. We could then do >>> >> >>> >> labelMap->AddLabelObject(labelObject1); >>> >> labelMap->AddLabelObject(labelObject2); >>> >> labelMap->SetRegions(labelMap->ComputeBoundingBox()); >>> >> >>> >> to update the region. >>> >> >>> >> Would you agree to implement such a method for the LabelMap class? >>> >> >>> >> Optionally, we could also think to a filter to do that in a pipeline. >>> >> >>> >> Regards, >>> >> >>> >> Ga?tan >>> >> >>> > >>> > >>> > >>> > _____________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Kitware offers ITK Training Courses, for more information visit: >>> > http://www.kitware.com/products/protraining.php >>> > >>> > Please keep messages on-topic and check the ITK FAQ at: >>> > http://www.itk.org/Wiki/ITK_FAQ >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/insight-users >>> > >>> >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >>> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Apr 17 09:47:06 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 17 Apr 2015 09:47:06 -0400 Subject: [ITK-users] why can the itkStatisticsImageFilter not stream? In-Reply-To: <9FFA219D-8E98-4524-9E59-3164AF8DE0DD@mail.nih.gov> References: <5530CDA2.6050603@mh-hannover.de> <9FFA219D-8E98-4524-9E59-3164AF8DE0DD@mail.nih.gov> Message-ID: <9D3D6598-4AB3-4DD0-81EC-81CB3C8F3BBB@mail.nih.gov> Hi, I was able to easy update a the StatisticsImageFilter to use my streaming base class for reduction algorithms [1]. It runs basically the same expect that you can set the number of stream divisions[2], there is the potential for setting the way the input image is split via the RegionSplitter in a base class [3]. You should be able to just clone the repository into you ITK/Modules/External directory, then enable it in the CMake configuration to use. Please let me know if it works for you. This should help :) Brad [1] https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkStreamingStatisticsImageFilter.h [2] https://github.com/blowekamp/itkStreamingSinc/blob/master/test/itkStreamingStatisticsImageFilterTest2.cxx#L61 [3] https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkImageSinc.h#L99 On Apr 17, 2015, at 7:14 AM, Bradley Lowekamp wrote: > Hello fellow mailing list member, > > Currently in ITK there are two base classes for streaming images in ITK. The ImageToImageFilter provide the framework of streaming one input region to one output region. The other is the StreamingImageFilter which provides the framework to stream multiple image regions and merge them together into a single output image. This StatisticsImageFilter needs a framework which consumes multiple input image regions and reduces the data produced. I happen to have implemented such a framework here [1]. It currently has the LabelStatisticsImageFilter implemented in a streaming fashion. > > Let me give it a try and see how quickly I can get the StatisticsImageFilter in this framework. Help writing tests would be appreciated. > > Thanks, > Brad > > > [1] https://github.com/blowekamp/itkStreamingSinc > > On Apr 17, 2015, at 5:08 AM, Dr. Roman Grothausmann wrote: > >> Dear mailing list members, >> >> >> I'm wondering why the itkStatisticsImageFilter cannot stream? >> Looking into itkStatisticsImageFilter.hxx it requests the whole input in GenerateInputRequestedRegion and EnlargeOutputRequestedRegion but in ThreadedGenerateData only iterates over the outputRegionForThread. >> Where in the code is the whole input image needed as one single block? >> >> Thanks for any 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-2900 >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 lluna.nova at gmail.com Fri Apr 17 09:59:01 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Fri, 17 Apr 2015 15:59:01 +0200 Subject: [ITK-users] How do I create ITK images inside a loop? In-Reply-To: References: Message-ID: Nevermind, std::vector< typename GradientImageType::Pointer > gradients*(dims);* for(unsigned int dim = 0; dim < dims; dim++) { typename GradientImageType::Pointer gradient = GradientImageType::New(); gradient->SetRegions(roi); gradient->Allocate(); gradients[dim] = gradient; } It will use the default constructor, thought. 2015-04-17 12:52 GMT+02:00 Pol Mons? Purt? : > Hello all, > > How can I create n images inside a for loop? The smart pointer would go > out of scope. How could I use a container? > > Cheers, > > Pol > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lluna.nova at gmail.com Fri Apr 17 10:01:31 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Fri, 17 Apr 2015 16:01:31 +0200 Subject: [ITK-users] extracting each component of the GradientRecursiveGaussianImageFilter In-Reply-To: References: Message-ID: Apparently, even if the default is a covariantVector of dimension ImageDimension (3), the three components of each "pixel" have the same value. So the question is still there, how do I retrieve the gradient on each dimension of an image? 2015-04-16 15:30 GMT+02:00 Pol Mons? Purt? : > Hello all, > > The declaration of thefilter is > > template CovariantVector< typename NumericTraits< typename TInputImage::PixelType > >::RealType, TInputImage::ImageDimension >, TInputImage::ImageDimension >> > > In my case, ImageDimension = 3 > > So I have two questions. > > Question number 1: > Does the output image hold, for each pixel, the three derivatives? Can > they be accessed by > > it.Get()[0] it.Get()[1] it.Get()[2] > > where it is itk::ImageRegionIterator< GradientImageType > it( > gradientImage, > gradientImage->GetRequestedRegion() ); > > ? > > Question number 2: (just for curiosity) > what happens when TOutputImage = Image< PixelType, Dimension> ? > and what happens when you create a writer with the default TOutputImage and > write to disk? Do the derivatives end in different channels or a magnitude > is computed? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Fri Apr 17 10:05:22 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 17 Apr 2015 10:05:22 -0400 Subject: [ITK-users] Scan line iterators, region iterators and indexes In-Reply-To: References: Message-ID: Hi Olivier, > I have recently discovered that many ITK filters have switched to scan line iterators, apparently for speed reasons. I was therefore wondering about switching to them as well in our local code, but I have a few questions regarding them. Yes, switching to the scanline iterators can result in a good speed-up. > First, I looked at the code and it seems to me that both region and scan line iterators explore regions in the exact same way (apart from the fact that you manually need to switch to the next line in the scan line iterator). I think the answer is yes, but does that mean that if I explore a corresponding sub region of a 4D and a 3D image, the pixel exploration order will be the same (e.g. exploring a 3D sub image of a 4d volume and an other 3d image)? Correct -- the traversal is the same. > Then, there is no scan line iterator with index. Is that something that would be doable and if yes, is it something planned or not ? I have the feeling that If no the most efficient (in a filter with access to the index at each pixel), region iterator with index would be more efficient. Bradley may know offhand whether this would be possible. Patches are welcome :-). Thanks, Matt From blowekamp at mail.nih.gov Fri Apr 17 10:20:12 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 17 Apr 2015 10:20:12 -0400 Subject: [ITK-users] Scan line iterators, region iterators and indexes In-Reply-To: References: Message-ID: <76AB5EF6-CE05-4DAA-9B14-634204651D1D@mail.nih.gov> On Apr 17, 2015, at 10:05 AM, Matt McCormick wrote: >> >> Then, there is no scan line iterator with index. Is that something that would be doable and if yes, is it something planned or not ? I have the feeling that If no the most efficient (in a filter with access to the index at each pixel), region iterator with index would be more efficient. > > Bradley may know offhand whether this would be possible. As I recall I did some performance comparison between the ScanLine iterators and the LinearWithIndex iterators. And the LinearWithIndex held up very well. ( Sorry I don't have more specifics ). The fundamental goal of the Scanline iterator was to create an inner loop that was auto-vectorizable if the loop block had no conditionals. This is true for a lot of basic unary and binary filters. With more complicated loops with conditionals like are frequent when an index is used the gains are not as significant. There is certainly no harm in switching to the Scanline iterator when you can, but I would not guarantee measurable gains in all cases. HTH, Brad -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Apr 17 10:24:08 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 17 Apr 2015 10:24:08 -0400 Subject: [ITK-users] Scan line iterators, region iterators and indexes In-Reply-To: References: Message-ID: <6D3F0D04-9F29-4C2A-AD11-5FB7E4CA07A6@mail.nih.gov> I forgot to mention the other SIGNIFICANT source of performance improvement! The progress reporting was moved a per pixel basis to a per scanline [1]. Its important to spend more time computing compared to reporting :) Brad [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkUnaryFunctorImageFilter.hxx#L189 On Apr 17, 2015, at 10:05 AM, Matt McCormick wrote: > Hi Olivier, > >> I have recently discovered that many ITK filters have switched to scan line iterators, apparently for speed reasons. I was therefore wondering about switching to them as well in our local code, but I have a few questions regarding them. > > Yes, switching to the scanline iterators can result in a good speed-up. > > >> First, I looked at the code and it seems to me that both region and scan line iterators explore regions in the exact same way (apart from the fact that you manually need to switch to the next line in the scan line iterator). I think the answer is yes, but does that mean that if I explore a corresponding sub region of a 4D and a 3D image, the pixel exploration order will be the same (e.g. exploring a 3D sub image of a 4d volume and an other 3d image)? > > Correct -- the traversal is the same. > > >> Then, there is no scan line iterator with index. Is that something that would be doable and if yes, is it something planned or not ? I have the feeling that If no the most efficient (in a filter with access to the index at each pixel), region iterator with index would be more efficient. > > Bradley may know offhand whether this would be possible. > > Patches are welcome :-). > > Thanks, > Matt From grothausmann.roman at mh-hannover.de Fri Apr 17 12:12:17 2015 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Fri, 17 Apr 2015 18:12:17 +0200 Subject: [ITK-users] why can the itkStatisticsImageFilter not stream? In-Reply-To: <9D3D6598-4AB3-4DD0-81EC-81CB3C8F3BBB@mail.nih.gov> References: <5530CDA2.6050603@mh-hannover.de> <9FFA219D-8E98-4524-9E59-3164AF8DE0DD@mail.nih.gov> <9D3D6598-4AB3-4DD0-81EC-81CB3C8F3BBB@mail.nih.gov> Message-ID: <553130E1.5070909@mh-hannover.de> Dear Brad, dear Richard, Many thanks for Your replies. So, if I understand You correctly, the problem is that the current framework (with StreamingImageFilter) will run AfterThreadedGenerateData for each chunk and not just when the whole image has been processed. So one would need to combine StatisticsImageFilter and StreamingImageFilter into one filter, i.e. basically that the part of AfterThreadedGenerateData is executed by StreamingImageFilter. If I understand the code of itkStreamingSinc correctly, this is what it does? itkStreamingSinc provides a base class to combine multi-threaded filters with a StreamingImageFilter to make them streamable. This comes with the trade-off that the resulting filter will not provide an output, which is no problem if it is not needed. So, e.g. itkStreamingStatisticsImageFilter cannot be connected to itkPipelineMonitorImageFilter as it would need an output of itkStreamingStatisticsImageFilter? Many thanks Brad for implementing itkStreamingStatisticsImageFilter. I just tested it and it works perfectly (https://github.com/romangrothausmann/ITK-CLIs/commit/38bcad35bf004feaf2189bdaaffcf398fbca1f60). Though, I do not understand the changes You made in: https://github.com/blowekamp/itkStreamingSinc/commit/b4ae9b61dc08388fbf1b3bfd9e5cf570dd40a0c6 Is the accumulation that still resides in AfterStreamedGenerateData not used at all? (https://github.com/blowekamp/itkStreamingSinc/commit/dae948bea0966a2c3924351bf9c15bfcef318ac6#diff-ad64d497b8f9aadd5da97c5e1c793dc9R210) Just as a side note: The progress reported by itkStreamingStatisticsImageFilter jumps to 100% for each chunk. All in all Your itkStreamingSinc and the implemented streaming-filters are really a great contribution to ITK and I fully recommend incorporating it into ITK. Many thanks again Roman On 17/04/15 15:47, Bradley Lowekamp wrote: > Hi, > > I was able to easy update a the StatisticsImageFilter to use my streaming > base class for reduction algorithms [1]. It runs basically the same expect > that you can set the number of stream divisions[2], there is the potential > for setting the way the input image is split via the RegionSplitter in a base > class [3]. > > You should be able to just clone the repository into you ITK/Modules/External > directory, then enable it in the CMake configuration to use. > > Please let me know if it works for you. > > This should help :) Brad > > [1] https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkStreamingStatisticsImageFilter.h > [2] https://github.com/blowekamp/itkStreamingSinc/blob/master/test/itkStreamingStatisticsImageFilterTest2.cxx#L61 > [3] https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkImageSinc.h#L99 > > > > On Apr 17, 2015, at 7:14 AM, Bradley Lowekamp > wrote: > >> Hello fellow mailing list member, >> >> Currently in ITK there are two base classes for streaming images in ITK. >> The ImageToImageFilter provide the framework of streaming one input region to one output region. The other is the StreamingImageFilter which provides the framework to stream multiple image regions and merge them together into a single output image. This StatisticsImageFilter needs a framework which consumes multiple input image regions and reduces the data produced. I happen to have implemented such a framework here [1]. It currently has the LabelStatisticsImageFilter implemented in a streaming fashion. >> >> Let me give it a try and see how quickly I can get the >> StatisticsImageFilter in this framework. Help writing tests would be appreciated. >> >> Thanks, Brad >> >> [1] https://github.com/blowekamp/itkStreamingSinc >> >> On Apr 17, 2015, at 5:08 AM, Dr. Roman Grothausmann wrote: >> >>> Dear mailing list members, >>> >>> >>> I'm wondering why the itkStatisticsImageFilter cannot stream? >>> Looking into itkStatisticsImageFilter.hxx it requests the whole input in GenerateInputRequestedRegion and EnlargeOutputRequestedRegion but in ThreadedGenerateData only iterates over the outputRegionForThread. >>> Where in the code is the whole input image needed as one single block? >>> >>> Thanks for any 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-2900 >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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-2900 From matt.mccormick at kitware.com Fri Apr 17 12:12:31 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 17 Apr 2015 12:12:31 -0400 Subject: [ITK-users] Classification from a training text file In-Reply-To: References: Message-ID: Hi Francisco, It could be possible to import the data with CVSFileReader and then convert the Array2D to an Image ImportImageFilter [2]. Note that Array2D inherits from vnl_matrix [1], which has methods to access the data. Let us know about your experiences. Thanks, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1CSVArray2DFileReader.html [2] http://www.itk.org/Doxygen/html/classitk_1_1ImportImageFilter.html [3] On Fri, Apr 17, 2015 at 9:02 AM, Francisco Lopez de la Franca wrote: > Hi. > I have a text file made up of N rows and M columns. Each row represents a > measurement of M features, that is, Weka-styled. > I could add a last column with the class of every measurement but it is > optional. > > I've been havinig a look at the ITK classification classes (Bayesian, > k-means, etc.), but they receive an image as input (e.g. a vector image). > > I'd like to know what is the best way, in my case, to perform the > classification of the measurements stored in my training text file. > > Thank you very much in advance. > My best regards. > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK 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 Apr 17 12:12:48 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 17 Apr 2015 12:12:48 -0400 Subject: [ITK-users] Classification from a training text file In-Reply-To: References: Message-ID: Third link: http://public.kitware.com/vxl/doc/release/core/vnl/html/classvnl__matrix.html On Fri, Apr 17, 2015 at 12:12 PM, Matt McCormick wrote: > Hi Francisco, > > It could be possible to import the data with CVSFileReader and then > convert the Array2D to an Image ImportImageFilter [2]. Note that > Array2D inherits from vnl_matrix [1], which has methods to access the > data. Let us know about your experiences. > > Thanks, > Matt > > [1] http://www.itk.org/Doxygen/html/classitk_1_1CSVArray2DFileReader.html > > [2] http://www.itk.org/Doxygen/html/classitk_1_1ImportImageFilter.html > > [3] > > On Fri, Apr 17, 2015 at 9:02 AM, Francisco Lopez de la Franca > wrote: >> Hi. >> I have a text file made up of N rows and M columns. Each row represents a >> measurement of M features, that is, Weka-styled. >> I could add a last column with the class of every measurement but it is >> optional. >> >> I've been havinig a look at the ITK classification classes (Bayesian, >> k-means, etc.), but they receive an image as input (e.g. a vector image). >> >> I'd like to know what is the best way, in my case, to perform the >> classification of the measurements stored in my training text file. >> >> Thank you very much in advance. >> My best regards. >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> From lluna.nova at gmail.com Fri Apr 17 12:49:44 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Fri, 17 Apr 2015 18:49:44 +0200 Subject: [ITK-users] extracting each component of the GradientRecursiveGaussianImageFilter In-Reply-To: References: Message-ID: Until somebody can explain why the output of the aforementioned filter has the same values on each component, here's how to get the gradient on each dimension: //features typedef itk::RecursiveGaussianImageFilter< TImageType, GradientImageType > GradientFilterType; typename GradientFilterType::Pointer gradientFilter = GradientFilterType::New(); gradientFilter->SetInput(imageROIextractor->GetOutput()); float sigma = 3.5; gradientFilter->SetSigma( sigma ); gradientFilter->SetFirstOrder(); std::vector< typename GradientImageType::Pointer > gradients(TImageType::ImageDimension); try { for(unsigned int dim = 0; dim < TImageType::ImageDimension; dim++) { gradientFilter->SetDirection(dim); gradientFilter->Update(); gradients[dim] = gradientFilter->GetOutput(); gradients[dim]->DisconnectPipeline(); } } catch( itk::ExceptionObject & error ) { std::cerr << __FILE__ << ":" << __LINE__ << " Error: " << error << std::endl; return FUCKEDUP; } 2015-04-17 16:01 GMT+02:00 Pol Mons? Purt? : > Apparently, even if the default is a covariantVector of dimension > ImageDimension (3), the three components of each "pixel" have the same > value. So the question is still there, how do I retrieve the gradient on > each dimension of an image? > > 2015-04-16 15:30 GMT+02:00 Pol Mons? Purt? : > >> Hello all, >> >> The declaration of thefilter is >> >> template> CovariantVector< typename NumericTraits< typename TInputImage::PixelType >> >::RealType, TInputImage::ImageDimension >, TInputImage::ImageDimension >> >> >> In my case, ImageDimension = 3 >> >> So I have two questions. >> >> Question number 1: >> Does the output image hold, for each pixel, the three derivatives? Can >> they be accessed by >> >> it.Get()[0] it.Get()[1] it.Get()[2] >> >> where it is itk::ImageRegionIterator< GradientImageType > it( >> gradientImage, >> gradientImage->GetRequestedRegion() ); >> >> ? >> >> Question number 2: (just for curiosity) >> what happens when TOutputImage = Image< PixelType, Dimension> ? >> and what happens when you create a writer with the default TOutputImage and >> write to disk? Do the derivatives end in different channels or a magnitude >> is computed? >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Apr 17 13:16:35 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 17 Apr 2015 13:16:35 -0400 Subject: [ITK-users] fast marching minimal path extraction In-Reply-To: <58518126-4A6D-4C9A-AED9-2DD56F0A5DB3@mail.nih.gov> References: <58518126-4A6D-4C9A-AED9-2DD56F0A5DB3@mail.nih.gov> Message-ID: I have added the remote module to a dashboard build here: https://open.cdash.org/buildSummary.php?buildid=3776393 As there are no tests of the code, I don't think any of the code is compiled when build as a remote module :( Brad On Apr 16, 2015, at 12:53 PM, Bradley Lowekamp wrote: > That's great! I don't think we have any nightly builds for that remote module. I'll add one for linux. > > Brad > > On Apr 16, 2015, at 10:59 AM, Arnaud Gelas wrote: > >> Hi Kishore, >> >> Yes, it has been integrated by the means of remote module, you only need to turn ON the appropriate option at CMake time >> >> https://github.com/Kitware/ITK/commit/da17ae4d4955bb92d5259c6ac47bfce6c474be18 >> >> Cheers, >> Arnaud >> >>> On 16 Apr 2015, at 16:57, Kishore Mosaliganti wrote: >>> >>> Hi all, >>> >>> Is the code in the fast marching minimal path extraction publication integrated into the ITK 4.8 toolkit: >>> http://www.insight-journal.org/browse/publication/213 >>> >>> If not, the downloaded code does not compile with ITK 4.8. I was going to fix it but just checking if a patch/update exists somewhere? >>> >>> Kishore >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Fri Apr 17 13:23:55 2015 From: michkapopoff at gmail.com (michkapopoff at gmail.com) Date: Fri, 17 Apr 2015 19:23:55 +0200 Subject: [ITK-users] extracting each component of the GradientRecursiveGaussianImageFilter In-Reply-To: References: Message-ID: <4EFC0C00-60B5-4DE3-8DA5-732F5CB58377@gmail.com> Hi I wrote two examples for this filter some time ago: http://itk.org/ITKExamples/src/Filtering/ImageGradient/ApplyGradientRecursiveGaussianImageFilter/Documentation.html http://itk.org/ITKExamples/src/Filtering/ImageGradient/ApplyGradientRecursiveGaussianImageFilterWithVectorInput/Documentation.html They were used on 2D images, so I guess extending to 3D should work, though I did not test it. I used vectorIndexSelectionCastImageFilter to extract the images for each component. A good help is to save the output of the GradientRecursiceGaussianFilter to a .mha file, and open if with Paraview. There you will see the different components with their names. If you want the magnitude, there is a VectorMagnitudeImageFilter (see the first example). Hope that helps. I would be interested to know if everything is fine with 3D images using this filter; I never found the time to test it thoroughly. Michka > On 17 Apr 2015, at 18:49, Pol Mons? Purt? wrote: > > > Until somebody can explain why the output of the aforementioned filter has the same values on each component, here's how to get the gradient on each dimension: > > //features > typedef itk::RecursiveGaussianImageFilter< TImageType, GradientImageType > GradientFilterType; > typename GradientFilterType::Pointer gradientFilter = GradientFilterType::New(); > gradientFilter->SetInput(imageROIextractor->GetOutput()); > float sigma = 3.5; > gradientFilter->SetSigma( sigma ); > gradientFilter->SetFirstOrder(); > std::vector< typename GradientImageType::Pointer > gradients(TImageType::ImageDimension); > > try { > for(unsigned int dim = 0; dim < TImageType::ImageDimension; dim++) { > gradientFilter->SetDirection(dim); > gradientFilter->Update(); > gradients[dim] = gradientFilter->GetOutput(); > gradients[dim]->DisconnectPipeline(); > } > } catch( itk::ExceptionObject & error ) { > std::cerr << __FILE__ << ":" << __LINE__ << " Error: " << error << std::endl; > return FUCKEDUP; > } > > > 2015-04-17 16:01 GMT+02:00 Pol Mons? Purt? >: > Apparently, even if the default is a covariantVector of dimension ImageDimension (3), the three components of each "pixel" have the same value. So the question is still there, how do I retrieve the gradient on each dimension of an image? > > 2015-04-16 15:30 GMT+02:00 Pol Mons? Purt? >: > Hello all, > > The declaration of thefilter is > > template::RealType, TInputImage::ImageDimension >, TInputImage::ImageDimension >> > > In my case, ImageDimension = 3 > > So I have two questions. > > Question number 1: > Does the output image hold, for each pixel, the three derivatives? Can they be accessed by > > it.Get()[0] it.Get()[1] it.Get()[2] > > where it is itk::ImageRegionIterator< GradientImageType > it( gradientImage, > gradientImage->GetRequestedRegion() ); > > ? > > Question number 2: (just for curiosity) > what happens when TOutputImage = Image< PixelType, Dimension> ? > and what happens when you create a writer with the default TOutputImage and write to disk? Do the derivatives end in different channels or a magnitude is computed? > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 lluna.nova at gmail.com Fri Apr 17 13:36:15 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Fri, 17 Apr 2015 19:36:15 +0200 Subject: [ITK-users] extracting each component of the GradientRecursiveGaussianImageFilter In-Reply-To: <4EFC0C00-60B5-4DE3-8DA5-732F5CB58377@gmail.com> References: <4EFC0C00-60B5-4DE3-8DA5-732F5CB58377@gmail.com> Message-ID: I see! Thanks Michka, It's a pity I didn't stumble on your example before! // Allows to select the X or Y output images typedef itk::VectorIndexSelectionCastImageFilter< CovImageType, DoubleImageType > IndexSelectionType; IndexSelectionType::Pointer indexSelectionFilter = IndexSelectionType::New(); indexSelectionFilter->SetInput( filter->GetOutput() ); indexSelectionFilter->SetIndex( i ); Thats the key 2015-04-17 19:23 GMT+02:00 : > Hi > > I wrote two examples for this filter some time ago: > > > http://itk.org/ITKExamples/src/Filtering/ImageGradient/ApplyGradientRecursiveGaussianImageFilter/Documentation.html > > http://itk.org/ITKExamples/src/Filtering/ImageGradient/ApplyGradientRecursiveGaussianImageFilterWithVectorInput/Documentation.html > > They were used on 2D images, so I guess extending to 3D should work, > though I did not test it. > I used vectorIndexSelectionCastImageFilter to extract the images for each > component. > > A good help is to save the output of the GradientRecursiceGaussianFilter > to a .mha file, and open if with Paraview. > There you will see the different components with their names. > > If you want the magnitude, there is a VectorMagnitudeImageFilter (see the > first example). > > Hope that helps. I would be interested to know if everything is fine with > 3D images using this filter; I never found the time > to test it thoroughly. > > Michka > > > On 17 Apr 2015, at 18:49, Pol Mons? Purt? wrote: > > > Until somebody can explain why the output of the aforementioned filter has > the same values on each component, here's how to get the gradient on each > dimension: > > //features > > typedef itk::RecursiveGaussianImageFilter< TImageType, GradientImageType > GradientFilterType; > > typename GradientFilterType::Pointer gradientFilter = GradientFilterType::New(); > > gradientFilter->SetInput(imageROIextractor->GetOutput()); > > float sigma = 3.5; > > gradientFilter->SetSigma( sigma ); > > gradientFilter->SetFirstOrder(); > > std::vector< typename GradientImageType::Pointer > gradients(TImageType::ImageDimension); > > > try { > > for(unsigned int dim = 0; dim < TImageType::ImageDimension; dim++) { > > gradientFilter->SetDirection(dim); > > gradientFilter->Update(); > > gradients[dim] = gradientFilter->GetOutput(); > > gradients[dim]->DisconnectPipeline(); > > } > > } catch( itk::ExceptionObject & error ) { > > std::cerr << __FILE__ << ":" << __LINE__ << " Error: " << error << std::endl; > > return FUCKEDUP; > > } > > > > 2015-04-17 16:01 GMT+02:00 Pol Mons? Purt? : > >> Apparently, even if the default is a covariantVector of dimension >> ImageDimension (3), the three components of each "pixel" have the same >> value. So the question is still there, how do I retrieve the gradient on >> each dimension of an image? >> >> 2015-04-16 15:30 GMT+02:00 Pol Mons? Purt? : >> >>> Hello all, >>> >>> The declaration of thefilter is >>> >>> template>> CovariantVector< typename NumericTraits< typename TInputImage::PixelType >>> >::RealType, TInputImage::ImageDimension >, TInputImage::ImageDimension >> >>> >>> In my case, ImageDimension = 3 >>> >>> So I have two questions. >>> >>> Question number 1: >>> Does the output image hold, for each pixel, the three derivatives? Can >>> they be accessed by >>> >>> it.Get()[0] it.Get()[1] it.Get()[2] >>> >>> where it is itk::ImageRegionIterator< GradientImageType > it( >>> gradientImage, >>> gradientImage->GetRequestedRegion() ); >>> >>> ? >>> >>> Question number 2: (just for curiosity) >>> what happens when TOutputImage = Image< PixelType, Dimension> ? >>> and what happens when you create a writer with the default TOutputImage and >>> write to disk? Do the derivatives end in different channels or a magnitude >>> is computed? >>> >> >> > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Fri Apr 17 14:13:27 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 17 Apr 2015 14:13:27 -0400 Subject: [ITK-users] why can the itkStatisticsImageFilter not stream? In-Reply-To: <553130E1.5070909@mh-hannover.de> References: <5530CDA2.6050603@mh-hannover.de> <9FFA219D-8E98-4524-9E59-3164AF8DE0DD@mail.nih.gov> <9D3D6598-4AB3-4DD0-81EC-81CB3C8F3BBB@mail.nih.gov> <553130E1.5070909@mh-hannover.de> Message-ID: Hello, Glad to hear it worked for you. I have just fixed the progress reporting [1]. The StreamingImageFilter overloads the UpdateData method [2], by passing the standard ImageToImage/ImageSource methods such and GenerateData, ThreadedGenerateData etc. It's actually not really designed to be derived from, and it used mostly to drive the streaming of a pipeline. It can be seen as slicing up the output image in to pieces, and requesting those pieces from the pipeline, the assembling them into the output image. The resulting behavior of the ImageSinc, with the StreamingProcessObject goes something like this: BeforeStreamedGenerateData() For each requested streamed chunk: For each thread process part of streamed chunk: ThreadedStreamedGenerateData() AfterStreamedGenerateData() So the input image is getting sliced up twice the first for streaming and the second for multi-threading. The StreamingImageFitler could be rewritten onto this framework to perhaps provide a generalized base class. For the StreamingStatisticsImage filter, the statistics are accumulated for each thread multiple times ( for each streamed chunk ), then the totals from the threads are reduced to the results. These classes certainly need more documentation before further integration into ITK. Brad [1] https://github.com/blowekamp/itkStreamingSinc/commit/d8415cf137d69a0e81b6dd46145d8cb7df2825c3 [2] https://github.com/InsightSoftwareConsortium/ITK/blob/8f7c404aff99f5ae3dfedce6e480701f0304864c/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L118-Lundefined On Apr 17, 2015, at 12:12 PM, Grothausmann, Roman Dr. wrote: > Dear Brad, dear Richard, > > > Many thanks for Your replies. So, if I understand You correctly, the problem is that the current framework (with StreamingImageFilter) will run AfterThreadedGenerateData for each chunk and not just when the whole image has been processed. So one would need to combine StatisticsImageFilter and StreamingImageFilter into one filter, i.e. basically that the part of AfterThreadedGenerateData is executed by StreamingImageFilter. > If I understand the code of itkStreamingSinc correctly, this is what it does? itkStreamingSinc provides a base class to combine multi-threaded filters with a StreamingImageFilter to make them streamable. This comes with the trade-off that the resulting filter will not provide an output, which is no problem if it is not needed. So, e.g. itkStreamingStatisticsImageFilter cannot be connected to itkPipelineMonitorImageFilter as it would need an output of itkStreamingStatisticsImageFilter? > > Many thanks Brad for implementing itkStreamingStatisticsImageFilter. I just tested it and it works perfectly (https://github.com/romangrothausmann/ITK-CLIs/commit/38bcad35bf004feaf2189bdaaffcf398fbca1f60). > Though, I do not understand the changes You made in: https://github.com/blowekamp/itkStreamingSinc/commit/b4ae9b61dc08388fbf1b3bfd9e5cf570dd40a0c6 > Is the accumulation that still resides in AfterStreamedGenerateData not used at all? (https://github.com/blowekamp/itkStreamingSinc/commit/dae948bea0966a2c3924351bf9c15bfcef318ac6#diff-ad64d497b8f9aadd5da97c5e1c793dc9R210) > Just as a side note: The progress reported by itkStreamingStatisticsImageFilter jumps to 100% for each chunk. > > All in all Your itkStreamingSinc and the implemented streaming-filters are really a great contribution to ITK and I fully recommend incorporating it into ITK. > > Many thanks again > Roman > > > On 17/04/15 15:47, Bradley Lowekamp wrote: >> Hi, >> >> I was able to easy update a the StatisticsImageFilter to use my streaming >> base class for reduction algorithms [1]. It runs basically the same expect >> that you can set the number of stream divisions[2], there is the potential >> for setting the way the input image is split via the RegionSplitter in a base >> class [3]. >> >> You should be able to just clone the repository into you ITK/Modules/External >> directory, then enable it in the CMake configuration to use. >> >> Please let me know if it works for you. >> >> This should help :) Brad > >> [1] https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkStreamingStatisticsImageFilter.h >> [2] https://github.com/blowekamp/itkStreamingSinc/blob/master/test/itkStreamingStatisticsImageFilterTest2.cxx#L61 >> [3] https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkImageSinc.h#L99 >> >> >> >> On Apr 17, 2015, at 7:14 AM, Bradley Lowekamp >> wrote: >> >>> Hello fellow mailing list member, >>> >>> Currently in ITK there are two base classes for streaming images in ITK. >>> The > ImageToImageFilter provide the framework of streaming one input region to one > output region. The other is the StreamingImageFilter which provides the > framework to stream multiple image regions and merge them together into a single > output image. This StatisticsImageFilter needs a framework which consumes > multiple input image regions and reduces the data produced. I happen to have > implemented such a framework here [1]. It currently has the > LabelStatisticsImageFilter implemented in a streaming fashion. >>> >>> Let me give it a try and see how quickly I can get the >>> StatisticsImageFilter > in this framework. Help writing tests would be appreciated. >>> >>> Thanks, Brad >>> >>> [1] https://github.com/blowekamp/itkStreamingSinc >>> >>> On Apr 17, 2015, at 5:08 AM, Dr. Roman Grothausmann wrote: >>> >>>> Dear mailing list members, >>>> >>>> >>>> I'm wondering why the itkStatisticsImageFilter cannot stream? >>>> Looking into itkStatisticsImageFilter.hxx it requests the whole input in GenerateInputRequestedRegion and EnlargeOutputRequestedRegion but in ThreadedGenerateData only iterates over the outputRegionForThread. >>>> Where in the code is the whole input image needed as one single block? >>>> >>>> Thanks for any 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-2900 >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the 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-2900 From cervellone at gmail.com Fri Apr 17 14:08:07 2015 From: cervellone at gmail.com (jp) Date: Fri, 17 Apr 2015 11:08:07 -0700 (MST) Subject: [ITK-users] Pixel operations on subsets of label objects Message-ID: <1429294087288-35543.post@n7.nabble.com> Dear all, I would like to iterate over the label object and perform pixel operations of a subset of a label object. Currently fail to see how i can set up the label manipulation tools of itk to achieve this Thank you jp -- View this message in context: http://itk-users.7.n7.nabble.com/Pixel-operations-on-subsets-of-label-objects-tp35543.html Sent from the ITK - Users mailing list archive at Nabble.com. From lluna.nova at gmail.com Fri Apr 17 15:06:25 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Fri, 17 Apr 2015 21:06:25 +0200 Subject: [ITK-users] Pixel operations on subsets of label objects In-Reply-To: <1429294087288-35543.post@n7.nabble.com> References: <1429294087288-35543.post@n7.nabble.com> Message-ID: Hello jp, How do you distinguish which objects are you interested in and what operations do you want to perform? Maybe this example is helpful to you: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter HTH, Pol 2015-04-17 20:08 GMT+02:00 jp : > Dear all, > I would like to iterate over the label object and perform pixel operations > of a subset of a label object. > Currently fail to see how i can set up the label manipulation tools of itk > to achieve this > > Thank you > > jp > > > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/Pixel-operations-on-subsets-of-label-objects-tp35543.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Fri Apr 17 16:06:22 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 17 Apr 2015 16:06:22 -0400 Subject: [ITK-users] How do I create ITK images inside a loop? In-Reply-To: References: Message-ID: Hi Pol, Yes, this should work fine. The default constructor sets the pointer to NULL by default. Matt On Fri, Apr 17, 2015 at 9:59 AM, Pol Mons? Purt? wrote: > Nevermind, > > std::vector< typename GradientImageType::Pointer > gradients(dims); > > for(unsigned int dim = 0; dim < dims; dim++) { > > typename GradientImageType::Pointer gradient = GradientImageType::New(); > > gradient->SetRegions(roi); > > gradient->Allocate(); > > gradients[dim] = gradient; > > } > > > It will use the default constructor, thought. > > 2015-04-17 12:52 GMT+02:00 Pol Mons? Purt? : >> >> Hello all, >> >> How can I create n images inside a for loop? The smart pointer would go >> out of scope. How could I use a container? >> >> Cheers, >> >> Pol > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From dan.muel at gmail.com Fri Apr 17 20:13:23 2015 From: dan.muel at gmail.com (Dan Mueller) Date: Sat, 18 Apr 2015 09:43:23 +0930 Subject: [ITK-users] fast marching minimal path extraction In-Reply-To: References: <58518126-4A6D-4C9A-AED9-2DD56F0A5DB3@mail.nih.gov> Message-ID: Hi all, The Insight Journal article originally came with tests ? they must not have been added when the remote module was created... http://www.insight-journal.org/browse/publication/213 Cheers, Dan On 18 April 2015 at 02:46, Bradley Lowekamp wrote: > I have added the remote module to a dashboard build here: > https://open.cdash.org/buildSummary.php?buildid=3776393 > > As there are no tests of the code, I don't think any of the code is compiled > when build as a remote module :( > > Brad > > On Apr 16, 2015, at 12:53 PM, Bradley Lowekamp > wrote: > > That's great! I don't think we have any nightly builds for that remote > module. I'll add one for linux. > > Brad > > On Apr 16, 2015, at 10:59 AM, Arnaud Gelas wrote: > > Hi Kishore, > > Yes, it has been integrated by the means of remote module, you only need to > turn ON the appropriate option at CMake time > > https://github.com/Kitware/ITK/commit/da17ae4d4955bb92d5259c6ac47bfce6c474be18 > > Cheers, > Arnaud > > On 16 Apr 2015, at 16:57, Kishore Mosaliganti wrote: > > Hi all, > > Is the code in the fast marching minimal path extraction publication > integrated into the ITK 4.8 toolkit: > http://www.insight-journal.org/browse/publication/213 > > If not, the downloaded code does not compile with ITK 4.8. I was going to > fix it but just checking if a patch/update exists somewhere? > > Kishore > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From cervellone at gmail.com Sat Apr 18 14:43:24 2015 From: cervellone at gmail.com (cervellone at gmail.com) Date: Sat, 18 Apr 2015 20:43:24 +0200 Subject: [ITK-users] Pixel operations on subsets of label objects In-Reply-To: References: <1429294087288-35543.post@n7.nabble.com> Message-ID: Thanks for the reply I am handling 3d voxel data. Starting from gray levels I want to run a connected components but keep the gray level data and iterate over the label map, The property I am interested in is not in the shape label map, nor in the statistics label map. I would like to compute the threshold for every 2d slice of the 3d label object separately. For this I would need to extract the pixels of the label object and use the extract slice image filter on it. Any idea how this can be done ? Thanks jp On Friday, April 17, 2015, Pol Mons? Purt? wrote: > Hello jp, > > How do you distinguish which objects are you interested in and what > operations do you want to perform? > > Maybe this example is helpful to you: > http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter > > HTH, > > Pol > > 2015-04-17 20:08 GMT+02:00 jp >: > >> Dear all, >> I would like to iterate over the label object and perform pixel operations >> of a subset of a label object. >> Currently fail to see how i can set up the label manipulation tools of itk >> to achieve this >> >> Thank you >> >> jp >> >> >> >> >> >> -- >> View this message in context: >> http://itk-users.7.n7.nabble.com/Pixel-operations-on-subsets-of-label-objects-tp35543.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 >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kishoreraom at gmail.com Sat Apr 18 18:09:06 2015 From: kishoreraom at gmail.com (Kishore Mosaliganti) Date: Sat, 18 Apr 2015 18:09:06 -0400 Subject: [ITK-users] fast marching minimal path extraction In-Reply-To: References: <58518126-4A6D-4C9A-AED9-2DD56F0A5DB3@mail.nih.gov> Message-ID: Thank you Brad and Dan! Kishore On Fri, Apr 17, 2015 at 8:13 PM, Dan Mueller wrote: > Hi all, > > The Insight Journal article originally came with tests ? they must not > have been added when the remote module was created... > http://www.insight-journal.org/browse/publication/213 > > Cheers, Dan > > On 18 April 2015 at 02:46, Bradley Lowekamp > wrote: > > I have added the remote module to a dashboard build here: > > https://open.cdash.org/buildSummary.php?buildid=3776393 > > > > As there are no tests of the code, I don't think any of the code is > compiled > > when build as a remote module :( > > > > Brad > > > > On Apr 16, 2015, at 12:53 PM, Bradley Lowekamp > > wrote: > > > > That's great! I don't think we have any nightly builds for that remote > > module. I'll add one for linux. > > > > Brad > > > > On Apr 16, 2015, at 10:59 AM, Arnaud Gelas > wrote: > > > > Hi Kishore, > > > > Yes, it has been integrated by the means of remote module, you only need > to > > turn ON the appropriate option at CMake time > > > > > https://github.com/Kitware/ITK/commit/da17ae4d4955bb92d5259c6ac47bfce6c474be18 > > > > Cheers, > > Arnaud > > > > On 16 Apr 2015, at 16:57, Kishore Mosaliganti > wrote: > > > > Hi all, > > > > Is the code in the fast marching minimal path extraction publication > > integrated into the ITK 4.8 toolkit: > > http://www.insight-journal.org/browse/publication/213 > > > > If not, the downloaded code does not compile with ITK 4.8. I was going to > > fix it but just checking if a patch/update exists somewhere? > > > > Kishore > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > > > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 lluna.nova at gmail.com Sun Apr 19 08:23:50 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Sun, 19 Apr 2015 14:23:50 +0200 Subject: [ITK-users] Pixel operations on subsets of label objects In-Reply-To: References: <1429294087288-35543.post@n7.nabble.com> Message-ID: If I understood correctly, you have uniform greyscale blobs whose value matters and you want to extract one slice from each blob to do something with them, right? It wasn't clear to me wether each blob had an uniform greyscale value or if instead you have 'islands' on the image with various greyscale data in them. In the first case, I don't know if there's a way to run connectedComponentsFilter so that it doesn't change the objects labels. >From the top of my head: In the first case, you could threshold the image to the greyscale value to get the blob you want. In the second case, you could binarize the image, run connected components, select the one you want and then use the maskImageFilter on the original volume to isolate one object. Then use ExtractimageFilter to extract a 2d slice of the isolated blob and do the operations you want. If you want to assemble it back, use the RegionOfInterest instead, I guess. >From the top of my head, probably not the best, Pol 2015-04-18 20:43 GMT+02:00 : > Thanks for the reply > > I am handling 3d voxel data. Starting from gray levels I want to run a > connected components but keep the gray level data and iterate over the > label map, > The property I am interested in is not in the shape label map, nor in the > statistics label map. > > I would like to compute the threshold for every 2d slice of the 3d label > object separately. For this I would need to extract the pixels of the label > object and use the extract slice image filter on it. Any idea how this can > be done ? > > > Thanks jp > > > On Friday, April 17, 2015, Pol Mons? Purt? wrote: > >> Hello jp, >> >> How do you distinguish which objects are you interested in and what >> operations do you want to perform? >> >> Maybe this example is helpful to you: >> http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter >> >> HTH, >> >> Pol >> >> 2015-04-17 20:08 GMT+02:00 jp : >> >>> Dear all, >>> I would like to iterate over the label object and perform pixel >>> operations >>> of a subset of a label object. >>> Currently fail to see how i can set up the label manipulation tools of >>> itk >>> to achieve this >>> >>> Thank you >>> >>> jp >>> >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://itk-users.7.n7.nabble.com/Pixel-operations-on-subsets-of-label-objects-tp35543.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 >>> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Mon Apr 20 04:30:29 2015 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Mon, 20 Apr 2015 10:30:29 +0200 Subject: [ITK-users] why can the itkStatisticsImageFilter not stream? In-Reply-To: References: <5530CDA2.6050603@mh-hannover.de> <9FFA219D-8E98-4524-9E59-3164AF8DE0DD@mail.nih.gov> <9D3D6598-4AB3-4DD0-81EC-81CB3C8F3BBB@mail.nih.gov> <553130E1.5070909@mh-hannover.de> Message-ID: <5534B925.60904@mh-hannover.de> Dear Brad, Many thanks for Your answers and for also fixing the progress reporting. Just tested and it works like a charm. It's a really great contribution especially for those having to work with very big images. I'll give it a try to use Your itkImageSinc to implement a "chunk writer" taking StreamingStatisticsImage as an example and ImageRegionSplitterMultidimensional to create the chunks. If I set the NumberOfStreamDivisions to the number of slices in the 3D Stack Input, is it guaranteed that each slice will be processed on its own for the default ImageRegionSplitterSlowDimension? Or would I have to use an approach as in itkJoinSeriesImageFilterStreamingTest.cxx employing itkExtractImageFilter for each slice? In the docs of ImageSeriesWriter it says: "Usually, the output image type will have fewer dimensions than the input image type." Is there a way to use the ImageSeriesWriter to save a series of hypercubes as ImageRegionSplitterMultidimensional would yield internally? Thanks for any help or hints. Roman On 17/04/15 20:13, Bradley Lowekamp wrote: > Hello, > > Glad to hear it worked for you. > > I have just fixed the progress reporting [1]. > > The StreamingImageFilter overloads the UpdateData method [2], by passing the > standard ImageToImage/ImageSource methods such and GenerateData, > ThreadedGenerateData etc. It's actually not really designed to be derived > from, and it used mostly to drive the streaming of a pipeline. It can be seen > as slicing up the output image in to pieces, and requesting those pieces from > the pipeline, the assembling them into the output image. > > The resulting behavior of the ImageSinc, with the StreamingProcessObject goes > something like this: > > > BeforeStreamedGenerateData() > > For each requested streamed chunk: For each thread process part of streamed > chunk: ThreadedStreamedGenerateData() > > AfterStreamedGenerateData() > > So the input image is getting sliced up twice the first for streaming and the > second for multi-threading. > > The StreamingImageFitler could be rewritten onto this framework to perhaps > provide a generalized base class. > > For the StreamingStatisticsImage filter, the statistics are accumulated for > each thread multiple times ( for each streamed chunk ), then the totals from > the threads are reduced to the results. > > These classes certainly need more documentation before further integration > into ITK. > > Brad > > [1] > https://github.com/blowekamp/itkStreamingSinc/commit/d8415cf137d69a0e81b6dd46145d8cb7df2825c3 > > [2] https://github.com/InsightSoftwareConsortium/ITK/blob/8f7c404aff99f5ae3dfedce6e480701f0304864c/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L118-Lundefined > > On Apr 17, 2015, at 12:12 PM, Grothausmann, Roman Dr. > wrote: > >> Dear Brad, dear Richard, >> >> >> Many thanks for Your replies. So, if I understand You correctly, the >> problem is that the current framework (with StreamingImageFilter) will run >> AfterThreadedGenerateData for each chunk and not just when the whole image >> has been processed. So one would need to combine StatisticsImageFilter and >> StreamingImageFilter into one filter, i.e. basically that the part of >> AfterThreadedGenerateData is executed by StreamingImageFilter. If I >> understand the code of itkStreamingSinc correctly, this is what it does? >> itkStreamingSinc provides a base class to combine multi-threaded filters >> with a StreamingImageFilter to make them streamable. This comes with the >> trade-off that the resulting filter will not provide an output, which is no >> problem if it is not needed. So, e.g. itkStreamingStatisticsImageFilter >> cannot be connected to itkPipelineMonitorImageFilter as it would need an >> output of itkStreamingStatisticsImageFilter? >> >> Many thanks Brad for implementing itkStreamingStatisticsImageFilter. I just >> tested it and it works perfectly >> (https://github.com/romangrothausmann/ITK-CLIs/commit/38bcad35bf004feaf2189bdaaffcf398fbca1f60). >> >> Though, I do not understand the changes You made in: https://github.com/blowekamp/itkStreamingSinc/commit/b4ae9b61dc08388fbf1b3bfd9e5cf570dd40a0c6 >> Is the accumulation that still resides in AfterStreamedGenerateData not >> used at all? >> (https://github.com/blowekamp/itkStreamingSinc/commit/dae948bea0966a2c3924351bf9c15bfcef318ac6#diff-ad64d497b8f9aadd5da97c5e1c793dc9R210) >> >> Just as a side note: The progress reported by itkStreamingStatisticsImageFilter jumps to 100% for each chunk. >> >> All in all Your itkStreamingSinc and the implemented streaming-filters are >> really a great contribution to ITK and I fully recommend incorporating it >> into ITK. >> >> Many thanks again Roman >> >> >> On 17/04/15 15:47, Bradley Lowekamp wrote: >>> Hi, >>> >>> I was able to easy update a the StatisticsImageFilter to use my >>> streaming base class for reduction algorithms [1]. It runs basically the >>> same expect that you can set the number of stream divisions[2], there is >>> the potential for setting the way the input image is split via the >>> RegionSplitter in a base class [3]. >>> >>> You should be able to just clone the repository into you >>> ITK/Modules/External directory, then enable it in the CMake configuration >>> to use. >>> >>> Please let me know if it works for you. >>> >>> This should help :) Brad > [1] >>> https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkStreamingStatisticsImageFilter.h >>> >>> [2] https://github.com/blowekamp/itkStreamingSinc/blob/master/test/itkStreamingStatisticsImageFilterTest2.cxx#L61 >>> [3] >>> https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkImageSinc.h#L99 >>> >>> >>> >>> >>> On Apr 17, 2015, at 7:14 AM, Bradley Lowekamp >>> wrote: >>> >>>> Hello fellow mailing list member, >>>> >>>> Currently in ITK there are two base classes for streaming images in >>>> ITK. The >> ImageToImageFilter provide the framework of streaming one input region to >> one output region. The other is the StreamingImageFilter which provides >> the framework to stream multiple image regions and merge them together into >> a single output image. This StatisticsImageFilter needs a framework which >> consumes multiple input image regions and reduces the data produced. I >> happen to have implemented such a framework here [1]. It currently has the >> LabelStatisticsImageFilter implemented in a streaming fashion. >>>> >>>> Let me give it a try and see how quickly I can get the >>>> StatisticsImageFilter >> in this framework. Help writing tests would be appreciated. >>>> >>>> Thanks, Brad >>>> >>>> [1] https://github.com/blowekamp/itkStreamingSinc >>>> >>>> On Apr 17, 2015, at 5:08 AM, Dr. Roman Grothausmann >>>> wrote: >>>> >>>>> Dear mailing list members, >>>>> >>>>> >>>>> I'm wondering why the itkStatisticsImageFilter cannot stream? Looking >>>>> into itkStatisticsImageFilter.hxx it requests the whole input in >>>>> GenerateInputRequestedRegion and EnlargeOutputRequestedRegion but in >>>>> ThreadedGenerateData only iterates over the outputRegionForThread. >>>>> Where in the code is the whole input image needed as one single >>>>> block? >>>>> >>>>> Thanks for any 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-2900 _____________________________________ Powered >>>>> by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the 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-2900 > -- 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-2900 From arnaudgelas at gmail.com Mon Apr 20 04:46:03 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Mon, 20 Apr 2015 10:46:03 +0200 Subject: [ITK-users] Pixel operations on subsets of label objects In-Reply-To: References: <1429294087288-35543.post@n7.nabble.com> Message-ID: <9FC105F5-9C4B-40B6-ABCA-3C7A8CC0D2C4@gmail.com> Hi, One LabelObject is a collection of lines aligned in the first dimension (X axis aligned). It is not really straightforward to get the 2nd slice of one? One possibility: You can first make use of ShapeLabelMap to get the bounding box of LabelObjects, from this one you can then deduce the slice of interest for each LabelObjects. For all LabelObject lo extract lo into one LabelMap convert this LabelMap into BinaryImage make the input image with this binary mask extract the slice of interest based on its bounding box compute threshold HTH Arnaud > On 18 Apr 2015, at 20:43, wrote: > > Thanks for the reply > > I am handling 3d voxel data. Starting from gray levels I want to run a connected components but keep the gray level data and iterate over the label map, > The property I am interested in is not in the shape label map, nor in the statistics label map. > > I would like to compute the threshold for every 2d slice of the 3d label object separately. For this I would need to extract the pixels of the label object and use the extract slice image filter on it. Any idea how this can be done ? > > > Thanks jp > > On Friday, April 17, 2015, Pol Mons? Purt? > wrote: > Hello jp, > > How do you distinguish which objects are you interested in and what operations do you want to perform? > > Maybe this example is helpful to you: http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter > > HTH, > > Pol > > 2015-04-17 20:08 GMT+02:00 jp >: > Dear all, > I would like to iterate over the label object and perform pixel operations > of a subset of a label object. > Currently fail to see how i can set up the label manipulation tools of itk > to achieve this > > Thank you > > jp > > > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/Pixel-operations-on-subsets-of-label-objects-tp35543.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Mon Apr 20 05:24:15 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Mon, 20 Apr 2015 11:24:15 +0200 Subject: [ITK-users] ANN: CMake Course - June 1 in Lyon, France In-Reply-To: <53BD4650.6070909@kitware.com> References: <53BD4650.6070909@kitware.com> Message-ID: <5534C5BF.2020605@kitware.com> Kitware will be holding a CMake training course on June 1, 2015 at Kitware's office in Lyon, France. This one-day course will cover CMake, CTest, CPack and CDash. Visit our website for more information and registration details (early registration and student discounts available): http://training.kitware.fr/browse/79 Note that the course will be taught in English. If you have any questions, please contact us at training at kitware.fr. We are looking forward to seeing you in Lyon, Julien -- Kitware SAS 26 rue Louis Gu?rin 69100 Villeurbanne, France http://www.kitware.eu From JohannesWeber at gmx.at Mon Apr 20 05:53:29 2015 From: JohannesWeber at gmx.at (JohannesWeber at gmx.at) Date: Mon, 20 Apr 2015 11:53:29 +0200 Subject: [ITK-users] linker problem Message-ID: An HTML attachment was scrubbed... URL: From JohannesWeber at gmx.at Mon Apr 20 06:10:58 2015 From: JohannesWeber at gmx.at (JohannesWeber at gmx.at) Date: Mon, 20 Apr 2015 12:10:58 +0200 Subject: [ITK-users] testing Message-ID: An HTML attachment was scrubbed... URL: From matimontg at gmail.com Mon Apr 20 09:00:01 2015 From: matimontg at gmail.com (Matias Montroull) Date: Mon, 20 Apr 2015 10:00:01 -0300 Subject: [ITK-users] SimpleITK | Write to Memory rather than Disk Message-ID: Hi, I'm working on a project to rescale images in SimpleITK, it all works perfect but I would like not to write the images to disk and rather keep them in memory until I want to save them. Is there a way to do this in SimpleITK? Thanks, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Mon Apr 20 14:09:00 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 20 Apr 2015 14:09:00 -0400 Subject: [ITK-users] why can the itkStatisticsImageFilter not stream? In-Reply-To: <5534B925.60904@mh-hannover.de> References: <5530CDA2.6050603@mh-hannover.de> <9FFA219D-8E98-4524-9E59-3164AF8DE0DD@mail.nih.gov> <9D3D6598-4AB3-4DD0-81EC-81CB3C8F3BBB@mail.nih.gov> <553130E1.5070909@mh-hannover.de> <5534B925.60904@mh-hannover.de> Message-ID: <2F0D626E-F982-41DD-86BF-5DE18F8861FF@mail.nih.gov> Roman, On Apr 20, 2015, at 4:30 AM, Grothausmann, Roman Dr. wrote: > Many thanks for Your answers and for also fixing the progress reporting. Just tested and it works like a charm. It's a really great contribution especially for those having to work with very big images. I'll give it a try to use Your itkImageSinc to implement a "chunk writer" taking StreamingStatisticsImage as an example and ImageRegionSplitterMultidimensional to create the chunks. If you are implementing a writer derived from StreamingSinc, you should implement StreamedGenerateData, not ThreadedStreamedGenerate data as you don't want threading. > > If I set the NumberOfStreamDivisions to the number of slices in the 3D Stack Input, is it guaranteed that each slice will be processed on its own for the default ImageRegionSplitterSlowDimension? > Or would I have to use an approach as in itkJoinSeriesImageFilterStreamingTest.cxx employing itkExtractImageFilter for each slice? The StreamedGenerateData method would get invoked for each slice with that slice being the specified region. However, the specified region provided to StreamedGenerateData may be smaller than the buffered region of the image. It may be best and most general to use the ExtractImageFilter to make sure the buffer is as expected. > > In the docs of ImageSeriesWriter it says: "Usually, the output image type will have fewer dimensions than the input image type." > Is there a way to use the ImageSeriesWriter to save a series of hypercubes as ImageRegionSplitterMultidimensional would yield internally? I don't think it has this feature. > > Thanks for any help or hints. > Roman > > On 17/04/15 20:13, Bradley Lowekamp wrote: >> Hello, >> >> Glad to hear it worked for you. >> >> I have just fixed the progress reporting [1]. >> >> The StreamingImageFilter overloads the UpdateData method [2], by passing the >> standard ImageToImage/ImageSource methods such and GenerateData, >> ThreadedGenerateData etc. It's actually not really designed to be derived >> from, and it used mostly to drive the streaming of a pipeline. It can be seen >> as slicing up the output image in to pieces, and requesting those pieces from >> the pipeline, the assembling them into the output image. >> >> The resulting behavior of the ImageSinc, with the StreamingProcessObject goes >> something like this: >> >> >> BeforeStreamedGenerateData() >> >> For each requested streamed chunk: For each thread process part of streamed >> chunk: ThreadedStreamedGenerateData() >> >> AfterStreamedGenerateData() >> >> So the input image is getting sliced up twice the first for streaming and the >> second for multi-threading. >> >> The StreamingImageFitler could be rewritten onto this framework to perhaps >> provide a generalized base class. >> >> For the StreamingStatisticsImage filter, the statistics are accumulated for >> each thread multiple times ( for each streamed chunk ), then the totals from >> the threads are reduced to the results. >> >> These classes certainly need more documentation before further integration >> into ITK. >> >> Brad >> >> [1] >> https://github.com/blowekamp/itkStreamingSinc/commit/d8415cf137d69a0e81b6dd46145d8cb7df2825c3 >> >> > [2] https://github.com/InsightSoftwareConsortium/ITK/blob/8f7c404aff99f5ae3dfedce6e480701f0304864c/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L118-Lundefined >> >> On Apr 17, 2015, at 12:12 PM, Grothausmann, Roman Dr. >> wrote: >> >>> Dear Brad, dear Richard, >>> >>> >>> Many thanks for Your replies. So, if I understand You correctly, the >>> problem is that the current framework (with StreamingImageFilter) will run >>> AfterThreadedGenerateData for each chunk and not just when the whole image >>> has been processed. So one would need to combine StatisticsImageFilter and >>> StreamingImageFilter into one filter, i.e. basically that the part of >>> AfterThreadedGenerateData is executed by StreamingImageFilter. If I >>> understand the code of itkStreamingSinc correctly, this is what it does? >>> itkStreamingSinc provides a base class to combine multi-threaded filters >>> with a StreamingImageFilter to make them streamable. This comes with the >>> trade-off that the resulting filter will not provide an output, which is no >>> problem if it is not needed. So, e.g. itkStreamingStatisticsImageFilter >>> cannot be connected to itkPipelineMonitorImageFilter as it would need an >>> output of itkStreamingStatisticsImageFilter? >>> >>> Many thanks Brad for implementing itkStreamingStatisticsImageFilter. I just >>> tested it and it works perfectly >>> (https://github.com/romangrothausmann/ITK-CLIs/commit/38bcad35bf004feaf2189bdaaffcf398fbca1f60). >>> >>> > Though, I do not understand the changes You made in: https://github.com/blowekamp/itkStreamingSinc/commit/b4ae9b61dc08388fbf1b3bfd9e5cf570dd40a0c6 >>> Is the accumulation that still resides in AfterStreamedGenerateData not >>> used at all? >>> (https://github.com/blowekamp/itkStreamingSinc/commit/dae948bea0966a2c3924351bf9c15bfcef318ac6#diff-ad64d497b8f9aadd5da97c5e1c793dc9R210) >>> >>> > Just as a side note: The progress reported by itkStreamingStatisticsImageFilter jumps to 100% for each chunk. >>> >>> All in all Your itkStreamingSinc and the implemented streaming-filters are >>> really a great contribution to ITK and I fully recommend incorporating it >>> into ITK. >>> >>> Many thanks again Roman >>> >>> >>> On 17/04/15 15:47, Bradley Lowekamp wrote: >>>> Hi, >>>> >>>> I was able to easy update a the StatisticsImageFilter to use my >>>> streaming base class for reduction algorithms [1]. It runs basically the >>>> same expect that you can set the number of stream divisions[2], there is >>>> the potential for setting the way the input image is split via the >>>> RegionSplitter in a base class [3]. >>>> >>>> You should be able to just clone the repository into you >>>> ITK/Modules/External directory, then enable it in the CMake configuration >>>> to use. >>>> >>>> Please let me know if it works for you. >>>> >>>> This should help :) Brad > [1] >>>> https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkStreamingStatisticsImageFilter.h >>>> >>>> > [2] https://github.com/blowekamp/itkStreamingSinc/blob/master/test/itkStreamingStatisticsImageFilterTest2.cxx#L61 >>>> [3] >>>> https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkImageSinc.h#L99 >>>> >>>> >>>> >>>> >>>> > On Apr 17, 2015, at 7:14 AM, Bradley Lowekamp >>>> wrote: >>>> >>>>> Hello fellow mailing list member, >>>>> >>>>> Currently in ITK there are two base classes for streaming images in >>>>> ITK. The >>> ImageToImageFilter provide the framework of streaming one input region to >>> one output region. The other is the StreamingImageFilter which provides >>> the framework to stream multiple image regions and merge them together into >>> a single output image. This StatisticsImageFilter needs a framework which >>> consumes multiple input image regions and reduces the data produced. I >>> happen to have implemented such a framework here [1]. It currently has the >>> LabelStatisticsImageFilter implemented in a streaming fashion. >>>>> >>>>> Let me give it a try and see how quickly I can get the >>>>> StatisticsImageFilter >>> in this framework. Help writing tests would be appreciated. >>>>> >>>>> Thanks, Brad >>>>> >>>>> [1] https://github.com/blowekamp/itkStreamingSinc >>>>> >>>>> On Apr 17, 2015, at 5:08 AM, Dr. Roman Grothausmann >>>>> wrote: >>>>> >>>>>> Dear mailing list members, >>>>>> >>>>>> >>>>>> I'm wondering why the itkStatisticsImageFilter cannot stream? Looking >>>>>> into itkStatisticsImageFilter.hxx it requests the whole input in >>>>>> GenerateInputRequestedRegion and EnlargeOutputRequestedRegion but in >>>>>> ThreadedGenerateData only iterates over the outputRegionForThread. >>>>>> Where in the code is the whole input image needed as one single >>>>>> block? >>>>>> >>>>>> Thanks for any 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-2900 _____________________________________ Powered >>>>>> by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>> http://www.kitware.com/products/protraining.php >>>>>> >>>>>> Please keep messages on-topic and check the 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-2900 >> > > -- > 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-2900 From bastianra at gmail.com Mon Apr 20 15:45:35 2015 From: bastianra at gmail.com (Bastian A.) Date: Mon, 20 Apr 2015 15:45:35 -0400 Subject: [ITK-users] Buffered region of size [0, 0, 0] Message-ID: Hi, I am trying to multiply two images in a loop. Calling Print() on the inputs of the MultiplyImageFilter seems to indicate that they have the same LargestPossible, Buffered and Requested regions. However, calling UpdateLargestPossibleRegion on the MultiplyImageFilter will result in the failed assertion during the first iteration: Assertion `Region ImageRegion (0x7fff777f5b80) Dimension: 3 Index: [-95, -171, -52] Size: [188, 675, 10] is outside of buffered region ImageRegion (0xdec558) Dimension: 3 Index: [0, 0, 0] Size: [0, 0, 0] ' failed. I am completely lost here, why would the buffered region be of size [0, 0, 0]? My assuption was that AllocateOutputs() in the filter I am calling would take care of setting the requested region; both inputs seem to have the correct regions set. Any pointers on how to debug this issue would be great. Thanks, Bastian -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Mon Apr 20 15:57:07 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 20 Apr 2015 15:57:07 -0400 Subject: [ITK-users] linker problem In-Reply-To: References: Message-ID: Hi Johannes, Welcome to ITK! If there is an unknown problem with the build, then the most reliable approach may be to delete the build tree and do a fresh build. In your CMake configuration, turn off BUILD_TESTING and BUILD_EXAMPLES for a faster build. Hope this helps, Matt On Mon, Apr 20, 2015 at 5:53 AM, wrote: > Hello! > > For a while now I have troubles with the itk libaries. I am working on > windows with visual studio 2012 express. I generate my project with cmake > and than start the visual studio sln file. If I now want to build it, it > says it can't find the "itkdouble-conversion.lib". If I take look into the > projects properties, configuration properties, linker, input and additinonal > dependencies (I am translating those terms from the german version, but I > hope it is clear what I mean) than there are among others the itk entries, > but they seem to be wrong. For other correct working projects generated with > cmake the itk libaries are there with the full correct path like > C:\ITK\Build\lib\Release\itkdouble-conversion-4.7.lib. > > So in the "broken" project the lib entry is only "itkdouble-conversion.lib" > but it should be "C:\ITK\Build\lib\Release\itkdouble-conversion-4.7.lib" > > sometimes it works, sometimes not and I can not find out what the problem > is. At the moment I am stuck because the project always has the wrong > paths/dependencies. The cmake file is always the same, I never changed > anything! > > # This is the root ITK CMakeLists file. > cmake_minimum_required(VERSION 2.4) > if(COMMAND CMAKE_POLICY) > cmake_policy(SET CMP0003 NEW) > endif() > > # This project is designed to be built outside the Insight source tree. > project(project) > # Find ITK. > find_package(ITK REQUIRED) > include(${ITK_USE_FILE}) > add_executable(projectBME main.cxx Thickness.h Thickness.cxx DistanceRidge.h > DistanceRidge.cxx SurfaceCleanUp.h SurfaceCleanUp.cxx Statistic.h > Statistic.cxx) > target_link_libraries(projectBME ${ITK_LIBRARIES}) > > The problem was with cmake 3.2.1 and just before I installed the newest > version of cmake 3.2.2 and it is the same. > Don't know if that is maybe the reason, but I am working on two different > PCs, the source folder is on dropbox, the build folder with the visual > studio project is local on the PC on the desktop. But at the beginning > everything worked fine and just for a while now when I am generating the > project with cmake than I am getting the linker error. > > Thanks a lot! > > greetings > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK 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 Apr 20 16:10:19 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 20 Apr 2015 16:10:19 -0400 Subject: [ITK-users] testing In-Reply-To: References: Message-ID: Hi Johannes, A best practice is to also compare generated images against a baseline. ITK builds an executable called itkTestDriver that capable of reading medical image formats and performing comparisons on images [1]. This can be useful when building code not in an ITK Module. If you are writing an ITK Module, then the CreateTestDriver CMake macro can be used to build a test driver executable that also has this image comparison functionality built in [2][3]. Finally, ITK comes with some macros that can be useful for quickly writing tests [4]. Hope this helps, Matt [1] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Core/TestKernel/src/itkTestDriver.cxx;h=162cff2d2ca615958f7a3dbfdf535fe0b26b9d2a;hb=HEAD [2] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Core/TestKernel/CreateTestDriver.cmake;h=02ffeb172588c87d81b48e990c219f1c16ce3a21;hb=HEAD [3] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Filtering/Colormap/test/CMakeLists.txt;h=f53220656495ec72b31b73d72ce4d7ad55797902;hb=HEAD#l7 [4] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Core/TestKernel/include/itkTestingMacros.h;h=ef778fdb96ae417397b79ba6f02d4235caa7c379;hb=HEAD On Mon, Apr 20, 2015 at 6:10 AM, wrote: > Hello! > > After writing a new filter testing is needed, and I am new to this... so > when I am right, CTest is about "managing" the tests and running them and so > stuff. But the first prolem that I have is how to implement them? I found > this site: http://www.itk.org/Wiki/ITK/Release_4/UnitTesting > but I can not find this itkTestHarness. If I am right, the testing framework > can be anyone (GTest, ...). But for simple image comparing do I need one? I > also found the ComparisonImageFilter... so if I have a valid output and I > compare it with my output from my filter, than I can just say return 0 if > everything is right and something else if not. > So all in all... maybe some hints for a general testing guide for newbies > and for testing within itk? > and besides: i am working with visual studio 2012 express... > > thanks a lot!! > > greetings, Johannes > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From bastianra at gmail.com Mon Apr 20 16:14:24 2015 From: bastianra at gmail.com (Bastian A.) Date: Mon, 20 Apr 2015 16:14:24 -0400 Subject: [ITK-users] Buffered region of size [0, 0, 0] In-Reply-To: References: Message-ID: To answer my own question: the issue was that one of the filters upstream had set InPlaceOn(), which caused one of the inputs require later to be destroyed. See http://public.kitware.com/pipermail/insight-users/2011-November/043084.html for details. Bastian On Mon, Apr 20, 2015 at 3:45 PM, Bastian A. wrote: > Hi, > > I am trying to multiply two images in a loop. Calling Print() on the > inputs of the MultiplyImageFilter seems to indicate that they have the > same LargestPossible, Buffered and Requested regions. > However, calling UpdateLargestPossibleRegion on the MultiplyImageFilter > will result in the failed assertion during the first iteration: > > Assertion `Region ImageRegion (0x7fff777f5b80) > Dimension: 3 > Index: [-95, -171, -52] > Size: [188, 675, 10] > is outside of buffered region ImageRegion (0xdec558) > Dimension: 3 > Index: [0, 0, 0] > Size: [0, 0, 0] > ' failed. > > I am completely lost here, why would the buffered region be of size [0, 0, > 0]? > My assuption was that AllocateOutputs() in the filter I am calling would > take care of setting the requested region; both inputs seem to have the > correct regions set. > > Any pointers on how to debug this issue would be great. > > Thanks, > Bastian > -------------- next part -------------- An HTML attachment was scrubbed... URL: From johannesweber at gmx.at Mon Apr 20 16:21:24 2015 From: johannesweber at gmx.at (Johannes Weber) Date: Mon, 20 Apr 2015 22:21:24 +0200 Subject: [ITK-users] linker problem In-Reply-To: References: Message-ID: <55355FC4.2000206@gmx.at> Hi! thank you for your reply! The build from ITK itself is ok and working! The problem occurs when I am generating my own project with cmake. But the problem was not from the beginning on... when I started working with ITK everything was fine. Then this problem occured... than it worked again, than again dont and so on... I tried very often to delete the build folder and generate it new, tried other paths, copying the source folder somewhere else, including more or less files in the project (with the cmake file), ... it is stopping me from productive working now for a while and I can not figure out what the problem is. Am 20.04.2015 um 21:57 schrieb Matt McCormick: > Hi Johannes, > > Welcome to ITK! > > If there is an unknown problem with the build, then the most reliable > approach may be to delete the build tree and do a fresh build. In your > CMake configuration, turn off BUILD_TESTING and BUILD_EXAMPLES for a > faster build. > > Hope this helps, > Matt > > On Mon, Apr 20, 2015 at 5:53 AM, wrote: >> Hello! >> >> For a while now I have troubles with the itk libaries. I am working on >> windows with visual studio 2012 express. I generate my project with cmake >> and than start the visual studio sln file. If I now want to build it, it >> says it can't find the "itkdouble-conversion.lib". If I take look into the >> projects properties, configuration properties, linker, input and additinonal >> dependencies (I am translating those terms from the german version, but I >> hope it is clear what I mean) than there are among others the itk entries, >> but they seem to be wrong. For other correct working projects generated with >> cmake the itk libaries are there with the full correct path like >> C:\ITK\Build\lib\Release\itkdouble-conversion-4.7.lib. >> >> So in the "broken" project the lib entry is only "itkdouble-conversion.lib" >> but it should be "C:\ITK\Build\lib\Release\itkdouble-conversion-4.7.lib" >> >> sometimes it works, sometimes not and I can not find out what the problem >> is. At the moment I am stuck because the project always has the wrong >> paths/dependencies. The cmake file is always the same, I never changed >> anything! >> >> # This is the root ITK CMakeLists file. >> cmake_minimum_required(VERSION 2.4) >> if(COMMAND CMAKE_POLICY) >> cmake_policy(SET CMP0003 NEW) >> endif() >> >> # This project is designed to be built outside the Insight source tree. >> project(project) >> # Find ITK. >> find_package(ITK REQUIRED) >> include(${ITK_USE_FILE}) >> add_executable(projectBME main.cxx Thickness.h Thickness.cxx DistanceRidge.h >> DistanceRidge.cxx SurfaceCleanUp.h SurfaceCleanUp.cxx Statistic.h >> Statistic.cxx) >> target_link_libraries(projectBME ${ITK_LIBRARIES}) >> >> The problem was with cmake 3.2.1 and just before I installed the newest >> version of cmake 3.2.2 and it is the same. >> Don't know if that is maybe the reason, but I am working on two different >> PCs, the source folder is on dropbox, the build folder with the visual >> studio project is local on the PC on the desktop. But at the beginning >> everything worked fine and just for a while now when I am generating the >> project with cmake than I am getting the linker error. >> >> Thanks a lot! >> >> greetings >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK 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 Apr 20 17:01:24 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 20 Apr 2015 17:01:24 -0400 Subject: [ITK-users] linker problem In-Reply-To: <55355FC4.2000206@gmx.at> References: <55355FC4.2000206@gmx.at> Message-ID: Hi, Is the configuration type in Visual Studio consistent between ITK and your project? There is usually a dropdown that has "Debug", "Release", etc. If this is a problem, then limit the types available in the CMAKE_CONFIGURATION_TYPES CMake variable to a single type -- they will always be compatible in this case. HTH, Matt On Mon, Apr 20, 2015 at 4:21 PM, Johannes Weber wrote: > Hi! > > thank you for your reply! > > The build from ITK itself is ok and working! The problem occurs when I am > generating my own project with cmake. But the problem was not from the > beginning on... when I started working with ITK everything was fine. Then > this problem occured... than it worked again, than again dont and so on... > I tried very often to delete the build folder and generate it new, tried > other paths, copying the source folder somewhere else, including more or > less files in the project (with the cmake file), ... it is stopping me from > productive working now for a while and I can not figure out what the problem > is. > > > Am 20.04.2015 um 21:57 schrieb Matt McCormick: >> >> Hi Johannes, >> >> Welcome to ITK! >> >> If there is an unknown problem with the build, then the most reliable >> approach may be to delete the build tree and do a fresh build. In your >> CMake configuration, turn off BUILD_TESTING and BUILD_EXAMPLES for a >> faster build. >> >> Hope this helps, >> Matt >> >> On Mon, Apr 20, 2015 at 5:53 AM, wrote: >>> >>> Hello! >>> >>> For a while now I have troubles with the itk libaries. I am working on >>> windows with visual studio 2012 express. I generate my project with cmake >>> and than start the visual studio sln file. If I now want to build it, it >>> says it can't find the "itkdouble-conversion.lib". If I take look into >>> the >>> projects properties, configuration properties, linker, input and >>> additinonal >>> dependencies (I am translating those terms from the german version, but I >>> hope it is clear what I mean) than there are among others the itk >>> entries, >>> but they seem to be wrong. For other correct working projects generated >>> with >>> cmake the itk libaries are there with the full correct path like >>> C:\ITK\Build\lib\Release\itkdouble-conversion-4.7.lib. >>> >>> So in the "broken" project the lib entry is only >>> "itkdouble-conversion.lib" >>> but it should be "C:\ITK\Build\lib\Release\itkdouble-conversion-4.7.lib" >>> >>> sometimes it works, sometimes not and I can not find out what the problem >>> is. At the moment I am stuck because the project always has the wrong >>> paths/dependencies. The cmake file is always the same, I never changed >>> anything! >>> >>> # This is the root ITK CMakeLists file. >>> cmake_minimum_required(VERSION 2.4) >>> if(COMMAND CMAKE_POLICY) >>> cmake_policy(SET CMP0003 NEW) >>> endif() >>> >>> # This project is designed to be built outside the Insight source tree. >>> project(project) >>> # Find ITK. >>> find_package(ITK REQUIRED) >>> include(${ITK_USE_FILE}) >>> add_executable(projectBME main.cxx Thickness.h Thickness.cxx >>> DistanceRidge.h >>> DistanceRidge.cxx SurfaceCleanUp.h SurfaceCleanUp.cxx Statistic.h >>> Statistic.cxx) >>> target_link_libraries(projectBME ${ITK_LIBRARIES}) >>> >>> The problem was with cmake 3.2.1 and just before I installed the newest >>> version of cmake 3.2.2 and it is the same. >>> Don't know if that is maybe the reason, but I am working on two different >>> PCs, the source folder is on dropbox, the build folder with the visual >>> studio project is local on the PC on the desktop. But at the beginning >>> everything worked fine and just for a while now when I am generating the >>> project with cmake than I am getting the linker error. >>> >>> Thanks a lot! >>> >>> greetings >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> > From cyril.mory at creatis.insa-lyon.fr Tue Apr 21 03:36:57 2015 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Tue, 21 Apr 2015 09:36:57 +0200 Subject: [ITK-users] Smallest region containing the physical space covered by another image's region In-Reply-To: References: <55279FAB.7060304@creatis.insa-lyon.fr> <552E4A24.8020606@creatis.insa-lyon.fr> <552F7ADE.9040909@creatis.insa-lyon.fr> Message-ID: <5535FE19.5050009@creatis.insa-lyon.fr> Hi Matt, I had already done the push when I sent you the mail. Running "git gerrit-push" now fails with the error "No new changes", so I suppose the push went fine. Let me know if something didn't go as expected. Thanks a lot for your help, Cyril On 04/16/2015 05:18 PM, Matt McCormick wrote: > Hi Cyril, > > Excellent, thanks for the update! > > Yes, avoiding the circular dependency between ImageBase and > ImageRegion could be tricky. Please push what you have. I may take a > shot at getting around the circular dependency. > > Thanks, > Matt > > On Thu, Apr 16, 2015 at 5:03 AM, Cyril Mory > wrote: >> Hi Matt, >> >> Thank you for your detailed comments. I fixed most of the issues you spotted >> and amended the patch. Unfortunately, I was unable to move the method to >> itkImageRegion: from there I could not use the itkImageBase methods >> TransformIndexToPhysicalPoint and TransformPhysicalPointToIndex. >> >> I am note familiar with forward declarations, friend classes and how they >> are meant to be used, so maybe it was possible indeed and I just did it >> wrong. >> >> Cyril >> >> >> On 04/15/2015 07:22 PM, Matt McCormick wrote: >>> Hi Cyril, >>> >>> Thanks for contributing the patch! >>> >>> I added a comments for some minor things on Gerrit. If it is more >>> convenient to do the computations manually than use BoundingBox, that >>> is fine. In terms of where to put it, the ImageRegion class may be a >>> better spot than ImageBase since there already are the PadByRadius, >>> ShrinkByRadius, and Crop methods. In terms of the name, perhaps >>> EnlargeOverBox or similar may be better. This is not a Get method like >>> other Get'ers, we avoid the passive 'ing verb, and Box or something >>> similar indicates we have done the computation in physical space >>> instead of index space, which "Region" may imply. >>> >>> Thanks, >>> Matt >>> >>> On Wed, Apr 15, 2015 at 7:23 AM, Cyril Mory >>> wrote: >>>> Hi Matt, >>>> >>>> I have added such a method to itkImageBase, it is called >>>> GetSmallestRegionContainingRegion. The patch is submitted on a branch >>>> with >>>> the same name. I made my best, but I think it will require more >>>> improvements >>>> than the previous one before it can get merged. >>>> >>>> In particular, I haven't used the itk::BoundingBox class, because from >>>> its >>>> description it seems to handle only itk::Point. Should I convert indexes >>>> to >>>> points, run the BoundingBox calculation, and convert back ? >>>> >>>> I'll wait for the comments >>>> Cyril >>>> >>>> >>>> On 04/13/2015 09:12 PM, Matt McCormick wrote: >>>>> Hi Cyril, >>>>> >>>>>> I am preparing a patch for the itkWarpImageFilter, and I came to >>>>>> realize >>>>>> that computing the requestedRegion of the inputs from the output's >>>>>> requested >>>>>> region is non trivial. >>>>> Great job on the patch submission! :-) >>>>> >>>>> >>>>>> - the displacement in the deformation field can be very large, in any >>>>>> direction, ... therefore there is no choice but to load the full input >>>>>> image >>>>>> into memory (unless we want to go through the whole deformation field >>>>>> to >>>>>> evaluate the maximum displacement, but in a method like >>>>>> GenerateInputRequestedRegion we do not want such heavy processing) >>>>>> => Input image's requested region should be the largest possible region >>>>> Yes, this is a good assessment. >>>>> >>>>> >>>>>> - the requested region in the deformation field, on the other hand, can >>>>>> be >>>>>> computed. But it is not trivial. If the output and the DF have >>>>>> identical >>>>>> information (spacing, origin, direction), then the requested region in >>>>>> the >>>>>> DF should be copied from the output. If their information differs, >>>>>> computing >>>>>> the requested region would require a method to compute the smallest >>>>>> rectangular region that contains the physical space covered by an other >>>>>> image's region, the other image having (potentially) a different >>>>>> spacing, >>>>>> origin and/or direction. Does such a method exist somewhere in ITK ? >>>>> A possible approach here could transform all corner indexes of the >>>>> output to physical space points, transform physical points to index >>>>> space of the DF, and compute a bounding box of these index points. >>>>> >>>>> The methods to apply could be >>>>> >>>>> TransformIndexToPhysicalPoint >>>>> TransformPhysicalPointToIndex >>>>> >>>>> on the ImageBase class and the itk::BoundingBox class. >>>>> >>>>> >>>>> HTH, >>>>> Matt >>>> From arnaudgelas at gmail.com Tue Apr 21 04:20:57 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Tue, 21 Apr 2015 10:20:57 +0200 Subject: [ITK-users] OutputFilter vs InputFilter in ObjectByObjectLabelMapFilter Message-ID: <3351F363-765B-4941-B7D4-612D803F6209@gmail.com> Hi Gaetan, I am spending quite some time on ObjectByObjectLabelMapFilter, and I don?t really understand conceptually the purpose of the OutputFilter vs the InputFilter. Can you give some explanations, please? Looking at the code, it is bogus if the OutputFilter is different from the InputFilter (in such a case, the pipeline is not fully connected, i.e. the output of the InputFilter is not connected to any internal filter). Thanks, Arnaud From lluna.nova at gmail.com Tue Apr 21 06:29:04 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Tue, 21 Apr 2015 12:29:04 +0200 Subject: [ITK-users] Creating a region to store LabelObjects Message-ID: Hello all, related to a couple of conversations we've had here I've noticed a strange behaviour that is related to the LabelMap representation. I have two label objects bounding box1 ImageRegion (0x7fd381317888) Dimension: 3 Index: [23, 40, 2] Size: [60, 71, 9] bounding box2 ImageRegion (0x7fd38131a328) Dimension: 3 Index: [74, 18, 2] Size: [24, 39, 9] If I create a region of size [100, 120, 11] it should be able to store those two objects. However, (maybe) that is not the case because the objects are not drawn at slice 2 but on slice 5 when I write the output of LabelMapToLabelImageFilter. There is no exception thrown, thought. I've also noticed that using the Shift function of the LabelObject doesn't change the object's boundingBox, which leds me to think that each pixel has a shift somehow not related to the bounding box. I can provide a Minimum Working Example if needed. I've read the article journal, but I couldn't see the answer, may be related to 'storing the label objects as lines', which I don't completely understand what's the graphical representation of those lines. What is going on? Cheers, Pol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gaetan.lehmann at gmail.com Tue Apr 21 06:50:28 2015 From: gaetan.lehmann at gmail.com (Gaetan Lehmann) Date: Tue, 21 Apr 2015 12:50:28 +0200 Subject: [ITK-users] OutputFilter vs InputFilter in ObjectByObjectLabelMapFilter In-Reply-To: <3351F363-765B-4941-B7D4-612D803F6209@gmail.com> References: <3351F363-765B-4941-B7D4-612D803F6209@gmail.com> Message-ID: Hi Arnaud, The output filter is there to be able to apply a pipeline to each object, instead of just a single filter. When applying a single filter, the input and output filters are the same filter. When applying a pipeline, the input and output filters are not the same filters, maybe not even the same type. It is the responsibility of the user to connect the pipeline properly - this is why the output of the input filter is never used. HTH, Ga?tan 2015-04-21 10:20 GMT+02:00 Arnaud Gelas : > Hi Gaetan, > > I am spending quite some time on ObjectByObjectLabelMapFilter, and I don?t > really understand conceptually the purpose of the OutputFilter vs the > InputFilter. Can you give some explanations, please? > > Looking at the code, it is bogus if the OutputFilter is different from the > InputFilter (in such a case, the pipeline is not fully connected, i.e. the > output of the InputFilter is not connected to any internal filter). > > Thanks, > Arnaud -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnaudgelas at gmail.com Tue Apr 21 06:52:52 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Tue, 21 Apr 2015 12:52:52 +0200 Subject: [ITK-users] OutputFilter vs InputFilter in ObjectByObjectLabelMapFilter In-Reply-To: References: <3351F363-765B-4941-B7D4-612D803F6209@gmail.com> Message-ID: <49863885-4DBA-42EA-8E5C-85792A5A855B@gmail.com> It makes sense!!! A working example to illustrate this and an update to the documentation may also help some users in future ;) Thanks, Arnaud > On 21 Apr 2015, at 12:50, Gaetan Lehmann wrote: > > Hi Arnaud, > > The output filter is there to be able to apply a pipeline to each object, instead of just a single filter. > When applying a single filter, the input and output filters are the same filter. > When applying a pipeline, the input and output filters are not the same filters, maybe not even the same type. It is the responsibility of the user to connect the pipeline properly - this is why the output of the input filter is never used. > > HTH, > > Ga?tan > > > > 2015-04-21 10:20 GMT+02:00 Arnaud Gelas >: > Hi Gaetan, > > I am spending quite some time on ObjectByObjectLabelMapFilter, and I don?t really understand conceptually the purpose of the OutputFilter vs the InputFilter. Can you give some explanations, please? > > Looking at the code, it is bogus if the OutputFilter is different from the InputFilter (in such a case, the pipeline is not fully connected, i.e. the output of the InputFilter is not connected to any internal filter). > > Thanks, > Arnaud > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnaudgelas at gmail.com Tue Apr 21 06:59:17 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Tue, 21 Apr 2015 12:59:17 +0200 Subject: [ITK-users] OutputFilter vs InputFilter in ObjectByObjectLabelMapFilter In-Reply-To: References: <3351F363-765B-4941-B7D4-612D803F6209@gmail.com> Message-ID: Here is a patch for the documentation: http://review.source.kitware.com/#/c/19657/ > On 21 Apr 2015, at 12:50, Gaetan Lehmann wrote: > > Hi Arnaud, > > The output filter is there to be able to apply a pipeline to each object, instead of just a single filter. > When applying a single filter, the input and output filters are the same filter. > When applying a pipeline, the input and output filters are not the same filters, maybe not even the same type. It is the responsibility of the user to connect the pipeline properly - this is why the output of the input filter is never used. > > HTH, > > Ga?tan > > > > 2015-04-21 10:20 GMT+02:00 Arnaud Gelas >: > Hi Gaetan, > > I am spending quite some time on ObjectByObjectLabelMapFilter, and I don?t really understand conceptually the purpose of the OutputFilter vs the InputFilter. Can you give some explanations, please? > > Looking at the code, it is bogus if the OutputFilter is different from the InputFilter (in such a case, the pipeline is not fully connected, i.e. the output of the InputFilter is not connected to any internal filter). > > Thanks, > Arnaud > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Tue Apr 21 09:04:10 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Tue, 21 Apr 2015 09:04:10 -0400 Subject: [ITK-users] OutputFilter vs InputFilter in ObjectByObjectLabelMapFilter In-Reply-To: References: <3351F363-765B-4941-B7D4-612D803F6209@gmail.com> Message-ID: <8A70CDC4-088A-422D-9BE6-EEC5E4DDAEB8@mail.nih.gov> Just for additional reference, the SliceBySliceImageFilter behaves the same way with its filter parameters. I can't think of any others. Brad On Apr 21, 2015, at 6:50 AM, Gaetan Lehmann wrote: > Hi Arnaud, > > The output filter is there to be able to apply a pipeline to each object, instead of just a single filter. > When applying a single filter, the input and output filters are the same filter. > When applying a pipeline, the input and output filters are not the same filters, maybe not even the same type. It is the responsibility of the user to connect the pipeline properly - this is why the output of the input filter is never used. > > HTH, > > Ga?tan > > > > 2015-04-21 10:20 GMT+02:00 Arnaud Gelas : > Hi Gaetan, > > I am spending quite some time on ObjectByObjectLabelMapFilter, and I don?t really understand conceptually the purpose of the OutputFilter vs the InputFilter. Can you give some explanations, please? > > Looking at the code, it is bogus if the OutputFilter is different from the InputFilter (in such a case, the pipeline is not fully connected, i.e. the output of the InputFilter is not connected to any internal filter). > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Tue Apr 21 10:22:53 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 21 Apr 2015 10:22:53 -0400 Subject: [ITK-users] Smallest region containing the physical space covered by another image's region In-Reply-To: <5535FE19.5050009@creatis.insa-lyon.fr> References: <55279FAB.7060304@creatis.insa-lyon.fr> <552E4A24.8020606@creatis.insa-lyon.fr> <552F7ADE.9040909@creatis.insa-lyon.fr> <5535FE19.5050009@creatis.insa-lyon.fr> Message-ID: Hi Cyril, Yes, thank you -- the new patch set looked good. It got a few more reviews here: http://review.source.kitware.com/#/c/19614/ including the suggestion to move the function to itk::ImageAlgorithm, which is a good location that will also not run into any other circular dependency conflicts. Please see if the additional comments can be addressed and if there is any trouble uploading the next patch set. Thanks, Matt On Tue, Apr 21, 2015 at 3:36 AM, Cyril Mory wrote: > Hi Matt, > > I had already done the push when I sent you the mail. Running "git > gerrit-push" now fails with the error "No new changes", so I suppose the > push went fine. > Let me know if something didn't go as expected. > > Thanks a lot for your help, > Cyril > > > On 04/16/2015 05:18 PM, Matt McCormick wrote: >> >> Hi Cyril, >> >> Excellent, thanks for the update! >> >> Yes, avoiding the circular dependency between ImageBase and >> ImageRegion could be tricky. Please push what you have. I may take a >> shot at getting around the circular dependency. >> >> Thanks, >> Matt >> >> On Thu, Apr 16, 2015 at 5:03 AM, Cyril Mory >> wrote: >>> >>> Hi Matt, >>> >>> Thank you for your detailed comments. I fixed most of the issues you >>> spotted >>> and amended the patch. Unfortunately, I was unable to move the method to >>> itkImageRegion: from there I could not use the itkImageBase methods >>> TransformIndexToPhysicalPoint and TransformPhysicalPointToIndex. >>> >>> I am note familiar with forward declarations, friend classes and how they >>> are meant to be used, so maybe it was possible indeed and I just did it >>> wrong. >>> >>> Cyril >>> >>> >>> On 04/15/2015 07:22 PM, Matt McCormick wrote: >>>> >>>> Hi Cyril, >>>> >>>> Thanks for contributing the patch! >>>> >>>> I added a comments for some minor things on Gerrit. If it is more >>>> convenient to do the computations manually than use BoundingBox, that >>>> is fine. In terms of where to put it, the ImageRegion class may be a >>>> better spot than ImageBase since there already are the PadByRadius, >>>> ShrinkByRadius, and Crop methods. In terms of the name, perhaps >>>> EnlargeOverBox or similar may be better. This is not a Get method like >>>> other Get'ers, we avoid the passive 'ing verb, and Box or something >>>> similar indicates we have done the computation in physical space >>>> instead of index space, which "Region" may imply. >>>> >>>> Thanks, >>>> Matt >>>> >>>> On Wed, Apr 15, 2015 at 7:23 AM, Cyril Mory >>>> wrote: >>>>> >>>>> Hi Matt, >>>>> >>>>> I have added such a method to itkImageBase, it is called >>>>> GetSmallestRegionContainingRegion. The patch is submitted on a branch >>>>> with >>>>> the same name. I made my best, but I think it will require more >>>>> improvements >>>>> than the previous one before it can get merged. >>>>> >>>>> In particular, I haven't used the itk::BoundingBox class, because from >>>>> its >>>>> description it seems to handle only itk::Point. Should I convert >>>>> indexes >>>>> to >>>>> points, run the BoundingBox calculation, and convert back ? >>>>> >>>>> I'll wait for the comments >>>>> Cyril >>>>> >>>>> >>>>> On 04/13/2015 09:12 PM, Matt McCormick wrote: >>>>>> >>>>>> Hi Cyril, >>>>>> >>>>>>> I am preparing a patch for the itkWarpImageFilter, and I came to >>>>>>> realize >>>>>>> that computing the requestedRegion of the inputs from the output's >>>>>>> requested >>>>>>> region is non trivial. >>>>>> >>>>>> Great job on the patch submission! :-) >>>>>> >>>>>> >>>>>>> - the displacement in the deformation field can be very large, in any >>>>>>> direction, ... therefore there is no choice but to load the full >>>>>>> input >>>>>>> image >>>>>>> into memory (unless we want to go through the whole deformation field >>>>>>> to >>>>>>> evaluate the maximum displacement, but in a method like >>>>>>> GenerateInputRequestedRegion we do not want such heavy processing) >>>>>>> => Input image's requested region should be the largest possible >>>>>>> region >>>>>> >>>>>> Yes, this is a good assessment. >>>>>> >>>>>> >>>>>>> - the requested region in the deformation field, on the other hand, >>>>>>> can >>>>>>> be >>>>>>> computed. But it is not trivial. If the output and the DF have >>>>>>> identical >>>>>>> information (spacing, origin, direction), then the requested region >>>>>>> in >>>>>>> the >>>>>>> DF should be copied from the output. If their information differs, >>>>>>> computing >>>>>>> the requested region would require a method to compute the smallest >>>>>>> rectangular region that contains the physical space covered by an >>>>>>> other >>>>>>> image's region, the other image having (potentially) a different >>>>>>> spacing, >>>>>>> origin and/or direction. Does such a method exist somewhere in ITK ? >>>>>> >>>>>> A possible approach here could transform all corner indexes of the >>>>>> output to physical space points, transform physical points to index >>>>>> space of the DF, and compute a bounding box of these index points. >>>>>> >>>>>> The methods to apply could be >>>>>> >>>>>> TransformIndexToPhysicalPoint >>>>>> TransformPhysicalPointToIndex >>>>>> >>>>>> on the ImageBase class and the itk::BoundingBox class. >>>>>> >>>>>> >>>>>> HTH, >>>>>> Matt >>>>> >>>>> > From lluna.nova at gmail.com Tue Apr 21 13:05:00 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Tue, 21 Apr 2015 19:05:00 +0200 Subject: [ITK-users] Creating a region to store LabelObjects In-Reply-To: References: Message-ID: After tweaking here and there, I believe the problem was mine that I was shifting the objects twice because it doesn't happen anymore. The Shift problem remains, thought. Shifting doesn't update the labelobject attributes, so, right now, I shift the pixels _and_ then shift (get,offset,set) the boundingbox, given that those are the attributes that I need. Cheers, Pol 2015-04-21 12:29 GMT+02:00 Pol Mons? Purt? : > Hello all, > > related to a couple of conversations we've had here I've noticed a strange > behaviour that is related to the LabelMap representation. > > I have two label objects > > bounding box1 ImageRegion (0x7fd381317888) > > Dimension: 3 > > Index: [23, 40, 2] > > Size: [60, 71, 9] > > > bounding box2 ImageRegion (0x7fd38131a328) > > Dimension: 3 > > Index: [74, 18, 2] > > Size: [24, 39, 9] > > > If I create a region of size [100, 120, 11] it should be able to store > those two objects. > > However, (maybe) that is not the case because the objects are not drawn at > slice 2 but on slice 5 when I write the output of > LabelMapToLabelImageFilter. There is no exception thrown, thought. > > I've also noticed that using the Shift function of the LabelObject doesn't > change the object's boundingBox, which leds me to think that each pixel has > a shift somehow not related to the bounding box. > > I can provide a Minimum Working Example if needed. > > I've read the article journal, but I couldn't see the answer, may be > related to 'storing the label objects as lines', which I don't completely > understand what's the graphical representation of those lines. > > What is going on? > > Cheers, > > Pol > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gaetan.lehmann at gmail.com Tue Apr 21 14:44:43 2015 From: gaetan.lehmann at gmail.com (Gaetan Lehmann) Date: Tue, 21 Apr 2015 20:44:43 +0200 Subject: [ITK-users] Creating a region to store LabelObjects In-Reply-To: References: Message-ID: Hi, The attributes are only updated by the filters, not by the label objects, so you should recompute the attributes after having after moving them. Ga?tan Le 21 avr. 2015 19:05, "Pol Mons? Purt?" a ?crit : > After tweaking here and there, I believe the problem was mine that I was > shifting the objects twice because it doesn't happen anymore. > > The Shift problem remains, thought. Shifting doesn't update the > labelobject attributes, so, right now, I shift the pixels _and_ then shift > (get,offset,set) the boundingbox, given that those are the attributes that > I need. > > Cheers, > > Pol > > 2015-04-21 12:29 GMT+02:00 Pol Mons? Purt? : > >> Hello all, >> >> related to a couple of conversations we've had here I've noticed a >> strange behaviour that is related to the LabelMap representation. >> >> I have two label objects >> >> bounding box1 ImageRegion (0x7fd381317888) >> >> Dimension: 3 >> >> Index: [23, 40, 2] >> >> Size: [60, 71, 9] >> >> >> bounding box2 ImageRegion (0x7fd38131a328) >> >> Dimension: 3 >> >> Index: [74, 18, 2] >> >> Size: [24, 39, 9] >> >> >> If I create a region of size [100, 120, 11] it should be able to store >> those two objects. >> >> However, (maybe) that is not the case because the objects are not drawn >> at slice 2 but on slice 5 when I write the output of >> LabelMapToLabelImageFilter. There is no exception thrown, thought. >> >> I've also noticed that using the Shift function of the LabelObject >> doesn't change the object's boundingBox, which leds me to think that each >> pixel has a shift somehow not related to the bounding box. >> >> I can provide a Minimum Working Example if needed. >> >> I've read the article journal, but I couldn't see the answer, may be >> related to 'storing the label objects as lines', which I don't completely >> understand what's the graphical representation of those lines. >> >> What is going on? >> >> Cheers, >> >> Pol >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lluna.nova at gmail.com Tue Apr 21 18:22:07 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Wed, 22 Apr 2015 00:22:07 +0200 Subject: [ITK-users] Creating a region to store LabelObjects In-Reply-To: References: Message-ID: excellent! thanks. Which method recomputes them? 2015-04-21 20:44 GMT+02:00 Gaetan Lehmann : > Hi, > > The attributes are only updated by the filters, not by the label objects, > so you should recompute the attributes after having after moving them. > > Ga?tan > Le 21 avr. 2015 19:05, "Pol Mons? Purt?" a ?crit : > >> After tweaking here and there, I believe the problem was mine that I was >> shifting the objects twice because it doesn't happen anymore. >> >> The Shift problem remains, thought. Shifting doesn't update the >> labelobject attributes, so, right now, I shift the pixels _and_ then shift >> (get,offset,set) the boundingbox, given that those are the attributes that >> I need. >> >> Cheers, >> >> Pol >> >> 2015-04-21 12:29 GMT+02:00 Pol Mons? Purt? : >> >>> Hello all, >>> >>> related to a couple of conversations we've had here I've noticed a >>> strange behaviour that is related to the LabelMap representation. >>> >>> I have two label objects >>> >>> bounding box1 ImageRegion (0x7fd381317888) >>> >>> Dimension: 3 >>> >>> Index: [23, 40, 2] >>> >>> Size: [60, 71, 9] >>> >>> >>> bounding box2 ImageRegion (0x7fd38131a328) >>> >>> Dimension: 3 >>> >>> Index: [74, 18, 2] >>> >>> Size: [24, 39, 9] >>> >>> >>> If I create a region of size [100, 120, 11] it should be able to store >>> those two objects. >>> >>> However, (maybe) that is not the case because the objects are not drawn >>> at slice 2 but on slice 5 when I write the output of >>> LabelMapToLabelImageFilter. There is no exception thrown, thought. >>> >>> I've also noticed that using the Shift function of the LabelObject >>> doesn't change the object's boundingBox, which leds me to think that each >>> pixel has a shift somehow not related to the bounding box. >>> >>> I can provide a Minimum Working Example if needed. >>> >>> I've read the article journal, but I couldn't see the answer, may be >>> related to 'storing the label objects as lines', which I don't completely >>> understand what's the graphical representation of those lines. >>> >>> What is going on? >>> >>> Cheers, >>> >>> Pol >>> >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From gaetan.lehmann at gmail.com Wed Apr 22 04:51:39 2015 From: gaetan.lehmann at gmail.com (Gaetan Lehmann) Date: Wed, 22 Apr 2015 10:51:39 +0200 Subject: [ITK-users] Creating a region to store LabelObjects In-Reply-To: References: Message-ID: 2015-04-22 0:22 GMT+02:00 Pol Mons? Purt? : > excellent! thanks. > > Which method recomputes them? > You can use ShapeLabelMapFilter to recompute the BoundingBox and all the attributes of ShapeLabelObject. Ga?tan > > 2015-04-21 20:44 GMT+02:00 Gaetan Lehmann : > >> Hi, >> >> The attributes are only updated by the filters, not by the label objects, >> so you should recompute the attributes after having after moving them. >> >> Ga?tan >> Le 21 avr. 2015 19:05, "Pol Mons? Purt?" a ?crit : >> >>> After tweaking here and there, I believe the problem was mine that I was >>> shifting the objects twice because it doesn't happen anymore. >>> >>> The Shift problem remains, thought. Shifting doesn't update the >>> labelobject attributes, so, right now, I shift the pixels _and_ then shift >>> (get,offset,set) the boundingbox, given that those are the attributes that >>> I need. >>> >>> Cheers, >>> >>> Pol >>> >>> 2015-04-21 12:29 GMT+02:00 Pol Mons? Purt? : >>> >>>> Hello all, >>>> >>>> related to a couple of conversations we've had here I've noticed a >>>> strange behaviour that is related to the LabelMap representation. >>>> >>>> I have two label objects >>>> >>>> bounding box1 ImageRegion (0x7fd381317888) >>>> >>>> Dimension: 3 >>>> >>>> Index: [23, 40, 2] >>>> >>>> Size: [60, 71, 9] >>>> >>>> >>>> bounding box2 ImageRegion (0x7fd38131a328) >>>> >>>> Dimension: 3 >>>> >>>> Index: [74, 18, 2] >>>> >>>> Size: [24, 39, 9] >>>> >>>> >>>> If I create a region of size [100, 120, 11] it should be able to store >>>> those two objects. >>>> >>>> However, (maybe) that is not the case because the objects are not drawn >>>> at slice 2 but on slice 5 when I write the output of >>>> LabelMapToLabelImageFilter. There is no exception thrown, thought. >>>> >>>> I've also noticed that using the Shift function of the LabelObject >>>> doesn't change the object's boundingBox, which leds me to think that each >>>> pixel has a shift somehow not related to the bounding box. >>>> >>>> I can provide a Minimum Working Example if needed. >>>> >>>> I've read the article journal, but I couldn't see the answer, may be >>>> related to 'storing the label objects as lines', which I don't completely >>>> understand what's the graphical representation of those lines. >>>> >>>> What is going on? >>>> >>>> Cheers, >>>> >>>> Pol >>>> >>> >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cr at neuro.ma.uni-heidelberg.de Wed Apr 22 05:16:51 2015 From: cr at neuro.ma.uni-heidelberg.de (Chr. Rossmanith) Date: Wed, 22 Apr 2015 11:16:51 +0200 Subject: [ITK-users] DCMTK_DIR Message-ID: <55376703.5070408@neuro.ma.uni-heidelberg.de> Hi, I'm building ITK 4.8. During configuring cmake sets DCMTK_DIR to /usr/local/lib/cmake/dcmtk where it finds DCMTKConfig.cmake - even if I set DCMTI_DIR to "/usr/local" prior to configuring. After installing ITK configuring my own project with cmake fails because a lot of dcmtk include dirs aren't found. Changing set(DCMTK_DIR "/usr/local/lib/cmake/dcmtk") to set(DCMTK_DIR "/usr/local") in /usr/local/lib/cmake/ITK-4.8/Modules/ITKDCMTK.cmake solves the problem. But that isn't a good fix because it it overwritten by installing ITK again or upgrading to a new version. Any ideas for a better solution? Christina Rossmanith From lluna.nova at gmail.com Wed Apr 22 06:24:54 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Wed, 22 Apr 2015 12:24:54 +0200 Subject: [ITK-users] Creating a region to store LabelObjects In-Reply-To: References: Message-ID: Ah I see, ShapeLabelMapFilter can be used to set the attributes values of the ShapeLabelObject in a LabelMap . And an example here: https://www.orfeo-toolbox.org/SoftwareGuide/SoftwareGuidech20.html Is it possible to call a method directly with a label object? (I only will have two labelobjects) Because otherwise, correct me if I'm wrong, in other to update the attributes I have to: get the (shifted!) bounding box of both objects allocate a labelMap with that region add the objects to the labelmap connect it to the input of spaceLabelMapFilter update. voil?. It sounds a bit like an overkill, specially the allocation. Is it problematic if I set the bounding box manually? I realise all the other attributes will be wrong until... Does any filter update the attributes or just ShapeLabelMapFilter? Thanks for the pointers, Pol 2015-04-22 10:51 GMT+02:00 Gaetan Lehmann : > > 2015-04-22 0:22 GMT+02:00 Pol Mons? Purt? : > >> excellent! thanks. >> >> Which method recomputes them? >> > > You can use ShapeLabelMapFilter to recompute the BoundingBox and all the > attributes of ShapeLabelObject. > > Ga?tan > > >> >> 2015-04-21 20:44 GMT+02:00 Gaetan Lehmann : >> >>> Hi, >>> >>> The attributes are only updated by the filters, not by the label >>> objects, so you should recompute the attributes after having after moving >>> them. >>> >>> Ga?tan >>> Le 21 avr. 2015 19:05, "Pol Mons? Purt?" a >>> ?crit : >>> >>>> After tweaking here and there, I believe the problem was mine that I >>>> was shifting the objects twice because it doesn't happen anymore. >>>> >>>> The Shift problem remains, thought. Shifting doesn't update the >>>> labelobject attributes, so, right now, I shift the pixels _and_ then shift >>>> (get,offset,set) the boundingbox, given that those are the attributes that >>>> I need. >>>> >>>> Cheers, >>>> >>>> Pol >>>> >>>> 2015-04-21 12:29 GMT+02:00 Pol Mons? Purt? : >>>> >>>>> Hello all, >>>>> >>>>> related to a couple of conversations we've had here I've noticed a >>>>> strange behaviour that is related to the LabelMap representation. >>>>> >>>>> I have two label objects >>>>> >>>>> bounding box1 ImageRegion (0x7fd381317888) >>>>> >>>>> Dimension: 3 >>>>> >>>>> Index: [23, 40, 2] >>>>> >>>>> Size: [60, 71, 9] >>>>> >>>>> >>>>> bounding box2 ImageRegion (0x7fd38131a328) >>>>> >>>>> Dimension: 3 >>>>> >>>>> Index: [74, 18, 2] >>>>> >>>>> Size: [24, 39, 9] >>>>> >>>>> >>>>> If I create a region of size [100, 120, 11] it should be able to store >>>>> those two objects. >>>>> >>>>> However, (maybe) that is not the case because the objects are not >>>>> drawn at slice 2 but on slice 5 when I write the output of >>>>> LabelMapToLabelImageFilter. There is no exception thrown, thought. >>>>> >>>>> I've also noticed that using the Shift function of the LabelObject >>>>> doesn't change the object's boundingBox, which leds me to think that each >>>>> pixel has a shift somehow not related to the bounding box. >>>>> >>>>> I can provide a Minimum Working Example if needed. >>>>> >>>>> I've read the article journal, but I couldn't see the answer, may be >>>>> related to 'storing the label objects as lines', which I don't completely >>>>> understand what's the graphical representation of those lines. >>>>> >>>>> What is going on? >>>>> >>>>> Cheers, >>>>> >>>>> Pol >>>>> >>>> >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lluna.nova at gmail.com Wed Apr 22 17:57:41 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Wed, 22 Apr 2015 23:57:41 +0200 Subject: [ITK-users] vnl_numeric_traits.h constexpr _aka_ ITK and C++11 Message-ID: Hello all, Today I moved&updated the ITK directory so I had to rebuild everything. I am compiling with -std=c++11 Misteriously, now I am getting the error /Users/monso/code/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:437:68: error: 'constexpr' needed for in-class initialization of static data member 'const long double vnl_numeric_traits::maxval' of non-integral type [-fpermissive] static const long double maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308); which apparently it's a bug that was there around 2011. How come it came back? Any ideas? This is using the master branch of https://github.com/InsightSoftwareConsortium/ITK.git See http://public.kitware.com/pipermail/community/2013-December/004580.html I am on OSX, using g++-mp-4.9 I tried setting the vcl_include_cxx_0x, same result. I don't know how I fixed this or if I had the issue (I kind of recall this), but it worked before. So I tried with ITK4.7.1 from the website, same result. Cheers, Pol -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Apr 22 18:19:16 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 22 Apr 2015 18:19:16 -0400 Subject: [ITK-users] vnl_numeric_traits.h constexpr _aka_ ITK and C++11 In-Reply-To: References: Message-ID: Hi Pol, Make sure to build ITK and everything that builds against ITK by specifying the '-std=c++11' flag beginning with the initial CMake configuration from a fresh build. By adding this flag, it is like specifying a different compiler, and there are some initial configuration try_compile tests that extract information about the compiler. Specify it with cmake -DCMAKE_CXX_FLAGS='std=c++11' ~/src/ITK HTH, Matt On Wed, Apr 22, 2015 at 5:57 PM, Pol Mons? Purt? wrote: > Hello all, > > Today I moved&updated the ITK directory so I had to rebuild everything. I am > compiling with -std=c++11 > > Misteriously, now I am getting the error > > /Users/monso/code/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:437:68: > error: 'constexpr' needed for in-class initialization of static data member > 'const long double vnl_numeric_traits::maxval' of non-integral > type [-fpermissive] > static const long double maxval > VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308); > > which apparently it's a bug that was there around 2011. How come it came > back? Any ideas? > > This is using the master branch of > https://github.com/InsightSoftwareConsortium/ITK.git > > See http://public.kitware.com/pipermail/community/2013-December/004580.html > > I am on OSX, using g++-mp-4.9 > > I tried setting the vcl_include_cxx_0x, same result. > > I don't know how I fixed this or if I had the issue (I kind of recall this), > but it worked before. So I tried with ITK4.7.1 from the website, same > result. > > Cheers, > > Pol > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Wed Apr 22 23:00:12 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 22 Apr 2015 23:00:12 -0400 Subject: [ITK-users] Opportunities to share, discuss, design, and learn with other ITK community members Message-ID: There are a couple of upcoming opportunities to share, discuss, design, and learn with your fellow ITK community members. On Thursday (tomorrow), 1:00 PM Eastern USA time, there will be a Google+ Hangout where we will be doing code reviews: https://plus.google.com/u/1/events/c40jlhlsa9t5ckaedu8a1p2a8ug On Friday, 11:00 AM Eastern USA time, an ITK development conference, https://plus.google.com/u/1/events/c6qhtk86u986h2qs3e4gt14r9kc For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423 To get regular invites to these events, join the ITK Bar Camp G+ Community: https://plus.google.com/u/0/communities/111375098792764998322 All are welcome. Hope to talk to you then! From jerome.velut at kitware.com Thu Apr 23 05:46:48 2015 From: jerome.velut at kitware.com (Jerome Velut) Date: Thu, 23 Apr 2015 11:46:48 +0200 Subject: [ITK-users] ANN: ITK course in Lyon, France Message-ID: Kitware will be holding a developers training course on June 4th 2015 in Lyon, France. This course will cover the features of ITKv4 : - Overview/Architecture - Segmentation - Registration - Using ITK in your applications Please visit our web site for more information and registration details at : http://formations.kitware.fr/browse/97 Note that the course will be taught in English. If you have any questions, please contact us at courses[at]kitware.com or formations[at]kitware.fr. Best regards, -- J?r?me Velut Research and Development Kitware SAS 26 rue Louis Gu?rin 69100 Villeurbanne, France F: +33 (0)4.37.45.04.15 http://www.kitware.fr http://www.kitware.com/company/team/velut.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From kamal.shahim at istb.unibe.ch Thu Apr 23 09:07:06 2015 From: kamal.shahim at istb.unibe.ch (kamal.shahim at istb.unibe.ch) Date: Thu, 23 Apr 2015 13:07:06 +0000 Subject: [ITK-users] GDCM Dicom reader Message-ID: <15D62297D74AB64092BA6AB77A0ED24F47FBC61B@AAI-EXCH-MBX1.campus.unibe.ch> Hello, I use following codes to read dicom series, but the output of spacing between slices is sometimes correct BUT not always: // Read the input series typedef itk::GDCMImageIO ImageIOType; typedef itk::GDCMSeriesFileNames InputNamesGeneratorType; ImageIOType::Pointer gdcmIO = ImageIOType::New(); InputNamesGeneratorType::Pointer inputNames = InputNamesGeneratorType::New(); inputNames->SetInputDirectory( dirPath ); inputNames->AddSeriesRestriction("0020|0013"); // Then I select a series identifier and pass it to the reader: typedef itk::ImageSeriesReader< CTImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); ; reader->SetImageIO( gdcmIO ); reader->SetFileNames( inputNames->GetFileNames( seriesIdentifier.c_str() )); reader->UpdateOutputInformation(); --->>> reader->GetOutput()->GetSpacing()[2] is not correct always!! I use the latest version of ITK and GDCM library. Thanks a lot for your help, Regards, Kamal -------------- next part -------------- An HTML attachment was scrubbed... URL: From ogdenk at upstate.edu Thu Apr 23 10:42:32 2015 From: ogdenk at upstate.edu (Kent Ogden) Date: Thu, 23 Apr 2015 10:42:32 -0400 Subject: [ITK-users] Problem adding ITK to project In-Reply-To: References: <5526986602000082000C81BE@gatedom1.upstate.edu> Message-ID: <5538CC9802000082000C9A79@gatedom1.upstate.edu> It took me a while to get back to this issue, but I was able to test my theory that the problem was related to not building VTK with shared libraries. Short story, my hypothesis was incorrect, rebuilding VTK with Shared Libraries turned on (and rebuilding ITK) did not solve the problem. I think I was using VTK 6.0.0. I just upgraded to the latest version and built VTK with static libraries, rebuilt ITK, and the problem went away. So, I'm not sure if it was a problem with the version of VTK I was using, something set incorrectly in my VTK build, or something else. Thanks for the responses to this issue . . . Kent >>> Matt McCormick 4/9/2015 5:31 PM >>> Hi Kent, Thanks for discussing this on the list. A restriction on static libraries is not a known issue -- it would be interesting to get your report on whether shared libraries help. What version of ITK and VTK is this? Thanks, Matt On Thu, Apr 9, 2015 at 3:19 PM, Kent Ogden wrote: > I think I realized what the problem is. I don't have time to verify this > now but I will report back when I do. > > When I did this last (about a year ago) I was using a VTK build that was set > to create shared libraries. As I recall that was required when I built ITK > with ITKVTKGlue turned on. My current build is using static VTK libraries > (nice not to have to deal with .dll's) and I didn't get the error in CMake > when setting up ITK, and the Quickviewer worked just fine. I suspect that > my problem now is that I don't have VTK built with shared libraries. Does > this make sense to anyone? > > Kent > > >>>> Pol Mons? Purt? 04/09/15 1:48 PM >>> > > Hello Kent, > > vtkRenderingCore_INCLUDE is probably empty so it then results on #include > and that's it. > > Maybe try adding #warning vtkRenderingCore_INCLUDE to see it's contents, but > that's probably what's happening. > > 2015-04-09 18:42 GMT+02:00 Kent Ogden : >> >> Hi, >> >> I am trying to do something really simple, I have a VTK project (I'm >> trying this with the cone.cxx example, about as simple as it gets) and I >> want to add ITK functionality. In the past I had used a modified version of >> the ITKQuickView example, and it used to work: >> >> cmake_minimum_required(VERSION 2.8) >> >> project(Cone) >> >> find_package(ITK REQUIRED) >> include(${ITK_USE_FILE}) >> if (ITKVtkGlue_LOADED) >> find_package(VTK REQUIRED) >> include(${VTK_USE_FILE}) >> else() >> find_package(ItkVtkGlue REQUIRED) >> include(${ItkVtkGlue_USE_FILE}) >> set(Glue ItkVtkGlue) >> endif() >> >> add_executable(Cone MACOSX_BUNDLE Cone.cxx) >> target_link_libraries(Cone >> ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) >> >> Now, however, I get the following compile error (VS 2012 64 bit on Win 7): >> >> 2>C:\KW\VTKBuild\Rendering\Core\vtkRenderingCoreModule.h(37): error C2006: >> '#include' : expected a filename, found 'newline' >> The vicinity of that line in vtkRenderingCoreModule.h is >> >> /* AutoInit implementations. */ >> #if defined(vtkRenderingCore_INCLUDE) >> # include vtkRenderingCore_INCLUDE // Error is from this line >> #endif >> #if defined(vtkRenderingCore_AUTOINIT) >> # include "vtkAutoInit.h" >> VTK_AUTOINIT(vtkRenderingCore) >> #endif >> >> I do not have any ITK functionality added to the program yet, it is just >> the cone.cxx example. If I use a very simple CMakelists.txt file the >> program compiles and runs just fine: >> >> cmake_minimum_required(VERSION 2.8) >> >> project(Cone) >> set(VTK_DIR "C:/KW/VTKBuild") >> set(ITK_DIR "C:/KW/ITKBuild") >> >> find_package(VTK REQUIRED) >> include(${VTK_USE_FILE}) >> >> add_executable(Cone MACOSX_BUNDLE Cone.cxx) >> target_link_libraries(Cone ${VTK_LIBRARIES} ) >> >> But if I try to add >> >> find_package(ITK REQUIRED) >> include(${ITK_USE_FILE}) >> >> I get the same error as above. I am sure this is a simple issue but my >> understanding of CMake is limited. I know this isn't precisely an ITK >> problem per se but I hoped someone could point out what I am doing wrong. >> >> Any help greatly appreciated! >> >> Kent >> >> >> >> >> >> >> >> >> >> Kent Ogden PhD >> Associate Professor, Radiology >> SUNY Upstate Medical University >> 750 E. Adams Street >> Syracuse, NY 13210 >> >> email: ogdenk at upstate.edu >> voice: (315) 464-5083 >> fax: (315) 464-8789 >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lluna.nova at gmail.com Thu Apr 23 11:28:30 2015 From: lluna.nova at gmail.com (=?UTF-8?B?UG9sIE1vbnPDsyBQdXJ0w60=?=) Date: Thu, 23 Apr 2015 17:28:30 +0200 Subject: [ITK-users] vnl_numeric_traits.h constexpr _aka_ ITK and C++11 In-Reply-To: References: Message-ID: Hello all, Thanks Matt, the dependencies were already compiled correctly. Stay put as the plot thickens. I've reproduced the steps that I had done to compile ITK before and it worked, so I kept searching for the cause of the error and it boils down to this: If I compile with ccmake, it fails with the mentioned errors. if I compile with cmake, it works. In both cases setting the flag CMAKE_CXX_FLAGS to -std=c++11 So my guess is that when running ccmake, the first configure sets the headers wrong and that doesn't get fixed when setting the -std=c++11 after the first configure is done. Indeed it doesn't happen with ccmake -DCMAKE_CXX_FLAGS=-std=c++11 . (The ' ' are apparently unnecessary) Cheers! Pol 2015-04-23 0:19 GMT+02:00 Matt McCormick : > Hi Pol, > > Make sure to build ITK and everything that builds against ITK by > specifying the '-std=c++11' flag beginning with the initial CMake > configuration from a fresh build. By adding this flag, it is like > specifying a different compiler, and there are some initial > configuration try_compile tests that extract information about the > compiler. Specify it with > > cmake -DCMAKE_CXX_FLAGS='std=c++11' ~/src/ITK > > HTH, > Matt > > On Wed, Apr 22, 2015 at 5:57 PM, Pol Mons? Purt? > wrote: > > Hello all, > > > > Today I moved&updated the ITK directory so I had to rebuild everything. > I am > > compiling with -std=c++11 > > > > Misteriously, now I am getting the error > > > > > /Users/monso/code/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:437:68: > > error: 'constexpr' needed for in-class initialization of static data > member > > 'const long double vnl_numeric_traits::maxval' of > non-integral > > type [-fpermissive] > > static const long double maxval > > VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308); > > > > which apparently it's a bug that was there around 2011. How come it came > > back? Any ideas? > > > > This is using the master branch of > > https://github.com/InsightSoftwareConsortium/ITK.git > > > > See > http://public.kitware.com/pipermail/community/2013-December/004580.html > > > > I am on OSX, using g++-mp-4.9 > > > > I tried setting the vcl_include_cxx_0x, same result. > > > > I don't know how I fixed this or if I had the issue (I kind of recall > this), > > but it worked before. So I tried with ITK4.7.1 from the website, same > > result. > > > > Cheers, > > > > Pol > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Apr 23 16:37:38 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 23 Apr 2015 16:37:38 -0400 Subject: [ITK-users] Problem adding ITK to project In-Reply-To: <5538CC9802000082000C9A79@gatedom1.upstate.edu> References: <5526986602000082000C81BE@gatedom1.upstate.edu> <5538CC9802000082000C9A79@gatedom1.upstate.edu> Message-ID: Hi Kent, These patches [1][2] will help address VTK shared builds with VTK 6.2.0 and VTK master. They are available in current ITK master and will be added to the upcoming 4.7.2 release. There were additional issues related to your original question that were addressed in the VTK 6.2.0 release. HTH, Matt [1] http://review.source.kitware.com/#/c/19667/ [1] http://review.source.kitware.com/#/c/19673/ On Thu, Apr 23, 2015 at 10:42 AM, Kent Ogden wrote: > It took me a while to get back to this issue, but I was able to test my > theory that the problem was related to not building VTK with shared > libraries. > > Short story, my hypothesis was incorrect, rebuilding VTK with Shared > Libraries turned on (and rebuilding ITK) did not solve the problem. I think > I was using VTK 6.0.0. I just upgraded to the latest version and built VTK > with static libraries, rebuilt ITK, and the problem went away. So, I'm not > sure if it was a problem with the version of VTK I was using, something set > incorrectly in my VTK build, or something else. > > Thanks for the responses to this issue . . . > > Kent > > > >>>> Matt McCormick 4/9/2015 5:31 PM >>> > > Hi Kent, > > Thanks for discussing this on the list. A restriction on static > libraries is not a known issue -- it would be interesting to get your > report on whether shared libraries help. > > What version of ITK and VTK is this? > > Thanks, > Matt > > On Thu, Apr 9, 2015 at 3:19 PM, Kent Ogden wrote: >> I think I realized what the problem is. I don't have time to verify this >> now but I will report back when I do. >> >> When I did this last (about a year ago) I was using a VTK build that was >> set >> to create shared libraries. As I recall that was required when I built >> ITK >> with ITKVTKGlue turned on. My current build is using static VTK libraries >> (nice not to have to deal with .dll's) and I didn't get the error in CMake >> when setting up ITK, and the Quickviewer worked just fine. I suspect that >> my problem now is that I don't have VTK built with shared libraries. Does >> this make sense to anyone? >> >> Kent >> >> >>>>> Pol Mons? Purt? 04/09/15 1:48 PM >>> >> >> Hello Kent, >> >> vtkRenderingCore_INCLUDE is probably empty so it then results on #include >> and that's it. >> >> Maybe try adding #warning vtkRenderingCore_INCLUDE to see it's contents, >> but >> that's probably what's happening. >> >> 2015-04-09 18:42 GMT+02:00 Kent Ogden : >>> >>> Hi, >>> >>> I am trying to do something really simple, I have a VTK project (I'm >>> trying this with the cone.cxx example, about as simple as it gets) and I >>> want to add ITK functionality. In the past I had used a modified version >>> of >>> the ITKQuickView example, and it used to work: >>> >>> cmake_minimum_required(VERSION 2.8) >>> >>> project(Cone) >>> >>> find_package(ITK REQUIRED) >>> include(${ITK_USE_FILE}) >>> if (ITKVtkGlue_LOADED) >>> find_package(VTK REQUIRED) >>> include(${VTK_USE_FILE}) >>> else() >>> find_package(ItkVtkGlue REQUIRED) >>> include(${ItkVtkGlue_USE_FILE}) >>> set(Glue ItkVtkGlue) >>> endif() >>> >>> add_executable(Cone MACOSX_BUNDLE Cone.cxx) >>> target_link_libraries(Cone >>> ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) >>> >>> Now, however, I get the following compile error (VS 2012 64 bit on Win >>> 7): >>> >>> 2>C:\KW\VTKBuild\Rendering\Core\vtkRenderingCoreModule.h(37): error >>> C2006: >>> '#include' : expected a filename, found 'newline' >>> The vicinity of that line in vtkRenderingCoreModule.h is >>> >>> /* AutoInit implementations. */ >>> #if defined(vtkRenderingCore_INCLUDE) >>> # include vtkRenderingCore_INCLUDE // Error is from this line >>> #endif >>> #if defined(vtkRenderingCore_AUTOINIT) >>> # include "vtkAutoInit.h" >>> VTK_AUTOINIT(vtkRenderingCore) >>> #endif >>> >>> I do not have any ITK functionality added to the program yet, it is just >>> the cone.cxx example. If I use a very simple CMakelists.txt file the >>> program compiles and runs just fine: >>> >>> cmake_minimum_required(VERSION 2.8) >>> >>> project(Cone) >>> set(VTK_DIR "C:/KW/VTKBuild") >>> set(ITK_DIR "C:/KW/ITKBuild") >>> >>> find_package(VTK REQUIRED) >>> include(${VTK_USE_FILE}) >>> >>> add_executable(Cone MACOSX_BUNDLE Cone.cxx) >>> target_link_libraries(Cone ${VTK_LIBRARIES} ) >>> >>> But if I try to add >>> >>> find_package(ITK REQUIRED) >>> include(${ITK_USE_FILE}) >>> >>> I get the same error as above. I am sure this is a simple issue but my >>> understanding of CMake is limited. I know this isn't precisely an ITK >>> problem per se but I hoped someone could point out what I am doing wrong. >>> >>> Any help greatly appreciated! >>> >>> Kent >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> Kent Ogden PhD >>> Associate Professor, Radiology >>> SUNY Upstate Medical University >>> 750 E. Adams Street >>> Syracuse, NY 13210 >>> >>> email: ogdenk at upstate.edu >>> voice: (315) 464-5083 >>> fax: (315) 464-8789 >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 Thu Apr 23 16:39:51 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 23 Apr 2015 16:39:51 -0400 Subject: [ITK-users] vnl_numeric_traits.h constexpr _aka_ ITK and C++11 In-Reply-To: References: Message-ID: Hi Pol, Thanks for the update! Yes, that is the expected behaviour :-). The flag must be added during the initial call to ccmake before the first CMake configuration run occurs. Instead of adding -DCMAKE_CXX_FLAGS=-std=c++11, another option is to set the CXXFLAGS environmental variable: CXXFLAGS=-stdc++11 ccmake ~/src/ITK HTH, Matt On Thu, Apr 23, 2015 at 11:28 AM, Pol Mons? Purt? wrote: > Hello all, > > Thanks Matt, the dependencies were already compiled correctly. Stay put as > the plot thickens. > > I've reproduced the steps that I had done to compile ITK before and it > worked, so I kept searching for the cause of the error and it boils down to > this: > > If I compile with ccmake, it fails with the mentioned errors. > > if I compile with cmake, it works. > > In both cases setting the flag CMAKE_CXX_FLAGS to -std=c++11 > > So my guess is that when running ccmake, the first configure sets the > headers wrong and that doesn't get fixed when setting the -std=c++11 after > the first configure is done. > > Indeed it doesn't happen with ccmake -DCMAKE_CXX_FLAGS=-std=c++11 . (The ' ' > are apparently unnecessary) > > Cheers! > > Pol > > 2015-04-23 0:19 GMT+02:00 Matt McCormick : >> >> Hi Pol, >> >> Make sure to build ITK and everything that builds against ITK by >> specifying the '-std=c++11' flag beginning with the initial CMake >> configuration from a fresh build. By adding this flag, it is like >> specifying a different compiler, and there are some initial >> configuration try_compile tests that extract information about the >> compiler. Specify it with >> >> cmake -DCMAKE_CXX_FLAGS='std=c++11' ~/src/ITK >> >> HTH, >> Matt >> >> On Wed, Apr 22, 2015 at 5:57 PM, Pol Mons? Purt? >> wrote: >> > Hello all, >> > >> > Today I moved&updated the ITK directory so I had to rebuild everything. >> > I am >> > compiling with -std=c++11 >> > >> > Misteriously, now I am getting the error >> > >> > >> > /Users/monso/code/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:437:68: >> > error: 'constexpr' needed for in-class initialization of static data >> > member >> > 'const long double vnl_numeric_traits::maxval' of >> > non-integral >> > type [-fpermissive] >> > static const long double maxval >> > VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308); >> > >> > which apparently it's a bug that was there around 2011. How come it came >> > back? Any ideas? >> > >> > This is using the master branch of >> > https://github.com/InsightSoftwareConsortium/ITK.git >> > >> > See >> > http://public.kitware.com/pipermail/community/2013-December/004580.html >> > >> > I am on OSX, using g++-mp-4.9 >> > >> > I tried setting the vcl_include_cxx_0x, same result. >> > >> > I don't know how I fixed this or if I had the issue (I kind of recall >> > this), >> > but it worked before. So I tried with ITK4.7.1 from the website, same >> > result. >> > >> > Cheers, >> > >> > Pol >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > > > From amir.khojaste at sunnybrook.ca Fri Apr 24 11:24:28 2015 From: amir.khojaste at sunnybrook.ca (Khojaste, Amir) Date: Fri, 24 Apr 2015 15:24:28 +0000 Subject: [ITK-users] ITK Version 3.20.2 reading image in debug mode Message-ID: <639C0C4CF854594E920361562A5266BB30BC9CD9@SBXNG01.sw.ca> Hi guys, I am using an open-source library named Plastimatch which uses the ITK libraries. I have built my Plastimatch (and also ITK) in debug mode. I am using a cropping method in Plastimach which simply crops an image. Plastimatch uses ITK libraries to read the image. I have a labelmap image named Prostate_MR_Labelmaps.mha, this image loads in 3DSlicer (for visualization) just fine! But when I am using Plastimach to read the image and crop it (which uses ITK::ImageFileReader function) I get the following error: Unhandled exception at 0x000000013fbb9c13 in plastimatch.exe: 0xC0000005: Access violation reading location 0xffffffffffffffff. However, I also have built the Plastimatch and ITK libraries in Release mode and I did not receive this error and it read the image perfectly! Are there any thoughts out there to what could be the cause of this problem? I am using Windows 7, 64 bits, ITK version 3.20.2 if that helps. Thanks in advance for your help! Amir This e-mail is intended only for the named recipient(s) and may contain confidential, personal and/or health information (information which may be subject to legal restrictions on use, retention and/or disclosure). No waiver of confidence is intended by virtue of communication via the internet. Any review or distribution by anyone other than the person(s) for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and destroy all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vikash.gupta at inria.fr Fri Apr 24 13:45:21 2015 From: vikash.gupta at inria.fr (Vikash Gupta) Date: Fri, 24 Apr 2015 19:45:21 +0200 (CEST) Subject: [ITK-users] Binary In-Reply-To: <43731989.1073910.1429896035360.JavaMail.zimbra@inria.fr> Message-ID: <256111286.1085835.1429897521186.JavaMail.zimbra@inria.fr> Hello everyone, I want to convert a binary image to a mesh. However, my constraint is that i want the nodes of the mesh to be the center of the voxels of the binary mask and the edges should be the lines connecting the centers of the adjecent voxels. I found this filter itk::BinaryMask3DMeshSource. Is it possible to apply such a constraint while using this filter. If not, are you aware of any other software, please let me know Thanks Vikash -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntustison at gmail.com Fri Apr 24 14:37:37 2015 From: ntustison at gmail.com (Nicholas Tustison) Date: Fri, 24 Apr 2015 11:37:37 -0700 Subject: [ITK-users] dicom viewer/nifti discrepancy Message-ID: <36EBF6B1-6A3C-445C-B0C3-C421B54C4664@gmail.com> Hi all, I have a set of dicom data that were annotated by clinical folk. Specifically, I have slice numbers for each image volume which indicate a particular feature of interest. The problem is that the slice number can either be counted from the most inferior slice or the most superior slice. When I view these dicom image volumes in Osirix or Fiji, the slice number provided by the viewer corresponds to my clinical numbers. However, when I convert to nifti (using dcm2nii or mriconvert), the index, in ITK terminology, always starts from the most inferior slice. At first, I thought it was some dicom tag that was being read by the viewer to orient the index but, after following a couple of possibilities, I haven?t found anything. Has anyone come across anything like this? Thanks, Nick From hans-johnson at uiowa.edu Fri Apr 24 14:47:01 2015 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Fri, 24 Apr 2015 18:47:01 +0000 Subject: [ITK-users] dicom viewer/nifti discrepancy In-Reply-To: <36EBF6B1-6A3C-445C-B0C3-C421B54C4664@gmail.com> References: <36EBF6B1-6A3C-445C-B0C3-C421B54C4664@gmail.com> Message-ID: I don?t have a definitive answer, but NIFTI internal representation is an RAS system, DICOM & ITK internal representations are LPS. Perhaps there is a coordinate space incompatibility. Hans ======================================================================== Hans J. Johnson, Ph.D., Associate Professor Electrical and Computer Engineering (Primary), Biomedical Engineering, Psychiatry hans-johnson at uiowa.edu (319) 621 7185 (cell) (319) 384 3538 ECE Phone (Primary) (319) 353 8587 Psychiatry Phone (Secondary) 4316 Seamans Center Iowa City, IA 52242 On Apr 24, 2015, at 1:37 PM, Nicholas Tustison > wrote: Hi all, I have a set of dicom data that were annotated by clinical folk. Specifically, I have slice numbers for each image volume which indicate a particular feature of interest. The problem is that the slice number can either be counted from the most inferior slice or the most superior slice. When I view these dicom image volumes in Osirix or Fiji, the slice number provided by the viewer corresponds to my clinical numbers. However, when I convert to nifti (using dcm2nii or mriconvert), the index, in ITK terminology, always starts from the most inferior slice. At first, I thought it was some dicom tag that was being read by the viewer to orient the index but, after following a couple of possibilities, I haven?t found anything. Has anyone come across anything like this? Thanks, Nick _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users ________________________________ 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: From ntustison at gmail.com Fri Apr 24 15:02:51 2015 From: ntustison at gmail.com (Nicholas Tustison) Date: Fri, 24 Apr 2015 12:02:51 -0700 Subject: [ITK-users] dicom viewer/nifti discrepancy In-Reply-To: References: <36EBF6B1-6A3C-445C-B0C3-C421B54C4664@gmail.com> Message-ID: <90445DB8-DE53-4BC2-B874-B2CBC3BF9CF0@gmail.com> Thanks Hans. I?ll stew over that and see if it gets me anywhere. > On Apr 24, 2015, at 11:47 AM, Johnson, Hans J wrote: > > I don?t have a definitive answer, but NIFTI internal representation is an RAS system, DICOM & ITK internal representations are LPS. > > Perhaps there is a coordinate space incompatibility. > > Hans > > ======================================================================== > Hans J. Johnson, Ph.D., Associate Professor > Electrical and Computer Engineering (Primary), Biomedical Engineering, Psychiatry > hans-johnson at uiowa.edu > (319) 621 7185 (cell) > (319) 384 3538 ECE Phone (Primary) > (319) 353 8587 Psychiatry Phone (Secondary) > > 4316 Seamans Center > Iowa City, IA 52242 > >> On Apr 24, 2015, at 1:37 PM, Nicholas Tustison > wrote: >> >> Hi all, >> >> I have a set of dicom data that were annotated by clinical >> folk. Specifically, I have slice numbers for each image >> volume which indicate a particular feature of interest. The >> problem is that the slice number can either be counted from >> the most inferior slice or the most superior slice. When I >> view these dicom image volumes in Osirix or Fiji, the slice >> number provided by the viewer corresponds to my clinical >> numbers. However, when I convert to nifti (using dcm2nii or >> mriconvert), the index, in ITK terminology, always starts from the >> most inferior slice. At first, I thought it was some dicom tag that >> was being read by the viewer to orient the index but, after following >> a couple of possibilities, I haven?t found anything. Has anyone >> come across anything like this? >> >> Thanks, >> Nick >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > > > 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: From matimontg at gmail.com Sat Apr 25 08:12:57 2015 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 25 Apr 2015 09:12:57 -0300 Subject: [ITK-users] Registration taking longer to start in 4.7.1? Message-ID: Hi, I downloaded and compiled version 4.7.1 of ITK and then recompiled a source code I had for *3D* MuttualInformation Registration I noticed it now takes longer for registration to start and for some reason I now get joint pdf sum med to zero (and I didn't change anything on my code). Is there a known issue with the time it takes for registration to start? Thank you, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Sat Apr 25 08:55:45 2015 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 25 Apr 2015 09:55:45 -0300 Subject: [ITK-users] Registration taking longer to start in 4.7.1? In-Reply-To: References: Message-ID: Something I noticed is that version 4.7.1 may be more strict when it comes to origin.. My 2 images have different origins and that may be the reason. How can I set both images to have the same origin? is it safe or should I modify the parameters to make them overlap? Thanks, Matias. On Sat, Apr 25, 2015 at 9:12 AM, Matias Montroull wrote: > Hi, > > I downloaded and compiled version 4.7.1 of ITK and then recompiled a > source code I had for *3D* MuttualInformation Registration > > I noticed it now takes longer for registration to start and for some > reason I now get joint pdf sum med to zero (and I didn't change anything on > my code). > > Is there a known issue with the time it takes for registration to start? > > Thank you, > > Matias. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Sat Apr 25 09:44:49 2015 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 25 Apr 2015 10:44:49 -0300 Subject: [ITK-users] Registration taking longer to start in 4.7.1? In-Reply-To: References: Message-ID: Disregard my message... For some reason, in this new version of ITK, if I use the *NormalizeImageFilter*, tehn the images end up not overlapping. Any clue what changed on that filter? This is the code I had to remove: typedef itk::NormalizeImageFilter NormalizeFilterType; NormalizeFilterType::Pointer fixedNormalizer = NormalizeFilterType::New(); NormalizeFilterType::Pointer movingNormalizer = NormalizeFilterType::New(); fixedNormalizer->SetInput(fixedImageReader->GetOutput()); movingNormalizer->SetInput(movingImageReader->GetOutput()); typedef itk::DiscreteGaussianImageFilter GaussianFilterType; GaussianFilterType::Pointer fixedSmoother = GaussianFilterType::New(); GaussianFilterType::Pointer movingSmoother = GaussianFilterType::New(); fixedSmoother->SetVariance(2.0); movingSmoother->SetVariance(2.0); fixedSmoother->SetInput(fixedNormalizer->GetOutput()); movingSmoother->SetInput(movingNormalizer->GetOutput()); registration->SetFixedImage(fixedSmoother->GetOutput()); registration->SetMovingImage(movingSmoother->GetOutput()); Thanks, Matias. On Sat, Apr 25, 2015 at 9:55 AM, Matias Montroull wrote: > Something I noticed is that version 4.7.1 may be more strict when it comes > to origin.. My 2 images have different origins and that may be the reason. > > How can I set both images to have the same origin? is it safe or should I > modify the parameters to make them overlap? > > Thanks, > > Matias. > > On Sat, Apr 25, 2015 at 9:12 AM, Matias Montroull > wrote: > >> Hi, >> >> I downloaded and compiled version 4.7.1 of ITK and then recompiled a >> source code I had for *3D* MuttualInformation Registration >> >> I noticed it now takes longer for registration to start and for some >> reason I now get joint pdf sum med to zero (and I didn't change anything on >> my code). >> >> Is there a known issue with the time it takes for registration to start? >> >> Thank you, >> >> Matias. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Sat Apr 25 09:49:53 2015 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 25 Apr 2015 10:49:53 -0300 Subject: [ITK-users] Registration taking longer to start in 4.7.1? In-Reply-To: References: Message-ID: oh lord, sorry to fill your inbox, I included my code again and called: fixedNormalizer->Update(); That did the trick. Sorry folks, I just ended up answering my own stupid question. Regards, Matias. On Sat, Apr 25, 2015 at 10:44 AM, Matias Montroull wrote: > Disregard my message... For some reason, in this new version of ITK, if I > use the *NormalizeImageFilter*, tehn the images end up not overlapping. > > Any clue what changed on that filter? > > This is the code I had to remove: > > typedef itk::NormalizeImageFilter > NormalizeFilterType; > NormalizeFilterType::Pointer fixedNormalizer = NormalizeFilterType::New(); > NormalizeFilterType::Pointer movingNormalizer = NormalizeFilterType::New(); > > fixedNormalizer->SetInput(fixedImageReader->GetOutput()); > movingNormalizer->SetInput(movingImageReader->GetOutput()); > > typedef itk::DiscreteGaussianImageFilter InternalImageType> GaussianFilterType; > > GaussianFilterType::Pointer fixedSmoother = GaussianFilterType::New(); > GaussianFilterType::Pointer movingSmoother = GaussianFilterType::New(); > > fixedSmoother->SetVariance(2.0); > movingSmoother->SetVariance(2.0); > > fixedSmoother->SetInput(fixedNormalizer->GetOutput()); > movingSmoother->SetInput(movingNormalizer->GetOutput()); > > registration->SetFixedImage(fixedSmoother->GetOutput()); > registration->SetMovingImage(movingSmoother->GetOutput()); > > Thanks, > > Matias. > > On Sat, Apr 25, 2015 at 9:55 AM, Matias Montroull > wrote: > >> Something I noticed is that version 4.7.1 may be more strict when it >> comes to origin.. My 2 images have different origins and that may be the >> reason. >> >> How can I set both images to have the same origin? is it safe or should I >> modify the parameters to make them overlap? >> >> Thanks, >> >> Matias. >> >> On Sat, Apr 25, 2015 at 9:12 AM, Matias Montroull >> wrote: >> >>> Hi, >>> >>> I downloaded and compiled version 4.7.1 of ITK and then recompiled a >>> source code I had for *3D* MuttualInformation Registration >>> >>> I noticed it now takes longer for registration to start and for some >>> reason I now get joint pdf sum med to zero (and I didn't change anything on >>> my code). >>> >>> Is there a known issue with the time it takes for registration to start? >>> >>> Thank you, >>> >>> Matias. >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From johannesweber at gmx.at Sat Apr 25 12:50:50 2015 From: johannesweber at gmx.at (Johannes Weber) Date: Sat, 25 Apr 2015 18:50:50 +0200 Subject: [ITK-users] linker problem In-Reply-To: References: <55355FC4.2000206@gmx.at> Message-ID: <553BC5EA.30702@gmx.at> Hi! I built ITK new and now it is working again... it is strange, because I never changed anything in the build. But ok, so far so good... maybe it has something to do with including the examples or testing. Anyway, I hope this problem does not occur again. Thank you! Kind regards, Johannes Am 20.04.2015 um 23:01 schrieb Matt McCormick: > Hi, > > Is the configuration type in Visual Studio consistent between ITK and > your project? There is usually a dropdown that has "Debug", "Release", > etc. If this is a problem, then limit the types available in the > CMAKE_CONFIGURATION_TYPES CMake variable to a single type -- they will > always be compatible in this case. > > HTH, > Matt > > On Mon, Apr 20, 2015 at 4:21 PM, Johannes Weber wrote: >> Hi! >> >> thank you for your reply! >> >> The build from ITK itself is ok and working! The problem occurs when I am >> generating my own project with cmake. But the problem was not from the >> beginning on... when I started working with ITK everything was fine. Then >> this problem occured... than it worked again, than again dont and so on... >> I tried very often to delete the build folder and generate it new, tried >> other paths, copying the source folder somewhere else, including more or >> less files in the project (with the cmake file), ... it is stopping me from >> productive working now for a while and I can not figure out what the problem >> is. >> >> >> Am 20.04.2015 um 21:57 schrieb Matt McCormick: >>> Hi Johannes, >>> >>> Welcome to ITK! >>> >>> If there is an unknown problem with the build, then the most reliable >>> approach may be to delete the build tree and do a fresh build. In your >>> CMake configuration, turn off BUILD_TESTING and BUILD_EXAMPLES for a >>> faster build. >>> >>> Hope this helps, >>> Matt >>> >>> On Mon, Apr 20, 2015 at 5:53 AM, wrote: >>>> Hello! >>>> >>>> For a while now I have troubles with the itk libaries. I am working on >>>> windows with visual studio 2012 express. I generate my project with cmake >>>> and than start the visual studio sln file. If I now want to build it, it >>>> says it can't find the "itkdouble-conversion.lib". If I take look into >>>> the >>>> projects properties, configuration properties, linker, input and >>>> additinonal >>>> dependencies (I am translating those terms from the german version, but I >>>> hope it is clear what I mean) than there are among others the itk >>>> entries, >>>> but they seem to be wrong. For other correct working projects generated >>>> with >>>> cmake the itk libaries are there with the full correct path like >>>> C:\ITK\Build\lib\Release\itkdouble-conversion-4.7.lib. >>>> >>>> So in the "broken" project the lib entry is only >>>> "itkdouble-conversion.lib" >>>> but it should be "C:\ITK\Build\lib\Release\itkdouble-conversion-4.7.lib" >>>> >>>> sometimes it works, sometimes not and I can not find out what the problem >>>> is. At the moment I am stuck because the project always has the wrong >>>> paths/dependencies. The cmake file is always the same, I never changed >>>> anything! >>>> >>>> # This is the root ITK CMakeLists file. >>>> cmake_minimum_required(VERSION 2.4) >>>> if(COMMAND CMAKE_POLICY) >>>> cmake_policy(SET CMP0003 NEW) >>>> endif() >>>> >>>> # This project is designed to be built outside the Insight source tree. >>>> project(project) >>>> # Find ITK. >>>> find_package(ITK REQUIRED) >>>> include(${ITK_USE_FILE}) >>>> add_executable(projectBME main.cxx Thickness.h Thickness.cxx >>>> DistanceRidge.h >>>> DistanceRidge.cxx SurfaceCleanUp.h SurfaceCleanUp.cxx Statistic.h >>>> Statistic.cxx) >>>> target_link_libraries(projectBME ${ITK_LIBRARIES}) >>>> >>>> The problem was with cmake 3.2.1 and just before I installed the newest >>>> version of cmake 3.2.2 and it is the same. >>>> Don't know if that is maybe the reason, but I am working on two different >>>> PCs, the source folder is on dropbox, the build folder with the visual >>>> studio project is local on the PC on the desktop. But at the beginning >>>> everything worked fine and just for a while now when I am generating the >>>> project with cmake than I am getting the linker error. >>>> >>>> Thanks a lot! >>>> >>>> greetings >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> From johannesweber at gmx.at Sat Apr 25 13:06:50 2015 From: johannesweber at gmx.at (Johannes Weber) Date: Sat, 25 Apr 2015 19:06:50 +0200 Subject: [ITK-users] testing In-Reply-To: References: Message-ID: <553BC9AA.2050708@gmx.at> Hi! Thank you! At the moment every test is an executable. Maybe later when the tests are getting more and more than I will try to use the test manager. At the moment I have a problem with the itkTestingComparisonImageFilter. The image which is the output of my algorithm is exact the same as the image that I use as valid input for this filter which I get from another software. But the output of the Comparison filter is max difference -3.40282e+38, the min difference +3.40282e+38, total and mean difference are 0, and the interesting part is that the number of pixels with difference is 0 (what I would expect). But why this min and max values? In another test I am doing the same where the two images which I compare are also the exact same and I get as max difference something in the range of 1e-7 and the number of pixels with difference is bigger than 0, but this is ok and seems to be the inaccuracy which to expect when using float. Kind regards, Johannes Am 20.04.2015 um 22:10 schrieb Matt McCormick: > Hi Johannes, > > A best practice is to also compare generated images against a > baseline. ITK builds an executable called itkTestDriver that capable > of reading medical image formats and performing comparisons on images > [1]. This can be useful when building code not in an ITK Module. If > you are writing an ITK Module, then the CreateTestDriver CMake macro > can be used to build a test driver executable that also has this image > comparison functionality built in [2][3]. Finally, ITK comes with > some macros that can be useful for quickly writing tests [4]. > > Hope this helps, > Matt > > [1] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Core/TestKernel/src/itkTestDriver.cxx;h=162cff2d2ca615958f7a3dbfdf535fe0b26b9d2a;hb=HEAD > > [2] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Core/TestKernel/CreateTestDriver.cmake;h=02ffeb172588c87d81b48e990c219f1c16ce3a21;hb=HEAD > > [3] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Filtering/Colormap/test/CMakeLists.txt;h=f53220656495ec72b31b73d72ce4d7ad55797902;hb=HEAD#l7 > > [4] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Core/TestKernel/include/itkTestingMacros.h;h=ef778fdb96ae417397b79ba6f02d4235caa7c379;hb=HEAD > > > On Mon, Apr 20, 2015 at 6:10 AM, wrote: >> Hello! >> >> After writing a new filter testing is needed, and I am new to this... so >> when I am right, CTest is about "managing" the tests and running them and so >> stuff. But the first prolem that I have is how to implement them? I found >> this site: http://www.itk.org/Wiki/ITK/Release_4/UnitTesting >> but I can not find this itkTestHarness. If I am right, the testing framework >> can be anyone (GTest, ...). But for simple image comparing do I need one? I >> also found the ComparisonImageFilter... so if I have a valid output and I >> compare it with my output from my filter, than I can just say return 0 if >> everything is right and something else if not. >> So all in all... maybe some hints for a general testing guide for newbies >> and for testing within itk? >> and besides: i am working with visual studio 2012 express... >> >> thanks a lot!! >> >> greetings, Johannes >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> From grothausmann.roman at mh-hannover.de Sat Apr 25 13:28:30 2015 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Sat, 25 Apr 2015 19:28:30 +0200 Subject: [ITK-users] optimizing iterations over relative small connected components (flood-fill) Message-ID: <553BCEBE.3030308@mh-hannover.de> Dear mailing list members, I'm looking for a highly efficient method to "pick" single watershed segmented regions in my extension to ITKSnap (https://github.com/pyushkevich/itksnap/pull/1). If my understanding is correct, such a region is guaranteed to be a single connected component (CC). The dynamic level adjustment in the extension can lead to very small CCs compared to the overall image which is processed. Currently I've a project where the ratio of the amount of voxels in a CC relative to the total voxels in the image is about 1/1000000 or even smaller. The current implementation (https://github.com/romangrothausmann/itksnap/blob/master%2BgdWS/GUI/Model/JoinModel.cxx#L123) uses an ImageRegionIterator (https://github.com/romangrothausmann/itksnap/blob/master%2BgdWS/Logic/ImageWrapper/ImageWrapper.h#L119) which is considerably slow as it iterates over the whole image not making use of the click position as a seed. I suspect this could be optimized with either a RandomAccessIterator initialized at the seed and then running recursively on the neighbouring voxels. However, I also stumbled over the FloodFilledImageFunctionConditionalIterator and the ShapedFloodFilledFunctionConditionalConstIterator in conjunction with a BinaryThresholdImageFunction (as in this example: http://itk.org/Wiki/ITK/Examples/WishList/Iterators/FloodFilledImageFunctionConditionalIterator) Which approach is better? Are there even better ones? Is there a way to construct reasonable conditions to run these iterators in a filter in ThreadedGenerateData, i.e. a way to estimate in advance the small region of the CC to be processed partially by multiple threads? Thanks for any help or hints. Roman PS: In the example it says: "The iterator only visits 4-connected neighbors. The code in FloodFilledFunctionConditionalConstIterator.txx should be replaced." Would that be what was done in the contribution contributing ShapedFloodFilledFunctionConditionalConstIterator? -- 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-2900 From grothausmann.roman at mh-hannover.de Sat Apr 25 13:46:35 2015 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Sat, 25 Apr 2015 19:46:35 +0200 Subject: [ITK-users] why can the ImageSeriesWriter not stream? In-Reply-To: <2F0D626E-F982-41DD-86BF-5DE18F8861FF@mail.nih.gov> References: <5530CDA2.6050603@mh-hannover.de> <9FFA219D-8E98-4524-9E59-3164AF8DE0DD@mail.nih.gov> <9D3D6598-4AB3-4DD0-81EC-81CB3C8F3BBB@mail.nih.gov> <553130E1.5070909@mh-hannover.de> <5534B925.60904@mh-hannover.de> <2F0D626E-F982-41DD-86BF-5DE18F8861FF@mail.nih.gov> Message-ID: <553BD2FB.7060203@mh-hannover.de> Dear Brad, dear mailing list members, While the ImageSeriesReader is capable of streaming it seems the ImageSeriesWriter (although suggested: http://www.kitware.com/media/html/IOStreamingInITK.html) cannot (my simple try does not work: https://github.com/romangrothausmann/ITK-CLIs/commit/f21c624057b3010d864d527988d1c67a151c1e94). Is that just not implemented yet or intentionally avoided? I was able to create a streaming version by using Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterStreamingTest.cxx as an example: https://github.com/romangrothausmann/ITK-CLIs/commit/e588c6635c60e4bcb5b946cf0cb985727197df9c Is that the way to go? Is there a reason why the MetaImageIO (http://www.itk.org/Doxygen47/html/classitk_1_1MetaImageIO.html) although it supports streaming does not inherit StreamingImageIOBase as other streamable ImageIO like MRC? Thanks for any hints. Roman On 20/04/15 20:09, Bradley Lowekamp wrote: > Roman, > > On Apr 20, 2015, at 4:30 AM, Grothausmann, Roman Dr. > wrote: > >> Many thanks for Your answers and for also fixing the progress reporting. >> Just tested and it works like a charm. It's a really great contribution >> especially for those having to work with very big images. I'll give it a >> try to use Your itkImageSinc to implement a "chunk writer" taking >> StreamingStatisticsImage as an example and >> ImageRegionSplitterMultidimensional to create the chunks. > > If you are implementing a writer derived from StreamingSinc, you should > implement StreamedGenerateData, not ThreadedStreamedGenerate data as you > don't want threading. > >> >> If I set the NumberOfStreamDivisions to the number of slices in the 3D >> Stack Input, is it guaranteed that each slice will be processed on its own >> for the default ImageRegionSplitterSlowDimension? Or would I have to use an >> approach as in itkJoinSeriesImageFilterStreamingTest.cxx employing >> itkExtractImageFilter for each slice? > > The StreamedGenerateData method would get invoked for each slice with that > slice being the specified region. However, the specified region provided to > StreamedGenerateData may be smaller than the buffered region of the image. It > may be best and most general to use the ExtractImageFilter to make sure the > buffer is as expected. > > >> >> In the docs of ImageSeriesWriter it says: "Usually, the output image type >> will have fewer dimensions than the input image type." Is there a way to >> use the ImageSeriesWriter to save a series of hypercubes as >> ImageRegionSplitterMultidimensional would yield internally? > > I don't think it has this feature. > >> >> Thanks for any help or hints. Roman >> >> On 17/04/15 20:13, Bradley Lowekamp wrote: >>> Hello, >>> >>> Glad to hear it worked for you. >>> >>> I have just fixed the progress reporting [1]. >>> >>> The StreamingImageFilter overloads the UpdateData method [2], by passing >>> the standard ImageToImage/ImageSource methods such and GenerateData, >>> ThreadedGenerateData etc. It's actually not really designed to be >>> derived from, and it used mostly to drive the streaming of a pipeline. It >>> can be seen as slicing up the output image in to pieces, and requesting >>> those pieces from the pipeline, the assembling them into the output >>> image. >>> >>> The resulting behavior of the ImageSinc, with the StreamingProcessObject >>> goes something like this: >>> >>> >>> BeforeStreamedGenerateData() >>> >>> For each requested streamed chunk: For each thread process part of >>> streamed chunk: ThreadedStreamedGenerateData() >>> >>> AfterStreamedGenerateData() >>> >>> So the input image is getting sliced up twice the first for streaming and >>> the second for multi-threading. >>> >>> The StreamingImageFitler could be rewritten onto this framework to >>> perhaps provide a generalized base class. >>> >>> For the StreamingStatisticsImage filter, the statistics are accumulated >>> for each thread multiple times ( for each streamed chunk ), then the >>> totals from the threads are reduced to the results. >>> >>> These classes certainly need more documentation before further >>> integration into ITK. >>> >>> Brad >>> >>> [1] >>> https://github.com/blowekamp/itkStreamingSinc/commit/d8415cf137d69a0e81b6dd46145d8cb7df2825c3 >>> >>> >> >>> [2] https://github.com/InsightSoftwareConsortium/ITK/blob/8f7c404aff99f5ae3dfedce6e480701f0304864c/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L118-Lundefined >>> >>> On Apr 17, 2015, at 12:12 PM, Grothausmann, Roman Dr. >>> wrote: >>> >>>> Dear Brad, dear Richard, >>>> >>>> >>>> Many thanks for Your replies. So, if I understand You correctly, the >>>> problem is that the current framework (with StreamingImageFilter) will >>>> run AfterThreadedGenerateData for each chunk and not just when the >>>> whole image has been processed. So one would need to combine >>>> StatisticsImageFilter and StreamingImageFilter into one filter, i.e. >>>> basically that the part of AfterThreadedGenerateData is executed by >>>> StreamingImageFilter. If I understand the code of itkStreamingSinc >>>> correctly, this is what it does? itkStreamingSinc provides a base class >>>> to combine multi-threaded filters with a StreamingImageFilter to make >>>> them streamable. This comes with the trade-off that the resulting >>>> filter will not provide an output, which is no problem if it is not >>>> needed. So, e.g. itkStreamingStatisticsImageFilter cannot be connected >>>> to itkPipelineMonitorImageFilter as it would need an output of >>>> itkStreamingStatisticsImageFilter? >>>> >>>> Many thanks Brad for implementing itkStreamingStatisticsImageFilter. I >>>> just tested it and it works perfectly >>>> (https://github.com/romangrothausmann/ITK-CLIs/commit/38bcad35bf004feaf2189bdaaffcf398fbca1f60). >>>> >>>> >> >>>> Though, I do not understand the changes You made in: https://github.com/blowekamp/itkStreamingSinc/commit/b4ae9b61dc08388fbf1b3bfd9e5cf570dd40a0c6 >>>> Is the accumulation that still resides in AfterStreamedGenerateData >>>> not used at all? >>>> (https://github.com/blowekamp/itkStreamingSinc/commit/dae948bea0966a2c3924351bf9c15bfcef318ac6#diff-ad64d497b8f9aadd5da97c5e1c793dc9R210) >>>> >>>> >> >>>> Just as a side note: The progress reported by itkStreamingStatisticsImageFilter jumps to 100% for each chunk. >>>> >>>> All in all Your itkStreamingSinc and the implemented streaming-filters >>>> are really a great contribution to ITK and I fully recommend >>>> incorporating it into ITK. >>>> >>>> Many thanks again Roman >>>> >>>> >>>> On 17/04/15 15:47, Bradley Lowekamp wrote: >>>>> Hi, >>>>> >>>>> I was able to easy update a the StatisticsImageFilter to use my >>>>> streaming base class for reduction algorithms [1]. It runs basically >>>>> the same expect that you can set the number of stream divisions[2], >>>>> there is the potential for setting the way the input image is split >>>>> via the RegionSplitter in a base class [3]. >>>>> >>>>> You should be able to just clone the repository into you >>>>> ITK/Modules/External directory, then enable it in the CMake >>>>> configuration to use. >>>>> >>>>> Please let me know if it works for you. >>>>> >>>>> This should help :) Brad > [1] >>>>> https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkStreamingStatisticsImageFilter.h >>>>> >>>>> >> >>>>> [2] https://github.com/blowekamp/itkStreamingSinc/blob/master/test/itkStreamingStatisticsImageFilterTest2.cxx#L61 >>>>> [3] >>>>> https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkImageSinc.h#L99 >>>>> >>>>> >>>>> >>>>> >>>>> >> >>>>> On Apr 17, 2015, at 7:14 AM, Bradley Lowekamp >>>>> wrote: >>>>> >>>>>> Hello fellow mailing list member, >>>>>> >>>>>> Currently in ITK there are two base classes for streaming images >>>>>> in ITK. The >>>> ImageToImageFilter provide the framework of streaming one input region >>>> to one output region. The other is the StreamingImageFilter which >>>> provides the framework to stream multiple image regions and merge them >>>> together into a single output image. This StatisticsImageFilter needs a >>>> framework which consumes multiple input image regions and reduces the >>>> data produced. I happen to have implemented such a framework here [1]. >>>> It currently has the LabelStatisticsImageFilter implemented in a >>>> streaming fashion. >>>>>> >>>>>> Let me give it a try and see how quickly I can get the >>>>>> StatisticsImageFilter >>>> in this framework. Help writing tests would be appreciated. >>>>>> >>>>>> Thanks, Brad >>>>>> >>>>>> [1] https://github.com/blowekamp/itkStreamingSinc >>>>>> >>>>>> On Apr 17, 2015, at 5:08 AM, Dr. Roman Grothausmann >>>>>> wrote: >>>>>> >>>>>>> Dear mailing list members, >>>>>>> >>>>>>> >>>>>>> I'm wondering why the itkStatisticsImageFilter cannot stream? >>>>>>> Looking into itkStatisticsImageFilter.hxx it requests the whole >>>>>>> input in GenerateInputRequestedRegion and >>>>>>> EnlargeOutputRequestedRegion but in ThreadedGenerateData only >>>>>>> iterates over the outputRegionForThread. Where in the code is the >>>>>>> whole input image needed as one single block? >>>>>>> >>>>>>> Thanks for any 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-2900 _____________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>>> http://www.kitware.com/products/protraining.php >>>>>>> >>>>>>> Please keep messages on-topic and check the 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-2900 >>> >> >> -- 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-2900 > -- 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-2900 From blowekamp at mail.nih.gov Sat Apr 25 14:14:31 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sat, 25 Apr 2015 14:14:31 -0400 Subject: [ITK-users] why can the ImageSeriesWriter not stream? In-Reply-To: <553BD2FB.7060203@mh-hannover.de> References: <5530CDA2.6050603@mh-hannover.de> <9FFA219D-8E98-4524-9E59-3164AF8DE0DD@mail.nih.gov> <9D3D6598-4AB3-4DD0-81EC-81CB3C8F3BBB@mail.nih.gov> <553130E1.5070909@mh-hannover.de> <5534B925.60904@mh-hannover.de> <2F0D626E-F982-41DD-86BF-5DE18F8861FF@mail.nih.gov> <553BD2FB.7060203@mh-hannover.de> Message-ID: <019B5FE9-55C6-4D0F-ADBE-B094AA132720@mail.nih.gov> Hello, On feature of the ImageWriter when stream writing is that it keeps that output image in valid state after each written chunk or paste region. However with the series there are a lot if files to support and ensure they are valid. In short there were some complications, as there was no driving problem for it, there were better things to do. And as you did, it easy to just use an ExtractImageFilter with the regular writer. The MetaIO, had some pre-existing Pasting/Streaming interfaces and behaviors before the StreamingImageIOBase was implemented. It is still one of the most heavily tested IOs for streaming and should be trusted. HTH, Brad On Apr 25, 2015, at 1:46 PM, Grothausmann, Roman Dr. wrote: > Dear Brad, dear mailing list members, > > > While the ImageSeriesReader is capable of streaming it seems the ImageSeriesWriter (although suggested: http://www.kitware.com/media/html/IOStreamingInITK.html) cannot (my simple try does not work: https://github.com/romangrothausmann/ITK-CLIs/commit/f21c624057b3010d864d527988d1c67a151c1e94). > Is that just not implemented yet or intentionally avoided? > I was able to create a streaming version by using Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterStreamingTest.cxx as an example: https://github.com/romangrothausmann/ITK-CLIs/commit/e588c6635c60e4bcb5b946cf0cb985727197df9c > Is that the way to go? > > Is there a reason why the MetaImageIO (http://www.itk.org/Doxygen47/html/classitk_1_1MetaImageIO.html) although it supports streaming does not inherit StreamingImageIOBase as other streamable ImageIO like MRC? > > Thanks for any hints. > Roman > > On 20/04/15 20:09, Bradley Lowekamp wrote: >> Roman, >> >> On Apr 20, 2015, at 4:30 AM, Grothausmann, Roman Dr. >> wrote: >> >>> Many thanks for Your answers and for also fixing the progress reporting. >>> Just tested and it works like a charm. It's a really great contribution >>> especially for those having to work with very big images. I'll give it a >>> try to use Your itkImageSinc to implement a "chunk writer" taking >>> StreamingStatisticsImage as an example and >>> ImageRegionSplitterMultidimensional to create the chunks. >> >> If you are implementing a writer derived from StreamingSinc, you should >> implement StreamedGenerateData, not ThreadedStreamedGenerate data as you >> don't want threading. >> >>> >>> If I set the NumberOfStreamDivisions to the number of slices in the 3D >>> Stack Input, is it guaranteed that each slice will be processed on its own >>> for the default ImageRegionSplitterSlowDimension? Or would I have to use an >>> approach as in itkJoinSeriesImageFilterStreamingTest.cxx employing >>> itkExtractImageFilter for each slice? >> >> The StreamedGenerateData method would get invoked for each slice with that >> slice being the specified region. However, the specified region provided to >> StreamedGenerateData may be smaller than the buffered region of the image. It >> may be best and most general to use the ExtractImageFilter to make sure the >> buffer is as expected. >> >> >>> >>> In the docs of ImageSeriesWriter it says: "Usually, the output image type >>> will have fewer dimensions than the input image type." Is there a way to >>> use the ImageSeriesWriter to save a series of hypercubes as >>> ImageRegionSplitterMultidimensional would yield internally? >> >> I don't think it has this feature. >> >>> >>> Thanks for any help or hints. Roman >>> >>> On 17/04/15 20:13, Bradley Lowekamp wrote: >>>> Hello, >>>> >>>> Glad to hear it worked for you. >>>> >>>> I have just fixed the progress reporting [1]. >>>> >>>> The StreamingImageFilter overloads the UpdateData method [2], by passing >>>> the standard ImageToImage/ImageSource methods such and GenerateData, >>>> ThreadedGenerateData etc. It's actually not really designed to be >>>> derived from, and it used mostly to drive the streaming of a pipeline. It >>>> can be seen as slicing up the output image in to pieces, and requesting >>>> those pieces from the pipeline, the assembling them into the output >>>> image. >>>> >>>> The resulting behavior of the ImageSinc, with the StreamingProcessObject >>>> goes something like this: >>>> >>>> >>>> BeforeStreamedGenerateData() >>>> >>>> For each requested streamed chunk: For each thread process part of >>>> streamed chunk: ThreadedStreamedGenerateData() >>>> >>>> AfterStreamedGenerateData() >>>> >>>> So the input image is getting sliced up twice the first for streaming and >>>> the second for multi-threading. >>>> >>>> The StreamingImageFitler could be rewritten onto this framework to >>>> perhaps provide a generalized base class. >>>> >>>> For the StreamingStatisticsImage filter, the statistics are accumulated >>>> for each thread multiple times ( for each streamed chunk ), then the >>>> totals from the threads are reduced to the results. >>>> >>>> These classes certainly need more documentation before further >>>> integration into ITK. >>>> >>>> Brad >>>> >>>> [1] >>>> https://github.com/blowekamp/itkStreamingSinc/commit/d8415cf137d69a0e81b6dd46145d8cb7df2825c3 >>>> >>>> >>> >>>> > [2] https://github.com/InsightSoftwareConsortium/ITK/blob/8f7c404aff99f5ae3dfedce6e480701f0304864c/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L118-Lundefined >>>> >>>> On Apr 17, 2015, at 12:12 PM, Grothausmann, Roman Dr. >>>> wrote: >>>> >>>>> Dear Brad, dear Richard, >>>>> >>>>> >>>>> Many thanks for Your replies. So, if I understand You correctly, the >>>>> problem is that the current framework (with StreamingImageFilter) will >>>>> run AfterThreadedGenerateData for each chunk and not just when the >>>>> whole image has been processed. So one would need to combine >>>>> StatisticsImageFilter and StreamingImageFilter into one filter, i.e. >>>>> basically that the part of AfterThreadedGenerateData is executed by >>>>> StreamingImageFilter. If I understand the code of itkStreamingSinc >>>>> correctly, this is what it does? itkStreamingSinc provides a base class >>>>> to combine multi-threaded filters with a StreamingImageFilter to make >>>>> them streamable. This comes with the trade-off that the resulting >>>>> filter will not provide an output, which is no problem if it is not >>>>> needed. So, e.g. itkStreamingStatisticsImageFilter cannot be connected >>>>> to itkPipelineMonitorImageFilter as it would need an output of >>>>> itkStreamingStatisticsImageFilter? >>>>> >>>>> Many thanks Brad for implementing itkStreamingStatisticsImageFilter. I >>>>> just tested it and it works perfectly >>>>> (https://github.com/romangrothausmann/ITK-CLIs/commit/38bcad35bf004feaf2189bdaaffcf398fbca1f60). >>>>> >>>>> >>> >>>>> > Though, I do not understand the changes You made in: https://github.com/blowekamp/itkStreamingSinc/commit/b4ae9b61dc08388fbf1b3bfd9e5cf570dd40a0c6 >>>>> Is the accumulation that still resides in AfterStreamedGenerateData >>>>> not used at all? >>>>> (https://github.com/blowekamp/itkStreamingSinc/commit/dae948bea0966a2c3924351bf9c15bfcef318ac6#diff-ad64d497b8f9aadd5da97c5e1c793dc9R210) >>>>> >>>>> >>> >>>>> > Just as a side note: The progress reported by itkStreamingStatisticsImageFilter jumps to 100% for each chunk. >>>>> >>>>> All in all Your itkStreamingSinc and the implemented streaming-filters >>>>> are really a great contribution to ITK and I fully recommend >>>>> incorporating it into ITK. >>>>> >>>>> Many thanks again Roman >>>>> >>>>> >>>>> On 17/04/15 15:47, Bradley Lowekamp wrote: >>>>>> Hi, >>>>>> >>>>>> I was able to easy update a the StatisticsImageFilter to use my >>>>>> streaming base class for reduction algorithms [1]. It runs basically >>>>>> the same expect that you can set the number of stream divisions[2], >>>>>> there is the potential for setting the way the input image is split >>>>>> via the RegionSplitter in a base class [3]. >>>>>> >>>>>> You should be able to just clone the repository into you >>>>>> ITK/Modules/External directory, then enable it in the CMake >>>>>> configuration to use. >>>>>> >>>>>> Please let me know if it works for you. >>>>>> >>>>>> This should help :) Brad > [1] >>>>>> https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkStreamingStatisticsImageFilter.h >>>>>> >>>>>> >>> >>>>>> > [2] https://github.com/blowekamp/itkStreamingSinc/blob/master/test/itkStreamingStatisticsImageFilterTest2.cxx#L61 >>>>>> [3] >>>>>> https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkImageSinc.h#L99 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>> >>>>>> > On Apr 17, 2015, at 7:14 AM, Bradley Lowekamp >>>>>> wrote: >>>>>> >>>>>>> Hello fellow mailing list member, >>>>>>> >>>>>>> Currently in ITK there are two base classes for streaming images >>>>>>> in ITK. The >>>>> ImageToImageFilter provide the framework of streaming one input region >>>>> to one output region. The other is the StreamingImageFilter which >>>>> provides the framework to stream multiple image regions and merge them >>>>> together into a single output image. This StatisticsImageFilter needs a >>>>> framework which consumes multiple input image regions and reduces the >>>>> data produced. I happen to have implemented such a framework here [1]. >>>>> It currently has the LabelStatisticsImageFilter implemented in a >>>>> streaming fashion. >>>>>>> >>>>>>> Let me give it a try and see how quickly I can get the >>>>>>> StatisticsImageFilter >>>>> in this framework. Help writing tests would be appreciated. >>>>>>> >>>>>>> Thanks, Brad >>>>>>> >>>>>>> [1] https://github.com/blowekamp/itkStreamingSinc >>>>>>> >>>>>>> On Apr 17, 2015, at 5:08 AM, Dr. Roman Grothausmann >>>>>>> wrote: >>>>>>> >>>>>>>> Dear mailing list members, >>>>>>>> >>>>>>>> >>>>>>>> I'm wondering why the itkStatisticsImageFilter cannot stream? >>>>>>>> Looking into itkStatisticsImageFilter.hxx it requests the whole >>>>>>>> input in GenerateInputRequestedRegion and >>>>>>>> EnlargeOutputRequestedRegion but in ThreadedGenerateData only >>>>>>>> iterates over the outputRegionForThread. Where in the code is the >>>>>>>> whole input image needed as one single block? >>>>>>>> >>>>>>>> Thanks for any 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-2900 _____________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>>>> http://www.kitware.com/products/protraining.php >>>>>>>> >>>>>>>> Please keep messages on-topic and check the 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-2900 >>>> >>> >>> -- 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-2900 >> > > -- > 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-2900 From grothausmann.roman at mh-hannover.de Sat Apr 25 15:17:08 2015 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Sat, 25 Apr 2015 21:17:08 +0200 Subject: [ITK-users] why can the ImageSeriesWriter not stream? In-Reply-To: <019B5FE9-55C6-4D0F-ADBE-B094AA132720@mail.nih.gov> References: <5530CDA2.6050603@mh-hannover.de> <9FFA219D-8E98-4524-9E59-3164AF8DE0DD@mail.nih.gov> <9D3D6598-4AB3-4DD0-81EC-81CB3C8F3BBB@mail.nih.gov> <553130E1.5070909@mh-hannover.de> <5534B925.60904@mh-hannover.de> <2F0D626E-F982-41DD-86BF-5DE18F8861FF@mail.nih.gov> <553BD2FB.7060203@mh-hannover.de> <019B5FE9-55C6-4D0F-ADBE-B094AA132720@mail.nih.gov> Message-ID: <553BE834.2050709@mh-hannover.de> On 25/04/15 20:14, Bradley Lowekamp wrote: > The MetaIO, had some pre-existing Pasting/Streaming interfaces and behaviors > before the StreamingImageIOBase was implemented. It is still one of the most > heavily tested IOs for streaming and should be trusted. As the MetaIO is a "one of the most heavily tested IOs" I'm still wondering that nobody ever seems to have had a problem with writing MetaImage > 4GB compressed (as I reported here: https://issues.itk.org/jira/browse/ITK-3321) Is that somehow connected to the limitation that streaming and compressing do not go together and that the MetaIO is independent of StreamingImageIOBase? I also found a bug report and fix of Yours concerning the file size of MetaImages, however related to MacOS: http://itk.org/Bug/view.php?id=9320 so I guess these two are not related. > On Apr 25, 2015, at 1:46 PM, Grothausmann, Roman Dr. > wrote: > >> Dear Brad, dear mailing list members, >> >> >> While the ImageSeriesReader is capable of streaming it seems the >> ImageSeriesWriter (although suggested: >> http://www.kitware.com/media/html/IOStreamingInITK.html) cannot (my simple >> try does not work: >> https://github.com/romangrothausmann/ITK-CLIs/commit/f21c624057b3010d864d527988d1c67a151c1e94). >> >> Is that just not implemented yet or intentionally avoided? >> I was able to create a streaming version by using >> Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterStreamingTest.cxx >> as an example: >> https://github.com/romangrothausmann/ITK-CLIs/commit/e588c6635c60e4bcb5b946cf0cb985727197df9c >> >> Is that the way to go? >> >> Is there a reason why the MetaImageIO >> (http://www.itk.org/Doxygen47/html/classitk_1_1MetaImageIO.html) although >> it supports streaming does not inherit StreamingImageIOBase as other >> streamable ImageIO like MRC? >> >> Thanks for any hints. Roman >> >> On 20/04/15 20:09, Bradley Lowekamp wrote: >>> Roman, >>> >>> On Apr 20, 2015, at 4:30 AM, Grothausmann, Roman Dr. >>> wrote: >>> >>>> Many thanks for Your answers and for also fixing the progress >>>> reporting. Just tested and it works like a charm. It's a really great >>>> contribution especially for those having to work with very big images. >>>> I'll give it a try to use Your itkImageSinc to implement a "chunk >>>> writer" taking StreamingStatisticsImage as an example and >>>> ImageRegionSplitterMultidimensional to create the chunks. >>> >>> If you are implementing a writer derived from StreamingSinc, you should >>> implement StreamedGenerateData, not ThreadedStreamedGenerate data as you >>> don't want threading. >>> >>>> >>>> If I set the NumberOfStreamDivisions to the number of slices in the 3D >>>> Stack Input, is it guaranteed that each slice will be processed on its >>>> own for the default ImageRegionSplitterSlowDimension? Or would I have >>>> to use an approach as in itkJoinSeriesImageFilterStreamingTest.cxx >>>> employing itkExtractImageFilter for each slice? >>> >>> The StreamedGenerateData method would get invoked for each slice with >>> that slice being the specified region. However, the specified region >>> provided to StreamedGenerateData may be smaller than the buffered region >>> of the image. It may be best and most general to use the >>> ExtractImageFilter to make sure the buffer is as expected. >>> >>> >>>> >>>> In the docs of ImageSeriesWriter it says: "Usually, the output image >>>> type will have fewer dimensions than the input image type." Is there a >>>> way to use the ImageSeriesWriter to save a series of hypercubes as >>>> ImageRegionSplitterMultidimensional would yield internally? >>> >>> I don't think it has this feature. >>> >>>> >>>> Thanks for any help or hints. Roman >>>> >>>> On 17/04/15 20:13, Bradley Lowekamp wrote: >>>>> Hello, >>>>> >>>>> Glad to hear it worked for you. >>>>> >>>>> I have just fixed the progress reporting [1]. >>>>> >>>>> The StreamingImageFilter overloads the UpdateData method [2], by >>>>> passing the standard ImageToImage/ImageSource methods such and >>>>> GenerateData, ThreadedGenerateData etc. It's actually not really >>>>> designed to be derived from, and it used mostly to drive the >>>>> streaming of a pipeline. It can be seen as slicing up the output >>>>> image in to pieces, and requesting those pieces from the pipeline, >>>>> the assembling them into the output image. >>>>> >>>>> The resulting behavior of the ImageSinc, with the >>>>> StreamingProcessObject goes something like this: >>>>> >>>>> >>>>> BeforeStreamedGenerateData() >>>>> >>>>> For each requested streamed chunk: For each thread process part of >>>>> streamed chunk: ThreadedStreamedGenerateData() >>>>> >>>>> AfterStreamedGenerateData() >>>>> >>>>> So the input image is getting sliced up twice the first for streaming >>>>> and the second for multi-threading. >>>>> >>>>> The StreamingImageFitler could be rewritten onto this framework to >>>>> perhaps provide a generalized base class. >>>>> >>>>> For the StreamingStatisticsImage filter, the statistics are >>>>> accumulated for each thread multiple times ( for each streamed chunk >>>>> ), then the totals from the threads are reduced to the results. >>>>> >>>>> These classes certainly need more documentation before further >>>>> integration into ITK. >>>>> >>>>> Brad >>>>> >>>>> [1] >>>>> https://github.com/blowekamp/itkStreamingSinc/commit/d8415cf137d69a0e81b6dd46145d8cb7df2825c3 >>>>> >>>>> >>>> >>>>> >> >>>>> [2] https://github.com/InsightSoftwareConsortium/ITK/blob/8f7c404aff99f5ae3dfedce6e480701f0304864c/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L118-Lundefined >>>>> >>>>> On Apr 17, 2015, at 12:12 PM, Grothausmann, Roman Dr. >>>>> wrote: >>>>> >>>>>> Dear Brad, dear Richard, >>>>>> >>>>>> >>>>>> Many thanks for Your replies. So, if I understand You correctly, >>>>>> the problem is that the current framework (with >>>>>> StreamingImageFilter) will run AfterThreadedGenerateData for each >>>>>> chunk and not just when the whole image has been processed. So one >>>>>> would need to combine StatisticsImageFilter and >>>>>> StreamingImageFilter into one filter, i.e. basically that the part >>>>>> of AfterThreadedGenerateData is executed by StreamingImageFilter. >>>>>> If I understand the code of itkStreamingSinc correctly, this is >>>>>> what it does? itkStreamingSinc provides a base class to combine >>>>>> multi-threaded filters with a StreamingImageFilter to make them >>>>>> streamable. This comes with the trade-off that the resulting filter >>>>>> will not provide an output, which is no problem if it is not >>>>>> needed. So, e.g. itkStreamingStatisticsImageFilter cannot be >>>>>> connected to itkPipelineMonitorImageFilter as it would need an >>>>>> output of itkStreamingStatisticsImageFilter? >>>>>> >>>>>> Many thanks Brad for implementing >>>>>> itkStreamingStatisticsImageFilter. I just tested it and it works >>>>>> perfectly >>>>>> (https://github.com/romangrothausmann/ITK-CLIs/commit/38bcad35bf004feaf2189bdaaffcf398fbca1f60). >>>>>> >>>>>> >>>> >>>>>> >> >>>>>> Though, I do not understand the changes You made in: https://github.com/blowekamp/itkStreamingSinc/commit/b4ae9b61dc08388fbf1b3bfd9e5cf570dd40a0c6 >>>>>> Is the accumulation that still resides in >>>>>> AfterStreamedGenerateData not used at all? >>>>>> (https://github.com/blowekamp/itkStreamingSinc/commit/dae948bea0966a2c3924351bf9c15bfcef318ac6#diff-ad64d497b8f9aadd5da97c5e1c793dc9R210) >>>>>> >>>>>> >>>> >>>>>> >> >>>>>> Just as a side note: The progress reported by itkStreamingStatisticsImageFilter jumps to 100% for each chunk. >>>>>> >>>>>> All in all Your itkStreamingSinc and the implemented >>>>>> streaming-filters are really a great contribution to ITK and I >>>>>> fully recommend incorporating it into ITK. >>>>>> >>>>>> Many thanks again Roman >>>>>> >>>>>> >>>>>> On 17/04/15 15:47, Bradley Lowekamp wrote: >>>>>>> Hi, >>>>>>> >>>>>>> I was able to easy update a the StatisticsImageFilter to use my >>>>>>> streaming base class for reduction algorithms [1]. It runs >>>>>>> basically the same expect that you can set the number of stream >>>>>>> divisions[2], there is the potential for setting the way the >>>>>>> input image is split via the RegionSplitter in a base class [3]. >>>>>>> >>>>>>> You should be able to just clone the repository into you >>>>>>> ITK/Modules/External directory, then enable it in the CMake >>>>>>> configuration to use. >>>>>>> >>>>>>> Please let me know if it works for you. >>>>>>> >>>>>>> This should help :) Brad > [1] >>>>>>> https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkStreamingStatisticsImageFilter.h >>>>>>> >>>>>>> >>>> >>>>>>> >> >>>>>>> [2] https://github.com/blowekamp/itkStreamingSinc/blob/master/test/itkStreamingStatisticsImageFilterTest2.cxx#L61 >>>>>>> [3] >>>>>>> https://github.com/blowekamp/itkStreamingSinc/blob/master/include/itkImageSinc.h#L99 >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>> >>>>>>> >> >>>>>>> On Apr 17, 2015, at 7:14 AM, Bradley Lowekamp >>>>>>> wrote: >>>>>>> >>>>>>>> Hello fellow mailing list member, >>>>>>>> >>>>>>>> Currently in ITK there are two base classes for streaming >>>>>>>> images in ITK. The >>>>>> ImageToImageFilter provide the framework of streaming one input >>>>>> region to one output region. The other is the StreamingImageFilter >>>>>> which provides the framework to stream multiple image regions and >>>>>> merge them together into a single output image. This >>>>>> StatisticsImageFilter needs a framework which consumes multiple >>>>>> input image regions and reduces the data produced. I happen to have >>>>>> implemented such a framework here [1]. It currently has the >>>>>> LabelStatisticsImageFilter implemented in a streaming fashion. >>>>>>>> >>>>>>>> Let me give it a try and see how quickly I can get the >>>>>>>> StatisticsImageFilter >>>>>> in this framework. Help writing tests would be appreciated. >>>>>>>> >>>>>>>> Thanks, Brad >>>>>>>> >>>>>>>> [1] https://github.com/blowekamp/itkStreamingSinc >>>>>>>> >>>>>>>> On Apr 17, 2015, at 5:08 AM, Dr. Roman Grothausmann >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Dear mailing list members, >>>>>>>>> >>>>>>>>> >>>>>>>>> I'm wondering why the itkStatisticsImageFilter cannot >>>>>>>>> stream? Looking into itkStatisticsImageFilter.hxx it requests >>>>>>>>> the whole input in GenerateInputRequestedRegion and >>>>>>>>> EnlargeOutputRequestedRegion but in ThreadedGenerateData >>>>>>>>> only iterates over the outputRegionForThread. Where in the >>>>>>>>> code is the whole input image needed as one single block? >>>>>>>>> >>>>>>>>> Thanks for any 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-2900 _____________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> Kitware offers ITK Training Courses, for more information >>>>>>>>> visit: http://www.kitware.com/products/protraining.php >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the 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-2900 >>>>> >>>> >>>> -- 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-2900 >>> >> >> -- 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-2900 > -- 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-2900 From wumengda at gmail.com Mon Apr 27 00:20:09 2015 From: wumengda at gmail.com (Wei Xiong) Date: Mon, 27 Apr 2015 06:20:09 +0200 Subject: [ITK-users] From: Wei Xiong Message-ID: <88231E42-3553-46FC-A3D8-ABB40BB58056@wande.net.pl> Hi http://mtwindowfilms.com/plate.php?garden=sgy72fma7n5tkcdm Wei Xiong Sent from my iPhone From samaneh.kazemi at gmail.com Mon Apr 27 10:49:25 2015 From: samaneh.kazemi at gmail.com (Samaneh Kazemi) Date: Mon, 27 Apr 2015 10:49:25 -0400 Subject: [ITK-users] Error in tkImageToImageFilter.hxx in ITK 4.6.0 Message-ID: Hello, I used the "DiffeomorphicDemonsRegistartionFilter" in ITK 4.6.0 but I got an error: Inputs do not occupy the same InputImage Origin: [8.731166e+01, -1.412807e+02, 1.393666e+02], InputImage_2 Origin: [-8.963990e+01, -1.41607 Tolerance: 1.600000e-05 InputImage Spacing: [1.600000e+01, 1.600000e+01, 1.920004e+01], InputImage_2 Spacing: [1.616160e+01, 1.513600 Tolerance: 1.600000e-05 InputImage Direction: 3.046756e-02 -6.096625e-02 -9.976747e-01 9.995358e-01 1.858242e-03 3.041084e-02 -1.141059e-07 -9.981381e-01 6.099456e-02 , InputImage_2 Direction: -0.000000e+00 -3.071914e-09 1.000000e+00 -3.071914e-09 1.000000e+00 3.071914e-09 -1.000000e+00 -3.071914e-09 0.000000e+00 Tolerance: 1.000000e-06 for itkImageToImageFilter.hxx. Could someone help me to solve it? Thanks, Samaneh -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Mon Apr 27 11:00:41 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 27 Apr 2015 11:00:41 -0400 Subject: [ITK-users] ITK Version 3.20.2 reading image in debug mode In-Reply-To: <639C0C4CF854594E920361562A5266BB30BC9CD9@SBXNG01.sw.ca> References: <639C0C4CF854594E920361562A5266BB30BC9CD9@SBXNG01.sw.ca> Message-ID: Have you tried running the debug-compiled program under debugger, and when it crashes looking at the call stack to see in which function/method is the crash occurring? That should give some insight into what is happening. On Fri, Apr 24, 2015 at 11:24 AM, Khojaste, Amir < amir.khojaste at sunnybrook.ca> wrote: > Hi guys, > > I am using an open-source library named Plastimatch which uses the ITK > libraries. I have built my Plastimatch (and also ITK) in debug mode. I am > using a cropping method in Plastimach which simply crops an image. > Plastimatch uses ITK libraries to read the image. I have a labelmap image > named Prostate_MR_Labelmaps.mha, this image loads in 3DSlicer (for > visualization) just fine! But when I am using Plastimach to read the image > and crop it (which uses ITK::ImageFileReader function) I get the following > error: > > *Unhandled exception at 0x000000013fbb9c13 in plastimatch.exe: 0xC0000005: > Access violation reading location 0xffffffffffffffff.* > > However, I also have built the Plastimatch and ITK libraries in Release > mode and I did not receive this error and it read the image perfectly! > > Are there any thoughts out there to what could be the cause of this > problem? > > I am using Windows 7, 64 bits, ITK version 3.20.2 if that helps. > > Thanks in advance for your help! > > Amir > > > > *This e-mail is intended only for the named recipient(s) and may contain > confidential, personal and/or health information (information which may be > subject to legal restrictions on use, retention and/or disclosure). No > waiver of confidence is intended by virtue of communication via the > internet. Any review or distribution by anyone other than the person(s) > for whom it was originally intended is strictly prohibited. If you have > received this e-mail in error, please contact the sender and destroy all > copies.* > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 dzenanz at gmail.com Mon Apr 27 11:04:33 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 27 Apr 2015 11:04:33 -0400 Subject: [ITK-users] Error in tkImageToImageFilter.hxx in ITK 4.6.0 In-Reply-To: References: Message-ID: The usual reason for this is when images do not overlap in physical space. On Mon, Apr 27, 2015 at 10:49 AM, Samaneh Kazemi wrote: > Hello, > > I used the "DiffeomorphicDemonsRegistartionFilter" in ITK 4.6.0 but I got > an error: > > Inputs do not occupy the same InputImage Origin: [8.731166e+01, > -1.412807e+02, 1.393666e+02], InputImage_2 Origin: [-8.963990e+01, -1.41607 > Tolerance: 1.600000e-05 > InputImage Spacing: [1.600000e+01, 1.600000e+01, 1.920004e+01], > InputImage_2 Spacing: [1.616160e+01, 1.513600 > Tolerance: 1.600000e-05 > InputImage Direction: 3.046756e-02 -6.096625e-02 -9.976747e-01 > 9.995358e-01 1.858242e-03 3.041084e-02 > -1.141059e-07 -9.981381e-01 6.099456e-02 > , InputImage_2 Direction: -0.000000e+00 -3.071914e-09 1.000000e+00 > -3.071914e-09 1.000000e+00 3.071914e-09 > -1.000000e+00 -3.071914e-09 0.000000e+00 > > Tolerance: 1.000000e-06 > > for itkImageToImageFilter.hxx. > > Could someone help me to solve it? > > Thanks, > Samaneh > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 maudette at odu.edu Mon Apr 27 12:12:50 2015 From: maudette at odu.edu (Audette, Michel A.) Date: Mon, 27 Apr 2015 16:12:50 +0000 Subject: [ITK-users] deformable surface registration Message-ID: <22EC75E8215562428ACADFA35877A25A261B4853@JANEWAY.ts.odu.edu> Dear ITK users, one of my students needs to produce an accurate surface mesh correspondence in conjunction with stats shape aware active surface models, towards a vertebral segmentation application. Doing a Google search on this, I found a discussion from 2009 http://public.kitware.com/pipermail/insight-users/2009-August/031857.html; I was wondering if there has been progress in this area since then. For example, can the image deformation methods such as Demons and the like be applied to a surface to surface correspondence problem (with further information available such as underlying MRI gradients)? Our surface meshes relate to vertebral surfaces, so these are not topologically equivalent to spheres; they are more like doughnuts. Thanks for kind support. Michel Michel Audette, Ph.D. Assistant Professor, Department of Modeling, Simulation and Visualization Engineering, Old Dominion University, Norfolk, VA. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stnava at gmail.com Mon Apr 27 12:32:18 2015 From: stnava at gmail.com (brian avants) Date: Mon, 27 Apr 2015 12:32:18 -0400 Subject: [ITK-users] deformable surface registration In-Reply-To: <22EC75E8215562428ACADFA35877A25A261B4853@JANEWAY.ts.odu.edu> References: <22EC75E8215562428ACADFA35877A25A261B4853@JANEWAY.ts.odu.edu> Message-ID: hi michel nick tustison did some good work on this recently and most of it is available in both ITK and in ANTs. the work is evolving (in terms of efficient memory use) but the basics of doing images + segmentations/surfaces is available. e.g. you could run a demons + iterative closest point registration pretty easily. brian On Mon, Apr 27, 2015 at 12:12 PM, Audette, Michel A. wrote: > Dear ITK users, > > > > one of my students needs to produce an accurate surface mesh > correspondence in conjunction with stats shape aware active surface models, > towards a vertebral segmentation application. > > > > Doing a Google search on this, I found a discussion from 2009 > http://public.kitware.com/pipermail/insight-users/2009-August/031857.html; > I was wondering if there has been progress in this area since then. For > example, can the image deformation methods such as Demons and the like be > applied to a surface to surface correspondence problem (with further > information available such as underlying MRI gradients)? > > > > Our surface meshes relate to vertebral surfaces, so these are not > topologically equivalent to spheres; they are more like doughnuts. > > > > Thanks for kind support. > > > > Michel > > > Michel Audette, Ph.D. > Assistant Professor, > Department of Modeling, Simulation and Visualization Engineering, > Old Dominion University, > Norfolk, VA. > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Mon Apr 27 14:19:28 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 27 Apr 2015 14:19:28 -0400 Subject: [ITK-users] testing In-Reply-To: <553BC9AA.2050708@gmx.at> References: <553BC9AA.2050708@gmx.at> Message-ID: Hi Johannes, > Thank you! At the moment every test is an executable. Maybe later when the > tests are getting more and more than I will try to use the test manager. Sounds like a good plan. > At the moment I have a problem with the itkTestingComparisonImageFilter. The > image which is the output of my algorithm is exact the same as the image > that I use as valid input for this filter which I get from another software. > But the output of the Comparison filter is max difference -3.40282e+38, the > min difference +3.40282e+38, total and mean difference are 0, and the > interesting part is that the number of pixels with difference is 0 (what I > would expect). But why this min and max values? These are the default initial values. Note that the "max" is a very large negative number and the "min" is a very large positive number. > In another test I am doing the same where the two images which I compare are > also the exact same and I get as max difference something in the range of > 1e-7 and the number of pixels with difference is bigger than 0, but this is > ok and seems to be the inaccuracy which to expect when using float. Yes, a tolerance is usually required, especially when working with float pixels. HTH, Matt From seesomi at gmail.com Mon Apr 27 21:19:21 2015 From: seesomi at gmail.com (somi) Date: Mon, 27 Apr 2015 21:19:21 -0400 Subject: [ITK-users] deformable surface registration In-Reply-To: References: <22EC75E8215562428ACADFA35877A25A261B4853@JANEWAY.ts.odu.edu> Message-ID: Hi, For my project I ended up using a diffusion based algorithm somewhat similar to described in http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.87.6924&rep=rep1&type=pdf Here is a summary of the algorithm ( section 4 in paper above ) : *A time and space discretized solution the the geometry-constrained diffusion may be obtained by iterative Gaussian convolution and back-projecting the constrained surfaces. The crux of the algorithm then becomes : * *1. Initial displacement. Construct an initial guess of the displacement field. * *2. Diffusion step. Convolve the displacement field with a Gaussian kernel. * *3. Deform source. Deform the source surface with respect to the displacement field. * *4. Matching (Projection onto the target surface). For all points on the deformed surface: Find the closest point on the target surface. * *5. Update displacement field. For all points on the deformed surface: Change the displacements according to the match. * *6. Convergence. Is the displacement field stable? If not, go to 2. Some of the steps are explained in greater detail below* I also used the features ( curvature in step 4) to determine the closeness. The algorithm took a surface model and a point set as input. The vertices of the surface model were deformed to match the point set without modifying the connectivity. Thanks, Somi Confessions, Obsessions , Beliefs , Wishes , and a few Esoteric Blogs http://500px.com/seesomi On Mon, Apr 27, 2015 at 12:32 PM, brian avants wrote: > hi michel > > nick tustison did some good work on this recently and most of it is > available in both ITK and in ANTs. the work is evolving (in terms of > efficient memory use) but the basics of doing images + > segmentations/surfaces is available. e.g. you could run a demons + > iterative closest point registration pretty easily. > > > brian > > > On Mon, Apr 27, 2015 at 12:12 PM, Audette, Michel A. > wrote: > >> Dear ITK users, >> >> >> >> one of my students needs to produce an accurate surface mesh >> correspondence in conjunction with stats shape aware active surface models, >> towards a vertebral segmentation application. >> >> >> >> Doing a Google search on this, I found a discussion from 2009 >> http://public.kitware.com/pipermail/insight-users/2009-August/031857.html; >> I was wondering if there has been progress in this area since then. For >> example, can the image deformation methods such as Demons and the like be >> applied to a surface to surface correspondence problem (with further >> information available such as underlying MRI gradients)? >> >> >> >> Our surface meshes relate to vertebral surfaces, so these are not >> topologically equivalent to spheres; they are more like doughnuts. >> >> >> >> Thanks for kind support. >> >> >> >> Michel >> >> >> Michel Audette, Ph.D. >> Assistant Professor, >> Department of Modeling, Simulation and Visualization Engineering, >> Old Dominion University, >> Norfolk, VA. >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amir.khojaste at sunnybrook.ca Tue Apr 28 12:02:00 2015 From: amir.khojaste at sunnybrook.ca (Khojaste, Amir) Date: Tue, 28 Apr 2015 16:02:00 +0000 Subject: [ITK-users] No ITKReview.lib found! Message-ID: <639C0C4CF854594E920361562A5266BB30BCC189@SBXNG01.sw.ca> Hello folks, I have built a project with ITK4.7 and Visual Studio 2013. Everything went fine with no problem. However I wanted to test my program using ITK3.20.2 and Visual Studio 2008. I get the following error: fatal error LNK1104: cannot open file 'ITKIOReview.lib' I have this library when I built my ITK4.7 however I don't see it when I try to build ITK3.20.2. Please note that I have built the ITK3.20.2 with ITK_USE_Review to be ON! As well. This is the CMakelists I have used for both ITK environments: cmake_minimum_required(VERSION 2.8) project(CropVolumeMain) find_package(ITK REQUIRED) include(${ITK_USE_FILE}) if (ITKVtkGlue_LOADED) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) endif() add_executable(CropVolumeMain MACOSX_BUNDLE CropVolumeMain.cxx) if( "${ITK_VERSION_MAJOR}" LESS 4 ) target_link_libraries(CropVolumeMain ITKReview ${ITK_LIBRARIES}) else( "${ITK_VERSION_MAJOR}" LESS 4 ) target_link_libraries(CropVolumeMain ${ITK_LIBRARIES}) endif( "${ITK_VERSION_MAJOR}" LESS 4 ) Any help is much appreciated! Cheers, Amir This e-mail is intended only for the named recipient(s) and may contain confidential, personal and/or health information (information which may be subject to legal restrictions on use, retention and/or disclosure). No waiver of confidence is intended by virtue of communication via the internet. Any review or distribution by anyone other than the person(s) for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and destroy all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Denis.Abu-Sammour at medma.uni-heidelberg.de Wed Apr 29 03:04:19 2015 From: Denis.Abu-Sammour at medma.uni-heidelberg.de (Abu-Sammour, Denis) Date: Wed, 29 Apr 2015 09:04:19 +0200 Subject: [ITK-users] help Message-ID: <5E843F0B86B47846B72559B57A54F96217C721CFB2@MBX02.ad.uni-heidelberg.de> Dear itk Community, I am a fresh user of itk and c++ as well. I am trying to implement a new metric (similarity measure) to be used for image registration which is not available in the metrics provided by itk. I have seen comments on how to do that which simply stated to take a metric that is already implemented in itk such as "MeanSquaresImageToImageMetric" and modify the content specifically GetValue (), GetDerivative () and GetValueAndDerivative () members. Now I have found a itkMeanSquaresImageToImageMetric.txx on the web which I suppose is a templated class code (http://www.na-mic.org/svn/Slicer3-lib-mirrors/trunk/Insight/Code/Algorithms/itkMeanSquaresImageToImageMetric.txx). As a primitive itk and cpp user, what I have in mind is to copy and paste the content of this class into my code, modify the GetValue (), GetDerivative () and GetValueAndDerivative () functions and rename anything that says "MeanSquaresImageToImageMetric" with my own metric i.e. "MyMetric". Afterwards link it to the registration as outlined in the itk examples. Is that the way to go for it?! Additionally, in the "itkMeanSquaresImageToImageMetric.txx" there is also #include "itkMeanSquaresImageToImageMetric.h", should I leave it as is or modify it to #include "itkImageToImageMetric.h" instead? I am a bit lost here.. Thanks you for your time and consideration. Denis -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.ulge at gmail.com Wed Apr 29 08:46:34 2015 From: marco.ulge at gmail.com (Marco Ulgelmo) Date: Wed, 29 Apr 2015 14:46:34 +0200 Subject: [ITK-users] Convert 2D itkImage to vnl_matrix Message-ID: Hello, I was trying to get a matrix out of a 2D image as i need to perform particular calculations. At first i open a 3D image and using ExtractImageFilter i extract the 2D image collapsing the 3rd dimension. There must be something wrong in the code as every time i try to perform any kind of operation on the newly created matrix i get a segfault. It might be really stupid but i haven't been able to spot it. Code: typedef float OutputPixelType; typedef itk::Image< OutputPixelType, 4 > InputImageType; typedef itk::Image< OutputPixelType, 3 > OutputImageType; typedef itk::Image< OutputPixelType, 2 > BidimensionalImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; typedef itk::ImageFileReader< OutputImageType > OutputReaderType; typedef itk::ImageFileWriter< OutputImageType > WriterType; //mediaFilePath is the path to a 3D image (mha extension) char* MediaFileName = (char*)mediaFilePath.c_str(); OutputReaderType::Pointer reader = OutputReaderType::New(); reader->SetFileName(MediaFileName); reader->Update(); typedef itk::ExtractImageFilter< OutputImageType, BidimensionalImageType > BidimensionalExtractorType; BidimensionalExtractorType::Pointer extractor = BidimensionalExtractorType::New(); extractor->InPlaceOn(); extractor->SetDirectionCollapseToSubmatrix(); try{ reader->UpdateOutputInformation(); } catch ( itk::ExceptionObject & exp ){ return 0;// "Couldn't read selected Subject, format not supported."; } OutputImageType::RegionType inputRegion3 = reader->GetOutput()->GetLargestPossibleRegion(); OutputImageType::SizeType size3 = inputRegion3.GetSize(); size3[2] = 0; OutputImageType::IndexType start3 = inputRegion3.GetIndex(); start3[2] = 0; OutputImageType::RegionType desiredRegion3; desiredRegion3.SetSize( size3 ); desiredRegion3.SetIndex( start3 ); extractor->SetExtractionRegion( desiredRegion3 ); extractor->SetInput( reader->GetOutput() ); //writer->SetInput( extractor->GetOutput() ); int width = reader->GetOutput()->GetLargestPossibleRegion().GetSize()[0]; int height = reader->GetOutput()->GetLargestPossibleRegion().GetSize()[1]; const unsigned int rows = height; const unsigned int cols = width; typedef vnl_matrix_ref< OutputPixelType > MatrixType; BidimensionalImageType::Pointer image = extractor->GetOutput(); MatrixType matrix( rows, cols, image->GetBufferPointer()); matrix.data_array(); std::cout << matrix[1][1] << std::endl; Thanks, Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From amir.khojaste at sunnybrook.ca Wed Apr 29 12:35:54 2015 From: amir.khojaste at sunnybrook.ca (Khojaste, Amir) Date: Wed, 29 Apr 2015 16:35:54 +0000 Subject: [ITK-users] ITK3.20.2 Crashes - Help! Message-ID: <639C0C4CF854594E920361562A5266BB30BCC26F@SBXNG01.sw.ca> Hi guys, I am running the simplest piece of code using ITK3.20.2 libraries. In my program I simply want to read an image and do some processing on it and then save it. When I try to instantiate a pointer to my ImageFileReader the program crashes with the following message: Unhandled exception at 0x000000013fbcf0b1 in HelloWorld.exe: 0xC0000005: Access violation reading location 0x00000000bfdef6f5. It seems to be a memory leak error or something. I have used ITK3.20.2, CMake 2.8.10.2 and Visual Studio 2008 to configure my project. Following please find my code and my CMakelists.txt: /* Code ===========================================================================================*/ #include "itkImage.h" #include #include "itkImageFileWriter.h" #include "itkImageFileReader.h" #include "itkCropImageFilter.h" #include "itksys/SystemTools.hxx" const unsigned int ImageDimensions = 3; typedef itk::Vector VectorType; typedef itk::Image ImageType; typedef itk::Image ImageType2D; typedef itk::ImageFileReader ReaderType; int main(int argc, char* argv[]) { ImageType::Pointer image = ImageType::New(); //--- This line seem to be OK! ReaderType::Pointer reader = ReaderType::New(); //--This line will crash! system("pause"); return EXIT_SUCCESS; } /* CMakelists.txt ===========================================================================================*/ # This is the root ITK CMakeLists file. cmake_minimum_required(VERSION 2.4) if(COMMAND CMAKE_POLICY) cmake_policy(SET CMP0003 NEW) endif() # This project is designed to be built outside the Insight source tree. project(HelloWorld) # Find ITK. find_package(ITK REQUIRED) include(${ITK_USE_FILE}) add_executable(HelloWorld HelloWorld.cxx ) target_link_libraries(HelloWorld ${ITK_LIBRARIES}) I have tried this using Visual Studio 2013, ITK 4.7 and CMake 3.1.3 and it ran just fine! But here it doesn't! Any Idea on what might be the cause of problem? I am confused ... Thanks, Amir This e-mail is intended only for the named recipient(s) and may contain confidential, personal and/or health information (information which may be subject to legal restrictions on use, retention and/or disclosure). No waiver of confidence is intended by virtue of communication via the internet. Any review or distribution by anyone other than the person(s) for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and destroy all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From drescherjm at gmail.com Wed Apr 29 12:44:43 2015 From: drescherjm at gmail.com (John Drescher) Date: Wed, 29 Apr 2015 12:44:43 -0400 Subject: [ITK-users] ITK3.20.2 Crashes - Help! In-Reply-To: <639C0C4CF854594E920361562A5266BB30BCC26F@SBXNG01.sw.ca> References: <639C0C4CF854594E920361562A5266BB30BCC26F@SBXNG01.sw.ca> Message-ID: On Wed, Apr 29, 2015 at 12:35 PM, Khojaste, Amir wrote: > Hi guys, > > > > I am running the simplest piece of code using ITK3.20.2 libraries. In my > program I simply want to read an image and do some processing on it and then > save it. When I try to instantiate a pointer to my ImageFileReader the > program crashes with the following message: > > > > Unhandled exception at 0x000000013fbcf0b1 in HelloWorld.exe: 0xC0000005: > Access violation reading location 0x00000000bfdef6f5. > > > > It seems to be a memory leak error or something. I have used ITK3.20.2, > CMake 2.8.10.2 and Visual Studio 2008 to configure my project. Following > please find my code and my CMakelists.txt: > Did you build ITK with VS2008 in the same configuration that you use in your application? John From amir.khojaste at sunnybrook.ca Wed Apr 29 12:50:59 2015 From: amir.khojaste at sunnybrook.ca (Khojaste, Amir) Date: Wed, 29 Apr 2015 16:50:59 +0000 Subject: [ITK-users] ITK3.20.2 Crashes - Help! In-Reply-To: References: <639C0C4CF854594E920361562A5266BB30BCC26F@SBXNG01.sw.ca> Message-ID: <639C0C4CF854594E920361562A5266BB30BCC299@SBXNG01.sw.ca> Hi John and thanks for your quick answer, Yes I have built ITK in both Release and Debug mode using VS2008 and have tested my code (which is in debug mode) with them. Any clues? Thanks, Amir -----Original Message----- From: John Drescher [mailto:drescherjm at gmail.com] Sent: April-29-15 12:45 PM To: Khojaste, Amir Cc: insight-users at itk.org Subject: Re: [ITK-users] ITK3.20.2 Crashes - Help! On Wed, Apr 29, 2015 at 12:35 PM, Khojaste, Amir wrote: > Hi guys, > > > > I am running the simplest piece of code using ITK3.20.2 libraries. In my > program I simply want to read an image and do some processing on it and then > save it. When I try to instantiate a pointer to my ImageFileReader the > program crashes with the following message: > > > > Unhandled exception at 0x000000013fbcf0b1 in HelloWorld.exe: 0xC0000005: > Access violation reading location 0x00000000bfdef6f5. > > > > It seems to be a memory leak error or something. I have used ITK3.20.2, > CMake 2.8.10.2 and Visual Studio 2008 to configure my project. Following > please find my code and my CMakelists.txt: > Did you build ITK with VS2008 in the same configuration that you use in your application? John This e-mail is intended only for the named recipient(s) and may contain confidential, personal and/or health information (information which may be subject to legal restrictions on use, retention and/or disclosure). No waiver of confidence is intended by virtue of communication via the internet. Any review or distribution by anyone other than the person(s) for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and destroy all copies. From amghanem at gmail.com Wed Apr 29 12:56:52 2015 From: amghanem at gmail.com (amghanem) Date: Wed, 29 Apr 2015 09:56:52 -0700 (MST) Subject: [ITK-users] AnisotropicDiffusionVesselEnhancementImageFilter Message-ID: <1430326612454-35616.post@n7.nabble.com> Dear All, I Have a problem with using itk::AnisotropicDiffusionVesselEnhancementImageFilter. I used the code in http://www.insight-journal.org/browse/publication/163 "Vessel Enhancing Diffusion Filter" Appendix B Example 2 but the following methods give error " No member named 'SetSigmaMin' in 'itk::AnisotropicDiffusionVesselEnhancementImageFilter, itk::Image, itk::HessianSmoothed3DToVesselnessMeasureImageFilter >' " typedef itk::AnisotropicDiffusionVesselEnhancementImageFilter< InputImageType, OutputImageType> VesselnessFilterType; VesselnessFilterType::Pointer VesselnessFilter =VesselnessFilterType::New(); VesselnessFilter->SetInput( importFilter->GetOutput() ); VesselnessFilter->SetSigmaMin( 0.5 ); VesselnessFilter->SetSigmaMax( 2) ; VesselnessFilter->SetNumberOfSigmaSteps( 10 ); Then I used VesselnessFilter->GetMultiScaleVesselnessFilter()->SetSigmaMinimum(0.5); VesselnessFilter->GetMultiScaleVesselnessFilter()->SetSigmaMaximum(2); VesselnessFilter->GetMultiScaleVesselnessFilter()->SetNumberOfSigmaSteps(10); VesselnessFilter->SetNumberOfIterations( 5 ); VesselnessFilter->SetSensitivity( 5 ); VesselnessFilter->SetWStrength( 25 ); VesselnessFilter->SetEpsilon( 10e-2 ); but the output is very noisy with very large dynamic range, So I think the filter didn't run well Thanks for your time Ahmed -- View this message in context: http://itk-users.7.n7.nabble.com/AnisotropicDiffusionVesselEnhancementImageFilter-tp35616.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Wed Apr 29 19:23:47 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 29 Apr 2015 19:23:47 -0400 Subject: [ITK-users] Opportunities to share, discuss, design, and learn with other ITK community members Message-ID: There are a couple of upcoming opportunities to share, discuss, design, and learn with your fellow ITK community members. On Thursday (tomorrow), 1:00 PM Eastern USA time, there will be a Google+ Hangout where we will be doing code reviews: https://plus.google.com/events/cm4kg1r8i47a7vhcftds0lvmuts On Friday, 11:00 AM Eastern USA time, an ITK development conference, https://plus.google.com/events/chvqk0t43htquudtnq794f9e36o For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423 To get regular invites to these events, join the ITK Bar Camp G+ Community: https://plus.google.com/u/0/communities/111375098792764998322 All are welcome. Hope to talk to you then! From jan.bergmeier at imes.uni-hannover.de Thu Apr 30 04:26:50 2015 From: jan.bergmeier at imes.uni-hannover.de (Jan Bergmeier) Date: Thu, 30 Apr 2015 01:26:50 -0700 (MST) Subject: [ITK-users] ExhaustiveOptimizerv4 not working as expected Message-ID: <1430382410988-35618.post@n7.nabble.com> Hello everyone, I am trying to get the ExhaustiveOptimizerv4 to work. Therefore I built a minimal example: typedef itk::Image< double, 2 > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; typedef itk::MeanSquaresImageToImageMetricv4< ImageType, ImageType > MetricType; typedef itk::ExhaustiveOptimizerv4< double > OptimizerType; typedef itk::TranslationTransform< double, 2 >TransformType; typedef itk::LinearInterpolateImageFunction< ImageType, double > LinearInterpolatorType; typedef itk::ImageRegistrationMethodv4< ImageType, ImageType, TransformType > RegistrationType; ReaderType::Pointer fixedReader = ReaderType::New(); ReaderType::Pointer movingReader = ReaderType::New(); MetricType::Pointer metric = MetricType::New(); OptimizerType::Pointer optimizer = OptimizerType::New(); TransformType::Pointer identityTransform = TransformType::New(); LinearInterpolatorType::Pointer fixedInterpolator = LinearInterpolatorType::New(); LinearInterpolatorType::Pointer movingInterpolator = LinearInterpolatorType::New(); RegistrationType::Pointer registration = RegistrationType::New(); fixedReader->SetFileName( "fixedImage.png" ); movingReader->SetFileName( "movingImage.png" ); metric->SetFixedInterpolator( fixedInterpolator ); metric->SetMovingInterpolator( movingInterpolator ); identityTransform->SetIdentity(); OptimizerType::StepsType steps( identityTransform->GetNumberOfParameters() ); steps[1] = 10; steps[2] = 50; optimizer->SetNumberOfSteps( steps ); optimizer->SetStepLength( 1 ); registration->SetMetric( metric ); registration->SetOptimizer( optimizer ); registration->SetFixedImage( fixedReader->GetOutput() ); registration->SetMovingImage( movingReader->GetOutput() ); registration->SetFixedInitialTransform( identityTransform ); registration->SetMovingInitialTransform( identityTransform ); registration->Update(); std::cout << "Best value: " << registration->GetOptimizer()->GetValue() << std::endl; std::cout << "Number of iterations: " << optimizer->GetCurrentIteration() << std::endl; When I run this code, the number of iterations are 21. I would expect them to be 10*50 = 500, but the second steps entry seems to have no effect. Furthermore, the output from the registration metric is always 0, while it isn't if I use different optimizers. I hope anyone can help me. Thanks in advance! Jan -- View this message in context: http://itk-users.7.n7.nabble.com/ExhaustiveOptimizerv4-not-working-as-expected-tp35618.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Thu Apr 30 08:43:13 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 30 Apr 2015 08:43:13 -0400 Subject: [ITK-users] [ITK] ExhaustiveOptimizerv4 not working as expected In-Reply-To: <4716F5FECDB3EA41A13928B272544C1A02578C85@imesexchange.imes.intern> References: <4716F5FECDB3EA41A13928B272544C1A02578C85@imesexchange.imes.intern> Message-ID: Hi Jan, > steps[1] = 10; > steps[2] = 50; > When I run this code, the number of iterations are 21. I would expect them > to be 10*50 = 500, but the second steps entry seems to have no effect. C++ arrays index from zero, so this should be: steps[0] = 10; steps[1] = 50; HTH, Matt From amir.khojaste at sunnybrook.ca Thu Apr 30 11:36:00 2015 From: amir.khojaste at sunnybrook.ca (Khojaste, Amir) Date: Thu, 30 Apr 2015 15:36:00 +0000 Subject: [ITK-users] ITK3.20.2 Crashes - Help! In-Reply-To: <639C0C4CF854594E920361562A5266BB30BCC26F@SBXNG01.sw.ca> References: <639C0C4CF854594E920361562A5266BB30BCC26F@SBXNG01.sw.ca> Message-ID: <639C0C4CF854594E920361562A5266BB30BCC323@SBXNG01.sw.ca> Hey guys, Could anyone please help me with this?! I am really confused! I can't run a simple Image Reading code with ITK. I have built ITK Examples and ran their code and it went fine! But I can't run my own code! Is my CMakelists.txt correct? I have built ITK3.20.2 in Debug mode with VS2008 and added the CMake_Install_Prefix directory to my project. It seems that all the correct ITK libraries and headers are there but I am guessing maybe my CMakelists.txt is not correct. Any help?! Thanks, Amir From: Insight-users [mailto:insight-users-bounces at itk.org] On Behalf Of Khojaste, Amir Sent: April-29-15 12:36 PM To: insight-users at itk.org Subject: [ITK-users] ITK3.20.2 Crashes - Help! Hi guys, I am running the simplest piece of code using ITK3.20.2 libraries. In my program I simply want to read an image and do some processing on it and then save it. When I try to instantiate a pointer to my ImageFileReader the program crashes with the following message: Unhandled exception at 0x000000013fbcf0b1 in HelloWorld.exe: 0xC0000005: Access violation reading location 0x00000000bfdef6f5. It seems to be a memory leak error or something. I have used ITK3.20.2, CMake 2.8.10.2 and Visual Studio 2008 to configure my project. Following please find my code and my CMakelists.txt: /* Code ===========================================================================================*/ #include "itkImage.h" #include #include "itkImageFileWriter.h" #include "itkImageFileReader.h" #include "itkCropImageFilter.h" #include "itksys/SystemTools.hxx" const unsigned int ImageDimensions = 3; typedef itk::Vector VectorType; typedef itk::Image ImageType; typedef itk::Image ImageType2D; typedef itk::ImageFileReader ReaderType; int main(int argc, char* argv[]) { ImageType::Pointer image = ImageType::New(); //--- This line seem to be OK! ReaderType::Pointer reader = ReaderType::New(); //--This line will crash! system("pause"); return EXIT_SUCCESS; } /* CMakelists.txt ===========================================================================================*/ # This is the root ITK CMakeLists file. cmake_minimum_required(VERSION 2.4) if(COMMAND CMAKE_POLICY) cmake_policy(SET CMP0003 NEW) endif() # This project is designed to be built outside the Insight source tree. project(HelloWorld) # Find ITK. find_package(ITK REQUIRED) include(${ITK_USE_FILE}) add_executable(HelloWorld HelloWorld.cxx ) target_link_libraries(HelloWorld ${ITK_LIBRARIES}) I have tried this using Visual Studio 2013, ITK 4.7 and CMake 3.1.3 and it ran just fine! But here it doesn't! Any Idea on what might be the cause of problem? I am confused ... Thanks, Amir This e-mail is intended only for the named recipient(s) and may contain confidential, personal and/or health information (information which may be subject to legal restrictions on use, retention and/or disclosure). No waiver of confidence is intended by virtue of communication via the internet. Any review or distribution by anyone other than the person(s) for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and destroy all copies. This e-mail is intended only for the named recipient(s) and may contain confidential, personal and/or health information (information which may be subject to legal restrictions on use, retention and/or disclosure). No waiver of confidence is intended by virtue of communication via the internet. Any review or distribution by anyone other than the person(s) for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and destroy all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Apr 30 11:41:51 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 30 Apr 2015 11:41:51 -0400 Subject: [ITK-users] ITK3.20.2 Crashes - Help! In-Reply-To: <639C0C4CF854594E920361562A5266BB30BCC323@SBXNG01.sw.ca> References: <639C0C4CF854594E920361562A5266BB30BCC26F@SBXNG01.sw.ca> <639C0C4CF854594E920361562A5266BB30BCC323@SBXNG01.sw.ca> Message-ID: If you have multiple ITK's on the same system, it may be causing some confusion. Perhaps you are build/linking against one version and running against anoter. Check your PATH (not sure what is is called in VS) and make sure it points to the same dll/lib location that you build against. On Thu, Apr 30, 2015 at 11:36 AM, Khojaste, Amir wrote: > Hey guys, > > > > Could anyone please help me with this?! > > > > I am really confused! I can?t run a simple Image Reading code with ITK. I > have built ITK Examples and ran their code and it went fine! But I can?t run > my own code! > > > > Is my CMakelists.txt correct? I have built ITK3.20.2 in Debug mode with > VS2008 and added the CMake_Install_Prefix directory to my project. It seems > that all the correct ITK libraries and headers are there but I am guessing > maybe my CMakelists.txt is not correct. Any help?! > > > > Thanks, > > Amir > > > > From: Insight-users [mailto:insight-users-bounces at itk.org] On Behalf Of > Khojaste, Amir > Sent: April-29-15 12:36 PM > To: insight-users at itk.org > Subject: [ITK-users] ITK3.20.2 Crashes - Help! > > > > Hi guys, > > > > I am running the simplest piece of code using ITK3.20.2 libraries. In my > program I simply want to read an image and do some processing on it and then > save it. When I try to instantiate a pointer to my ImageFileReader the > program crashes with the following message: > > > > Unhandled exception at 0x000000013fbcf0b1 in HelloWorld.exe: 0xC0000005: > Access violation reading location 0x00000000bfdef6f5. > > > > It seems to be a memory leak error or something. I have used ITK3.20.2, > CMake 2.8.10.2 and Visual Studio 2008 to configure my project. Following > please find my code and my CMakelists.txt: > > > > /* Code > ===========================================================================================*/ > > #include "itkImage.h" > > #include > > #include "itkImageFileWriter.h" > > #include "itkImageFileReader.h" > > #include "itkCropImageFilter.h" > > #include "itksys/SystemTools.hxx" > > > > const unsigned int ImageDimensions = 3; > > > > typedef itk::Vector VectorType; > > typedef itk::Image ImageType; > > > > typedef itk::Image ImageType2D; > > typedef itk::ImageFileReader ReaderType; > > > > int main(int argc, char* argv[]) > > { > > > > ImageType::Pointer image = ImageType::New(); //--- This line seem to be > OK! > > > > ReaderType::Pointer reader = ReaderType::New(); //--This line will crash! > > > > system("pause"); > > > > return EXIT_SUCCESS; > > } > > > > /* CMakelists.txt > ===========================================================================================*/ > > # This is the root ITK CMakeLists file. > > cmake_minimum_required(VERSION 2.4) > > if(COMMAND CMAKE_POLICY) > > cmake_policy(SET CMP0003 NEW) > > endif() > > > > > > # This project is designed to be built outside the Insight source tree. > > project(HelloWorld) > > > > # Find ITK. > > find_package(ITK REQUIRED) > > include(${ITK_USE_FILE}) > > > > add_executable(HelloWorld HelloWorld.cxx ) > > > > target_link_libraries(HelloWorld ${ITK_LIBRARIES}) > > > > > > I have tried this using Visual Studio 2013, ITK 4.7 and CMake 3.1.3 and it > ran just fine! But here it doesn?t! > > > > Any Idea on what might be the cause of problem? I am confused ? > > > > > > Thanks, > > Amir > > > > This e-mail is intended only for the named recipient(s) and may contain > confidential, personal and/or health information (information which may be > subject to legal restrictions on use, retention and/or disclosure). No > waiver of confidence is intended by virtue of communication via the > internet. Any review or distribution by anyone other than the person(s) for > whom it was originally intended is strictly prohibited. If you have > received this e-mail in error, please contact the sender and destroy all > copies. > > > > This e-mail is intended only for the named recipient(s) and may contain > confidential, personal and/or health information (information which may be > subject to legal restrictions on use, retention and/or disclosure). No > waiver of confidence is intended by virtue of communication via the > internet. Any review or distribution by anyone other than the person(s) for > whom it was originally intended is strictly prohibited. If you have > received this e-mail in error, please contact the sender and destroy all > copies. > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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