From mavitha.karuppasamy at gmail.com Fri Apr 1 04:09:10 2016 From: mavitha.karuppasamy at gmail.com (Mavitha Sri) Date: Fri, 1 Apr 2016 13:39:10 +0530 Subject: [ITK-users] Regarding installation of ITK Message-ID: Hello Sir/Madam, Great day, I am going to use ITK toolkit for my project,So i have tried to install the ITK tool in my system,But it shows some error when generate the CMake ,The error was "Tried extension .c .cpp .cxx .h .html......".So Please kindly help me to clear this error. Information about the software version:- ITK version-3.20.1 CMake version-2.8.9 windows 64 bit Thanking you, Mavithasri.K I -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Fri Apr 1 14:14:33 2016 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Fri, 01 Apr 2016 14:14:33 -0400 Subject: [ITK-users] Building ITK 4.9.0 against HDF5 1.8.16 Message-ID: <56FEBA89.5000503@bluequartz.net> Has anyone tried to build ITK 4.9.0 against HDF5 1.8.16? Just tried and there are errors due to the HDF Group changing some of the target names (hdf5->hdf5-shared) in the 1.8.16 release. Thanks -- Michael A. Jackson BlueQuartz Software From scorpiuni at gmail.com Sat Apr 2 09:23:19 2016 From: scorpiuni at gmail.com (Robert) Date: Sat, 2 Apr 2016 06:23:19 -0700 (MST) Subject: [ITK-users] PCA with ITK in Python Message-ID: <1459603399462-36964.post@n7.nabble.com> Hi, I need to implement a PCA analysis with ITK in Python. After looking in the manuel, it seems easy enough. However, in Python, I can't find the function. It should be something like itk.ImagePCAShapeModelEstimator[ImageType, ImageType] Am I missing something here, or is the ITK lib in Python not complete (I'm using the normal itk, not the SimpleITK) It seems like it is not wrapped in Python at the moment, is there a way to do so, or has this been done by a community member here already who could help me out, or give me some hints/tricks/guidelines? The .wrap files are not too intuitive for me after a first look. Greetings, Robert -- View this message in context: http://itk-users.7.n7.nabble.com/PCA-with-ITK-in-Python-tp36964.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Sat Apr 2 11:58:41 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 2 Apr 2016 11:58:41 -0400 Subject: [ITK-users] Building ITK 4.9.0 against HDF5 1.8.16 In-Reply-To: <56FEBA89.5000503@bluequartz.net> References: <56FEBA89.5000503@bluequartz.net> Message-ID: Hi Mike, Thanks for taking a look at this issue and discussing it with the list! I was able to reproduce the build failure. A patch is in the works here: http://review.source.kitware.com/#/c/20967/ Thanks, Matt On Fri, Apr 1, 2016 at 2:14 PM, Michael Jackson wrote: > Has anyone tried to build ITK 4.9.0 against HDF5 1.8.16? Just tried and > there are errors due to the HDF Group changing some of the target names > (hdf5->hdf5-shared) in the 1.8.16 release. > > Thanks > -- > Michael A. Jackson > BlueQuartz Software > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Sat Apr 2 12:03:57 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 2 Apr 2016 12:03:57 -0400 Subject: [ITK-users] Regarding installation of ITK In-Reply-To: References: Message-ID: Hello, Welcome to ITK! Please follow the steps described here to get started: http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch2.html#x27-170002 Please also use the latest version of ITK (4.9.0) and CMake (3.5.1). Thanks, Matt On Fri, Apr 1, 2016 at 4:09 AM, Mavitha Sri wrote: > Hello Sir/Madam, > > Great day, > I am going to use ITK toolkit for my project,So i have tried to install > the ITK tool in my system,But it shows some error when generate the CMake > ,The error was "Tried extension .c .cpp .cxx .h .html......".So Please > kindly help me to clear this error. > > Information about the software version:- > ITK version-3.20.1 > CMake version-2.8.9 > windows 64 bit > > > Thanking you, > Mavithasri.K > I > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Sat Apr 2 12:04:28 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Sat, 2 Apr 2016 12:04:28 -0400 Subject: [ITK-users] Regarding installation of ITK In-Reply-To: References: Message-ID: Hi Mavitha, your error message is not detailed enough. When does it occur? Is it produced during CMake configuration step, or build step? You are using the old version of library (3.20.1). If you "will use" ITK in your project I suggest you start with the latest version (4.9). Regards, D?enan On Fri, Apr 1, 2016 at 4:09 AM, Mavitha Sri wrote: > Hello Sir/Madam, > > Great day, > I am going to use ITK toolkit for my project,So i have tried to install > the ITK tool in my system,But it shows some error when generate the CMake > ,The error was "Tried extension .c .cpp .cxx .h .html......".So Please > kindly help me to clear this error. > > Information about the software version:- > ITK version-3.20.1 > CMake version-2.8.9 > windows 64 bit > > > Thanking you, > Mavithasri.K > I > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Sat Apr 2 12:18:13 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 2 Apr 2016 12:18:13 -0400 Subject: [ITK-users] [ITK] Community versus Users Lists In-Reply-To: References: <5B958451-72D1-4039-A67C-77A8B9ADD558@kcl.ac.uk> <54FB17C1-10F7-404C-85CA-FD0F77F2E630@gmail.com> Message-ID: Here is a draft of the poll: https://docs.google.com/forms/d/19BL8Gbb3Z0qdekys2i6keHPZSdkSOgbRg84mWOhEu8U/viewform Are there any suggestions on the wording? Missing options? Thanks, Matt On Tue, Mar 29, 2016 at 12:16 PM, Matt McCormick wrote: > Doodle polls are usually for scheduling times only (as far as I am > aware). Perhaps a Google Form? > > M > > On Tue, Mar 29, 2016 at 11:10 AM, D?enan Zuki? wrote: > > Hi everyone, > > > > since ITK is now in a mature phase, there is not a lot of traffic on > > ITK-Developers. I suppose the best would be to completely transition to > just > > one list (community) which was created for that purpose. This would > simplify > > things. > > > > But having a poll sounds like a good idea. Did you mean something like a > > Doodle poll, or somehow restrict the poll to just the members of the 3 > > mailing lists? > > > > Regards, > > D?enan > > > > On Sat, Mar 26, 2016 at 11:22 PM, Matt McCormick > > wrote: > >> > >> Hi, > >> > >> The current situation is not optimal, and it is difficult to keep all > >> parties involved happy. > >> > >> - Some people do not want to be bothered to subscribe to more than one > >> list, be it community, insight-users, or insight-developers. > >> - Some people on insight-developers do not want to be auto-subscribed > >> to a different list that has a different amount of traffic. > >> - There are a number of non-mailman interfaces to the mailing lists > >> that may not adapt to changes (Nabble, GMane, etc.), and some people > >> use these interfaces exclusively. > >> > >> Any change will result in some unhappy campers, but some change may > >> still be necessary to improve the status quo. > >> > >> Perhaps we should create a poll distributed to all lists to select a > >> way forward? Other constructive ideas? > >> > >> Thanks, > >> Matt > >> > >> On Sat, Mar 26, 2016 at 10:01 PM, Andras Lasso > wrote: > >> > I completely agree. Either a single community list or pair of > >> > devel&users > >> > makes sense. > >> > > >> > > >> > > >> > My personal experience: I've signed up to the community list when it > was > >> > created and unsubscribed from users. However, it was quite annoying > that > >> > I > >> > received emails from users list but my responses were bounced. So, I > had > >> > to > >> > sign up again to the users list. I still don?t know where to send new > >> > posts: > >> > users or community. > >> > > >> > > >> > > >> > Andras > >> > > >> > > >> > > >> > From: Michka Popoff > >> > Sent: March 26, 2016 14:24 > >> > To: Matt McCormick > >> > Cc: community at itk.org > >> > Subject: Re: [ITK] Community versus Users Lists > >> > > >> > > >> > > >> > Hi > >> > > >> > one thought about this. If I remember well, (but I may be mistaken), > >> > the community at itk.org address was introduced to replace the two > others. > >> > > >> > Now, we have to follow 3 different mailing lists. The mail traffic is > >> > okay > >> > for me on > >> > these 3 lists, so having only one would be great. > >> > It would help people to know which one to use. > >> > > >> > Or we should go back to the old behaviour, with a user/developer list. > >> > But I think developers want also to know what they users are doing, > >> > so they are often registered on the two (/three) anyway. > >> > > >> > Michka > >> > > >> >> On 17 Mar 2016, at 16:42, Matt McCormick > > >> >> wrote: > >> >> > >> >> Hi Toby, > >> >> > >> >> To post to the insight-users or insight-developers list, your email > >> >> account currently needs to be subscribed there, too. > >> >> > >> >> Matt > >> >> > >> >> On Thu, Mar 17, 2016 at 5:47 AM, Wood, Tobias > > >> >> wrote: > >> >>> Hello, > >> >>> > >> >>> Apologies for a newbie question but this has been bugging me for a > >> >>> while. > >> >>> I am subscribed to the community at itk.org mailing list. As noted on > the > >> >>> sign-up page, this also receives all the mail from insight-users > (and > >> >>> insight-developers). When I try to reply to a message from one of > >> >>> these > >> >>> lists in my mail client, the reply-to address is set to > insight-users. > >> >>> If I > >> >>> send the message as is, I get a failure message telling me I am not > >> >>> subscribed to the mailing list (which is correct). > >> >>> > >> >>> > >> >>> How should I be responding to such e-mail threads? Will a reply to > >> >>> community at itk.org forward the message on to insight-users? Or > should I > >> >>> be > >> >>> subscribing to all 3 mailing lists (seems suboptimal as I assume I > >> >>> will get > >> >>> multiple copies of messages). > >> >>> > >> >>> Thanks, > >> >>> Toby > >> >>> _______________________________________________ > >> >>> Community mailing list > >> >>> Community at itk.org > >> >>> http://public.kitware.com/mailman/listinfo/community > >> >> _______________________________________________ > >> >> Community mailing list > >> >> Community at itk.org > >> >> http://public.kitware.com/mailman/listinfo/community > >> > > >> > _______________________________________________ > >> > Community mailing list > >> > Community at itk.org > >> > http://public.kitware.com/mailman/listinfo/community > >> _______________________________________________ > >> Community mailing list > >> Community at itk.org > >> http://public.kitware.com/mailman/listinfo/community > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Sat Apr 2 13:34:01 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Sat, 2 Apr 2016 13:34:01 -0400 Subject: [ITK-users] [ITK] Community versus Users Lists In-Reply-To: References: <5B958451-72D1-4039-A67C-77A8B9ADD558@kcl.ac.uk> <54FB17C1-10F7-404C-85CA-FD0F77F2E630@gmail.com> Message-ID: Third option from bottom has a semantic error in it: *"community" and "insight-developers" should be made read-only, and all members will need to manually subscribe to "community"* (should be *insight-users*). The rest looks good. Regards On Sat, Apr 2, 2016 at 12:18 PM, Matt McCormick wrote: > Here is a draft of the poll: > > > https://docs.google.com/forms/d/19BL8Gbb3Z0qdekys2i6keHPZSdkSOgbRg84mWOhEu8U/viewform > > Are there any suggestions on the wording? Missing options? > > Thanks, > Matt > > On Tue, Mar 29, 2016 at 12:16 PM, Matt McCormick < > matt.mccormick at kitware.com> wrote: > >> Doodle polls are usually for scheduling times only (as far as I am >> aware). Perhaps a Google Form? >> >> M >> >> On Tue, Mar 29, 2016 at 11:10 AM, D?enan Zuki? wrote: >> > Hi everyone, >> > >> > since ITK is now in a mature phase, there is not a lot of traffic on >> > ITK-Developers. I suppose the best would be to completely transition to >> just >> > one list (community) which was created for that purpose. This would >> simplify >> > things. >> > >> > But having a poll sounds like a good idea. Did you mean something like a >> > Doodle poll, or somehow restrict the poll to just the members of the 3 >> > mailing lists? >> > >> > Regards, >> > D?enan >> > >> > On Sat, Mar 26, 2016 at 11:22 PM, Matt McCormick >> > wrote: >> >> >> >> Hi, >> >> >> >> The current situation is not optimal, and it is difficult to keep all >> >> parties involved happy. >> >> >> >> - Some people do not want to be bothered to subscribe to more than one >> >> list, be it community, insight-users, or insight-developers. >> >> - Some people on insight-developers do not want to be auto-subscribed >> >> to a different list that has a different amount of traffic. >> >> - There are a number of non-mailman interfaces to the mailing lists >> >> that may not adapt to changes (Nabble, GMane, etc.), and some people >> >> use these interfaces exclusively. >> >> >> >> Any change will result in some unhappy campers, but some change may >> >> still be necessary to improve the status quo. >> >> >> >> Perhaps we should create a poll distributed to all lists to select a >> >> way forward? Other constructive ideas? >> >> >> >> Thanks, >> >> Matt >> >> >> >> On Sat, Mar 26, 2016 at 10:01 PM, Andras Lasso >> wrote: >> >> > I completely agree. Either a single community list or pair of >> >> > devel&users >> >> > makes sense. >> >> > >> >> > >> >> > >> >> > My personal experience: I've signed up to the community list when it >> was >> >> > created and unsubscribed from users. However, it was quite annoying >> that >> >> > I >> >> > received emails from users list but my responses were bounced. So, I >> had >> >> > to >> >> > sign up again to the users list. I still don?t know where to send new >> >> > posts: >> >> > users or community. >> >> > >> >> > >> >> > >> >> > Andras >> >> > >> >> > >> >> > >> >> > From: Michka Popoff >> >> > Sent: March 26, 2016 14:24 >> >> > To: Matt McCormick >> >> > Cc: community at itk.org >> >> > Subject: Re: [ITK] Community versus Users Lists >> >> > >> >> > >> >> > >> >> > Hi >> >> > >> >> > one thought about this. If I remember well, (but I may be mistaken), >> >> > the community at itk.org address was introduced to replace the two >> others. >> >> > >> >> > Now, we have to follow 3 different mailing lists. The mail traffic is >> >> > okay >> >> > for me on >> >> > these 3 lists, so having only one would be great. >> >> > It would help people to know which one to use. >> >> > >> >> > Or we should go back to the old behaviour, with a user/developer >> list. >> >> > But I think developers want also to know what they users are doing, >> >> > so they are often registered on the two (/three) anyway. >> >> > >> >> > Michka >> >> > >> >> >> On 17 Mar 2016, at 16:42, Matt McCormick < >> matt.mccormick at kitware.com> >> >> >> wrote: >> >> >> >> >> >> Hi Toby, >> >> >> >> >> >> To post to the insight-users or insight-developers list, your email >> >> >> account currently needs to be subscribed there, too. >> >> >> >> >> >> Matt >> >> >> >> >> >> On Thu, Mar 17, 2016 at 5:47 AM, Wood, Tobias < >> tobias.wood at kcl.ac.uk> >> >> >> wrote: >> >> >>> Hello, >> >> >>> >> >> >>> Apologies for a newbie question but this has been bugging me for a >> >> >>> while. >> >> >>> I am subscribed to the community at itk.org mailing list. As noted >> on the >> >> >>> sign-up page, this also receives all the mail from insight-users >> (and >> >> >>> insight-developers). When I try to reply to a message from one of >> >> >>> these >> >> >>> lists in my mail client, the reply-to address is set to >> insight-users. >> >> >>> If I >> >> >>> send the message as is, I get a failure message telling me I am not >> >> >>> subscribed to the mailing list (which is correct). >> >> >>> >> >> >>> >> >> >>> How should I be responding to such e-mail threads? Will a reply to >> >> >>> community at itk.org forward the message on to insight-users? Or >> should I >> >> >>> be >> >> >>> subscribing to all 3 mailing lists (seems suboptimal as I assume I >> >> >>> will get >> >> >>> multiple copies of messages). >> >> >>> >> >> >>> Thanks, >> >> >>> Toby >> >> >>> _______________________________________________ >> >> >>> Community mailing list >> >> >>> Community at itk.org >> >> >>> http://public.kitware.com/mailman/listinfo/community >> >> >> _______________________________________________ >> >> >> Community mailing list >> >> >> Community at itk.org >> >> >> http://public.kitware.com/mailman/listinfo/community >> >> > >> >> > _______________________________________________ >> >> > Community mailing list >> >> > Community at itk.org >> >> > http://public.kitware.com/mailman/listinfo/community >> >> _______________________________________________ >> >> Community mailing list >> >> Community at itk.org >> >> http://public.kitware.com/mailman/listinfo/community >> > >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sat Apr 2 14:00:41 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 2 Apr 2016 11:00:41 -0700 Subject: [ITK-users] [ITK] Community versus Users Lists In-Reply-To: References: <5B958451-72D1-4039-A67C-77A8B9ADD558@kcl.ac.uk> <54FB17C1-10F7-404C-85CA-FD0F77F2E630@gmail.com> Message-ID: I guess I never really liked adding the community list. Seems like a user list and developer list covers everyone. VTK has one of each as does Slicer. On Sat, Apr 2, 2016 at 10:46 AM, Andras Lasso wrote: > Instead of asking people to decide between final solutions (which is > difficult for them and also doesn?t reveal actual preferences), please ask > what people need. If preferences are known then you can choose the best > fitting solution. For example good questions would be: > > > > 1. I?m interested in discussions about how to use ITK: > > a. Yes > > b. Not that much, but I don?t mind getting emails about it > > c. No, and I don?t want to see any emails about it > > 2. I?m interested in discussions about ITK internals and how it is > being developed: > > a. Yes > > b. Not that much, but I don?t mind getting emails about it > > c. No, and I don?t want to see any emails about it > > 3. If the ITK mailing list that I subscribed to changes in scope, > then: > > a. Subscribe me to the new list > > b. Just remove me from the mailing list; I?ll subscribe manually to > the new list if I?m interested > > > > Andras > > > > From: Matt McCormick [mailto:matt.mccormick at kitware.com] > Sent: April 2, 2016 12:18 PM > To: D?enan Zuki? > Cc: Andras Lasso ; community at itk.org; > insight-users at itk.org; ITK > > > Subject: Re: [ITK] Community versus Users Lists > > > > Here is a draft of the poll: > > > https://docs.google.com/forms/d/19BL8Gbb3Z0qdekys2i6keHPZSdkSOgbRg84mWOhEu8U/viewform > > Are there any suggestions on the wording? Missing options? > > Thanks, > > Matt > > > > On Tue, Mar 29, 2016 at 12:16 PM, Matt McCormick > wrote: > > Doodle polls are usually for scheduling times only (as far as I am > aware). Perhaps a Google Form? > > M > > > On Tue, Mar 29, 2016 at 11:10 AM, D?enan Zuki? wrote: >> Hi everyone, >> >> since ITK is now in a mature phase, there is not a lot of traffic on >> ITK-Developers. I suppose the best would be to completely transition to >> just >> one list (community) which was created for that purpose. This would >> simplify >> things. >> >> But having a poll sounds like a good idea. Did you mean something like a >> Doodle poll, or somehow restrict the poll to just the members of the 3 >> mailing lists? >> >> Regards, >> D?enan >> >> On Sat, Mar 26, 2016 at 11:22 PM, Matt McCormick >> wrote: >>> >>> Hi, >>> >>> The current situation is not optimal, and it is difficult to keep all >>> parties involved happy. >>> >>> - Some people do not want to be bothered to subscribe to more than one >>> list, be it community, insight-users, or insight-developers. >>> - Some people on insight-developers do not want to be auto-subscribed >>> to a different list that has a different amount of traffic. >>> - There are a number of non-mailman interfaces to the mailing lists >>> that may not adapt to changes (Nabble, GMane, etc.), and some people >>> use these interfaces exclusively. >>> >>> Any change will result in some unhappy campers, but some change may >>> still be necessary to improve the status quo. >>> >>> Perhaps we should create a poll distributed to all lists to select a >>> way forward? Other constructive ideas? >>> >>> Thanks, >>> Matt >>> >>> On Sat, Mar 26, 2016 at 10:01 PM, Andras Lasso wrote: >>> > I completely agree. Either a single community list or pair of >>> > devel&users >>> > makes sense. >>> > >>> > >>> > >>> > My personal experience: I've signed up to the community list when it >>> > was >>> > created and unsubscribed from users. However, it was quite annoying >>> > that >>> > I >>> > received emails from users list but my responses were bounced. So, I >>> > had >>> > to >>> > sign up again to the users list. I still don?t know where to send new >>> > posts: >>> > users or community. >>> > >>> > >>> > >>> > Andras >>> > >>> > >>> > >>> > From: Michka Popoff >>> > Sent: March 26, 2016 14:24 >>> > To: Matt McCormick >>> > Cc: community at itk.org >>> > Subject: Re: [ITK] Community versus Users Lists >>> > >>> > >>> > >>> > Hi >>> > >>> > one thought about this. If I remember well, (but I may be mistaken), >>> > the community at itk.org address was introduced to replace the two others. >>> > >>> > Now, we have to follow 3 different mailing lists. The mail traffic is >>> > okay >>> > for me on >>> > these 3 lists, so having only one would be great. >>> > It would help people to know which one to use. >>> > >>> > Or we should go back to the old behaviour, with a user/developer list. >>> > But I think developers want also to know what they users are doing, >>> > so they are often registered on the two (/three) anyway. >>> > >>> > Michka >>> > >>> >> On 17 Mar 2016, at 16:42, Matt McCormick >>> >> wrote: >>> >> >>> >> Hi Toby, >>> >> >>> >> To post to the insight-users or insight-developers list, your email >>> >> account currently needs to be subscribed there, too. >>> >> >>> >> Matt >>> >> >>> >> On Thu, Mar 17, 2016 at 5:47 AM, Wood, Tobias >>> >> wrote: >>> >>> Hello, >>> >>> >>> >>> Apologies for a newbie question but this has been bugging me for a >>> >>> while. >>> >>> I am subscribed to the community at itk.org mailing list. As noted on >>> >>> the >>> >>> sign-up page, this also receives all the mail from insight-users (and >>> >>> insight-developers). When I try to reply to a message from one of >>> >>> these >>> >>> lists in my mail client, the reply-to address is set to >>> >>> insight-users. >>> >>> If I >>> >>> send the message as is, I get a failure message telling me I am not >>> >>> subscribed to the mailing list (which is correct). >>> >>> >>> >>> >>> >>> How should I be responding to such e-mail threads? Will a reply to >>> >>> community at itk.org forward the message on to insight-users? Or should >>> >>> I >>> >>> be >>> >>> subscribing to all 3 mailing lists (seems suboptimal as I assume I >>> >>> will get >>> >>> multiple copies of messages). >>> >>> >>> >>> Thanks, >>> >>> Toby >>> >>> _______________________________________________ >>> >>> Community mailing list >>> >>> Community at itk.org >>> >>> http://public.kitware.com/mailman/listinfo/community >>> >> _______________________________________________ >>> >> Community mailing list >>> >> Community at itk.org >>> >> http://public.kitware.com/mailman/listinfo/community >>> > >>> > _______________________________________________ >>> > Community mailing list >>> > Community at itk.org >>> > http://public.kitware.com/mailman/listinfo/community >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >> >> > > > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > -- Unpaid intern in BillsBasement at noware dot com From lasso at queensu.ca Sat Apr 2 13:46:23 2016 From: lasso at queensu.ca (Andras Lasso) Date: Sat, 2 Apr 2016 17:46:23 +0000 Subject: [ITK-users] [ITK] Community versus Users Lists In-Reply-To: References: <5B958451-72D1-4039-A67C-77A8B9ADD558@kcl.ac.uk> <54FB17C1-10F7-404C-85CA-FD0F77F2E630@gmail.com> Message-ID: Instead of asking people to decide between final solutions (which is difficult for them and also doesn?t reveal actual preferences), please ask what people need. If preferences are known then you can choose the best fitting solution. For example good questions would be: 1. I?m interested in discussions about how to use ITK: a. Yes b. Not that much, but I don?t mind getting emails about it c. No, and I don?t want to see any emails about it 2. I?m interested in discussions about ITK internals and how it is being developed: a. Yes b. Not that much, but I don?t mind getting emails about it c. No, and I don?t want to see any emails about it 3. If the ITK mailing list that I subscribed to changes in scope, then: a. Subscribe me to the new list b. Just remove me from the mailing list; I?ll subscribe manually to the new list if I?m interested Andras From: Matt McCormick [mailto:matt.mccormick at kitware.com] Sent: April 2, 2016 12:18 PM To: D?enan Zuki? Cc: Andras Lasso ; community at itk.org; insight-users at itk.org; ITK Subject: Re: [ITK] Community versus Users Lists Here is a draft of the poll: https://docs.google.com/forms/d/19BL8Gbb3Z0qdekys2i6keHPZSdkSOgbRg84mWOhEu8U/viewform Are there any suggestions on the wording? Missing options? Thanks, Matt On Tue, Mar 29, 2016 at 12:16 PM, Matt McCormick > wrote: Doodle polls are usually for scheduling times only (as far as I am aware). Perhaps a Google Form? M On Tue, Mar 29, 2016 at 11:10 AM, D?enan Zuki? > wrote: > Hi everyone, > > since ITK is now in a mature phase, there is not a lot of traffic on > ITK-Developers. I suppose the best would be to completely transition to just > one list (community) which was created for that purpose. This would simplify > things. > > But having a poll sounds like a good idea. Did you mean something like a > Doodle poll, or somehow restrict the poll to just the members of the 3 > mailing lists? > > Regards, > D?enan > > On Sat, Mar 26, 2016 at 11:22 PM, Matt McCormick > > wrote: >> >> Hi, >> >> The current situation is not optimal, and it is difficult to keep all >> parties involved happy. >> >> - Some people do not want to be bothered to subscribe to more than one >> list, be it community, insight-users, or insight-developers. >> - Some people on insight-developers do not want to be auto-subscribed >> to a different list that has a different amount of traffic. >> - There are a number of non-mailman interfaces to the mailing lists >> that may not adapt to changes (Nabble, GMane, etc.), and some people >> use these interfaces exclusively. >> >> Any change will result in some unhappy campers, but some change may >> still be necessary to improve the status quo. >> >> Perhaps we should create a poll distributed to all lists to select a >> way forward? Other constructive ideas? >> >> Thanks, >> Matt >> >> On Sat, Mar 26, 2016 at 10:01 PM, Andras Lasso > wrote: >> > I completely agree. Either a single community list or pair of >> > devel&users >> > makes sense. >> > >> > >> > >> > My personal experience: I've signed up to the community list when it was >> > created and unsubscribed from users. However, it was quite annoying that >> > I >> > received emails from users list but my responses were bounced. So, I had >> > to >> > sign up again to the users list. I still don?t know where to send new >> > posts: >> > users or community. >> > >> > >> > >> > Andras >> > >> > >> > >> > From: Michka Popoff >> > Sent: March 26, 2016 14:24 >> > To: Matt McCormick >> > Cc: community at itk.org >> > Subject: Re: [ITK] Community versus Users Lists >> > >> > >> > >> > Hi >> > >> > one thought about this. If I remember well, (but I may be mistaken), >> > the community at itk.org address was introduced to replace the two others. >> > >> > Now, we have to follow 3 different mailing lists. The mail traffic is >> > okay >> > for me on >> > these 3 lists, so having only one would be great. >> > It would help people to know which one to use. >> > >> > Or we should go back to the old behaviour, with a user/developer list. >> > But I think developers want also to know what they users are doing, >> > so they are often registered on the two (/three) anyway. >> > >> > Michka >> > >> >> On 17 Mar 2016, at 16:42, Matt McCormick > >> >> wrote: >> >> >> >> Hi Toby, >> >> >> >> To post to the insight-users or insight-developers list, your email >> >> account currently needs to be subscribed there, too. >> >> >> >> Matt >> >> >> >> On Thu, Mar 17, 2016 at 5:47 AM, Wood, Tobias > >> >> wrote: >> >>> Hello, >> >>> >> >>> Apologies for a newbie question but this has been bugging me for a >> >>> while. >> >>> I am subscribed to the community at itk.org mailing list. As noted on the >> >>> sign-up page, this also receives all the mail from insight-users (and >> >>> insight-developers). When I try to reply to a message from one of >> >>> these >> >>> lists in my mail client, the reply-to address is set to insight-users. >> >>> If I >> >>> send the message as is, I get a failure message telling me I am not >> >>> subscribed to the mailing list (which is correct). >> >>> >> >>> >> >>> How should I be responding to such e-mail threads? Will a reply to >> >>> community at itk.org forward the message on to insight-users? Or should I >> >>> be >> >>> subscribing to all 3 mailing lists (seems suboptimal as I assume I >> >>> will get >> >>> multiple copies of messages). >> >>> >> >>> Thanks, >> >>> Toby >> >>> _______________________________________________ >> >>> Community mailing list >> >>> Community at itk.org >> >>> http://public.kitware.com/mailman/listinfo/community >> >> _______________________________________________ >> >> Community mailing list >> >> Community at itk.org >> >> http://public.kitware.com/mailman/listinfo/community >> > >> > _______________________________________________ >> > Community mailing list >> > Community at itk.org >> > http://public.kitware.com/mailman/listinfo/community >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Sat Apr 2 21:27:09 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 2 Apr 2016 21:27:09 -0400 Subject: [ITK-users] [ITK] Community versus Users Lists In-Reply-To: References: <5B958451-72D1-4039-A67C-77A8B9ADD558@kcl.ac.uk> <54FB17C1-10F7-404C-85CA-FD0F77F2E630@gmail.com> Message-ID: Since ITK is a programming library that is used to build an application (it is not an application,) everyone that uses ITK is a developer. Since every developer's contribution is treated with respect based on its merit, it is not desirable to separate people based into two buckets based on personal connections. Messages sent to insight-users are often related to ITK's internals and how it is being developed. Recent threads on insight-users include - How to fix builds against a third party library [1] - How to add Python wrapping to a class inside ITK [2] - How to fix a MinGW build error [3] Understanding how ITK works, fixing bugs, and improving functionality are often required when using ITK to address a problem. It is also annoying to have three (or two) mailing lists to subscribe to. I think improved preference-based questions that recognize ITK's identity as a community developed open source library are: 1. If the ITK mailing list that I subscribed to changes in scope, then: a. Subscribe me to the new list b. Just remove me from the mailing list; I?ll subscribe manually to the new list if I?m interested 2. The number of mailing lists I prefer is: a. 1 b. 2 c. 3 3. If there are two mailing lists, I prefer a. community and insight-users b. community and insight-developers c. insight-users and insight-developers 4. If there is one mailing list, I prefer a. community b. insight-users c. insight-developers 2 cents, Matt [1] http://public.kitware.com/pipermail/insight-users/2016-April/053317.html [2] http://public.kitware.com/pipermail/insight-users/2016-April/053318.html [3] http://public.kitware.com/pipermail/insight-users/2016-March/053190.html [4] http://public.kitware.com/pipermail/insight-developers/2016-February/024782.html On Sat, Apr 2, 2016 at 2:00 PM, Bill Lorensen wrote: > I guess I never really liked adding the community list. Seems like a > user list and developer list covers everyone. VTK has one of each as > does Slicer. > > On Sat, Apr 2, 2016 at 10:46 AM, Andras Lasso wrote: >> Instead of asking people to decide between final solutions (which is >> difficult for them and also doesn?t reveal actual preferences), please ask >> what people need. If preferences are known then you can choose the best >> fitting solution. For example good questions would be: >> >> >> >> 1. I?m interested in discussions about how to use ITK: >> >> a. Yes >> >> b. Not that much, but I don?t mind getting emails about it >> >> c. No, and I don?t want to see any emails about it >> >> 2. I?m interested in discussions about ITK internals and how it is >> being developed: >> >> a. Yes >> >> b. Not that much, but I don?t mind getting emails about it >> >> c. No, and I don?t want to see any emails about it >> >> 3. If the ITK mailing list that I subscribed to changes in scope, >> then: >> >> a. Subscribe me to the new list >> >> b. Just remove me from the mailing list; I?ll subscribe manually to >> the new list if I?m interested >> >> >> >> Andras >> >> >> >> From: Matt McCormick [mailto:matt.mccormick at kitware.com] >> Sent: April 2, 2016 12:18 PM >> To: D?enan Zuki? >> Cc: Andras Lasso ; community at itk.org; >> insight-users at itk.org; ITK >> >> >> Subject: Re: [ITK] Community versus Users Lists >> >> >> >> Here is a draft of the poll: >> >> >> https://docs.google.com/forms/d/19BL8Gbb3Z0qdekys2i6keHPZSdkSOgbRg84mWOhEu8U/viewform >> >> Are there any suggestions on the wording? Missing options? >> >> Thanks, >> >> Matt >> >> >> >> On Tue, Mar 29, 2016 at 12:16 PM, Matt McCormick >> wrote: >> >> Doodle polls are usually for scheduling times only (as far as I am >> aware). Perhaps a Google Form? >> >> M >> >> >> On Tue, Mar 29, 2016 at 11:10 AM, D?enan Zuki? wrote: >>> Hi everyone, >>> >>> since ITK is now in a mature phase, there is not a lot of traffic on >>> ITK-Developers. I suppose the best would be to completely transition to >>> just >>> one list (community) which was created for that purpose. This would >>> simplify >>> things. >>> >>> But having a poll sounds like a good idea. Did you mean something like a >>> Doodle poll, or somehow restrict the poll to just the members of the 3 >>> mailing lists? >>> >>> Regards, >>> D?enan >>> >>> On Sat, Mar 26, 2016 at 11:22 PM, Matt McCormick >>> wrote: >>>> >>>> Hi, >>>> >>>> The current situation is not optimal, and it is difficult to keep all >>>> parties involved happy. >>>> >>>> - Some people do not want to be bothered to subscribe to more than one >>>> list, be it community, insight-users, or insight-developers. >>>> - Some people on insight-developers do not want to be auto-subscribed >>>> to a different list that has a different amount of traffic. >>>> - There are a number of non-mailman interfaces to the mailing lists >>>> that may not adapt to changes (Nabble, GMane, etc.), and some people >>>> use these interfaces exclusively. >>>> >>>> Any change will result in some unhappy campers, but some change may >>>> still be necessary to improve the status quo. >>>> >>>> Perhaps we should create a poll distributed to all lists to select a >>>> way forward? Other constructive ideas? >>>> >>>> Thanks, >>>> Matt >>>> >>>> On Sat, Mar 26, 2016 at 10:01 PM, Andras Lasso wrote: >>>> > I completely agree. Either a single community list or pair of >>>> > devel&users >>>> > makes sense. >>>> > >>>> > >>>> > >>>> > My personal experience: I've signed up to the community list when it >>>> > was >>>> > created and unsubscribed from users. However, it was quite annoying >>>> > that >>>> > I >>>> > received emails from users list but my responses were bounced. So, I >>>> > had >>>> > to >>>> > sign up again to the users list. I still don?t know where to send new >>>> > posts: >>>> > users or community. >>>> > >>>> > >>>> > >>>> > Andras >>>> > >>>> > >>>> > >>>> > From: Michka Popoff >>>> > Sent: March 26, 2016 14:24 >>>> > To: Matt McCormick >>>> > Cc: community at itk.org >>>> > Subject: Re: [ITK] Community versus Users Lists >>>> > >>>> > >>>> > >>>> > Hi >>>> > >>>> > one thought about this. If I remember well, (but I may be mistaken), >>>> > the community at itk.org address was introduced to replace the two others. >>>> > >>>> > Now, we have to follow 3 different mailing lists. The mail traffic is >>>> > okay >>>> > for me on >>>> > these 3 lists, so having only one would be great. >>>> > It would help people to know which one to use. >>>> > >>>> > Or we should go back to the old behaviour, with a user/developer list. >>>> > But I think developers want also to know what they users are doing, >>>> > so they are often registered on the two (/three) anyway. >>>> > >>>> > Michka >>>> > >>>> >> On 17 Mar 2016, at 16:42, Matt McCormick >>>> >> wrote: >>>> >> >>>> >> Hi Toby, >>>> >> >>>> >> To post to the insight-users or insight-developers list, your email >>>> >> account currently needs to be subscribed there, too. >>>> >> >>>> >> Matt >>>> >> >>>> >> On Thu, Mar 17, 2016 at 5:47 AM, Wood, Tobias >>>> >> wrote: >>>> >>> Hello, >>>> >>> >>>> >>> Apologies for a newbie question but this has been bugging me for a >>>> >>> while. >>>> >>> I am subscribed to the community at itk.org mailing list. As noted on >>>> >>> the >>>> >>> sign-up page, this also receives all the mail from insight-users (and >>>> >>> insight-developers). When I try to reply to a message from one of >>>> >>> these >>>> >>> lists in my mail client, the reply-to address is set to >>>> >>> insight-users. >>>> >>> If I >>>> >>> send the message as is, I get a failure message telling me I am not >>>> >>> subscribed to the mailing list (which is correct). >>>> >>> >>>> >>> >>>> >>> How should I be responding to such e-mail threads? Will a reply to >>>> >>> community at itk.org forward the message on to insight-users? Or should >>>> >>> I >>>> >>> be >>>> >>> subscribing to all 3 mailing lists (seems suboptimal as I assume I >>>> >>> will get >>>> >>> multiple copies of messages). >>>> >>> >>>> >>> Thanks, >>>> >>> Toby >>>> >>> _______________________________________________ >>>> >>> Community mailing list >>>> >>> Community at itk.org >>>> >>> http://public.kitware.com/mailman/listinfo/community >>>> >> _______________________________________________ >>>> >> Community mailing list >>>> >> Community at itk.org >>>> >> http://public.kitware.com/mailman/listinfo/community >>>> > >>>> > _______________________________________________ >>>> > Community mailing list >>>> > Community at itk.org >>>> > http://public.kitware.com/mailman/listinfo/community >>>> _______________________________________________ >>>> Community mailing list >>>> Community at itk.org >>>> http://public.kitware.com/mailman/listinfo/community >>> >>> >> >> >> >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> > > > > -- > Unpaid intern in BillsBasement at noware dot com From mrguilfoyle at gmail.com Sun Apr 3 11:18:53 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Sun, 3 Apr 2016 16:18:53 +0100 Subject: [ITK-users] SimpleITK and R wrapping problems (bugs?) Message-ID: Hi I?ve been trying to get to grips with using the R wrapping to SimpleITK. On OS X 10.11 I?ve successfully built/compiled SimpleITK from source with Python and R wrapping turned on in Cmake. I can import the SimpleITK package into R 3.2.4 within Studio without any error reports. The main difficulties I?m finding are around importing CT image volumes which are stored as a series of image slices within a single directory. Following the usual workflow I?ve tried in Python I start with: reader = ImageSeriesReader() this works ok but the ?GetGDCMSeriesFileNames? function is not exposed for the reader object via the $ operator. This is in contrast to the Python wrapping where this function is available as 'reader.GetGDCMSeriesFilenames()' In R the ImageSeriesReader_GetGDCMSeriesFileNames() static function is available but does not work when supplied with a directory either as a R character vector or as a SimpleITK ?VectorString? object. For the moment I have resorted to getting a list of the files with native R code. Passing this list as an argument to reader$SetFileNames() causes the R session to crash. Instead I?ve created a (SimpleITK) VectorString of appropriate length and then transfer the individual filenames from the R list within a loop, before finally using the reader$SetFileNames(VectorString) method. When I then run reader$Execute the DICOM image series is correctly read to an image object. Next I need to do some initial image transformation based on certain fields of DICOM metadata. However, I?ve not been able to access this at all. The image$GetMetaDataKeys() function does not work, reporting the error: Error in validObject(.Object) : invalid class ?_p_std__vectorT_std__string_std__allocatorT_std__string_t_t? object: invalid object for slot "ref" in class "_p_std__vectorT_std__string_std__allocatorT_std__string_t_t": got class "character", should be or extend class "externalptr" Image$GetMetaData(key) also returns an error whatever key value I use (including DICOM keys that I know are included in the series), whether these are passed as as an R character string or SimpleITK VectorString. I know that the metadata is being read, at least to a certain extent, because basic info like pixel spacing, image direction, origin etc are all present and correct, and accessible via their dedicated Get.. methods. If I?m using these functions with incorrect arguments or committing some other error I would be grateful for any pointers. Cheers Mat -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.beare at gmail.com Sun Apr 3 17:25:30 2016 From: richard.beare at gmail.com (Richard Beare) Date: Mon, 4 Apr 2016 07:25:30 +1000 Subject: [ITK-users] SimpleITK and R wrapping problems (bugs?) In-Reply-To: References: Message-ID: Hi, I haven't experimented with these methods. The usual cause of this type of problem with the R binding is a type that swig/R doesn't deal with, and occasionally a conflict with operator overloading. Here I'm guessing that I haven't yet included vectors of strings in the swig type maps. I'll try to check this out in the next day or two. On Mon, Apr 4, 2016 at 1:18 AM, Mathew Guilfoyle wrote: > Hi > > I?ve been trying to get to grips with using the R wrapping to SimpleITK. > On OS X 10.11 I?ve successfully built/compiled SimpleITK from source with > Python and R wrapping turned on in Cmake. I can import the SimpleITK > package into R 3.2.4 within Studio without any error reports. > > The main difficulties I?m finding are around importing CT image volumes > which are stored as a series of image slices within a single directory. > Following the usual workflow I?ve tried in Python I start with: > > reader = ImageSeriesReader() > > this works ok but the ?GetGDCMSeriesFileNames? function is not exposed for > the reader object via the $ operator. This is in contrast to the Python > wrapping where this function is available as > 'reader.GetGDCMSeriesFilenames()' > > In R the ImageSeriesReader_GetGDCMSeriesFileNames() static function is > available but does not work when supplied with a directory either as a R > character vector or as a SimpleITK ?VectorString? object. > > For the moment I have resorted to getting a list of the files with native > R code. Passing this list as an argument to reader$SetFileNames() causes > the R session to crash. Instead I?ve created a (SimpleITK) VectorString of > appropriate length and then transfer the individual filenames from the R > list within a loop, before finally using the > reader$SetFileNames(VectorString) method. When I then run reader$Execute > the DICOM image series is correctly read to an image object. > > Next I need to do some initial image transformation based on certain > fields of DICOM metadata. However, I?ve not been able to access this at > all. The image$GetMetaDataKeys() function does not work, reporting the > error: > > *Error in validObject(.Object) : * > * invalid class > ?_p_std__vectorT_std__string_std__allocatorT_std__string_t_t? object: > invalid object for slot "ref" in class > "_p_std__vectorT_std__string_std__allocatorT_std__string_t_t": got class > "character", should be or extend class "externalptr"* > > Image$GetMetaData(key) also returns an error whatever key value I use > (including DICOM keys that I know are included in the series), whether > these are passed as as an R character string or SimpleITK VectorString. > > I know that the metadata is being read, at least to a certain extent, > because basic info like pixel spacing, image direction, origin etc are all > present and correct, and accessible via their dedicated Get.. methods. > > If I?m using these functions with incorrect arguments or committing some > other error I would be grateful for any pointers. > > Cheers > Mat > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 richard.beare at gmail.com Sun Apr 3 21:30:09 2016 From: richard.beare at gmail.com (Richard Beare) Date: Mon, 4 Apr 2016 11:30:09 +1000 Subject: [ITK-users] SimpleITK and R wrapping problems (bugs?) In-Reply-To: References: Message-ID: OK, it turns out there are a couple of issues. The first one is that static member functions aren't being included in the list of functions accessible via '$' operator. Not sure if yet whether this is an option we can turn on via swig configuration. The second error is caused by incomplete support for character vectors. The C layer is turning the c++ vectors into R vectors, but I forgot to include the typemap that stops the R part of the swig binding thinking that it is still a c++ vector pointer. You can include a temporary fix at the R level be rewriting the function as follows: ImageSeriesReader_GetGDCMSeriesFileNames__SWIG_0 <- function (directory, useSeriesDetails, recursive, loadSequences, loadPrivateTags, .copy = FALSE) { directory = as(directory, "character") useSeriesDetails = as.logical(useSeriesDetails) recursive = as.logical(recursive) loadSequences = as.logical(loadSequences) loadPrivateTags = as.logical(loadPrivateTags) ans = .Call("R_swig_ImageSeriesReader_GetGDCMSeriesFileNames__SWIG_0", directory, useSeriesDetails, recursive, loadSequences, loadPrivateTags, as.logical(.copy), PACKAGE = "SimpleITK") # comment out the following two lines #ans <- new("_p_std__vectorT_std__string_std__allocatorT_std__string_t_t", # ref = ans) ans } and repeat for the other __SWIG_? functions that use a .Call I'm not yet certain whether the fix needs to happen in the simpleITK side or in swig. On Mon, Apr 4, 2016 at 1:18 AM, Mathew Guilfoyle wrote: > Hi > > I?ve been trying to get to grips with using the R wrapping to SimpleITK. > On OS X 10.11 I?ve successfully built/compiled SimpleITK from source with > Python and R wrapping turned on in Cmake. I can import the SimpleITK > package into R 3.2.4 within Studio without any error reports. > > The main difficulties I?m finding are around importing CT image volumes > which are stored as a series of image slices within a single directory. > Following the usual workflow I?ve tried in Python I start with: > > reader = ImageSeriesReader() > > this works ok but the ?GetGDCMSeriesFileNames? function is not exposed for > the reader object via the $ operator. This is in contrast to the Python > wrapping where this function is available as > 'reader.GetGDCMSeriesFilenames()' > > In R the ImageSeriesReader_GetGDCMSeriesFileNames() static function is > available but does not work when supplied with a directory either as a R > character vector or as a SimpleITK ?VectorString? object. > > For the moment I have resorted to getting a list of the files with native > R code. Passing this list as an argument to reader$SetFileNames() causes > the R session to crash. Instead I?ve created a (SimpleITK) VectorString of > appropriate length and then transfer the individual filenames from the R > list within a loop, before finally using the > reader$SetFileNames(VectorString) method. When I then run reader$Execute > the DICOM image series is correctly read to an image object. > > Next I need to do some initial image transformation based on certain > fields of DICOM metadata. However, I?ve not been able to access this at > all. The image$GetMetaDataKeys() function does not work, reporting the > error: > > *Error in validObject(.Object) : * > * invalid class > ?_p_std__vectorT_std__string_std__allocatorT_std__string_t_t? object: > invalid object for slot "ref" in class > "_p_std__vectorT_std__string_std__allocatorT_std__string_t_t": got class > "character", should be or extend class "externalptr"* > > Image$GetMetaData(key) also returns an error whatever key value I use > (including DICOM keys that I know are included in the series), whether > these are passed as as an R character string or SimpleITK VectorString. > > I know that the metadata is being read, at least to a certain extent, > because basic info like pixel spacing, image direction, origin etc are all > present and correct, and accessible via their dedicated Get.. methods. > > If I?m using these functions with incorrect arguments or committing some > other error I would be grateful for any pointers. > > Cheers > Mat > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 scorpiuni at gmail.com Mon Apr 4 09:42:40 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 4 Apr 2016 06:42:40 -0700 (MST) Subject: [ITK-users] PCA with ITK in Python In-Reply-To: <1459603399462-36964.post@n7.nabble.com> References: <1459603399462-36964.post@n7.nabble.com> Message-ID: <1459777360908-7588694.post@n2.nabble.com> Matt helped me a lot already with the following commit and message: Robert wrote > Hi Robert, > > Please review this patch [1], which adds wrapping for > ImagePCAShapeModelEstimator. > > A wrapping guide can be found in the ITK Software Guide [2] and patch > contribution instruction on the Wiki [3]. > > Thanks, > Matt > > [1] http://review.source.kitware.com/#/c/20968 > > [2] > http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch9.html#x50-1500009.5 > > [3] http://www.itk.org/Wiki/ITK/Git/Develop However, I still need itk::PCAShapeSignedDistanceFunction and maybe itk::ImagePCADecompositionCalculator as well. I can't simply copy the same .wrap files as the ones Matt provided me. I'll try to figure something out, help is also welcome. I wanted to thank Matt for his reply. It works fine for me. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-PCA-with-ITK-in-Python-tp7588682p7588694.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From mike.jackson at bluequartz.net Mon Apr 4 10:40:58 2016 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Mon, 04 Apr 2016 10:40:58 -0400 Subject: [ITK-users] Building ITK 4.9.0 against HDF5 1.8.16 In-Reply-To: References: <56FEBA89.5000503@bluequartz.net> Message-ID: <57027CFA.8020103@bluequartz.net> Cool. What is the roadmap/timeline for the next minor release of ITK? We are trying to build up a new SDK for our project (DREAM3D) and this may be a blocker for us. I think we were able to finagle ITK 4.9.0 to build against HDF5 1.8.16 somehow, I will have to check my notes from last week. -- Mike Jackson [mike.jackson at bluequartz.net] > Matt McCormick > April 2, 2016 at 11:58 AM > Hi Mike, > > Thanks for taking a look at this issue and discussing it with the list! > > I was able to reproduce the build failure. A patch is in the works here: > > http://review.source.kitware.com/#/c/20967/ > > Thanks, > Matt > > > Michael Jackson > April 1, 2016 at 2:14 PM > Has anyone tried to build ITK 4.9.0 against HDF5 1.8.16? Just tried > and there are errors due to the HDF Group changing some of the target > names (hdf5->hdf5-shared) in the 1.8.16 release. > > Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From scorpiuni at gmail.com Mon Apr 4 11:26:11 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 4 Apr 2016 08:26:11 -0700 (MST) Subject: [ITK-users] PCA with ITK in Python In-Reply-To: <1459777360908-7588694.post@n2.nabble.com> References: <1459603399462-36964.post@n7.nabble.com> <1459777360908-7588694.post@n2.nabble.com> Message-ID: <1459783571325-7588696.post@n2.nabble.com> What is wrong with this approach? As .wrap file, I wrote: Robert wrote > itk_wrap_class("itk::PCAShapeSignedDistanceFunction" POINTER) > foreach(d ${ITK_WRAP_IMAGE_DIMS}) > foreach(i ${ITK_WRAP_double}) > foreach(t2 ${WRAP_ITK_REAL}) > itk_wrap_template("${ITKM_D${t2}}${ITKM_UI${d}}${ITKM_I${i}${d}}" > "${ITKT_D${t2}}, ${ITKT_UI${d}}, ${ITKT_I${i}${d}}") > endforeach() > endforeach() > endforeach() > itk_end_wrap_class() It does not work, what is wrong here'? -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-PCA-with-ITK-in-Python-tp7588682p7588696.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Mon Apr 4 12:00:38 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 4 Apr 2016 12:00:38 -0400 Subject: [ITK-users] PCA with ITK in Python In-Reply-To: <1459783571325-7588696.post@n2.nabble.com> References: <1459603399462-36964.post@n7.nabble.com> <1459777360908-7588694.post@n2.nabble.com> <1459783571325-7588696.post@n2.nabble.com> Message-ID: Hi Robert, Great to hear it is working for you! You are very close with the wrapping for PCAShapSignedDistanceFunction. To review the template args: http://www.itk.org/Doxygen/html/classitk_1_1PCAShapeSignedDistanceFunction.html template> class itk::PCAShapeSignedDistanceFunction< TCoordRep, VSpaceDimension, TImage > I think it is sufficient for now to always use "double" for TCoordRep. This is the type to represent positions in space. It has to be a floating point number, and the increased precision of "double" is often useful. In the wrapping variables, the variable for the double mangling is ${ITKM_D} (which expands to "D"), and the template parameters is ${ITKT_D} (which expands to "double"). VSpaceDimension should be the dimension. This is just a number that can be used directly as its mangled value and as its template parameter. The image type should be a real-valued pixel type -- base it off of WRAP_ITK_REAL. How about itk_wrap_class("itk::PCAShapeSignedDistanceFunction" POINTER) foreach(d ${ITK_WRAP_IMAGE_DIMS}) foreach(t ${WRAP_ITK_REAL}) itk_wrap_template("${ITKM_D}${d}${ITKM_I${t}${d}}" > "${ITKT_D}, ${d}, ${ITKT_I${t}${d}}") endforeach() endforeach() itk_end_wrap_class() ? HTH, Matt On Mon, Apr 4, 2016 at 11:26 AM, Robert wrote: > What is wrong with this approach? > As .wrap file, I wrote: > > > > > Robert wrote >> itk_wrap_class("itk::PCAShapeSignedDistanceFunction" POINTER) >> foreach(d ${ITK_WRAP_IMAGE_DIMS}) >> foreach(i ${ITK_WRAP_double}) >> foreach(t2 ${WRAP_ITK_REAL}) >> itk_wrap_template("${ITKM_D${t2}}${ITKM_UI${d}}${ITKM_I${i}${d}}" >> "${ITKT_D${t2}}, ${ITKT_UI${d}}, ${ITKT_I${i}${d}}") >> endforeach() >> endforeach() >> endforeach() >> itk_end_wrap_class() > > > It does not work, what is wrong here'? > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-PCA-with-ITK-in-Python-tp7588682p7588696.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Mon Apr 4 12:02:04 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 4 Apr 2016 12:02:04 -0400 Subject: [ITK-users] Building ITK 4.9.0 against HDF5 1.8.16 In-Reply-To: <57027CFA.8020103@bluequartz.net> References: <56FEBA89.5000503@bluequartz.net> <57027CFA.8020103@bluequartz.net> Message-ID: OK, good to know. The patch releases are done on an as-needed basis. We could do 4.9.1 next week. On Mon, Apr 4, 2016 at 10:40 AM, Michael Jackson wrote: > Cool. What is the roadmap/timeline for the next minor release of ITK? We are > trying to build up a new SDK for our project (DREAM3D) and this may be a > blocker for us. I think we were able to finagle ITK 4.9.0 to build against > HDF5 1.8.16 somehow, I will have to check my notes from last week. > > > -- > Mike Jackson [mike.jackson at bluequartz.net] > > Matt McCormick > April 2, 2016 at 11:58 AM > Hi Mike, > > Thanks for taking a look at this issue and discussing it with the list! > > I was able to reproduce the build failure. A patch is in the works here: > > http://review.source.kitware.com/#/c/20967/ > > Thanks, > Matt > > > Michael Jackson > April 1, 2016 at 2:14 PM > Has anyone tried to build ITK 4.9.0 against HDF5 1.8.16? Just tried and > there are errors due to the HDF Group changing some of the target names > (hdf5->hdf5-shared) in the 1.8.16 release. > > Thanks > > From mrguilfoyle at gmail.com Tue Apr 5 13:20:00 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Tue, 5 Apr 2016 18:20:00 +0100 Subject: [ITK-users] SimpleITK and R wrapping problems (bugs?) In-Reply-To: References: Message-ID: <594398B8-0056-44E3-B862-661F8872ECB5@gmail.com> Thanks Richard I?ve built the SWIG branch and used it to recompile SimpleITK with R wrapping - so far working like a charm! Character vectors as arguments and returns now seems to be working fine; I can access the DICOM image metadata as expected. The ImageSeriesReader_GetGDCMSeriesFileNames() also now works. I guess it would be nice to have the static methods available via the $ operator just for consistency with e.g. Python wrapping but it is not a big deal. Many thanks for the help > On 5 Apr 2016, at 04:30, Richard Beare wrote: > > I have a better fix for this now, but it requires building your own swig. I've made a pull request but it will probably take a while to work its way through to the release. > > If you get swig from: > > https://github.com/richardbeare/swig.git > > and use the RCharacterVectorSupport branch then you will end up with a working version (hopefully). > > The issue with static methods seems to vary with language - some bindings allow an instance of a class to access a static method, others don't. > > > > On Mon, Apr 4, 2016 at 1:18 AM, Mathew Guilfoyle > wrote: > Hi > > I?ve been trying to get to grips with using the R wrapping to SimpleITK. On OS X 10.11 I?ve successfully built/compiled SimpleITK from source with Python and R wrapping turned on in Cmake. I can import the SimpleITK package into R 3.2.4 within Studio without any error reports. > > The main difficulties I?m finding are around importing CT image volumes which are stored as a series of image slices within a single directory. Following the usual workflow I?ve tried in Python I start with: > > reader = ImageSeriesReader() > > this works ok but the ?GetGDCMSeriesFileNames? function is not exposed for the reader object via the $ operator. This is in contrast to the Python wrapping where this function is available as 'reader.GetGDCMSeriesFilenames()' > > In R the ImageSeriesReader_GetGDCMSeriesFileNames() static function is available but does not work when supplied with a directory either as a R character vector or as a SimpleITK ?VectorString? object. > > For the moment I have resorted to getting a list of the files with native R code. Passing this list as an argument to reader$SetFileNames() causes the R session to crash. Instead I?ve created a (SimpleITK) VectorString of appropriate length and then transfer the individual filenames from the R list within a loop, before finally using the reader$SetFileNames(VectorString) method. When I then run reader$Execute the DICOM image series is correctly read to an image object. > > Next I need to do some initial image transformation based on certain fields of DICOM metadata. However, I?ve not been able to access this at all. The image$GetMetaDataKeys() function does not work, reporting the error: > > Error in validObject(.Object) : > invalid class ?_p_std__vectorT_std__string_std__allocatorT_std__string_t_t? object: invalid object for slot "ref" in class "_p_std__vectorT_std__string_std__allocatorT_std__string_t_t": got class "character", should be or extend class "externalptr" > > Image$GetMetaData(key) also returns an error whatever key value I use (including DICOM keys that I know are included in the series), whether these are passed as as an R character string or SimpleITK VectorString. > > I know that the metadata is being read, at least to a certain extent, because basic info like pixel spacing, image direction, origin etc are all present and correct, and accessible via their dedicated Get.. methods. > > If I?m using these functions with incorrect arguments or committing some other error I would be grateful for any pointers. > > Cheers > Mat > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 2389127171 at qq.com Tue Apr 5 20:37:44 2016 From: 2389127171 at qq.com (=?ISO-8859-1?B?QXBhbnRhcg==?=) Date: Wed, 6 Apr 2016 08:37:44 +0800 Subject: [ITK-users] the error in the example of ImageSeriesReadWrite Message-ID: Hi I want use the example:"ImageSeriesReadWrite.cxx" to to read a series of 2D slices from independent files in order to compose a volume. But when I input " 001 003 vwe.png" in the cmd window, there is always is a problem. That is, C:\Users\EVEN DUAN>H:\EVENF\I_VTK\TEXT\ImageSeriesReadWrite\bin\Debug\ImageSeriesReadWrite.exe 001 002 vwe.png ExceptionObject caught ! itk::ExceptionObject (000000000014F530) Location: "void __cdecl itk::ImageFileWriter >::Write(void)" File: h:\evenf\i_vtk\itk\itk2010\include\itk-4.7\itkImageFileWriter.hxx Line: 290 Description: itk::ERROR: ImageFileWriter(0000000002CA44A0): Largest possible region does not fully contain requested paste IO regionPaste IO region: ImageIORegion (000000000014EDA0) Dimension: 3 Index: 0 0 0 Size: 0 0 2 Largest possible region: ImageRegion (000000000014EC68) Dimension: 3 Index: [0, 0, 0] Size: [0, 0, 2] so what's wrang? -------------- next part -------------- An HTML attachment was scrubbed... URL: From scorpiuni at gmail.com Wed Apr 6 09:57:17 2016 From: scorpiuni at gmail.com (Robert) Date: Wed, 6 Apr 2016 06:57:17 -0700 (MST) Subject: [ITK-users] PCA with ITK in Python In-Reply-To: References: <1459603399462-36964.post@n7.nabble.com> <1459777360908-7588694.post@n2.nabble.com> <1459783571325-7588696.post@n2.nabble.com> Message-ID: Hi Matt, I can now call all needed functions so far in Python, I wrote 2 or 3 more wrappers. Next step will be implementing them as soon as my dataset is ready. I will have a look into putting my .wrap up on GitHub for other users that may need PCA functions as well. Thanks for your help so far, Best Regards, Robert On Mon, Apr 4, 2016 at 6:01 PM, Matt McCormick-2 [via ITK Insight Users] < ml-node+s2283740n7588697h79 at n2.nabble.com> wrote: > Hi Robert, > > Great to hear it is working for you! > > > You are very close with the wrapping for PCAShapSignedDistanceFunction. > > To review the template args: > > > http://www.itk.org/Doxygen/html/classitk_1_1PCAShapeSignedDistanceFunction.html > > template TImage = Image< double, VSpaceDimension >> > class itk::PCAShapeSignedDistanceFunction< TCoordRep, > VSpaceDimension, TImage > > > I think it is sufficient for now to always use "double" for TCoordRep. > This is the type to represent positions in space. It has to be a > floating point number, and the increased precision of "double" is > often useful. In the wrapping variables, the variable for the double > mangling is ${ITKM_D} (which expands to "D"), and the template > parameters is ${ITKT_D} (which expands to "double"). > > VSpaceDimension should be the dimension. This is just a number that > can be used directly as its mangled value and as its template > parameter. > > The image type should be a real-valued pixel type -- base it off of > WRAP_ITK_REAL. How about > > itk_wrap_class("itk::PCAShapeSignedDistanceFunction" POINTER) > foreach(d ${ITK_WRAP_IMAGE_DIMS}) > foreach(t ${WRAP_ITK_REAL}) > itk_wrap_template("${ITKM_D}${d}${ITKM_I${t}${d}}" > > "${ITKT_D}, ${d}, ${ITKT_I${t}${d}}") > endforeach() > endforeach() > itk_end_wrap_class() > > ? > > HTH, > Matt > > On Mon, Apr 4, 2016 at 11:26 AM, Robert <[hidden email] > > wrote: > > > What is wrong with this approach? > > As .wrap file, I wrote: > > > > > > > > > > Robert wrote > >> itk_wrap_class("itk::PCAShapeSignedDistanceFunction" POINTER) > >> foreach(d ${ITK_WRAP_IMAGE_DIMS}) > >> foreach(i ${ITK_WRAP_double}) > >> foreach(t2 ${WRAP_ITK_REAL}) > >> itk_wrap_template("${ITKM_D${t2}}${ITKM_UI${d}}${ITKM_I${i}${d}}" > >> "${ITKT_D${t2}}, ${ITKT_UI${d}}, ${ITKT_I${i}${d}}") > >> endforeach() > >> endforeach() > >> endforeach() > >> itk_end_wrap_class() > > > > > > It does not work, what is wrong here'? > > > > > > > > > > -- > > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-PCA-with-ITK-in-Python-tp7588682p7588696.html > > Sent from the ITK Insight Users mailing list archive at Nabble.com. > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://itk-insight-users.2283740.n2.nabble.com/ITK-users-PCA-with-ITK-in-Python-tp7588682p7588697.html > To unsubscribe from [ITK-users] PCA with ITK in Python, click here > > . > NAML > > -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-PCA-with-ITK-in-Python-tp7588682p7588701.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Wed Apr 6 10:01:20 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 6 Apr 2016 10:01:20 -0400 Subject: [ITK-users] PCA with ITK in Python In-Reply-To: References: <1459603399462-36964.post@n7.nabble.com> <1459777360908-7588694.post@n2.nabble.com> <1459783571325-7588696.post@n2.nabble.com> Message-ID: Hi Robert, That is excellent! Could you please push them to Gerrit? They can then be integrated into ITK so others can benefit from them and so it is easier for you to build from and maintain the changes in the future. Instructions can be found here: http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch10.html#x51-15500010 http://www.itk.org/Wiki/ITK/Git/Develop https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/index.html Thanks, Matt On Wed, Apr 6, 2016 at 9:57 AM, Robert wrote: > Hi Matt, > > I can now call all needed functions so far in Python, I wrote 2 or 3 more > wrappers. Next step will be implementing them as soon as my dataset is > ready. > I will have a look into putting my .wrap up on GitHub for other users that > may need PCA functions as well. > > Thanks for your help so far, > > Best Regards, > > Robert > > > On Mon, Apr 4, 2016 at 6:01 PM, Matt McCormick-2 [via ITK Insight Users] < > ml-node+s2283740n7588697h79 at n2.nabble.com> wrote: > >> Hi Robert, >> >> Great to hear it is working for you! >> >> >> You are very close with the wrapping for PCAShapSignedDistanceFunction. >> >> To review the template args: >> >> >> http://www.itk.org/Doxygen/html/classitk_1_1PCAShapeSignedDistanceFunction.html >> >> template> TImage = Image< double, VSpaceDimension >> >> class itk::PCAShapeSignedDistanceFunction< TCoordRep, >> VSpaceDimension, TImage > >> >> I think it is sufficient for now to always use "double" for TCoordRep. >> This is the type to represent positions in space. It has to be a >> floating point number, and the increased precision of "double" is >> often useful. In the wrapping variables, the variable for the double >> mangling is ${ITKM_D} (which expands to "D"), and the template >> parameters is ${ITKT_D} (which expands to "double"). >> >> VSpaceDimension should be the dimension. This is just a number that >> can be used directly as its mangled value and as its template >> parameter. >> >> The image type should be a real-valued pixel type -- base it off of >> WRAP_ITK_REAL. How about >> >> itk_wrap_class("itk::PCAShapeSignedDistanceFunction" POINTER) >> foreach(d ${ITK_WRAP_IMAGE_DIMS}) >> foreach(t ${WRAP_ITK_REAL}) >> itk_wrap_template("${ITKM_D}${d}${ITKM_I${t}${d}}" >> > "${ITKT_D}, ${d}, ${ITKT_I${t}${d}}") >> endforeach() >> endforeach() >> itk_end_wrap_class() >> >> ? >> >> HTH, >> Matt >> >> On Mon, Apr 4, 2016 at 11:26 AM, Robert <[hidden email] >> > wrote: >> >> > What is wrong with this approach? >> > As .wrap file, I wrote: >> > >> > >> > >> > >> > Robert wrote >> >> itk_wrap_class("itk::PCAShapeSignedDistanceFunction" POINTER) >> >> foreach(d ${ITK_WRAP_IMAGE_DIMS}) >> >> foreach(i ${ITK_WRAP_double}) >> >> foreach(t2 ${WRAP_ITK_REAL}) >> >> itk_wrap_template("${ITKM_D${t2}}${ITKM_UI${d}}${ITKM_I${i}${d}}" >> >> "${ITKT_D${t2}}, ${ITKT_UI${d}}, ${ITKT_I${i}${d}}") >> >> endforeach() >> >> endforeach() >> >> endforeach() >> >> itk_end_wrap_class() >> > >> > >> > It does not work, what is wrong here'? >> > >> > >> > >> > >> > -- >> > View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-PCA-with-ITK-in-Python-tp7588682p7588696.html >> > Sent from the ITK Insight Users mailing list archive at Nabble.com. >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussion >> below: >> >> http://itk-insight-users.2283740.n2.nabble.com/ITK-users-PCA-with-ITK-in-Python-tp7588682p7588697.html >> To unsubscribe from [ITK-users] PCA with ITK in Python, click here >> >> . >> NAML >> >> > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-PCA-with-ITK-in-Python-tp7588682p7588701.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Thu Apr 7 11:22:36 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 7 Apr 2016 11:22:36 -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/u/1/events/c836joo7igljlmkfdih28i7u28g On Friday, 11:00 AM Eastern USA time, an ITK development conference, https://plus.google.com/u/1/events/cs945gtfkhqnvaoq7t3h47vfdl4 For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423 To get regular invites to these events, join the ITK Bar Camp G+ Community: https://plus.google.com/u/0/communities/111375098792764998322 All are welcome. Hope to talk to you then! From matt.mccormick at kitware.com Thu Apr 7 13:00:14 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 7 Apr 2016 13:00:14 -0400 Subject: [ITK-users] ITK Mailing Lists Poll Message-ID: Hi folks, Please participate in this poll to inform improved use of our mailing lists: https://docs.google.com/forms/d/19BL8Gbb3Z0qdekys2i6keHPZSdkSOgbRg84mWOhEu8U/viewform Thanks, Matt From sean at rogue-research.com Thu Apr 7 16:28:38 2016 From: sean at rogue-research.com (Sean McBride) Date: Thu, 7 Apr 2016 16:28:38 -0400 Subject: [ITK-users] ITK Mailing Lists Poll In-Reply-To: References: Message-ID: <20160407202838.206647319@mail.rogue-research.com> On Thu, 7 Apr 2016 13:00:14 -0400, Matt McCormick said: >Please participate in this poll to inform improved use of our mailing lists: > > https://docs.google.com/forms/d/19B >L8Gbb3Z0qdekys2i6keHPZSdkSOgbRg84mWOhEu8U/viewform It seems to require a google account? :( Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From matt.mccormick at kitware.com Thu Apr 7 16:34:14 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 7 Apr 2016 16:34:14 -0400 Subject: [ITK-users] ITK Mailing Lists Poll In-Reply-To: <20160407202838.206647319@mail.rogue-research.com> References: <20160407202838.206647319@mail.rogue-research.com> Message-ID: On Thu, Apr 7, 2016 at 4:28 PM, Sean McBride wrote: > On Thu, 7 Apr 2016 13:00:14 -0400, Matt McCormick said: > >>Please participate in this poll to inform improved use of our mailing lists: >> >> https://docs.google.com/forms/d/19B >>L8Gbb3Z0qdekys2i6keHPZSdkSOgbRg84mWOhEu8U/viewform > > It seems to require a google account? :( Requirement lifted :-) From bakkari.abdelkhalek at hotmail.fr Thu Apr 7 16:34:38 2016 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Thu, 7 Apr 2016 21:34:38 +0100 Subject: [ITK-users] Interaction of keyboard Message-ID: Hi ! I would like to interact the button of my keyboard in order to modify the position of a 3D object (translation) using up or down or left or right buttons. I created the following piece of code but it does not give results :------------------------------------------------------------------------------------------------------------class KeyPressInteractorStyle : public vtkInteractorStyleTrackballCamera { public: static KeyPressInteractorStyle* New(); vtkTypeMacro(KeyPressInteractorStyle, vtkInteractorStyleTrackballCamera); virtual void OnKeyPress() { double handpos[3]={8.0,2.0, 0.0}; // Get the keypress vtkRenderWindowInteractor *rwi = this->Interactor; // vtkRenderer *rend=new(vtkRenderer); std::string key = rwi->GetKeySym(); // Output the key that was pressed std::cout << "Pressed " << key << std::endl; // Handle an arrow key if(key == "Up") { std::cout << "The up arrow was pressed." << std::endl; // act->SetPosition(handpos[0]+1, handpos[1], handpos[2]); myTrans->Translate(handpos[0]+1, handpos[1], handpos[2]); handpos[0]++; act->SetPosition(handpos[0], handpos[1], handpos[2]); renderer->Render(); renderWindow->Render(); } // Handle a "normal" key if(key == "Down") { std::cout << "The a key was pressed." << std::endl; handpos[0]++; act->SetPosition(handpos[0], handpos[1], handpos[2]); renderer->Render(); renderWindow->Render(); } // Handle a "normal" key if(key == "Right") { std::cout << "The Right key was pressed." << std::endl; handpos[2]++; act->SetPosition(handpos[0], handpos[1], handpos[2]); renderer->Render(); renderWindow->Render(); } if(key== "Left") { std::cout << "The left key was pressed." << std::endl; handpos[2]++; act->SetPosition(handpos[0], handpos[1], handpos[2]); renderer->Render(); renderWindow->Render(); } // Forward events vtkInteractorStyleTrackballCamera::OnKeyPress(); } }; ------------------------------------------------------------------------------------------------------------------ Best regards, Abdelkhalek BakkariPh.D candidate in Computer ScienceInstitute of Applied Computer ScienceLodz University of Technology, Poland -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhlegarreta at vicomtech.org Thu Apr 7 17:18:08 2016 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Thu, 7 Apr 2016 23:18:08 +0200 Subject: [ITK-users] [ITK] Interaction of keyboard In-Reply-To: References: Message-ID: Hi Abdelkhalek, ITK does not involve any Graphical User Interface, and thus, user interaction does not fit in ITK's framework. The issue (and the code) you describe are related to VTK. I am sure that you will be able to find useful examples concerning this on VTK's wiki [1]. HTH, JON HAITZ [1] http://www.vtk.org/Wiki/VTK/Examples On 7 April 2016 at 22:34, Abdelkhalek Bakkari < bakkari.abdelkhalek at hotmail.fr> wrote: > Hi ! > > I would like to interact the button of my keyboard in order to modify the > position of a 3D object (translation) using up or down or left or right > buttons. > > I created the following piece of code but it does not give results : > > ------------------------------------------------------------------------------------------------------------ > class KeyPressInteractorStyle : public vtkInteractorStyleTrackballCamera { > public: static KeyPressInteractorStyle* New(); > vtkTypeMacro(KeyPressInteractorStyle, vtkInteractorStyleTrackballCamera); > virtual void OnKeyPress() { double handpos[3]={8.0,2.0, 0.0}; // Get the > keypress vtkRenderWindowInteractor *rwi = this->Interactor; // vtkRenderer > *rend=new(vtkRenderer); std::string key = rwi->GetKeySym(); // Output the > key that was pressed std::cout << "Pressed " << key << std::endl; // Handle > an arrow key if(key == "Up") { std::cout << "The up arrow was pressed." << > std::endl; // act->SetPosition(handpos[0]+1, handpos[1], handpos[2]); > myTrans->Translate(handpos[0]+1, handpos[1], handpos[2]); handpos[0]++; > act->SetPosition(handpos[0], handpos[1], handpos[2]); renderer->Render(); > renderWindow->Render(); } // Handle a "normal" key if(key == "Down") { > std::cout << "The a key was pressed." << std::endl; handpos[0]++; > act->SetPosition(handpos[0], handpos[1], handpos[2]); renderer->Render(); > renderWindow->Render(); } // Handle a "normal" key if(key == "Right") { > std::cout << "The Right key was pressed." << std::endl; handpos[2]++; > act->SetPosition(handpos[0], handpos[1], handpos[2]); renderer->Render(); > renderWindow->Render(); } if(key== "Left") { std::cout << "The left key was > pressed." << std::endl; handpos[2]++; act->SetPosition(handpos[0], > handpos[1], handpos[2]); renderer->Render(); renderWindow->Render(); } // > Forward events vtkInteractorStyleTrackballCamera::OnKeyPress(); } }; > > > ------------------------------------------------------------------------------------------------------------------ > > Best regards, > > > Abdelkhalek Bakkari > Ph.D candidate in Computer Science > Institute of Applied Computer Science > Lodz University of Technology, Poland > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Thu Apr 7 18:50:46 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 7 Apr 2016 18:50:46 -0400 Subject: [ITK-users] the error in the example of ImageSeriesReadWrite In-Reply-To: References: Message-ID: Hi Apantar, the error indicates that the file has 0 size (0*0*2=0). It is strange that you are getting that error message. Have you tried building ImageSeriesReadWrite in debug mode and then stepping through it? I guess there is something wrong with the images (perhaps one is corrupted) or even the file names are not generated properly. Regards, D?enan On Tue, Apr 5, 2016 at 8:37 PM, Apantar <2389127171 at qq.com> wrote: > Hi > I want use the example:"ImageSeriesReadWrite.cxx" to to read a series > of 2D slices from independent > files in order to compose a volume. But when I input " 001 003 vwe.png" in > the cmd window, there is always is a problem. > That is, > C:\Users\EVEN > DUAN>H:\EVENF\I_VTK\TEXT\ImageSeriesReadWrite\bin\Debug\ImageSeriesReadWrite.exe > 001 002 vwe.png > ExceptionObject caught ! > > itk::ExceptionObject (000000000014F530) > Location: "void __cdecl itk::ImageFileWriter char,3> >::Write(void)" > File: h:\evenf\i_vtk\itk\itk2010\include\itk-4.7\itkImageFileWriter.hxx > Line: 290 > Description: itk::ERROR: ImageFileWriter(0000000002CA44A0): Largest > possible region does not fully contain requested paste IO regionPaste IO > region: ImageIORegion (000000000014EDA0) > Dimension: 3 > Index: 0 0 0 > Size: 0 0 2 > Largest possible region: ImageRegion (000000000014EC68) > Dimension: 3 > Index: [0, 0, 0] > Size: [0, 0, 2] > so what's wrang? > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 zhuangming.shen at sphic.org.cn Thu Apr 7 21:42:35 2016 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Fri, 8 Apr 2016 01:42:35 +0000 Subject: [ITK-users] Inside value and outside value for itk::OtsuThresholdImageFilter Message-ID: <1460079753464.84571@sphic.org.cn> Hi all, It seems to be a bug for itk.OtsuThresholdImageFilter. When I use SetInsideValue(0) and SetOutsideValue(255), I got the result displayed in Fig. 2, where inside voxel value is 255 and outside voxel value is 0. Inversely, when I use SetInsideValue(255) and SetOutsideValue(0), I got the result displayed in Fig. 3, where the inside voxel value is 0 and the outside voxel value is 255. It seems totally inversely. Is that right? Have someone else met this situation before? Thanks in advance. Regards, Zhuangming Shen =============== My code ================= import itk reader = itk.ImageFileReader[itk.Image.SS3].New() reader.SetFileName("ct.nrrd") reader.Update() otsu_filter = itk.OtsuThresholdImageFilter?[itk.Image.SS3, itk.Image.UC3].New() otsu_filter.SetInput(reader.GetOutput()) otsu_filter.SetInsideValue(0) otsu_filter.SetOutsideValue(255) otsu_filter.Update() writer = itk.ImageFileWriter[itk.Image.UC3].New() writer.SetInput(otsu_filter.GetOutput()) writer.SetFileName("otsu.nrrd") writer.Update() Fig. 1 ct.nrrd [cid:15b5cb2e-24ee-4092-99ff-d5bfd99c9d58] Fig. 2 otsu segmentation result for SetInsideValue(0) and SetOutsideValue(255) [cid:1c274aac-d532-4e55-8d5e-0a5847dea5af] Fig. 3 otsu segmentation result for SetInsideValue(255) and SetOutsideValue(0) [cid:917c3ca4-8e81-4d99-af7c-fc6af0639a43] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 152425 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 21677 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 20783 bytes Desc: pastedImage.png URL: From tevain at telecom-paristech.fr Fri Apr 8 03:30:03 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Fri, 8 Apr 2016 09:30:03 +0200 (CEST) Subject: [ITK-users] [ITK] Inside value and outside value for itk::OtsuThresholdImageFilter In-Reply-To: <1460079753464.84571@sphic.org.cn> References: <1460079753464.84571@sphic.org.cn> Message-ID: <1006865981.31957980.1460100603011.JavaMail.zimbra@enst.fr> Hi, That's definitely not a bug, but how this was designed. OtsuThresholdImageFilter uses the BinaryThresholdImageFilter to do the thresholding, and this filter allows to get only a part of the value range using 2 threshold values (lower/upper). That's why you have the inside/outside notion : what is the output value of pixels inside/outside these 2 thresholds. In the case of OtsuThreshold, the filter computes 1 optimal value and feeds it to the BinaryThresholder as the "Upper Threshold", and set the lower one as the minimum of your ValueType. This will results in the "inside value" being the output value for the range that is lower than the calculated optimal threshold. In your case, let say your have uchar range ([0,255]), and the calculated otsu threshold is for example 50. If you set the inside value to 255 and the outside one to 0, you will have the darkest part as 255 because your threshold range is [0 (min of your value type) ,50], and the brightest as 0, which is your Fig3. HTH, Tim ----- Mail original ----- De: "???" ?: insight-users at itk.org Envoy?: Vendredi 8 Avril 2016 03:42:35 Objet: [ITK] [ITK-users] Inside value and outside value for itk::OtsuThresholdImageFilter Hi all, It seems to be a bug for itk.OtsuThresholdImageFilter. When I use SetInsideValue(0) and SetOutsideValue(255), I got the result displayed in Fig. 2, where inside voxel value is 255 and outside voxel value is 0. Inversely, when I use SetInsideValue(255) and SetOutsideValue(0), I got the result displayed in Fig. 3, where the inside voxel value is 0 and the outside voxel value is 255. It seems totally inversely. Is that right? Have someone else met this situation before? Thanks in advance. Regards, Zhuangming Shen =============== My code ================= import itk reader = itk.ImageFileReader[itk.Image.SS3].New() reader.SetFileName("ct.nrrd") reader.Update() otsu_filter = itk.OtsuThresholdImageFilter?[itk.Image.SS3, itk.Image.UC3].New() otsu_filter.SetInput(reader.GetOutput()) otsu_filter.SetInsideValue(0) otsu_filter.SetOutsideValue(255) otsu_filter.Update() writer = itk.ImageFileWriter[itk.Image.UC3].New() writer.SetInput(otsu_filter.GetOutput()) writer.SetFileName("otsu.nrrd") writer.Update() Fig. 1 ct.nrrd Fig. 2 otsu segmentation result for SetInsideValue(0) and SetOutsideValue(255) Fig. 3 otsu segmentation result for SetInsideValue(255) and SetOutsideValue(0) _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From zhuangming.shen at sphic.org.cn Fri Apr 8 04:06:02 2016 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Fri, 8 Apr 2016 08:06:02 +0000 Subject: [ITK-users] [ITK] Inside value and outside value for itk::OtsuThresholdImageFilter In-Reply-To: <1006865981.31957980.1460100603011.JavaMail.zimbra@enst.fr> References: <1460079753464.84571@sphic.org.cn>, <1006865981.31957980.1460100603011.JavaMail.zimbra@enst.fr> Message-ID: <1460102759488.4952@sphic.org.cn> Hi Tim, Thank you for your prompt response. I got it. Regards, Zhuangming Shen ________________________________________ From: Timothee Evain Sent: Friday, April 8, 2016 3:30 PM To: ??? Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Inside value and outside value for itk::OtsuThresholdImageFilter Hi, That's definitely not a bug, but how this was designed. OtsuThresholdImageFilter uses the BinaryThresholdImageFilter to do the thresholding, and this filter allows to get only a part of the value range using 2 threshold values (lower/upper). That's why you have the inside/outside notion : what is the output value of pixels inside/outside these 2 thresholds. In the case of OtsuThreshold, the filter computes 1 optimal value and feeds it to the BinaryThresholder as the "Upper Threshold", and set the lower one as the minimum of your ValueType. This will results in the "inside value" being the output value for the range that is lower than the calculated optimal threshold. In your case, let say your have uchar range ([0,255]), and the calculated otsu threshold is for example 50. If you set the inside value to 255 and the outside one to 0, you will have the darkest part as 255 because your threshold range is [0 (min of your value type) ,50], and the brightest as 0, which is your Fig3. HTH, Tim ----- Mail original ----- De: "???" ?: insight-users at itk.org Envoy?: Vendredi 8 Avril 2016 03:42:35 Objet: [ITK] [ITK-users] Inside value and outside value for itk::OtsuThresholdImageFilter Hi all, It seems to be a bug for itk.OtsuThresholdImageFilter. When I use SetInsideValue(0) and SetOutsideValue(255), I got the result displayed in Fig. 2, where inside voxel value is 255 and outside voxel value is 0. Inversely, when I use SetInsideValue(255) and SetOutsideValue(0), I got the result displayed in Fig. 3, where the inside voxel value is 0 and the outside voxel value is 255. It seems totally inversely. Is that right? Have someone else met this situation before? Thanks in advance. Regards, Zhuangming Shen =============== My code ================= import itk reader = itk.ImageFileReader[itk.Image.SS3].New() reader.SetFileName("ct.nrrd") reader.Update() otsu_filter = itk.OtsuThresholdImageFilter?[itk.Image.SS3, itk.Image.UC3].New() otsu_filter.SetInput(reader.GetOutput()) otsu_filter.SetInsideValue(0) otsu_filter.SetOutsideValue(255) otsu_filter.Update() writer = itk.ImageFileWriter[itk.Image.UC3].New() writer.SetInput(otsu_filter.GetOutput()) writer.SetFileName("otsu.nrrd") writer.Update() Fig. 1 ct.nrrd Fig. 2 otsu segmentation result for SetInsideValue(0) and SetOutsideValue(255) Fig. 3 otsu segmentation result for SetInsideValue(255) and SetOutsideValue(0) _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From mrguilfoyle at gmail.com Sat Apr 9 21:10:30 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Sun, 10 Apr 2016 02:10:30 +0100 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug Message-ID: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> There seems to be a problem with using the $AddCommand function to ImageRegistrationMethod objects in the R wrapping to SimpleITK. Using R 3.2.4 on OS X 10.11 Example: f <- function(x){print(x$GetMetricValue())} registration = ImageRegistrationMethod() registration$AddCommand(?sitkIterationEvent?, f(registration)) This last line causes R to abort/hard crash (no error message). This behaviour is irrespective of which event type I use or the function passed as the second argument (e.g. even something simple like print(?Hello?)) The AddCommand method is inherited from the SimpleITK ProcessObject type. Digging around in the SimpleITK.R file I can see that the ProcessObject$AddCommand method expects a second argument of type ?_p_itk__simple__Command?. There is a ?Command? method that generates a new object of type ?_p_itk__simple__Command?. If I pass this resulting object as the second argument to registration$AddCommand then I do not get an error. However, there doesn?t seem to be any way to point the ?_p_itk__simple__Command? object to my function or otherwise convert my function to a ?_p_itk__simple__Command? type. The $AddCommand method is used in a couple of example scripts on the SimpleITK site (using it for monitoring a registration and a filter e.g. https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) so I don?t know if it was working previously and a bug has been introduced more recently? (the example scripts cause the same error when I run them now) From richard.beare at gmail.com Sat Apr 9 23:38:26 2016 From: richard.beare at gmail.com (Richard Beare) Date: Sun, 10 Apr 2016 13:38:26 +1000 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> Message-ID: There are still issues with garbage collection that we have partial solutions for, but haven't put into master yet that may be causing issues, but you'd be pretty unlucky. Usually such failures are rare until the garbage collection torture is enabled. I don't think your observer function is quite right - the image registration one commandIteration <- function(method) { res <- function() { msg <- paste("Optimizer iteration number ", method$GetOptimizerIteration(), " = ", method$GetMetricValue(), " : ", method$GetOptimizerPosition(), "\n" ) cat(msg) } return(res) } Note that it is returning a function created internally. This is a "closure" in R (I think) and the trick is that it retains a copy of the environment, which includes the input argument. Yours example is passing the result of print, which isn't a function. This kind of error is meant to raise an exception, rather than crash ungracefully, so there may be some more work to do there. On Sun, Apr 10, 2016 at 11:10 AM, Mathew Guilfoyle wrote: > There seems to be a problem with using the $AddCommand function to > ImageRegistrationMethod objects in the R wrapping to SimpleITK. > > Using R 3.2.4 on OS X 10.11 > > Example: > > f <- function(x){print(x$GetMetricValue())} > > registration = ImageRegistrationMethod() > > registration$AddCommand(?sitkIterationEvent?, f(registration)) > > This last line causes R to abort/hard crash (no error message). This > behaviour is irrespective of which event type I use or the function passed > as the second argument (e.g. even something simple like print(?Hello?)) > > The AddCommand method is inherited from the SimpleITK ProcessObject type. > Digging around in the SimpleITK.R file I can see that the > ProcessObject$AddCommand method expects a second argument of type > ?_p_itk__simple__Command?. > > There is a ?Command? method that generates a new object of type > ?_p_itk__simple__Command?. If I pass this resulting object as the second > argument to registration$AddCommand then I do not get an error. However, > there doesn?t seem to be any way to point the ?_p_itk__simple__Command? > object to my function or otherwise convert my function to a > ?_p_itk__simple__Command? type. > > The $AddCommand method is used in a couple of example scripts on the > SimpleITK site (using it for monitoring a registration and a filter e.g. > https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) > so I don?t know if it was working previously and a bug has been introduced > more recently? (the example scripts cause the same error when I run them > now) > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 scorpiuni at gmail.com Sun Apr 10 08:40:10 2016 From: scorpiuni at gmail.com (Robert) Date: Sun, 10 Apr 2016 05:40:10 -0700 (MST) Subject: [ITK-users] VNL Functions in Python Message-ID: <1460292010864-7588715.post@n2.nabble.com> Hello again, The following function does not seem to be available in Python: vnl_matrix< double > Pinv; Pinv = vnl_matrix_inverse< double >(P); Is there any way to solve this with .wrap files, or am I simply missing something here? I guess one solution would be to use numpy, right? Woudn't that be better/faster anyways? Thanks for your input, Robert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/VNL-Functions-in-Python-tp7588715.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From mrguilfoyle at gmail.com Sun Apr 10 09:46:29 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Sun, 10 Apr 2016 14:46:29 +0100 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> Message-ID: Richard Thanks for the reply. I hadn't appreciated that function being passed in the registration example was a closure. However, in the FiterProgressReporting example it is not a closure. I have modified my code to be a closure but still get a crash/abort; I have also run the code in the examples themselves verbatim and get the same problem. Any further ideas on how to get this working? Cheers > On 10 Apr 2016, at 02:10, Mathew Guilfoyle wrote: > > There seems to be a problem with using the $AddCommand function to ImageRegistrationMethod objects in the R wrapping to SimpleITK. > > Using R 3.2.4 on OS X 10.11 > > Example: > > f <- function(x){print(x$GetMetricValue())} > > registration = ImageRegistrationMethod() > > registration$AddCommand(?sitkIterationEvent?, f(registration)) > > This last line causes R to abort/hard crash (no error message). This behaviour is irrespective of which event type I use or the function passed as the second argument (e.g. even something simple like print(?Hello?)) > > The AddCommand method is inherited from the SimpleITK ProcessObject type. Digging around in the SimpleITK.R file I can see that the ProcessObject$AddCommand method expects a second argument of type ?_p_itk__simple__Command?. > > There is a ?Command? method that generates a new object of type ?_p_itk__simple__Command?. If I pass this resulting object as the second argument to registration$AddCommand then I do not get an error. However, there doesn?t seem to be any way to point the ?_p_itk__simple__Command? object to my function or otherwise convert my function to a ?_p_itk__simple__Command? type. > > The $AddCommand method is used in a couple of example scripts on the SimpleITK site (using it for monitoring a registration and a filter e.g. https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) so I don?t know if it was working previously and a bug has been introduced more recently? (the example scripts cause the same error when I run them now) > > > From suneezahanif02 at gmail.com Sun Apr 10 09:55:39 2016 From: suneezahanif02 at gmail.com (suneeza hanif) Date: Sun, 10 Apr 2016 15:55:39 +0200 Subject: [ITK-users] Levenberg-Marquardt optimizer Message-ID: Hello Everyone, I have a question about Levenberg-Marquardt optimizer. Is this optimizer only applicable to pointSet to pointSet registration method? Or can we use it in image registration method? Best Regards, Suneeza -------------- next part -------------- An HTML attachment was scrubbed... URL: From bakkari.abdelkhalek at hotmail.fr Sun Apr 10 14:02:39 2016 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Sun, 10 Apr 2016 19:02:39 +0100 Subject: [ITK-users] Detection of Blood Vessels in Retinal Images Using Two-Dimensional Matched Filters Message-ID: Hi ! I would like to implement the Detection of Blood Vessels in Retinal Images Using Two-Dimensional Matched Filters using ITK. Any help ! Any suggestion, please. Kind regards, Abdelkhalek BakkariPh.D candidate in Computer ScienceInstitute of Applied Computer ScienceLodz University of Technology, Poland -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.beare at gmail.com Sun Apr 10 16:41:27 2016 From: richard.beare at gmail.com (Richard Beare) Date: Mon, 11 Apr 2016 06:41:27 +1000 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> Message-ID: I have had the registration example working, but have't experimented with the filter progress version. Will have a try. On Sun, Apr 10, 2016 at 11:46 PM, Mathew Guilfoyle wrote: > Richard > > Thanks for the reply. I hadn't appreciated that function being passed in > the registration example was a closure. However, in the > FiterProgressReporting example it is not a closure. > > I have modified my code to be a closure but still get a crash/abort; I > have also run the code in the examples themselves verbatim and get the same > problem. > > Any further ideas on how to get this working? > > Cheers > > > > On 10 Apr 2016, at 02:10, Mathew Guilfoyle > wrote: > > > > There seems to be a problem with using the $AddCommand function to > ImageRegistrationMethod objects in the R wrapping to SimpleITK. > > > > Using R 3.2.4 on OS X 10.11 > > > > Example: > > > > f <- function(x){print(x$GetMetricValue())} > > > > registration = ImageRegistrationMethod() > > > > registration$AddCommand(?sitkIterationEvent?, f(registration)) > > > > This last line causes R to abort/hard crash (no error message). This > behaviour is irrespective of which event type I use or the function passed > as the second argument (e.g. even something simple like print(?Hello?)) > > > > The AddCommand method is inherited from the SimpleITK ProcessObject > type. Digging around in the SimpleITK.R file I can see that the > ProcessObject$AddCommand method expects a second argument of type > ?_p_itk__simple__Command?. > > > > There is a ?Command? method that generates a new object of type > ?_p_itk__simple__Command?. If I pass this resulting object as the second > argument to registration$AddCommand then I do not get an error. However, > there doesn?t seem to be any way to point the ?_p_itk__simple__Command? > object to my function or otherwise convert my function to a > ?_p_itk__simple__Command? type. > > > > The $AddCommand method is used in a couple of example scripts on the > SimpleITK site (using it for monitoring a registration and a filter e.g. > https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) > so I don?t know if it was working previously and a bug has been introduced > more recently? (the example scripts cause the same error when I run them > now) > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.beare at gmail.com Sun Apr 10 17:56:38 2016 From: richard.beare at gmail.com (Richard Beare) Date: Mon, 11 Apr 2016 07:56:38 +1000 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> Message-ID: Some of the FilterProgressReporting example doesn't make sense to me. It shouldn't be necessary to access RCommand - it is used internally by AddCommand. We probably shouldn't make it directly accessible from R. The following works for me. A closure is necessary if you want the callback to access the filter, for example to print measures contained in the filter that is making the callback. Also note that in the first message you were passing the function result, not the function. ## get an image p <- PhysicalPointImageSource() p$SetOrigin(c(-1, -1)) p$SetSize(c(50,50)) pim <- p$Execute() pimOneChannel <- pim[[1]] f1 <- function() {print("Start")} f2 <- function(){print("End")} gaussian <- DiscreteGaussianImageFilter() gaussian$SetVariance( 2 ) gaussian$AddCommand( 'sitkStartEvent', f1 ) gaussian$AddCommand( 'sitkEndEvent', f2 ) filtered <- gaussian$Execute( pimOneChannel ) On Sun, Apr 10, 2016 at 11:46 PM, Mathew Guilfoyle wrote: > Richard > > Thanks for the reply. I hadn't appreciated that function being passed in > the registration example was a closure. However, in the > FiterProgressReporting example it is not a closure. > > I have modified my code to be a closure but still get a crash/abort; I > have also run the code in the examples themselves verbatim and get the same > problem. > > Any further ideas on how to get this working? > > Cheers > > > > On 10 Apr 2016, at 02:10, Mathew Guilfoyle > wrote: > > > > There seems to be a problem with using the $AddCommand function to > ImageRegistrationMethod objects in the R wrapping to SimpleITK. > > > > Using R 3.2.4 on OS X 10.11 > > > > Example: > > > > f <- function(x){print(x$GetMetricValue())} > > > > registration = ImageRegistrationMethod() > > > > registration$AddCommand(?sitkIterationEvent?, f(registration)) > > > > This last line causes R to abort/hard crash (no error message). This > behaviour is irrespective of which event type I use or the function passed > as the second argument (e.g. even something simple like print(?Hello?)) > > > > The AddCommand method is inherited from the SimpleITK ProcessObject > type. Digging around in the SimpleITK.R file I can see that the > ProcessObject$AddCommand method expects a second argument of type > ?_p_itk__simple__Command?. > > > > There is a ?Command? method that generates a new object of type > ?_p_itk__simple__Command?. If I pass this resulting object as the second > argument to registration$AddCommand then I do not get an error. However, > there doesn?t seem to be any way to point the ?_p_itk__simple__Command? > object to my function or otherwise convert my function to a > ?_p_itk__simple__Command? type. > > > > The $AddCommand method is used in a couple of example scripts on the > SimpleITK site (using it for monitoring a registration and a filter e.g. > https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) > so I don?t know if it was working previously and a bug has been introduced > more recently? (the example scripts cause the same error when I run them > now) > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad at lowekamp.net Sun Apr 10 18:17:12 2016 From: brad at lowekamp.net (Bradley Lowekamp) Date: Sun, 10 Apr 2016 18:17:12 -0400 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> Message-ID: Hello, I would like to know your environment. What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's super build? If not what version of SWIG? Thanks > On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle wrote: > > Richard > > Thanks for the reply. I hadn't appreciated that function being passed in the registration example was a closure. However, in the FiterProgressReporting example it is not a closure. > > I have modified my code to be a closure but still get a crash/abort; I have also run the code in the examples themselves verbatim and get the same problem. > > Any further ideas on how to get this working? > > Cheers > > >> On 10 Apr 2016, at 02:10, Mathew Guilfoyle wrote: >> >> There seems to be a problem with using the $AddCommand function to ImageRegistrationMethod objects in the R wrapping to SimpleITK. >> >> Using R 3.2.4 on OS X 10.11 >> >> Example: >> >> f <- function(x){print(x$GetMetricValue())} >> >> registration = ImageRegistrationMethod() >> >> registration$AddCommand(?sitkIterationEvent?, f(registration)) >> >> This last line causes R to abort/hard crash (no error message). This behaviour is irrespective of which event type I use or the function passed as the second argument (e.g. even something simple like print(?Hello?)) >> >> The AddCommand method is inherited from the SimpleITK ProcessObject type. Digging around in the SimpleITK.R file I can see that the ProcessObject$AddCommand method expects a second argument of type ?_p_itk__simple__Command?. >> >> There is a ?Command? method that generates a new object of type ?_p_itk__simple__Command?. If I pass this resulting object as the second argument to registration$AddCommand then I do not get an error. However, there doesn?t seem to be any way to point the ?_p_itk__simple__Command? object to my function or otherwise convert my function to a ?_p_itk__simple__Command? type. >> >> The $AddCommand method is used in a couple of example scripts on the SimpleITK site (using it for monitoring a registration and a filter e.g. https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) so I don?t know if it was working previously and a bug has been introduced more recently? (the example scripts cause the same error when I run them now) > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From mrguilfoyle at gmail.com Sun Apr 10 19:56:38 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Mon, 11 Apr 2016 00:56:38 +0100 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> Message-ID: <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> Richard It seems it must be something specific to my setup. I ran your example and get the same hard abort in Rstudio. Running the example in R.app I get the same error but a somewhat more graceful crash with the following error message: gaussian$AddCommand( 'sitkStartEvent', f1 ) *** caught segfault *** address 0x7ff511000080, cause 'memory not mapped' Traceback: 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, as.logical(.copy), PACKAGE = "SimpleITK") 2: f(x, ...) 3: gaussian$AddCommand("sitkStartEvent", f1) Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace I have tried the version of SimpleITK built without the version of SWIG you patched to correct the character argument error, again I get the same behaviour. Bradley - I?m using the latest SimpleITK 0.9 source compiled using the super build on OS X 10.11. I?ve done the build with the supplied SWIG and with a version patched by Richard and available here: https://github.com/richardbeare/swig.git . I?m funning R 3.2.4 in Rstudio IDE. > On 10 Apr 2016, at 23:17, Bradley Lowekamp wrote: > > Hello, > > I would like to know your environment. > > What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's super build? If not what version of SWIG? > > Thanks > >> On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle wrote: >> >> Richard >> >> Thanks for the reply. I hadn't appreciated that function being passed in the registration example was a closure. However, in the FiterProgressReporting example it is not a closure. >> >> I have modified my code to be a closure but still get a crash/abort; I have also run the code in the examples themselves verbatim and get the same problem. >> >> Any further ideas on how to get this working? >> >> Cheers >> >> >>> On 10 Apr 2016, at 02:10, Mathew Guilfoyle wrote: >>> >>> There seems to be a problem with using the $AddCommand function to ImageRegistrationMethod objects in the R wrapping to SimpleITK. >>> >>> Using R 3.2.4 on OS X 10.11 >>> >>> Example: >>> >>> f <- function(x){print(x$GetMetricValue())} >>> >>> registration = ImageRegistrationMethod() >>> >>> registration$AddCommand(?sitkIterationEvent?, f(registration)) >>> >>> This last line causes R to abort/hard crash (no error message). This behaviour is irrespective of which event type I use or the function passed as the second argument (e.g. even something simple like print(?Hello?)) >>> >>> The AddCommand method is inherited from the SimpleITK ProcessObject type. Digging around in the SimpleITK.R file I can see that the ProcessObject$AddCommand method expects a second argument of type ?_p_itk__simple__Command?. >>> >>> There is a ?Command? method that generates a new object of type ?_p_itk__simple__Command?. If I pass this resulting object as the second argument to registration$AddCommand then I do not get an error. However, there doesn?t seem to be any way to point the ?_p_itk__simple__Command? object to my function or otherwise convert my function to a ?_p_itk__simple__Command? type. >>> >>> The $AddCommand method is used in a couple of example scripts on the SimpleITK site (using it for monitoring a registration and a filter e.g. https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) so I don?t know if it was working previously and a bug has been introduced more recently? (the example scripts cause the same error when I run them now) >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 richard.beare at gmail.com Sun Apr 10 20:02:36 2016 From: richard.beare at gmail.com (Richard Beare) Date: Mon, 11 Apr 2016 10:02:36 +1000 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> Message-ID: This is a long shot, but lets try testing whether it is the R garbage collection causing issues. Modify the test so that every method call result is assigned to a different variable: e.g. a1 <- gaussian$SetVariance(2) a2 <- gaussian$AddCommand( 'sitkStartEvent', f1 ) a3 <- gaussian$AddCommand( 'sitkEndEvent', f2 ) I was running in a terminal on my mac, with an older version of R. On Mon, Apr 11, 2016 at 9:56 AM, Mathew Guilfoyle wrote: > Richard > > It seems it must be something specific to my setup. I ran your example > and get the same hard abort in Rstudio. Running the example in R.app I get > the same error but a somewhat more graceful crash with the following error > message: > > gaussian$AddCommand( 'sitkStartEvent', f1 ) > > *** caught segfault *** > address 0x7ff511000080, cause 'memory not mapped' > > Traceback: > 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, > as.logical(.copy), PACKAGE = "SimpleITK") > 2: f(x, ...) > 3: gaussian$AddCommand("sitkStartEvent", f1) > > Possible actions: > 1: abort (with core dump, if enabled) > 2: normal R exit > 3: exit R without saving workspace > 4: exit R saving workspace > > I have tried the version of SimpleITK built without the version of SWIG > you patched to correct the character argument error, again I get the same > behaviour. > > Bradley - I?m using the latest SimpleITK 0.9 source compiled using the > super build on OS X 10.11. I?ve done the build with the supplied SWIG and > with a version patched by Richard and available here: > https://github.com/richardbeare/swig.git. I?m funning R 3.2.4 in Rstudio > IDE. > > > > On 10 Apr 2016, at 23:17, Bradley Lowekamp wrote: > > Hello, > > I would like to know your environment. > > What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's super > build? If not what version of SWIG? > > Thanks > > On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle > wrote: > > Richard > > Thanks for the reply. I hadn't appreciated that function being passed in > the registration example was a closure. However, in the > FiterProgressReporting example it is not a closure. > > I have modified my code to be a closure but still get a crash/abort; I > have also run the code in the examples themselves verbatim and get the same > problem. > > Any further ideas on how to get this working? > > Cheers > > > On 10 Apr 2016, at 02:10, Mathew Guilfoyle wrote: > > There seems to be a problem with using the $AddCommand function to > ImageRegistrationMethod objects in the R wrapping to SimpleITK. > > Using R 3.2.4 on OS X 10.11 > > Example: > > f <- function(x){print(x$GetMetricValue())} > > registration = ImageRegistrationMethod() > > registration$AddCommand(?sitkIterationEvent?, f(registration)) > > This last line causes R to abort/hard crash (no error message). This > behaviour is irrespective of which event type I use or the function passed > as the second argument (e.g. even something simple like print(?Hello?)) > > The AddCommand method is inherited from the SimpleITK ProcessObject type. > Digging around in the SimpleITK.R file I can see that the > ProcessObject$AddCommand method expects a second argument of type > ?_p_itk__simple__Command?. > > There is a ?Command? method that generates a new object of type > ?_p_itk__simple__Command?. If I pass this resulting object as the second > argument to registration$AddCommand then I do not get an error. However, > there doesn?t seem to be any way to point the ?_p_itk__simple__Command? > object to my function or otherwise convert my function to a > ?_p_itk__simple__Command? type. > > The $AddCommand method is used in a couple of example scripts on the > SimpleITK site (using it for monitoring a registration and a filter e.g. > https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) > so I don?t know if it was working previously and a bug has been introduced > more recently? (the example scripts cause the same error when I run them > now) > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 brad at lowekamp.net Sun Apr 10 20:06:26 2016 From: brad at lowekamp.net (Bradley Lowekamp) Date: Sun, 10 Apr 2016 20:06:26 -0400 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> Message-ID: Hello, You are using the release source tar ball? Please try the git repo's master branch as much has changed with R since then. > On Apr 10, 2016, at 7:56 PM, Mathew Guilfoyle wrote: > > Richard > > It seems it must be something specific to my setup. I ran your example and get the same hard abort in Rstudio. Running the example in R.app I get the same error but a somewhat more graceful crash with the following error message: > > gaussian$AddCommand( 'sitkStartEvent', f1 ) > > *** caught segfault *** > address 0x7ff511000080, cause 'memory not mapped' > > Traceback: > 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, as.logical(.copy), PACKAGE = "SimpleITK") > 2: f(x, ...) > 3: gaussian$AddCommand("sitkStartEvent", f1) > > Possible actions: > 1: abort (with core dump, if enabled) > 2: normal R exit > 3: exit R without saving workspace > 4: exit R saving workspace > > I have tried the version of SimpleITK built without the version of SWIG you patched to correct the character argument error, again I get the same behaviour. > > Bradley - I?m using the latest SimpleITK 0.9 source compiled using the super build on OS X 10.11. I?ve done the build with the supplied SWIG and with a version patched by Richard and available here: https://github.com/richardbeare/swig.git. I?m funning R 3.2.4 in Rstudio IDE. > > > >> On 10 Apr 2016, at 23:17, Bradley Lowekamp wrote: >> >> Hello, >> >> I would like to know your environment. >> >> What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's super build? If not what version of SWIG? >> >> Thanks >> >>> On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle wrote: >>> >>> Richard >>> >>> Thanks for the reply. I hadn't appreciated that function being passed in the registration example was a closure. However, in the FiterProgressReporting example it is not a closure. >>> >>> I have modified my code to be a closure but still get a crash/abort; I have also run the code in the examples themselves verbatim and get the same problem. >>> >>> Any further ideas on how to get this working? >>> >>> Cheers >>> >>> >>>> On 10 Apr 2016, at 02:10, Mathew Guilfoyle wrote: >>>> >>>> There seems to be a problem with using the $AddCommand function to ImageRegistrationMethod objects in the R wrapping to SimpleITK. >>>> >>>> Using R 3.2.4 on OS X 10.11 >>>> >>>> Example: >>>> >>>> f <- function(x){print(x$GetMetricValue())} >>>> >>>> registration = ImageRegistrationMethod() >>>> >>>> registration$AddCommand(?sitkIterationEvent?, f(registration)) >>>> >>>> This last line causes R to abort/hard crash (no error message). This behaviour is irrespective of which event type I use or the function passed as the second argument (e.g. even something simple like print(?Hello?)) >>>> >>>> The AddCommand method is inherited from the SimpleITK ProcessObject type. Digging around in the SimpleITK.R file I can see that the ProcessObject$AddCommand method expects a second argument of type ?_p_itk__simple__Command?. >>>> >>>> There is a ?Command? method that generates a new object of type ?_p_itk__simple__Command?. If I pass this resulting object as the second argument to registration$AddCommand then I do not get an error. However, there doesn?t seem to be any way to point the ?_p_itk__simple__Command? object to my function or otherwise convert my function to a ?_p_itk__simple__Command? type. >>>> >>>> The $AddCommand method is used in a couple of example scripts on the SimpleITK site (using it for monitoring a registration and a filter e.g. https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) so I don?t know if it was working previously and a bug has been introduced more recently? (the example scripts cause the same error when I run them now) >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 mrguilfoyle at gmail.com Mon Apr 11 03:59:44 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Mon, 11 Apr 2016 08:59:44 +0100 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> Message-ID: <22B5DFA9-2658-46A5-8E07-0907FEB611BD@gmail.com> I tried running the code below as suggested - both in RStudio and the terminal - and get the same abort/segfault error. Which version of R are you running? - I can install an older version to see if it works. > On 11 Apr 2016, at 01:02, Richard Beare wrote: > > This is a long shot, but lets try testing whether it is the R garbage collection causing issues. Modify the test so that every method call result is assigned to a different variable: > > e.g. > > a1 <- gaussian$SetVariance(2) > a2 <- gaussian$AddCommand( 'sitkStartEvent', f1 ) > a3 <- gaussian$AddCommand( 'sitkEndEvent', f2 ) > > I was running in a terminal on my mac, with an older version of R. > > > On Mon, Apr 11, 2016 at 9:56 AM, Mathew Guilfoyle > wrote: > Richard > > It seems it must be something specific to my setup. I ran your example and get the same hard abort in Rstudio. Running the example in R.app I get the same error but a somewhat more graceful crash with the following error message: > > gaussian$AddCommand( 'sitkStartEvent', f1 ) > > *** caught segfault *** > address 0x7ff511000080, cause 'memory not mapped' > > Traceback: > 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, as.logical(.copy), PACKAGE = "SimpleITK") > 2: f(x, ...) > 3: gaussian$AddCommand("sitkStartEvent", f1) > > Possible actions: > 1: abort (with core dump, if enabled) > 2: normal R exit > 3: exit R without saving workspace > 4: exit R saving workspace > > I have tried the version of SimpleITK built without the version of SWIG you patched to correct the character argument error, again I get the same behaviour. > > Bradley - I?m using the latest SimpleITK 0.9 source compiled using the super build on OS X 10.11. I?ve done the build with the supplied SWIG and with a version patched by Richard and available here: https://github.com/richardbeare/swig.git . I?m funning R 3.2.4 in Rstudio IDE. > > > >> On 10 Apr 2016, at 23:17, Bradley Lowekamp > wrote: >> >> Hello, >> >> I would like to know your environment. >> >> What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's super build? If not what version of SWIG? >> >> Thanks >> >>> On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle > wrote: >>> >>> Richard >>> >>> Thanks for the reply. I hadn't appreciated that function being passed in the registration example was a closure. However, in the FiterProgressReporting example it is not a closure. >>> >>> I have modified my code to be a closure but still get a crash/abort; I have also run the code in the examples themselves verbatim and get the same problem. >>> >>> Any further ideas on how to get this working? >>> >>> Cheers >>> >>> >>>> On 10 Apr 2016, at 02:10, Mathew Guilfoyle > wrote: >>>> >>>> There seems to be a problem with using the $AddCommand function to ImageRegistrationMethod objects in the R wrapping to SimpleITK. >>>> >>>> Using R 3.2.4 on OS X 10.11 >>>> >>>> Example: >>>> >>>> f <- function(x){print(x$GetMetricValue())} >>>> >>>> registration = ImageRegistrationMethod() >>>> >>>> registration$AddCommand(?sitkIterationEvent?, f(registration)) >>>> >>>> This last line causes R to abort/hard crash (no error message). This behaviour is irrespective of which event type I use or the function passed as the second argument (e.g. even something simple like print(?Hello?)) >>>> >>>> The AddCommand method is inherited from the SimpleITK ProcessObject type. Digging around in the SimpleITK.R file I can see that the ProcessObject$AddCommand method expects a second argument of type ?_p_itk__simple__Command?. >>>> >>>> There is a ?Command? method that generates a new object of type ?_p_itk__simple__Command?. If I pass this resulting object as the second argument to registration$AddCommand then I do not get an error. However, there doesn?t seem to be any way to point the ?_p_itk__simple__Command? object to my function or otherwise convert my function to a ?_p_itk__simple__Command? type. >>>> >>>> The $AddCommand method is used in a couple of example scripts on the SimpleITK site (using it for monitoring a registration and a filter e.g. https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R ) so I don?t know if it was working previously and a bug has been introduced more recently? (the example scripts cause the same error when I run them now) >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 11 10:54:25 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 11 Apr 2016 10:54:25 -0400 Subject: [ITK-users] Levenberg-Marquardt optimizer In-Reply-To: References: Message-ID: Hello Suneeza, The Levenberg-Marquardt optimizer is a multi-valued cost function optimizer [1], and it is only used for solving those types of problems. Most image registration methods in ITK are set up as single-valued cost function problems. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1MultipleValuedNonLinearOptimizer.html On Sun, Apr 10, 2016 at 9:55 AM, suneeza hanif wrote: > Hello Everyone, > > I have a question about Levenberg-Marquardt optimizer. Is this optimizer > only applicable to pointSet to pointSet registration method? Or can we use > it in image registration method? > > Best Regards, > Suneeza > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK 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 11 10:58:26 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 11 Apr 2016 10:58:26 -0400 Subject: [ITK-users] VNL Functions in Python In-Reply-To: <1460292010864-7588715.post@n2.nabble.com> References: <1460292010864-7588715.post@n2.nabble.com> Message-ID: Hi Robert, Yes, we could wrap this function in Python, but you might as well use the inverse in numpy, which is readily available. Thanks, Matt On Sun, Apr 10, 2016 at 8:40 AM, Robert wrote: > Hello again, > > The following function does not seem to be available in Python: > > vnl_matrix< double > Pinv; > Pinv = vnl_matrix_inverse< double >(P); > > Is there any way to solve this with .wrap files, or am I simply missing > something here? > I guess one solution would be to use numpy, right? Woudn't that be > better/faster anyways? > > Thanks for your input, > Robert > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/VNL-Functions-in-Python-tp7588715.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From brad at lowekamp.net Mon Apr 11 11:14:23 2016 From: brad at lowekamp.net (Bradley Lowekamp) Date: Mon, 11 Apr 2016 11:14:23 -0400 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: <22B5DFA9-2658-46A5-8E07-0907FEB611BD@gmail.com> References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> <22B5DFA9-2658-46A5-8E07-0907FEB611BD@gmail.com> Message-ID: Hello, We have R tested with SimpleITK on a number of systems each night. And this morning we have run the tests on several systems, and it is running and passing OK, this was with what every old R version was on the systems We should focus on getting the tests to pass on your system first. It?s a good sign that you can run the AddCommand with the sitk::Command class. Does the rest of the R tests pass when you run ctest? I am still suspicious you are not running the latest development version. What is the git hash you are using? As you were digging into the SimpleITK R code you were on the right track with the ProccessObject::AddCommand and the sitk::Command class. The other two parts you are missing is the RCommand C++ class [1], and the overridden ProcessObject::AddCommand method [2]. These were recently added to SimpleITK since the 0.9 release. You can see that the added procedure wraps the passed callable, into the RCommand class. HTH, Brad [1] https://github.com/SimpleITK/SimpleITK/blob/master/Wrapping/R/sitkRCommand.h [2] https://github.com/SimpleITK/SimpleITK/blob/2ffffba589b24465a09eed1303bbffd6fe3fe18e/Wrapping/R/R.i#L565-L589 > On Apr 11, 2016, at 3:59 AM, Mathew Guilfoyle > wrote: > > I tried running the code below as suggested - both in RStudio and the terminal - and get the same abort/segfault error. > > Which version of R are you running? - I can install an older version to see if it works. > >> On 11 Apr 2016, at 01:02, Richard Beare > wrote: >> >> This is a long shot, but lets try testing whether it is the R garbage collection causing issues. Modify the test so that every method call result is assigned to a different variable: >> >> e.g. >> >> a1 <- gaussian$SetVariance(2) >> a2 <- gaussian$AddCommand( 'sitkStartEvent', f1 ) >> a3 <- gaussian$AddCommand( 'sitkEndEvent', f2 ) >> >> I was running in a terminal on my mac, with an older version of R. >> >> >> On Mon, Apr 11, 2016 at 9:56 AM, Mathew Guilfoyle > wrote: >> Richard >> >> It seems it must be something specific to my setup. I ran your example and get the same hard abort in Rstudio. Running the example in R.app I get the same error but a somewhat more graceful crash with the following error message: >> >> gaussian$AddCommand( 'sitkStartEvent', f1 ) >> >> *** caught segfault *** >> address 0x7ff511000080, cause 'memory not mapped' >> >> Traceback: >> 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, as.logical(.copy), PACKAGE = "SimpleITK") >> 2: f(x, ...) >> 3: gaussian$AddCommand("sitkStartEvent", f1) >> >> Possible actions: >> 1: abort (with core dump, if enabled) >> 2: normal R exit >> 3: exit R without saving workspace >> 4: exit R saving workspace >> >> I have tried the version of SimpleITK built without the version of SWIG you patched to correct the character argument error, again I get the same behaviour. >> >> Bradley - I?m using the latest SimpleITK 0.9 source compiled using the super build on OS X 10.11. I?ve done the build with the supplied SWIG and with a version patched by Richard and available here: https://github.com/richardbeare/swig.git . I?m funning R 3.2.4 in Rstudio IDE. >> >> >> >>> On 10 Apr 2016, at 23:17, Bradley Lowekamp > wrote: >>> >>> Hello, >>> >>> I would like to know your environment. >>> >>> What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's super build? If not what version of SWIG? >>> >>> Thanks >>> >>>> On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle > wrote: >>>> >>>> Richard >>>> >>>> Thanks for the reply. I hadn't appreciated that function being passed in the registration example was a closure. However, in the FiterProgressReporting example it is not a closure. >>>> >>>> I have modified my code to be a closure but still get a crash/abort; I have also run the code in the examples themselves verbatim and get the same problem. >>>> >>>> Any further ideas on how to get this working? >>>> >>>> Cheers >>>> >>>> >>>>> On 10 Apr 2016, at 02:10, Mathew Guilfoyle > wrote: >>>>> >>>>> There seems to be a problem with using the $AddCommand function to ImageRegistrationMethod objects in the R wrapping to SimpleITK. >>>>> >>>>> Using R 3.2.4 on OS X 10.11 >>>>> >>>>> Example: >>>>> >>>>> f <- function(x){print(x$GetMetricValue())} >>>>> >>>>> registration = ImageRegistrationMethod() >>>>> >>>>> registration$AddCommand(?sitkIterationEvent?, f(registration)) >>>>> >>>>> This last line causes R to abort/hard crash (no error message). This behaviour is irrespective of which event type I use or the function passed as the second argument (e.g. even something simple like print(?Hello?)) >>>>> >>>>> The AddCommand method is inherited from the SimpleITK ProcessObject type. Digging around in the SimpleITK.R file I can see that the ProcessObject$AddCommand method expects a second argument of type ?_p_itk__simple__Command?. >>>>> >>>>> There is a ?Command? method that generates a new object of type ?_p_itk__simple__Command?. If I pass this resulting object as the second argument to registration$AddCommand then I do not get an error. However, there doesn?t seem to be any way to point the ?_p_itk__simple__Command? object to my function or otherwise convert my function to a ?_p_itk__simple__Command? type. >>>>> >>>>> The $AddCommand method is used in a couple of example scripts on the SimpleITK site (using it for monitoring a registration and a filter e.g. https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R ) so I don?t know if it was working previously and a bug has been introduced more recently? (the example scripts cause the same error when I run them now) >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the 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 scorpiuni at gmail.com Mon Apr 11 13:28:06 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 11 Apr 2016 10:28:06 -0700 (MST) Subject: [ITK-users] VNL Functions in Python In-Reply-To: References: <1460292010864-7588715.post@n2.nabble.com> Message-ID: <1460395686331-37012.post@n7.nabble.com> Hey, So far, I've used all the functions from numpy when I needed one, as don't see the additional effort that I'd need when wrapping. However, I have one question about the transpose method from VNL. Does this one "really" transpose the matrix, like the " ' " operator from matlab , or does it execute a non-conjugate transpose, like the " .' " operator in matlab? Another thing, when using VNL, I use the itk.F and itk.UC types. In numpy, I use the "normal" float and char types from python. Could this be a future source for problems, as the types may not work together? Thanks for any input, Robert -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-VNL-Functions-in-Python-tp36998p37012.html Sent from the ITK - Users mailing list archive at Nabble.com. From richard.beare at gmail.com Mon Apr 11 17:53:32 2016 From: richard.beare at gmail.com (Richard Beare) Date: Tue, 12 Apr 2016 07:53:32 +1000 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: <22B5DFA9-2658-46A5-8E07-0907FEB611BD@gmail.com> References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> <22B5DFA9-2658-46A5-8E07-0907FEB611BD@gmail.com> Message-ID: My mac has 3.2.2 and OS X 10.10 On Mon, Apr 11, 2016 at 5:59 PM, Mathew Guilfoyle wrote: > I tried running the code below as suggested - both in RStudio and the > terminal - and get the same abort/segfault error. > > Which version of R are you running? - I can install an older version to > see if it works. > > On 11 Apr 2016, at 01:02, Richard Beare wrote: > > This is a long shot, but lets try testing whether it is the R garbage > collection causing issues. Modify the test so that every method call result > is assigned to a different variable: > > e.g. > > a1 <- gaussian$SetVariance(2) > a2 <- gaussian$AddCommand( 'sitkStartEvent', f1 ) > a3 <- gaussian$AddCommand( 'sitkEndEvent', f2 ) > > I was running in a terminal on my mac, with an older version of R. > > > On Mon, Apr 11, 2016 at 9:56 AM, Mathew Guilfoyle > wrote: > >> Richard >> >> It seems it must be something specific to my setup. I ran your example >> and get the same hard abort in Rstudio. Running the example in R.app I get >> the same error but a somewhat more graceful crash with the following error >> message: >> >> gaussian$AddCommand( 'sitkStartEvent', f1 ) >> >> *** caught segfault *** >> address 0x7ff511000080, cause 'memory not mapped' >> >> Traceback: >> 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, >> as.logical(.copy), PACKAGE = "SimpleITK") >> 2: f(x, ...) >> 3: gaussian$AddCommand("sitkStartEvent", f1) >> >> Possible actions: >> 1: abort (with core dump, if enabled) >> 2: normal R exit >> 3: exit R without saving workspace >> 4: exit R saving workspace >> >> I have tried the version of SimpleITK built without the version of SWIG >> you patched to correct the character argument error, again I get the same >> behaviour. >> >> Bradley - I?m using the latest SimpleITK 0.9 source compiled using the >> super build on OS X 10.11. I?ve done the build with the supplied SWIG and >> with a version patched by Richard and available here: >> https://github.com/richardbeare/swig.git. I?m funning R 3.2.4 in >> Rstudio IDE. >> >> >> >> On 10 Apr 2016, at 23:17, Bradley Lowekamp wrote: >> >> Hello, >> >> I would like to know your environment. >> >> What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's >> super build? If not what version of SWIG? >> >> Thanks >> >> On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle >> wrote: >> >> Richard >> >> Thanks for the reply. I hadn't appreciated that function being passed in >> the registration example was a closure. However, in the >> FiterProgressReporting example it is not a closure. >> >> I have modified my code to be a closure but still get a crash/abort; I >> have also run the code in the examples themselves verbatim and get the same >> problem. >> >> Any further ideas on how to get this working? >> >> Cheers >> >> >> On 10 Apr 2016, at 02:10, Mathew Guilfoyle wrote: >> >> There seems to be a problem with using the $AddCommand function to >> ImageRegistrationMethod objects in the R wrapping to SimpleITK. >> >> Using R 3.2.4 on OS X 10.11 >> >> Example: >> >> f <- function(x){print(x$GetMetricValue())} >> >> registration = ImageRegistrationMethod() >> >> registration$AddCommand(?sitkIterationEvent?, f(registration)) >> >> This last line causes R to abort/hard crash (no error message). This >> behaviour is irrespective of which event type I use or the function passed >> as the second argument (e.g. even something simple like print(?Hello?)) >> >> The AddCommand method is inherited from the SimpleITK ProcessObject >> type. Digging around in the SimpleITK.R file I can see that the >> ProcessObject$AddCommand method expects a second argument of type >> ?_p_itk__simple__Command?. >> >> There is a ?Command? method that generates a new object of type >> ?_p_itk__simple__Command?. If I pass this resulting object as the second >> argument to registration$AddCommand then I do not get an error. However, >> there doesn?t seem to be any way to point the ?_p_itk__simple__Command? >> object to my function or otherwise convert my function to a >> ?_p_itk__simple__Command? type. >> >> The $AddCommand method is used in a couple of example scripts on the >> SimpleITK site (using it for monitoring a registration and a filter e.g. >> https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) >> so I don?t know if it was working previously and a bug has been introduced >> more recently? (the example scripts cause the same error when I run them >> now) >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 mrguilfoyle at gmail.com Mon Apr 11 18:12:23 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Mon, 11 Apr 2016 23:12:23 +0100 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> <22B5DFA9-2658-46A5-8E07-0907FEB611BD@gmail.com> Message-ID: <0B28C3D3-0B69-41D3-851D-FD6A3FF0C3A7@gmail.com> You were entirely correct? I?ve compiled SimpleITK from the latest snapshot today and the $AddCommand seems to be working correctly now, at least when tested in a ImageRegistrationMethod script. Of note, I tried building the latest snapshot with the version of SWIG that the superbuild downloads and I still get the errors with passing a R character vector argument to (e.g.) ImageSeriesReader$SetFileNames(). When I build with the patched version of SWIG (supplied by Richard) then it works as expected. Thanks again for all the help. > On 11 Apr 2016, at 16:14, Bradley Lowekamp wrote: > > Hello, > > We have R tested with SimpleITK on a number of systems each night. And this morning we have run the tests on several systems, and it is running and passing OK, this was with what every old R version was on the systems > > We should focus on getting the tests to pass on your system first. It?s a good sign that you can run the AddCommand with the sitk::Command class. Does the rest of the R tests pass when you run ctest? > > I am still suspicious you are not running the latest development version. What is the git hash you are using? > > As you were digging into the SimpleITK R code you were on the right track with the ProccessObject::AddCommand and the sitk::Command class. The other two parts you are missing is the RCommand C++ class [1], and the overridden ProcessObject::AddCommand method [2]. These were recently added to SimpleITK since the 0.9 release. You can see that the added procedure wraps the passed callable, into the RCommand class. > > HTH, > Brad > > > [1] https://github.com/SimpleITK/SimpleITK/blob/master/Wrapping/R/sitkRCommand.h > [2] https://github.com/SimpleITK/SimpleITK/blob/2ffffba589b24465a09eed1303bbffd6fe3fe18e/Wrapping/R/R.i#L565-L589 > >> On Apr 11, 2016, at 3:59 AM, Mathew Guilfoyle > wrote: >> >> I tried running the code below as suggested - both in RStudio and the terminal - and get the same abort/segfault error. >> >> Which version of R are you running? - I can install an older version to see if it works. >> >>> On 11 Apr 2016, at 01:02, Richard Beare > wrote: >>> >>> This is a long shot, but lets try testing whether it is the R garbage collection causing issues. Modify the test so that every method call result is assigned to a different variable: >>> >>> e.g. >>> >>> a1 <- gaussian$SetVariance(2) >>> a2 <- gaussian$AddCommand( 'sitkStartEvent', f1 ) >>> a3 <- gaussian$AddCommand( 'sitkEndEvent', f2 ) >>> >>> I was running in a terminal on my mac, with an older version of R. >>> >>> >>> On Mon, Apr 11, 2016 at 9:56 AM, Mathew Guilfoyle > wrote: >>> Richard >>> >>> It seems it must be something specific to my setup. I ran your example and get the same hard abort in Rstudio. Running the example in R.app I get the same error but a somewhat more graceful crash with the following error message: >>> >>> gaussian$AddCommand( 'sitkStartEvent', f1 ) >>> >>> *** caught segfault *** >>> address 0x7ff511000080, cause 'memory not mapped' >>> >>> Traceback: >>> 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, as.logical(.copy), PACKAGE = "SimpleITK") >>> 2: f(x, ...) >>> 3: gaussian$AddCommand("sitkStartEvent", f1) >>> >>> Possible actions: >>> 1: abort (with core dump, if enabled) >>> 2: normal R exit >>> 3: exit R without saving workspace >>> 4: exit R saving workspace >>> >>> I have tried the version of SimpleITK built without the version of SWIG you patched to correct the character argument error, again I get the same behaviour. >>> >>> Bradley - I?m using the latest SimpleITK 0.9 source compiled using the super build on OS X 10.11. I?ve done the build with the supplied SWIG and with a version patched by Richard and available here: https://github.com/richardbeare/swig.git . I?m funning R 3.2.4 in Rstudio IDE. >>> >>> >>> >>>> On 10 Apr 2016, at 23:17, Bradley Lowekamp > wrote: >>>> >>>> Hello, >>>> >>>> I would like to know your environment. >>>> >>>> What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's super build? If not what version of SWIG? >>>> >>>> Thanks >>>> >>>>> On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle > wrote: >>>>> >>>>> Richard >>>>> >>>>> Thanks for the reply. I hadn't appreciated that function being passed in the registration example was a closure. However, in the FiterProgressReporting example it is not a closure. >>>>> >>>>> I have modified my code to be a closure but still get a crash/abort; I have also run the code in the examples themselves verbatim and get the same problem. >>>>> >>>>> Any further ideas on how to get this working? >>>>> >>>>> Cheers >>>>> >>>>> >>>>>> On 10 Apr 2016, at 02:10, Mathew Guilfoyle > wrote: >>>>>> >>>>>> There seems to be a problem with using the $AddCommand function to ImageRegistrationMethod objects in the R wrapping to SimpleITK. >>>>>> >>>>>> Using R 3.2.4 on OS X 10.11 >>>>>> >>>>>> Example: >>>>>> >>>>>> f <- function(x){print(x$GetMetricValue())} >>>>>> >>>>>> registration = ImageRegistrationMethod() >>>>>> >>>>>> registration$AddCommand(?sitkIterationEvent?, f(registration)) >>>>>> >>>>>> This last line causes R to abort/hard crash (no error message). This behaviour is irrespective of which event type I use or the function passed as the second argument (e.g. even something simple like print(?Hello?)) >>>>>> >>>>>> The AddCommand method is inherited from the SimpleITK ProcessObject type. Digging around in the SimpleITK.R file I can see that the ProcessObject$AddCommand method expects a second argument of type ?_p_itk__simple__Command?. >>>>>> >>>>>> There is a ?Command? method that generates a new object of type ?_p_itk__simple__Command?. If I pass this resulting object as the second argument to registration$AddCommand then I do not get an error. However, there doesn?t seem to be any way to point the ?_p_itk__simple__Command? object to my function or otherwise convert my function to a ?_p_itk__simple__Command? type. >>>>>> >>>>>> The $AddCommand method is used in a couple of example scripts on the SimpleITK site (using it for monitoring a registration and a filter e.g. https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R ) so I don?t know if it was working previously and a bug has been introduced more recently? (the example scripts cause the same error when I run them now) >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the 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 richard.beare at gmail.com Mon Apr 11 18:26:52 2016 From: richard.beare at gmail.com (Richard Beare) Date: Tue, 12 Apr 2016 08:26:52 +1000 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: <0B28C3D3-0B69-41D3-851D-FD6A3FF0C3A7@gmail.com> References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> <22B5DFA9-2658-46A5-8E07-0907FEB611BD@gmail.com> <0B28C3D3-0B69-41D3-851D-FD6A3FF0C3A7@gmail.com> Message-ID: The swig people haven't yet included my pull request for the character vector stuff. Hopefully soon. Also, we're currently working on an option for the super build that grabs swig from a git repo. Hopefully you'll be able to try that soon. On Tue, Apr 12, 2016 at 8:12 AM, Mathew Guilfoyle wrote: > You were entirely correct? I?ve compiled SimpleITK from the latest > snapshot today and the $AddCommand seems to be working correctly now, at > least when tested in a ImageRegistrationMethod script. > > Of note, I tried building the latest snapshot with the version of SWIG > that the superbuild downloads and I still get the errors with passing a R > character vector argument to (e.g.) ImageSeriesReader$SetFileNames(). When > I build with the patched version of SWIG (supplied by Richard) then it > works as expected. > > Thanks again for all the help. > > On 11 Apr 2016, at 16:14, Bradley Lowekamp wrote: > > Hello, > > We have R tested with SimpleITK on a number of systems each night. And > this morning we have run the tests on several systems, and it is running > and passing OK, this was with what every old R version was on the systems > > We should focus on getting the tests to pass on your system first. It?s a > good sign that you can run the AddCommand with the sitk::Command class. > Does the rest of the R tests pass when you run ctest? > > I am still suspicious you are not running the latest development version. > What is the git hash you are using? > > As you were digging into the SimpleITK R code you were on the right track > with the ProccessObject::AddCommand and the sitk::Command class. The other > two parts you are missing is the RCommand C++ class [1], and the overridden > ProcessObject::AddCommand method [2]. These were recently added to > SimpleITK since the 0.9 release. You can see that the added procedure wraps > the passed callable, into the RCommand class. > > HTH, > Brad > > > [1] > https://github.com/SimpleITK/SimpleITK/blob/master/Wrapping/R/sitkRCommand.h > [2] > https://github.com/SimpleITK/SimpleITK/blob/2ffffba589b24465a09eed1303bbffd6fe3fe18e/Wrapping/R/R.i#L565-L589 > > On Apr 11, 2016, at 3:59 AM, Mathew Guilfoyle > wrote: > > I tried running the code below as suggested - both in RStudio and the > terminal - and get the same abort/segfault error. > > Which version of R are you running? - I can install an older version to > see if it works. > > On 11 Apr 2016, at 01:02, Richard Beare wrote: > > This is a long shot, but lets try testing whether it is the R garbage > collection causing issues. Modify the test so that every method call result > is assigned to a different variable: > > e.g. > > a1 <- gaussian$SetVariance(2) > a2 <- gaussian$AddCommand( 'sitkStartEvent', f1 ) > a3 <- gaussian$AddCommand( 'sitkEndEvent', f2 ) > > I was running in a terminal on my mac, with an older version of R. > > > On Mon, Apr 11, 2016 at 9:56 AM, Mathew Guilfoyle > wrote: > >> Richard >> >> It seems it must be something specific to my setup. I ran your example >> and get the same hard abort in Rstudio. Running the example in R.app I get >> the same error but a somewhat more graceful crash with the following error >> message: >> >> gaussian$AddCommand( 'sitkStartEvent', f1 ) >> >> *** caught segfault *** >> address 0x7ff511000080, cause 'memory not mapped' >> >> Traceback: >> 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, >> as.logical(.copy), PACKAGE = "SimpleITK") >> 2: f(x, ...) >> 3: gaussian$AddCommand("sitkStartEvent", f1) >> >> Possible actions: >> 1: abort (with core dump, if enabled) >> 2: normal R exit >> 3: exit R without saving workspace >> 4: exit R saving workspace >> >> I have tried the version of SimpleITK built without the version of SWIG >> you patched to correct the character argument error, again I get the same >> behaviour. >> >> Bradley - I?m using the latest SimpleITK 0.9 source compiled using the >> super build on OS X 10.11. I?ve done the build with the supplied SWIG and >> with a version patched by Richard and available here: >> https://github.com/richardbeare/swig.git. I?m funning R 3.2.4 in >> Rstudio IDE. >> >> >> >> On 10 Apr 2016, at 23:17, Bradley Lowekamp wrote: >> >> Hello, >> >> I would like to know your environment. >> >> What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's >> super build? If not what version of SWIG? >> >> Thanks >> >> On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle >> wrote: >> >> Richard >> >> Thanks for the reply. I hadn't appreciated that function being passed in >> the registration example was a closure. However, in the >> FiterProgressReporting example it is not a closure. >> >> I have modified my code to be a closure but still get a crash/abort; I >> have also run the code in the examples themselves verbatim and get the same >> problem. >> >> Any further ideas on how to get this working? >> >> Cheers >> >> >> On 10 Apr 2016, at 02:10, Mathew Guilfoyle wrote: >> >> There seems to be a problem with using the $AddCommand function to >> ImageRegistrationMethod objects in the R wrapping to SimpleITK. >> >> Using R 3.2.4 on OS X 10.11 >> >> Example: >> >> f <- function(x){print(x$GetMetricValue())} >> >> registration = ImageRegistrationMethod() >> >> registration$AddCommand(?sitkIterationEvent?, f(registration)) >> >> This last line causes R to abort/hard crash (no error message). This >> behaviour is irrespective of which event type I use or the function passed >> as the second argument (e.g. even something simple like print(?Hello?)) >> >> The AddCommand method is inherited from the SimpleITK ProcessObject >> type. Digging around in the SimpleITK.R file I can see that the >> ProcessObject$AddCommand method expects a second argument of type >> ?_p_itk__simple__Command?. >> >> There is a ?Command? method that generates a new object of type >> ?_p_itk__simple__Command?. If I pass this resulting object as the second >> argument to registration$AddCommand then I do not get an error. However, >> there doesn?t seem to be any way to point the ?_p_itk__simple__Command? >> object to my function or otherwise convert my function to a >> ?_p_itk__simple__Command? type. >> >> The $AddCommand method is used in a couple of example scripts on the >> SimpleITK site (using it for monitoring a registration and a filter e.g. >> https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) >> so I don?t know if it was working previously and a bug has been introduced >> more recently? (the example scripts cause the same error when I run them >> now) >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 matt.mccormick at kitware.com Tue Apr 12 11:59:23 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 12 Apr 2016 11:59:23 -0400 Subject: [ITK-users] VNL Functions in Python In-Reply-To: <1460395686331-37012.post@n7.nabble.com> References: <1460292010864-7588715.post@n2.nabble.com> <1460395686331-37012.post@n7.nabble.com> Message-ID: Hi Robert, > So far, I've used all the functions from numpy when I needed one, as don't > see the additional effort that I'd need when wrapping. > However, I have one question about the transpose method from VNL. > Does this one "really" transpose the matrix, like the " ' " operator from > matlab , or does it execute a non-conjugate transpose, like the " .' " > operator in matlab? There are both transpose() and conjugate_transpose() methods. See here: http://www.vtk.org/vxl/doc/release/core/vnl/html/classvnl__matrix.html > Another thing, when using VNL, I use the itk.F and itk.UC types. In numpy, I > use the "normal" float and char types from python. Could this be a future > source for problems, as the types may not work together? The itk.F is a "normal" float and itk.UC is "normal" unsigned char. To make our Python code more literate, we should use itk.ctype. Instead of PixelType = itk.F use PixelType = itk.ctype('float') Both itk.F == itk.ctype('float') and itk.UC == itk.ctype('unsigned char') return True. HTH, Matt From davis.vigneault at gmail.com Wed Apr 13 19:16:56 2016 From: davis.vigneault at gmail.com (DVigneault) Date: Wed, 13 Apr 2016 16:16:56 -0700 (MST) Subject: [ITK-users] Linking an external ITK module against LAPACK? Message-ID: <1460589416154-7588734.post@n2.nabble.com> All-- I have an external ITK module ITK/src/Modules/External/ITKDVUtilities/. Additionally, I have written a group of classes which depend on VNL and LAPACK (subroutines which do not ship with VNL). I've tested them in a project outside the ITK source tree linking against LAPACK. I'd now like to use these classes in my ITK module, but am unclear on how to link my module against LAPACK. Adding target_link_libraries(${itk-module} ${LAPACK-LIBRARIES}) to ITKDVUtilities/CMakeLists.txt gives me the following CMake configuration error: CMake Error at Modules/External/ITKDVUtilities/CMakeLists.txt:15 (target_link_libraries): Cannot specify link libraries for target "ITKDVUtilities" which is not built by this project. But, of course, if I leave it out, I get a linker error: Undefined symbols for architecture x86_64: "_dgees_", referenced from: vnl_schur_decomposition::solve() in ITKDVUtilitiesHeaderTest1.cxx.o "_sgees_", referenced from: vnl_schur_decomposition::solve() in ITKDVUtilitiesHeaderTest1.cxx.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [bin/ITKDVUtilitiesHeaderTest1] Error 1 make[1]: *** [Modules/External/ITKDVUtilities/CMakeFiles/ITKDVUtilitiesHeaderTest1.dir/all] Error 2 make: *** [all] Error 2 I've pasted below the full text of ITK/srs/Modules/External/ITKDVUtilities/CMakeLists.txt. Thanks very much in advance for your help! Best, --Davis # ITK/srs/Modules/External/ITKDVUtilities/CMakeLists.txt cmake_minimum_required(VERSION 2.8.9) project(ITKDVUtilities) find_package(LAPACK REQUIRED) if(NOT ITK_SOURCE_DIR) find_package(ITK REQUIRED) list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) include(ITKModuleExternal) else() itk_module_impl() endif() #target_link_libraries(${itk-module} ${LAPACK-LIBRARIES}) -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Linking-an-external-ITK-module-against-LAPACK-tp7588734.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Wed Apr 13 21:44:00 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 13 Apr 2016 21:44:00 -0400 Subject: [ITK-users] Linking an external ITK module against LAPACK? In-Reply-To: <1460589416154-7588734.post@n2.nabble.com> References: <1460589416154-7588734.post@n2.nabble.com> Message-ID: Hi Davis, The BridgeOpenCV module can now also be built externally and it can be used as an example. The initial find_package should be added to itk-module-init.cmake. https://github.com/InsightSoftwareConsortium/ITK/blob/f8b17356cecf1611894e0be25b2c3d9284646889/Modules/Video/BridgeOpenCV/itk-module-init.cmake Then, define _EXPORT_CODE_INSTALL, _EXPORT_CODE_BUILD, _SYSTEM_INCLUDE_DIRS, and _SYSTEM_LIBRARY_DIRS (if needed): https://github.com/InsightSoftwareConsortium/ITK/blob/f8b17356cecf1611894e0be25b2c3d9284646889/Modules/Video/BridgeOpenCV/CMakeLists.txt#L9-L22 The first two are CMake code that gets called when another module or library uses your module. The second two add to the header search directories or library search directories (-I and -L) when building code in your module or against your module. If your module creates a library, link to the dependent libraries in src/CMakeLists.txt: https://github.com/InsightSoftwareConsortium/ITK/blob/f8b17356cecf1611894e0be25b2c3d9284646889/Modules/Video/BridgeOpenCV/src/CMakeLists.txt#L8 HTH, Matt On Wed, Apr 13, 2016 at 7:16 PM, DVigneault wrote: > All-- > > I have an external ITK module ITK/src/Modules/External/ITKDVUtilities/. > Additionally, I have written a group of classes which depend on VNL and > LAPACK (subroutines which do not ship with VNL). I've tested them in a > project outside the ITK source tree linking against LAPACK. I'd now like to > use these classes in my ITK module, but am unclear on how to link my module > against LAPACK. Adding target_link_libraries(${itk-module} > ${LAPACK-LIBRARIES}) to ITKDVUtilities/CMakeLists.txt gives me the following > CMake configuration error: > > CMake Error at Modules/External/ITKDVUtilities/CMakeLists.txt:15 > (target_link_libraries): > Cannot specify link libraries for target "ITKDVUtilities" which is not > built by this project. > > But, of course, if I leave it out, I get a linker error: > > Undefined symbols for architecture x86_64: > "_dgees_", referenced from: > vnl_schur_decomposition::solve() in > ITKDVUtilitiesHeaderTest1.cxx.o > "_sgees_", referenced from: > vnl_schur_decomposition::solve() in > ITKDVUtilitiesHeaderTest1.cxx.o > ld: symbol(s) not found for architecture x86_64 > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > make[2]: *** [bin/ITKDVUtilitiesHeaderTest1] Error 1 > make[1]: *** > [Modules/External/ITKDVUtilities/CMakeFiles/ITKDVUtilitiesHeaderTest1.dir/all] > Error 2 > make: *** [all] Error 2 > > I've pasted below the full text of > ITK/srs/Modules/External/ITKDVUtilities/CMakeLists.txt. Thanks very much in > advance for your help! > > Best, > > --Davis > > # ITK/srs/Modules/External/ITKDVUtilities/CMakeLists.txt > cmake_minimum_required(VERSION 2.8.9) > > project(ITKDVUtilities) > > find_package(LAPACK REQUIRED) > > if(NOT ITK_SOURCE_DIR) > find_package(ITK REQUIRED) > list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) > include(ITKModuleExternal) > else() > itk_module_impl() > endif() > > #target_link_libraries(${itk-module} ${LAPACK-LIBRARIES}) > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Linking-an-external-ITK-module-against-LAPACK-tp7588734.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From cyril.mory at uclouvain.be Thu Apr 14 08:09:10 2016 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Thu, 14 Apr 2016 14:09:10 +0200 Subject: [ITK-users] Interpolation, Requested Region, and periodic signals Message-ID: <570F8866.3080700@uclouvain.be> Hi ITK users, I am computing 4D images of the breathing thorax. The first 3 dimensions are the spatial ones, the last one is the respiratory phase (breathing is considered periodic). At some point in the algorithm, I have to interpolate a 4D sequence of volumes along the phase dimension to create a 3D volume. I use a custom interpolation filter, not the ITK one, with the GenerateData implemented in CUDA (I work on RTK, a library based on ITK that has support for CUDA). I would like to request only the required data for this interpolation, in order to avoid keeping the whole 4D sequence in GPU memory. Most of the time, the two 3D volumes between which I need to interpolate are consecutive in the 4D sequence, so it is easy to write a GenerateInputRequestedRegion() that requests a 4D region of size 2 on the fourth dimension. But when interpolating between the last and the first 3D volumes of the sequence (remember : breathing is periodic), the only ITK::ImageRegion that contains them both is the whole 4D sequence. I would like to avoid loading the whole 4D sequence. Any suggestions on how I could do that ? Best regards, Cyril From tevain at telecom-paristech.fr Thu Apr 14 08:35:52 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Thu, 14 Apr 2016 14:35:52 +0200 (CEST) Subject: [ITK-users] [ITK] Interpolation, Requested Region, and periodic signals In-Reply-To: <570F8866.3080700@uclouvain.be> References: <570F8866.3080700@uclouvain.be> Message-ID: <1701366676.36842546.1460637352031.JavaMail.zimbra@enst.fr> Hi Cyril, I have no insights about your memory management/requirements, but what about cloning the first "3D slice" (i.e. the first volume) and append it to your temporal sequence ? The 4D image would be [X,Y,Z,T+1] and computing between the end and the start of your cycle would be the same as any other step. HTH; Tim ----- Mail original ----- De: "Cyril Mory" ?: "Insight Users" Envoy?: Jeudi 14 Avril 2016 14:09:10 Objet: [ITK] [ITK-users] Interpolation, Requested Region, and periodic signals Hi ITK users, I am computing 4D images of the breathing thorax. The first 3 dimensions are the spatial ones, the last one is the respiratory phase (breathing is considered periodic). At some point in the algorithm, I have to interpolate a 4D sequence of volumes along the phase dimension to create a 3D volume. I use a custom interpolation filter, not the ITK one, with the GenerateData implemented in CUDA (I work on RTK, a library based on ITK that has support for CUDA). I would like to request only the required data for this interpolation, in order to avoid keeping the whole 4D sequence in GPU memory. Most of the time, the two 3D volumes between which I need to interpolate are consecutive in the 4D sequence, so it is easy to write a GenerateInputRequestedRegion() that requests a 4D region of size 2 on the fourth dimension. But when interpolating between the last and the first 3D volumes of the sequence (remember : breathing is periodic), the only ITK::ImageRegion that contains them both is the whole 4D sequence. I would like to avoid loading the whole 4D sequence. Any suggestions on how I could do that ? Best regards, Cyril _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From blowekamp at mail.nih.gov Thu Apr 14 09:26:29 2016 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 14 Apr 2016 09:26:29 -0400 Subject: [ITK-users] Interpolation, Requested Region, and periodic signals In-Reply-To: <570F8866.3080700@uclouvain.be> References: <570F8866.3080700@uclouvain.be> Message-ID: <2182E945-FACA-4F73-8BB6-5CBD7684F6B8@mail.nih.gov> Hello, I think the simplest thing to do would be just to ?pad? you time series appropriately. You would just need to append the first image to the back. I think the WrapPadImageFilter should be able to do this. HTH, Brad > On Apr 14, 2016, at 8:09 AM, Cyril Mory wrote: > > Hi ITK users, > > I am computing 4D images of the breathing thorax. The first 3 dimensions are the spatial ones, the last one is the respiratory phase (breathing is considered periodic). At some point in the algorithm, I have to interpolate a 4D sequence of volumes along the phase dimension to create a 3D volume. I use a custom interpolation filter, not the ITK one, with the GenerateData implemented in CUDA (I work on RTK, a library based on ITK that has support for CUDA). > > I would like to request only the required data for this interpolation, in order to avoid keeping the whole 4D sequence in GPU memory. Most of the time, the two 3D volumes between which I need to interpolate are consecutive in the 4D sequence, so it is easy to write a GenerateInputRequestedRegion() that requests a 4D region of size 2 on the fourth dimension. > But when interpolating between the last and the first 3D volumes of the sequence (remember : breathing is periodic), the only ITK::ImageRegion that contains them both is the whole 4D sequence. I would like to avoid loading the whole 4D sequence. > > Any suggestions on how I could do that ? > > Best regards, > Cyril > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK 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 14 12:08:27 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 14 Apr 2016 12:08:27 -0400 Subject: [ITK-users] [ANN] ITK 4.9.1 has been released! Message-ID: On behalf of the Insight Toolkit Community, we are happy to announce the release of ITK 4.9.1! Release files can be downloaded from: http://itk.org/ITK/resources/software.html This is a patch release that fixes critical issues, regressions, documentation, and compiler support. This release fixes builds against system HDF5 1.8.16. It also avoids clobbering VTK_LIBRARIES in certain cases when mixing a project that uses both ITK and VTK. Resource servers that provide testing data and build tools at build time now only support the HTTPS protocol; HTTP support has been removed. This requires SSL support in the CMake binary used to build ITK. Enjoy ITK! Changes from v4.9.0 to v4.9.1: Bradley Lowekamp (3): BUG: Adding missing const qualifier for GetConfusionMatrix method BUG: Use LargestPossible region for BSpline domain BUG: Remove errant file Matthew McCormick (8): BUG: Remove Azure ExternalData resource. BUG: ExternalData downloads from midas3.kitware.com only supports https. BUG: slicer.kitware.com/midas3/ ExternalData will not support http. BUG: midas3.kitware.com only supports the https protocol. COMP: Do not specify COMPONENTS with find_package(VTK. COMP: Build against system HDF5 1.8.16. COMP: Make initial HDF5 discovery of 1.8.16 quiet. ENH: Bump CMakeLists.txt version 4.9.1. Michka Popoff (1): ENH: Wrap RayCastInterpolateImageFunction From samah.bouzidi at gmail.com Thu Apr 14 13:22:18 2016 From: samah.bouzidi at gmail.com (samah) Date: Thu, 14 Apr 2016 10:22:18 -0700 (MST) Subject: [ITK-users] eigen vectors in SymmetricEigenAnalysis Message-ID: <1460654538562-7588740.post@n2.nabble.com> hi ITK users, When eigen values are ordered using SetOrderEigenMagnitudes ( |lambda_1| < |lambda_2| < ..... ), are eigen vectors olso ordered ? so the first row of the eigen vectors matrix is the eigen vector of lambda_1. Here is the code : typedef itk::SymmetricEigenAnalysis< MatrixType, VectorType, MatrixType > SymmetricEigenAnalysisType; SymmetricEigenAnalysisType symmetricEigenSystem(3); SymmetricEigenAnalysisType.SetOrderEigenMagnitudes( true ); symmetricEigenSystem.ComputeEigenValuesAndVectors ( YourMatrix, eigenValues, eigenVectors ); Best regards, -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/eigen-vectors-in-SymmetricEigenAnalysis-tp7588740.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From fethallah at gmail.com Thu Apr 14 16:57:38 2016 From: fethallah at gmail.com (Fethallah Benmansour) Date: Thu, 14 Apr 2016 22:57:38 +0200 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> <22B5DFA9-2658-46A5-8E07-0907FEB611BD@gmail.com> Message-ID: Hi there, Any chance to get it to work on a Redhat 6.3 ? The current blocker is yacc, which I couldn't install with yum (EPEL enabled). Thanks, -- Fethallah On Mon, Apr 11, 2016 at 5:14 PM, Bradley Lowekamp wrote: > Hello, > > We have R tested with SimpleITK on a number of systems each night. And > this morning we have run the tests on several systems, and it is running > and passing OK, this was with what every old R version was on the systems > > We should focus on getting the tests to pass on your system first. It?s a > good sign that you can run the AddCommand with the sitk::Command class. > Does the rest of the R tests pass when you run ctest? > > I am still suspicious you are not running the latest development version. > What is the git hash you are using? > > As you were digging into the SimpleITK R code you were on the right track > with the ProccessObject::AddCommand and the sitk::Command class. The other > two parts you are missing is the RCommand C++ class [1], and the overridden > ProcessObject::AddCommand method [2]. These were recently added to > SimpleITK since the 0.9 release. You can see that the added procedure wraps > the passed callable, into the RCommand class. > > HTH, > Brad > > > [1] > https://github.com/SimpleITK/SimpleITK/blob/master/Wrapping/R/sitkRCommand.h > [2] > https://github.com/SimpleITK/SimpleITK/blob/2ffffba589b24465a09eed1303bbffd6fe3fe18e/Wrapping/R/R.i#L565-L589 > > On Apr 11, 2016, at 3:59 AM, Mathew Guilfoyle > wrote: > > I tried running the code below as suggested - both in RStudio and the > terminal - and get the same abort/segfault error. > > Which version of R are you running? - I can install an older version to > see if it works. > > On 11 Apr 2016, at 01:02, Richard Beare wrote: > > This is a long shot, but lets try testing whether it is the R garbage > collection causing issues. Modify the test so that every method call result > is assigned to a different variable: > > e.g. > > a1 <- gaussian$SetVariance(2) > a2 <- gaussian$AddCommand( 'sitkStartEvent', f1 ) > a3 <- gaussian$AddCommand( 'sitkEndEvent', f2 ) > > I was running in a terminal on my mac, with an older version of R. > > > On Mon, Apr 11, 2016 at 9:56 AM, Mathew Guilfoyle > wrote: > >> Richard >> >> It seems it must be something specific to my setup. I ran your example >> and get the same hard abort in Rstudio. Running the example in R.app I get >> the same error but a somewhat more graceful crash with the following error >> message: >> >> gaussian$AddCommand( 'sitkStartEvent', f1 ) >> >> *** caught segfault *** >> address 0x7ff511000080, cause 'memory not mapped' >> >> Traceback: >> 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, >> as.logical(.copy), PACKAGE = "SimpleITK") >> 2: f(x, ...) >> 3: gaussian$AddCommand("sitkStartEvent", f1) >> >> Possible actions: >> 1: abort (with core dump, if enabled) >> 2: normal R exit >> 3: exit R without saving workspace >> 4: exit R saving workspace >> >> I have tried the version of SimpleITK built without the version of SWIG >> you patched to correct the character argument error, again I get the same >> behaviour. >> >> Bradley - I?m using the latest SimpleITK 0.9 source compiled using the >> super build on OS X 10.11. I?ve done the build with the supplied SWIG and >> with a version patched by Richard and available here: >> https://github.com/richardbeare/swig.git. I?m funning R 3.2.4 in >> Rstudio IDE. >> >> >> >> On 10 Apr 2016, at 23:17, Bradley Lowekamp wrote: >> >> Hello, >> >> I would like to know your environment. >> >> What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's >> super build? If not what version of SWIG? >> >> Thanks >> >> On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle >> wrote: >> >> Richard >> >> Thanks for the reply. I hadn't appreciated that function being passed in >> the registration example was a closure. However, in the >> FiterProgressReporting example it is not a closure. >> >> I have modified my code to be a closure but still get a crash/abort; I >> have also run the code in the examples themselves verbatim and get the same >> problem. >> >> Any further ideas on how to get this working? >> >> Cheers >> >> >> On 10 Apr 2016, at 02:10, Mathew Guilfoyle wrote: >> >> There seems to be a problem with using the $AddCommand function to >> ImageRegistrationMethod objects in the R wrapping to SimpleITK. >> >> Using R 3.2.4 on OS X 10.11 >> >> Example: >> >> f <- function(x){print(x$GetMetricValue())} >> >> registration = ImageRegistrationMethod() >> >> registration$AddCommand(?sitkIterationEvent?, f(registration)) >> >> This last line causes R to abort/hard crash (no error message). This >> behaviour is irrespective of which event type I use or the function passed >> as the second argument (e.g. even something simple like print(?Hello?)) >> >> The AddCommand method is inherited from the SimpleITK ProcessObject >> type. Digging around in the SimpleITK.R file I can see that the >> ProcessObject$AddCommand method expects a second argument of type >> ?_p_itk__simple__Command?. >> >> There is a ?Command? method that generates a new object of type >> ?_p_itk__simple__Command?. If I pass this resulting object as the second >> argument to registration$AddCommand then I do not get an error. However, >> there doesn?t seem to be any way to point the ?_p_itk__simple__Command? >> object to my function or otherwise convert my function to a >> ?_p_itk__simple__Command? type. >> >> The $AddCommand method is used in a couple of example scripts on the >> SimpleITK site (using it for monitoring a registration and a filter e.g. >> https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) >> so I don?t know if it was working previously and a bug has been introduced >> more recently? (the example scripts cause the same error when I run them >> now) >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 richard.beare at gmail.com Thu Apr 14 17:26:23 2016 From: richard.beare at gmail.com (Richard Beare) Date: Fri, 15 Apr 2016 07:26:23 +1000 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> <22B5DFA9-2658-46A5-8E07-0907FEB611BD@gmail.com> Message-ID: You ought to be OK with bison - can you get that? The latest version of simpleitk on the github site have support for building swig from github,so you can avoid the manual build. On all the systems I've tested it is bison that appears to be used in the early stages of swig building. On Fri, Apr 15, 2016 at 6:57 AM, Fethallah Benmansour wrote: > Hi there, > > Any chance to get it to work on a Redhat 6.3 ? > The current blocker is yacc, which I couldn't install with yum (EPEL > enabled). > > Thanks, > > -- > Fethallah > > On Mon, Apr 11, 2016 at 5:14 PM, Bradley Lowekamp > wrote: > >> Hello, >> >> We have R tested with SimpleITK on a number of systems each night. And >> this morning we have run the tests on several systems, and it is running >> and passing OK, this was with what every old R version was on the systems >> >> We should focus on getting the tests to pass on your system first. It?s a >> good sign that you can run the AddCommand with the sitk::Command class. >> Does the rest of the R tests pass when you run ctest? >> >> I am still suspicious you are not running the latest development version. >> What is the git hash you are using? >> >> As you were digging into the SimpleITK R code you were on the right track >> with the ProccessObject::AddCommand and the sitk::Command class. The other >> two parts you are missing is the RCommand C++ class [1], and the overridden >> ProcessObject::AddCommand method [2]. These were recently added to >> SimpleITK since the 0.9 release. You can see that the added procedure wraps >> the passed callable, into the RCommand class. >> >> HTH, >> Brad >> >> >> [1] >> https://github.com/SimpleITK/SimpleITK/blob/master/Wrapping/R/sitkRCommand.h >> [2] >> https://github.com/SimpleITK/SimpleITK/blob/2ffffba589b24465a09eed1303bbffd6fe3fe18e/Wrapping/R/R.i#L565-L589 >> >> On Apr 11, 2016, at 3:59 AM, Mathew Guilfoyle >> wrote: >> >> I tried running the code below as suggested - both in RStudio and the >> terminal - and get the same abort/segfault error. >> >> Which version of R are you running? - I can install an older version to >> see if it works. >> >> On 11 Apr 2016, at 01:02, Richard Beare wrote: >> >> This is a long shot, but lets try testing whether it is the R garbage >> collection causing issues. Modify the test so that every method call result >> is assigned to a different variable: >> >> e.g. >> >> a1 <- gaussian$SetVariance(2) >> a2 <- gaussian$AddCommand( 'sitkStartEvent', f1 ) >> a3 <- gaussian$AddCommand( 'sitkEndEvent', f2 ) >> >> I was running in a terminal on my mac, with an older version of R. >> >> >> On Mon, Apr 11, 2016 at 9:56 AM, Mathew Guilfoyle >> wrote: >> >>> Richard >>> >>> It seems it must be something specific to my setup. I ran your example >>> and get the same hard abort in Rstudio. Running the example in R.app I get >>> the same error but a somewhat more graceful crash with the following error >>> message: >>> >>> gaussian$AddCommand( 'sitkStartEvent', f1 ) >>> >>> *** caught segfault *** >>> address 0x7ff511000080, cause 'memory not mapped' >>> >>> Traceback: >>> 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, >>> as.logical(.copy), PACKAGE = "SimpleITK") >>> 2: f(x, ...) >>> 3: gaussian$AddCommand("sitkStartEvent", f1) >>> >>> Possible actions: >>> 1: abort (with core dump, if enabled) >>> 2: normal R exit >>> 3: exit R without saving workspace >>> 4: exit R saving workspace >>> >>> I have tried the version of SimpleITK built without the version of SWIG >>> you patched to correct the character argument error, again I get the same >>> behaviour. >>> >>> Bradley - I?m using the latest SimpleITK 0.9 source compiled using the >>> super build on OS X 10.11. I?ve done the build with the supplied SWIG and >>> with a version patched by Richard and available here: >>> https://github.com/richardbeare/swig.git. I?m funning R 3.2.4 in >>> Rstudio IDE. >>> >>> >>> >>> On 10 Apr 2016, at 23:17, Bradley Lowekamp wrote: >>> >>> Hello, >>> >>> I would like to know your environment. >>> >>> What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's >>> super build? If not what version of SWIG? >>> >>> Thanks >>> >>> On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle >>> wrote: >>> >>> Richard >>> >>> Thanks for the reply. I hadn't appreciated that function being passed >>> in the registration example was a closure. However, in the >>> FiterProgressReporting example it is not a closure. >>> >>> I have modified my code to be a closure but still get a crash/abort; I >>> have also run the code in the examples themselves verbatim and get the same >>> problem. >>> >>> Any further ideas on how to get this working? >>> >>> Cheers >>> >>> >>> On 10 Apr 2016, at 02:10, Mathew Guilfoyle >>> wrote: >>> >>> There seems to be a problem with using the $AddCommand function to >>> ImageRegistrationMethod objects in the R wrapping to SimpleITK. >>> >>> Using R 3.2.4 on OS X 10.11 >>> >>> Example: >>> >>> f <- function(x){print(x$GetMetricValue())} >>> >>> registration = ImageRegistrationMethod() >>> >>> registration$AddCommand(?sitkIterationEvent?, f(registration)) >>> >>> This last line causes R to abort/hard crash (no error message). This >>> behaviour is irrespective of which event type I use or the function passed >>> as the second argument (e.g. even something simple like print(?Hello?)) >>> >>> The AddCommand method is inherited from the SimpleITK ProcessObject >>> type. Digging around in the SimpleITK.R file I can see that the >>> ProcessObject$AddCommand method expects a second argument of type >>> ?_p_itk__simple__Command?. >>> >>> There is a ?Command? method that generates a new object of type >>> ?_p_itk__simple__Command?. If I pass this resulting object as the second >>> argument to registration$AddCommand then I do not get an error. However, >>> there doesn?t seem to be any way to point the ?_p_itk__simple__Command? >>> object to my function or otherwise convert my function to a >>> ?_p_itk__simple__Command? type. >>> >>> The $AddCommand method is used in a couple of example scripts on the >>> SimpleITK site (using it for monitoring a registration and a filter e.g. >>> https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) >>> so I don?t know if it was working previously and a bug has been introduced >>> more recently? (the example scripts cause the same error when I run them >>> now) >>> >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 fethallah at gmail.com Fri Apr 15 09:15:56 2016 From: fethallah at gmail.com (Fethallah Benmansour) Date: Fri, 15 Apr 2016 15:15:56 +0200 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> <22B5DFA9-2658-46A5-8E07-0907FEB611BD@gmail.com> Message-ID: Thanks Richard. Followed your advice and found my way. The example script works like a charm :-) Are all the itk filters now callable from R, or just a subset ? how can I know this ? Thanks for all the great effort. -- Fethallah On Thu, Apr 14, 2016 at 11:26 PM, Richard Beare wrote: > You ought to be OK with bison - can you get that? > > The latest version of simpleitk on the github site have support for > building swig from github,so you can avoid the manual build. On all the > systems I've tested it is bison that appears to be used in the early stages > of swig building. > > On Fri, Apr 15, 2016 at 6:57 AM, Fethallah Benmansour > wrote: > >> Hi there, >> >> Any chance to get it to work on a Redhat 6.3 ? >> The current blocker is yacc, which I couldn't install with yum (EPEL >> enabled). >> >> Thanks, >> >> -- >> Fethallah >> >> On Mon, Apr 11, 2016 at 5:14 PM, Bradley Lowekamp >> wrote: >> >>> Hello, >>> >>> We have R tested with SimpleITK on a number of systems each night. And >>> this morning we have run the tests on several systems, and it is running >>> and passing OK, this was with what every old R version was on the systems >>> >>> We should focus on getting the tests to pass on your system first. It?s >>> a good sign that you can run the AddCommand with the sitk::Command class. >>> Does the rest of the R tests pass when you run ctest? >>> >>> I am still suspicious you are not running the latest development >>> version. What is the git hash you are using? >>> >>> As you were digging into the SimpleITK R code you were on the right >>> track with the ProccessObject::AddCommand and the sitk::Command class. The >>> other two parts you are missing is the RCommand C++ class [1], and the >>> overridden ProcessObject::AddCommand method [2]. These were recently added >>> to SimpleITK since the 0.9 release. You can see that the added procedure >>> wraps the passed callable, into the RCommand class. >>> >>> HTH, >>> Brad >>> >>> >>> [1] >>> https://github.com/SimpleITK/SimpleITK/blob/master/Wrapping/R/sitkRCommand.h >>> [2] >>> https://github.com/SimpleITK/SimpleITK/blob/2ffffba589b24465a09eed1303bbffd6fe3fe18e/Wrapping/R/R.i#L565-L589 >>> >>> On Apr 11, 2016, at 3:59 AM, Mathew Guilfoyle >>> wrote: >>> >>> I tried running the code below as suggested - both in RStudio and the >>> terminal - and get the same abort/segfault error. >>> >>> Which version of R are you running? - I can install an older version to >>> see if it works. >>> >>> On 11 Apr 2016, at 01:02, Richard Beare wrote: >>> >>> This is a long shot, but lets try testing whether it is the R garbage >>> collection causing issues. Modify the test so that every method call result >>> is assigned to a different variable: >>> >>> e.g. >>> >>> a1 <- gaussian$SetVariance(2) >>> a2 <- gaussian$AddCommand( 'sitkStartEvent', f1 ) >>> a3 <- gaussian$AddCommand( 'sitkEndEvent', f2 ) >>> >>> I was running in a terminal on my mac, with an older version of R. >>> >>> >>> On Mon, Apr 11, 2016 at 9:56 AM, Mathew Guilfoyle >> > wrote: >>> >>>> Richard >>>> >>>> It seems it must be something specific to my setup. I ran your example >>>> and get the same hard abort in Rstudio. Running the example in R.app I get >>>> the same error but a somewhat more graceful crash with the following error >>>> message: >>>> >>>> gaussian$AddCommand( 'sitkStartEvent', f1 ) >>>> >>>> *** caught segfault *** >>>> address 0x7ff511000080, cause 'memory not mapped' >>>> >>>> Traceback: >>>> 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, >>>> as.logical(.copy), PACKAGE = "SimpleITK") >>>> 2: f(x, ...) >>>> 3: gaussian$AddCommand("sitkStartEvent", f1) >>>> >>>> Possible actions: >>>> 1: abort (with core dump, if enabled) >>>> 2: normal R exit >>>> 3: exit R without saving workspace >>>> 4: exit R saving workspace >>>> >>>> I have tried the version of SimpleITK built without the version of SWIG >>>> you patched to correct the character argument error, again I get the same >>>> behaviour. >>>> >>>> Bradley - I?m using the latest SimpleITK 0.9 source compiled using the >>>> super build on OS X 10.11. I?ve done the build with the supplied SWIG and >>>> with a version patched by Richard and available here: >>>> https://github.com/richardbeare/swig.git. I?m funning R 3.2.4 in >>>> Rstudio IDE. >>>> >>>> >>>> >>>> On 10 Apr 2016, at 23:17, Bradley Lowekamp wrote: >>>> >>>> Hello, >>>> >>>> I would like to know your environment. >>>> >>>> What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's >>>> super build? If not what version of SWIG? >>>> >>>> Thanks >>>> >>>> On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle >>>> wrote: >>>> >>>> Richard >>>> >>>> Thanks for the reply. I hadn't appreciated that function being passed >>>> in the registration example was a closure. However, in the >>>> FiterProgressReporting example it is not a closure. >>>> >>>> I have modified my code to be a closure but still get a crash/abort; I >>>> have also run the code in the examples themselves verbatim and get the same >>>> problem. >>>> >>>> Any further ideas on how to get this working? >>>> >>>> Cheers >>>> >>>> >>>> On 10 Apr 2016, at 02:10, Mathew Guilfoyle >>>> wrote: >>>> >>>> There seems to be a problem with using the $AddCommand function to >>>> ImageRegistrationMethod objects in the R wrapping to SimpleITK. >>>> >>>> Using R 3.2.4 on OS X 10.11 >>>> >>>> Example: >>>> >>>> f <- function(x){print(x$GetMetricValue())} >>>> >>>> registration = ImageRegistrationMethod() >>>> >>>> registration$AddCommand(?sitkIterationEvent?, f(registration)) >>>> >>>> This last line causes R to abort/hard crash (no error message). This >>>> behaviour is irrespective of which event type I use or the function passed >>>> as the second argument (e.g. even something simple like print(?Hello?)) >>>> >>>> The AddCommand method is inherited from the SimpleITK ProcessObject >>>> type. Digging around in the SimpleITK.R file I can see that the >>>> ProcessObject$AddCommand method expects a second argument of type >>>> ?_p_itk__simple__Command?. >>>> >>>> There is a ?Command? method that generates a new object of type >>>> ?_p_itk__simple__Command?. If I pass this resulting object as the second >>>> argument to registration$AddCommand then I do not get an error. However, >>>> there doesn?t seem to be any way to point the ?_p_itk__simple__Command? >>>> object to my function or otherwise convert my function to a >>>> ?_p_itk__simple__Command? type. >>>> >>>> The $AddCommand method is used in a couple of example scripts on the >>>> SimpleITK site (using it for monitoring a registration and a filter e.g. >>>> https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) >>>> so I don?t know if it was working previously and a bug has been introduced >>>> more recently? (the example scripts cause the same error when I run them >>>> now) >>>> >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the 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 brad at lowekamp.net Fri Apr 15 09:55:44 2016 From: brad at lowekamp.net (Bradley Lowekamp) Date: Fri, 15 Apr 2016 09:55:44 -0400 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> <22B5DFA9-2658-46A5-8E07-0907FEB611BD@gmail.com> Message-ID: <671E9CDB-E3C8-429A-83AF-46007F2218CC@lowekamp.net> Hi! Glad to hear you go it working. SimpleITK wraps the majority of ITK?s image filters, it is however not a complete instantiation of all of ITK. If you find that there are missing filters or functionality that you need please post. Enjoy! Brad > On Apr 15, 2016, at 9:15 AM, Fethallah Benmansour > wrote: > > Thanks Richard. > Followed your advice and found my way. The example script works like a charm :-) > Are all the itk filters now callable from R, or just a subset ? how can I know this ? > Thanks for all the great effort. > > -- > Fethallah > > > On Thu, Apr 14, 2016 at 11:26 PM, Richard Beare > wrote: > You ought to be OK with bison - can you get that? > > The latest version of simpleitk on the github site have support for building swig from github,so you can avoid the manual build. On all the systems I've tested it is bison that appears to be used in the early stages of swig building. > > On Fri, Apr 15, 2016 at 6:57 AM, Fethallah Benmansour > wrote: > Hi there, > > Any chance to get it to work on a Redhat 6.3 ? > The current blocker is yacc, which I couldn't install with yum (EPEL enabled). > > Thanks, > > -- > Fethallah > > On Mon, Apr 11, 2016 at 5:14 PM, Bradley Lowekamp > wrote: > Hello, > > We have R tested with SimpleITK on a number of systems each night. And this morning we have run the tests on several systems, and it is running and passing OK, this was with what every old R version was on the systems > > We should focus on getting the tests to pass on your system first. It?s a good sign that you can run the AddCommand with the sitk::Command class. Does the rest of the R tests pass when you run ctest? > > I am still suspicious you are not running the latest development version. What is the git hash you are using? > > As you were digging into the SimpleITK R code you were on the right track with the ProccessObject::AddCommand and the sitk::Command class. The other two parts you are missing is the RCommand C++ class [1], and the overridden ProcessObject::AddCommand method [2]. These were recently added to SimpleITK since the 0.9 release. You can see that the added procedure wraps the passed callable, into the RCommand class. > > HTH, > Brad > > > [1] https://github.com/SimpleITK/SimpleITK/blob/master/Wrapping/R/sitkRCommand.h > [2] https://github.com/SimpleITK/SimpleITK/blob/2ffffba589b24465a09eed1303bbffd6fe3fe18e/Wrapping/R/R.i#L565-L589 > >> On Apr 11, 2016, at 3:59 AM, Mathew Guilfoyle > wrote: >> >> I tried running the code below as suggested - both in RStudio and the terminal - and get the same abort/segfault error. >> >> Which version of R are you running? - I can install an older version to see if it works. >> >>> On 11 Apr 2016, at 01:02, Richard Beare > wrote: >>> >>> This is a long shot, but lets try testing whether it is the R garbage collection causing issues. Modify the test so that every method call result is assigned to a different variable: >>> >>> e.g. >>> >>> a1 <- gaussian$SetVariance(2) >>> a2 <- gaussian$AddCommand( 'sitkStartEvent', f1 ) >>> a3 <- gaussian$AddCommand( 'sitkEndEvent', f2 ) >>> >>> I was running in a terminal on my mac, with an older version of R. >>> >>> >>> On Mon, Apr 11, 2016 at 9:56 AM, Mathew Guilfoyle > wrote: >>> Richard >>> >>> It seems it must be something specific to my setup. I ran your example and get the same hard abort in Rstudio. Running the example in R.app I get the same error but a somewhat more graceful crash with the following error message: >>> >>> gaussian$AddCommand( 'sitkStartEvent', f1 ) >>> >>> *** caught segfault *** >>> address 0x7ff511000080, cause 'memory not mapped' >>> >>> Traceback: >>> 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, as.logical(.copy), PACKAGE = "SimpleITK") >>> 2: f(x, ...) >>> 3: gaussian$AddCommand("sitkStartEvent", f1) >>> >>> Possible actions: >>> 1: abort (with core dump, if enabled) >>> 2: normal R exit >>> 3: exit R without saving workspace >>> 4: exit R saving workspace >>> >>> I have tried the version of SimpleITK built without the version of SWIG you patched to correct the character argument error, again I get the same behaviour. >>> >>> Bradley - I?m using the latest SimpleITK 0.9 source compiled using the super build on OS X 10.11. I?ve done the build with the supplied SWIG and with a version patched by Richard and available here: https://github.com/richardbeare/swig.git . I?m funning R 3.2.4 in Rstudio IDE. >>> >>> >>> >>>> On 10 Apr 2016, at 23:17, Bradley Lowekamp > wrote: >>>> >>>> Hello, >>>> >>>> I would like to know your environment. >>>> >>>> What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's super build? If not what version of SWIG? >>>> >>>> Thanks >>>> >>>>> On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle > wrote: >>>>> >>>>> Richard >>>>> >>>>> Thanks for the reply. I hadn't appreciated that function being passed in the registration example was a closure. However, in the FiterProgressReporting example it is not a closure. >>>>> >>>>> I have modified my code to be a closure but still get a crash/abort; I have also run the code in the examples themselves verbatim and get the same problem. >>>>> >>>>> Any further ideas on how to get this working? >>>>> >>>>> Cheers >>>>> >>>>> >>>>>> On 10 Apr 2016, at 02:10, Mathew Guilfoyle > wrote: >>>>>> >>>>>> There seems to be a problem with using the $AddCommand function to ImageRegistrationMethod objects in the R wrapping to SimpleITK. >>>>>> >>>>>> Using R 3.2.4 on OS X 10.11 >>>>>> >>>>>> Example: >>>>>> >>>>>> f <- function(x){print(x$GetMetricValue())} >>>>>> >>>>>> registration = ImageRegistrationMethod() >>>>>> >>>>>> registration$AddCommand(?sitkIterationEvent?, f(registration)) >>>>>> >>>>>> This last line causes R to abort/hard crash (no error message). This behaviour is irrespective of which event type I use or the function passed as the second argument (e.g. even something simple like print(?Hello?)) >>>>>> >>>>>> The AddCommand method is inherited from the SimpleITK ProcessObject type. Digging around in the SimpleITK.R file I can see that the ProcessObject$AddCommand method expects a second argument of type ?_p_itk__simple__Command?. >>>>>> >>>>>> There is a ?Command? method that generates a new object of type ?_p_itk__simple__Command?. If I pass this resulting object as the second argument to registration$AddCommand then I do not get an error. However, there doesn?t seem to be any way to point the ?_p_itk__simple__Command? object to my function or otherwise convert my function to a ?_p_itk__simple__Command? type. >>>>>> >>>>>> The $AddCommand method is used in a couple of example scripts on the SimpleITK site (using it for monitoring a registration and a filter e.g. https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R ) so I don?t know if it was working previously and a bug has been introduced more recently? (the example scripts cause the same error when I run them now) >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the 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 karolkc at gmail.com Fri Apr 15 13:37:47 2016 From: karolkc at gmail.com (karolkc) Date: Fri, 15 Apr 2016 10:37:47 -0700 (MST) Subject: [ITK-users] Counting the number of pixels with specific color Message-ID: <1460741867082-37028.post@n7.nabble.com> Hello, I would like to ask if there is a function in ITK that could count the number of pixels with specific color. I have already used Region Growing filter for segmentation, then I created an image containing white pixels on black background presenting my segmented region. Now I'd like to calculate the volume of this region. The simplest way is just to calculate the number of white pixels. But how? Do you have any ideas or suggestions? Best Regards! -- View this message in context: http://itk-users.7.n7.nabble.com/Counting-the-number-of-pixels-with-specific-color-tp37028.html Sent from the ITK - Users mailing list archive at Nabble.com. From tevain at telecom-paristech.fr Fri Apr 15 16:11:50 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Fri, 15 Apr 2016 22:11:50 +0200 (CEST) Subject: [ITK-users] [ITK] Counting the number of pixels with specific color In-Reply-To: <1460741867082-37028.post@n7.nabble.com> References: <1460741867082-37028.post@n7.nabble.com> Message-ID: <950265998.38014913.1460751110549.JavaMail.zimbra@enst.fr> Hello, One simple way to do it is to use an iterator and count voxels. You could use something like: itk::ImageRegionConstIterator MyIt(MyImage,MyImage->GetLargestPossibleRegion()); MyIt.GoToBegin(); int Volume=0; while (!MyIt.IsAtEnd()) { if (MyIt.Get()==255) //Or whatever value is your white pixel { Volume+=1; } ++MyIt; } You could also use the LabelMap workflow to detect volume of different labels. HTH, Tim ----- Mail original ----- De: "karolkc" ?: insight-users at itk.org Envoy?: Vendredi 15 Avril 2016 19:37:47 Objet: [ITK] [ITK-users] Counting the number of pixels with specific color Hello, I would like to ask if there is a function in ITK that could count the number of pixels with specific color. I have already used Region Growing filter for segmentation, then I created an image containing white pixels on black background presenting my segmented region. Now I'd like to calculate the volume of this region. The simplest way is just to calculate the number of white pixels. But how? Do you have any ideas or suggestions? Best Regards! -- View this message in context: http://itk-users.7.n7.nabble.com/Counting-the-number-of-pixels-with-specific-color-tp37028.html Sent from the ITK - Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From karolkc at gmail.com Fri Apr 15 15:36:26 2016 From: karolkc at gmail.com (Oshimimu) Date: Fri, 15 Apr 2016 12:36:26 -0700 (MST) Subject: [ITK-users] [ITK] Counting the number of pixels with specific color In-Reply-To: <950265998.38014913.1460751110549.JavaMail.zimbra@enst.fr> References: <1460741867082-37028.post@n7.nabble.com> <950265998.38014913.1460751110549.JavaMail.zimbra@enst.fr> Message-ID: <1460748986309-37030.post@n7.nabble.com> Thank you. Is this approach working for 3D images? Or should I iterate slice by slice? -- View this message in context: http://itk-users.7.n7.nabble.com/Counting-the-number-of-pixels-with-specific-color-tp37028p37030.html Sent from the ITK - Users mailing list archive at Nabble.com. From tevain at telecom-paristech.fr Fri Apr 15 16:53:59 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Fri, 15 Apr 2016 22:53:59 +0200 (CEST) Subject: [ITK-users] [ITK] Counting the number of pixels with specific color In-Reply-To: <1460748986309-37030.post@n7.nabble.com> References: <1460741867082-37028.post@n7.nabble.com> <950265998.38014913.1460751110549.JavaMail.zimbra@enst.fr> <1460748986309-37030.post@n7.nabble.com> Message-ID: <359221328.38021884.1460753639568.JavaMail.zimbra@enst.fr> There is no assumption about image dimension in this approach, so it is for any image. Tim ----- Mail original ----- De: "Oshimimu" ?: insight-users at itk.org Envoy?: Vendredi 15 Avril 2016 21:36:26 Objet: Re: [ITK] [ITK-users] Counting the number of pixels with specific color Thank you. Is this approach working for 3D images? Or should I iterate slice by slice? -- View this message in context: http://itk-users.7.n7.nabble.com/Counting-the-number-of-pixels-with-specific-color-tp37028p37030.html Sent from the ITK - Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From richard.beare at gmail.com Fri Apr 15 17:44:59 2016 From: richard.beare at gmail.com (Richard Beare) Date: Sat, 16 Apr 2016 07:44:59 +1000 Subject: [ITK-users] (R wrapping/SimpleITK) AddCommand to ImageRegistrationMethod bug In-Reply-To: <671E9CDB-E3C8-429A-83AF-46007F2218CC@lowekamp.net> References: <00258485-BE9F-433E-B9C4-1FABDC71AC8C@gmail.com> <2892D7B0-9D72-43B4-8A82-B90E47EB8384@gmail.com> <22B5DFA9-2658-46A5-8E07-0907FEB611BD@gmail.com> <671E9CDB-E3C8-429A-83AF-46007F2218CC@lowekamp.net> Message-ID: Also, we're working on the help for the R side, but it will also be a translation of the C++ documentation, which is thus the canonical list. Check that doc out at http://www.itk.org/SimpleITKDoxygen09/html/classes.html A high proportion of those classes are available via the wrappers. On Fri, Apr 15, 2016 at 11:55 PM, Bradley Lowekamp wrote: > Hi! > > Glad to hear you go it working. > > SimpleITK wraps the majority of ITK?s image filters, it is however not a > complete instantiation of all of ITK. If you find that there are missing > filters or functionality that you need please post. > > Enjoy! > Brad > > On Apr 15, 2016, at 9:15 AM, Fethallah Benmansour > wrote: > > Thanks Richard. > Followed your advice and found my way. The example script works like a > charm :-) > Are all the itk filters now callable from R, or just a subset ? how can I > know this ? > Thanks for all the great effort. > > -- > Fethallah > > > On Thu, Apr 14, 2016 at 11:26 PM, Richard Beare > wrote: > >> You ought to be OK with bison - can you get that? >> >> The latest version of simpleitk on the github site have support for >> building swig from github,so you can avoid the manual build. On all the >> systems I've tested it is bison that appears to be used in the early stages >> of swig building. >> >> On Fri, Apr 15, 2016 at 6:57 AM, Fethallah Benmansour < >> fethallah at gmail.com> wrote: >> >>> Hi there, >>> >>> Any chance to get it to work on a Redhat 6.3 ? >>> The current blocker is yacc, which I couldn't install with yum (EPEL >>> enabled). >>> >>> Thanks, >>> >>> -- >>> Fethallah >>> >>> On Mon, Apr 11, 2016 at 5:14 PM, Bradley Lowekamp >>> wrote: >>> >>>> Hello, >>>> >>>> We have R tested with SimpleITK on a number of systems each night. And >>>> this morning we have run the tests on several systems, and it is running >>>> and passing OK, this was with what every old R version was on the systems >>>> >>>> We should focus on getting the tests to pass on your system first. It?s >>>> a good sign that you can run the AddCommand with the sitk::Command class. >>>> Does the rest of the R tests pass when you run ctest? >>>> >>>> I am still suspicious you are not running the latest development >>>> version. What is the git hash you are using? >>>> >>>> As you were digging into the SimpleITK R code you were on the right >>>> track with the ProccessObject::AddCommand and the sitk::Command class. The >>>> other two parts you are missing is the RCommand C++ class [1], and the >>>> overridden ProcessObject::AddCommand method [2]. These were recently added >>>> to SimpleITK since the 0.9 release. You can see that the added procedure >>>> wraps the passed callable, into the RCommand class. >>>> >>>> HTH, >>>> Brad >>>> >>>> >>>> [1] >>>> https://github.com/SimpleITK/SimpleITK/blob/master/Wrapping/R/sitkRCommand.h >>>> [2] >>>> https://github.com/SimpleITK/SimpleITK/blob/2ffffba589b24465a09eed1303bbffd6fe3fe18e/Wrapping/R/R.i#L565-L589 >>>> >>>> On Apr 11, 2016, at 3:59 AM, Mathew Guilfoyle >>>> wrote: >>>> >>>> I tried running the code below as suggested - both in RStudio and the >>>> terminal - and get the same abort/segfault error. >>>> >>>> Which version of R are you running? - I can install an older version to >>>> see if it works. >>>> >>>> On 11 Apr 2016, at 01:02, Richard Beare >>>> wrote: >>>> >>>> This is a long shot, but lets try testing whether it is the R garbage >>>> collection causing issues. Modify the test so that every method call result >>>> is assigned to a different variable: >>>> >>>> e.g. >>>> >>>> a1 <- gaussian$SetVariance(2) >>>> a2 <- gaussian$AddCommand( 'sitkStartEvent', f1 ) >>>> a3 <- gaussian$AddCommand( 'sitkEndEvent', f2 ) >>>> >>>> I was running in a terminal on my mac, with an older version of R. >>>> >>>> >>>> On Mon, Apr 11, 2016 at 9:56 AM, Mathew Guilfoyle < >>>> mrguilfoyle at gmail.com> wrote: >>>> >>>>> Richard >>>>> >>>>> It seems it must be something specific to my setup. I ran your >>>>> example and get the same hard abort in Rstudio. Running the example in >>>>> R.app I get the same error but a somewhat more graceful crash with the >>>>> following error message: >>>>> >>>>> gaussian$AddCommand( 'sitkStartEvent', f1 ) >>>>> >>>>> *** caught segfault *** >>>>> address 0x7ff511000080, cause 'memory not mapped' >>>>> >>>>> Traceback: >>>>> 1: .Call("R_swig_ProcessObject_AddCommand", self, event, cmd, >>>>> as.logical(.copy), PACKAGE = "SimpleITK") >>>>> 2: f(x, ...) >>>>> 3: gaussian$AddCommand("sitkStartEvent", f1) >>>>> >>>>> Possible actions: >>>>> 1: abort (with core dump, if enabled) >>>>> 2: normal R exit >>>>> 3: exit R without saving workspace >>>>> 4: exit R saving workspace >>>>> >>>>> I have tried the version of SimpleITK built without the version of >>>>> SWIG you patched to correct the character argument error, again I get the >>>>> same behaviour. >>>>> >>>>> Bradley - I?m using the latest SimpleITK 0.9 source compiled using the >>>>> super build on OS X 10.11. I?ve done the build with the supplied SWIG and >>>>> with a version patched by Richard and available here: >>>>> https://github.com/richardbeare/swig.git. I?m funning R 3.2.4 in >>>>> Rstudio IDE. >>>>> >>>>> >>>>> >>>>> On 10 Apr 2016, at 23:17, Bradley Lowekamp wrote: >>>>> >>>>> Hello, >>>>> >>>>> I would like to know your environment. >>>>> >>>>> What version of SimpleITK? R? OS? Compiler? Did you use simpleITK's >>>>> super build? If not what version of SWIG? >>>>> >>>>> Thanks >>>>> >>>>> On Apr 10, 2016, at 9:46 AM, Mathew Guilfoyle >>>>> wrote: >>>>> >>>>> Richard >>>>> >>>>> Thanks for the reply. I hadn't appreciated that function being passed >>>>> in the registration example was a closure. However, in the >>>>> FiterProgressReporting example it is not a closure. >>>>> >>>>> I have modified my code to be a closure but still get a crash/abort; I >>>>> have also run the code in the examples themselves verbatim and get the same >>>>> problem. >>>>> >>>>> Any further ideas on how to get this working? >>>>> >>>>> Cheers >>>>> >>>>> >>>>> On 10 Apr 2016, at 02:10, Mathew Guilfoyle >>>>> wrote: >>>>> >>>>> There seems to be a problem with using the $AddCommand function to >>>>> ImageRegistrationMethod objects in the R wrapping to SimpleITK. >>>>> >>>>> Using R 3.2.4 on OS X 10.11 >>>>> >>>>> Example: >>>>> >>>>> f <- function(x){print(x$GetMetricValue())} >>>>> >>>>> registration = ImageRegistrationMethod() >>>>> >>>>> registration$AddCommand(?sitkIterationEvent?, f(registration)) >>>>> >>>>> This last line causes R to abort/hard crash (no error message). This >>>>> behaviour is irrespective of which event type I use or the function passed >>>>> as the second argument (e.g. even something simple like print(?Hello?)) >>>>> >>>>> The AddCommand method is inherited from the SimpleITK ProcessObject >>>>> type. Digging around in the SimpleITK.R file I can see that the >>>>> ProcessObject$AddCommand method expects a second argument of type >>>>> ?_p_itk__simple__Command?. >>>>> >>>>> There is a ?Command? method that generates a new object of type >>>>> ?_p_itk__simple__Command?. If I pass this resulting object as the second >>>>> argument to registration$AddCommand then I do not get an error. However, >>>>> there doesn?t seem to be any way to point the ?_p_itk__simple__Command? >>>>> object to my function or otherwise convert my function to a >>>>> ?_p_itk__simple__Command? type. >>>>> >>>>> The $AddCommand method is used in a couple of example scripts on the >>>>> SimpleITK site (using it for monitoring a registration and a filter e.g. >>>>> https://github.com/SimpleITK/SimpleITK/blob/master/Examples/FilterProgressReporting.R) >>>>> so I don?t know if it was working previously and a bug has been introduced >>>>> more recently? (the example scripts cause the same error when I run them >>>>> now) >>>>> >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the 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 artioml at post.bgu.ac.il Sat Apr 16 03:40:23 2016 From: artioml at post.bgu.ac.il (artioml) Date: Sat, 16 Apr 2016 00:40:23 -0700 (MST) Subject: [ITK-users] Vector image deformable registration Message-ID: <1460792423106-37034.post@n7.nabble.com> Hello, I am trying to do BSplines *Deformable registration* of 2D *vector images* - each pixel is a vector with a length of 3. There is no *example* to perform such a thing. I did find a test named: *itkMeanSquaresImageToImageMetricv4VectorRegistrationTest* located at: Modules/Registration/Metricsv4/test I tried to fuse it with *DeformableRegistration4* example I have replaced the 'PixelType' from '/float/' to '/itk::Vector/'. And the metric *from:* /typedef itk::CorrelationImageToImageMetricv4 MetricType;/ *to:* /typedef itk::VectorImageToImageMetricTraitsv4< ImageType, ImageType, ImageType, vectorLength, double > MetricTraitsType; typedef itk::MeanSquaresImageToImageMetricv4< ImageType, ImageType, ImageType, double, MetricTraitsType > MetricType;/ When I try to compile it I get long error list. The first error *dump is here bellow*. Do you have any idea what I did wrong? /In file included from /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Core/Common/include/itkLightObject.h:21:0, from /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Core/Common/include/itkObject.h:31, from /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Core/Common/include/itkDataObject.h:31, from /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Core/Common/include/itkProcessObject.h:31, from /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h:21, from /home/art/SourceCode/InsightToolkit-4.8.2/Examples/ArtTest/VectorRegistration.cxx:1: /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Core/Common/include/itkConceptChecking.h: In instantiation of ?struct itk::Concept::IsFloatingPoint >?: /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Registration/Metricsv4/include/itkDefaultImageToImageMetricTraitsv4.h:146:3: required from ?class itk::DefaultImageToImageMetricTraitsv4, 2u>, itk::Image, 2u>, itk::Image, 2u>, double>? /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h:291:60: required from ?class itk::ImageToImageMetricv4, 2u>, itk::Image, 2u>, itk::Image, 2u>, double, itk::DefaultImageToImageMetricTraitsv4, 2u>, itk::Image, 2u>, itk::Image, 2u>, double> >? /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h:184:71: required from ?class itk::ImageRegistrationMethodv4, 2u>, itk::Image, 2u> >? /home/art/SourceCode/InsightToolkit-4.8.2/Examples/ArtTest/VectorRegistration.cxx:104:21: required from here /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Core/Common/include/itkMacro.h:699:53: error: ?is_integer? is not a member of ?itk::NumericTraits >? #define itkStaticConstMacro(name, type, value) enum { name = value } ^ /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Core/Common/include/itkConceptChecking.h:782:3: note: in expansion of macro ?itkStaticConstMacro? itkStaticConstMacro(Integral, bool, NumericTraits< T >::is_integer); ^ /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Core/Common/include/itkMacro.h:699:53: error: ?is_exact? is not a member of ?itk::NumericTraits >? #define itkStaticConstMacro(name, type, value) enum { name = value } ^ /home/art/SourceCode/InsightToolkit-4.8.2/Modules/Core/Common/include/itkConceptChecking.h:783:3: note: in expansion of macro ?itkStaticConstMacro? itkStaticConstMacro(IsExact, bool, NumericTraits< T >::is_exact);/ -- View this message in context: http://itk-users.7.n7.nabble.com/Vector-image-deformable-registration-tp37034.html Sent from the ITK - Users mailing list archive at Nabble.com. From artioml at post.bgu.ac.il Sun Apr 17 00:54:26 2016 From: artioml at post.bgu.ac.il (artioml) Date: Sat, 16 Apr 2016 21:54:26 -0700 (MST) Subject: [ITK-users] Vector image deformable registration In-Reply-To: <1460792423106-37034.post@n7.nabble.com> References: <1460792423106-37034.post@n7.nabble.com> Message-ID: <1460868866870-37035.post@n7.nabble.com> I solved the problem. Because I need to calculate a metric on a Vector image I have used /MetricTraitsType/. But the class /ImageRegistrationMethod/ doesn't take /MetricTraitsType/ as part of its template. It defines an internal /ImageToImageMetric/ without the trait. So instead of using the registration method I did it directly with metric and optimization method - Just as it implemented in the test named /itkMeanSquaresImageToImageMetricv4RegistrationTest2/. I think a possible fix for the /ImageRegistrationMethod/ would be to add /MetricTraitsType/ to its template definition. *From:* /template< typename TFixedImage, typename TMovingImage >/ *To:* /template>/ And then just define the /ImageToImageMetricv4/ with this generics. -- View this message in context: http://itk-users.7.n7.nabble.com/Vector-image-deformable-registration-tp37034p37035.html Sent from the ITK - Users mailing list archive at Nabble.com. From piotpia124 at student.polsl.pl Sun Apr 17 09:11:59 2016 From: piotpia124 at student.polsl.pl (Piotr Piasecki) Date: Sun, 17 Apr 2016 15:11:59 +0200 Subject: [ITK-users] itk::simple::Image from stream Message-ID: Dear Sir or Madam. I am a student in Biomedical Engineering at the Silesian University of Technology. During my studies I worked with ITK and SimpleITK in C#. I wanted to use them in my current project, but I have an important question. Is there a possibility to create object of itk::simple::Image class from stream or byte array, not by using ImageFileReader? If there is no such possibility in SimpleITK in C#, is it possible in native ITK? I will be very grateful for any answer. Best regards. Peter. From brad at lowekamp.net Sun Apr 17 10:29:14 2016 From: brad at lowekamp.net (Bradley Lowekamp) Date: Sun, 17 Apr 2016 10:29:14 -0400 Subject: [ITK-users] itk::simple::Image from stream In-Reply-To: References: Message-ID: <04A556D7-5B04-4538-BF93-B87EC493AAA2@mail.nih.gov> I think this example is what you are looking for: http://www.itk.org/SimpleITKDoxygen/html/ImageGetBuffer_8cs-example.html > On Apr 17, 2016, at 9:11 AM, Piotr Piasecki wrote: > > Dear Sir or Madam. > > I am a student in Biomedical Engineering at the Silesian University of Technology. During my studies I worked with ITK and SimpleITK in C#. I wanted to use them in my current project, but I have an important question. Is there a possibility to create object of itk::simple::Image class from stream or byte array, not by using ImageFileReader? If there is no such possibility in SimpleITK in C#, is it possible in native ITK? > > I will be very grateful for any answer. > > Best regards. > > Peter. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From piotpia124 at student.polsl.pl Sun Apr 17 12:18:21 2016 From: piotpia124 at student.polsl.pl (Piotr Piasecki) Date: Sun, 17 Apr 2016 18:18:21 +0200 Subject: [ITK-users] itk::simple::Image from stream In-Reply-To: <04A556D7-5B04-4538-BF93-B87EC493AAA2@mail.nih.gov> References: <04A556D7-5B04-4538-BF93-B87EC493AAA2@mail.nih.gov> Message-ID: Thank you for your answer. Unfortunately, it seems to me that's not what I meant. This example shows how to get buffer from itk.simple.Image and have access to pixel values. To create an object SimpleITK.ReadImage method is used. In my problem, I receive DICOM file from REST Api and I got it as a System.IO.Stream in my code. I need to create itk.simple.Image from that stream, because I do not want to save the file on local disk, and then load it again using ImageFileReader or SimpleITK.ReadImage. Regards. 2016-04-17 16:29 GMT+02:00 Bradley Lowekamp : > I think this example is what you are looking for: > > http://www.itk.org/SimpleITKDoxygen/html/ImageGetBuffer_8cs-example.html > > > On Apr 17, 2016, at 9:11 AM, Piotr Piasecki > wrote: > > > > Dear Sir or Madam. > > > > I am a student in Biomedical Engineering at the Silesian University of > Technology. During my studies I worked with ITK and SimpleITK in C#. I > wanted to use them in my current project, but I have an important question. > Is there a possibility to create object of itk::simple::Image class from > stream or byte array, not by using ImageFileReader? If there is no such > possibility in SimpleITK in C#, is it possible in native ITK? > > > > I will be very grateful for any answer. > > > > Best regards. > > > > Peter. > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the 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 vincent-magnotta at uiowa.edu Sun Apr 17 12:33:46 2016 From: vincent-magnotta at uiowa.edu (Magnotta, Vincent A) Date: Sun, 17 Apr 2016 16:33:46 +0000 Subject: [ITK-users] itk::simple::Image from stream In-Reply-To: References: <04A556D7-5B04-4538-BF93-B87EC493AAA2@mail.nih.gov> Message-ID: <0BC4AACF-1D51-4AD6-AD06-D6729FE6B6BC@uiowa.edu> This is probably the example that you are looking for. http://www.itk.org/SimpleITKDoxygen/html/BufferImportExport_8cxx-example.html Vince -- Associate Professor Department of Radiology L311 PBDB 169 Newton Road Iowa City, IA 52242 E-mail: vincent-magnotta at uiowa.edu Phone: 319-335-5482 Fax: 319-353-6275 Website: http://www.healthcare.uiowa.edu/Radiology From: Insight-users > on behalf of Piotr Piasecki > Date: Sunday, April 17, 2016 at 11:18 AM To: Bradley Lowekamp > Cc: "insight-users at itk.org" > Subject: Re: [ITK-users] itk::simple::Image from stream Thank you for your answer. Unfortunately, it seems to me that's not what I meant. This example shows how to get buffer from itk.simple.Image and have access to pixel values. To create an object SimpleITK.ReadImage method is used. In my problem, I receive DICOM file from REST Api and I got it as a System.IO.Stream in my code. I need to create itk.simple.Image from that stream, because I do not want to save the file on local disk, and then load it again using ImageFileReader or SimpleITK.ReadImage. Regards. 2016-04-17 16:29 GMT+02:00 Bradley Lowekamp >: I think this example is what you are looking for: http://www.itk.org/SimpleITKDoxygen/html/ImageGetBuffer_8cs-example.html > On Apr 17, 2016, at 9:11 AM, Piotr Piasecki > wrote: > > Dear Sir or Madam. > > I am a student in Biomedical Engineering at the Silesian University of Technology. During my studies I worked with ITK and SimpleITK in C#. I wanted to use them in my current project, but I have an important question. Is there a possibility to create object of itk::simple::Image class from stream or byte array, not by using ImageFileReader? If there is no such possibility in SimpleITK in C#, is it possible in native ITK? > > I will be very grateful for any answer. > > Best regards. > > Peter. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 suneezahanif02 at gmail.com Mon Apr 18 08:37:55 2016 From: suneezahanif02 at gmail.com (suneeza hanif) Date: Mon, 18 Apr 2016 14:37:55 +0200 Subject: [ITK-users] 3D Registration Message-ID: Hello Everyone, I would like to know is there any way that instead of optimizing 6 parameters of VersorRigid3DTranform we can optimize only 4? Thanks. Best Regards, Suneeza -------------- next part -------------- An HTML attachment was scrubbed... URL: From 2389127171 at qq.com Mon Apr 18 09:00:24 2016 From: 2389127171 at qq.com (=?gb18030?B?QXBhbnRhcg==?=) Date: Mon, 18 Apr 2016 21:00:24 +0800 Subject: [ITK-users] Pruning algorithm in tree structure Message-ID: Hi? I have a binary skeleton of an airway tree but there are many false branches on the centerline . So I wonder if there is a filter in Itk which would be used to pruning the skeleton of the airway tree. Thanks Best Regards, EVEN DUAN -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Mon Apr 18 09:09:17 2016 From: matimontg at gmail.com (Matias Montroull) Date: Mon, 18 Apr 2016 13:09:17 +0000 Subject: [ITK-users] 3D Registration In-Reply-To: References: Message-ID: Why would you optimize 4 and not 6? El lun., 18 de abr. de 2016 a la(s) 09:38, suneeza hanif < suneezahanif02 at gmail.com> escribi?: > Hello Everyone, > > I would like to know is there any way that instead of optimizing 6 > parameters of VersorRigid3DTranform we can optimize only 4? > > Thanks. > > Best Regards, > Suneeza > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Mon Apr 18 09:30:17 2016 From: matimontg at gmail.com (Matias Montroull) Date: Mon, 18 Apr 2016 13:30:17 +0000 Subject: [ITK-users] 3D Registration In-Reply-To: References: Message-ID: I think you can still use the 6 parameters and simply tell ITK not to translate the Z axis. the default matrix values I think are 1 0 0 0 1 0 0 0 1 so if you don't modify the Z values then it will not rotate Z I would think El lun., 18 de abr. de 2016 a la(s) 10:17, suneeza hanif < suneezahanif02 at gmail.com> escribi?: > Hello Matias, > > Thank you for your reply. > > Actually, I want to optimize translation in x and y direction while > rotation along x and z-axis. > > I do not want translation along z-axis. > > Can you suggest any solution of this? > > Best Regards, > Suneeza > > On Mon, Apr 18, 2016 at 3:09 PM, Matias Montroull > wrote: > >> Why would you optimize 4 and not 6? >> >> El lun., 18 de abr. de 2016 a la(s) 09:38, suneeza hanif < >> suneezahanif02 at gmail.com> escribi?: >> >>> Hello Everyone, >>> >>> I would like to know is there any way that instead of optimizing 6 >>> parameters of VersorRigid3DTranform we can optimize only 4? >>> >>> Thanks. >>> >>> Best Regards, >>> Suneeza >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >> -- >> Matias >> > > -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From suneezahanif02 at gmail.com Mon Apr 18 09:44:20 2016 From: suneezahanif02 at gmail.com (suneeza hanif) Date: Mon, 18 Apr 2016 15:44:20 +0200 Subject: [ITK-users] 3D Registration In-Reply-To: References: Message-ID: Thanks a lot for your suggestions. I will try both of these approaches and will post again. :) Best Regards, Suneeza On Mon, Apr 18, 2016 at 3:35 PM, Tobias Gass wrote: > It might be a better idea to modify the parameter scaling of the transform > so that the parameters are difficult to change for the optimizer. > > 2016-04-18 15:30 GMT+02:00 Matias Montroull : > >> I think you can still use the 6 parameters and simply tell ITK not to >> translate the Z axis. the default matrix values I think are 1 0 0 0 1 0 0 0 >> 1 so if you don't modify the Z values then it will not rotate Z I would >> think >> >> El lun., 18 de abr. de 2016 a la(s) 10:17, suneeza hanif < >> suneezahanif02 at gmail.com> escribi?: >> >>> Hello Matias, >>> >>> Thank you for your reply. >>> >>> Actually, I want to optimize translation in x and y direction while >>> rotation along x and z-axis. >>> >>> I do not want translation along z-axis. >>> >>> Can you suggest any solution of this? >>> >>> Best Regards, >>> Suneeza >>> >>> On Mon, Apr 18, 2016 at 3:09 PM, Matias Montroull >>> wrote: >>> >>>> Why would you optimize 4 and not 6? >>>> >>>> El lun., 18 de abr. de 2016 a la(s) 09:38, suneeza hanif < >>>> suneezahanif02 at gmail.com> escribi?: >>>> >>>>> Hello Everyone, >>>>> >>>>> I would like to know is there any way that instead of optimizing 6 >>>>> parameters of VersorRigid3DTranform we can optimize only 4? >>>>> >>>>> Thanks. >>>>> >>>>> Best Regards, >>>>> Suneeza >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>>> -- >>>> Matias >>>> >>> >>> -- >> 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 bakkari.abdelkhalek at hotmail.fr Mon Apr 18 11:09:38 2016 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Mon, 18 Apr 2016 16:09:38 +0100 Subject: [ITK-users] [ITK] Cerebral Spinal Fluid Extraction from 3D Image In-Reply-To: References: , Message-ID: "Segmented Dicom Image" = I segmented MRI Images using superpixels algorithm. Abdelkhalek BakkariPh.D candidate in Computer ScienceInstitute of Applied Computer ScienceLodz University of Technology, Poland From: dzenanz at gmail.com Date: Tue, 29 Mar 2016 11:04:41 -0400 Subject: Re: [ITK] [ITK-users] Cerebral Spinal Fluid Extraction from 3D Image To: bakkari.abdelkhalek at hotmail.fr CC: insight-users at itk.org Hi Abdelkhalek, what do you mean by "Segmented Dicom Image"? How is it segmented? If it is unsegmented (as I suspect), it is not really trivial. What is the imaging modality, CT or MRI (and which sequence)? Your question is simply too open-ended to give a useful answer. Regards,D?enan On Fri, Mar 25, 2016 at 5:23 PM, Abdelkhalek Bakkari wrote: Hi ! I would like to extract the CSF (Cerebral Spinal Fluid) from a 3D Segmented Dicom Image (.dcm) using ITK. Any help ! Any suggestion ! please. Best regards, Abdelkhalek BakkariPh.D candidate in Computer ScienceInstitute of Applied Computer ScienceLodz University of Technology, Poland _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Mon Apr 18 14:17:18 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 18 Apr 2016 14:17:18 -0400 Subject: [ITK-users] Vector image deformable registration In-Reply-To: <1460868866870-37035.post@n7.nabble.com> References: <1460792423106-37034.post@n7.nabble.com> <1460868866870-37035.post@n7.nabble.com> Message-ID: Hello, An example for vector image registration based off itkMeanSquaresImageToImageMetricv4VectorRegistrationTest is in progress here: http://review.source.kitware.com/#/c/20922/ The itk::VectorImageToImageMetricTraitsv4 only works with the ITKv4 registration framework; the itk::ImageRegistrationMethod class is part of the ITKv3 registration framework. Classes that work together with the ITKv4 framework have "v4" at the end of their name. Hope this helps, Matt On Sun, Apr 17, 2016 at 12:54 AM, artioml wrote: > I solved the problem. Because I need to calculate a metric on a Vector image > I have used /MetricTraitsType/. > But the class /ImageRegistrationMethod/ doesn't take /MetricTraitsType/ as > part of its template. It defines an internal /ImageToImageMetric/ without > the trait. > > So instead of using the registration method I did it directly with metric > and optimization method - Just as it implemented in the test named > /itkMeanSquaresImageToImageMetricv4RegistrationTest2/. > > I think a possible fix for the /ImageRegistrationMethod/ would be to add > /MetricTraitsType/ to its template definition. > *From:* > /template< typename TFixedImage, typename TMovingImage >/ > *To:* > /template = TFixedImage, > typename TInternalComputationValueType = double, > typename TMetricTraits = DefaultImageToImageMetricTraitsv4< > TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType >>/ > > And then just define the /ImageToImageMetricv4/ with this generics. > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/Vector-image-deformable-registration-tp37034p37035.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 abenchaaben at histalim.com Tue Apr 19 09:23:00 2016 From: abenchaaben at histalim.com (abenchaaben) Date: Tue, 19 Apr 2016 06:23:00 -0700 (MST) Subject: [ITK-users] ImageSeriesReader memory allocation for large datasets Message-ID: <1461072180629-7588763.post@n2.nabble.com> I have tested some more data sets (png,jpeg) on different systems, but the result is always the same. As soon as the number of slices gets too high, the memory allocation fails. Does the ImageSeriesReader dont handel big data? Does anyone have an idea how this problem can be fixed? Thanks, Assil -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ImageSeriesReader-memory-allocation-for-large-datasets-tp7588763.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From dzenanz at gmail.com Tue Apr 19 09:42:52 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 19 Apr 2016 09:42:52 -0400 Subject: [ITK-users] [ITK] Cerebral Spinal Fluid Extraction from 3D Image In-Reply-To: References: Message-ID: Hi Abdelkhalek, applying superpixels to an image hardly counts as segmentation. It can be thought of as a first step in some segmentation method. You can think of it as a step to reduce the resolution of your data in a meaningful way, so your method can run faster. But superpixels is not segmentation. Hence, you still end up with an open-ended question of how to segment CSF. Regards On Mon, Apr 18, 2016 at 11:09 AM, Abdelkhalek Bakkari < bakkari.abdelkhalek at hotmail.fr> wrote: > "Segmented Dicom Image" = I segmented MRI Images using superpixels > algorithm. > > > > Abdelkhalek Bakkari > Ph.D candidate in Computer Science > Institute of Applied Computer Science > Lodz University of Technology, Poland > > > > > ------------------------------ > From: dzenanz at gmail.com > Date: Tue, 29 Mar 2016 11:04:41 -0400 > Subject: Re: [ITK] [ITK-users] Cerebral Spinal Fluid Extraction from 3D > Image > To: bakkari.abdelkhalek at hotmail.fr > CC: insight-users at itk.org > > > Hi Abdelkhalek, > > what do you mean by "Segmented Dicom Image"? How is it segmented? If it is > unsegmented (as I suspect), it is not really trivial. What is the imaging > modality, CT or MRI (and which sequence)? Your question is simply too > open-ended to give a useful answer. > > Regards, > D?enan > > On Fri, Mar 25, 2016 at 5:23 PM, Abdelkhalek Bakkari < > bakkari.abdelkhalek at hotmail.fr> wrote: > > Hi ! > > I would like to extract the CSF (Cerebral Spinal Fluid) from a 3D > Segmented Dicom Image (.dcm) using ITK. > > Any help ! Any suggestion ! please. > > Best regards, > > > Abdelkhalek Bakkari > Ph.D candidate in Computer Science > Institute of Applied Computer Science > Lodz University of Technology, Poland > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Tue Apr 19 10:03:55 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 19 Apr 2016 10:03:55 -0400 Subject: [ITK-users] ImageSeriesReader memory allocation for large datasets In-Reply-To: <1461072180629-7588763.post@n2.nabble.com> References: <1461072180629-7588763.post@n2.nabble.com> Message-ID: Hi Assil, To limit memory usage, stream the pipeline. See these examples: http://www.itk.org/Doxygen/html/Examples_2IO_2VisibleHumanStreamReadWrite_8cxx-example.html http://itk.org/ITKExamples/src/Core/Common/StreamAPipeline/Documentation.html HTH, Matt On Tue, Apr 19, 2016 at 9:23 AM, abenchaaben wrote: > I have tested some more data sets (png,jpeg) on different systems, but the > result is always the same. As > soon as the number of slices gets too high, the memory allocation fails. > Does the ImageSeriesReader dont handel big data? > > Does anyone have an idea how this problem can be fixed? > > Thanks, > > Assil > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ImageSeriesReader-memory-allocation-for-large-datasets-tp7588763.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From abenchaaben at histalim.com Tue Apr 19 10:18:09 2016 From: abenchaaben at histalim.com (abenchaaben) Date: Tue, 19 Apr 2016 07:18:09 -0700 (MST) Subject: [ITK-users] ImageSeriesReader memory allocation for large datasets In-Reply-To: References: <1461072180629-7588763.post@n2.nabble.com> Message-ID: <1461075489936-7588766.post@n2.nabble.com> Thank you Matt. I will try this. Regards. Assil -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ImageSeriesReader-memory-allocation-for-large-datasets-tp7588763p7588766.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From dzenanz at gmail.com Tue Apr 19 10:27:10 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 19 Apr 2016 10:27:10 -0400 Subject: [ITK-users] Pruning algorithm in tree structure In-Reply-To: References: Message-ID: Hi Apantar, your description of the problem is not detailed enough (how about some screenshot? what are false branches on the centerline), and seems very open ended to give specific recommendation. Do you expect some algorithm which takes into account the underlying image, or just works with binary image? The latter seems like a either a very hard or a very easy problem. And the first seems like an ordinary airway extraction. Regards, D?enan On Mon, Apr 18, 2016 at 9:00 AM, Apantar <2389127171 at qq.com> wrote: > Hi? > I have a binary skeleton of an airway tree but there are many false > branches on the centerline . So I wonder if there > is a filter in Itk which would be used to pruning the skeleton of the > airway tree. > > Thanks > Best Regards, > EVEN DUAN > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Wed Apr 20 11:32:46 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 20 Apr 2016 11:32:46 -0400 Subject: [ITK-users] Pruning algorithm in tree structure In-Reply-To: References: Message-ID: Hi Apantar, now the problem is clear to me. I would go about it like this: For each branch point calculate the distance from root, depth of left branch and depth of right branch. If depth of one branch is much smaller (<5%) than the other, eliminate it as noise. If you have diameter of the airway at each segment of the tree, you can use it for even better results: divide depth of each branch with the thickness at the branching point, and if it is <1.5 thicknesses it is noise. Depth of branch=length of the deepest subbranch. Regards, D?enan On Tue, Apr 19, 2016 at 10:39 PM, Apantar <2389127171 at qq.com> wrote: > Hi D?enan, > > Thanks for your reply. Now I get a already segmented airway tree and it is > binary. Moreover, I get a binary skeleton of this airway tree. > The airway tree and the skeleton are shown in the email attachment > respectively. As shown in the picture of skeleton, there are many > small branches which are caused by the noise or cavities on the main > trachea. When your compare the airway tree with the skeleton, you may found > this small > branches on the main trachea are not the real part of the skeleton. So > what can I do to prun this small branches. > > Regards, > Apantar > ------------------ ???? ------------------ > *???:* "D?enan Zuki?";; > *????:* 2016?4?19?(???) ??10:27 > *???:* "Apantar"<2389127171 at qq.com>; > *??:* "insight-users"; > *??:* Re: [ITK-users] Pruning algorithm in tree structure > > Hi Apantar, > > your description of the problem is not detailed enough (how about some > screenshot? what are false branches on the centerline), and seems very open > ended to give specific recommendation. Do you expect some algorithm which > takes into account the underlying image, or just works with binary image? > The latter seems like a either a very hard or a very easy problem. And the > first seems like an ordinary airway extraction. > > Regards, > D?enan > > On Mon, Apr 18, 2016 at 9:00 AM, Apantar <2389127171 at qq.com> wrote: > >> Hi? >> I have a binary skeleton of an airway tree but there are many false >> branches on the centerline . So I wonder if there >> is a filter in Itk which would be used to pruning the skeleton of the >> airway tree. >> >> Thanks >> Best Regards, >> EVEN DUAN >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 piotpia124 at student.polsl.pl Wed Apr 20 17:51:17 2016 From: piotpia124 at student.polsl.pl (Piotr Piasecki) Date: Wed, 20 Apr 2016 23:51:17 +0200 Subject: [ITK-users] itk::simple::Image from stream In-Reply-To: <0BC4AACF-1D51-4AD6-AD06-D6729FE6B6BC@uiowa.edu> References: <04A556D7-5B04-4538-BF93-B87EC493AAA2@mail.nih.gov> <0BC4AACF-1D51-4AD6-AD06-D6729FE6B6BC@uiowa.edu> Message-ID: Thank you very much for your answer. It is really useful example which allows to create object of itk.simple.Image class from byte array. Unfortunately, it does not solve my problem. This method works only when in byte array are only values of pixels. I tested it and, because I have full .dcm file in my byte array and I have no possibility to extract pixel-data from it, this ImportImage Filter does not work. I'm still looking how to receive just the pixel values, but maybe there is some way to force some filter, so that he will read an image from a stream or byte array, as if he loads it from location on disk? Regards, Peter. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.giord at gmail.com Thu Apr 21 05:52:33 2016 From: marco.giord at gmail.com (marco giordano) Date: Thu, 21 Apr 2016 11:52:33 +0200 Subject: [ITK-users] Linking problem with ITK 4.8 and VTK 6.2 Message-ID: Dear ITK Users, I am experiencing a linking problem when I try to build a project using ITK and VTK. I use MS Visual Studio 2013 on Windows 7, Cmake 3.2.2, ITK 4.8, and VTK 6.2. Basically in my Cmake file I use "FIND_PACKAGE(ITK REQUIRED)" and "FIND_PACKAGE(VTK 6.2)" then configure, generate the project file and build it, however the compiler complains the he can not find "vtkCommonCore.lib" whereas that library is in "D:\vtk\vtk-bin-6v2\lib\Debug\vtkCommonCore-6.2.lib" so he is not looking for the right version and in the right place. I repeated the procedure excluding VTK both from the cmake file and from the code and it is still complaining he can not find "vtkCommonCore.lib" so I assume that ITK is trying to load VTK and link the wrong VTK library. I checked in VS Properties->Configuration->Linker->Input->Dependencies and no matter what i change in cmake it is always linking to the wrong libraries "vtk.lib" so i always have to change those manually. Please let me know if you have suggestions how to solve this. Regards, Marco -- Marco Giordano SKYPE:marcogiord81 -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Apr 21 09:17:41 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 21 Apr 2016 09:17:41 -0400 Subject: [ITK-users] Linking problem with ITK 4.8 and VTK 6.2 In-Reply-To: References: Message-ID: Hi Marco, Please use ITK 4.9.1 where this issue has been resolved. Thanks, Matt On Thu, Apr 21, 2016 at 5:52 AM, marco giordano wrote: > Dear ITK Users, > > I am experiencing a linking problem when I try to build a project using ITK > and VTK. I use MS Visual Studio 2013 on Windows 7, Cmake 3.2.2, ITK 4.8, and > VTK 6.2. > > Basically in my Cmake file I use "FIND_PACKAGE(ITK REQUIRED)" and > "FIND_PACKAGE(VTK 6.2)" then configure, generate the project file and build > it, however the compiler complains the he can not find "vtkCommonCore.lib" > whereas that library is in > "D:\vtk\vtk-bin-6v2\lib\Debug\vtkCommonCore-6.2.lib" so he is not looking > for the right version and in the right place. > > I repeated the procedure excluding VTK both from the cmake file and from the > code and it is still complaining he can not find "vtkCommonCore.lib" so I > assume that ITK is trying to load VTK and link the wrong VTK library. I > checked in VS Properties->Configuration->Linker->Input->Dependencies and no > matter what i change in cmake it is always linking to the wrong libraries > "vtk.lib" so i always have to change those manually. Please > let me know if you have suggestions how to solve this. > > Regards, > Marco > > > -- > Marco Giordano > SKYPE:marcogiord81 > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From dzenanz at gmail.com Thu Apr 21 09:23:14 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 21 Apr 2016 09:23:14 -0400 Subject: [ITK-users] Pruning algorithm in tree structure In-Reply-To: References: Message-ID: Hi Apantar, in which data structure is your airway skeleton? Regards On Wed, Apr 20, 2016 at 10:22 PM, Apantar <2389127171 at qq.com> wrote: > Hi D?enan, > > Thanks you very much. Your method is helpful and I can't help having a > try. But would you tell me which filter in ITK is appropriate in this > work? > > Regards, > Apantar > ------------------ ???? ------------------ > *???:* "D?enan Zuki?";; > *????:* 2016?4?20?(???) ??11:32 > *???:* "Apantar"<2389127171 at qq.com>; > *??:* "Insight-users"; > *??:* Re: [ITK-users] Pruning algorithm in tree structure > > Hi Apantar, > > now the problem is clear to me. I would go about it like this: > > For each branch point calculate the distance from root, depth of left > branch and depth of right branch. If depth of one branch is much smaller > (<5%) than the other, eliminate it as noise. If you have diameter of the > airway at each segment of the tree, you can use it for even better results: > divide depth of each branch with the thickness at the branching point, and > if it is <1.5 thicknesses it is noise. > > Depth of branch=length of the deepest subbranch. > > Regards, > D?enan > > On Tue, Apr 19, 2016 at 10:39 PM, Apantar <2389127171 at qq.com> wrote: > >> Hi D?enan, >> >> Thanks for your reply. Now I get a already segmented airway tree and it >> is binary. Moreover, I get a binary skeleton of this airway tree. >> The airway tree and the skeleton are shown in the email attachment >> respectively. As shown in the picture of skeleton, there are many >> small branches which are caused by the noise or cavities on the main >> trachea. When your compare the airway tree with the skeleton, you may found >> this small >> branches on the main trachea are not the real part of the skeleton. So >> what can I do to prun this small branches. >> >> Regards, >> Apantar >> ------------------ ???? ------------------ >> *???:* "D?enan Zuki?";; >> *????:* 2016?4?19?(???) ??10:27 >> *???:* "Apantar"<2389127171 at qq.com>; >> *??:* "insight-users"; >> *??:* Re: [ITK-users] Pruning algorithm in tree structure >> >> Hi Apantar, >> >> your description of the problem is not detailed enough (how about some >> screenshot? what are false branches on the centerline), and seems very open >> ended to give specific recommendation. Do you expect some algorithm which >> takes into account the underlying image, or just works with binary image? >> The latter seems like a either a very hard or a very easy problem. And the >> first seems like an ordinary airway extraction. >> >> Regards, >> D?enan >> >> On Mon, Apr 18, 2016 at 9:00 AM, Apantar <2389127171 at qq.com> wrote: >> >>> Hi? >>> I have a binary skeleton of an airway tree but there are many false >>> branches on the centerline . So I wonder if there >>> is a filter in Itk which would be used to pruning the skeleton of the >>> airway tree. >>> >>> Thanks >>> Best Regards, >>> EVEN DUAN >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 Thu Apr 21 09:34:14 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 21 Apr 2016 09:34:14 -0400 Subject: [ITK-users] itk::simple::Image from stream In-Reply-To: References: <04A556D7-5B04-4538-BF93-B87EC493AAA2@mail.nih.gov> <0BC4AACF-1D51-4AD6-AD06-D6729FE6B6BC@uiowa.edu> Message-ID: Hi Piotr, what first comes to mind is modifying the dicomIO class's open() method (or however it is called) and putting a memory buffer there for reading, e.g. this . If you don't want to write something to file, I don't see how you can avoid something like this. Regards, D?enan On Wed, Apr 20, 2016 at 5:51 PM, Piotr Piasecki wrote: > Thank you very much for your answer. It is really useful example which > allows to create object of itk.simple.Image class from byte array. > > Unfortunately, it does not solve my problem. This method works only when > in byte array are only values of pixels. I tested it and, because I have > full .dcm file in my byte array and I have no possibility to extract > pixel-data from it, this ImportImage Filter does not work. > > I'm still looking how to receive just the pixel values, but maybe there is > some way to force some filter, so that he will read an image from a stream > or byte array, as if he loads it from location on disk? > > Regards, > > Peter. > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Fri Apr 22 11:28:06 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 22 Apr 2016 11:28:06 -0400 Subject: [ITK-users] Pruning algorithm in tree structure In-Reply-To: References: Message-ID: Hi Apantar, that structure is not at all suitable for the algorithm I described. It first needs to be converted into a tree data structure before the algorithm I proposed can be applied to it. Starting with the root voxel of the tree, you might want to use itk iterators to manually do BFS or DFS algorithms, or use the already implemented filter for that, the FloodFillIterator . Regards On Thu, Apr 21, 2016 at 9:58 PM, Apantar <2389127171 at qq.com> wrote: > Hi D?enan, > It is so nice of you to be interested in my problem and help me like > that. The skeleton is obtained through the Matlab, > so the type of data is double , the format is '.mat' and it is stored as > a 512*512*452 volume. > > Regards > > ------------------ ???? ------------------ > *???:* "D?enan Zuki?";; > *????:* 2016?4?21?(???) ??9:23 > *???:* "Apantar"<2389127171 at qq.com>; > *??:* "Insight-users"; > *??:* Re: [ITK-users] Pruning algorithm in tree structure > > Hi Apantar, > > in which data structure is your airway skeleton? > > Regards > > On Wed, Apr 20, 2016 at 10:22 PM, Apantar <2389127171 at qq.com> wrote: > >> Hi D?enan, >> >> Thanks you very much. Your method is helpful and I can't help having a >> try. But would you tell me which filter in ITK is appropriate in this >> work? >> >> Regards, >> Apantar >> ------------------ ???? ------------------ >> *???:* "D?enan Zuki?";; >> *????:* 2016?4?20?(???) ??11:32 >> *???:* "Apantar"<2389127171 at qq.com>; >> *??:* "Insight-users"; >> *??:* Re: [ITK-users] Pruning algorithm in tree structure >> >> Hi Apantar, >> >> now the problem is clear to me. I would go about it like this: >> >> For each branch point calculate the distance from root, depth of left >> branch and depth of right branch. If depth of one branch is much smaller >> (<5%) than the other, eliminate it as noise. If you have diameter of the >> airway at each segment of the tree, you can use it for even better results: >> divide depth of each branch with the thickness at the branching point, and >> if it is <1.5 thicknesses it is noise. >> >> Depth of branch=length of the deepest subbranch. >> >> Regards, >> D?enan >> >> On Tue, Apr 19, 2016 at 10:39 PM, Apantar <2389127171 at qq.com> wrote: >> >>> Hi D?enan, >>> >>> Thanks for your reply. Now I get a already segmented airway tree and it >>> is binary. Moreover, I get a binary skeleton of this airway tree. >>> The airway tree and the skeleton are shown in the email attachment >>> respectively. As shown in the picture of skeleton, there are many >>> small branches which are caused by the noise or cavities on the main >>> trachea. When your compare the airway tree with the skeleton, you may found >>> this small >>> branches on the main trachea are not the real part of the skeleton. So >>> what can I do to prun this small branches. >>> >>> Regards, >>> Apantar >>> ------------------ ???? ------------------ >>> *???:* "D?enan Zuki?";; >>> *????:* 2016?4?19?(???) ??10:27 >>> *???:* "Apantar"<2389127171 at qq.com>; >>> *??:* "insight-users"; >>> *??:* Re: [ITK-users] Pruning algorithm in tree structure >>> >>> Hi Apantar, >>> >>> your description of the problem is not detailed enough (how about some >>> screenshot? what are false branches on the centerline), and seems very open >>> ended to give specific recommendation. Do you expect some algorithm which >>> takes into account the underlying image, or just works with binary image? >>> The latter seems like a either a very hard or a very easy problem. And the >>> first seems like an ordinary airway extraction. >>> >>> Regards, >>> D?enan >>> >>> On Mon, Apr 18, 2016 at 9:00 AM, Apantar <2389127171 at qq.com> wrote: >>> >>>> Hi? >>>> I have a binary skeleton of an airway tree but there are many false >>>> branches on the centerline . So I wonder if there >>>> is a filter in Itk which would be used to pruning the skeleton of the >>>> airway tree. >>>> >>>> Thanks >>>> Best Regards, >>>> EVEN DUAN >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the 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 luke.bloy at gmail.com Fri Apr 22 12:06:48 2016 From: luke.bloy at gmail.com (Luke Bloy) Date: Fri, 22 Apr 2016 16:06:48 +0000 Subject: [ITK-users] General Surface registration question Message-ID: Hi All, This is a somewhat general surface registration question so I apologize if its off topic, but I thought I'd see what the ITK community thinks about this problem. I'm working camera calibration problem where I'm interested in computing transforms relating the images (both 2d and 3d) from multiple fixed cameras. I have done some basic glyph/checkboard calibration but was unhappy with results. So I thought that a good option would be to use pose estimation with a known calibration phantom. So here is the question? Since I get to choose what the calibration phantom is, does anyone have any suggestions on what this phantom should look like. I'm planning on using an ICP type registration so what surface properties make for highly accurate ICP registration? Thanks for any suggestions, or even for reading all the way through :) Best, Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From glebber at gmail.com Fri Apr 22 13:09:55 2016 From: glebber at gmail.com (G) Date: Fri, 22 Apr 2016 13:09:55 -0400 Subject: [ITK-users] Exporting DICOM via SimpleITK in Python Message-ID: Good afternoon, I am a fairly new SimpleITK user and had a question about modifying and exporting DICOMs using Python. If, for example we start off with a 512x512x100 image, I would like to add a buffer zone around it with voxel values of -1000 making it a 600x600x100 image. So for example, I can import the DICOM files: import SimpleITK def importDICOM(inputLocation): reader = SimpleITK.ImageSeriesReader() filenamesDICOM = reader.GetGDCMSeriesFileNames(inputLocation) reader.SetFileNames(filenamesDICOM) image = reader.Execute() return image And I know that SimpleITK.GetArrayFromImage(image) will return a numpy array that I can manipulate to get said 600x600x100 image. After I have my 600x600x100 image I would need to update the Meta Data gotten from SimpleITK.GetMetaData() and save it back as DICOMs. I know there is a SimpleITK.WriteImage() function, however, there is no SimpleITK.SetMetaData() function so I was wondering what the best procedure would be. Grateful for your help, Gleb -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Fri Apr 22 13:14:08 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 22 Apr 2016 13:14:08 -0400 Subject: [ITK-users] General Surface registration question In-Reply-To: References: Message-ID: Hi Luke, I was thinking about something asymmetrical but generally smooth, with a few distinctive bumps to ease registration. Homeomorphic to a sphere. Something like a horse's head, with ears of different sizes and in different orientation, and with a horn on the bottom side of the head. HTH, D?enan On Fri, Apr 22, 2016 at 12:06 PM, Luke Bloy wrote: > Hi All, > > This is a somewhat general surface registration question so I apologize if > its off topic, but I thought I'd see what the ITK community thinks about > this problem. > > I'm working camera calibration problem where I'm interested in computing > transforms relating the images (both 2d and 3d) from multiple fixed > cameras. I have done some basic glyph/checkboard calibration but was > unhappy with results. So I thought that a good option would be to use pose > estimation with a known calibration phantom. > > So here is the question? Since I get to choose what the calibration > phantom is, does anyone have any suggestions on what this phantom should > look like. I'm planning on using an ICP type registration so what surface > properties make for highly accurate ICP registration? > > Thanks for any suggestions, or even for reading all the way through :) > > Best, > Luke > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 22 15:16:44 2016 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 22 Apr 2016 15:16:44 -0400 Subject: [ITK-users] Exporting DICOM via SimpleITK in Python In-Reply-To: References: Message-ID: <22D3BB52-2DA3-4F2A-9DC6-3B02EFC1D315@mail.nih.gov> Hello, In general writing out a correct DICOM series is not a ?Simple? thing to do. And requires a good bit of study into DICOM specifications. The tag in each file need to be correct copied and updated based on how you processed the image and the manipulations done. I am not a DICOM expert, but the experts I have talked to says is a lot of work and trouble. So this method is not in SimpleITK yet. Why do you want you output to be DICOM? What were you planning on putting in to the tags for the slices you create? You don?t need to go to numpy to pad your image. You can use the ConstantPadImageFilter[1] and by using the ITK filter you will maintain correct physical location of you image. That is it will correctly update the origin and offset, based on the operation performed. HTH, Brad [1] http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ConstantPadImageFilter.html > On Apr 22, 2016, at 1:09 PM, G wrote: > > Good afternoon, > > I am a fairly new SimpleITK user and had a question about modifying and exporting DICOMs using Python. > > If, for example we start off with a 512x512x100 image, I would like to add a buffer zone around it with voxel values of -1000 making it a 600x600x100 image. > > So for example, I can import the DICOM files: > > import SimpleITK > def importDICOM(inputLocation): > reader = SimpleITK.ImageSeriesReader() > filenamesDICOM = reader.GetGDCMSeriesFileNames(inputLocation) > reader.SetFileNames(filenamesDICOM) > image = reader.Execute() > return image > > And I know that SimpleITK.GetArrayFromImage(image) will return a numpy array that I can manipulate to get said 600x600x100 image. > > After I have my 600x600x100 image I would need to update the Meta Data gotten from SimpleITK.GetMetaData() and save it back as DICOMs. > > I know there is a SimpleITK.WriteImage() function, however, there is no SimpleITK.SetMetaData() function so I was wondering what the best procedure would be. > > Grateful for your help, > Gleb > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From dzenanz at gmail.com Fri Apr 22 23:30:01 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 22 Apr 2016 23:30:01 -0400 Subject: [ITK-users] Pruning algorithm in tree structure In-Reply-To: References: Message-ID: You are welcome. However, try to keep the discussion on the mailing list so people in the future could benefit from it. Regards, D?enan On Fri, Apr 22, 2016 at 11:09 PM, Apantar <2389127171 at qq.com> wrote: > Hi D?enan, > > I have realized this problem. Now I am trying to change the oringal > Image into the tree data structure by using the method you mentioned. > Anyway, thanks for your help, sincerely. > > Best regards > ------------------ ???? ------------------ > *???:* "D?enan Zuki?";; > *????:* 2016?4?22?(???) ??11:28 > *???:* "Apantar"<2389127171 at qq.com>; > *??:* "Insight-users"; > *??:* Re: [ITK-users] Pruning algorithm in tree structure > > Hi Apantar, > > that structure is not at all suitable for the algorithm I described. It > first needs to be converted into a tree data structure before the algorithm > I proposed can be applied to it. Starting with the root voxel of the tree, > you might want to use itk iterators to manually do BFS or DFS algorithms, > or use the already implemented filter for that, the FloodFillIterator > > . > > Regards > > On Thu, Apr 21, 2016 at 9:58 PM, Apantar <2389127171 at qq.com> wrote: > >> Hi D?enan, >> It is so nice of you to be interested in my problem and help me like >> that. The skeleton is obtained through the Matlab, >> so the type of data is double , the format is '.mat' and it is stored >> as a 512*512*452 volume. >> >> Regards >> >> ------------------ ???? ------------------ >> *???:* "D?enan Zuki?";; >> *????:* 2016?4?21?(???) ??9:23 >> *???:* "Apantar"<2389127171 at qq.com>; >> *??:* "Insight-users"; >> *??:* Re: [ITK-users] Pruning algorithm in tree structure >> >> Hi Apantar, >> >> in which data structure is your airway skeleton? >> >> Regards >> >> On Wed, Apr 20, 2016 at 10:22 PM, Apantar <2389127171 at qq.com> wrote: >> >>> Hi D?enan, >>> >>> Thanks you very much. Your method is helpful and I can't help having a >>> try. But would you tell me which filter in ITK is appropriate in this >>> work? >>> >>> Regards, >>> Apantar >>> ------------------ ???? ------------------ >>> *???:* "D?enan Zuki?";; >>> *????:* 2016?4?20?(???) ??11:32 >>> *???:* "Apantar"<2389127171 at qq.com>; >>> *??:* "Insight-users"; >>> *??:* Re: [ITK-users] Pruning algorithm in tree structure >>> >>> Hi Apantar, >>> >>> now the problem is clear to me. I would go about it like this: >>> >>> For each branch point calculate the distance from root, depth of left >>> branch and depth of right branch. If depth of one branch is much smaller >>> (<5%) than the other, eliminate it as noise. If you have diameter of the >>> airway at each segment of the tree, you can use it for even better results: >>> divide depth of each branch with the thickness at the branching point, and >>> if it is <1.5 thicknesses it is noise. >>> >>> Depth of branch=length of the deepest subbranch. >>> >>> Regards, >>> D?enan >>> >>> On Tue, Apr 19, 2016 at 10:39 PM, Apantar <2389127171 at qq.com> wrote: >>> >>>> Hi D?enan, >>>> >>>> Thanks for your reply. Now I get a already segmented airway tree and it >>>> is binary. Moreover, I get a binary skeleton of this airway tree. >>>> The airway tree and the skeleton are shown in the email attachment >>>> respectively. As shown in the picture of skeleton, there are many >>>> small branches which are caused by the noise or cavities on the main >>>> trachea. When your compare the airway tree with the skeleton, you may found >>>> this small >>>> branches on the main trachea are not the real part of the skeleton. So >>>> what can I do to prun this small branches. >>>> >>>> Regards, >>>> Apantar >>>> ------------------ ???? ------------------ >>>> *???:* "D?enan Zuki?";; >>>> *????:* 2016?4?19?(???) ??10:27 >>>> *???:* "Apantar"<2389127171 at qq.com>; >>>> *??:* "insight-users"; >>>> *??:* Re: [ITK-users] Pruning algorithm in tree structure >>>> >>>> Hi Apantar, >>>> >>>> your description of the problem is not detailed enough (how about some >>>> screenshot? what are false branches on the centerline), and seems very open >>>> ended to give specific recommendation. Do you expect some algorithm which >>>> takes into account the underlying image, or just works with binary image? >>>> The latter seems like a either a very hard or a very easy problem. And the >>>> first seems like an ordinary airway extraction. >>>> >>>> Regards, >>>> D?enan >>>> >>>> On Mon, Apr 18, 2016 at 9:00 AM, Apantar <2389127171 at qq.com> wrote: >>>> >>>>> Hi? >>>>> I have a binary skeleton of an airway tree but there are many false >>>>> branches on the centerline . So I wonder if there >>>>> is a filter in Itk which would be used to pruning the skeleton of the >>>>> airway tree. >>>>> >>>>> Thanks >>>>> Best Regards, >>>>> EVEN DUAN >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the 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 scorpiuni at gmail.com Tue Apr 26 05:34:29 2016 From: scorpiuni at gmail.com (Robert) Date: Tue, 26 Apr 2016 02:34:29 -0700 (MST) Subject: [ITK-users] Geodesic Shape Guidance in Python Message-ID: <1461663269360-7588780.post@n2.nabble.com> Hello, I tried to implement a segmentation algorithm with shape guidance in Python, while following a few C++ examples. I encountered 2 Problems: This Code creates a C++ Vector( shapeModeImages) containing the Modes obtained via PCA: std::vector shapeModeImages( numberOfPCAModes ); itk::NumericSeriesFileNames::Pointer fileNamesCreator = itk::NumericSeriesFileNames::New(); fileNamesCreator->SetStartIndex( 0 ); fileNamesCreator->SetEndIndex( numberOfPCAModes - 1 ); fileNamesCreator->SetSeriesFormat( argv[15] ); const std::vector & shapeModeFileNames = fileNamesCreator->GetFileNames(); for (unsigned int k = 0; k < numberOfPCAModes; ++k ) { ReaderType::Pointer shapeModeReader = ReaderType::New(); shapeModeReader->SetFileName( shapeModeFileNames[k].c_str() ); shapeModeReader->Update(); shapeModeImages[k] = shapeModeReader->GetOutput(); } shape->SetMeanImage( meanShapeReader->GetOutput() ); shape->SetPrincipalComponentImages( shapeModeImages ); I tried to write this in Python : shapeModeImages = [] fileNamesCreator = itk.NumericSeriesFileNames.New() fileNamesCreator.SetStartIndex(0) fileNamesCreator.SetEndIndex(numberOfPCAModes-1) fileNamesCreator.SetSeriesFormat('CorpusCallosumMode') shapeModelFileNames = fileNamesCreator.GetFileNames() for k in range(0, numberOfPCAModes): shapeModeReader = ReaderType.New() shapeModeReader.SetFileName(shapeModelFileNames[k]+'%s.mha' %k) shapeModeReader.Update() shapeModeImages.append(shapeModeReader.GetOutput()) But now, when I call shape.SetPrincipalComponentImages(shapeModeImages) I get the following error: TypeError: in method 'itkPCAShapeSignedDistanceFunctionD2IF2_SetPrincipalComponentImages', argument 2 of type 'std::vector< itkImageF2_Pointer,std::allocator< itkImageF2_Pointer > >' It seems like I can't use a list to pass the Images... Is there a workaround available, or simply another structure? Second thing ( I did not have a look into this yet): How do I translate this to Python? I can't see a Solution here immediately, but like I said, I did not look into this yet: ShapeFunctionType::ParametersType pcaStandardDeviations( numberOfPCAModes ); pcaStandardDeviations.Fill( 1.0 ); Thanks for any Input, Robert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From scorpiuni at gmail.com Tue Apr 26 05:48:10 2016 From: scorpiuni at gmail.com (Robert) Date: Tue, 26 Apr 2016 02:48:10 -0700 (MST) Subject: [ITK-users] Geodesic Shape Guidance in Python In-Reply-To: <1461663269360-7588780.post@n2.nabble.com> References: <1461663269360-7588780.post@n2.nabble.com> Message-ID: <1461664090333-7588781.post@n2.nabble.com> Same Problems as the second problemwith the following Code Lines: CostFunctionType::ArrayType mean( shape->GetNumberOfShapeParameters() ); CostFunctionType::ArrayType stddev( shape->GetNumberOfShapeParameters() ); mean.Fill( 0.0 ); stddev.Fill( 1.0 ); costFunction->SetShapeParameterMeans( mean ); costFunction->SetShapeParameterStandardDeviations( stddev ); OptimizerType::ScalesType scales( shape->GetNumberOfParameters() ); scales.Fill( 1.0 ); for( unsigned int k = 0; k < numberOfPCAModes; k++ ) { scales[k] = 20.0; // scales for the pca mode multiplier } scales[numberOfPCAModes] = 350.0; // scale for 2D rotation optimizer->SetScales( scales ); and a few more.... -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780p7588781.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Tue Apr 26 15:54:13 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 26 Apr 2016 15:54:13 -0400 Subject: [ITK-users] Geodesic Shape Guidance in Python In-Reply-To: <1461664090333-7588781.post@n2.nabble.com> References: <1461663269360-7588780.post@n2.nabble.com> <1461664090333-7588781.post@n2.nabble.com> Message-ID: Hi Robert, Do you have a forked version of ITK? itk::PCAShapeSignedDistanceFunction does not seem to be wrapped in ITK Git master. Instead of creating a Python list, try creating a std::vector of itk::Image itk::SmartPointers. Something like shapeModeImages = itk.vector[ImageType]() [...] shapeModelImages.append(shapeModeReader.GetOutput()) HTH, Matt On Tue, Apr 26, 2016 at 5:48 AM, Robert wrote: > Same Problems as the second problemwith the following Code Lines: > > CostFunctionType::ArrayType mean( shape->GetNumberOfShapeParameters() ); > CostFunctionType::ArrayType stddev( shape->GetNumberOfShapeParameters() ); > > mean.Fill( 0.0 ); > stddev.Fill( 1.0 ); > costFunction->SetShapeParameterMeans( mean ); > costFunction->SetShapeParameterStandardDeviations( stddev ); > > OptimizerType::ScalesType scales( shape->GetNumberOfParameters() ); > scales.Fill( 1.0 ); > for( unsigned int k = 0; k < numberOfPCAModes; k++ ) > { > scales[k] = 20.0; // scales for the pca mode multiplier > } > scales[numberOfPCAModes] = 350.0; // scale for 2D rotation > optimizer->SetScales( scales ); > > > and a few more.... > > > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780p7588781.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Tue Apr 26 16:03:11 2016 From: scorpiuni at gmail.com (Robert) Date: Tue, 26 Apr 2016 13:03:11 -0700 (MST) Subject: [ITK-users] Geodesic Shape Guidance in Python In-Reply-To: References: <1461663269360-7588780.post@n2.nabble.com> <1461664090333-7588781.post@n2.nabble.com> Message-ID: <1461700991408-7588783.post@n2.nabble.com> Hello, thanks for the reply. I actually wrapped it myself/with help from the forum. I can publish my .wrap files if it's helpful, I have a few more, all related to PCA stuff. I will have a go at the itk Vector tomorrow morning, I hope it works, I already tried around a bit with itk vectors after posting my question. What about the other problem? Is there a solution for it as well? It is currently slowing down my work significantly. This > CostFunctionType::ArrayType mean( shape->GetNumberOfShapeParameters() ); > CostFunctionType::ArrayType stddev( shape->GetNumberOfShapeParameters() ); should be solvable with something along the lines of itk.ArrayType.New(), right? I think that ArrayType is available as wrapping. But for the rest, like, > OptimizerType::ScalesType scales( shape->GetNumberOfParameters() ); > scales.Fill( 1.0 ); > for( unsigned int k = 0; k < numberOfPCAModes; k++ ) > { > scales[k] = 20.0; // scales for the pca mode multiplier > } I could not come up with anything in my mind. Basically, I'm trying to recreate the GeodesicActiveContourWithShapeGuidance example from the Handbook, and the last few lines where stuff like described above appears give me some trouble.... Thanks for any input, and have a nice evening, Robert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780p7588783.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From tevain at telecom-paristech.fr Wed Apr 27 03:48:52 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Wed, 27 Apr 2016 09:48:52 +0200 (CEST) Subject: [ITK-users] [ITK] Geodesic Shape Guidance in Python In-Reply-To: <1461700991408-7588783.post@n2.nabble.com> References: <1461663269360-7588780.post@n2.nabble.com> <1461664090333-7588781.post@n2.nabble.com> <1461700991408-7588783.post@n2.nabble.com> Message-ID: <1935104661.44815389.1461743332275.JavaMail.zimbra@enst.fr> Hi Robert, Remember that "::*****Type" are just aliases (typedef). You could always replace by the true type. Just search into the sources (e.g. GitHub). Here are the examples you needed: ShapeFunctionType::ParametersType is an itk OptimizerParameters< double > (defined in itkShapeSignedDistanceFunction.h) CostFunctionType::ArrayType is an itk Array < double > (defined in itkShapePriorMAPCostFunction.h) OptimizerType::ScalesType is an itk Array < double > (defined in itkOptimizer.h) Given that, you should be able to translate into Python. As for setting the principal component images, the method needs a std::vector input, so I think Matt's solution will work. HTH, Tim ----- Mail original ----- De: "Robert" ?: insight-users at itk.org Envoy?: Mardi 26 Avril 2016 22:03:11 Objet: Re: [ITK] [ITK-users] Geodesic Shape Guidance in Python Hello, thanks for the reply. I actually wrapped it myself/with help from the forum. I can publish my .wrap files if it's helpful, I have a few more, all related to PCA stuff. I will have a go at the itk Vector tomorrow morning, I hope it works, I already tried around a bit with itk vectors after posting my question. What about the other problem? Is there a solution for it as well? It is currently slowing down my work significantly. This > CostFunctionType::ArrayType mean( shape->GetNumberOfShapeParameters() ); > CostFunctionType::ArrayType stddev( shape->GetNumberOfShapeParameters() ); should be solvable with something along the lines of itk.ArrayType.New(), right? I think that ArrayType is available as wrapping. But for the rest, like, > OptimizerType::ScalesType scales( shape->GetNumberOfParameters() ); > scales.Fill( 1.0 ); > for( unsigned int k = 0; k < numberOfPCAModes; k++ ) > { > scales[k] = 20.0; // scales for the pca mode multiplier > } I could not come up with anything in my mind. Basically, I'm trying to recreate the GeodesicActiveContourWithShapeGuidance example from the Handbook, and the last few lines where stuff like described above appears give me some trouble.... Thanks for any input, and have a nice evening, Robert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780p7588783.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From scorpiuni at gmail.com Wed Apr 27 06:10:23 2016 From: scorpiuni at gmail.com (Robert) Date: Wed, 27 Apr 2016 03:10:23 -0700 (MST) Subject: [ITK-users] [ITK] Geodesic Shape Guidance in Python In-Reply-To: <1935104661.44815389.1461743332275.JavaMail.zimbra@enst.fr> References: <1461663269360-7588780.post@n2.nabble.com> <1461664090333-7588781.post@n2.nabble.com> <1461700991408-7588783.post@n2.nabble.com> <1935104661.44815389.1461743332275.JavaMail.zimbra@enst.fr> Message-ID: <1461751823904-7588785.post@n2.nabble.com> Hello, Many thanks for your post. I will try to implement this today,and let you knowif it works. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780p7588785.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From scorpiuni at gmail.com Wed Apr 27 06:24:47 2016 From: scorpiuni at gmail.com (Robert) Date: Wed, 27 Apr 2016 03:24:47 -0700 (MST) Subject: [ITK-users] Geodesic Shape Guidance in Python In-Reply-To: References: <1461663269360-7588780.post@n2.nabble.com> <1461664090333-7588781.post@n2.nabble.com> Message-ID: <1461752687672-7588786.post@n2.nabble.com> Hello, I tried the method with shapeModeImages = itk.vector[InternalImageType](). However, there is the following Error message: KeyError: "itkTemplate : No template [] for the std::vector class" I can't put Images inside of an itk vector. Am I doing something wrong here? -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780p7588786.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Wed Apr 27 10:23:28 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 27 Apr 2016 10:23:28 -0400 Subject: [ITK-users] Geodesic Shape Guidance in Python In-Reply-To: <1461752687672-7588786.post@n2.nabble.com> References: <1461663269360-7588780.post@n2.nabble.com> <1461664090333-7588781.post@n2.nabble.com> <1461752687672-7588786.post@n2.nabble.com> Message-ID: Hello Robert, We will need to wrap std::vector for over itk::Image. Please consider uploading your modification for code review: http://www.itk.org/Wiki/ITK/Git/Develop The community can then more easily review the code, test it, and it can be integrated into the toolkit so you can work with it in the future and others can benefit from it. As Tim suggested, resolving the typedef's determines what types of objects need to be created in Python. Another helpful tool is the Doxygen documentation for the toolkit -- it contains links for the class typedefs. If we go to the optimizer documentation: http://www.itk.org/Doxygen/html/classitk_1_1OnePlusOneEvolutionaryOptimizer.html Then click the dropdown "Public Member Functions inherited from itk::Optimizer". Then click the "ScalesType" link in "SetScales", it brings us to http://www.itk.org/Doxygen/html/classitk_1_1Optimizer.html#a4c2e8eb9d9390e0e2988e78ea094492a which says the ScalesType are an itk::Array< double > HTH, Matt On Wed, Apr 27, 2016 at 6:24 AM, Robert wrote: > Hello, > > I tried the method with shapeModeImages = itk.vector[InternalImageType](). > However, there is the following Error message: > KeyError: "itkTemplate : No template [] > for the std::vector class" > > I can't put Images inside of an itk vector. Am I doing something wrong here? > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780p7588786.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Wed Apr 27 12:38:40 2016 From: scorpiuni at gmail.com (Robert) Date: Wed, 27 Apr 2016 09:38:40 -0700 (MST) Subject: [ITK-users] Geodesic Shape Guidance in Python In-Reply-To: References: <1461663269360-7588780.post@n2.nabble.com> <1461664090333-7588781.post@n2.nabble.com> <1461752687672-7588786.post@n2.nabble.com> Message-ID: <1461775120405-7588788.post@n2.nabble.com> Hello again, How would I proceed when wrapping std::vector over itk::image? It is actually wrapped for itk.F, so there should be a wrap file somewhere around, right? Or isn't std::vector wrapped at all in the itk folder, and somewhere else? Isnt there a simpler solution with something like numpy arrays, or simply feeding the function shape.SetPrincipalComponentImages(shapeModeImages) image after image? Is SetPrincipalComponentImages() really only, exclusively accepting std::vectors...? -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780p7588788.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Thu Apr 28 00:22:48 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 28 Apr 2016 00:22:48 -0400 Subject: [ITK-users] Geodesic Shape Guidance in Python In-Reply-To: <1461775120405-7588788.post@n2.nabble.com> References: <1461663269360-7588780.post@n2.nabble.com> <1461664090333-7588781.post@n2.nabble.com> <1461752687672-7588786.post@n2.nabble.com> <1461775120405-7588788.post@n2.nabble.com> Message-ID: Hi Robert, Wrapping for std::vector currently looks to be specified in Wrapping/Generators/Python/CMakeLists.txt: https://github.com/InsightSoftwareConsortium/ITK/blob/0bbd4b573079b5c572481d62e81f17a352d12df0/Wrapping/Generators/Python/CMakeLists.txt#L675-L797 and pyBase.i: https://github.com/InsightSoftwareConsortium/ITK/blob/0bbd4b573079b5c572481d62e81f17a352d12df0/Wrapping/Generators/Python/PyBase/CMakeLists.txt#L29-L35https://github.com/InsightSoftwareConsortium/ITK/blob/0bbd4b573079b5c572481d62e81f17a352d12df0/Wrapping/Generators/Python/PyBase/pyBase.i#L735-L752 > Is SetPrincipalComponentImages() really only, exclusively accepting std::vectors...? Yes. HTH, Matt On Wed, Apr 27, 2016 at 12:38 PM, Robert wrote: > Hello again, > > How would I proceed when wrapping std::vector over itk::image? > It is actually wrapped for itk.F, so there should be a wrap file somewhere > around, right? Or isn't std::vector wrapped at all in the itk folder, and > somewhere else? > > Isnt there a simpler solution with something like numpy arrays, or simply > feeding the function > > shape.SetPrincipalComponentImages(shapeModeImages) > > image after image? Is SetPrincipalComponentImages() really only, exclusively > accepting std::vectors...? > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780p7588788.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Thu Apr 28 00:44:25 2016 From: scorpiuni at gmail.com (Robert) Date: Wed, 27 Apr 2016 21:44:25 -0700 (MST) Subject: [ITK-users] ASM/AAM/Snakes Message-ID: <1461818665415-7588790.post@n2.nabble.com> Hello again, I have one more question. I'm looking to get a program working that can automatically detect a certain shape that I provide in a 3-dimensional Volume Dataset (.nrrd). Those are (CT-) scans from the head in Python. Now, I'm only talking about DETECTION, not necessary segmentation. I looked into Geodesic Shape Guidance (my last Topic), however, here you still provide initial seeds for the segmentation, as well a mean shape and PCA Modes (used for the segmentation part). Is there any possibility to create such an algorithm with ITK that detects my shape? I know about the theory behind ASM and/or AAM, but I'm not too sure if and how this is doable with ITK. Maybe there is already some example or function that I did not find. Thanks for your time, Robert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ASM-AAM-Snakes-tp7588790.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From scorpiuni at gmail.com Thu Apr 28 01:48:56 2016 From: scorpiuni at gmail.com (Robert) Date: Wed, 27 Apr 2016 22:48:56 -0700 (MST) Subject: [ITK-users] Geodesic Shape Guidance in Python In-Reply-To: References: <1461663269360-7588780.post@n2.nabble.com> <1461664090333-7588781.post@n2.nabble.com> <1461752687672-7588786.post@n2.nabble.com> <1461775120405-7588788.post@n2.nabble.com> Message-ID: <1461822536862-7588791.post@n2.nabble.com> Hi, I understand that I need to add another line so that the parameter "t" can be an Image as well. ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vector${t}" "${ITKT_${t}}") ---> something like ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vectorContImages" "itk::Image< float, float >") However, I guess this would not work as I try to access the itk library, or could this already be the solution? How else can I tell the parameter "t" that it is an Image, I mean, what variable can I use to describe an itk Image in CMake? -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780p7588791.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From zivrafael.yaniv at nih.gov Thu Apr 28 09:49:02 2016 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Thu, 28 Apr 2016 13:49:02 +0000 Subject: [ITK-users] ASM/AAM/Snakes In-Reply-To: <1461818665415-7588790.post@n2.nabble.com> References: <1461818665415-7588790.post@n2.nabble.com> Message-ID: Hello Robert, Yes, it is possible to implement this type of framework on top of ITK. I would recommend looking at Statismo (https://github.com/statismo/statismo), unless you feel strongly about implementing your own from scratch. Ziv On 4/28/16, 12:44 AM, "Robert" wrote: >Hello again, > >I have one more question. I'm looking to get a program working that can >automatically detect a certain shape that I provide in a 3-dimensional >Volume Dataset (.nrrd). Those are (CT-) scans from the head in Python. >Now, I'm only talking about DETECTION, not necessary segmentation. I >looked >into Geodesic Shape Guidance (my last Topic), however, here you still >provide initial seeds for the segmentation, as well a mean shape and PCA >Modes (used for the segmentation part). >Is there any possibility to create such an algorithm with ITK that detects >my shape? I know about the theory behind ASM and/or AAM, but I'm not too >sure if and how this is doable with ITK. >Maybe there is already some example or function that I did not find. > >Thanks for your time, > >Robert > > > >-- >View this message in context: >http://itk-insight-users.2283740.n2.nabble.com/ASM-AAM-Snakes-tp7588790.ht >ml >Sent from the ITK Insight Users mailing list archive at Nabble.com. >_____________________________________ >Powered by www.kitware.com > >Visit other Kitware open-source projects at >http://www.kitware.com/opensource/opensource.html > >Kitware offers ITK Training Courses, for more information visit: >http://www.kitware.com/products/protraining.php > >Please keep messages on-topic and check the ITK FAQ at: >http://www.itk.org/Wiki/ITK_FAQ > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Thu Apr 28 15:47:30 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 28 Apr 2016 15:47:30 -0400 Subject: [ITK-users] Geodesic Shape Guidance in Python In-Reply-To: <1461822536862-7588791.post@n2.nabble.com> References: <1461663269360-7588780.post@n2.nabble.com> <1461664090333-7588781.post@n2.nabble.com> <1461752687672-7588786.post@n2.nabble.com> <1461775120405-7588788.post@n2.nabble.com> <1461822536862-7588791.post@n2.nabble.com> Message-ID: Hi Robert, The variable to target are ITKT_I${pixel_type}${dimension} and ITKM_I${pixel_type}${dimension} These are described in the current ITK Software Guide: http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch9.html#x50-150000 HTH, Matt On Thu, Apr 28, 2016 at 1:48 AM, Robert wrote: > Hi, > > I understand that I need to add another line so that the parameter "t" can > be an Image as well. > > ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vector${t}" > "${ITKT_${t}}") > ---> something like > ADD_PYTHON_CONFIG_TEMPLATE("vector" "std::vector" "vectorContImages" > "itk::Image< float, float >") > > However, I guess this would not work as I try to access the itk library, or > could this already be the solution? > > How else can I tell the parameter "t" that it is an Image, I mean, what > variable can I use to describe an itk Image in CMake? > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780p7588791.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From zhuangming.shen at sphic.org.cn Fri Apr 29 03:17:15 2016 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Fri, 29 Apr 2016 07:17:15 +0000 Subject: [ITK-users] Strange situation when ITK writes DICOM file In-Reply-To: References: <1450834862664.8600@sphic.org.cn>, Message-ID: <1461914235636.15330@sphic.org.cn> Hi D?enan, ? I'd like to know if the bug regarding 3D DICOM writer has been fixed. When I tried to run the same code but using ITK 4.9.1, I still got the same results, i.e. the output DICOM file does not properly record original image's origin and spacing. Regards, Zhuangming Shen ________________________________ From: D?enan Zuki? Sent: Saturday, December 26, 2015 1:44 AM To: ??? Cc: insight-users at itk.org Subject: Re: [ITK-users] Strange situation when ITK writes DICOM file ?I have confirmed this bug and entered it into tracker along with a DICOM series which reproduces it.? Thanks Shen On Tue, Dec 22, 2015 at 8:41 PM, ??? > wrote: Hi all, I met a very strange situation when I used ITK 4.8.1. I'd like to read a DICOM series, write it to a DICOM file (i.e. save the volume created by the DICOM series to a .dcm file), and read the DICOM file. Theoretically, the DICOM series and the DCM file should have the same information, e.g origin, spacing, size. However, My results show me that the information has been changed. When I use other ITK-support file format (e.g. nii, nrrd), the information has not been changed. It seems a bug. My code and results are listed as below. Has anyone met the same situation? Regards, Zhuangming Shen ? ================ My code ================= import itk input_dir = "/home/zshen/workspace/Data/testDCM/bbb" output_filename = "/home/zshen/workspace/Data/bbb2.dcm" # read DICOM series dicom_io = itk.GDCMImageIO.New() reader = itk.ImageSeriesReader[itk.Image.SS3].New() reader.SetImageIO(dicom_io) name_generator = itk.GDCMSeriesFileNames.New() name_generator.SetUseSeriesDetails(True) name_generator.SetDirectory(input_dir) series_uid = name_generator.GetSeriesUIDs() series_identifier = series_uid[0] file_names = name_generator.GetFileNames(series_identifier) reader.SetFileNames(file_names) reader.Update() print("**** series DICOM information: *****") print("size: "+str(reader.GetOutput().GetLargestPossibleRegion().GetSize())) print("origin: "+str(reader.GetOutput().GetOrigin())) print("spacing: "+str(reader.GetOutput().GetSpacing())) writer = itk.ImageFileWriter[itk.Image.SS3].New() writer.SetInput(reader.GetOutput()) writer.SetFileName(output_filename) writer.Update() # read again reader2 = itk.ImageFileReader[itk.Image.SS3].New() reader2.SetFileName(output_filename) reader2.Update() print("**** DICOM information: *****") print("size: "+str(reader2.GetOutput().GetLargestPossibleRegion().GetSize())) print("origin: "+str(reader2.GetOutput().GetOrigin())) print("spacing: "+str(reader2.GetOutput().GetSpacing())) ================= My results ==================== **** series DICOM information: ***** size: itkSize3 ([512, 512, 118]) origin: itkPointD3 ([-229.5, -96.5, -553]) spacing: itkVectorD3 ([0.896484, 0.896484, 3]) **** DICOM information: ***** size: itkSize3 ([512, 512, 118]) origin: itkPointD3 ([0, 0, 0]) spacing: itkVectorD3 ([0.896484, 0.896484, 1]) _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 Fri Apr 29 09:59:01 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 29 Apr 2016 09:59:01 -0400 Subject: [ITK-users] Strange situation when ITK writes DICOM file In-Reply-To: <1461914235636.15330@sphic.org.cn> References: <1450834862664.8600@sphic.org.cn> <1461914235636.15330@sphic.org.cn> Message-ID: Hi Shen, GDCM version was updated recently. It now complains that short type is unsupported, and works correctly with char type. I attached an example which rescales the intensity and works correctly. Regards, D?enan On Fri, Apr 29, 2016 at 3:17 AM, ??? wrote: > Hi D?enan, > > ? > > I'd like to know if the bug > > regarding 3D DICOM writer has been fixed. When I tried to run the same code > but using ITK 4.9.1, I still got the same results, i.e. the output DICOM > file does not properly record original image's origin and spacing. > > > > Regards, > > > Zhuangming Shen > ------------------------------ > *From:* D?enan Zuki? > *Sent:* Saturday, December 26, 2015 1:44 AM > *To:* ??? > *Cc:* insight-users at itk.org > *Subject:* Re: [ITK-users] Strange situation when ITK writes DICOM file > > ?I have confirmed this bug and entered it into tracker > along with a DICOM series > which reproduces it.? > > Thanks Shen > > On Tue, Dec 22, 2015 at 8:41 PM, ??? wrote: > >> Hi all, >> >> >> I met a very strange situation when I used ITK 4.8.1. I'd like to read a >> DICOM series, write it to a DICOM file (i.e. save the volume created by the >> DICOM series to a .dcm file), and read the DICOM file. Theoretically, the >> DICOM series and the DCM file should have the same information, e.g origin, >> spacing, size. However, My results show me that the information has been >> changed. When I use other ITK-support file format (e.g. nii, nrrd), the >> information has not been changed. It seems a bug. My code and results are >> listed as below. Has anyone met the same situation? >> >> >> Regards, >> >> >> Zhuangming Shen >> >> >> >> ? >> >> ================ My code ================= >> >> >> import itk >> >> input_dir = "/home/zshen/workspace/Data/testDCM/bbb" >> output_filename = "/home/zshen/workspace/Data/bbb2.dcm" >> >> # read DICOM series >> dicom_io = itk.GDCMImageIO.New() >> >> reader = itk.ImageSeriesReader[itk.Image.SS3].New() >> reader.SetImageIO(dicom_io) >> >> name_generator = itk.GDCMSeriesFileNames.New() >> name_generator.SetUseSeriesDetails(True) >> name_generator.SetDirectory(input_dir) >> >> series_uid = name_generator.GetSeriesUIDs() >> >> series_identifier = series_uid[0] >> >> file_names = name_generator.GetFileNames(series_identifier) >> >> reader.SetFileNames(file_names) >> reader.Update() >> >> print("**** series DICOM information: *****") >> print("size: >> "+str(reader.GetOutput().GetLargestPossibleRegion().GetSize())) >> print("origin: "+str(reader.GetOutput().GetOrigin())) >> print("spacing: "+str(reader.GetOutput().GetSpacing())) >> >> writer = itk.ImageFileWriter[itk.Image.SS3].New() >> writer.SetInput(reader.GetOutput()) >> writer.SetFileName(output_filename) >> writer.Update() >> >> # read again >> reader2 = itk.ImageFileReader[itk.Image.SS3].New() >> reader2.SetFileName(output_filename) >> reader2.Update() >> >> print("**** DICOM information: *****") >> print("size: >> "+str(reader2.GetOutput().GetLargestPossibleRegion().GetSize())) >> print("origin: "+str(reader2.GetOutput().GetOrigin())) >> print("spacing: "+str(reader2.GetOutput().GetSpacing())) >> >> >> ================= My results ==================== >> **** series DICOM information: ***** >> size: itkSize3 ([512, 512, 118]) >> origin: itkPointD3 ([-229.5, -96.5, -553]) >> spacing: itkVectorD3 ([0.896484, 0.896484, 3]) >> **** DICOM information: ***** >> size: itkSize3 ([512, 512, 118]) >> origin: itkPointD3 ([0, 0, 0]) >> spacing: itkVectorD3 ([0.896484, 0.896484, 1]) >> >> >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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: tester2.cpp Type: text/x-c++src Size: 2240 bytes Desc: not available URL: From matt.mccormick at kitware.com Fri Apr 29 13:13:06 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 29 Apr 2016 13:13:06 -0400 Subject: [ITK-users] Planned Website and Git Repository Downtime: Monday, 3:30PM Message-ID: Hi folks, We will have brief planned downtime of the landing page and Git repositories on Monday, May, 2nd at 3:30PM Eastern Time HTTPS support will be added to both resources. Thanks, Matt From matt.mccormick at kitware.com Fri Apr 29 16:22:00 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 29 Apr 2016 16:22:00 -0400 Subject: [ITK-users] [Example] Perform Registration on Vector Images Message-ID: Hi folks, Based off Nick Tustison's code and test, we have a new example on how to perform registration on vector images: http://itk.org/ITKExamples/src/Registration/Metricsv4/PerformRegistrationOnVectorImages/Documentation.html Matt