From itkhelpacc at gmail.com Thu Oct 1 06:22:39 2015 From: itkhelpacc at gmail.com (vis) Date: Thu, 1 Oct 2015 03:22:39 -0700 (MST) Subject: [ITK-users] MATLAB with ITK/VTK? Message-ID: <1443694959916-7587977.post@n2.nabble.com> hi itk users, I came across something called SimITK.. its seems that it is easy to experiment on various algorithms.. i was think of using it for developing a standalone application using SimITK... could anyone please point out the advantages and disadvantges of SimITK? regards vishal -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/MATLAB-with-ITK-VTK-tp7587977.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From blowekamp at mail.nih.gov Thu Oct 1 14:06:27 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 1 Oct 2015 14:06:27 -0400 Subject: [ITK-users] [ANNOUNCE] SimpleITK 0.9.1 Release Message-ID: <2718BB07-776B-40E5-8123-3DC196DC528C@mail.nih.gov> We are pleased to announce the release of SimpleITK 0.9.1! As with all SimpleITK releases, we have a variety of binaries available. This includes fresh Python Wheels and Eggs, along with Java, and CSharp binaries. Additionally, new binaries for Anaconda have been made improving the dependency requirements. This is a patch release and includes an update to the ITK version from 4.7.2+ to 4.8.1. Additional updates include: improved formatting for python documentation, fixes to the transform interfaces, improved ImageIO exceptions and build improvements. Information on how to get started and download the binaries: http://www.itk.org/Wiki/SimpleITK/GettingStarted#Binaries Binary distributions for many platforms and languages are available for downloading: https://sourceforge.net/projects/simpleitk/files/SimpleITK/0.9.1/ Release Doxygen Documentation: http://www.itk.org/SimpleITKDoxygen09/html/index.html Additional Release Notes: http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#SimpleITK_-_Version_0.9.1_Release Enjoy! Brad -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at insightsoftwareconsortium.org Thu Oct 1 15:45:33 2015 From: noreply at insightsoftwareconsortium.org (MIDAS Journal) Date: Thu, 1 Oct 2015 15:45:33 -0400 (EDT) Subject: [ITK-users] New Submission: The Bag of Words Approach for the Classification of Head and Neck Cancers Using Diffuse Reflectance Spectroscopy Message-ID: <20151001194533.BB84C3D620CE@insight-journal.org> Hello, A new submission has been added to the MIDAS Journal. Title: The Bag of Words Approach for the Classification of Head and Neck Cancers Using Diffuse Reflectance Spectroscopy Authors: Karam Eldaly A., Benezeth Y., Flaus V., Duvillard C., Bozorg Grayeli A., Marzani F. Abstract: Diff use Reflectance Spectroscopy (DRS) is a leading technique for the detection of head and neck cancers. It can capture information regarding tissue absorption and scattering. In this research work, we propose a novel method for the identification of normal and Squamous Cell Carcinoma (SCC) mucosa tissues using the Bag Of Words (BOW) approach. The study included 70 spectra from normal mucosa tissue sites and 70 spectra from SCC mucosa tissue sites. First, the spectra are preprocessed by extracting the useful wavelength range, denoising and reducing the inter and intra patient variability. Subsequently, features are extracted from each spectrum by continuously sliding a window with a predefined length along each spectrum to extract a group of local segments. Discrete Wavelet transform (DWT) is then employed for each segment. Next, we construct the codebook to represent each spectrum by a histogram of codewords at which each bin in the histogram is a count of a codeword app eared in the spectrum. Finally, the histogram representation is used as input for classification. The maximum accuracy reported is 94.28% with sensitivity and specificity of 91.42% and 97.14% respectively. Download and review this publication at: http://hdl.handle.net/10380/3524 Generated by the MIDAS Journal You are receiving this email because you asked to be informed by the MIDAS Journal for new submissions. To change your email preference visit http://www.midasjournal.org/ . From franciscolopezdelafranca at gmail.com Thu Oct 1 19:19:55 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Fri, 2 Oct 2015 01:19:55 +0200 Subject: [ITK-users] MATLAB with ITK/VTK? In-Reply-To: <1443694959916-7587977.post@n2.nabble.com> References: <1443694959916-7587977.post@n2.nabble.com> Message-ID: Hi, I've been having a look at the SimITK product. I've downloaded and loaded on Matlab. I start 'simulink' but the problem is that I cannot see any library to work with textures, nevertheless under '...\SimITK-0.5\Source\itkxml-4.2simple\itkxml-4.2-simple\Numerics\Statistics' there is a file called 'ScalarImageToTextureFeaturesFilter.xml'. I donot know if this filter can be used from simulink. Does anyone know something about this issue? Thanks /Francisco 2015-10-01 12:22 GMT+02:00 vis : > hi itk users, > I came across something called SimITK.. its seems that it is easy to > experiment on various algorithms.. i was think of using it for developing a > standalone application using SimITK... could anyone please point out the > advantages and disadvantges of SimITK? > regards > vishal > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/MATLAB-with-ITK-VTK-tp7587977.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From weissj at in.tum.de Fri Oct 2 03:05:04 2015 From: weissj at in.tum.de (Jakob Weiss) Date: Fri, 2 Oct 2015 00:05:04 -0700 (MST) Subject: [ITK-users] How to Calculate Hessian Matrix from Gradient Image? In-Reply-To: References: Message-ID: <1443769504729-36275.post@n7.nabble.com> Hello! Did you end up finding a solution for this problem? In order to evaluate the GVF approach to Vesselness I am looking for the exact same solution... Cheers, J -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-How-to-Calculate-Hessian-Matrix-from-Gradient-Image-tp35400p36275.html Sent from the ITK - Users mailing list archive at Nabble.com. From varasteh at to.infn.it Fri Oct 2 04:51:21 2015 From: varasteh at to.infn.it (varasteh) Date: Fri, 2 Oct 2015 01:51:21 -0700 (MST) Subject: [ITK-users] get coordinates of Grid Nodes in Bspline registration Message-ID: <1443775881358-7587982.post@n2.nabble.com> Dear all, I am looking for a command in ITK registration to get the coordinates (location; x, y, z) of each Grid Node chosen by Bspline registration. If I am not wrong I think I know how to get the initial coordinates of each vector field (which is the center of each pixel or voxel) and I know how to get the transform parameters which are correspond to each Grid Node. But I can not find any way to get the coordinates of each Node for which after registration we have the transform parameters. If my question is not clear please let me know. Many thanks in advance. Regards, varasteh -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/get-coordinates-of-Grid-Nodes-in-Bspline-registration-tp7587982.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From mlt.khawla at gmail.com Fri Oct 2 08:54:19 2015 From: mlt.khawla at gmail.com (Daoued23) Date: Fri, 2 Oct 2015 05:54:19 -0700 (MST) Subject: [ITK-users] Spatially variant morphological closing In-Reply-To: References: <1443620146273-36263.post@n7.nabble.com> Message-ID: Thank you very much for your help, but unfortunately none of these articles discussed the problem that I cited. Best Regards Daoued23 2015-09-30 21:49 GMT+01:00 Richard Beare [via ITK - Users] < ml-node+s7n36269h60 at n7.nabble.com>: > Spatially variant erosions and dilations are easy enough to visualise but, > as you've discovered, openings and closings are less obvious. Some issues > are discussed in the following papers. > > @Article{cuisenaire2006locally, title = "Locally Adaptable Mathematical > Morphology Using Distance Transformations", author = "O. Cuisenaire", journal > = "Pattern Recognition", volume = "39", number = "3", pages = "405--416", year > = "2006", publisher = "Elsevier", } @Article{bouaynaya2007theoretical2, title > = "Theoretical Foundations of Spatially-variant Mathematical Morphology > Part {II}: Gray-level Images", author = "N. Bouaynaya and D. Schonfeld", journal > = "IEEE Transactions on Pattern Analysis and Machine Intelligence", volume > = "30", number = "5", pages = "837--850", year = "2008", publisher = "Published > by the IEEE Computer Society", } @Article{bouaynaya2007theoretical1, title > = "Theoretical Foundations of Spatially-variant Mathematical Morphology > Part {I}: Binary Images", author = "N. Bouaynaya and D. Schonfeld", journal > = "IEEE Transactions on Pattern Analysis and Machine Intelligence", volume > = "30", number = "5", pages = "823--836", year = "2008", publisher = "Published > by the IEEE Computer Society", } > > I've also done some work on the efficient implementations for > circular/spherical structuring elements on binary images: > > @InProceedings{Beare2011j, > > author = {Beare, R. and Jackway, P.}, > > title = {Parallel Algorithms Via Scaled Paraboloid Structuring > Function > > s for Spatially-Variant and Label-Set Dilations and Erosions}, > > booktitle = {International Conference on Digital Image Computing: > Techniques and Applications (DICTA) }, > > year = 2011, > > month = {December}} > > > On Wed, Sep 30, 2015 at 11:05 PM, Daoued23 <[hidden email] > > wrote: > >> Hi everyone, >> >> I want to implement a spatially variant morphological closing, which its >> structuring element is estimated for every pixel. I work on binary images. >> >> >> So to apply the aspatially variant morphological closing, we estimate the >> structuring element for every pixel surrounded by its neighborhood, apply >> the dilation on every neighbouring window with the corresponding estimated >> structring element. Then we get the dilated image as the union of all the >> dilated windows. Now, we apply the erosion on every neighbouring window of >> the dilated image with the transposed of the structuring element already >> estimated. The adaptively closed image will be the union of the eroded >> windows of the dilated image. >> >> Now the problem is that, we find background windows (all pixels are black) >> in the image, so we cannot estimate a structuring element. when it's the >> phase of the dilation we don't apply anything, but some pixels can appear >> in >> this windows as the result of the union of the surrounding windows that >> have >> been dilated. When applying the erosion on these new pixels which >> structuring element should we consider knowing that we can't estimate one >> based on the original image (background window)??? >> >> Thank you >> >> Best regards >> >> >> >> -- >> View this message in context: >> http://itk-users.7.n7.nabble.com/ITK-users-Spatially-variant-morphological-closing-tp36263.html >> Sent from the ITK - Users mailing list archive at Nabble.com. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://itk-users.7.n7.nabble.com/ITK-users-Spatially-variant-morphological-closing-tp36263p36269.html > To unsubscribe from [ITK-users] Spatially variant morphological closing, click > here > > . > NAML > > -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Spatially-variant-morphological-closing-tp36263p36277.html Sent from the ITK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vianamp at gmail.com Fri Oct 2 10:15:11 2015 From: vianamp at gmail.com (Matheus Viana) Date: Fri, 2 Oct 2015 11:15:11 -0300 Subject: [ITK-users] [ITK] How to Calculate Hessian Matrix from Gradient Image? In-Reply-To: <1443769504729-36275.post@n7.nabble.com> References: <1443769504729-36275.post@n7.nabble.com> Message-ID: You can check my solution here: https://github.com/vianamp/MitoGraph The piece of code you want to look at is the function: GetHessianEigenvaluesDiscrete *Matheus Viana* *Postdoctoral Research Employee* *Developmental and Cell Biology* *University of California Irvine* 2015-10-02 4:05 GMT-03:00 Jakob Weiss : > Hello! > > Did you end up finding a solution for this problem? In order to evaluate > the > GVF approach to Vesselness I am looking for the exact same solution... > > Cheers, > J > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-How-to-Calculate-Hessian-Matrix-from-Gradient-Image-tp35400p36275.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.serviddio at gmail.com Fri Oct 2 10:29:22 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Fri, 02 Oct 2015 14:29:22 +0000 Subject: [ITK-users] UseMovingImageGradientFilter Mutua Information Message-ID: I don't understand the function of UseMovingImageGradientFilter method for mattes mutua information. Can you explain me what is the function of this method or give me the paper of this kind of metric,please??? -------------- next part -------------- An HTML attachment was scrubbed... URL: From siddharthvikal at gmail.com Fri Oct 2 10:41:19 2015 From: siddharthvikal at gmail.com (Siddharth Vikal) Date: Fri, 2 Oct 2015 15:41:19 +0100 Subject: [ITK-users] [ITK] How to Calculate Hessian Matrix from Gradient Image? In-Reply-To: References: <1443769504729-36275.post@n7.nabble.com> Message-ID: Just thinking out aloud, wouldn't it be ok to get a Jacobian of the GVF image? And then do an eigen value decomposition on the Jacobian rather than the Hessian. Jacobian matrix isn't symmetric though. Cheers, Sid On Fri, Oct 2, 2015 at 3:15 PM, Matheus Viana wrote: > You can check my solution here: > > https://github.com/vianamp/MitoGraph > > The piece of code you want to look at is the function: > GetHessianEigenvaluesDiscrete > > > *Matheus Viana* > *Postdoctoral Research Employee* > *Developmental and Cell Biology* > *University of California Irvine* > > > > 2015-10-02 4:05 GMT-03:00 Jakob Weiss : > >> Hello! >> >> Did you end up finding a solution for this problem? In order to evaluate >> the >> GVF approach to Vesselness I am looking for the exact same solution... >> >> Cheers, >> J >> >> >> >> -- >> View this message in context: >> http://itk-users.7.n7.nabble.com/ITK-users-How-to-Calculate-Hessian-Matrix-from-Gradient-Image-tp35400p36275.html >> Sent from the ITK - Users mailing list archive at Nabble.com. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Fri Oct 2 13:37:17 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 2 Oct 2015 13:37:17 -0400 Subject: [ITK-users] get coordinates of Grid Nodes in Bspline registration In-Reply-To: <1443775881358-7587982.post@n2.nabble.com> References: <1443775881358-7587982.post@n2.nabble.com> Message-ID: Hi varasteh, The b-spline grid nodes locations are an input to the transform. The can also be obtained via the Get* methods. The grid nodes are defined on a uniform grid, i.e. an Image. See the class documentation here: http://www.itk.org/Doxygen/html/classitk_1_1BSplineTransform.html for a description of setting the grid locations. Use the corresponding Get* methods to get their values. HTH, Matt On Fri, Oct 2, 2015 at 4:51 AM, varasteh wrote: > Dear all, > > I am looking for a command in ITK registration to get the coordinates > (location; x, y, z) of each Grid Node chosen by Bspline registration. > If I am not wrong I think I know how to get the initial coordinates of each > vector field (which is the center of each pixel or voxel) and I know how to > get the transform parameters which are correspond to each Grid Node. > But I can not find any way to get the coordinates of each Node for which > after registration we have the transform parameters. > > If my question is not clear please let me know. Many thanks in advance. > > Regards, > varasteh > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/get-coordinates-of-Grid-Nodes-in-Bspline-registration-tp7587982.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 varasteh at to.infn.it Sun Oct 4 04:30:40 2015 From: varasteh at to.infn.it (varasteh) Date: Sun, 4 Oct 2015 01:30:40 -0700 (MST) Subject: [ITK-users] get coordinates of Grid Nodes in Bspline registration In-Reply-To: References: <1443775881358-7587982.post@n2.nabble.com> Message-ID: <1443947440463-7587988.post@n2.nabble.com> Dear Matt, Many thanks for your description. varasteh -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/get-coordinates-of-Grid-Nodes-in-Bspline-registration-tp7587982p7587988.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From dzenanz at gmail.com Sun Oct 4 11:07:15 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Sun, 4 Oct 2015 11:07:15 -0400 Subject: [ITK-users] [ITK] Include ITK and VTK libraries compiled into a project C ++ Visual Studio 2010 In-Reply-To: References: Message-ID: You need to use CMake to configure your project, and choose as "generator" Visual Studio 2010. On Mon, Sep 28, 2015 at 4:28 PM, Abdelkhalek Bakkari < bakkari.abdelkhalek at hotmail.fr> wrote: > > Hello everyone, > > I'm trying to debug a C ++ project with a source and a binary file > (containing the Makefile). > > This project compiles perfectly in the terminal, but when I try to compile > in Visual Studio 2010, it emphasizes all my .h saying they are not found. > Even by adding my libraries compiled into my project, I have the same > result. > > Do you know how it can be configured to recognize Include ITK and VTK > libraries compiled into a project C ++ Visual Studio 2010 with ITK and VTK > libraries? > > Thanks you in advance, > > Best regards, > > Abdelkhalek Bakkari > Ph.D candidate in Computer Science > Institute of Applied Computer Science > Lodz University of Technology, Poland > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Mon Oct 5 05:57:07 2015 From: itkhelpacc at gmail.com (vis) Date: Mon, 5 Oct 2015 02:57:07 -0700 (MST) Subject: [ITK-users] information about HistogramToEntropyImageFilter? Message-ID: <1444039027553-7587990.post@n2.nabble.com> hi, Could any one please tell me how does HistogramToEntropyImageFilter work? what is the output and how the output is obtained? regards Vishal -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/information-about-HistogramToEntropyImageFilter-tp7587990.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From varasteh at to.infn.it Mon Oct 5 11:07:28 2015 From: varasteh at to.infn.it (varasteh) Date: Mon, 5 Oct 2015 08:07:28 -0700 (MST) Subject: [ITK-users] get coordinates of Grid Nodes in Bspline registration In-Reply-To: References: <1443775881358-7587982.post@n2.nabble.com> Message-ID: <1444057648613-7587992.post@n2.nabble.com> Dear Matt, As you kindly guided me, I used the Get* methods to get the followings: TransformDomainMeshSize = [22, 22, 22] TransformDomainOrigin = [-246.094, -145.445, -164.5] TransformDomainPhysicalDimensions = [469.726, 350.586, 280] For numberOfGridNodesInOneDimension = 25 and SplineOrder = 3, the TransformDomainMeshSize is [22, 22, 22]. If I am right, the first Node is located at ?TransformDomainOrigin?. Now, to find the locations of other GridNodes I need to have the spacing of Nodes. 1. Is it correct that I just divide ?TransformDomainPhysicalDimensions? by ?TransformDomainMeshSize? to get the Nodes spacing or I should divide to 25 (numberOfGridNodes) or is there other method to get Nodes spacing? 2. Sorry, in ITK user guide, I tried to find the definition of SplineOrder and exactly what is it but I could not understand it! Could you please tell me what is SplineOrder doing!? 3. I am a bit confused, since the NumberOfParameters = 46875 (= 3x25x25x25) is exactly correspond to 25 GridNodes, what does it mean! Do I have a lattice of 25x25x25 GridNodes with MeshSize of [22, 22, 22]??!! Many thanks in advance, varasteh _____________________________________ More info about Lung CT and ROI which I am using: Image Spacing (mm) = [0.976562, 0.976562, 2] Image Size (pixel) = ImageRegion (0x310fdc8) Dimension: 3 Index: [0, 0, 0] Size: [512, 512, 141] Image Physical Dimension (mm) = [500, 500, 282] ROI Size (pixel) = ImageRegion (0x3255278) Dimension: 3 Index: [0, 0, 0] Size: [482, 360, 141] ROI Physical Dimension (mm) = [470.703, 351.562, 282] Fixed Physical Dimension (mm) = [469.726, 350.586, 280] numberOfGridNodesInOneDimension = 25 NumberOfIntialParameters = 46875 TransformDomainDirection = 1 0 0 0 1 0 0 0 1 TransformDomainMeshSize = [22, 22, 22] TransformDomainOrigin = [-246.094, -145.445, -164.5] TransformDomainPhysicalDimensions = [469.726, 350.586, 280] -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/get-coordinates-of-Grid-Nodes-in-Bspline-registration-tp7587982p7587992.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From s.serviddio at gmail.com Mon Oct 5 12:05:36 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Mon, 05 Oct 2015 16:05:36 +0000 Subject: [ITK-users] Demons Registration Message-ID: Hi, I have a big doubt, Can you say me if there is a case or when demons registration could fall into a local minimum??? Have you any papers that address this topic??? -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at insightsoftwareconsortium.org Mon Oct 5 17:39:03 2015 From: noreply at insightsoftwareconsortium.org (MIDAS Journal) Date: Mon, 5 Oct 2015 17:39:03 -0400 (EDT) Subject: [ITK-users] New Submission: Transitively Consistent and Unbiased Multi-Image Registration using Numerically Stable Transformation Synchronisation Message-ID: <20151005213903.162A33D6213B@insight-journal.org> Hello, A new submission has been added to the MIDAS Journal. Title: Transitively Consistent and Unbiased Multi-Image Registration using Numerically Stable Transformation Synchronisation Authors: Bernard F., Thunberg J., Husch A., Salamanca L., Gemmar P., Hertel F., Goncalves J. Abstract: Transitive consistency of pairwise transformations is a desirable property of groupwise image registration procedures. The transformation synchronisation method (Bernard et al., 2015) is able to retrieve transitively consistent pairwise transformations from pairwise transformations that are initially not transitively consistent. In the present paper, we present a numerically stable implementation of the transformation synchronisation method for affine transformations, which can deal with very large translations, such as those occurring in medical images where the coordinate origins may be far away from each other. By using this method in conjunction with any pairwise (affine) image registration algorithm, a transitively consistent and unbiased groupwise image registration can be achieved. Experiments involving the average template generation from 3D brain images demonstrate that the method is more robust with respect to outliers and achieves higher registration accuracy compared to reference-based registration. Download and review this publication at: http://hdl.handle.net/10380/3526 Generated by the MIDAS Journal You are receiving this email because you asked to be informed by the MIDAS Journal for new submissions. To change your email preference visit http://www.midasjournal.org/ . From weissj at in.tum.de Tue Oct 6 02:09:17 2015 From: weissj at in.tum.de (Jakob Weiss) Date: Mon, 5 Oct 2015 23:09:17 -0700 (MST) Subject: [ITK-users] [ITK] How to Calculate Hessian Matrix from Gradient Image? In-Reply-To: References: <1443769504729-36275.post@n7.nabble.com> Message-ID: <1444111757164-36288.post@n7.nabble.com> Thank you a lot Matheus, this has been very helpful! As to the question of using the Jacobian: Since the Hessian s the same as the Jacobian of the Gradient, this just another equal formulation of the same problem. I could not find any filter for computing the Jacobian on a vector volume either, so not really a solution. For example [1] applies a scheme to make these matrices symmetric. Cheers, J [1] Goch, Caspar J., et al. "Liver vessel segmentation using gradient vector flow." Bildverarbeitung f?r die Medizin 2011. Springer Berlin Heidelberg, 2011. 104-108. -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-How-to-Calculate-Hessian-Matrix-from-Gradient-Image-tp35400p36288.html Sent from the ITK - Users mailing list archive at Nabble.com. From alfonso.castro at udc.es Tue Oct 6 10:20:24 2015 From: alfonso.castro at udc.es (Alfonso Castro) Date: Tue, 06 Oct 2015 16:20:24 +0200 Subject: [ITK-users] Problem with configure with 4.8.1 and gcc 5 Message-ID: <1792052.Ej4RIIi5E6@hinata> Hi. I tried to compiled in OpenSuSE Tumbleweed ITK 4.8.1 but I obtained an error in configure: CMake Error at /usr/share/cmake/Modules/TestBigEndian.cmake:51 (message): no suitable type found Call Stack (most recent call first): Modules/ThirdParty/VNL/src/vxl/config/cmake/config/CMakeLists.txt:285 (TEST_BIG_ENDIAN) However, the configuration and compile are without a problem using clang. The info of gcc version is: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/5/lto-wrapper Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info -- mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable- languages=c,c++,objc,fortran,obj-c++,java,ada,go --enable-checking=release -- with-gxx-include-dir=/usr/include/c++/5 --enable-ssp --disable-libssp -- disable-libvtv --enable-libmpx --disable-plugin --with-bugurl=http:// bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --with- slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx- allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --enable-linux-futex --program-suffix=-5 --without- system-libunwind --enable-multilib --with-arch-32=i586 --with-tune=generic -- build=x86_64-suse-linux --host=x86_64-suse-linux Thread model: posix gcc version 5.1.1 20150713 [gcc-5-branch revision 225736] (SUSE Linux) VTK 6.3 compile without a problem using gcc 5. The info of clang version is: clang version 3.7.0 (tags/RELEASE_370/final 246586) Target: x86_64-suse-linux Thread model: posix Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-suse-linux/4.8 Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-suse-linux/5 Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8 Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/5 Selected GCC installation: /usr/bin/../lib64/gcc/x86_64-suse-linux/5 Candidate multilib: .;@m64 Selected multilib: .;@m64 Thanks in advance. Alfonso Castro Faculty of Computer Science University of A Coruna From siddharthvikal at gmail.com Tue Oct 6 11:59:44 2015 From: siddharthvikal at gmail.com (Siddharth Vikal) Date: Tue, 6 Oct 2015 16:59:44 +0100 Subject: [ITK-users] [ITK] How to Calculate Hessian Matrix from Gradient Image? In-Reply-To: <1444111757164-36288.post@n7.nabble.com> References: <1443769504729-36275.post@n7.nabble.com> <1444111757164-36288.post@n7.nabble.com> Message-ID: Well, there is a jacobian filter available in ITK that calculates the jacobian of displacement field (vector) image volume: http://www.itk.org/Doxygen/html/classitk_1_1DisplacementFieldJacobianDeterminantFilter.html It returns the jacobin determinant, but one can easily modify it to return the Jacobian matrix, and then do the eigen value analysis on top of that. Cheers On Tue, Oct 6, 2015 at 7:09 AM, Jakob Weiss wrote: > Thank you a lot Matheus, this has been very helpful! > > As to the question of using the Jacobian: Since the Hessian s the same as > the Jacobian of the Gradient, this just another equal formulation of the > same problem. I could not find any filter for computing the Jacobian on a > vector volume either, so not really a solution. For example [1] applies a > scheme to make these matrices symmetric. > > Cheers, > J > > [1] Goch, Caspar J., et al. "Liver vessel segmentation using gradient > vector > flow." Bildverarbeitung f?r die Medizin 2011. Springer Berlin Heidelberg, > 2011. 104-108. > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-How-to-Calculate-Hessian-Matrix-from-Gradient-Image-tp35400p36288.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From varasteh at to.infn.it Wed Oct 7 05:33:44 2015 From: varasteh at to.infn.it (varasteh) Date: Wed, 7 Oct 2015 02:33:44 -0700 (MST) Subject: [ITK-users] SplineOrder, control points and MeshSize of Bspline registration Message-ID: <1444210424543-7587998.post@n2.nabble.com> Hello everybody. 1. Having looked at figures in section ?BSpline Grid Size? of following link: http://slicer.org/slicerWiki/index.php/FAQ#What.27s_the_BSpline_Grid_Size.3F A bit unlike with what this link is explaining, to distinguish between the B-spline mesh and the B-spline control point grid, is it correct to state that this picture is for a case with: SplineOrder (border control points with deformation equal to Zero) = 2 ( 1 lower, 1 upper ) GridNode = 5x5x5 MeshSize (internal control points) = 3x3x3 (GridNode - SplineOrder) Or I misunderstood the definition of SplineOrder, GridNode and MeshSize? 2. The first Node (after lower spline order) is located at ?TransformDomainOrigin?. To find the coordinates of other Nodes of uniform grid I need to have the spacing of Nodes. Since there isn?t Get* method for spacing in the version which I am using, is it correct to divide the ?distance between first and last pixels of Mesh? by ?MeshSize? to get the Nodes spacing? Thanks for any guidance, varasteh _____________________________________ -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/SplineOrder-control-points-and-MeshSize-of-Bspline-registration-tp7587998.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From franciscolopezdelafranca at gmail.com Wed Oct 7 06:11:35 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Wed, 7 Oct 2015 12:11:35 +0200 Subject: [ITK-users] Using ITK from MATLAB Message-ID: Hi, I'm trying to call ITK code from MATLAB with the use of Matlab MEX files. My C++ code only contains: #include and when trying to compile this simple example, the compiler does not find the itkImage.h file. I pass the -I option to the mex command for every ITK subfolder and the error I get is: ... itkMacro.h: ... Cannot open include file itkConfigure.h: No such file or directory. I've searched the itkConfigure.h file under ITK code and the only found is itkConfigure.h.in. I would please if anybody has experienced this and could help me. I've also posted this problem to the MATLAB support several days ago and I haven't had any answer. Thanks you very much. Kind regards. /Francisco -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Wed Oct 7 12:46:34 2015 From: jose.de.paula at live.com (JoseBarretoT) Date: Wed, 7 Oct 2015 09:46:34 -0700 (MST) Subject: [ITK-users] Error itk 4.8 .mhd Message-ID: <1444236394421-36293.post@n7.nabble.com> I'm trying to open a file but .mhd always fall here .. Line 139 of the file itkImageFileReader.hxx the code I am using is: typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader = ReaderType::New(); char* local = clXUteis::ConverterStringParaChar(clXUteis::CapturaPasta(DadosPaciente::id, DadosPaciente::id2, 16, DadosSistema::caminho) + "\ESTUDO\\" + DadosRequisicao::id_estudo + DadosRequisicao::id2_estudo + "panoramica.mhd"); reader->SetFileName(local); reader->Update(); //Tipo do converso typedef itk::ImageToVTKImageFilterConnectorType; //Instancia Converso ConnectorType::Pointer connector = ConnectorType::New(); //Instancia leitor //reader->Update(); connector->SetInput(reader->GetOutput()); vtkSmartPointer renWinInteractor = vtkSmartPointer::New(); vtkSmartPointer image_mapper = vtkSmartPointer::New(); image_mapper->SetInputData(connector->GetOutput()); //.... in order to grab the source and send to VTK. files using ... 1621cortesParasagitais.mhd 1621cortesParasagitais.zraw -- View this message in context: http://itk-users.7.n7.nabble.com/Error-itk-4-8-mhd-tp36293.html Sent from the ITK - Users mailing list archive at Nabble.com. From s.serviddio at gmail.com Wed Oct 7 17:00:53 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Wed, 07 Oct 2015 21:00:53 +0000 Subject: [ITK-users] translation transform Message-ID: Hi, I don't understand when I have to use translation transform, I mean I can use it for doing a deformable registration or it is usefull only for rigid registration ??? thank you for your help. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bakkari.abdelkhalek at hotmail.fr Thu Oct 8 03:50:02 2015 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Thu, 8 Oct 2015 08:50:02 +0100 Subject: [ITK-users] DCMTK with win 64 bits Message-ID: Dear insight users, I would like to use DCMTK with Visual Studio 2010. I have windows 8.1 and with a 64 bits. Could anybody help with sending me the details of how to install DCMTK in this case. Thank you for your availability. 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 iyas.hamdan at gmail.com Thu Oct 8 07:07:49 2015 From: iyas.hamdan at gmail.com (Iyas Hamdan) Date: Thu, 8 Oct 2015 13:07:49 +0200 Subject: [ITK-users] Exception caught during extracting a volume, "Requested region is (at least partially) outside the largest possible region" Message-ID: Hello ITK users, I have a problem using the itk::ExtractImageFilter. What I'm trying to do is, from a 3D volume, I want to extract a small 3D neighborhood around each pixel of this volume. So I'm using the ExtractImageFilter more than once and I guess that is where it fails. The error I get is the following: itk::InvalidRequestedRegionError Location: itk::DataObject::PropagateRequestedRegion(void) File:itkDataObject.cxx Line: 393 Description: Requested region is (at least partially) outside the largest possible region. I've looked on several answers to the same issue here in the mailing list and what they propose is just to replace the Update() by an UpdateLargestPossibleRegion(). And I did that but I'am still getting the same error. Here is the code I'm using: FixedImageType::RegionType RegionFixed = this->m_FixedImage->GetLargestPossibleRegion(); FixedImageType::SizeType F_Size = RegionFixed.GetSize(); FixedImageType::IndexType F_Start = RegionFixed.GetIndex(); /// here I set the F_Size and F_Start to the desired values /// and I make sure that the region is always in the largest possible region! /// with Patch_Size being the size of the neighborhood to be extracted around the pixel in each dimension for (int dim = 0; dim < 3; dim++) { if (FixedIndex[dim] < Patch_Size) F_Start[dim] = 0; else { if (FixedIndex[dim] > (RegionFixed.GetSize()[dim] - Patch_Size - 1)) F_Start[dim] = RegionFixed.GetSize()[dim] - (2 * Patch_Size + 1); else F_Start[dim] = FixedIndex[dim] - Patch_Size; } F_Size[dim] = 2 * Patch_Size + 1; } FixedImageType::RegionType F_Region; F_Region.SetSize(F_Size); F_Region.SetIndex(F_Start); typedef itk::ExtractImageFilter< FixedImageType, FixedImageType > FilterExtractType; FilterExtractType::Pointer extracter = FilterExtractType::New(); extracter->InPlaceOn(); extracter->SetDirectionCollapseToSubmatrix(); extracter->SetExtractionRegion(F_Region); extracter->SetInput(this->m_FixedImage); try { extracter->UpdateLargestPossibleRegion(); } catch (itk::ExceptionObject & err) { std::cout << "Exception caught during extracting the volume!" << std::endl; std::cout << err << std::endl; } Any help would be really appreciated. Thanks Iyas Hamdan -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Thu Oct 8 08:25:29 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 08 Oct 2015 08:25:29 -0400 Subject: [ITK-users] Exception caught during extracting a volume, "Requested region is (at least partially) outside the largest possible region" In-Reply-To: References: Message-ID: <82F29744-2980-4C29-9FE0-3EFD3E7A4696@mail.nih.gov> Hello Iyas, I would try to remote the "InPlace" option. You are not showing your full pipeline specifically how the input is created. The inplace options can steal the input image's buffer. When you run it a second time, if the buffer is missing and there is no way to regenerate it this exception can occur. HTH, Brad On Oct 8, 2015, at 7:07 AM, Iyas Hamdan wrote: > Hello ITK users, > > I have a problem using the itk::ExtractImageFilter. > > What I'm trying to do is, from a 3D volume, I want to extract a small 3D neighborhood around each pixel of this volume. > > So I'm using the ExtractImageFilter more than once and I guess that is where it fails. > > The error I get is the following: > > itk::InvalidRequestedRegionError > Location: itk::DataObject::PropagateRequestedRegion(void) > File:itkDataObject.cxx > Line: 393 > Description: Requested region is (at least partially) outside the largest possible region. > > > I've looked on several answers to the same issue here in the mailing list and what they propose is just to replace the Update() by an UpdateLargestPossibleRegion(). And I did that but I'am still getting the same error. > > > Here is the code I'm using: > > FixedImageType::RegionType RegionFixed = this->m_FixedImage->GetLargestPossibleRegion(); > FixedImageType::SizeType F_Size = RegionFixed.GetSize(); > FixedImageType::IndexType F_Start = RegionFixed.GetIndex(); > > /// here I set the F_Size and F_Start to the desired values > /// and I make sure that the region is always in the largest possible region! > /// with Patch_Size being the size of the neighborhood to be extracted around the pixel in each dimension > > for (int dim = 0; dim < 3; dim++) > { > if (FixedIndex[dim] < Patch_Size) > F_Start[dim] = 0; > > else > { > if (FixedIndex[dim] > (RegionFixed.GetSize()[dim] - Patch_Size - 1)) > F_Start[dim] = RegionFixed.GetSize()[dim] - (2 * Patch_Size + 1); > else > F_Start[dim] = FixedIndex[dim] - Patch_Size; > } > > F_Size[dim] = 2 * Patch_Size + 1; > } > > FixedImageType::RegionType F_Region; > F_Region.SetSize(F_Size); > F_Region.SetIndex(F_Start); > > typedef itk::ExtractImageFilter< FixedImageType, FixedImageType > FilterExtractType; > FilterExtractType::Pointer extracter = FilterExtractType::New(); > extracter->InPlaceOn(); > extracter->SetDirectionCollapseToSubmatrix(); > > extracter->SetExtractionRegion(F_Region); > extracter->SetInput(this->m_FixedImage); > > try > { > extracter->UpdateLargestPossibleRegion(); > } > catch (itk::ExceptionObject & err) > { > std::cout << "Exception caught during extracting the volume!" << std::endl; > std::cout << err << std::endl; > } > > > > Any help would be really appreciated. > > Thanks > > Iyas Hamdan > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From tevain at telecom-paristech.fr Thu Oct 8 09:26:34 2015 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Thu, 8 Oct 2015 15:26:34 +0200 (CEST) Subject: [ITK-users] [ITK] Exception caught during extracting a volume, "Requested region is (at least partially) outside the largest possible region" In-Reply-To: References: Message-ID: <71566295.16957298.1444310794712.JavaMail.zimbra@enst.fr> Hello Iyas I think you problem is coming from the fact you are using the filter in place ("extracter->InPlaceOn();") When you run your filter once, that's good, but you are replacing the full image data (the input) with the small neighborhood. So basically after your first iteration, you are requesting the next neighborhood regarding the full image, which is outbound regarding the previous neighborhood. HTH Tim ----- Mail original ----- De: "Iyas Hamdan" ?: insight-users at itk.org Envoy?: Jeudi 8 Octobre 2015 13:07:49 Objet: [ITK] [ITK-users] Exception caught during extracting a volume, "Requested region is (at least partially) outside the largest possible region" Hello ITK users, I have a problem using the itk::ExtractImageFilter. What I'm trying to do is, from a 3D volume, I want to extract a small 3D neighborhood around each pixel of this volume. So I'm using the ExtractImageFilter more than once and I guess that is where it fails. The error I get is the following: itk::InvalidRequestedRegionError Location: itk::DataObject::PropagateRequestedRegion(void) File:itkDataObject.cxx Line: 393 Description: Requested region is (at least partially) outside the largest possible region. I've looked on several answers to the same issue here in the mailing list and what they propose is just to replace the Update() by an UpdateLargestPossibleRegion(). And I did that but I'am still getting the same error. Here is the code I'm using: FixedImageType::RegionType RegionFixed = this->m_FixedImage->GetLargestPossibleRegion(); FixedImageType::SizeType F_Size = RegionFixed.GetSize(); FixedImageType::IndexType F_Start = RegionFixed.GetIndex(); /// here I set the F_Size and F_Start to the desired values /// and I make sure that the region is always in the largest possible region! /// with Patch_Size being the size of the neighborhood to be extracted around the pixel in each dimension for (int dim = 0; dim < 3; dim++) { if (FixedIndex[dim] < Patch_Size) F_Start[dim] = 0; else { if (FixedIndex[dim] > (RegionFixed.GetSize()[dim] - Patch_Size - 1)) F_Start[dim] = RegionFixed.GetSize()[dim] - (2 * Patch_Size + 1); else F_Start[dim] = FixedIndex[dim] - Patch_Size; } F_Size[dim] = 2 * Patch_Size + 1; } FixedImageType::RegionType F_Region; F_Region.SetSize(F_Size); F_Region.SetIndex(F_Start); typedef itk::ExtractImageFilter< FixedImageType, FixedImageType > FilterExtractType; FilterExtractType::Pointer extracter = FilterExtractType::New(); extracter->InPlaceOn(); extracter->SetDirectionCollapseToSubmatrix(); extracter->SetExtractionRegion(F_Region); extracter->SetInput(this->m_FixedImage); try { extracter->UpdateLargestPossibleRegion(); } catch (itk::ExceptionObject & err) { std::cout << "Exception caught during extracting the volume!" << std::endl; std::cout << err << std::endl; } Any help would be really appreciated. Thanks Iyas Hamdan _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 neocerber at gmail.com Thu Oct 8 10:36:51 2015 From: neocerber at gmail.com (Maxime Toussaint) Date: Thu, 8 Oct 2015 07:36:51 -0700 (MST) Subject: [ITK-users] SplineOrder, control points and MeshSize of Bspline registration In-Reply-To: <1444210424543-7587998.post@n2.nabble.com> References: <1444210424543-7587998.post@n2.nabble.com> Message-ID: <1444315011109-7588006.post@n2.nabble.com> Hi, I have worked with ITK's BSpline registration methods in my master degree. So, I think I can shed some light on your questions. However, my knowledge comes from a mash up of ITK's guide book and signal processing courses, so take it with a grain of salt. English being my second language, I beg indulgence for possible weird sentences! 1) Your conclusion on the Spline Order is wrong. The "2" is the consequence of how ITK want to use B-Spline has a deformation transformation basis. If you read on B-Splines, you should find that B-Splines refer to a family of function that are defined recursively from the B-Spline of order 0, which is a window function. It is true that "GridNode = 5x5x5" in this example. However, you didn't state its definition, so I can't say if your interpretation of this parameter, set by the user, is correct. In its simplest form, you can say that this parameter is a choice between the capacity to defines local deformation and its computational complexity for the registration solver. Your formula for the mesh size is right. The reason behind this formula is to create a (SplineOrder or (SplineOrder - 1), I don't remember ) times continuous function that approximate the voxel displacement. All voxels outside the grid size are not deformed because the grid size define the part of the image we want to deform. However, I don't have, out of my hat, a reference material that only explains why this is the case in ITK. You would need to read on the necessary conditions to create a B-Spline approximation of a function and narrow it to uniform B-Spline of single multiplicity to understand. 2) I don`t think so. Proof by example : Let's suppose that you have a one dimension image of 10 voxels and a mesh size of 3. With your formula, the step size would be (10 - 0)/ 3 = 10/3... This would mean that with a mesh starting at voxel 0, you would have a mesh at 0, 10/3, 20/3 and 10, which contradict your mesh size. Thus, the formula you want is "distance between first and last pixels of Mesh divided by MeshSize ". As you might have guessed, the spacing in each dimension might vary. Have a nice day, Maxime Toussaint -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/SplineOrder-control-points-and-MeshSize-of-Bspline-registration-tp7587998p7588006.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From iyas.hamdan at gmail.com Thu Oct 8 11:06:04 2015 From: iyas.hamdan at gmail.com (Iyas Hamdan) Date: Thu, 8 Oct 2015 17:06:04 +0200 Subject: [ITK-users] [ITK] Exception caught during extracting a volume, "Requested region is (at least partially) outside the largest possible region" In-Reply-To: <71566295.16957298.1444310794712.JavaMail.zimbra@enst.fr> References: <71566295.16957298.1444310794712.JavaMail.zimbra@enst.fr> Message-ID: Thank you Brad and Tim for your replies. Brad, you're right I'm sorry I didnt include my whole pipeline because its a bit complicated. Actually what I'm trying to do is an application for image registration, and I'm using this volume extraction in the metric that I wrote for this purpose. My input is a Dicom series that I'm reading with VTK then transfering to ITK. I'm checking if the input is read correctly everytime I go inside the loop (before applying the ExtractFilter) And ( this->m_FixedImage->GetLargestPossibleRegion() ) always gives a valid result concerning the dimension, size and index. Thats why I thought the problem couldnt be caused by the input. I tried deleting the option extracter->InPlaceOn() as you suggested but I'm still getting the same error. What I do find weird though, is that I'm getting this exception in the second or third iteration of the registration! I mean, in the first iteration the extracter was able to go through all the pixels and extract a neighborhood around each pixel and everything was fine. But then again, I'm only applying this extracter on the fixed image which should be the same during the registration process so nothing should change from one iteration to another, right ? And in case I'm not missing anything, the ExtractFilter is kinda "seperated" from the rest of the pipeline as long as the input is read correctly and is staying the same throughout the whole process of the registration (and by staying the same I mean having the exact dimension, index and size). So I dont get why I would get an exception on the third iteration for example and not on the second pixel of the first iteration. And Tim, I didnt quiet get how I am "replacing the full image data (the input) with the small neighborhood', because my image ( this->m_FixedImage ) is staying always the same ( applying this->m_FixedImage->GetLargestPossibleRegion() gives always the right result ) and what I'm changing is just what I called F_Size and F_Start in my code which are used to creat another region (F_Region) and this is the region I'm changing. So could you please help me out here if I'm missing something ? Thanks in advance for your help. Iyas On Thu, Oct 8, 2015 at 3:26 PM, Timothee Evain wrote: > Hello Iyas > > I think you problem is coming from the fact you are using the filter in > place ("extracter->InPlaceOn();") > When you run your filter once, that's good, but you are replacing the full > image data (the input) with the small neighborhood. > So basically after your first iteration, you are requesting the next > neighborhood regarding the full image, which is outbound regarding the > previous neighborhood. > > HTH > > Tim > > ----- Mail original ----- > De: "Iyas Hamdan" > ?: insight-users at itk.org > Envoy?: Jeudi 8 Octobre 2015 13:07:49 > Objet: [ITK] [ITK-users] Exception caught during extracting a volume, > "Requested region is (at least partially) outside the largest possible > region" > > Hello ITK users, > > I have a problem using the itk::ExtractImageFilter. > > What I'm trying to do is, from a 3D volume, I want to extract a small 3D > neighborhood around each pixel of this volume. > > So I'm using the ExtractImageFilter more than once and I guess that is > where it fails. > > The error I get is the following: > > itk::InvalidRequestedRegionError > Location: itk::DataObject::PropagateRequestedRegion(void) > File:itkDataObject.cxx > Line: 393 > Description: Requested region is (at least partially) outside the largest > possible region. > > > I've looked on several answers to the same issue here in the mailing list > and what they propose is just to replace the Update() by an > UpdateLargestPossibleRegion(). And I did that but I'am still getting the > same error. > > > Here is the code I'm using: > > FixedImageType::RegionType RegionFixed = > this->m_FixedImage->GetLargestPossibleRegion(); > FixedImageType::SizeType F_Size = RegionFixed.GetSize(); > FixedImageType::IndexType F_Start = RegionFixed.GetIndex(); > > /// here I set the F_Size and F_Start to the desired values > /// and I make sure that the region is always in the largest possible > region! > /// with Patch_Size being the size of the neighborhood to be extracted > around the pixel in each dimension > > for (int dim = 0; dim < 3; dim++) > { > if (FixedIndex[dim] < Patch_Size) > F_Start[dim] = 0; > > else > { > if (FixedIndex[dim] > (RegionFixed.GetSize()[dim] - Patch_Size - 1)) > F_Start[dim] = RegionFixed.GetSize()[dim] - (2 * Patch_Size + 1); > else > F_Start[dim] = FixedIndex[dim] - Patch_Size; > } > > F_Size[dim] = 2 * Patch_Size + 1; > } > > FixedImageType::RegionType F_Region; > F_Region.SetSize(F_Size); > F_Region.SetIndex(F_Start); > > typedef itk::ExtractImageFilter< FixedImageType, FixedImageType > > FilterExtractType; > FilterExtractType::Pointer extracter = FilterExtractType::New(); > extracter->InPlaceOn(); > extracter->SetDirectionCollapseToSubmatrix(); > > extracter->SetExtractionRegion(F_Region); > extracter->SetInput(this->m_FixedImage); > > try > { > extracter->UpdateLargestPossibleRegion(); > } > catch (itk::ExceptionObject & err) > { > std::cout << "Exception caught during extracting the volume!" << std::endl; > std::cout << err << std::endl; > } > > > > Any help would be really appreciated. > > Thanks > > Iyas Hamdan > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 tevain at telecom-paristech.fr Thu Oct 8 12:12:58 2015 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Thu, 8 Oct 2015 18:12:58 +0200 (CEST) Subject: [ITK-users] [ITK] Exception caught during extracting a volume, "Requested region is (at least partially) outside the largest possible region" In-Reply-To: References: <71566295.16957298.1444310794712.JavaMail.zimbra@enst.fr> Message-ID: <259316890.17157411.1444320778945.JavaMail.zimbra@enst.fr> Well, by definition ( http://www.itk.org/Doxygen/html/classitk_1_1InPlaceImageFilter.html ) when you use in place, you are overwriting the same bulk of memory as input. I don't know how the region data is updated, and maybe if call UpdateLargestRegion() could show you the difference, but your initial fixed image is definitely modified if you process in place. Maybe you can try GetInput() after the first iteration on the extracter to see what do you have. HTH Tim ----- Mail original ----- De: "Iyas Hamdan" ?: "Timothee Evain" Cc: insight-users at itk.org, "Bradley Lowekamp" Envoy?: Jeudi 8 Octobre 2015 17:06:04 Objet: Re: [ITK] [ITK-users] Exception caught during extracting a volume, "Requested region is (at least partially) outside the largest possible region" Thank you Brad and Tim for your replies. Brad, you're right I'm sorry I didnt include my whole pipeline because its a bit complicated. Actually what I'm trying to do is an application for image registration, and I'm using this volume extraction in the metric that I wrote for this purpose. My input is a Dicom series that I'm reading with VTK then transfering to ITK. I'm checking if the input is read correctly everytime I go inside the loop (before applying the ExtractFilter) And ( this->m_FixedImage->GetLargestPossibleRegion() ) always gives a valid result concerning the dimension, size and index. Thats why I thought the problem couldnt be caused by the input. I tried deleting the option extracter->InPlaceOn() as you suggested but I'm still getting the same error. What I do find weird though, is that I'm getting this exception in the second or third iteration of the registration! I mean, in the first iteration the extracter was able to go through all the pixels and extract a neighborhood around each pixel and everything was fine. But then again, I'm only applying this extracter on the fixed image which should be the same during the registration process so nothing should change from one iteration to another, right ? And in case I'm not missing anything, the ExtractFilter is kinda "seperated" from the rest of the pipeline as long as the input is read correctly and is staying the same throughout the whole process of the registration (and by staying the same I mean having the exact dimension, index and size). So I dont get why I would get an exception on the third iteration for example and not on the second pixel of the first iteration. And Tim, I didnt quiet get how I am "replacing the full image data (the input) with the small neighborhood', because my image ( this->m_FixedImage ) is staying always the same ( applying this->m_FixedImage->GetLargestPossibleRegion() gives always the right result ) and what I'm changing is just what I called F_Size and F_Start in my code which are used to creat another region (F_Region) and this is the region I'm changing. So could you please help me out here if I'm missing something ? Thanks in advance for your help. Iyas On Thu, Oct 8, 2015 at 3:26 PM, Timothee Evain wrote: > Hello Iyas > > I think you problem is coming from the fact you are using the filter in > place ("extracter->InPlaceOn();") > When you run your filter once, that's good, but you are replacing the full > image data (the input) with the small neighborhood. > So basically after your first iteration, you are requesting the next > neighborhood regarding the full image, which is outbound regarding the > previous neighborhood. > > HTH > > Tim > > ----- Mail original ----- > De: "Iyas Hamdan" > ?: insight-users at itk.org > Envoy?: Jeudi 8 Octobre 2015 13:07:49 > Objet: [ITK] [ITK-users] Exception caught during extracting a volume, > "Requested region is (at least partially) outside the largest possible > region" > > Hello ITK users, > > I have a problem using the itk::ExtractImageFilter. > > What I'm trying to do is, from a 3D volume, I want to extract a small 3D > neighborhood around each pixel of this volume. > > So I'm using the ExtractImageFilter more than once and I guess that is > where it fails. > > The error I get is the following: > > itk::InvalidRequestedRegionError > Location: itk::DataObject::PropagateRequestedRegion(void) > File:itkDataObject.cxx > Line: 393 > Description: Requested region is (at least partially) outside the largest > possible region. > > > I've looked on several answers to the same issue here in the mailing list > and what they propose is just to replace the Update() by an > UpdateLargestPossibleRegion(). And I did that but I'am still getting the > same error. > > > Here is the code I'm using: > > FixedImageType::RegionType RegionFixed = > this->m_FixedImage->GetLargestPossibleRegion(); > FixedImageType::SizeType F_Size = RegionFixed.GetSize(); > FixedImageType::IndexType F_Start = RegionFixed.GetIndex(); > > /// here I set the F_Size and F_Start to the desired values > /// and I make sure that the region is always in the largest possible > region! > /// with Patch_Size being the size of the neighborhood to be extracted > around the pixel in each dimension > > for (int dim = 0; dim < 3; dim++) > { > if (FixedIndex[dim] < Patch_Size) > F_Start[dim] = 0; > > else > { > if (FixedIndex[dim] > (RegionFixed.GetSize()[dim] - Patch_Size - 1)) > F_Start[dim] = RegionFixed.GetSize()[dim] - (2 * Patch_Size + 1); > else > F_Start[dim] = FixedIndex[dim] - Patch_Size; > } > > F_Size[dim] = 2 * Patch_Size + 1; > } > > FixedImageType::RegionType F_Region; > F_Region.SetSize(F_Size); > F_Region.SetIndex(F_Start); > > typedef itk::ExtractImageFilter< FixedImageType, FixedImageType > > FilterExtractType; > FilterExtractType::Pointer extracter = FilterExtractType::New(); > extracter->InPlaceOn(); > extracter->SetDirectionCollapseToSubmatrix(); > > extracter->SetExtractionRegion(F_Region); > extracter->SetInput(this->m_FixedImage); > > try > { > extracter->UpdateLargestPossibleRegion(); > } > catch (itk::ExceptionObject & err) > { > std::cout << "Exception caught during extracting the volume!" << std::endl; > std::cout << err << std::endl; > } > > > > Any help would be really appreciated. > > Thanks > > Iyas Hamdan > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Oct 8 12:30:29 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 08 Oct 2015 12:30:29 -0400 Subject: [ITK-users] [ITK] Exception caught during extracting a volume, "Requested region is (at least partially) outside the largest possible region" In-Reply-To: <259316890.17157411.1444320778945.JavaMail.zimbra@enst.fr> References: <71566295.16957298.1444310794712.JavaMail.zimbra@enst.fr> <259316890.17157411.1444320778945.JavaMail.zimbra@enst.fr> Message-ID: <78DB8A69-A1E3-4C03-A53C-732CDD78EF5E@mail.nih.gov> Hello, What you need to look at is the "BufferedRegion". I also describe as InPlace as "stealing" the input's buffer. To add to the complexity, the ExtractImageFilter does not always run InPlace when the options is set. It depends to what the input's buffered region in, and that depends on if the filter that generates the input can stream it's requested region. The fact that you are getting this in the 2nd, or 3rd indicate that there are some funny pipeline behaviors happening with inputs and buffers. You likely want to disconnect the pipeline as some point, and take care not to modify that results with subsequent operations. HTH, Brad On Oct 8, 2015, at 12:12 PM, Timothee Evain wrote: > Well, by definition ( http://www.itk.org/Doxygen/html/classitk_1_1InPlaceImageFilter.html ) when you use in place, you are overwriting the same bulk of memory as input. > I don't know how the region data is updated, and maybe if call UpdateLargestRegion() could show you the difference, but your initial fixed image is definitely modified if you process in place. > > Maybe you can try GetInput() after the first iteration on the extracter to see what do you have. > > HTH > > Tim > > ----- Mail original ----- > De: "Iyas Hamdan" > ?: "Timothee Evain" > Cc: insight-users at itk.org, "Bradley Lowekamp" > Envoy?: Jeudi 8 Octobre 2015 17:06:04 > Objet: Re: [ITK] [ITK-users] Exception caught during extracting a volume, "Requested region is (at least partially) outside the largest possible region" > > Thank you Brad and Tim for your replies. > > Brad, you're right I'm sorry I didnt include my whole pipeline because its > a bit complicated. > > Actually what I'm trying to do is an application for image registration, > and I'm using this volume extraction in the metric that I wrote for this > purpose. > > My input is a Dicom series that I'm reading with VTK then transfering to > ITK. > I'm checking if the input is read correctly everytime I go inside the loop > (before applying the ExtractFilter) > And ( this->m_FixedImage->GetLargestPossibleRegion() ) always gives a valid > result concerning the dimension, size and index. > Thats why I thought the problem couldnt be caused by the input. > > I tried deleting the option extracter->InPlaceOn() as you suggested but > I'm still getting the same error. > > What I do find weird though, is that I'm getting this exception in the > second or third iteration of the registration! I mean, in the first > iteration the extracter was able to go through all the pixels and extract a > neighborhood around each pixel and everything was fine. > > But then again, I'm only applying this extracter on the fixed image which > should be the same during the registration process so nothing should change > from one iteration to another, right ? > > And in case I'm not missing anything, the ExtractFilter is kinda > "seperated" from the rest of the pipeline as long as the input is read > correctly and is staying the same throughout the whole process of the > registration (and by staying the same I mean having the exact dimension, > index and size). So I dont get why I would get an exception on the third > iteration for example and not on the second pixel of the first iteration. > > And Tim, I didnt quiet get how I am "replacing the full image data (the > input) with the small neighborhood', because my image ( this->m_FixedImage > ) is staying always the same ( applying > this->m_FixedImage->GetLargestPossibleRegion() gives always the right > result ) and what I'm changing is just what I called F_Size and F_Start in > my code which are used to creat another region (F_Region) and this is the > region I'm changing. > > So could you please help me out here if I'm missing something ? > > Thanks in advance for your help. > > Iyas > > > > > On Thu, Oct 8, 2015 at 3:26 PM, Timothee Evain > wrote: > >> Hello Iyas >> >> I think you problem is coming from the fact you are using the filter in >> place ("extracter->InPlaceOn();") >> When you run your filter once, that's good, but you are replacing the full >> image data (the input) with the small neighborhood. >> So basically after your first iteration, you are requesting the next >> neighborhood regarding the full image, which is outbound regarding the >> previous neighborhood. >> >> HTH >> >> Tim >> >> ----- Mail original ----- >> De: "Iyas Hamdan" >> ?: insight-users at itk.org >> Envoy?: Jeudi 8 Octobre 2015 13:07:49 >> Objet: [ITK] [ITK-users] Exception caught during extracting a volume, >> "Requested region is (at least partially) outside the largest possible >> region" >> >> Hello ITK users, >> >> I have a problem using the itk::ExtractImageFilter. >> >> What I'm trying to do is, from a 3D volume, I want to extract a small 3D >> neighborhood around each pixel of this volume. >> >> So I'm using the ExtractImageFilter more than once and I guess that is >> where it fails. >> >> The error I get is the following: >> >> itk::InvalidRequestedRegionError >> Location: itk::DataObject::PropagateRequestedRegion(void) >> File:itkDataObject.cxx >> Line: 393 >> Description: Requested region is (at least partially) outside the largest >> possible region. >> >> >> I've looked on several answers to the same issue here in the mailing list >> and what they propose is just to replace the Update() by an >> UpdateLargestPossibleRegion(). And I did that but I'am still getting the >> same error. >> >> >> Here is the code I'm using: >> >> FixedImageType::RegionType RegionFixed = >> this->m_FixedImage->GetLargestPossibleRegion(); >> FixedImageType::SizeType F_Size = RegionFixed.GetSize(); >> FixedImageType::IndexType F_Start = RegionFixed.GetIndex(); >> >> /// here I set the F_Size and F_Start to the desired values >> /// and I make sure that the region is always in the largest possible >> region! >> /// with Patch_Size being the size of the neighborhood to be extracted >> around the pixel in each dimension >> >> for (int dim = 0; dim < 3; dim++) >> { >> if (FixedIndex[dim] < Patch_Size) >> F_Start[dim] = 0; >> >> else >> { >> if (FixedIndex[dim] > (RegionFixed.GetSize()[dim] - Patch_Size - 1)) >> F_Start[dim] = RegionFixed.GetSize()[dim] - (2 * Patch_Size + 1); >> else >> F_Start[dim] = FixedIndex[dim] - Patch_Size; >> } >> >> F_Size[dim] = 2 * Patch_Size + 1; >> } >> >> FixedImageType::RegionType F_Region; >> F_Region.SetSize(F_Size); >> F_Region.SetIndex(F_Start); >> >> typedef itk::ExtractImageFilter< FixedImageType, FixedImageType > >> FilterExtractType; >> FilterExtractType::Pointer extracter = FilterExtractType::New(); >> extracter->InPlaceOn(); >> extracter->SetDirectionCollapseToSubmatrix(); >> >> extracter->SetExtractionRegion(F_Region); >> extracter->SetInput(this->m_FixedImage); >> >> try >> { >> extracter->UpdateLargestPossibleRegion(); >> } >> catch (itk::ExceptionObject & err) >> { >> std::cout << "Exception caught during extracting the volume!" << std::endl; >> std::cout << err << std::endl; >> } >> >> >> >> Any help would be really appreciated. >> >> Thanks >> >> Iyas Hamdan >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From roberto.medeiros.souza at gmail.com Thu Oct 8 12:37:44 2015 From: roberto.medeiros.souza at gmail.com (Roberto Medeiros de Souza) Date: Thu, 8 Oct 2015 10:37:44 -0600 Subject: [ITK-users] SimpleITK Bias Field Correction Message-ID: Hi, I'm new to ITK and SimpleITK, and I am trying to use the N4 Bias Field Correction routine. I found this example: http://www.itk.org/SimpleITKDoxygen/html/N4BiasFieldCorrection_8py-example.html As I understand the N4 Bias Field Correction routine has a shrinking factor to speed the processing, but the output image should be the same size as the input image. This example returns a smaller image. Can anyone help me with this code? Thanks. Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Thu Oct 8 13:47:54 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 08 Oct 2015 13:47:54 -0400 Subject: [ITK-users] SimpleITK Bias Field Correction In-Reply-To: References: Message-ID: Hello Roberto, This example script's produces an image with size as the input image, if the command line ShrinkFactor is 1. However if the ShrinkFactor is a greater than one then the output image is shrunk. This shrink factor is independent of the multi-scale N4 algorithm. The N4 algorithm does have a build in multi-scale which runs the optimization a several levels. The output is the same size as the input for the N4 algorithm. Also note that the number of Levels is implicitly set based on the size of the MaximumNumberOfIterations array. HTH, Brad On Oct 8, 2015, at 12:37 PM, Roberto Medeiros de Souza wrote: > Hi, > > I'm new to ITK and SimpleITK, and I am trying to use the N4 Bias Field Correction routine. I found this example: http://www.itk.org/SimpleITKDoxygen/html/N4BiasFieldCorrection_8py-example.html > > As I understand the N4 Bias Field Correction routine has a shrinking factor to speed the processing, but the output image should be the same size as the input image. This example returns a smaller image. Can anyone help me with this code? > > Thanks. > Roberto > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Fri Oct 9 01:47:33 2015 From: zhuangming.shen at sphic.org.cn (=?gb2312?B?yfLXr8P3?=) Date: Fri, 9 Oct 2015 05:47:33 +0000 Subject: [ITK-users] How to connect ITK and VTK in Java Message-ID: <1444369651868.89567@sphic.org.cn> Hi all, I would like to use both ITK and VTK in Java. Does anyone know a way to connect them like ITKVtkGlue in C/C++ or ConnectVTKITK in Python? Thanks in advance. Regards, Zhuangming Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: From varasteh at to.infn.it Fri Oct 9 04:39:32 2015 From: varasteh at to.infn.it (varasteh) Date: Fri, 9 Oct 2015 01:39:32 -0700 (MST) Subject: [ITK-users] SplineOrder, control points and MeshSize of Bspline registration In-Reply-To: <1444315011109-7588006.post@n2.nabble.com> References: <1444210424543-7587998.post@n2.nabble.com> <1444315011109-7588006.post@n2.nabble.com> Message-ID: <1444379972404-7588013.post@n2.nabble.com> Hi Maxime, Many thanks for your explanation. English is my second language as well, so I hope we understand each other correctly. I would like to state that all these questions are because I need to find the exact location of each GridNode (e.g. 5x5x5) for which we have the transform parameters from B-spline registration and also location of Mesh (3x3x3) which seems to me is just the internal part of GridNode (GN - SplineOrder)! 1) So, looking at images of that link, you agree that SplineOrder is equal to 2 for that example (1 lower, 1 upper). But you reject my interpretation of SplineOrder = border control points with deformation equal to Zero. Hope I understood well. 2) About formula for finding the Spacing of GridNodes: - my formula was: dividing the ?distance between first and last pixels of Mesh? by ?MeshSize? and yours: "distance between first and last pixels of Mesh divided by MeshSize" I could not see any difference between these two formulas! Did I miss something? - From word "distance" I mean the "PhysicalDistance (mm)" which can results to set the Nodes not always in the center of voxels. Is this wrong? Have a nice day, varasteh -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/SplineOrder-control-points-and-MeshSize-of-Bspline-registration-tp7587998p7588013.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From itkhelpacc at gmail.com Fri Oct 9 08:58:21 2015 From: itkhelpacc at gmail.com (vis) Date: Fri, 9 Oct 2015 05:58:21 -0700 (MST) Subject: [ITK-users] Z projection of volume rendered data Message-ID: <1444395501302-7588014.post@n2.nabble.com> hi, I have a set of CT image slices.. I want to render this to a volume and project it along the z-axis.. please guide me how to do this... Regards Vishal -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Z-projection-of-volume-rendered-data-tp7588014.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From p.nardelli at umail.ucc.ie Fri Oct 9 10:13:04 2015 From: p.nardelli at umail.ucc.ie (Pietro Nardelli) Date: Fri, 9 Oct 2015 15:13:04 +0100 Subject: [ITK-users] Spiculation and lobulation of a label Message-ID: Hi guys, I have a label coming from the segmentation of a nodule and I was wondering if there is any automatic method to determine if the label margins are spiculated, lobulated or smooth. So far I haven't found much about it. Do you have any idea? Thank you very much, Pietro -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Fri Oct 9 10:44:27 2015 From: matimontg at gmail.com (Matias Montroull) Date: Fri, 09 Oct 2015 14:44:27 +0000 Subject: [ITK-users] [ITK] Z projection of volume rendered data In-Reply-To: <1444395501302-7588014.post@n2.nabble.com> References: <1444395501302-7588014.post@n2.nabble.com> Message-ID: Hi Vis, what programming language are you using? What do you mean by "Project it" do you mean visually navigate through slices? El vie., 9 de oct. de 2015 a la(s) 9:58 a. m., vis escribi?: > hi, > I have a set of CT image slices.. I want to render this to a volume and > project it along the z-axis.. please guide me how to do this... > Regards > Vishal > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Z-projection-of-volume-rendered-data-tp7588014.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 > -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlt.khawla at gmail.com Fri Oct 9 10:44:49 2015 From: mlt.khawla at gmail.com (daoud23) Date: Fri, 9 Oct 2015 07:44:49 -0700 (MST) Subject: [ITK-users] Draw a 3D line in a specific orientation Message-ID: <1444401889417-7588016.post@n2.nabble.com> Hello everyone, I am new to itk and I am trying to draw a line centered in 3D image, by providing it's orientation and its length, in order to get an adaptive linear structuring element. Do you have any idea which class should i use? I took a look on itk::LineConstIterator and itk::LineSpatialObject, but it didn't really help. Thanks Best regards Daoued23 -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Draw-a-3D-line-in-a-specific-orientation-tp7588016.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From neocerber at gmail.com Fri Oct 9 12:31:19 2015 From: neocerber at gmail.com (Maxime Toussaint) Date: Fri, 9 Oct 2015 09:31:19 -0700 (MST) Subject: [ITK-users] SplineOrder, control points and MeshSize of Bspline registration In-Reply-To: <1444379972404-7588013.post@n2.nabble.com> References: <1444210424543-7587998.post@n2.nabble.com> <1444315011109-7588006.post@n2.nabble.com> <1444379972404-7588013.post@n2.nabble.com> Message-ID: <1444408279593-7588018.post@n2.nabble.com> Hi, I knew why you asked the question. I believed you specified it in one of your older post. And you are right, the mesh nodes, for registration, are a subset of the B-Spline grid nodes. 1) Yup! In the example you linked too, I could have chosen to use B-Spline of order 3. In that case, the only change would have been that the number of nodes per-dimension would have been increased by 1 (1 lower, 2 upper). The reason behind this choice is based on the desire of ITK to produce a 3 (because we have chosed BSpline of order 3) times continuous function that approximate the voxel displacement. 2) Sorry! I meant "(distance between first and last pixels of Mesh) / (MeshSize - 1)" I forgot to write the "-1" XD As for "physical distance" vs "voxel distance", I think you are right. I believe that ITK registration work in physical space. Good luck, Max -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/SplineOrder-control-points-and-MeshSize-of-Bspline-registration-tp7587998p7588018.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From itkhelpacc at gmail.com Fri Oct 9 13:42:29 2015 From: itkhelpacc at gmail.com (vis) Date: Fri, 9 Oct 2015 10:42:29 -0700 (MST) Subject: [ITK-users] [ITK] Z projection of volume rendered data In-Reply-To: References: <1444395501302-7588014.post@n2.nabble.com> Message-ID: hi Matias, Im writing the code in c++...i want read the dicom images in series an render them to 3d volume...once these volume is rendered i want to perform z projection.. something like taking x ray image of the RENDERED VOLUME along the z axis.. we take the voxel values along the z axis perform some computation and covert the 3d data to 2d data.. forgive me if i couldnt explain it properly.. regards vishal On Fri, Oct 9, 2015 at 8:14 PM, Matias Montroull [via ITK Insight Users] < ml-node+s2283740n7588017h83 at n2.nabble.com> wrote: > Hi Vis, what programming language are you using? What do you mean by > "Project it" do you mean visually navigate through slices? > > El vie., 9 de oct. de 2015 a la(s) 9:58 a. m., vis <[hidden email] > > escribi?: > >> hi, >> I have a set of CT image slices.. I want to render this to a volume and >> project it along the z-axis.. please guide me how to do this... >> Regards >> Vishal >> >> >> >> -- >> View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/Z-projection-of-volume-rendered-data-tp7588014.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 >> [hidden email] >> http://public.kitware.com/mailman/listinfo/community >> > -- > 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 > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://itk-insight-users.2283740.n2.nabble.com/Z-projection-of-volume-rendered-data-tp7588014p7588017.html > To unsubscribe from Z projection of volume rendered data, click here > > . > NAML > > -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Z-projection-of-volume-rendered-data-tp7588014p7588019.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Fri Oct 9 14:22:21 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 9 Oct 2015 14:22:21 -0400 Subject: [ITK-users] [ITK] Z projection of volume rendered data In-Reply-To: References: <1444395501302-7588014.post@n2.nabble.com> Message-ID: Look at this example: ITK/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx On Fri, Oct 9, 2015 at 1:42 PM, vis wrote: > hi Matias, > Im writing the code in c++...i want read the dicom images in series an > render them to 3d volume...once these volume is rendered i want to perform > z projection.. something like taking x ray image of the RENDERED VOLUME > along the z axis.. we take the voxel values along the z axis perform some > computation and covert the 3d data to 2d data.. forgive me if i couldnt > explain it properly.. > regards > vishal > > On Fri, Oct 9, 2015 at 8:14 PM, Matias Montroull [via ITK Insight Users] < > ml-node+s2283740n7588017h83 at n2.nabble.com> wrote: > >> Hi Vis, what programming language are you using? What do you mean by >> "Project it" do you mean visually navigate through slices? >> >> El vie., 9 de oct. de 2015 a la(s) 9:58 a. m., vis <[hidden email] >> > escribi?: >> >>> hi, >>> I have a set of CT image slices.. I want to render this to a volume and >>> project it along the z-axis.. please guide me how to do this... >>> Regards >>> Vishal >>> >>> >>> >>> -- >>> View this message in context: >>> http://itk-insight-users.2283740.n2.nabble.com/Z-projection-of-volume-rendered-data-tp7588014.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 >>> [hidden email] >>> http://public.kitware.com/mailman/listinfo/community >>> >> -- >> 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 >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussion >> below: >> >> http://itk-insight-users.2283740.n2.nabble.com/Z-projection-of-volume-rendered-data-tp7588014p7588017.html >> To unsubscribe from Z projection of volume rendered data, click here >> >> . >> NAML >> >> > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Z-projection-of-volume-rendered-data-tp7588014p7588019.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 -- Unpaid intern in BillsBasement at noware dot com From kolin9105 at gmail.com Sun Oct 11 09:43:32 2015 From: kolin9105 at gmail.com (meikolin saimara) Date: Sun, 11 Oct 2015 20:43:32 +0700 Subject: [ITK-users] (no subject) Message-ID: hy every one I don't understand about Overlay Label Map On Top Of An Image can you explain at label image.... -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Sun Oct 11 12:14:22 2015 From: michkapopoff at gmail.com (Michka Popoff) Date: Sun, 11 Oct 2015 18:14:22 +0200 Subject: [ITK-users] How to connect ITK and VTK in Java In-Reply-To: <1444369651868.89567@sphic.org.cn> References: <1444369651868.89567@sphic.org.cn> Message-ID: Hi for the moment it is not possible to use ITK with JAVA. So the connection with VTK does not make sense. We just added python3 support; which was already a lot of hard work. Java support may come as soon as we have time to look at it (most of the infrastructure is already there). You may have a look at simpleITK which has Java support. Michka > On 09 Oct 2015, at 07:47, ??? wrote: > > Hi all, > > I would like to use both ITK and VTK in Java. Does anyone know a way to connect them like ITKVtkGlue in C/C++ or ConnectVTKITK in Python? Thanks in advance. > > Regards, > > Zhuangming Shen > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 sorench at gmail.com Mon Oct 12 14:13:50 2015 From: sorench at gmail.com (Soren Christensen) Date: Mon, 12 Oct 2015 11:13:50 -0700 Subject: [ITK-users] python wrapping Message-ID: Hi, I would like to export classes of my own that use ITK so that I can use them from python. What is the best way to go about this? Should I focus on learning SWIG and wrapping my class that way or is there a way to use the mechanism that ITK uses for python wrapping directly (I realize this is SWIG too, but I figured there is some level of automation here)? Any links and pointers appreciated! Thanks! Soren -------------- next part -------------- An HTML attachment was scrubbed... URL: From kevin.keraudren10 at imperial.ac.uk Mon Oct 12 16:29:31 2015 From: kevin.keraudren10 at imperial.ac.uk (Keraudren, Kevin) Date: Mon, 12 Oct 2015 20:29:31 +0000 Subject: [ITK-users] python wrapping In-Reply-To: References: Message-ID: Hi, A quick way is to use cython to interface python and c++, see cyITK there: https://github.com/lantiga/cyitk This is not the same as the SWIG bindings, but should be easier to setup. Kind Regards, Kevin ----- Reply message ----- From: "Soren Christensen" To: "insight-users at itk.org" Subject: [ITK-users] python wrapping Date: Mon, Oct 12, 2015 19:14 Hi, I would like to export classes of my own that use ITK so that I can use them from python. What is the best way to go about this? Should I focus on learning SWIG and wrapping my class that way or is there a way to use the mechanism that ITK uses for python wrapping directly (I realize this is SWIG too, but I figured there is some level of automation here)? Any links and pointers appreciated! Thanks! Soren -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Tue Oct 13 00:05:44 2015 From: itkhelpacc at gmail.com (vis) Date: Mon, 12 Oct 2015 21:05:44 -0700 (MST) Subject: [ITK-users] Information About Projection of 3d CT Message-ID: <1444709144003-7588025.post@n2.nabble.com> hey, im trying to learn more about projection of 3D CT volume to 2D plane and then study the difference between the projected image and slices of the volume.. i would like to vary the camera position and compare with the slices of the CT volume as well as with projections obtained with the various other camera position..could anyone pls tell me where a beginner like me should look for information about this ? regards Vishal -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Information-About-Projection-of-3d-CT-tp7588025.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From dan.muel at gmail.com Tue Oct 13 00:50:01 2015 From: dan.muel at gmail.com (Dan Mueller) Date: Tue, 13 Oct 2015 15:20:01 +1030 Subject: [ITK-users] Information About Projection of 3d CT In-Reply-To: <1444709144003-7588025.post@n2.nabble.com> References: <1444709144003-7588025.post@n2.nabble.com> Message-ID: Hi, >From your email I wasn't sure if you wanted to project the entire 3D volume onto a 2D plane, or just take a cross-section through the 3D volume? If the later (take a 2D cross section through the 3D volume), then you may want to investigate the "LookAt Transform Initializer and Oblique Section Image Filter": http://www.insight-journal.org/browse/publication/168 Hope this helps. Cheers, Dan On 13 October 2015 at 14:35, vis wrote: > hey, > im trying to learn more about projection of 3D CT volume to 2D plane and > then study the difference between the projected image and slices of the > volume.. i would like to vary the camera position and compare with the > slices of the CT volume as well as with projections obtained with the > various other camera position..could anyone pls tell me where a beginner > like me should look for information about this ? > regards > Vishal > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Information-About-Projection-of-3d-CT-tp7588025.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 itkhelpacc at gmail.com Tue Oct 13 00:55:20 2015 From: itkhelpacc at gmail.com (vis) Date: Mon, 12 Oct 2015 21:55:20 -0700 (MST) Subject: [ITK-users] Information About Projection of 3d CT In-Reply-To: References: <1444709144003-7588025.post@n2.nabble.com> Message-ID: hi dan, sorry my mail wasnt clear.. i would like to project the entire 3D volume onto a 2D plane.. and i want to do it for various angle of projection.. regards vishal On Tue, Oct 13, 2015 at 10:20 AM, Dan Mueller [via ITK Insight Users] < ml-node+s2283740n7588026h62 at n2.nabble.com> wrote: > Hi, > > From your email I wasn't sure if you wanted to project the entire 3D > volume onto a 2D plane, or just take a cross-section through the 3D > volume? If the later (take a 2D cross section through the 3D volume), > then you may want to investigate the "LookAt Transform Initializer and > Oblique Section Image Filter": > http://www.insight-journal.org/browse/publication/168 > > Hope this helps. > > Cheers, Dan > > On 13 October 2015 at 14:35, vis <[hidden email] > > wrote: > > > hey, > > im trying to learn more about projection of 3D CT volume to 2D plane and > > then study the difference between the projected image and slices of the > > volume.. i would like to vary the camera position and compare with the > > slices of the CT volume as well as with projections obtained with the > > various other camera position..could anyone pls tell me where a beginner > > like me should look for information about this ? > > regards > > Vishal > > > > > > > > -- > > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Information-About-Projection-of-3d-CT-tp7588025.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/Information-About-Projection-of-3d-CT-tp7588025p7588026.html > To unsubscribe from Information About Projection of 3d CT, click here > > . > NAML > > -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Information-About-Projection-of-3d-CT-tp7588025p7588027.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From dan.muel at gmail.com Tue Oct 13 01:28:39 2015 From: dan.muel at gmail.com (Dan Mueller) Date: Tue, 13 Oct 2015 15:58:39 +1030 Subject: [ITK-users] Information About Projection of 3d CT In-Reply-To: References: <1444709144003-7588025.post@n2.nabble.com> Message-ID: Hi, In that case you may want to look at the following links: http://www.itk.org/Doxygen/html/Examples_2Filtering_2DigitallyReconstructedRadiograph1_8cxx-example.html http://www.itk.org/Doxygen/html/classitk_1_1RayCastInterpolateImageFunction.html Hope this helps. Regards, Dan On 13 October 2015 at 15:25, vis wrote: > hi dan, > sorry my mail wasnt clear.. i would like to project the entire 3D volume > onto a 2D plane.. and i want to do it for various angle of projection.. > regards > vishal > > On Tue, Oct 13, 2015 at 10:20 AM, Dan Mueller [via ITK Insight Users] < > ml-node+s2283740n7588026h62 at n2.nabble.com> wrote: > >> Hi, >> >> From your email I wasn't sure if you wanted to project the entire 3D >> volume onto a 2D plane, or just take a cross-section through the 3D >> volume? If the later (take a 2D cross section through the 3D volume), >> then you may want to investigate the "LookAt Transform Initializer and >> Oblique Section Image Filter": >> http://www.insight-journal.org/browse/publication/168 >> >> Hope this helps. >> >> Cheers, Dan >> >> On 13 October 2015 at 14:35, vis <[hidden email] >> > wrote: >> >> > hey, >> > im trying to learn more about projection of 3D CT volume to 2D plane and >> > then study the difference between the projected image and slices of the >> > volume.. i would like to vary the camera position and compare with the >> > slices of the CT volume as well as with projections obtained with the >> > various other camera position..could anyone pls tell me where a beginner >> > like me should look for information about this ? >> > regards >> > Vishal >> > >> > >> > >> > -- >> > View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/Information-About-Projection-of-3d-CT-tp7588025.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/Information-About-Projection-of-3d-CT-tp7588025p7588026.html >> To unsubscribe from Information About Projection of 3d CT, click here >> >> . >> NAML >> >> > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Information-About-Projection-of-3d-CT-tp7588025p7588027.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 noreply at insightsoftwareconsortium.org Tue Oct 13 07:29:53 2015 From: noreply at insightsoftwareconsortium.org (MIDAS Journal) Date: Tue, 13 Oct 2015 07:29:53 -0400 (EDT) Subject: [ITK-users] New Submission: Tensor Spectral Matching of Diffusion Weighted Images Message-ID: <20151013112953.ECEEB3D6253E@insight-journal.org> Hello, A new submission has been added to the MIDAS Journal. Title: Tensor Spectral Matching of Diffusion Weighted Images Authors: Orasanu E., Melbourne A., Lorenzi M., Modat M., Lombaert H., Eaton-Rosen Z., Robertson N.J., Kendall G.S., Marlow N., Ourselin S. Abstract: Very preterm birth coincides with a period of major development in the brain, with striking changes in volume, cortex folding and significant change at the microstructural level. Diffusion MRI is sensitive to motion of water on the scale of microns, allowing us to investigate some of these changes. Mapping of diffusion tensors is a challenging process, and existing methods fail to account for the major changes that take place between 30 and 40 weeks equivalent gestational age. In this paper we introduce the spectral matching in the context of non-linear registration of diffusion images. Spatial correspondences are defined with respect to the main spectral modes of the images, which are global descriptors of the tensor information. We apply tensor spectral matching (TSM) in two different ways: by estimation of spatial correspondences uniquely based on the spectral decomposition of diffusion tensor images, and by combination of TSM with a standard diffusion tensor registratio n algorithm (TSM-DTI-TK). We validate the proposed approaches on 20 adult controls, and we compare it to the state-of-art registration method. We then apply these methods to longitudinal diffusion data acquired from 6 extremely preterm-born infants scanned shortly after birth and at term equivalent age. The experimental results combining TSM with standard tensor registration outperform the state-of-art when applied to both adult and preterm data. Having a reliable anatomical correspondence in preterm infants allows us to quantify microstructural changes and to work towards developing biomarkers of neurological impairment. Download and review this publication at: http://hdl.handle.net/10380/3528 Generated by the MIDAS Journal You are receiving this email because you asked to be informed by the MIDAS Journal for new submissions. To change your email preference visit http://www.midasjournal.org/ . From noreply at insightsoftwareconsortium.org Tue Oct 13 07:30:31 2015 From: noreply at insightsoftwareconsortium.org (MIDAS Journal) Date: Tue, 13 Oct 2015 07:30:31 -0400 (EDT) Subject: [ITK-users] New Submission: The graph windowed Fourier transform: a tool to quantify the gyrifition of the cerebral cortex Message-ID: <20151013113031.842A23D629C8@insight-journal.org> Hello, A new submission has been added to the MIDAS Journal. Title: The graph windowed Fourier transform: a tool to quantify the gyrifition of the cerebral cortex Authors: Rabiei H., Richard F., Roth M., Anton J., Coulon O., Lefevre J. Abstract: The Gyrification Index (GI) quantifies the amount of folding of a cortical surface. In this paper, we show the efficiency of spectral analysis to perform such a task, and in particular we explain how the graph windowed Fourier transform can be used as a tool to define new GIs with multiscale properties. We propose two different GIs and study their effect on a set of subjects whose cortical surfaces are modeled with triangular meshes. Download and review this publication at: http://hdl.handle.net/10380/3527 Generated by the MIDAS Journal You are receiving this email because you asked to be informed by the MIDAS Journal for new submissions. To change your email preference visit http://www.midasjournal.org/ . From sorench at gmail.com Tue Oct 13 16:56:05 2015 From: sorench at gmail.com (Soren Christensen) Date: Tue, 13 Oct 2015 13:56:05 -0700 Subject: [ITK-users] python wrapping In-Reply-To: References: Message-ID: Thanks a lot - this looks well suited for what I need, will try it out! Soren On Mon, Oct 12, 2015 at 1:29 PM, Keraudren, Kevin < kevin.keraudren10 at imperial.ac.uk> wrote: > Hi, > > A quick way is to use cython to interface python and c++, see cyITK there: > https://github.com/lantiga/cyitk > > This is not the same as the SWIG bindings, but should be easier to setup. > > Kind Regards, > > Kevin > > > ----- Reply message ----- > From: "Soren Christensen" > To: "insight-users at itk.org" > Subject: [ITK-users] python wrapping > Date: Mon, Oct 12, 2015 19:14 > > Hi, > I would like to export classes of my own that use ITK so that I can use > them from python. What is the best way to go about this? Should I focus on > learning SWIG and wrapping my class that way or is there a way to use the > mechanism that ITK uses for python wrapping directly (I realize this is > SWIG too, but I figured there is some level of automation here)? Any links > and pointers appreciated! > > Thanks! > Soren > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Tue Oct 13 17:01:11 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 13 Oct 2015 17:01:11 -0400 Subject: [ITK-users] python wrapping In-Reply-To: References: Message-ID: Hi Soren, There is work in progress to easily add Python wrapping to ITK classes. Please add yourself as a reviewer to the following patches to keep up with the progress and become involved: http://review.source.kitware.com/#/c/20211/ http://review.source.kitware.com/#/c/19958/ Thanks, Matt On Tue, Oct 13, 2015 at 4:56 PM, Soren Christensen wrote: > Thanks a lot - this looks well suited for what I need, will try it out! > > > Soren > > > > On Mon, Oct 12, 2015 at 1:29 PM, Keraudren, Kevin > wrote: >> >> Hi, >> >> A quick way is to use cython to interface python and c++, see cyITK there: >> https://github.com/lantiga/cyitk >> >> This is not the same as the SWIG bindings, but should be easier to setup. >> >> Kind Regards, >> >> Kevin >> >> >> ----- Reply message ----- >> From: "Soren Christensen" >> To: "insight-users at itk.org" >> Subject: [ITK-users] python wrapping >> Date: Mon, Oct 12, 2015 19:14 >> >> Hi, >> I would like to export classes of my own that use ITK so that I can use >> them from python. What is the best way to go about this? Should I focus on >> learning SWIG and wrapping my class that way or is there a way to use the >> mechanism that ITK uses for python wrapping directly (I realize this is SWIG >> too, but I figured there is some level of automation here)? Any links and >> pointers appreciated! >> >> Thanks! >> Soren > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From s120049 at e.ntu.edu.sg Wed Oct 14 02:37:09 2015 From: s120049 at e.ntu.edu.sg (geetha) Date: Tue, 13 Oct 2015 23:37:09 -0700 (MST) Subject: [ITK-users] Diffeomorphic demons registration Message-ID: Hi, I'm trying to register two images with diffeomorphic demons filter using multiresolutionPDEregistration. However, when I registered ratlungslice examples in ITK/Data, the registration isn't very accurate. I tried changing parameters but the registration is not accurate enough. How do I tune parameters for better registration output? Thanks, Geetha Diffdemons.rar (2K) -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Diffeomorphic-demons-registration-tp7588033.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From p.zaffino at yahoo.it Wed Oct 14 04:51:42 2015 From: p.zaffino at yahoo.it (Paolo Zaffino) Date: Wed, 14 Oct 2015 10:51:42 +0200 Subject: [ITK-users] Python wrapping issue Message-ID: <561E179E.2000602@yahoo.it> Dear ITK community, I compiled ITK 4.8 into an Ubuntu 14.04 machine enabling also the python wrapping. Compiling the code took really a while and I had to restart the make phase more than one time since it crashed without any apparently reason. Finally when the make step was over I executed the make install command. If I open ipython and I type "import itkImagePython" it returns --------------------------------------------------------------------------- ImportError Traceback (most recent call last) in () ----> 1 import itkImagePython /usr/local/lib/ITK-4.8/Python/itkImagePython.py in () 30 fp.close() 31 return _mod ---> 32 _itkImagePython = swig_import_helper() 33 del swig_import_helper 34 else: /usr/local/lib/ITK-4.8/Python/itkImagePython.py in swig_import_helper() 22 fp, pathname, description = imp.find_module('_itkImagePython', [dirname(__file__)]) 23 except ImportError: ---> 24 import _itkImagePython 25 return _itkImagePython 26 if fp is not None: ImportError: No module named _itkImagePython but if I run "import ITKRegionGrowingPython" it works. In addition, after importing ITKRegionGrowingPython also itkImagePython works! I think the path is correctly set, since I see /usr/local/lib/ITK-4.8/Python. I also noted that in the "compiledFolder/lib" I see: * ITKRegionGrowingPython.py and _ITKRegionGrowingPython.so * itkImagePython.py but NOT _itkImagePython.so Do you have any idea? Furthermore, is it the syntax itk.something still valid or it has been replaced by separate submodules? Because if I run hm=itk.HistogramMatchingImageFilter() I get UnboundLocalError: local variable 'module' referenced before assignment Thank you very much. Regards. Paolo -------------- next part -------------- An HTML attachment was scrubbed... URL: From lassi.paavolainen at jyu.fi Wed Oct 14 05:27:48 2015 From: lassi.paavolainen at jyu.fi (Paavolainen, Lassi) Date: Wed, 14 Oct 2015 09:27:48 +0000 Subject: [ITK-users] Python wrapping issue In-Reply-To: <561E179E.2000602@yahoo.it> References: <561E179E.2000602@yahoo.it> Message-ID: Hi Paolo, Why you want to import itkImagePython instead of just itk? import itk img = itk.Image.F3.New() should work as previously. Notice that itk.HistogramMatchingImageFilter() would not work in any case since you need to define the types as well. The modular design of ITK 4 should not have effected the interface of ITK Python wrappings in anyway. If I'm wrong then maybe someone can correct me. So I would first check that you are able to import itk and load some filter. If not, then check that all shared libs are in search path. Cheers, Lassi ________________________________ From: Insight-users [insight-users-bounces at itk.org] on behalf of Paolo Zaffino [p.zaffino at yahoo.it] Sent: Wednesday, October 14, 2015 11:51 To: insight-users at itk.org Subject: [ITK-users] Python wrapping issue Dear ITK community, I compiled ITK 4.8 into an Ubuntu 14.04 machine enabling also the python wrapping. Compiling the code took really a while and I had to restart the make phase more than one time since it crashed without any apparently reason. Finally when the make step was over I executed the make install command. If I open ipython and I type "import itkImagePython" it returns --------------------------------------------------------------------------- ImportError Traceback (most recent call last) in () ----> 1 import itkImagePython /usr/local/lib/ITK-4.8/Python/itkImagePython.py in () 30 fp.close() 31 return _mod ---> 32 _itkImagePython = swig_import_helper() 33 del swig_import_helper 34 else: /usr/local/lib/ITK-4.8/Python/itkImagePython.py in swig_import_helper() 22 fp, pathname, description = imp.find_module('_itkImagePython', [dirname(__file__)]) 23 except ImportError: ---> 24 import _itkImagePython 25 return _itkImagePython 26 if fp is not None: ImportError: No module named _itkImagePython but if I run "import ITKRegionGrowingPython" it works. In addition, after importing ITKRegionGrowingPython also itkImagePython works! I think the path is correctly set, since I see /usr/local/lib/ITK-4.8/Python. I also noted that in the "compiledFolder/lib" I see: * ITKRegionGrowingPython.py and _ITKRegionGrowingPython.so * itkImagePython.py but NOT _itkImagePython.so Do you have any idea? Furthermore, is it the syntax itk.something still valid or it has been replaced by separate submodules? Because if I run hm=itk.HistogramMatchingImageFilter() I get UnboundLocalError: local variable 'module' referenced before assignment Thank you very much. Regards. Paolo -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Oct 14 10:48:58 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 14 Oct 2015 10:48:58 -0400 Subject: [ITK-users] Python wrapping issue In-Reply-To: References: <561E179E.2000602@yahoo.it> Message-ID: Hi Paolo, Lassi has some good suggestions. Some additional information: If you use ITK Git master [1], the Python wrapping builds in half the time as ITK 4.8. To create a histogram matching filter, the preferred syntax is: import itk Dimension = 3 PixelType = itk.F ImageType = itk.Image[PixelType, Dimension] histogramMatching = itk.HistogramMatchingImageFilter[ImageType, ImageType].New() Hope this helps, Matt [1] http://www.itk.org/Wiki/ITK/Git On Wed, Oct 14, 2015 at 5:27 AM, Paavolainen, Lassi wrote: > Hi Paolo, > > Why you want to import itkImagePython instead of just itk? > > import itk > img = itk.Image.F3.New() > > should work as previously. Notice that > itk.HistogramMatchingImageFilter() > would not work in any case since you need to define the types as well. > > The modular design of ITK 4 should not have effected the interface of ITK > Python wrappings in anyway. If I'm wrong then maybe someone can correct me. > > So I would first check that you are able to import itk and load some filter. > If not, then check that all shared libs are in search path. > > Cheers, > Lassi > > ________________________________ > From: Insight-users [insight-users-bounces at itk.org] on behalf of Paolo > Zaffino [p.zaffino at yahoo.it] > Sent: Wednesday, October 14, 2015 11:51 > To: insight-users at itk.org > Subject: [ITK-users] Python wrapping issue > > Dear ITK community, > I compiled ITK 4.8 into an Ubuntu 14.04 machine enabling also the python > wrapping. > Compiling the code took really a while and I had to restart the make phase > more than one time since it crashed without any apparently reason. > Finally when the make step was over I executed the make install command. > > If I open ipython and I type "import itkImagePython" it returns > > --------------------------------------------------------------------------- > ImportError Traceback (most recent call last) > in () > ----> 1 import itkImagePython > > /usr/local/lib/ITK-4.8/Python/itkImagePython.py in () > 30 fp.close() > 31 return _mod > ---> 32 _itkImagePython = swig_import_helper() > 33 del swig_import_helper > 34 else: > > /usr/local/lib/ITK-4.8/Python/itkImagePython.py in swig_import_helper() > 22 fp, pathname, description = > imp.find_module('_itkImagePython', [dirname(__file__)]) > 23 except ImportError: > ---> 24 import _itkImagePython > 25 return _itkImagePython > 26 if fp is not None: > > ImportError: No module named _itkImagePython > > but if I run "import ITKRegionGrowingPython" it works. > In addition, after importing ITKRegionGrowingPython also itkImagePython > works! > > I think the path is correctly set, since I see > /usr/local/lib/ITK-4.8/Python. > I also noted that in the "compiledFolder/lib" I see: > > ITKRegionGrowingPython.py and _ITKRegionGrowingPython.so > itkImagePython.py but NOT _itkImagePython.so > > > Do you have any idea? > > Furthermore, is it the syntax itk.something still valid or it has been > replaced by separate submodules? > Because if I run > hm=itk.HistogramMatchingImageFilter() > I get > UnboundLocalError: local variable 'module' referenced before assignment > > Thank you very much. > Regards. > > Paolo > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From p.zaffino at yahoo.it Wed Oct 14 11:17:38 2015 From: p.zaffino at yahoo.it (Paolo Zaffino) Date: Wed, 14 Oct 2015 17:17:38 +0200 Subject: [ITK-users] Python wrapping issue In-Reply-To: References: <561E179E.2000602@yahoo.it> Message-ID: <561E7212.7020109@yahoo.it> Hi Matt and hi all, thank you very much for your help. Unfortunately python crashes (segmentation fault) at the final phase of these three examples (basically when I try to create an image): 1. import itk Dimension = 3 PixelType = itk.F ImageType = itk.Image[PixelType, Dimension] 2. import itk img = itk.Image.F3.New() 3. import itk pixelType = itk.UC imageType = itk.Image[pixelType, 2] Any idea? Thank you very much again. Best. Paolo On 14/10/2015 16:48, Matt McCormick wrote: > Hi Paolo, > > Lassi has some good suggestions. Some additional information: > > If you use ITK Git master [1], the Python wrapping builds in half the > time as ITK 4.8. > > To create a histogram matching filter, the preferred syntax is: > > import itk > Dimension = 3 > PixelType = itk.F > ImageType = itk.Image[PixelType, Dimension] > histogramMatching = itk.HistogramMatchingImageFilter[ImageType, > ImageType].New() > > Hope this helps, > Matt > > [1] http://www.itk.org/Wiki/ITK/Git > > On Wed, Oct 14, 2015 at 5:27 AM, Paavolainen, Lassi > wrote: >> Hi Paolo, >> >> Why you want to import itkImagePython instead of just itk? >> >> import itk >> img = itk.Image.F3.New() >> >> should work as previously. Notice that >> itk.HistogramMatchingImageFilter() >> would not work in any case since you need to define the types as well. >> >> The modular design of ITK 4 should not have effected the interface of ITK >> Python wrappings in anyway. If I'm wrong then maybe someone can correct me. >> >> So I would first check that you are able to import itk and load some filter. >> If not, then check that all shared libs are in search path. >> >> Cheers, >> Lassi >> >> ________________________________ >> From: Insight-users [insight-users-bounces at itk.org] on behalf of Paolo >> Zaffino [p.zaffino at yahoo.it] >> Sent: Wednesday, October 14, 2015 11:51 >> To: insight-users at itk.org >> Subject: [ITK-users] Python wrapping issue >> >> Dear ITK community, >> I compiled ITK 4.8 into an Ubuntu 14.04 machine enabling also the python >> wrapping. >> Compiling the code took really a while and I had to restart the make phase >> more than one time since it crashed without any apparently reason. >> Finally when the make step was over I executed the make install command. >> >> If I open ipython and I type "import itkImagePython" it returns >> >> --------------------------------------------------------------------------- >> ImportError Traceback (most recent call last) >> in () >> ----> 1 import itkImagePython >> >> /usr/local/lib/ITK-4.8/Python/itkImagePython.py in () >> 30 fp.close() >> 31 return _mod >> ---> 32 _itkImagePython = swig_import_helper() >> 33 del swig_import_helper >> 34 else: >> >> /usr/local/lib/ITK-4.8/Python/itkImagePython.py in swig_import_helper() >> 22 fp, pathname, description = >> imp.find_module('_itkImagePython', [dirname(__file__)]) >> 23 except ImportError: >> ---> 24 import _itkImagePython >> 25 return _itkImagePython >> 26 if fp is not None: >> >> ImportError: No module named _itkImagePython >> >> but if I run "import ITKRegionGrowingPython" it works. >> In addition, after importing ITKRegionGrowingPython also itkImagePython >> works! >> >> I think the path is correctly set, since I see >> /usr/local/lib/ITK-4.8/Python. >> I also noted that in the "compiledFolder/lib" I see: >> >> ITKRegionGrowingPython.py and _ITKRegionGrowingPython.so >> itkImagePython.py but NOT _itkImagePython.so >> >> >> Do you have any idea? >> >> Furthermore, is it the syntax itk.something still valid or it has been >> replaced by separate submodules? >> Because if I run >> hm=itk.HistogramMatchingImageFilter() >> I get >> UnboundLocalError: local variable 'module' referenced before assignment >> >> Thank you very much. >> Regards. >> >> Paolo >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 sami.koho at gmail.com Wed Oct 14 11:32:39 2015 From: sami.koho at gmail.com (Sami Koho) Date: Wed, 14 Oct 2015 17:32:39 +0200 Subject: [ITK-users] Python wrapping issue In-Reply-To: <561E7212.7020109@yahoo.it> References: <561E179E.2000602@yahoo.it> <561E7212.7020109@yahoo.it> Message-ID: Hi Paolo, a couple of thoughts from my own experiences on various platforms. I haven?t had any problems with ITK on Ubuntu, when used with the standard system Python 2.7, so some of these might not apply: Do you happen to have several different Python distributions on your computer? I have seen such crashing when the ITK was built against one distribution and then used in another. I have also had some difficulties with using ITK Python wrapping on Anaconda. It might also be a compiler compatibility problem, ie. if the Python distribution has been compiled with a different compiler than ITK, but I wouldn?t expect this on Ubuntu, as everything is built with the same GNU compilers. Best, Sami > On 14 Oct 2015, at 17:17, Paolo Zaffino wrote: > > Hi Matt and hi all, > thank you very much for your help. > Unfortunately python crashes (segmentation fault) at the final phase of these three examples (basically when I try to create an image): > import itk > Dimension = 3 > PixelType = itk.F > ImageType = itk.Image[PixelType, Dimension] > > import itk > img = itk.Image.F3.New() > > import itk > pixelType = itk.UC > imageType = itk.Image[pixelType, 2] > > Any idea? > Thank you very much again. > > Best. > Paolo > > > > On 14/10/2015 16:48, Matt McCormick wrote: >> Hi Paolo, >> >> Lassi has some good suggestions. Some additional information: >> >> If you use ITK Git master [1], the Python wrapping builds in half the >> time as ITK 4.8. >> >> To create a histogram matching filter, the preferred syntax is: >> >> import itk >> Dimension = 3 >> PixelType = itk.F >> ImageType = itk.Image[PixelType, Dimension] >> histogramMatching = itk.HistogramMatchingImageFilter[ImageType, >> ImageType].New() >> >> Hope this helps, >> Matt >> >> [1] http://www.itk.org/Wiki/ITK/Git >> >> On Wed, Oct 14, 2015 at 5:27 AM, Paavolainen, Lassi >> wrote: >>> Hi Paolo, >>> >>> Why you want to import itkImagePython instead of just itk? >>> >>> import itk >>> img = itk.Image.F3.New() >>> >>> should work as previously. Notice that >>> itk.HistogramMatchingImageFilter() >>> would not work in any case since you need to define the types as well. >>> >>> The modular design of ITK 4 should not have effected the interface of ITK >>> Python wrappings in anyway. If I'm wrong then maybe someone can correct me. >>> >>> So I would first check that you are able to import itk and load some filter. >>> If not, then check that all shared libs are in search path. >>> >>> Cheers, >>> Lassi >>> >>> ________________________________ >>> From: Insight-users [insight-users-bounces at itk.org ] on behalf of Paolo >>> Zaffino [p.zaffino at yahoo.it ] >>> Sent: Wednesday, October 14, 2015 11:51 >>> To: insight-users at itk.org >>> Subject: [ITK-users] Python wrapping issue >>> >>> Dear ITK community, >>> I compiled ITK 4.8 into an Ubuntu 14.04 machine enabling also the python >>> wrapping. >>> Compiling the code took really a while and I had to restart the make phase >>> more than one time since it crashed without any apparently reason. >>> Finally when the make step was over I executed the make install command. >>> >>> If I open ipython and I type "import itkImagePython" it returns >>> >>> --------------------------------------------------------------------------- >>> ImportError Traceback (most recent call last) >>> in () >>> ----> 1 import itkImagePython >>> >>> /usr/local/lib/ITK-4.8/Python/itkImagePython.py in () >>> 30 fp.close() >>> 31 return _mod >>> ---> 32 _itkImagePython = swig_import_helper() >>> 33 del swig_import_helper >>> 34 else: >>> >>> /usr/local/lib/ITK-4.8/Python/itkImagePython.py in swig_import_helper() >>> 22 fp, pathname, description = >>> imp.find_module('_itkImagePython', [dirname(__file__)]) >>> 23 except ImportError: >>> ---> 24 import _itkImagePython >>> 25 return _itkImagePython >>> 26 if fp is not None: >>> >>> ImportError: No module named _itkImagePython >>> >>> but if I run "import ITKRegionGrowingPython" it works. >>> In addition, after importing ITKRegionGrowingPython also itkImagePython >>> works! >>> >>> I think the path is correctly set, since I see >>> /usr/local/lib/ITK-4.8/Python. >>> I also noted that in the "compiledFolder/lib" I see: >>> >>> ITKRegionGrowingPython.py and _ITKRegionGrowingPython.so >>> itkImagePython.py but NOT _itkImagePython.so >>> >>> >>> Do you have any idea? >>> >>> Furthermore, is it the syntax itk.something still valid or it has been >>> replaced by separate submodules? >>> Because if I run >>> hm=itk.HistogramMatchingImageFilter() >>> I get >>> UnboundLocalError: local variable 'module' referenced before assignment >>> >>> Thank you very much. >>> Regards. >>> >>> Paolo >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 Wed Oct 14 12:36:05 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 14 Oct 2015 12:36:05 -0400 Subject: [ITK-users] Python wrapping issue In-Reply-To: References: <561E179E.2000602@yahoo.it> <561E7212.7020109@yahoo.it> Message-ID: Hi, Yes, Sami make good points. It is important to check that PYTHON_EXECUTABLE PYTHON_INCLUDE_DIR PYTHON_LIBRARY are set to consistent values in ITK's CMake build configuration. To see what types available for different objects, which depends on the CMake configuration, use the GetTypes() method. For example import itk print(itk.Image.GetTypes()) print(itk.HistogramMatchingImageFilter.GetTypes()) The HistogramMatchingImageFilter can also be called in SimpleITK: import SimpleITK as sitk result = sitk.HistogramMatching(image1, image2) # or, the object oriented interface histogramMatching = sitk.HistogramMatchingImageFilter() Hope this helps, Matt On Wed, Oct 14, 2015 at 11:32 AM, Sami Koho wrote: > Hi Paolo, > > a couple of thoughts from my own experiences on various platforms. I haven?t > had any problems with ITK on Ubuntu, when used with the standard system > Python 2.7, so some of these might not apply: > > Do you happen to have several different Python distributions on your > computer? I have seen such crashing when the ITK was built against one > distribution and then used in another. I have also had some difficulties > with using ITK Python wrapping on Anaconda. It might also be a compiler > compatibility problem, ie. if the Python distribution has been compiled with > a different compiler than ITK, but I wouldn?t expect this on Ubuntu, as > everything is built with the same GNU compilers. > > Best, > > Sami > > > On 14 Oct 2015, at 17:17, Paolo Zaffino wrote: > > Hi Matt and hi all, > thank you very much for your help. > Unfortunately python crashes (segmentation fault) at the final phase of > these three examples (basically when I try to create an image): > > import itk > Dimension = 3 > PixelType = itk.F > ImageType = itk.Image[PixelType, Dimension] > > import itk > img = itk.Image.F3.New() > > import itk > pixelType = itk.UC > imageType = itk.Image[pixelType, 2] > > Any idea? > Thank you very much again. > > Best. > Paolo > > > > On 14/10/2015 16:48, Matt McCormick wrote: > > Hi Paolo, > > Lassi has some good suggestions. Some additional information: > > If you use ITK Git master [1], the Python wrapping builds in half the > time as ITK 4.8. > > To create a histogram matching filter, the preferred syntax is: > > import itk > Dimension = 3 > PixelType = itk.F > ImageType = itk.Image[PixelType, Dimension] > histogramMatching = itk.HistogramMatchingImageFilter[ImageType, > ImageType].New() > > Hope this helps, > Matt > > [1] http://www.itk.org/Wiki/ITK/Git > > On Wed, Oct 14, 2015 at 5:27 AM, Paavolainen, Lassi > wrote: > > Hi Paolo, > > Why you want to import itkImagePython instead of just itk? > > import itk > img = itk.Image.F3.New() > > should work as previously. Notice that > itk.HistogramMatchingImageFilter() > would not work in any case since you need to define the types as well. > > The modular design of ITK 4 should not have effected the interface of ITK > Python wrappings in anyway. If I'm wrong then maybe someone can correct me. > > So I would first check that you are able to import itk and load some filter. > If not, then check that all shared libs are in search path. > > Cheers, > Lassi > > ________________________________ > From: Insight-users [insight-users-bounces at itk.org] on behalf of Paolo > Zaffino [p.zaffino at yahoo.it] > Sent: Wednesday, October 14, 2015 11:51 > To: insight-users at itk.org > Subject: [ITK-users] Python wrapping issue > > Dear ITK community, > I compiled ITK 4.8 into an Ubuntu 14.04 machine enabling also the python > wrapping. > Compiling the code took really a while and I had to restart the make phase > more than one time since it crashed without any apparently reason. > Finally when the make step was over I executed the make install command. > > If I open ipython and I type "import itkImagePython" it returns > > --------------------------------------------------------------------------- > ImportError Traceback (most recent call last) > in () > ----> 1 import itkImagePython > > /usr/local/lib/ITK-4.8/Python/itkImagePython.py in () > 30 fp.close() > 31 return _mod > ---> 32 _itkImagePython = swig_import_helper() > 33 del swig_import_helper > 34 else: > > /usr/local/lib/ITK-4.8/Python/itkImagePython.py in swig_import_helper() > 22 fp, pathname, description = > imp.find_module('_itkImagePython', [dirname(__file__)]) > 23 except ImportError: > ---> 24 import _itkImagePython > 25 return _itkImagePython > 26 if fp is not None: > > ImportError: No module named _itkImagePython > > but if I run "import ITKRegionGrowingPython" it works. > In addition, after importing ITKRegionGrowingPython also itkImagePython > works! > > I think the path is correctly set, since I see > /usr/local/lib/ITK-4.8/Python. > I also noted that in the "compiledFolder/lib" I see: > > ITKRegionGrowingPython.py and _ITKRegionGrowingPython.so > itkImagePython.py but NOT _itkImagePython.so > > > Do you have any idea? > > Furthermore, is it the syntax itk.something still valid or it has been > replaced by separate submodules? > Because if I run > hm=itk.HistogramMatchingImageFilter() > I get > UnboundLocalError: local variable 'module' referenced before assignment > > Thank you very much. > Regards. > > Paolo > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > From s.serviddio at gmail.com Wed Oct 14 13:19:27 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Wed, 14 Oct 2015 17:19:27 +0000 Subject: [ITK-users] Difference between displacement field transform and parametric transform Message-ID: hi, I need your help because I feel confused about the difference between displacement field transform and parametric transform. I don't understand the basic difference there is using deformablefieldTransform and another parametric transformation, like BSpline Transform or Affine Transform. I think but I'm not sure that using parametric transform reduce the space of solution of my cost function, such as demons metric or mutua information one -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Oct 14 13:49:47 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 14 Oct 2015 13:49:47 -0400 Subject: [ITK-users] Difference between displacement field transform and parametric transform In-Reply-To: References: Message-ID: Hi, The displacement field transform is the most flexible transform, but it has many more parameters than other parametric transforms, which makes it more difficult to optimize. It is recommended to first optimize a simpler parametric transform, then use it in a CompositeTransform to optimize a displacement field transform. At a minimum, rigid body alignment should be performed to ensure the optimization of the displacement field starts at an initial position that is sufficiently close to the solution. HTH, Matt On Wed, Oct 14, 2015 at 1:19 PM, stefano serviddio wrote: > hi, > I need your help because I feel confused about the difference between > displacement field transform and parametric transform. I don't understand > the basic difference there is using deformablefieldTransform and another > parametric transformation, like BSpline Transform or Affine Transform. I > think but I'm not sure that using parametric transform reduce the space of > solution of my cost function, such as demons metric or mutua information one > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From s.serviddio at gmail.com Wed Oct 14 15:56:16 2015 From: s.serviddio at gmail.com (stefano serviddio) Date: Wed, 14 Oct 2015 19:56:16 +0000 Subject: [ITK-users] Difference between displacement field transform and parametric transform In-Reply-To: References: Message-ID: Hi Matt, I did what you have said, indeed I make a rigid registration before a demons registration, but the metric is too high yet. thank you for your primpt reply. Il giorno mer 14 ott 2015 alle ore 19:49 Matt McCormick < matt.mccormick at kitware.com> ha scritto: > Hi, > > The displacement field transform is the most flexible transform, but > it has many more parameters than other parametric transforms, which > makes it more difficult to optimize. It is recommended to first > optimize a simpler parametric transform, then use it in a > CompositeTransform to optimize a displacement field transform. At a > minimum, rigid body alignment should be performed to ensure the > optimization of the displacement field starts at an initial position > that is sufficiently close to the solution. > > HTH, > Matt > > On Wed, Oct 14, 2015 at 1:19 PM, stefano serviddio > wrote: > > hi, > > I need your help because I feel confused about the difference between > > displacement field transform and parametric transform. I don't understand > > the basic difference there is using deformablefieldTransform and another > > parametric transformation, like BSpline Transform or Affine Transform. I > > think but I'm not sure that using parametric transform reduce the space > of > > solution of my cost function, such as demons metric or mutua information > one > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the 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 Oct 15 01:35:59 2015 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Thu, 15 Oct 2015 05:35:59 +0000 Subject: [ITK-users] How to connect ITK 4.x and VTK 6.x using Python? Message-ID: <1444887360102.82973@sphic.org.cn> ?Hi all, Is there a solution to connect ITK 4.x and VTK 6.x using Python? It would be greatly appreciated if someone could provide me an example. Thanks in advanced. Regards, Zhuangming Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: From mirco9091 at hotmail.it Thu Oct 15 10:52:04 2015 From: mirco9091 at hotmail.it (Mirco Serra) Date: Thu, 15 Oct 2015 14:52:04 +0000 Subject: [ITK-users] Identify pattern of a label Message-ID: Hi guys, I was wondering if there is a method to determine the pattern of a label map. I know that there is the BinaryImageToShapeLabelMapFilter that I could use, but this does not seem to do what I need. I have to determine if a label map has a diffuse, a central or a laminated pattern. Do you have any suggestion? Thank you very much,Mirco -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Thu Oct 15 14:30:45 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 15 Oct 2015 14:30:45 -0400 Subject: [ITK-users] How to connect ITK 4.x and VTK 6.x using Python? In-Reply-To: <1444887360102.82973@sphic.org.cn> References: <1444887360102.82973@sphic.org.cn> Message-ID: Hi Shen, There is a solution to ITK-VTK connection, itk::ImageToVTKImageFilter . Here are couple of examples in C++: http://www.itk.org/Wiki/VTK/ExamplesBoneYard/Cxx/VolumeRendering/itkVtkImageConvert http://www.itk.org/Wiki/ITK/Examples/WishList/IO/itkVtkImageConvertDICOM HTH On Thu, Oct 15, 2015 at 1:35 AM, ??? wrote: > ?Hi all, > > > Is there a solution to connect ITK 4.x and VTK 6.x using Python? It would > be greatly appreciated if someone could provide me an example. Thanks in > advanced. > > > Regards, > > > Zhuangming Shen > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 jose.de.paula at live.com Fri Oct 16 08:56:06 2015 From: jose.de.paula at live.com (JoseBarretoT) Date: Fri, 16 Oct 2015 05:56:06 -0700 (MST) Subject: [ITK-users] AdaptiveHistogramEqualizationImageFilter 3D Message-ID: <1445000166408-36339.post@n7.nabble.com> Hello guys, itk::AdaptiveHistogramEqualizationImageFilter works well when applied in 3D images? Need to apply this filter to a .mhd arquido a DICOM (zraw), have a similar effect as unsharp. The problem is that when you step one reader pictures with 3 dimensions oo filter takes almost 15 minutes to apply. Really it does not apply in 3D images? Or am I doing something wrong? Well, follows the code: itk::GDCMImageIOFactory::RegisterOneFactory(); itk::MetaImageIOFactory::RegisterOneFactory(); itk::VTKImageIOFactory::RegisterOneFactory(); typedef signed short PixelType; const unsigned int Dimension = 3; typedef itk::Image< PixelType, Dimension > ImageType; typedef itk::ImageSeriesReader< ImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(clXUteis::ConverterStringParaChar("panoramica.mhd")); reader->Update(); typedef itk::AdaptiveHistogramEqualizationImageFilter< ImageType > AdaptiveHistogramEqualizationImageFilterType; AdaptiveHistogramEqualizationImageFilterType::Pointer adaptiveHistogramEqualizationImageFilter = AdaptiveHistogramEqualizationImageFilterType::New(); adaptiveHistogramEqualizationImageFilter->SetInput(reader->GetOutput()); adaptiveHistogramEqualizationImageFilter->SetBeta(1); adaptiveHistogramEqualizationImageFilter->SetAlpha(1); adaptiveHistogramEqualizationImageFilter->SetRadius(1); adaptiveHistogramEqualizationImageFilter->Update(); //delay is 13~45 minutes typedef itk::ImageFileWriter< ImageType > WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName("d://output.mhd"); writer->SetUseCompression(1); writer->SetInput(adaptiveHistogramEqualizationImageFilter->GetOutput()); writer->Update(); -- View this message in context: http://itk-users.7.n7.nabble.com/AdaptiveHistogramEqualizationImageFilter-3D-tp36339.html Sent from the ITK - Users mailing list archive at Nabble.com. From blowekamp at mail.nih.gov Fri Oct 16 12:00:53 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 16 Oct 2015 12:00:53 -0400 Subject: [ITK-users] AdaptiveHistogramEqualizationImageFilter 3D In-Reply-To: <1445000166408-36339.post@n7.nabble.com> References: <1445000166408-36339.post@n7.nabble.com> Message-ID: Hello, I am getting similar performance on my laptop with a random image using SimpleITK: In [4]: img = sitk.Image(512,512,512,sitk.sitkFloat32) In [8]: img = sitk.AdditiveGaussianNoise(img, standardDeviation=20, mean=127) In [10]: %timeit -r 1 -n 1 sitk.AdaptiveHistogramEqualization( img, [1]*3, 1, 1) 1 loops, best of 1: 13min 59s per loop I did notice that this was a single threaded algorithm. From looking at the algorithm, there is an expensive amount of histogram work that needs to be done per pixel. This could easily be made multi-threaded. I would be happy to help and show you similar multi-threading implementation in ITK if you would like to take this up. Additional, optimization could be achieved by changing the algorithm to a "MovingHistogram" based one. Alternatively, there are other algorithms that you could use with similar effect such as unsharp mask from gaussian math, or the UnsharpMaskLevelSetImageFilter. HTH, Brad On Oct 16, 2015, at 8:56 AM, JoseBarretoT wrote: > Hello guys, > itk::AdaptiveHistogramEqualizationImageFilter works well when applied in 3D > images? > Need to apply this filter to a .mhd arquido a DICOM (zraw), have a similar > effect as unsharp. > The problem is that when you step one reader pictures with 3 dimensions oo > filter takes almost 15 minutes to apply. > Really it does not apply in 3D images? Or am I doing something wrong? > Well, follows the code: > > itk::GDCMImageIOFactory::RegisterOneFactory(); > itk::MetaImageIOFactory::RegisterOneFactory(); > itk::VTKImageIOFactory::RegisterOneFactory(); > typedef signed short PixelType; > const unsigned int Dimension = 3; > typedef itk::Image< PixelType, Dimension > ImageType; > typedef itk::ImageSeriesReader< ImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > reader->SetFileName(clXUteis::ConverterStringParaChar("panoramica.mhd")); > reader->Update(); > > typedef itk::AdaptiveHistogramEqualizationImageFilter< ImageType > > AdaptiveHistogramEqualizationImageFilterType; > AdaptiveHistogramEqualizationImageFilterType::Pointer > adaptiveHistogramEqualizationImageFilter = > AdaptiveHistogramEqualizationImageFilterType::New(); > adaptiveHistogramEqualizationImageFilter->SetInput(reader->GetOutput()); > adaptiveHistogramEqualizationImageFilter->SetBeta(1); > adaptiveHistogramEqualizationImageFilter->SetAlpha(1); > adaptiveHistogramEqualizationImageFilter->SetRadius(1); > adaptiveHistogramEqualizationImageFilter->Update(); //delay is 13~45 > minutes > > typedef itk::ImageFileWriter< ImageType > WriterType; > WriterType::Pointer writer = WriterType::New(); > writer->SetFileName("d://output.mhd"); > writer->SetUseCompression(1); > > writer->SetInput(adaptiveHistogramEqualizationImageFilter->GetOutput()); > writer->Update(); > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/AdaptiveHistogramEqualizationImageFilter-3D-tp36339.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Fri Oct 16 12:42:03 2015 From: jose.de.paula at live.com (JoseBarretoT) Date: Fri, 16 Oct 2015 09:42:03 -0700 (MST) Subject: [ITK-users] AdaptiveHistogramEqualizationImageFilter 3D In-Reply-To: References: <1445000166408-36339.post@n7.nabble.com> Message-ID: <1445013723478-36341.post@n7.nabble.com> Hi Brad, I was using this to try to have a UnsharMark, I am well again with ITK and was not able to implement the UnsharpMaskLevelSetImageFilter. Use it (if faster than what I'm currently using) would be a great idea. Can you tell me "the paths of predras" to implement it in .mhd DICOM? -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-AdaptiveHistogramEqualizationImageFilter-3D-tp36339p36341.html Sent from the ITK - Users mailing list archive at Nabble.com. From garcia.josef at gmail.com Sat Oct 17 21:06:54 2015 From: garcia.josef at gmail.com (Jose Garcia) Date: Sun, 18 Oct 2015 02:06:54 +0100 Subject: [ITK-users] enable_language(C) in CMakeLists.txt Message-ID: Hello, I can't build ITK using Cmake. This is supposed to be straight forward but somehow I managed to make it imposible. CMake only shows me camake variables and non ITK build variables. It seems that is has problems reading the CMakeLists.txt. Cmake points at line 23 of the CMakeLists.txt. enable_language(C) as the potential source of error. is there any particualr way to configure the native compilers that can solve this? I have been unable to find any reference to this in the FAQ. I am using Cmake 3.3.2( tried with binary and zip) under windows 7 and visual studio 14 and ITK (tried both zip and git version) Thank you on advance for any help. Jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Mon Oct 19 11:04:48 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 19 Oct 2015 11:04:48 -0400 Subject: [ITK-users] enable_language(C) in CMakeLists.txt In-Reply-To: References: Message-ID: Hi Jose, What is the error that you are getting? Support for Visual Studio 14 was only added on October 13th: http://review.source.kitware.com/#/c/20272/ Did you run a clean build from Git since then? Thanks, Matt On Sat, Oct 17, 2015 at 9:06 PM, Jose Garcia wrote: > Hello, > > I can't build ITK using Cmake. This is supposed to be straight forward but > somehow I managed to make it imposible. > > CMake only shows me camake variables and non ITK build variables. > > It seems that is has problems reading the CMakeLists.txt. > > Cmake points at line 23 of the CMakeLists.txt. enable_language(C) > as the potential source of error. > > is there any particualr way to configure the native compilers that can solve > this? > > I have been unable to find any reference to this in the FAQ. > > I am using Cmake 3.3.2( tried with binary and zip) under windows 7 and > visual studio 14 and ITK (tried both zip and git version) > > Thank you on advance for any help. > > Jose > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK 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 Oct 19 11:29:14 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 19 Oct 2015 11:29:14 -0400 Subject: [ITK-users] enable_language(C) in CMakeLists.txt In-Reply-To: References: Message-ID: Hi Jose, It sounds like there is a problem with your Visual Studio installation or CMake is having trouble finding the location of the installation. Usually CMake can find the default installation location without any additional configuration. Please try installing the CMake 3.4 release candidate, and let use know how it goes. Thanks, Matt PS. Please reply-to-all so messages stay on the mailing list. On Mon, Oct 19, 2015 at 11:21 AM, Jose Garcia wrote: > Thank you Matt, > > I downloaded a git on 17th October. > > After running configure in Cmake I get: > > "Error in configuration process, project files may be invalid" > > In the dialog box I get: > "CMake error at Cmakelists.txt 23: (enabvle_language) no cmake-c-comipler > could be found > > I have the path to visual studio added to PATH. > > I installed MinGW in case that helped but no > > Jose > > > On Mon, Oct 19, 2015 at 4:04 PM, Matt McCormick > wrote: >> >> Hi Jose, >> >> What is the error that you are getting? >> >> Support for Visual Studio 14 was only added on October 13th: >> >> http://review.source.kitware.com/#/c/20272/ >> >> Did you run a clean build from Git since then? >> >> Thanks, >> Matt >> >> On Sat, Oct 17, 2015 at 9:06 PM, Jose Garcia >> wrote: >> > Hello, >> > >> > I can't build ITK using Cmake. This is supposed to be straight forward >> > but >> > somehow I managed to make it imposible. >> > >> > CMake only shows me camake variables and non ITK build variables. >> > >> > It seems that is has problems reading the CMakeLists.txt. >> > >> > Cmake points at line 23 of the CMakeLists.txt. enable_language(C) >> > as the potential source of error. >> > >> > is there any particualr way to configure the native compilers that can >> > solve >> > this? >> > >> > I have been unable to find any reference to this in the FAQ. >> > >> > I am using Cmake 3.3.2( tried with binary and zip) under windows 7 and >> > visual studio 14 and ITK (tried both zip and git version) >> > >> > Thank you on advance for any help. >> > >> > Jose >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > > > From garcia.josef at gmail.com Mon Oct 19 18:52:13 2015 From: garcia.josef at gmail.com (Jose Garcia) Date: Mon, 19 Oct 2015 23:52:13 +0100 Subject: [ITK-users] enable_language(C) in CMakeLists.txt In-Reply-To: References: Message-ID: HI, I re-install visual studio and solved the problem. My mistake was that I only checked that VS 2015 community was installed. However, you need to create a cpp project to install the SDK, CL and the compiler. Now it configures as it is supposed to. I haven't completed the build yet but the options are there. Thank you, Jose On Mon, Oct 19, 2015 at 4:29 PM, Matt McCormick wrote: > Hi Jose, > > It sounds like there is a problem with your Visual Studio installation > or CMake is having trouble finding the location of the installation. > Usually CMake can find the default installation location without any > additional configuration. Please try installing the CMake 3.4 release > candidate, and let use know how it goes. > > Thanks, > Matt > > PS. Please reply-to-all so messages stay on the mailing list. > > On Mon, Oct 19, 2015 at 11:21 AM, Jose Garcia > wrote: > > Thank you Matt, > > > > I downloaded a git on 17th October. > > > > After running configure in Cmake I get: > > > > "Error in configuration process, project files may be invalid" > > > > In the dialog box I get: > > "CMake error at Cmakelists.txt 23: (enabvle_language) no cmake-c-comipler > > could be found > > > > I have the path to visual studio added to PATH. > > > > I installed MinGW in case that helped but no > > > > Jose > > > > > > On Mon, Oct 19, 2015 at 4:04 PM, Matt McCormick < > matt.mccormick at kitware.com> > > wrote: > >> > >> Hi Jose, > >> > >> What is the error that you are getting? > >> > >> Support for Visual Studio 14 was only added on October 13th: > >> > >> http://review.source.kitware.com/#/c/20272/ > >> > >> Did you run a clean build from Git since then? > >> > >> Thanks, > >> Matt > >> > >> On Sat, Oct 17, 2015 at 9:06 PM, Jose Garcia > >> wrote: > >> > Hello, > >> > > >> > I can't build ITK using Cmake. This is supposed to be straight > forward > >> > but > >> > somehow I managed to make it imposible. > >> > > >> > CMake only shows me camake variables and non ITK build variables. > >> > > >> > It seems that is has problems reading the CMakeLists.txt. > >> > > >> > Cmake points at line 23 of the CMakeLists.txt. enable_language(C) > >> > as the potential source of error. > >> > > >> > is there any particualr way to configure the native compilers that can > >> > solve > >> > this? > >> > > >> > I have been unable to find any reference to this in the FAQ. > >> > > >> > I am using Cmake 3.3.2( tried with binary and zip) under windows 7 and > >> > visual studio 14 and ITK (tried both zip and git version) > >> > > >> > Thank you on advance for any help. > >> > > >> > Jose > >> > > >> > _____________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Kitware offers ITK Training Courses, for more information visit: > >> > http://www.kitware.com/products/protraining.php > >> > > >> > Please keep messages on-topic and check the 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 lydiang at gmail.com Wed Oct 21 11:40:59 2015 From: lydiang at gmail.com (Lydia Ng) Date: Wed, 21 Oct 2015 08:40:59 -0700 Subject: [ITK-users] Image Stitching/Registration position at the Allen Institute Message-ID: Interesting in working at the Allen Institute for Brain Science? We are building out a high throughput electron microscopy (EM) processing and we are looking for an expert algorithm developer/engineer to implement the stitching and alignment components. Apply for the Software Engineer III - Image Stitching/Registration position http://www.alleninstitute.org/careers/career-opportunities/ Start here to learn more about us and what we do http://www.alleninstitute.org/our-research/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Getfuture at yahoo.com Wed Oct 21 19:32:54 2015 From: Getfuture at yahoo.com (Jliang) Date: Wed, 21 Oct 2015 23:32:54 +0000 (UTC) Subject: [ITK-users] ITK:FEM : FEM SOLVERS References: <44073863.2030108@ufl.edu> <44074988.9000204@ufl.edu> Message-ID: There maybe an error in itkfem codes. The tetra element stffness matrix should be corrected by factor of 1/6. If you do not change the code, you need multiply the displacement by 6 to get the correct solution. After such correction, the results from tetra2 test example will match with the results from ABaqus. Suggestion to change: in tetra specific class, find function of getting one-point weight, change the weight from 1 to 1/6 Why codes are wrong: They use R,s,t and (1-r-s-t) as shape function, the integration is executed in R,s,t=0-1. That is wrong. think about 2d problem (triangle): Int[f(x,y) dx dy] =int[ f(s,t) |J| ds dt]=f |J| int [ds dt] In itk code ( 4.8.0?)', int [ds dt]=1. Wrong! Actually, int [dt ds]=1/2. In 3d, int [ dr ds dt] =1/6 From mlt.khawla at gmail.com Mon Oct 26 13:15:45 2015 From: mlt.khawla at gmail.com (Daoued23) Date: Mon, 26 Oct 2015 10:15:45 -0700 (MST) Subject: [ITK-users] Draw a an ellipse in a specific orientation in 3D image Message-ID: <1445879745348-36348.post@n7.nabble.com> Hello everyone, I am new to itk and I am trying to draw a ellipse centered in 3D image, by providing it's orientation and the length of its axis. Do you have any idea which class should i use? I took a look on /itk::EllipseSpatialObject/ but it didn't really help, it draws only an horizontal or vertical ellipse. Thanks Best regards Daoued23 -- View this message in context: http://itk-users.7.n7.nabble.com/Draw-a-an-ellipse-in-a-specific-orientation-in-3D-image-tp36348.html Sent from the ITK - Users mailing list archive at Nabble.com. From dzenanz at gmail.com Mon Oct 26 14:25:06 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 26 Oct 2015 14:25:06 -0400 Subject: [ITK-users] Draw a an ellipse in a specific orientation in 3D image In-Reply-To: <1445879745348-36348.post@n7.nabble.com> References: <1445879745348-36348.post@n7.nabble.com> Message-ID: If you want arbitrarily oriented ellipse, you should probably approximate it by PolyLineParametricPath . Then use iterator to visit pixels which should be set to 1. See Path docs. Perhaps also take a look at LineSpatialObject example . HTH On Mon, Oct 26, 2015 at 1:15 PM, Daoued23 wrote: > Hello everyone, > I am new to itk and I am trying to draw a ellipse centered in 3D image, by > providing it's orientation and the length of its axis. > Do you have any idea which class should i use? > I took a look on /itk::EllipseSpatialObject/ but it didn't really help, it > draws only an horizontal or vertical ellipse. > > Thanks > Best regards > > Daoued23 > > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/Draw-a-an-ellipse-in-a-specific-orientation-in-3D-image-tp36348.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zarko at kg.ac.rs Tue Oct 27 09:40:12 2015 From: zarko at kg.ac.rs (Zarko) Date: Tue, 27 Oct 2015 06:40:12 -0700 (MST) Subject: [ITK-users] CMake CMake_Install_Prefix Message-ID: <1445953212066-7588057.post@n2.nabble.com> After building solution for VS2010 with CMake GUI and setting the specific folder, via CMake_Install_Prefix, where includes and libs should be copied folder remains empty and is not created. First tried with default setting for CMake_Install_Prefix : Program Files (x86)/ITK did not work. Folder is not created at all. Same tried on different partition where i have write privilegies for sure and same happens. Did anybody experience same problem and how to fix it ? Best regards Zarko -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/CMake-CMake-Install-Prefix-tp7588057.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Tue Oct 27 10:17:23 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 27 Oct 2015 10:17:23 -0400 Subject: [ITK-users] CMake CMake_Install_Prefix In-Reply-To: <1445953212066-7588057.post@n2.nabble.com> References: <1445953212066-7588057.post@n2.nabble.com> Message-ID: Hi Zarko, Did you build the "INSTALL" target? HTH, Matt On Tue, Oct 27, 2015 at 9:40 AM, Zarko wrote: > After building solution for VS2010 with CMake GUI and setting the specific > folder, via CMake_Install_Prefix, where includes and libs should be copied > folder remains empty and is not created. > First tried with default setting for CMake_Install_Prefix : Program Files > (x86)/ITK did not work. Folder is not created at all. > Same tried on different partition where i have write privilegies for sure > and same happens. > > Did anybody experience same problem and how to fix it ? > > Best regards > Zarko > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/CMake-CMake-Install-Prefix-tp7588057.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 mlt.khawla at gmail.com Tue Oct 27 10:17:19 2015 From: mlt.khawla at gmail.com (Daoued23) Date: Tue, 27 Oct 2015 07:17:19 -0700 (MST) Subject: [ITK-users] Draw a an ellipse in a specific orientation in 3D image In-Reply-To: References: <1445879745348-36348.post@n7.nabble.com> Message-ID: <1445955439449-36352.post@n7.nabble.com> Thank you, last night I was thinking about drawing a vertical ellipse and then rotate it using this code http://itk.org/ITKExamples/src/Filtering/ImageGrid/ChangeImageOriginSpacingOrDirection/Documentation.html but it doesn't seem to change any thing. what could possibly be wrong? -- View this message in context: http://itk-users.7.n7.nabble.com/Draw-a-an-ellipse-in-a-specific-orientation-in-3D-image-tp36348p36352.html Sent from the ITK - Users mailing list archive at Nabble.com. From zarko at kg.ac.rs Tue Oct 27 10:45:09 2015 From: zarko at kg.ac.rs (Zarko Milosevic) Date: Tue, 27 Oct 2015 15:45:09 +0100 Subject: [ITK-users] CMake CMake_Install_Prefix In-Reply-To: References: <1445953212066-7588057.post@n2.nabble.com> Message-ID: <000d01d110c6$14677ab0$3d367010$@kg.ac.rs> Hi Matt, That actually solved my problem. I thought that BUILD_ALL will initiate building all projects in solution but that did not happen. Thanks. Helped me a lot. Best Z -----Original Message----- From: Matt McCormick [mailto:matt.mccormick at kitware.com] Sent: Tuesday, October 27, 2015 3:17 PM To: Zarko Cc: insight-users at itk.org Subject: Re: [ITK-users] CMake CMake_Install_Prefix Hi Zarko, Did you build the "INSTALL" target? HTH, Matt On Tue, Oct 27, 2015 at 9:40 AM, Zarko wrote: > After building solution for VS2010 with CMake GUI and setting the > specific folder, via CMake_Install_Prefix, where includes and libs > should be copied folder remains empty and is not created. > First tried with default setting for CMake_Install_Prefix : Program > Files (x86)/ITK did not work. Folder is not created at all. > Same tried on different partition where i have write privilegies for > sure and same happens. > > Did anybody experience same problem and how to fix it ? > > Best regards > Zarko > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/CMake-CMake-Install-Pre > fix-tp7588057.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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2015.0.6173 / Virus Database: 4455/10896 - Release Date: 10/27/15 From dzenanz at gmail.com Tue Oct 27 12:33:30 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 27 Oct 2015 12:33:30 -0400 Subject: [ITK-users] Draw a an ellipse in a specific orientation in 3D image In-Reply-To: <1445955439449-36352.post@n7.nabble.com> References: <1445879745348-36348.post@n7.nabble.com> <1445955439449-36352.post@n7.nabble.com> Message-ID: That example changes orientation of 3D image in space. If you are not viewing the image in relation to some other 3D object, you will not notice a difference. I suspect that drawing an ellipse is a 2D operation, done on a single slice. That's why I suggested PolyLineParametricPath. HTH On Tue, Oct 27, 2015 at 10:17 AM, Daoued23 wrote: > Thank you, last night I was thinking about drawing a vertical ellipse and > then rotate it using this code > > http://itk.org/ITKExamples/src/Filtering/ImageGrid/ChangeImageOriginSpacingOrDirection/Documentation.html > < > http://itk.org/ITKExamples/src/Filtering/ImageGrid/ChangeImageOriginSpacingOrDirection/Documentation.html > > > but it doesn't seem to change any thing. what could possibly be wrong? > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/Draw-a-an-ellipse-in-a-specific-orientation-in-3D-image-tp36348p36352.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lchauvin at bwh.harvard.edu Tue Oct 27 16:29:34 2015 From: lchauvin at bwh.harvard.edu (Laurent Chauvin) Date: Tue, 27 Oct 2015 20:29:34 +0000 Subject: [ITK-users] Accumulator size in itkHoughTransform2DLinesImageFilter Message-ID: Hello, I'm trying to figure it out how the 2D Hough transform has been implemented for line detection. I think I understand it, however, I have a question. The accumulator size has one dimension that has angle and the other one has radius. In the header file, it is said that 'The distance axis depends on the size of the diagonal of the output image' which I understand, because the point on the line cannot be further away from the origin than the opposite corner, with a radius equal to the diagonal. However, my question is in the implementation. When I look at the method GenerateOutputInformation, size[0] (distance axis) is equal to: sqrt( m_AngleResolution*m_AngleResolution + input->GetLargestPossibleRegion().GetSize()[0]*input->GetLargestPossibleRegion().GetSize()[0]) This seems to me that instead of taking the diagonal of the input image, it calculates the diagonal of an image with in X axis the number of pixels of the input image (normal) but in Y axis the angle steps from -pi to pi. This axis is present in the accumulator, but I don't really understand why we use it here, to calculate the size of the distance axis. Is it a mistake or did I miss something ? Thank you. -Laurent -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Tue Oct 27 17:59:13 2015 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Tue, 27 Oct 2015 17:59:13 -0400 Subject: [ITK-users] Buffered Region out of Range error Message-ID: I have been struggling with this error all afternoon and I just can not ?see? what I am doing wrong. I am getting the following exception message from our program: Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature 9. Error Message returned from ITK: itk::ERROR: MultiThreader(0x7fb53486e200): Exception occurred during SingleMethodExecute /Users/Shared/DREAM3D_SDK/InsightToolkit-4.7.2/Modules/Core/Common/include/itkImageConstIterator.h:211: itk::ERROR: Region ImageRegion (0x12e6f6730) Dimension: 3 Index: [0, 0, 0] Size: [64, 64, 4] is outside of buffered region ImageRegion (0x7fb53c0a8040) Dimension: 3 Index: [0, 0, 0] Size: [0, 0, 0] So what are the reasons that this can happen? Basically we creating an unsigned char image where we fill in the pixels, then run the Itk filter on each unsigned char image. Finally we want to copy the final output data into one of our own arrays. I will post the code under here. Any help is greatly appreciated. size_t iDims[3] = { 0, 0, 0 }; float origin[3] = { 0.0f, 0.0f, 0.0f }; float resolution[3] = { 0.0f, 0.0f, 0.0f }; image->getDimensions(iDims); image->getOrigin(origin); image->getResolution(resolution); int32_t numFeatures = m_SignedDistanceFields.size(); typedef itk::Image BoolImageType; typedef itk::Image FloatImageType; std::vector booleanFeatureImages(numFeatures); BoolImageType::IndexType start; BoolImageType::SizeType size; BoolImageType::RegionType region; start.Fill(0); size[0] = iDims[0]; size[1] = iDims[1]; size[2] = iDims[2]; region.SetIndex(start); region.SetSize(size); for (int32_t i = 0; i < numFeatures; i++) { BoolImageType::Pointer tmpBoolImage = BoolImageType::New(); tmpBoolImage->SetRegions(region); tmpBoolImage->Allocate(); tmpBoolImage->SetOrigin(origin); tmpBoolImage->SetSpacing(resolution); tmpBoolImage->FillBuffer(0); booleanFeatureImages[i] = tmpBoolImage; } size_t zStride = 0; size_t yStride = 0; size_t index = 0; for (size_t z = 0; z < iDims[2]; z++) { zStride = z * iDims[1] * iDims[2]; for (size_t y = 0; y < iDims[1]; y++) { yStride = y * iDims[0]; for (size_t x = 0; x < iDims[0]; x++) { index = zStride + yStride + x; BoolImageType::IndexType pixelIndex; pixelIndex[0] = x; pixelIndex[1] = y; pixelIndex[2] = z; if (x == y && y == z) { booleanFeatureImages[0]->SetPixel(pixelIndex, 255); } booleanFeatureImages[m_FeatureIds[index]]->SetPixel(pixelIndex, 255); } } } // Compute signed distance field for each Feature typedef itk::SignedMaurerDistanceMapImageFilter SignedMaurerFilter; for (int32_t i = 0; i < numFeatures; i++) { if (getCancel() == true) { return; } SignedMaurerFilter::Pointer signedDistMap = SignedMaurerFilter::New(); float* tmpDistField = m_SignedDistanceFields[i].lock()->getPointer(0); signedDistMap->SetInsideIsPositive(false); signedDistMap->SetSquaredDistance(true); signedDistMap->SetUseImageSpacing(true); signedDistMap->SetInput(booleanFeatureImages[i]); try { signedDistMap->Update(); for (size_t z = 0; z < iDims[2]; z++) { zStride = z * iDims[1] * iDims[2]; for (size_t y = 0; y < iDims[1]; y++) { yStride = y * iDims[0]; for (size_t x = 0; x < iDims[0]; x++) { index = zStride + yStride + x; BoolImageType::IndexType pixelIndex; pixelIndex[0] = x; pixelIndex[1] = y; pixelIndex[2] = z; FloatImageType::Pointer out = signedDistMap->GetOutput(); out->SetBufferedRegion(region); tmpDistField[index] = out->GetPixel(pixelIndex); } } } } catch (itk::ExceptionObject& err) { setErrorCondition(-5); QString ss = QObject::tr("Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature %1. Error Message returned from ITK:\n %2").arg(i).arg(err.GetDescription()); notifyErrorMessage(getHumanLabel(), ss, getErrorCondition()); } } -- Mike Jackson BlueQuartz Software, LLC [e]: mike.jackson at bluequartz.net From matt.mccormick at kitware.com Tue Oct 27 18:22:23 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 27 Oct 2015 18:22:23 -0400 Subject: [ITK-users] Buffered Region out of Range error In-Reply-To: References: Message-ID: Hi Mike, Does calling UpdateLargestPossibleRegion() instead of Update() help? Matt On Tue, Oct 27, 2015 at 5:59 PM, Michael Jackson wrote: > I have been struggling with this error all afternoon and I just can not ?see? what I am doing wrong. I am getting the following exception message from our program: > > Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature 9. Error Message returned from ITK: > itk::ERROR: MultiThreader(0x7fb53486e200): Exception occurred during SingleMethodExecute > /Users/Shared/DREAM3D_SDK/InsightToolkit-4.7.2/Modules/Core/Common/include/itkImageConstIterator.h:211: > itk::ERROR: Region ImageRegion (0x12e6f6730) > Dimension: 3 > Index: [0, 0, 0] > Size: [64, 64, 4] > is outside of buffered region ImageRegion (0x7fb53c0a8040) > Dimension: 3 > Index: [0, 0, 0] > Size: [0, 0, 0] > > So what are the reasons that this can happen? Basically we creating an unsigned char image where we fill in the pixels, then run the Itk filter on each unsigned char image. Finally we want to copy the final output data into one of our own arrays. I will post the code under here. Any help is greatly appreciated. > > size_t iDims[3] = { 0, 0, 0 }; > float origin[3] = { 0.0f, 0.0f, 0.0f }; > float resolution[3] = { 0.0f, 0.0f, 0.0f }; > > image->getDimensions(iDims); > image->getOrigin(origin); > image->getResolution(resolution); > > int32_t numFeatures = m_SignedDistanceFields.size(); > > typedef itk::Image BoolImageType; > typedef itk::Image FloatImageType; > std::vector booleanFeatureImages(numFeatures); > BoolImageType::IndexType start; > BoolImageType::SizeType size; > BoolImageType::RegionType region; > > start.Fill(0); > > size[0] = iDims[0]; > size[1] = iDims[1]; > size[2] = iDims[2]; > > region.SetIndex(start); > region.SetSize(size); > > for (int32_t i = 0; i < numFeatures; i++) > { > BoolImageType::Pointer tmpBoolImage = BoolImageType::New(); > tmpBoolImage->SetRegions(region); > tmpBoolImage->Allocate(); > tmpBoolImage->SetOrigin(origin); > tmpBoolImage->SetSpacing(resolution); > tmpBoolImage->FillBuffer(0); > booleanFeatureImages[i] = tmpBoolImage; > } > > size_t zStride = 0; > size_t yStride = 0; > size_t index = 0; > > for (size_t z = 0; z < iDims[2]; z++) > { > zStride = z * iDims[1] * iDims[2]; > for (size_t y = 0; y < iDims[1]; y++) > { > yStride = y * iDims[0]; > for (size_t x = 0; x < iDims[0]; x++) > { > index = zStride + yStride + x; > BoolImageType::IndexType pixelIndex; > pixelIndex[0] = x; > pixelIndex[1] = y; > pixelIndex[2] = z; > if (x == y && y == z) { booleanFeatureImages[0]->SetPixel(pixelIndex, 255); } > booleanFeatureImages[m_FeatureIds[index]]->SetPixel(pixelIndex, 255); > } > } > } > // Compute signed distance field for each Feature > typedef itk::SignedMaurerDistanceMapImageFilter SignedMaurerFilter; > > for (int32_t i = 0; i < numFeatures; i++) > { > if (getCancel() == true) { return; } > SignedMaurerFilter::Pointer signedDistMap = SignedMaurerFilter::New(); > float* tmpDistField = m_SignedDistanceFields[i].lock()->getPointer(0); > signedDistMap->SetInsideIsPositive(false); > signedDistMap->SetSquaredDistance(true); > signedDistMap->SetUseImageSpacing(true); > signedDistMap->SetInput(booleanFeatureImages[i]); > try > { > signedDistMap->Update(); > > for (size_t z = 0; z < iDims[2]; z++) > { > zStride = z * iDims[1] * iDims[2]; > for (size_t y = 0; y < iDims[1]; y++) > { > yStride = y * iDims[0]; > for (size_t x = 0; x < iDims[0]; x++) > { > index = zStride + yStride + x; > BoolImageType::IndexType pixelIndex; > pixelIndex[0] = x; > pixelIndex[1] = y; > pixelIndex[2] = z; > FloatImageType::Pointer out = signedDistMap->GetOutput(); > out->SetBufferedRegion(region); > tmpDistField[index] = out->GetPixel(pixelIndex); > } > } > } > } > catch (itk::ExceptionObject& err) > { > setErrorCondition(-5); > QString ss = QObject::tr("Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature %1. Error Message returned from ITK:\n %2").arg(i).arg(err.GetDescription()); > notifyErrorMessage(getHumanLabel(), ss, getErrorCondition()); > } > } > -- > Mike Jackson > BlueQuartz Software, LLC > [e]: mike.jackson at bluequartz.net > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From s120049 at e.ntu.edu.sg Wed Oct 28 07:05:43 2015 From: s120049 at e.ntu.edu.sg (geetha) Date: Wed, 28 Oct 2015 04:05:43 -0700 (MST) Subject: [ITK-users] Registration setstandarddeviation and SetUpdateFieldStandardDeviations difference Message-ID: <1446030343690-7588065.post@n2.nabble.com> Hi, For some deformable registration methods there are two set fields I noticed- setstandarddeviation, which is to set gaussian smoothing for the deformation field and SetUpdateFieldStandardDeviations, which is to set smoothing for "update field". In the context of demons registration I do understand usage of setstandarddeviation but not SetUpdateFieldStandardDeviations. What's the difference between two? Best, geetha -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Registration-setstandarddeviation-and-SetUpdateFieldStandardDeviations-difference-tp7588065.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From mike.jackson at bluequartz.net Wed Oct 28 07:57:44 2015 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Wed, 28 Oct 2015 07:57:44 -0400 Subject: [ITK-users] Buffered Region out of Range error In-Reply-To: References: Message-ID: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> Nope. It does not help. I?m going to add some more information and see where that takes the discussion. We are trying to integrate ITK into our project DREAM.3D (github.com/dream3d ) which uses a plugin system to load user developed data analysis filters. The failure mode we are seeing is when 2 filters, in different plugins, use the same ITK code. The DREAM.3D plugin that contains the DREAM.3D Filter that gets loaded first will run through without issues. The second DREAM.3D Plugin that contains the second DREAM.3D Filter will fail with the exception message. The ITK code is exactly the same except for the name of the c++ class that holds the code. We have replicated this on OS X 10.9 and 10.10. We can NOT replicate the issue on Windows (VS2013) or Linux (Clang 3.6). We have it down to a fairly simple DREAM.3D test case but not an ITK test case. After moving some codes around and moving some of our looping code inside the ?try-catch? block we finally started seeing the exception messages. I am hoping we are just using ITK incorrectly and OS X is just exposing the incorrect use. The weird part is that we get the correct results on the other systems so it is not like the other platforms have a silent failure. Thanks for any help. -- Mike Jackson [mike.jackson at bluequartz.net] > On Oct 27, 2015, at 6:22 PM, Matt McCormick wrote: > > Hi Mike, > > Does calling > > UpdateLargestPossibleRegion() > > instead of > > Update() > > help? > > Matt > > On Tue, Oct 27, 2015 at 5:59 PM, Michael Jackson > wrote: >> I have been struggling with this error all afternoon and I just can not ?see? what I am doing wrong. I am getting the following exception message from our program: >> >> Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature 9. Error Message returned from ITK: >> itk::ERROR: MultiThreader(0x7fb53486e200): Exception occurred during SingleMethodExecute >> /Users/Shared/DREAM3D_SDK/InsightToolkit-4.7.2/Modules/Core/Common/include/itkImageConstIterator.h:211: >> itk::ERROR: Region ImageRegion (0x12e6f6730) >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [64, 64, 4] >> is outside of buffered region ImageRegion (0x7fb53c0a8040) >> Dimension: 3 >> Index: [0, 0, 0] >> Size: [0, 0, 0] >> >> So what are the reasons that this can happen? Basically we creating an unsigned char image where we fill in the pixels, then run the Itk filter on each unsigned char image. Finally we want to copy the final output data into one of our own arrays. I will post the code under here. Any help is greatly appreciated. >> >> size_t iDims[3] = { 0, 0, 0 }; >> float origin[3] = { 0.0f, 0.0f, 0.0f }; >> float resolution[3] = { 0.0f, 0.0f, 0.0f }; >> >> image->getDimensions(iDims); >> image->getOrigin(origin); >> image->getResolution(resolution); >> >> int32_t numFeatures = m_SignedDistanceFields.size(); >> >> typedef itk::Image BoolImageType; >> typedef itk::Image FloatImageType; >> std::vector booleanFeatureImages(numFeatures); >> BoolImageType::IndexType start; >> BoolImageType::SizeType size; >> BoolImageType::RegionType region; >> >> start.Fill(0); >> >> size[0] = iDims[0]; >> size[1] = iDims[1]; >> size[2] = iDims[2]; >> >> region.SetIndex(start); >> region.SetSize(size); >> >> for (int32_t i = 0; i < numFeatures; i++) >> { >> BoolImageType::Pointer tmpBoolImage = BoolImageType::New(); >> tmpBoolImage->SetRegions(region); >> tmpBoolImage->Allocate(); >> tmpBoolImage->SetOrigin(origin); >> tmpBoolImage->SetSpacing(resolution); >> tmpBoolImage->FillBuffer(0); >> booleanFeatureImages[i] = tmpBoolImage; >> } >> >> size_t zStride = 0; >> size_t yStride = 0; >> size_t index = 0; >> >> for (size_t z = 0; z < iDims[2]; z++) >> { >> zStride = z * iDims[1] * iDims[2]; >> for (size_t y = 0; y < iDims[1]; y++) >> { >> yStride = y * iDims[0]; >> for (size_t x = 0; x < iDims[0]; x++) >> { >> index = zStride + yStride + x; >> BoolImageType::IndexType pixelIndex; >> pixelIndex[0] = x; >> pixelIndex[1] = y; >> pixelIndex[2] = z; >> if (x == y && y == z) { booleanFeatureImages[0]->SetPixel(pixelIndex, 255); } >> booleanFeatureImages[m_FeatureIds[index]]->SetPixel(pixelIndex, 255); >> } >> } >> } >> // Compute signed distance field for each Feature >> typedef itk::SignedMaurerDistanceMapImageFilter SignedMaurerFilter; >> >> for (int32_t i = 0; i < numFeatures; i++) >> { >> if (getCancel() == true) { return; } >> SignedMaurerFilter::Pointer signedDistMap = SignedMaurerFilter::New(); >> float* tmpDistField = m_SignedDistanceFields[i].lock()->getPointer(0); >> signedDistMap->SetInsideIsPositive(false); >> signedDistMap->SetSquaredDistance(true); >> signedDistMap->SetUseImageSpacing(true); >> signedDistMap->SetInput(booleanFeatureImages[i]); >> try >> { >> signedDistMap->Update(); >> >> for (size_t z = 0; z < iDims[2]; z++) >> { >> zStride = z * iDims[1] * iDims[2]; >> for (size_t y = 0; y < iDims[1]; y++) >> { >> yStride = y * iDims[0]; >> for (size_t x = 0; x < iDims[0]; x++) >> { >> index = zStride + yStride + x; >> BoolImageType::IndexType pixelIndex; >> pixelIndex[0] = x; >> pixelIndex[1] = y; >> pixelIndex[2] = z; >> FloatImageType::Pointer out = signedDistMap->GetOutput(); >> out->SetBufferedRegion(region); >> tmpDistField[index] = out->GetPixel(pixelIndex); >> } >> } >> } >> } >> catch (itk::ExceptionObject& err) >> { >> setErrorCondition(-5); >> QString ss = QObject::tr("Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature %1. Error Message returned from ITK:\n %2").arg(i).arg(err.GetDescription()); >> notifyErrorMessage(getHumanLabel(), ss, getErrorCondition()); >> } >> } >> -- >> Mike Jackson >> BlueQuartz Software, LLC >> [e]: mike.jackson at bluequartz.net >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 mike.jackson at bluequartz.net Wed Oct 28 08:31:59 2015 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Wed, 28 Oct 2015 08:31:59 -0400 Subject: [ITK-users] [ITK] Buffered Region out of Range error In-Reply-To: <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> References: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> Message-ID: Yes, All dependent libraries are shared. otool -L for one of our plugins: @rpath/libDREAM3DWidgetsLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKReview-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKLabelMap-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKQuadEdgeMesh-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKBiasCorrection-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKPolynomials-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKBioCell-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKFEM-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOSpatialObjects-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOXML-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOBioRad-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGDCM-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmMSFF-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkopenjpeg-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGIPL-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOMeta-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIONIFTI-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKniftiio-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIONRRD-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKNrrdIO-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOSiemens-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOStimulate-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformHDF5-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/hdf5-1.8.15-Debug/lib/libhdf5_debug.10.0.1.dylib (compatibility version 10.0.1, current version 1.8.15) /Users/Shared/DREAM3D_SDK/hdf5-1.8.15-Debug/lib/libhdf5_cpp_debug.10.0.1.dylib (compatibility version 10.0.1, current version 1.8.15) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformInsightLegacy-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformMatlab-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOVTK-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKKLMRegionGrowing-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKVTK-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) @rpath/libQtSupportLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) @rpath/libSIMPLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/tbb43_20150611oss/lib/libtbb_debug.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/tbb43_20150611oss/lib/libtbbmalloc_debug.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.4.0, current version 5.4.2) /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.2) @rpath/libH5Support_debug.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0) /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.4.0, current version 5.4.2) /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.4.0, current version 5.4.2) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOBMP-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOJPEG-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOPNG-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkpng-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTIFF-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitktiff-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkjpeg-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKWatersheds-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKPath-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKOptimizers-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKSpatialObjects-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKMesh-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmDICT-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmIOD-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKEXPAT-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmDSED-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmCommon-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKMetaIO-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKznz-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkzlib-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGE-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOIPL-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformBase-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKStatistics-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkNetlibSlatec-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOImageBase-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKCommon-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkdouble-conversion-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitksys-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKVNLInstantiation-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvnl_algo-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkv3p_lsqr-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvnl-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvcl-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkv3p_netlib-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0) We are using Qt 5.4.2 for our GUI. Looks like libc++. How do I change this? We use the precompiled Qt 5.4 binaries from qtproject.io and I am not sure if they use libstdC++ or libc++. We compile everything else: HDF5, Boost, Qwt, ITK, Eigen and TBB. The ?.lock()? is for a boost::weak_ptr variable that stores one of our own malloc?ed arrays. No threading (at this level). -- Mike Jackson [mike.jackson at bluequartz.net] > On Oct 28, 2015, at 8:21 AM, Bradley Lowekamp wrote: > > Hello, > > There could also be some symbol resolution issues/ conflicts. Are you using shared libraries? What is the output of otool -L? What GUI library are you using? What C++ library (libc++ vs libstdc++)? Are you consistently using the same c++ library? If you set the CMAKE_OSX_DEPLOYMENT_TARGET to 10.8 you can easily use libstdc++ by default. > > I see a use of a "lock" in your code. What do you have going on with threads? > > HTH, > Brad > > On Oct 28, 2015, at 7:57 AM, Michael Jackson wrote: > >> Nope. It does not help. I?m going to add some more information and see where that takes the discussion. We are trying to integrate ITK into our project DREAM.3D (github.com/dream3d) which uses a plugin system to load user developed data analysis filters. The failure mode we are seeing is when 2 filters, in different plugins, use the same ITK code. The DREAM.3D plugin that contains the DREAM.3D Filter that gets loaded first will run through without issues. The second DREAM.3D Plugin that contains the second DREAM.3D Filter will fail with the exception message. The ITK code is exactly the same except for the name of the c++ class that holds the code. We have replicated this on OS X 10.9 and 10.10. We can NOT replicate the issue on Windows (VS2013) or Linux (Clang 3.6). We have it down to a fairly simple DREAM.3D test case but not an ITK test case. After moving some codes around and moving some of our looping code inside the ?try-catch? block we finally started seeing the exception messages. I am hoping we are just using ITK incorrectly and OS X is just exposing the incorrect use. The weird part is that we get the correct results on the other systems so it is not like the other platforms have a silent failure. >> >> Thanks for any help. >> -- >> Mike Jackson [mike.jackson at bluequartz.net] >> >> >>> On Oct 27, 2015, at 6:22 PM, Matt McCormick wrote: >>> >>> Hi Mike, >>> >>> Does calling >>> >>> UpdateLargestPossibleRegion() >>> >>> instead of >>> >>> Update() >>> >>> help? >>> >>> Matt >>> >>> On Tue, Oct 27, 2015 at 5:59 PM, Michael Jackson >>> wrote: >>>> I have been struggling with this error all afternoon and I just can not ?see? what I am doing wrong. I am getting the following exception message from our program: >>>> >>>> Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature 9. Error Message returned from ITK: >>>> itk::ERROR: MultiThreader(0x7fb53486e200): Exception occurred during SingleMethodExecute >>>> /Users/Shared/DREAM3D_SDK/InsightToolkit-4.7.2/Modules/Core/Common/include/itkImageConstIterator.h:211: >>>> itk::ERROR: Region ImageRegion (0x12e6f6730) >>>> Dimension: 3 >>>> Index: [0, 0, 0] >>>> Size: [64, 64, 4] >>>> is outside of buffered region ImageRegion (0x7fb53c0a8040) >>>> Dimension: 3 >>>> Index: [0, 0, 0] >>>> Size: [0, 0, 0] >>>> >>>> So what are the reasons that this can happen? Basically we creating an unsigned char image where we fill in the pixels, then run the Itk filter on each unsigned char image. Finally we want to copy the final output data into one of our own arrays. I will post the code under here. Any help is greatly appreciated. >>>> >>>> size_t iDims[3] = { 0, 0, 0 }; >>>> float origin[3] = { 0.0f, 0.0f, 0.0f }; >>>> float resolution[3] = { 0.0f, 0.0f, 0.0f }; >>>> >>>> image->getDimensions(iDims); >>>> image->getOrigin(origin); >>>> image->getResolution(resolution); >>>> >>>> int32_t numFeatures = m_SignedDistanceFields.size(); >>>> >>>> typedef itk::Image BoolImageType; >>>> typedef itk::Image FloatImageType; >>>> std::vector booleanFeatureImages(numFeatures); >>>> BoolImageType::IndexType start; >>>> BoolImageType::SizeType size; >>>> BoolImageType::RegionType region; >>>> >>>> start.Fill(0); >>>> >>>> size[0] = iDims[0]; >>>> size[1] = iDims[1]; >>>> size[2] = iDims[2]; >>>> >>>> region.SetIndex(start); >>>> region.SetSize(size); >>>> >>>> for (int32_t i = 0; i < numFeatures; i++) >>>> { >>>> BoolImageType::Pointer tmpBoolImage = BoolImageType::New(); >>>> tmpBoolImage->SetRegions(region); >>>> tmpBoolImage->Allocate(); >>>> tmpBoolImage->SetOrigin(origin); >>>> tmpBoolImage->SetSpacing(resolution); >>>> tmpBoolImage->FillBuffer(0); >>>> booleanFeatureImages[i] = tmpBoolImage; >>>> } >>>> >>>> size_t zStride = 0; >>>> size_t yStride = 0; >>>> size_t index = 0; >>>> >>>> for (size_t z = 0; z < iDims[2]; z++) >>>> { >>>> zStride = z * iDims[1] * iDims[2]; >>>> for (size_t y = 0; y < iDims[1]; y++) >>>> { >>>> yStride = y * iDims[0]; >>>> for (size_t x = 0; x < iDims[0]; x++) >>>> { >>>> index = zStride + yStride + x; >>>> BoolImageType::IndexType pixelIndex; >>>> pixelIndex[0] = x; >>>> pixelIndex[1] = y; >>>> pixelIndex[2] = z; >>>> if (x == y && y == z) { booleanFeatureImages[0]->SetPixel(pixelIndex, 255); } >>>> booleanFeatureImages[m_FeatureIds[index]]->SetPixel(pixelIndex, 255); >>>> } >>>> } >>>> } >>>> // Compute signed distance field for each Feature >>>> typedef itk::SignedMaurerDistanceMapImageFilter SignedMaurerFilter; >>>> >>>> for (int32_t i = 0; i < numFeatures; i++) >>>> { >>>> if (getCancel() == true) { return; } >>>> SignedMaurerFilter::Pointer signedDistMap = SignedMaurerFilter::New(); >>>> float* tmpDistField = m_SignedDistanceFields[i].lock()->getPointer(0); >>>> signedDistMap->SetInsideIsPositive(false); >>>> signedDistMap->SetSquaredDistance(true); >>>> signedDistMap->SetUseImageSpacing(true); >>>> signedDistMap->SetInput(booleanFeatureImages[i]); >>>> try >>>> { >>>> signedDistMap->Update(); >>>> >>>> for (size_t z = 0; z < iDims[2]; z++) >>>> { >>>> zStride = z * iDims[1] * iDims[2]; >>>> for (size_t y = 0; y < iDims[1]; y++) >>>> { >>>> yStride = y * iDims[0]; >>>> for (size_t x = 0; x < iDims[0]; x++) >>>> { >>>> index = zStride + yStride + x; >>>> BoolImageType::IndexType pixelIndex; >>>> pixelIndex[0] = x; >>>> pixelIndex[1] = y; >>>> pixelIndex[2] = z; >>>> FloatImageType::Pointer out = signedDistMap->GetOutput(); >>>> out->SetBufferedRegion(region); >>>> tmpDistField[index] = out->GetPixel(pixelIndex); >>>> } >>>> } >>>> } >>>> } >>>> catch (itk::ExceptionObject& err) >>>> { >>>> setErrorCondition(-5); >>>> QString ss = QObject::tr("Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature %1. Error Message returned from ITK:\n %2").arg(i).arg(err.GetDescription()); >>>> notifyErrorMessage(getHumanLabel(), ss, getErrorCondition()); >>>> } >>>> } >>>> -- >>>> Mike Jackson >>>> BlueQuartz Software, LLC >>>> [e]: mike.jackson at bluequartz.net >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the 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 >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community > From andinet.enqu at kitware.com Wed Oct 28 08:31:44 2015 From: andinet.enqu at kitware.com (Andinet Enquobahrie) Date: Wed, 28 Oct 2015 08:31:44 -0400 Subject: [ITK-users] ANNOUNCE: Kitware is hiring technical project leads for the medical computing group Message-ID: Apologies for duplicate postings. =================== Hi folks, We are looking to hire technical project leads in our Medical Computing group. If you are a talented medical image analysis and visualization expert with strong project management skills, please consider applying. For the full posting see: http://tinyurl.com/qal35fp JOB DESCRIPTION ================ Kitware is actively seeking talented individuals to contribute to the creation, development and improvement of leading edge medical computing software solutions in the following ways: *Lead a team of computer scientists and developers in biomedical image analysis , visualization and end-user GUI application projects. *Develop and maintain client/sponsor relationships and participate in business development. *Initiate, build and maintain business and research relationships with commercial customers and external collaborators; and *Develop and write grant proposals to government funding agencies such as NIH, DOD and NSF. Qualifications *Masters or PhD in computer science, biomedical engineering, or a related field that has emphasis in medical image analysis and visualization *Concrete experience implementing biomedical analysis solutions such as: image registration, segmentation, volume rendering, statistical computing, visualization, end-user application etc.; with related open-source toolkits and applications such as ITK, VTK, Slicer and Qt. *Proven track record of leading projects through design, development, release, and maintenance phases *Proven track record of identifying funding sources, contributing to successful proposals and SOWs, and securing government and/or commercial contracts and *Excellent communication and writing skills Additional Information Kitware team members enjoy a small company environment, flexibility in work assignments, and high levels of independence and responsibility. Besides a great work environment, our comprehensive benefits package includes a generous compensation plan, flexible working hours, six weeks paid time off, 401(k), health insurance, life insurance, short- and long-term disability insurance, bonus plan, and free coffee, drinks and snacks. Applicants are currently being accepted for our Carrboro, NC location. Carrboro, North Carolina is located near Chapel Hill and the University of North Carolina, and is part of the larger Research Triangle Park region. This area is widely-noted for rapid growth of high-technology focused firms, and for being home to several excellent universities, including UNC, Duke, and NC State. The vibrancy in the area makes it a great place to live and Carrboro is also known for being a cultural hub full of award-winning restaurants and a vivid scene of music, theatre, and art. ==================== For other job openings at Kitware, please check http://jobs.kitware.com/opportunities.html -- Andinet Enquobahrie, Ph.D., MBA Assistant Director of Medical Computing Kitware, Inc. http://www.kitware.com (919) 969-6990 x311 -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Wed Oct 28 08:21:48 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 28 Oct 2015 08:21:48 -0400 Subject: [ITK-users] [ITK] Buffered Region out of Range error In-Reply-To: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> References: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> Message-ID: <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> Hello, There could also be some symbol resolution issues/ conflicts. Are you using shared libraries? What is the output of otool -L? What GUI library are you using? What C++ library (libc++ vs libstdc++)? Are you consistently using the same c++ library? If you set the CMAKE_OSX_DEPLOYMENT_TARGET to 10.8 you can easily use libstdc++ by default. I see a use of a "lock" in your code. What do you have going on with threads? HTH, Brad On Oct 28, 2015, at 7:57 AM, Michael Jackson wrote: > Nope. It does not help. I?m going to add some more information and see where that takes the discussion. We are trying to integrate ITK into our project DREAM.3D (github.com/dream3d) which uses a plugin system to load user developed data analysis filters. The failure mode we are seeing is when 2 filters, in different plugins, use the same ITK code. The DREAM.3D plugin that contains the DREAM.3D Filter that gets loaded first will run through without issues. The second DREAM.3D Plugin that contains the second DREAM.3D Filter will fail with the exception message. The ITK code is exactly the same except for the name of the c++ class that holds the code. We have replicated this on OS X 10.9 and 10.10. We can NOT replicate the issue on Windows (VS2013) or Linux (Clang 3.6). We have it down to a fairly simple DREAM.3D test case but not an ITK test case. After moving some codes around and moving some of our looping code inside the ?try-catch? block we finally started seeing the exception messages. I am hoping we are just using ITK incorrectly and OS X is just exposing the incorrect use. The weird part is that we get the correct results on the other systems so it is not like the other platforms have a silent failure. > > Thanks for any help. > -- > Mike Jackson [mike.jackson at bluequartz.net] > > >> On Oct 27, 2015, at 6:22 PM, Matt McCormick wrote: >> >> Hi Mike, >> >> Does calling >> >> UpdateLargestPossibleRegion() >> >> instead of >> >> Update() >> >> help? >> >> Matt >> >> On Tue, Oct 27, 2015 at 5:59 PM, Michael Jackson >> wrote: >>> I have been struggling with this error all afternoon and I just can not ?see? what I am doing wrong. I am getting the following exception message from our program: >>> >>> Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature 9. Error Message returned from ITK: >>> itk::ERROR: MultiThreader(0x7fb53486e200): Exception occurred during SingleMethodExecute >>> /Users/Shared/DREAM3D_SDK/InsightToolkit-4.7.2/Modules/Core/Common/include/itkImageConstIterator.h:211: >>> itk::ERROR: Region ImageRegion (0x12e6f6730) >>> Dimension: 3 >>> Index: [0, 0, 0] >>> Size: [64, 64, 4] >>> is outside of buffered region ImageRegion (0x7fb53c0a8040) >>> Dimension: 3 >>> Index: [0, 0, 0] >>> Size: [0, 0, 0] >>> >>> So what are the reasons that this can happen? Basically we creating an unsigned char image where we fill in the pixels, then run the Itk filter on each unsigned char image. Finally we want to copy the final output data into one of our own arrays. I will post the code under here. Any help is greatly appreciated. >>> >>> size_t iDims[3] = { 0, 0, 0 }; >>> float origin[3] = { 0.0f, 0.0f, 0.0f }; >>> float resolution[3] = { 0.0f, 0.0f, 0.0f }; >>> >>> image->getDimensions(iDims); >>> image->getOrigin(origin); >>> image->getResolution(resolution); >>> >>> int32_t numFeatures = m_SignedDistanceFields.size(); >>> >>> typedef itk::Image BoolImageType; >>> typedef itk::Image FloatImageType; >>> std::vector booleanFeatureImages(numFeatures); >>> BoolImageType::IndexType start; >>> BoolImageType::SizeType size; >>> BoolImageType::RegionType region; >>> >>> start.Fill(0); >>> >>> size[0] = iDims[0]; >>> size[1] = iDims[1]; >>> size[2] = iDims[2]; >>> >>> region.SetIndex(start); >>> region.SetSize(size); >>> >>> for (int32_t i = 0; i < numFeatures; i++) >>> { >>> BoolImageType::Pointer tmpBoolImage = BoolImageType::New(); >>> tmpBoolImage->SetRegions(region); >>> tmpBoolImage->Allocate(); >>> tmpBoolImage->SetOrigin(origin); >>> tmpBoolImage->SetSpacing(resolution); >>> tmpBoolImage->FillBuffer(0); >>> booleanFeatureImages[i] = tmpBoolImage; >>> } >>> >>> size_t zStride = 0; >>> size_t yStride = 0; >>> size_t index = 0; >>> >>> for (size_t z = 0; z < iDims[2]; z++) >>> { >>> zStride = z * iDims[1] * iDims[2]; >>> for (size_t y = 0; y < iDims[1]; y++) >>> { >>> yStride = y * iDims[0]; >>> for (size_t x = 0; x < iDims[0]; x++) >>> { >>> index = zStride + yStride + x; >>> BoolImageType::IndexType pixelIndex; >>> pixelIndex[0] = x; >>> pixelIndex[1] = y; >>> pixelIndex[2] = z; >>> if (x == y && y == z) { booleanFeatureImages[0]->SetPixel(pixelIndex, 255); } >>> booleanFeatureImages[m_FeatureIds[index]]->SetPixel(pixelIndex, 255); >>> } >>> } >>> } >>> // Compute signed distance field for each Feature >>> typedef itk::SignedMaurerDistanceMapImageFilter SignedMaurerFilter; >>> >>> for (int32_t i = 0; i < numFeatures; i++) >>> { >>> if (getCancel() == true) { return; } >>> SignedMaurerFilter::Pointer signedDistMap = SignedMaurerFilter::New(); >>> float* tmpDistField = m_SignedDistanceFields[i].lock()->getPointer(0); >>> signedDistMap->SetInsideIsPositive(false); >>> signedDistMap->SetSquaredDistance(true); >>> signedDistMap->SetUseImageSpacing(true); >>> signedDistMap->SetInput(booleanFeatureImages[i]); >>> try >>> { >>> signedDistMap->Update(); >>> >>> for (size_t z = 0; z < iDims[2]; z++) >>> { >>> zStride = z * iDims[1] * iDims[2]; >>> for (size_t y = 0; y < iDims[1]; y++) >>> { >>> yStride = y * iDims[0]; >>> for (size_t x = 0; x < iDims[0]; x++) >>> { >>> index = zStride + yStride + x; >>> BoolImageType::IndexType pixelIndex; >>> pixelIndex[0] = x; >>> pixelIndex[1] = y; >>> pixelIndex[2] = z; >>> FloatImageType::Pointer out = signedDistMap->GetOutput(); >>> out->SetBufferedRegion(region); >>> tmpDistField[index] = out->GetPixel(pixelIndex); >>> } >>> } >>> } >>> } >>> catch (itk::ExceptionObject& err) >>> { >>> setErrorCondition(-5); >>> QString ss = QObject::tr("Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature %1. Error Message returned from ITK:\n %2").arg(i).arg(err.GetDescription()); >>> notifyErrorMessage(getHumanLabel(), ss, getErrorCondition()); >>> } >>> } >>> -- >>> Mike Jackson >>> BlueQuartz Software, LLC >>> [e]: mike.jackson at bluequartz.net >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Wed Oct 28 09:21:30 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 28 Oct 2015 09:21:30 -0400 Subject: [ITK-users] [ITK] Buffered Region out of Range error In-Reply-To: References: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> Message-ID: <5EA71915-616F-4FFD-91E8-26941201051C@mail.nih.gov> I believe if Qt used libstdc++ then it would show up on that list. I'd run an otool -L on one of those libraries to double check. I'd try to build against OSX 10.8 or on a 10.8 system, just to rule out C++ library compatibility issues. I have had very odd things happen when these don't match. The other issue I have seen some time is run-time information problems when ITK classes are instantiated in different libraries and shared between them. Things like dynamic_cast can fail, along with specific exception types not being caught. We have recently improved the export specification in ITK, and you should upgrade. This may be a larger architectural problem, and techniques like explicit instantiation of object which can be shared can help. *shameless plug* You could also look into using SimpleITK, which provides a clean interface. It does this by provided a full export specified interface free from templates, and explicitly instantiating many parts of ITK. The SimpleITK object could be the objects that are shared between libraries. You could try compiling ITK with USE_COMPIILER_HIDDEN_VISIBILITY OFF this will disable the harsh hidden visibility and may help problematic symbols be shared. HTH, Brad On Oct 28, 2015, at 8:31 AM, Michael Jackson wrote: > Yes, All dependent libraries are shared. > > otool -L for one of our plugins: > @rpath/libDREAM3DWidgetsLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKReview-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKLabelMap-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKQuadEdgeMesh-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKBiasCorrection-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKPolynomials-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKBioCell-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKFEM-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOSpatialObjects-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOXML-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOBioRad-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGDCM-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmMSFF-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkopenjpeg-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGIPL-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOMeta-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIONIFTI-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKniftiio-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIONRRD-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKNrrdIO-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOSiemens-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOStimulate-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformHDF5-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/hdf5-1.8.15-Debug/lib/libhdf5_debug.10.0.1.dylib (compatibility version 10.0.1, current version 1.8.15) > /Users/Shared/DREAM3D_SDK/hdf5-1.8.15-Debug/lib/libhdf5_cpp_debug.10.0.1.dylib (compatibility version 10.0.1, current version 1.8.15) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformInsightLegacy-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformMatlab-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOVTK-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKKLMRegionGrowing-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKVTK-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > @rpath/libQtSupportLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) > @rpath/libSIMPLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/tbb43_20150611oss/lib/libtbb_debug.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/tbb43_20150611oss/lib/libtbbmalloc_debug.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.4.0, current version 5.4.2) > /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.2) > @rpath/libH5Support_debug.dylib (compatibility version 0.0.0, current version 0.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0) > /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.4.0, current version 5.4.2) > /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.4.0, current version 5.4.2) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOBMP-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOJPEG-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOPNG-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkpng-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTIFF-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitktiff-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkjpeg-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKWatersheds-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKPath-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKOptimizers-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKSpatialObjects-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKMesh-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmDICT-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmIOD-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKEXPAT-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmDSED-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmCommon-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKMetaIO-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKznz-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkzlib-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGE-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOIPL-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformBase-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKStatistics-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkNetlibSlatec-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOImageBase-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKCommon-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkdouble-conversion-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitksys-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKVNLInstantiation-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvnl_algo-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkv3p_lsqr-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvnl-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvcl-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkv3p_netlib-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) > /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0) > > We are using Qt 5.4.2 for our GUI. Looks like libc++. How do I change this? We use the precompiled Qt 5.4 binaries from qtproject.io and I am not sure if they use libstdC++ or libc++. We compile everything else: HDF5, Boost, Qwt, ITK, Eigen and TBB. > > The ?.lock()? is for a boost::weak_ptr variable that stores one of our own malloc?ed arrays. No threading (at this level). > > -- > Mike Jackson [mike.jackson at bluequartz.net] > > >> On Oct 28, 2015, at 8:21 AM, Bradley Lowekamp wrote: >> >> Hello, >> >> There could also be some symbol resolution issues/ conflicts. Are you using shared libraries? What is the output of otool -L? What GUI library are you using? What C++ library (libc++ vs libstdc++)? Are you consistently using the same c++ library? If you set the CMAKE_OSX_DEPLOYMENT_TARGET to 10.8 you can easily use libstdc++ by default. >> >> I see a use of a "lock" in your code. What do you have going on with threads? >> >> HTH, >> Brad >> >> On Oct 28, 2015, at 7:57 AM, Michael Jackson wrote: >> >>> Nope. It does not help. I?m going to add some more information and see where that takes the discussion. We are trying to integrate ITK into our project DREAM.3D (github.com/dream3d) which uses a plugin system to load user developed data analysis filters. The failure mode we are seeing is when 2 filters, in different plugins, use the same ITK code. The DREAM.3D plugin that contains the DREAM.3D Filter that gets loaded first will run through without issues. The second DREAM.3D Plugin that contains the second DREAM.3D Filter will fail with the exception message. The ITK code is exactly the same except for the name of the c++ class that holds the code. We have replicated this on OS X 10.9 and 10.10. We can NOT replicate the issue on Windows (VS2013) or Linux (Clang 3.6). We have it down to a fairly simple DREAM.3D test case but not an ITK test case. After moving some codes around and moving some of our looping code inside the ?try-catch? block we finally started seeing the exception messages. I am hoping we are just using ITK incorrectly and OS X is just exposing the incorrect use. The weird part is that we get the correct results on the other systems so it is not like the other platforms have a silent failure. >>> >>> Thanks for any help. >>> -- >>> Mike Jackson [mike.jackson at bluequartz.net] >>> >>> >>>> On Oct 27, 2015, at 6:22 PM, Matt McCormick wrote: >>>> >>>> Hi Mike, >>>> >>>> Does calling >>>> >>>> UpdateLargestPossibleRegion() >>>> >>>> instead of >>>> >>>> Update() >>>> >>>> help? >>>> >>>> Matt >>>> >>>> On Tue, Oct 27, 2015 at 5:59 PM, Michael Jackson >>>> wrote: >>>>> I have been struggling with this error all afternoon and I just can not ?see? what I am doing wrong. I am getting the following exception message from our program: >>>>> >>>>> Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature 9. Error Message returned from ITK: >>>>> itk::ERROR: MultiThreader(0x7fb53486e200): Exception occurred during SingleMethodExecute >>>>> /Users/Shared/DREAM3D_SDK/InsightToolkit-4.7.2/Modules/Core/Common/include/itkImageConstIterator.h:211: >>>>> itk::ERROR: Region ImageRegion (0x12e6f6730) >>>>> Dimension: 3 >>>>> Index: [0, 0, 0] >>>>> Size: [64, 64, 4] >>>>> is outside of buffered region ImageRegion (0x7fb53c0a8040) >>>>> Dimension: 3 >>>>> Index: [0, 0, 0] >>>>> Size: [0, 0, 0] >>>>> >>>>> So what are the reasons that this can happen? Basically we creating an unsigned char image where we fill in the pixels, then run the Itk filter on each unsigned char image. Finally we want to copy the final output data into one of our own arrays. I will post the code under here. Any help is greatly appreciated. >>>>> >>>>> size_t iDims[3] = { 0, 0, 0 }; >>>>> float origin[3] = { 0.0f, 0.0f, 0.0f }; >>>>> float resolution[3] = { 0.0f, 0.0f, 0.0f }; >>>>> >>>>> image->getDimensions(iDims); >>>>> image->getOrigin(origin); >>>>> image->getResolution(resolution); >>>>> >>>>> int32_t numFeatures = m_SignedDistanceFields.size(); >>>>> >>>>> typedef itk::Image BoolImageType; >>>>> typedef itk::Image FloatImageType; >>>>> std::vector booleanFeatureImages(numFeatures); >>>>> BoolImageType::IndexType start; >>>>> BoolImageType::SizeType size; >>>>> BoolImageType::RegionType region; >>>>> >>>>> start.Fill(0); >>>>> >>>>> size[0] = iDims[0]; >>>>> size[1] = iDims[1]; >>>>> size[2] = iDims[2]; >>>>> >>>>> region.SetIndex(start); >>>>> region.SetSize(size); >>>>> >>>>> for (int32_t i = 0; i < numFeatures; i++) >>>>> { >>>>> BoolImageType::Pointer tmpBoolImage = BoolImageType::New(); >>>>> tmpBoolImage->SetRegions(region); >>>>> tmpBoolImage->Allocate(); >>>>> tmpBoolImage->SetOrigin(origin); >>>>> tmpBoolImage->SetSpacing(resolution); >>>>> tmpBoolImage->FillBuffer(0); >>>>> booleanFeatureImages[i] = tmpBoolImage; >>>>> } >>>>> >>>>> size_t zStride = 0; >>>>> size_t yStride = 0; >>>>> size_t index = 0; >>>>> >>>>> for (size_t z = 0; z < iDims[2]; z++) >>>>> { >>>>> zStride = z * iDims[1] * iDims[2]; >>>>> for (size_t y = 0; y < iDims[1]; y++) >>>>> { >>>>> yStride = y * iDims[0]; >>>>> for (size_t x = 0; x < iDims[0]; x++) >>>>> { >>>>> index = zStride + yStride + x; >>>>> BoolImageType::IndexType pixelIndex; >>>>> pixelIndex[0] = x; >>>>> pixelIndex[1] = y; >>>>> pixelIndex[2] = z; >>>>> if (x == y && y == z) { booleanFeatureImages[0]->SetPixel(pixelIndex, 255); } >>>>> booleanFeatureImages[m_FeatureIds[index]]->SetPixel(pixelIndex, 255); >>>>> } >>>>> } >>>>> } >>>>> // Compute signed distance field for each Feature >>>>> typedef itk::SignedMaurerDistanceMapImageFilter SignedMaurerFilter; >>>>> >>>>> for (int32_t i = 0; i < numFeatures; i++) >>>>> { >>>>> if (getCancel() == true) { return; } >>>>> SignedMaurerFilter::Pointer signedDistMap = SignedMaurerFilter::New(); >>>>> float* tmpDistField = m_SignedDistanceFields[i].lock()->getPointer(0); >>>>> signedDistMap->SetInsideIsPositive(false); >>>>> signedDistMap->SetSquaredDistance(true); >>>>> signedDistMap->SetUseImageSpacing(true); >>>>> signedDistMap->SetInput(booleanFeatureImages[i]); >>>>> try >>>>> { >>>>> signedDistMap->Update(); >>>>> >>>>> for (size_t z = 0; z < iDims[2]; z++) >>>>> { >>>>> zStride = z * iDims[1] * iDims[2]; >>>>> for (size_t y = 0; y < iDims[1]; y++) >>>>> { >>>>> yStride = y * iDims[0]; >>>>> for (size_t x = 0; x < iDims[0]; x++) >>>>> { >>>>> index = zStride + yStride + x; >>>>> BoolImageType::IndexType pixelIndex; >>>>> pixelIndex[0] = x; >>>>> pixelIndex[1] = y; >>>>> pixelIndex[2] = z; >>>>> FloatImageType::Pointer out = signedDistMap->GetOutput(); >>>>> out->SetBufferedRegion(region); >>>>> tmpDistField[index] = out->GetPixel(pixelIndex); >>>>> } >>>>> } >>>>> } >>>>> } >>>>> catch (itk::ExceptionObject& err) >>>>> { >>>>> setErrorCondition(-5); >>>>> QString ss = QObject::tr("Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature %1. Error Message returned from ITK:\n %2").arg(i).arg(err.GetDescription()); >>>>> notifyErrorMessage(getHumanLabel(), ss, getErrorCondition()); >>>>> } >>>>> } >>>>> -- >>>>> Mike Jackson >>>>> BlueQuartz Software, LLC >>>>> [e]: mike.jackson at bluequartz.net >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the 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 >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >> > From mike.jackson at bluequartz.net Wed Oct 28 10:40:24 2015 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Wed, 28 Oct 2015 10:40:24 -0400 Subject: [ITK-users] [ITK] Buffered Region out of Range error In-Reply-To: <5EA71915-616F-4FFD-91E8-26941201051C@mail.nih.gov> References: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> <5EA71915-616F-4FFD-91E8-26941201051C@mail.nih.gov> Message-ID: <29375C19-58B7-4A9A-9B6D-EF79D51A7691@bluequartz.net> So we built on an OS X 10.8.5 machine and now the code works completely and gives the correct output. On the 10.8.5 machine all the libraries are linked against ?libstdc++? EXCEPT Qt. Where-as on OS X 10.9 and 10.10 they are all linked against libc++. So I am thinking, at least for ITK 4.7.2 we have stumbled upon an issue with the C++ library? We are now recompiling ITK using the USE_COMPIILER_HIDDEN_VISIBILITY=OFF as you have suggested and will report back those findings. -- Mike Jackson [mike.jackson at bluequartz.net] > On Oct 28, 2015, at 9:21 AM, Bradley Lowekamp wrote: > > I believe if Qt used libstdc++ then it would show up on that list. I'd run an otool -L on one of those libraries to double check. > > I'd try to build against OSX 10.8 or on a 10.8 system, just to rule out C++ library compatibility issues. I have had very odd things happen when these don't match. > > The other issue I have seen some time is run-time information problems when ITK classes are instantiated in different libraries and shared between them. Things like dynamic_cast can fail, along with specific exception types not being caught. We have recently improved the export specification in ITK, and you should upgrade. This may be a larger architectural problem, and techniques like explicit instantiation of object which can be shared can help. > > *shameless plug* You could also look into using SimpleITK, which provides a clean interface. It does this by provided a full export specified interface free from templates, and explicitly instantiating many parts of ITK. The SimpleITK object could be the objects that are shared between libraries. > > You could try compiling ITK with USE_COMPIILER_HIDDEN_VISIBILITY OFF this will disable the harsh hidden visibility and may help problematic symbols be shared. > > HTH, > Brad > > > > > On Oct 28, 2015, at 8:31 AM, Michael Jackson wrote: > >> Yes, All dependent libraries are shared. >> >> otool -L for one of our plugins: >> @rpath/libDREAM3DWidgetsLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKReview-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKLabelMap-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKQuadEdgeMesh-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKBiasCorrection-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKPolynomials-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKBioCell-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKFEM-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOSpatialObjects-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOXML-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOBioRad-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGDCM-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmMSFF-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkopenjpeg-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGIPL-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOMeta-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIONIFTI-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKniftiio-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIONRRD-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKNrrdIO-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOSiemens-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOStimulate-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformHDF5-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/hdf5-1.8.15-Debug/lib/libhdf5_debug.10.0.1.dylib (compatibility version 10.0.1, current version 1.8.15) >> /Users/Shared/DREAM3D_SDK/hdf5-1.8.15-Debug/lib/libhdf5_cpp_debug.10.0.1.dylib (compatibility version 10.0.1, current version 1.8.15) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformInsightLegacy-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformMatlab-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOVTK-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKKLMRegionGrowing-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKVTK-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> @rpath/libQtSupportLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >> @rpath/libSIMPLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/tbb43_20150611oss/lib/libtbb_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/tbb43_20150611oss/lib/libtbbmalloc_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.4.0, current version 5.4.2) >> /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.2) >> @rpath/libH5Support_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0) >> /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.4.0, current version 5.4.2) >> /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.4.0, current version 5.4.2) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOBMP-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOJPEG-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOPNG-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkpng-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTIFF-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitktiff-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkjpeg-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKWatersheds-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKPath-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKOptimizers-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKSpatialObjects-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKMesh-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmDICT-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmIOD-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKEXPAT-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmDSED-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmCommon-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKMetaIO-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKznz-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkzlib-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGE-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOIPL-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformBase-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKStatistics-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkNetlibSlatec-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOImageBase-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKCommon-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkdouble-conversion-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitksys-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKVNLInstantiation-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvnl_algo-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkv3p_lsqr-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvnl-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvcl-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkv3p_netlib-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0) >> >> We are using Qt 5.4.2 for our GUI. Looks like libc++. How do I change this? We use the precompiled Qt 5.4 binaries from qtproject.io and I am not sure if they use libstdC++ or libc++. We compile everything else: HDF5, Boost, Qwt, ITK, Eigen and TBB. >> >> The ?.lock()? is for a boost::weak_ptr variable that stores one of our own malloc?ed arrays. No threading (at this level). >> >> -- >> Mike Jackson [mike.jackson at bluequartz.net] >> >> >>> On Oct 28, 2015, at 8:21 AM, Bradley Lowekamp wrote: >>> >>> Hello, >>> >>> There could also be some symbol resolution issues/ conflicts. Are you using shared libraries? What is the output of otool -L? What GUI library are you using? What C++ library (libc++ vs libstdc++)? Are you consistently using the same c++ library? If you set the CMAKE_OSX_DEPLOYMENT_TARGET to 10.8 you can easily use libstdc++ by default. >>> >>> I see a use of a "lock" in your code. What do you have going on with threads? >>> >>> HTH, >>> Brad >>> >>> On Oct 28, 2015, at 7:57 AM, Michael Jackson wrote: >>> >>>> Nope. It does not help. I?m going to add some more information and see where that takes the discussion. We are trying to integrate ITK into our project DREAM.3D (github.com/dream3d) which uses a plugin system to load user developed data analysis filters. The failure mode we are seeing is when 2 filters, in different plugins, use the same ITK code. The DREAM.3D plugin that contains the DREAM.3D Filter that gets loaded first will run through without issues. The second DREAM.3D Plugin that contains the second DREAM.3D Filter will fail with the exception message. The ITK code is exactly the same except for the name of the c++ class that holds the code. We have replicated this on OS X 10.9 and 10.10. We can NOT replicate the issue on Windows (VS2013) or Linux (Clang 3.6). We have it down to a fairly simple DREAM.3D test case but not an ITK test case. After moving some codes around and moving some of our looping code inside the ?try-catch? block we finally started seeing the exception messages. I am hoping we are just using ITK incorrectly and OS X is just exposing the incorrect use. The weird part is that we get the correct results on the other systems so it is not like the other platforms have a silent failure. >>>> >>>> Thanks for any help. >>>> -- >>>> Mike Jackson [mike.jackson at bluequartz.net] >>>> >>>> >>>>> On Oct 27, 2015, at 6:22 PM, Matt McCormick wrote: >>>>> >>>>> Hi Mike, >>>>> >>>>> Does calling >>>>> >>>>> UpdateLargestPossibleRegion() >>>>> >>>>> instead of >>>>> >>>>> Update() >>>>> >>>>> help? >>>>> >>>>> Matt >>>>> >>>>> On Tue, Oct 27, 2015 at 5:59 PM, Michael Jackson >>>>> wrote: >>>>>> I have been struggling with this error all afternoon and I just can not ?see? what I am doing wrong. I am getting the following exception message from our program: >>>>>> >>>>>> Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature 9. Error Message returned from ITK: >>>>>> itk::ERROR: MultiThreader(0x7fb53486e200): Exception occurred during SingleMethodExecute >>>>>> /Users/Shared/DREAM3D_SDK/InsightToolkit-4.7.2/Modules/Core/Common/include/itkImageConstIterator.h:211: >>>>>> itk::ERROR: Region ImageRegion (0x12e6f6730) >>>>>> Dimension: 3 >>>>>> Index: [0, 0, 0] >>>>>> Size: [64, 64, 4] >>>>>> is outside of buffered region ImageRegion (0x7fb53c0a8040) >>>>>> Dimension: 3 >>>>>> Index: [0, 0, 0] >>>>>> Size: [0, 0, 0] >>>>>> >>>>>> So what are the reasons that this can happen? Basically we creating an unsigned char image where we fill in the pixels, then run the Itk filter on each unsigned char image. Finally we want to copy the final output data into one of our own arrays. I will post the code under here. Any help is greatly appreciated. >>>>>> >>>>>> size_t iDims[3] = { 0, 0, 0 }; >>>>>> float origin[3] = { 0.0f, 0.0f, 0.0f }; >>>>>> float resolution[3] = { 0.0f, 0.0f, 0.0f }; >>>>>> >>>>>> image->getDimensions(iDims); >>>>>> image->getOrigin(origin); >>>>>> image->getResolution(resolution); >>>>>> >>>>>> int32_t numFeatures = m_SignedDistanceFields.size(); >>>>>> >>>>>> typedef itk::Image BoolImageType; >>>>>> typedef itk::Image FloatImageType; >>>>>> std::vector booleanFeatureImages(numFeatures); >>>>>> BoolImageType::IndexType start; >>>>>> BoolImageType::SizeType size; >>>>>> BoolImageType::RegionType region; >>>>>> >>>>>> start.Fill(0); >>>>>> >>>>>> size[0] = iDims[0]; >>>>>> size[1] = iDims[1]; >>>>>> size[2] = iDims[2]; >>>>>> >>>>>> region.SetIndex(start); >>>>>> region.SetSize(size); >>>>>> >>>>>> for (int32_t i = 0; i < numFeatures; i++) >>>>>> { >>>>>> BoolImageType::Pointer tmpBoolImage = BoolImageType::New(); >>>>>> tmpBoolImage->SetRegions(region); >>>>>> tmpBoolImage->Allocate(); >>>>>> tmpBoolImage->SetOrigin(origin); >>>>>> tmpBoolImage->SetSpacing(resolution); >>>>>> tmpBoolImage->FillBuffer(0); >>>>>> booleanFeatureImages[i] = tmpBoolImage; >>>>>> } >>>>>> >>>>>> size_t zStride = 0; >>>>>> size_t yStride = 0; >>>>>> size_t index = 0; >>>>>> >>>>>> for (size_t z = 0; z < iDims[2]; z++) >>>>>> { >>>>>> zStride = z * iDims[1] * iDims[2]; >>>>>> for (size_t y = 0; y < iDims[1]; y++) >>>>>> { >>>>>> yStride = y * iDims[0]; >>>>>> for (size_t x = 0; x < iDims[0]; x++) >>>>>> { >>>>>> index = zStride + yStride + x; >>>>>> BoolImageType::IndexType pixelIndex; >>>>>> pixelIndex[0] = x; >>>>>> pixelIndex[1] = y; >>>>>> pixelIndex[2] = z; >>>>>> if (x == y && y == z) { booleanFeatureImages[0]->SetPixel(pixelIndex, 255); } >>>>>> booleanFeatureImages[m_FeatureIds[index]]->SetPixel(pixelIndex, 255); >>>>>> } >>>>>> } >>>>>> } >>>>>> // Compute signed distance field for each Feature >>>>>> typedef itk::SignedMaurerDistanceMapImageFilter SignedMaurerFilter; >>>>>> >>>>>> for (int32_t i = 0; i < numFeatures; i++) >>>>>> { >>>>>> if (getCancel() == true) { return; } >>>>>> SignedMaurerFilter::Pointer signedDistMap = SignedMaurerFilter::New(); >>>>>> float* tmpDistField = m_SignedDistanceFields[i].lock()->getPointer(0); >>>>>> signedDistMap->SetInsideIsPositive(false); >>>>>> signedDistMap->SetSquaredDistance(true); >>>>>> signedDistMap->SetUseImageSpacing(true); >>>>>> signedDistMap->SetInput(booleanFeatureImages[i]); >>>>>> try >>>>>> { >>>>>> signedDistMap->Update(); >>>>>> >>>>>> for (size_t z = 0; z < iDims[2]; z++) >>>>>> { >>>>>> zStride = z * iDims[1] * iDims[2]; >>>>>> for (size_t y = 0; y < iDims[1]; y++) >>>>>> { >>>>>> yStride = y * iDims[0]; >>>>>> for (size_t x = 0; x < iDims[0]; x++) >>>>>> { >>>>>> index = zStride + yStride + x; >>>>>> BoolImageType::IndexType pixelIndex; >>>>>> pixelIndex[0] = x; >>>>>> pixelIndex[1] = y; >>>>>> pixelIndex[2] = z; >>>>>> FloatImageType::Pointer out = signedDistMap->GetOutput(); >>>>>> out->SetBufferedRegion(region); >>>>>> tmpDistField[index] = out->GetPixel(pixelIndex); >>>>>> } >>>>>> } >>>>>> } >>>>>> } >>>>>> catch (itk::ExceptionObject& err) >>>>>> { >>>>>> setErrorCondition(-5); >>>>>> QString ss = QObject::tr("Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature %1. Error Message returned from ITK:\n %2").arg(i).arg(err.GetDescription()); >>>>>> notifyErrorMessage(getHumanLabel(), ss, getErrorCondition()); >>>>>> } >>>>>> } >>>>>> -- >>>>>> Mike Jackson >>>>>> BlueQuartz Software, LLC >>>>>> [e]: mike.jackson at bluequartz.net >>>>>> >>>>>> _____________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>> http://www.kitware.com/products/protraining.php >>>>>> >>>>>> Please keep messages on-topic and check the 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 >>>> _______________________________________________ >>>> Community mailing list >>>> Community at itk.org >>>> http://public.kitware.com/mailman/listinfo/community >>> >> > From mike.jackson at bluequartz.net Wed Oct 28 10:59:40 2015 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Wed, 28 Oct 2015 10:59:40 -0400 Subject: [ITK-users] [ITK] Buffered Region out of Range error In-Reply-To: <29375C19-58B7-4A9A-9B6D-EF79D51A7691@bluequartz.net> References: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> <5EA71915-616F-4FFD-91E8-26941201051C@mail.nih.gov> <29375C19-58B7-4A9A-9B6D-EF79D51A7691@bluequartz.net> Message-ID: That did not work either. Still have the same errors. We compiled ITK 4.8.1 using the USE_COMPIILER_HIDDEN_VISIBILITY=OFF CMake flag. Have you seen this error before and if so how was it fixed? -- Mike Jackson [mike.jackson at bluequartz.net] > On Oct 28, 2015, at 10:40 AM, Michael Jackson wrote: > > So we built on an OS X 10.8.5 machine and now the code works completely and gives the correct output. On the 10.8.5 machine all the libraries are linked against ?libstdc++? EXCEPT Qt. Where-as on OS X 10.9 and 10.10 they are all linked against libc++. So I am thinking, at least for ITK 4.7.2 we have stumbled upon an issue with the C++ library? We are now recompiling ITK using the USE_COMPIILER_HIDDEN_VISIBILITY=OFF as you have suggested and will report back those findings. > -- > Mike Jackson [mike.jackson at bluequartz.net] > > >> On Oct 28, 2015, at 9:21 AM, Bradley Lowekamp wrote: >> >> I believe if Qt used libstdc++ then it would show up on that list. I'd run an otool -L on one of those libraries to double check. >> >> I'd try to build against OSX 10.8 or on a 10.8 system, just to rule out C++ library compatibility issues. I have had very odd things happen when these don't match. >> >> The other issue I have seen some time is run-time information problems when ITK classes are instantiated in different libraries and shared between them. Things like dynamic_cast can fail, along with specific exception types not being caught. We have recently improved the export specification in ITK, and you should upgrade. This may be a larger architectural problem, and techniques like explicit instantiation of object which can be shared can help. >> >> *shameless plug* You could also look into using SimpleITK, which provides a clean interface. It does this by provided a full export specified interface free from templates, and explicitly instantiating many parts of ITK. The SimpleITK object could be the objects that are shared between libraries. >> >> You could try compiling ITK with USE_COMPIILER_HIDDEN_VISIBILITY OFF this will disable the harsh hidden visibility and may help problematic symbols be shared. >> >> HTH, >> Brad >> >> >> >> >> On Oct 28, 2015, at 8:31 AM, Michael Jackson wrote: >> >>> Yes, All dependent libraries are shared. >>> >>> otool -L for one of our plugins: >>> @rpath/libDREAM3DWidgetsLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKReview-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKLabelMap-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKQuadEdgeMesh-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKBiasCorrection-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKPolynomials-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKBioCell-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKFEM-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOSpatialObjects-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOXML-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOBioRad-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGDCM-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmMSFF-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkopenjpeg-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGIPL-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOMeta-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIONIFTI-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKniftiio-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIONRRD-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKNrrdIO-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOSiemens-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOStimulate-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformHDF5-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/hdf5-1.8.15-Debug/lib/libhdf5_debug.10.0.1.dylib (compatibility version 10.0.1, current version 1.8.15) >>> /Users/Shared/DREAM3D_SDK/hdf5-1.8.15-Debug/lib/libhdf5_cpp_debug.10.0.1.dylib (compatibility version 10.0.1, current version 1.8.15) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformInsightLegacy-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformMatlab-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOVTK-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKKLMRegionGrowing-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKVTK-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> @rpath/libQtSupportLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >>> @rpath/libSIMPLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/tbb43_20150611oss/lib/libtbb_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/tbb43_20150611oss/lib/libtbbmalloc_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.4.0, current version 5.4.2) >>> /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.2) >>> @rpath/libH5Support_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0) >>> /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.4.0, current version 5.4.2) >>> /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.4.0, current version 5.4.2) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOBMP-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOJPEG-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOPNG-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkpng-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTIFF-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitktiff-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkjpeg-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKWatersheds-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKPath-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKOptimizers-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKSpatialObjects-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKMesh-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmDICT-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmIOD-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKEXPAT-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmDSED-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmCommon-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKMetaIO-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKznz-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkzlib-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGE-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOIPL-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformBase-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKStatistics-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkNetlibSlatec-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOImageBase-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKCommon-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkdouble-conversion-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitksys-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKVNLInstantiation-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvnl_algo-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkv3p_lsqr-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvnl-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvcl-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkv3p_netlib-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0) >>> >>> We are using Qt 5.4.2 for our GUI. Looks like libc++. How do I change this? We use the precompiled Qt 5.4 binaries from qtproject.io and I am not sure if they use libstdC++ or libc++. We compile everything else: HDF5, Boost, Qwt, ITK, Eigen and TBB. >>> >>> The ?.lock()? is for a boost::weak_ptr variable that stores one of our own malloc?ed arrays. No threading (at this level). >>> >>> -- >>> Mike Jackson [mike.jackson at bluequartz.net] >>> >>> >>>> On Oct 28, 2015, at 8:21 AM, Bradley Lowekamp wrote: >>>> >>>> Hello, >>>> >>>> There could also be some symbol resolution issues/ conflicts. Are you using shared libraries? What is the output of otool -L? What GUI library are you using? What C++ library (libc++ vs libstdc++)? Are you consistently using the same c++ library? If you set the CMAKE_OSX_DEPLOYMENT_TARGET to 10.8 you can easily use libstdc++ by default. >>>> >>>> I see a use of a "lock" in your code. What do you have going on with threads? >>>> >>>> HTH, >>>> Brad >>>> >>>> On Oct 28, 2015, at 7:57 AM, Michael Jackson wrote: >>>> >>>>> Nope. It does not help. I?m going to add some more information and see where that takes the discussion. We are trying to integrate ITK into our project DREAM.3D (github.com/dream3d) which uses a plugin system to load user developed data analysis filters. The failure mode we are seeing is when 2 filters, in different plugins, use the same ITK code. The DREAM.3D plugin that contains the DREAM.3D Filter that gets loaded first will run through without issues. The second DREAM.3D Plugin that contains the second DREAM.3D Filter will fail with the exception message. The ITK code is exactly the same except for the name of the c++ class that holds the code. We have replicated this on OS X 10.9 and 10.10. We can NOT replicate the issue on Windows (VS2013) or Linux (Clang 3.6). We have it down to a fairly simple DREAM.3D test case but not an ITK test case. After moving some codes around and moving some of our looping code inside the ?try-catch? block we finally started seeing the exception messages. I am hoping we are just using ITK incorrectly and OS X is just exposing the incorrect use. The weird part is that we get the correct results on the other systems so it is not like the other platforms have a silent failure. >>>>> >>>>> Thanks for any help. >>>>> -- >>>>> Mike Jackson [mike.jackson at bluequartz.net] >>>>> >>>>> >>>>>> On Oct 27, 2015, at 6:22 PM, Matt McCormick wrote: >>>>>> >>>>>> Hi Mike, >>>>>> >>>>>> Does calling >>>>>> >>>>>> UpdateLargestPossibleRegion() >>>>>> >>>>>> instead of >>>>>> >>>>>> Update() >>>>>> >>>>>> help? >>>>>> >>>>>> Matt >>>>>> >>>>>> On Tue, Oct 27, 2015 at 5:59 PM, Michael Jackson >>>>>> wrote: >>>>>>> I have been struggling with this error all afternoon and I just can not ?see? what I am doing wrong. I am getting the following exception message from our program: >>>>>>> >>>>>>> Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature 9. Error Message returned from ITK: >>>>>>> itk::ERROR: MultiThreader(0x7fb53486e200): Exception occurred during SingleMethodExecute >>>>>>> /Users/Shared/DREAM3D_SDK/InsightToolkit-4.7.2/Modules/Core/Common/include/itkImageConstIterator.h:211: >>>>>>> itk::ERROR: Region ImageRegion (0x12e6f6730) >>>>>>> Dimension: 3 >>>>>>> Index: [0, 0, 0] >>>>>>> Size: [64, 64, 4] >>>>>>> is outside of buffered region ImageRegion (0x7fb53c0a8040) >>>>>>> Dimension: 3 >>>>>>> Index: [0, 0, 0] >>>>>>> Size: [0, 0, 0] >>>>>>> >>>>>>> So what are the reasons that this can happen? Basically we creating an unsigned char image where we fill in the pixels, then run the Itk filter on each unsigned char image. Finally we want to copy the final output data into one of our own arrays. I will post the code under here. Any help is greatly appreciated. >>>>>>> >>>>>>> size_t iDims[3] = { 0, 0, 0 }; >>>>>>> float origin[3] = { 0.0f, 0.0f, 0.0f }; >>>>>>> float resolution[3] = { 0.0f, 0.0f, 0.0f }; >>>>>>> >>>>>>> image->getDimensions(iDims); >>>>>>> image->getOrigin(origin); >>>>>>> image->getResolution(resolution); >>>>>>> >>>>>>> int32_t numFeatures = m_SignedDistanceFields.size(); >>>>>>> >>>>>>> typedef itk::Image BoolImageType; >>>>>>> typedef itk::Image FloatImageType; >>>>>>> std::vector booleanFeatureImages(numFeatures); >>>>>>> BoolImageType::IndexType start; >>>>>>> BoolImageType::SizeType size; >>>>>>> BoolImageType::RegionType region; >>>>>>> >>>>>>> start.Fill(0); >>>>>>> >>>>>>> size[0] = iDims[0]; >>>>>>> size[1] = iDims[1]; >>>>>>> size[2] = iDims[2]; >>>>>>> >>>>>>> region.SetIndex(start); >>>>>>> region.SetSize(size); >>>>>>> >>>>>>> for (int32_t i = 0; i < numFeatures; i++) >>>>>>> { >>>>>>> BoolImageType::Pointer tmpBoolImage = BoolImageType::New(); >>>>>>> tmpBoolImage->SetRegions(region); >>>>>>> tmpBoolImage->Allocate(); >>>>>>> tmpBoolImage->SetOrigin(origin); >>>>>>> tmpBoolImage->SetSpacing(resolution); >>>>>>> tmpBoolImage->FillBuffer(0); >>>>>>> booleanFeatureImages[i] = tmpBoolImage; >>>>>>> } >>>>>>> >>>>>>> size_t zStride = 0; >>>>>>> size_t yStride = 0; >>>>>>> size_t index = 0; >>>>>>> >>>>>>> for (size_t z = 0; z < iDims[2]; z++) >>>>>>> { >>>>>>> zStride = z * iDims[1] * iDims[2]; >>>>>>> for (size_t y = 0; y < iDims[1]; y++) >>>>>>> { >>>>>>> yStride = y * iDims[0]; >>>>>>> for (size_t x = 0; x < iDims[0]; x++) >>>>>>> { >>>>>>> index = zStride + yStride + x; >>>>>>> BoolImageType::IndexType pixelIndex; >>>>>>> pixelIndex[0] = x; >>>>>>> pixelIndex[1] = y; >>>>>>> pixelIndex[2] = z; >>>>>>> if (x == y && y == z) { booleanFeatureImages[0]->SetPixel(pixelIndex, 255); } >>>>>>> booleanFeatureImages[m_FeatureIds[index]]->SetPixel(pixelIndex, 255); >>>>>>> } >>>>>>> } >>>>>>> } >>>>>>> // Compute signed distance field for each Feature >>>>>>> typedef itk::SignedMaurerDistanceMapImageFilter SignedMaurerFilter; >>>>>>> >>>>>>> for (int32_t i = 0; i < numFeatures; i++) >>>>>>> { >>>>>>> if (getCancel() == true) { return; } >>>>>>> SignedMaurerFilter::Pointer signedDistMap = SignedMaurerFilter::New(); >>>>>>> float* tmpDistField = m_SignedDistanceFields[i].lock()->getPointer(0); >>>>>>> signedDistMap->SetInsideIsPositive(false); >>>>>>> signedDistMap->SetSquaredDistance(true); >>>>>>> signedDistMap->SetUseImageSpacing(true); >>>>>>> signedDistMap->SetInput(booleanFeatureImages[i]); >>>>>>> try >>>>>>> { >>>>>>> signedDistMap->Update(); >>>>>>> >>>>>>> for (size_t z = 0; z < iDims[2]; z++) >>>>>>> { >>>>>>> zStride = z * iDims[1] * iDims[2]; >>>>>>> for (size_t y = 0; y < iDims[1]; y++) >>>>>>> { >>>>>>> yStride = y * iDims[0]; >>>>>>> for (size_t x = 0; x < iDims[0]; x++) >>>>>>> { >>>>>>> index = zStride + yStride + x; >>>>>>> BoolImageType::IndexType pixelIndex; >>>>>>> pixelIndex[0] = x; >>>>>>> pixelIndex[1] = y; >>>>>>> pixelIndex[2] = z; >>>>>>> FloatImageType::Pointer out = signedDistMap->GetOutput(); >>>>>>> out->SetBufferedRegion(region); >>>>>>> tmpDistField[index] = out->GetPixel(pixelIndex); >>>>>>> } >>>>>>> } >>>>>>> } >>>>>>> } >>>>>>> catch (itk::ExceptionObject& err) >>>>>>> { >>>>>>> setErrorCondition(-5); >>>>>>> QString ss = QObject::tr("Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature %1. Error Message returned from ITK:\n %2").arg(i).arg(err.GetDescription()); >>>>>>> notifyErrorMessage(getHumanLabel(), ss, getErrorCondition()); >>>>>>> } >>>>>>> } >>>>>>> -- >>>>>>> Mike Jackson >>>>>>> BlueQuartz Software, LLC >>>>>>> [e]: mike.jackson at bluequartz.net >>>>>>> >>>>>>> _____________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>>> http://www.kitware.com/products/protraining.php >>>>>>> >>>>>>> Please keep messages on-topic and check the 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 >>>>> _______________________________________________ >>>>> Community mailing list >>>>> Community at itk.org >>>>> http://public.kitware.com/mailman/listinfo/community >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From juanprietob at gmail.com Wed Oct 28 14:30:43 2015 From: juanprietob at gmail.com (Juan Carlos Prieto) Date: Wed, 28 Oct 2015 14:30:43 -0400 Subject: [ITK-users] ITK emscripten compilation Message-ID: Dear all, I have build ITK as described in post 912 http://www.kitware.com/blog/home/post/912 However, I did not use ninja and I added the flag -D_LARGEFILE64_SOURCE=1, i.e., flags=' -Wno-warn-absolute-paths --memory-init-file 0 -s DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1 -D_LARGEFILE64_SOURCE=1' cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \ "-DCMAKE_CXX_FLAGS=$flags" "-DCMAKE_C_FLAGS=$flags" \ -DBUILD_EXAMPLES=OFF \ ../ITK make This flag is needed to avoid the error while compiling itkhdf5: */usr/src/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDstdio.c:192:5: **error: **use of undeclared identifier 'off64_t'* After I added the flag, the compilation is successful. Now, I'm trying to build a project using ITK. The cmake configuration process is similar to ITK, and the compilation is also successful. The javascript file is generated as expected. However, the execution produces the following error while on the docker machine: Could not create IO object for reading file someImage.nrrd The file doesn't exist. Filename = someImage.nrrd The image file is in the same built directory (not a problem of read-write permissions). I also tried executing it outside the virtual machine (in Mac OSX) which gives the following error: /ComponentSizeRLE.js:91 throw ex; ^ 7015448 I tried to traced the error and there is a problem while reading the data. How should I proceed on fixing this issue? or is this a known issue? Are there any size restrictions for the images? In the example shown in post 912 the images are 2D. Is there any examples using 3D images? Any comment or suggestion will be greatly appreciated. Best regards, Juan Carlos Prieto -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Oct 28 14:53:17 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 28 Oct 2015 14:53:17 -0400 Subject: [ITK-users] ITK emscripten compilation In-Reply-To: References: Message-ID: Hi Juan, > I have build ITK as described in post 912 > http://www.kitware.com/blog/home/post/912 > > However, I did not use ninja and I added the flag -D_LARGEFILE64_SOURCE=1, > i.e., > > flags=' -Wno-warn-absolute-paths --memory-init-file 0 -s > DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1 > -D_LARGEFILE64_SOURCE=1' > > cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \ > "-DCMAKE_CXX_FLAGS=$flags" "-DCMAKE_C_FLAGS=$flags" \ > -DBUILD_EXAMPLES=OFF \ > > ../ITK > > > make > > > This flag is needed to avoid the error while compiling itkhdf5: > > > /usr/src/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDstdio.c:192:5: > error: use of undeclared identifier 'off64_t' > > > After I added the flag, the compilation is successful. This is interesting. Are you using the Docker image? What version of Emscripten are you using? This is supposed to avoided with this code block: https://github.com/InsightSoftwareConsortium/ITK/blob/2f2ae65eec72701b0fc69c07b59453cc6ac2e575/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake#L294-L304 What is CMAKE_SYSTEM? > Now, I'm trying to build a project using ITK. > > > The cmake configuration process is similar to ITK, and the compilation is > also successful. The javascript file is generated as expected. Cool. > However, the execution produces the following error while on the docker > machine: > > > Could not create IO object for reading file someImage.nrrd > The file doesn't exist. > Filename = someImage.nrrd > > > The image file is in the same built directory (not a problem of read-write > permissions). You'll need to mount directories from the local filesystem that you want the Javascript code to see with NODEFS [1]. See how we do it for the ITK test driver [2]. HTH, Matt [1] https://kripken.github.io/emscripten-site/docs/api_reference/Filesystem-API.html#file-systems [2] http://itk.org/gitweb?p=ITK.git;a=commit;h=0c82b97b749cea9f409aba99c918b94295ed24c7 From juanprietob at gmail.com Wed Oct 28 15:26:57 2015 From: juanprietob at gmail.com (Juan Carlos Prieto) Date: Wed, 28 Oct 2015 15:26:57 -0400 Subject: [ITK-users] ITK emscripten compilation In-Reply-To: References: Message-ID: Hi Matt, > Are you using the Docker image? Yes, I tried with the Docker image and also I tried building it in my system with the same results. > What version of Emscripten are you using? In my system I'm using emscripten tag-1.35.4 > What is CMAKE_SYSTEM? In the docker image CMAKE_SYSTEM = Emscripten-1 In my system CMAKE_SYSTEM = Darwin-14.5.0 I also noticed the code block in the file https://github.com/InsightSoftwareConsortium/ITK/blob/2f2ae65eec72701b0fc69c07b59453cc6ac2e575/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDstdio.c#L136-L148 If H5_HAVE_FSEEKO64 is undefined, the compilation is successful. I'll try with the example and see if I am able to read the images. Best, Juan On Wed, Oct 28, 2015 at 2:53 PM, Matt McCormick wrote: > Hi Juan, > > > I have build ITK as described in post 912 > > http://www.kitware.com/blog/home/post/912 > > > > However, I did not use ninja and I added the flag > -D_LARGEFILE64_SOURCE=1, > > i.e., > > > > flags=' -Wno-warn-absolute-paths --memory-init-file 0 -s > > DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1 > > -D_LARGEFILE64_SOURCE=1' > > > > cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \ > > "-DCMAKE_CXX_FLAGS=$flags" "-DCMAKE_C_FLAGS=$flags" \ > > -DBUILD_EXAMPLES=OFF \ > > > > ../ITK > > > > > > make > > > > > > This flag is needed to avoid the error while compiling itkhdf5: > > > > > > /usr/src/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDstdio.c:192:5: > > error: use of undeclared identifier 'off64_t' > > > > > > After I added the flag, the compilation is successful. > > This is interesting. Are you using the Docker image? What version of > Emscripten are you using? This is supposed to avoided with this code > block: > > > https://github.com/InsightSoftwareConsortium/ITK/blob/2f2ae65eec72701b0fc69c07b59453cc6ac2e575/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake#L294-L304 > > What is CMAKE_SYSTEM? > > > > > Now, I'm trying to build a project using ITK. > > > > > > The cmake configuration process is similar to ITK, and the compilation is > > also successful. The javascript file is generated as expected. > > Cool. > > > > However, the execution produces the following error while on the docker > > machine: > > > > > > Could not create IO object for reading file someImage.nrrd > > The file doesn't exist. > > Filename = someImage.nrrd > > > > > > The image file is in the same built directory (not a problem of > read-write > > permissions). > > You'll need to mount directories from the local filesystem that you > want the Javascript code to see with NODEFS [1]. See how we do it for > the ITK test driver [2]. > > HTH, > Matt > > > [1] > https://kripken.github.io/emscripten-site/docs/api_reference/Filesystem-API.html#file-systems > > [2] > http://itk.org/gitweb?p=ITK.git;a=commit;h=0c82b97b749cea9f409aba99c918b94295ed24c7 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chvillap at gmail.com Thu Oct 29 09:12:11 2015 From: chvillap at gmail.com (Carlos Henrique Villa Pinto) Date: Thu, 29 Oct 2015 11:12:11 -0200 Subject: [ITK-users] Segmentation fault when trying to generate a BSpline transform from a set of matching landmarks Message-ID: Hi, everyone. I have two sets of landmark points, detected from two different 3D MR images, and I'm trying to estimate a nonlinear mapping between the pairs of matching landmarks. I already have the matchings, I just need to generate a BSpline transform from them. The LandmarkBasedTransformInitializer class seems perfect for that, but when I call its InitializeTransform() method (after setting all the required input parameters), the result is a segmentation fault. I'm using ITK 4.8.0. I checked the source code and made some tests, but the only thing that I could find out is that the problem happens in the GenerateData() method of the BSplineScatteredDataPointSetToImageFilter class, when the SingleMethodExecute() method is called by the ThreadGenerator object. In such version of ITK, that happens in line 314 of the file BSplineScatteredDataPointSetToImageFilter.hxx. I couldn't go further because I have no clue of what exactly is being called by the ThreaderCallback in that class. Does anyone have any clue about what sort of things could cause a segmentation fault in the BSplineScatteredDataPointSetToImageFilter class? Could that be a bug, maybe? I don't know if this information is relevant, but my images have both LPI orientation, origin = (-127.5, -127.5, -127.5) and spacing = 2 x 2 x 2 mm. And I'm using the SetReferenceImage() method of the LandmarkBasedTransformInitializer class to define the parametric domain of the BSpline transform. I can provide some pieces of code and more information about my data if needed. Thanks in advance! []s -- Carlos Henrique Villa Pinto Graduate Student in Computer Science Federal University of S?o Carlos - Brazil XCS -------------- next part -------------- An HTML attachment was scrubbed... URL: From hong.nhung.pham at univ-poitiers.fr Thu Oct 29 09:49:08 2015 From: hong.nhung.pham at univ-poitiers.fr (HONG NHUNG PHAM) Date: Thu, 29 Oct 2015 14:49:08 +0100 (CET) Subject: [ITK-users] Demons Registration on a Region of Interest Message-ID: <1124110917.5970566.1446126548319.JavaMail.zimbra@univ-poitiers.fr> Hello everyone, I want to apply Demons Registration to register two medical images, the image information is strong at the center, therefore I want to apply registration method on only the center region of the images. For example, take a center region of moving image, and find the corresponding positions of each pixel of the region in the fixed image. However, I can not find a method that allows processing on a region like that in itkDemonsRegistrationFilter.h. I tried passing the full fixed image as SetFixedImage, and only the center region of moving image as SetMovingImage. However, it crashes because it requires same size of fixed image and moving image. Does anyone have any idea of how to pass a region to demons registration filter? Thank you in advance! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Thu Oct 29 10:00:22 2015 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Thu, 29 Oct 2015 10:00:22 -0400 Subject: [ITK-users] [ITK] Buffered Region out of Range error In-Reply-To: <29375C19-58B7-4A9A-9B6D-EF79D51A7691@bluequartz.net> References: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> <5EA71915-616F-4FFD-91E8-26941201051C@mail.nih.gov> <29375C19-58B7-4A9A-9B6D-EF79D51A7691@bluequartz.net> Message-ID: We also ran an experiment where we moved the ITK Dependency from just the plugin down into one of our lower level libraries. So now we have the plugin dependent on a lower level library which then is dependent on the ITK Libraries. Now the code seems to execute and produce results. This was on OS X 10.9 and 10.10. So it seems that there is some odd issue with loading the ITK libraries through a plugin mechanism? Does ITK need the ?-fPIC? added to the list of compile commands? Qt is actually built WITHOUT C++11 support but still links against libc++. They (the Qt Devs) set the OS X Min Deployment Version to 10.7. I have no idea what that triggers or not. Thoughts? -- Mike Jackson [mike.jackson at bluequartz.net] > On Oct 28, 2015, at 10:40 AM, Michael Jackson wrote: > > So we built on an OS X 10.8.5 machine and now the code works completely and gives the correct output. On the 10.8.5 machine all the libraries are linked against ?libstdc++? EXCEPT Qt. Where-as on OS X 10.9 and 10.10 they are all linked against libc++. So I am thinking, at least for ITK 4.7.2 we have stumbled upon an issue with the C++ library? We are now recompiling ITK using the USE_COMPIILER_HIDDEN_VISIBILITY=OFF as you have suggested and will report back those findings. > -- > Mike Jackson [mike.jackson at bluequartz.net] > > >> On Oct 28, 2015, at 9:21 AM, Bradley Lowekamp wrote: >> >> I believe if Qt used libstdc++ then it would show up on that list. I'd run an otool -L on one of those libraries to double check. >> >> I'd try to build against OSX 10.8 or on a 10.8 system, just to rule out C++ library compatibility issues. I have had very odd things happen when these don't match. >> >> The other issue I have seen some time is run-time information problems when ITK classes are instantiated in different libraries and shared between them. Things like dynamic_cast can fail, along with specific exception types not being caught. We have recently improved the export specification in ITK, and you should upgrade. This may be a larger architectural problem, and techniques like explicit instantiation of object which can be shared can help. >> >> *shameless plug* You could also look into using SimpleITK, which provides a clean interface. It does this by provided a full export specified interface free from templates, and explicitly instantiating many parts of ITK. The SimpleITK object could be the objects that are shared between libraries. >> >> You could try compiling ITK with USE_COMPIILER_HIDDEN_VISIBILITY OFF this will disable the harsh hidden visibility and may help problematic symbols be shared. >> >> HTH, >> Brad >> >> >> >> >> On Oct 28, 2015, at 8:31 AM, Michael Jackson wrote: >> >>> Yes, All dependent libraries are shared. >>> >>> otool -L for one of our plugins: >>> @rpath/libDREAM3DWidgetsLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKReview-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKLabelMap-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKQuadEdgeMesh-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKBiasCorrection-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKPolynomials-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKBioCell-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKFEM-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOSpatialObjects-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOXML-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOBioRad-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGDCM-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmMSFF-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkopenjpeg-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGIPL-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOMeta-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIONIFTI-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKniftiio-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIONRRD-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKNrrdIO-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOSiemens-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOStimulate-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformHDF5-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/hdf5-1.8.15-Debug/lib/libhdf5_debug.10.0.1.dylib (compatibility version 10.0.1, current version 1.8.15) >>> /Users/Shared/DREAM3D_SDK/hdf5-1.8.15-Debug/lib/libhdf5_cpp_debug.10.0.1.dylib (compatibility version 10.0.1, current version 1.8.15) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformInsightLegacy-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformMatlab-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOVTK-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKKLMRegionGrowing-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKVTK-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> @rpath/libQtSupportLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >>> @rpath/libSIMPLib_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/tbb43_20150611oss/lib/libtbb_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/tbb43_20150611oss/lib/libtbbmalloc_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.4.0, current version 5.4.2) >>> /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.2) >>> @rpath/libH5Support_debug.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0) >>> /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.4.0, current version 5.4.2) >>> /Users/Shared/DREAM3D_SDK/Qt5.4.2/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.4.0, current version 5.4.2) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOBMP-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOJPEG-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOPNG-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkpng-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTIFF-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitktiff-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkjpeg-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKWatersheds-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKPath-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKOptimizers-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKSpatialObjects-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKMesh-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmDICT-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmIOD-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKEXPAT-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmDSED-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkgdcmCommon-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKMetaIO-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKznz-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkzlib-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOGE-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOIPL-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOTransformBase-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKStatistics-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkNetlibSlatec-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKIOImageBase-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKCommon-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkdouble-conversion-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitksys-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libITKVNLInstantiation-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvnl_algo-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkv3p_lsqr-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvnl-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkvcl-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /Users/Shared/DREAM3D_SDK/ITK-4.7.2-Debug/lib/libitkv3p_netlib-4.7.1.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0) >>> >>> We are using Qt 5.4.2 for our GUI. Looks like libc++. How do I change this? We use the precompiled Qt 5.4 binaries from qtproject.io and I am not sure if they use libstdC++ or libc++. We compile everything else: HDF5, Boost, Qwt, ITK, Eigen and TBB. >>> >>> The ?.lock()? is for a boost::weak_ptr variable that stores one of our own malloc?ed arrays. No threading (at this level). >>> >>> -- >>> Mike Jackson [mike.jackson at bluequartz.net] >>> >>> >>>> On Oct 28, 2015, at 8:21 AM, Bradley Lowekamp wrote: >>>> >>>> Hello, >>>> >>>> There could also be some symbol resolution issues/ conflicts. Are you using shared libraries? What is the output of otool -L? What GUI library are you using? What C++ library (libc++ vs libstdc++)? Are you consistently using the same c++ library? If you set the CMAKE_OSX_DEPLOYMENT_TARGET to 10.8 you can easily use libstdc++ by default. >>>> >>>> I see a use of a "lock" in your code. What do you have going on with threads? >>>> >>>> HTH, >>>> Brad >>>> >>>> On Oct 28, 2015, at 7:57 AM, Michael Jackson wrote: >>>> >>>>> Nope. It does not help. I?m going to add some more information and see where that takes the discussion. We are trying to integrate ITK into our project DREAM.3D (github.com/dream3d) which uses a plugin system to load user developed data analysis filters. The failure mode we are seeing is when 2 filters, in different plugins, use the same ITK code. The DREAM.3D plugin that contains the DREAM.3D Filter that gets loaded first will run through without issues. The second DREAM.3D Plugin that contains the second DREAM.3D Filter will fail with the exception message. The ITK code is exactly the same except for the name of the c++ class that holds the code. We have replicated this on OS X 10.9 and 10.10. We can NOT replicate the issue on Windows (VS2013) or Linux (Clang 3.6). We have it down to a fairly simple DREAM.3D test case but not an ITK test case. After moving some codes around and moving some of our looping code inside the ?try-catch? block we finally started seeing the exception messages. I am hoping we are just using ITK incorrectly and OS X is just exposing the incorrect use. The weird part is that we get the correct results on the other systems so it is not like the other platforms have a silent failure. >>>>> >>>>> Thanks for any help. >>>>> -- >>>>> Mike Jackson [mike.jackson at bluequartz.net] >>>>> >>>>> >>>>>> On Oct 27, 2015, at 6:22 PM, Matt McCormick wrote: >>>>>> >>>>>> Hi Mike, >>>>>> >>>>>> Does calling >>>>>> >>>>>> UpdateLargestPossibleRegion() >>>>>> >>>>>> instead of >>>>>> >>>>>> Update() >>>>>> >>>>>> help? >>>>>> >>>>>> Matt >>>>>> >>>>>> On Tue, Oct 27, 2015 at 5:59 PM, Michael Jackson >>>>>> wrote: >>>>>>> I have been struggling with this error all afternoon and I just can not ?see? what I am doing wrong. I am getting the following exception message from our program: >>>>>>> >>>>>>> Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature 9. Error Message returned from ITK: >>>>>>> itk::ERROR: MultiThreader(0x7fb53486e200): Exception occurred during SingleMethodExecute >>>>>>> /Users/Shared/DREAM3D_SDK/InsightToolkit-4.7.2/Modules/Core/Common/include/itkImageConstIterator.h:211: >>>>>>> itk::ERROR: Region ImageRegion (0x12e6f6730) >>>>>>> Dimension: 3 >>>>>>> Index: [0, 0, 0] >>>>>>> Size: [64, 64, 4] >>>>>>> is outside of buffered region ImageRegion (0x7fb53c0a8040) >>>>>>> Dimension: 3 >>>>>>> Index: [0, 0, 0] >>>>>>> Size: [0, 0, 0] >>>>>>> >>>>>>> So what are the reasons that this can happen? Basically we creating an unsigned char image where we fill in the pixels, then run the Itk filter on each unsigned char image. Finally we want to copy the final output data into one of our own arrays. I will post the code under here. Any help is greatly appreciated. >>>>>>> >>>>>>> size_t iDims[3] = { 0, 0, 0 }; >>>>>>> float origin[3] = { 0.0f, 0.0f, 0.0f }; >>>>>>> float resolution[3] = { 0.0f, 0.0f, 0.0f }; >>>>>>> >>>>>>> image->getDimensions(iDims); >>>>>>> image->getOrigin(origin); >>>>>>> image->getResolution(resolution); >>>>>>> >>>>>>> int32_t numFeatures = m_SignedDistanceFields.size(); >>>>>>> >>>>>>> typedef itk::Image BoolImageType; >>>>>>> typedef itk::Image FloatImageType; >>>>>>> std::vector booleanFeatureImages(numFeatures); >>>>>>> BoolImageType::IndexType start; >>>>>>> BoolImageType::SizeType size; >>>>>>> BoolImageType::RegionType region; >>>>>>> >>>>>>> start.Fill(0); >>>>>>> >>>>>>> size[0] = iDims[0]; >>>>>>> size[1] = iDims[1]; >>>>>>> size[2] = iDims[2]; >>>>>>> >>>>>>> region.SetIndex(start); >>>>>>> region.SetSize(size); >>>>>>> >>>>>>> for (int32_t i = 0; i < numFeatures; i++) >>>>>>> { >>>>>>> BoolImageType::Pointer tmpBoolImage = BoolImageType::New(); >>>>>>> tmpBoolImage->SetRegions(region); >>>>>>> tmpBoolImage->Allocate(); >>>>>>> tmpBoolImage->SetOrigin(origin); >>>>>>> tmpBoolImage->SetSpacing(resolution); >>>>>>> tmpBoolImage->FillBuffer(0); >>>>>>> booleanFeatureImages[i] = tmpBoolImage; >>>>>>> } >>>>>>> >>>>>>> size_t zStride = 0; >>>>>>> size_t yStride = 0; >>>>>>> size_t index = 0; >>>>>>> >>>>>>> for (size_t z = 0; z < iDims[2]; z++) >>>>>>> { >>>>>>> zStride = z * iDims[1] * iDims[2]; >>>>>>> for (size_t y = 0; y < iDims[1]; y++) >>>>>>> { >>>>>>> yStride = y * iDims[0]; >>>>>>> for (size_t x = 0; x < iDims[0]; x++) >>>>>>> { >>>>>>> index = zStride + yStride + x; >>>>>>> BoolImageType::IndexType pixelIndex; >>>>>>> pixelIndex[0] = x; >>>>>>> pixelIndex[1] = y; >>>>>>> pixelIndex[2] = z; >>>>>>> if (x == y && y == z) { booleanFeatureImages[0]->SetPixel(pixelIndex, 255); } >>>>>>> booleanFeatureImages[m_FeatureIds[index]]->SetPixel(pixelIndex, 255); >>>>>>> } >>>>>>> } >>>>>>> } >>>>>>> // Compute signed distance field for each Feature >>>>>>> typedef itk::SignedMaurerDistanceMapImageFilter SignedMaurerFilter; >>>>>>> >>>>>>> for (int32_t i = 0; i < numFeatures; i++) >>>>>>> { >>>>>>> if (getCancel() == true) { return; } >>>>>>> SignedMaurerFilter::Pointer signedDistMap = SignedMaurerFilter::New(); >>>>>>> float* tmpDistField = m_SignedDistanceFields[i].lock()->getPointer(0); >>>>>>> signedDistMap->SetInsideIsPositive(false); >>>>>>> signedDistMap->SetSquaredDistance(true); >>>>>>> signedDistMap->SetUseImageSpacing(true); >>>>>>> signedDistMap->SetInput(booleanFeatureImages[i]); >>>>>>> try >>>>>>> { >>>>>>> signedDistMap->Update(); >>>>>>> >>>>>>> for (size_t z = 0; z < iDims[2]; z++) >>>>>>> { >>>>>>> zStride = z * iDims[1] * iDims[2]; >>>>>>> for (size_t y = 0; y < iDims[1]; y++) >>>>>>> { >>>>>>> yStride = y * iDims[0]; >>>>>>> for (size_t x = 0; x < iDims[0]; x++) >>>>>>> { >>>>>>> index = zStride + yStride + x; >>>>>>> BoolImageType::IndexType pixelIndex; >>>>>>> pixelIndex[0] = x; >>>>>>> pixelIndex[1] = y; >>>>>>> pixelIndex[2] = z; >>>>>>> FloatImageType::Pointer out = signedDistMap->GetOutput(); >>>>>>> out->SetBufferedRegion(region); >>>>>>> tmpDistField[index] = out->GetPixel(pixelIndex); >>>>>>> } >>>>>>> } >>>>>>> } >>>>>>> } >>>>>>> catch (itk::ExceptionObject& err) >>>>>>> { >>>>>>> setErrorCondition(-5); >>>>>>> QString ss = QObject::tr("Failed to execute itk::SignedMaurerDistanceMapImage filter for Feature %1. Error Message returned from ITK:\n %2").arg(i).arg(err.GetDescription()); >>>>>>> notifyErrorMessage(getHumanLabel(), ss, getErrorCondition()); >>>>>>> } >>>>>>> } >>>>>>> -- >>>>>>> Mike Jackson >>>>>>> BlueQuartz Software, LLC >>>>>>> [e]: mike.jackson at bluequartz.net >>>>>>> >>>>>>> _____________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>>> http://www.kitware.com/products/protraining.php >>>>>>> >>>>>>> Please keep messages on-topic and check the 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 >>>>> _______________________________________________ >>>>> Community mailing list >>>>> Community at itk.org >>>>> http://public.kitware.com/mailman/listinfo/community >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Oct 29 11:40:55 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 29 Oct 2015 11:40:55 -0400 Subject: [ITK-users] [ITK] Buffered Region out of Range error In-Reply-To: References: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> <5EA71915-616F-4FFD-91E8-26941201051C@mail.nih.gov> <29375C19-58B7-4A9A-9B6D-EF79D51A7691@bluequartz.net> Message-ID: On Thu, Oct 29, 2015 at 10:00 AM, Michael Jackson wrote: > We also ran an experiment where we moved the ITK Dependency from just the > plugin down into one of our lower level libraries. So now we have the plugin > dependent on a lower level library which then is dependent on the ITK > Libraries. Now the code seems to execute and produce results. This was on OS > X 10.9 and 10.10. So it seems that there is some odd issue with loading the > ITK libraries through a plugin mechanism? Does ITK need the ?-fPIC? added to > the list of compile commands? If ITK is built in a plugin as shared libraries, then it will already be built with -fPIC. > Qt is actually built WITHOUT C++11 support but still links against libc++. > They (the Qt Devs) set the OS X Min Deployment Version to 10.7. I have no > idea what that triggers or not. All code should be built with the same C++ standard and OSX deployment target. When building ITK and related code, set CMAKE_OSX_DEPLOYMENT_TARGET [1] to 10.7 to ensure all binaries are using consistent libraries. HTH, Matt [1] https://cmake.org/cmake/help/v3.3/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html From mike.jackson at bluequartz.net Thu Oct 29 18:09:08 2015 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Thu, 29 Oct 2015 18:09:08 -0400 Subject: [ITK-users] ITK 4.8.1, OS X 10.10 and C++11 Support Message-ID: <5A5035F7-A86D-4733-8FF6-5CAAAF115217@bluequartz.net> I am getting the following compile error when I compile my codes against ITK 4.8.1 /Users/Shared/DREAM3D_SDK/InsightToolkit-4.8.1/Modules/Core/Common/include/itkImageAlgorithm.h:26:12: fatal error: 'tr1/type_traits' file not found # include I compiled ITK with C++ 11 support by initializing ITK?s CMake cache with the following values: echo "CMAKE_CXX_STANDARD=11" >> $cacheFile echo "CMAKE_CXX_STANDARD_REQUIRED:BOOL=ON" >> $cacheFile echo ?CMAKE_OSX_DEPLOYMENT_TARGET=10.7" >> $cacheFile echo "CMAKE_OSX_SYSROOT:Path=$OSX_SDK" >> $cacheFile echo "CMAKE_CXX_FLAGS:STRING=-stdlib=libc++ -std=c++11 " >> cacheFile ITK seemed to compile and install but I only compiled the libraries and none of the tests. Has anyone ever had this issue? And what do I need to do to solve it. Thanks -- Michael A. Jackson BlueQuartz Software, LLC [e]: mike.jackson at bluequartz.net From rfrank at dominionsw.com Thu Oct 29 18:22:16 2015 From: rfrank at dominionsw.com (Richard Frank) Date: Thu, 29 Oct 2015 22:22:16 +0000 Subject: [ITK-users] ItkVtkglue and VTK OpenGL2? Message-ID: <4B5097CB-C04B-4C43-8392-448BA939A949@dominionsw.com> It seems that in itkVtkGlue.cmake CMake is looking for vtkRenderingOpenGL which isn't available with OpenGL2 flags turned on for CMake. Is this a problem with the Cmake file or did I forget to check or uncheck something? Rick Frank From bill.lorensen at gmail.com Thu Oct 29 18:32:49 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 29 Oct 2015 18:32:49 -0400 Subject: [ITK-users] ItkVtkglue and VTK OpenGL2? In-Reply-To: <4B5097CB-C04B-4C43-8392-448BA939A949@dominionsw.com> References: <4B5097CB-C04B-4C43-8392-448BA939A949@dominionsw.com> Message-ID: I'll check into this. On Oct 29, 2015 6:31 PM, "Richard Frank" wrote: > > It seems that in itkVtkGlue.cmake CMake is looking for vtkRenderingOpenGL > which isn't available with OpenGL2 flags turned on for CMake. > > Is this a problem with the Cmake file or did I forget to check or uncheck > something? > Rick Frank > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 sean at rogue-research.com Thu Oct 29 19:47:09 2015 From: sean at rogue-research.com (Sean McBride) Date: Thu, 29 Oct 2015 19:47:09 -0400 Subject: [ITK-users] ITK 4.8.1, OS X 10.10 and C++11 Support In-Reply-To: <5A5035F7-A86D-4733-8FF6-5CAAAF115217@bluequartz.net> References: <5A5035F7-A86D-4733-8FF6-5CAAAF115217@bluequartz.net> Message-ID: <20151029234709.459963915@mail.rogue-research.com> On Thu, 29 Oct 2015 18:09:08 -0400, Michael Jackson said: >I am getting the following compile error when I compile my codes against >ITK 4.8.1 > >/Users/Shared/DREAM3D_SDK/InsightToolkit-4.8.1/Modules/Core/Common/ >include/itkImageAlgorithm.h:26:12: fatal error: 'tr1/type_traits' file >not found ># include > >I compiled ITK with C++ 11 support by initializing ITK?s CMake cache >with the following values: > > > echo "CMAKE_CXX_STANDARD=11" >> $cacheFile > echo "CMAKE_CXX_STANDARD_REQUIRED:BOOL=ON" >> $cacheFile > echo ?CMAKE_OSX_DEPLOYMENT_TARGET=10.7" >> $cacheFile > echo "CMAKE_OSX_SYSROOT:Path=$OSX_SDK" >> $cacheFile > echo "CMAKE_CXX_FLAGS:STRING=-stdlib=libc++ -std=c++11 " >> cacheFile > >ITK seemed to compile and install but I only compiled the libraries and >none of the tests. > >Has anyone ever had this issue? And what do I need to do to solve it. IIRC libc++ on 10.7 is pretty limited in its c++11 support. If you really want to use c++11 you'll probably have to increase your deployment target. These days, I can't build several c++11 projects like clang itself and cppcheck on my 10.8 buildbot because it's c++11 support is too limited. 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 Oct 29 23:37:37 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 29 Oct 2015 23:37:37 -0400 Subject: [ITK-users] ITK 4.8.1, OS X 10.10 and C++11 Support In-Reply-To: <20151029234709.459963915@mail.rogue-research.com> References: <5A5035F7-A86D-4733-8FF6-5CAAAF115217@bluequartz.net> <20151029234709.459963915@mail.rogue-research.com> Message-ID: Hi Michael, >>I am getting the following compile error when I compile my codes against >>ITK 4.8.1 >> >>/Users/Shared/DREAM3D_SDK/InsightToolkit-4.8.1/Modules/Core/Common/ >>include/itkImageAlgorithm.h:26:12: fatal error: 'tr1/type_traits' file >>not found >># include >> >>I compiled ITK with C++ 11 support by initializing ITK?s CMake cache >>with the following values: >> >> >> echo "CMAKE_CXX_STANDARD=11" >> $cacheFile >> echo "CMAKE_CXX_STANDARD_REQUIRED:BOOL=ON" >> $cacheFile >> echo ?CMAKE_OSX_DEPLOYMENT_TARGET=10.7" >> $cacheFile >> echo "CMAKE_OSX_SYSROOT:Path=$OSX_SDK" >> $cacheFile >> echo "CMAKE_CXX_FLAGS:STRING=-stdlib=libc++ -std=c++11 " >> cacheFile >> >>ITK seemed to compile and install but I only compiled the libraries and >>none of the tests. >> >>Has anyone ever had this issue? And what do I need to do to solve it. Where the same CMake variables used when building your codes? All these should be consistent throughout all compiled and linked code. Hope this helps, Matt From matt.mccormick at kitware.com Fri Oct 30 00:17:10 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 30 Oct 2015 00:17:10 -0400 Subject: [ITK-users] ITK emscripten compilation In-Reply-To: References: Message-ID: Dear Juan, A few follow-ups: If you have seen this demonstration: http://insightsoftwareconsortium.github.io/ITKAnisotropicDiffusionLBR/ the code for fetching an input image and writing it to the virtual filesystem is here: https://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR/blob/0d186b9bf29c96fc31029e52af12d39c5e1700e9/js/Runner.js#L138-L162 https://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR/blob/0d186b9bf29c96fc31029e52af12d39c5e1700e9/js/FilterWorker.js#L11 I think it would be very excellent to add interactivity to some of our Sphinx Examples: http://itk.org/ITKExamples/ I have started to add the Sphinx bootstrap extension: http://review.source.kitware.com/#/c/20119/ with the goal of facilitating interactive versions of the examples. I will build of the Docker image with Emscripten 1.35.4, and I will see if I can reproduce your build errors. Thanks, Matt On Wed, Oct 28, 2015 at 3:26 PM, Juan Carlos Prieto wrote: > Hi Matt, > >> Are you using the Docker image? > > Yes, I tried with the Docker image and also I tried building it in my system > with the same results. > >> What version of Emscripten are you using? > > In my system I'm using emscripten tag-1.35.4 > >> What is CMAKE_SYSTEM? > > In the docker image CMAKE_SYSTEM = Emscripten-1 > In my system CMAKE_SYSTEM = Darwin-14.5.0 > > > I also noticed the code block in the file > https://github.com/InsightSoftwareConsortium/ITK/blob/2f2ae65eec72701b0fc69c07b59453cc6ac2e575/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDstdio.c#L136-L148 > > If H5_HAVE_FSEEKO64 is undefined, the compilation is successful. > > > I'll try with the example and see if I am able to read the images. > > Best, > > Juan > > > > On Wed, Oct 28, 2015 at 2:53 PM, Matt McCormick > wrote: >> >> Hi Juan, >> >> > I have build ITK as described in post 912 >> > http://www.kitware.com/blog/home/post/912 >> > >> > However, I did not use ninja and I added the flag >> > -D_LARGEFILE64_SOURCE=1, >> > i.e., >> > >> > flags=' -Wno-warn-absolute-paths --memory-init-file 0 -s >> > DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1 >> > -D_LARGEFILE64_SOURCE=1' >> > >> > cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \ >> > "-DCMAKE_CXX_FLAGS=$flags" "-DCMAKE_C_FLAGS=$flags" \ >> > -DBUILD_EXAMPLES=OFF \ >> > >> > ../ITK >> > >> > >> > make >> > >> > >> > This flag is needed to avoid the error while compiling itkhdf5: >> > >> > >> > /usr/src/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDstdio.c:192:5: >> > error: use of undeclared identifier 'off64_t' >> > >> > >> > After I added the flag, the compilation is successful. >> >> This is interesting. Are you using the Docker image? What version of >> Emscripten are you using? This is supposed to avoided with this code >> block: >> >> >> https://github.com/InsightSoftwareConsortium/ITK/blob/2f2ae65eec72701b0fc69c07b59453cc6ac2e575/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake#L294-L304 >> >> What is CMAKE_SYSTEM? >> >> >> >> > Now, I'm trying to build a project using ITK. >> > >> > >> > The cmake configuration process is similar to ITK, and the compilation >> > is >> > also successful. The javascript file is generated as expected. >> >> Cool. >> >> >> > However, the execution produces the following error while on the docker >> > machine: >> > >> > >> > Could not create IO object for reading file someImage.nrrd >> > The file doesn't exist. >> > Filename = someImage.nrrd >> > >> > >> > The image file is in the same built directory (not a problem of >> > read-write >> > permissions). >> >> You'll need to mount directories from the local filesystem that you >> want the Javascript code to see with NODEFS [1]. See how we do it for >> the ITK test driver [2]. >> >> HTH, >> Matt >> >> >> [1] >> https://kripken.github.io/emscripten-site/docs/api_reference/Filesystem-API.html#file-systems >> >> [2] >> http://itk.org/gitweb?p=ITK.git;a=commit;h=0c82b97b749cea9f409aba99c918b94295ed24c7 > > From mike.jackson at bluequartz.net Fri Oct 30 08:54:22 2015 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Fri, 30 Oct 2015 08:54:22 -0400 Subject: [ITK-users] ITK 4.8.1, OS X 10.10 and C++11 Support In-Reply-To: References: <5A5035F7-A86D-4733-8FF6-5CAAAF115217@bluequartz.net> <20151029234709.459963915@mail.rogue-research.com> Message-ID: The issue is that I am probably missing something when configuring ITK. Looking in my CMake configure logs I have this message: Run Build Command:"/usr/local/bin/ninja" "cmTC_2927f" [1/2] Building CXX object CMakeFiles/cmTC_2927f.dir/CheckIncludeFile.cxx.o FAILED: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit-at-a-time -Wno-strict-overflow -Wno-deprecated -Wno-invalid-offsetof -Woverloaded-virtual -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7 -o CMakeFiles/cmTC_2927f.dir/CheckIncludeFile.cxx.o -c CheckIncludeFile.cxx CheckIncludeFile.cxx:1:10: fatal error: 'type_traits' file not found #include ^ 1 error generated. ninja: build stopped: subcommand failed. If you take that same command line and file to compile but simply add "-std=c++11 -stdlib=libc++? to the command line then the compile succeeds. So this is clearly a ?user error?. How do I ensure that when CMake is running all of its detection tests that those flags get added? Otherwise the tests are not really valid for the way I am going to compile the codes. I figured by creating an initial CMakeCache.txt file that those flags would get added to every ?test? but I guess that is not the way to accomplish that task. -- Michael A. Jackson BlueQuartz Software, LLC [e]: mike.jackson at bluequartz.net > On Oct 29, 2015, at 11:37 PM, Matt McCormick wrote: > > Hi Michael, > >>> I am getting the following compile error when I compile my codes against >>> ITK 4.8.1 >>> >>> /Users/Shared/DREAM3D_SDK/InsightToolkit-4.8.1/Modules/Core/Common/ >>> include/itkImageAlgorithm.h:26:12: fatal error: 'tr1/type_traits' file >>> not found >>> # include >>> >>> I compiled ITK with C++ 11 support by initializing ITK?s CMake cache >>> with the following values: >>> >>> >>> echo "CMAKE_CXX_STANDARD=11" >> $cacheFile >>> echo "CMAKE_CXX_STANDARD_REQUIRED:BOOL=ON" >> $cacheFile >>> echo ?CMAKE_OSX_DEPLOYMENT_TARGET=10.7" >> $cacheFile >>> echo "CMAKE_OSX_SYSROOT:Path=$OSX_SDK" >> $cacheFile >>> echo "CMAKE_CXX_FLAGS:STRING=-stdlib=libc++ -std=c++11 " >> cacheFile >>> >>> ITK seemed to compile and install but I only compiled the libraries and >>> none of the tests. >>> >>> Has anyone ever had this issue? And what do I need to do to solve it. > > Where the same CMake variables used when building your codes? All > these should be consistent throughout all compiled and linked code. > > Hope this helps, > Matt From davis.vigneault at gmail.com Fri Oct 30 09:50:26 2015 From: davis.vigneault at gmail.com (Davis Vigneault) Date: Fri, 30 Oct 2015 13:50:26 +0000 Subject: [ITK-users] ITK 4.8.1, OS X 10.10 and C++11 Support In-Reply-To: References: <5A5035F7-A86D-4733-8FF6-5CAAAF115217@bluequartz.net> <20151029234709.459963915@mail.rogue-research.com> Message-ID: Michael-- I'm not sure if this is the same problem, but I once ran into trouble compiling ITK with c++11 and found that I needed to add the flag during the *initial* configuration at commandline. If I added it in the ccmake gui, I got type traits errors. Something like this: $ ccmake ../src -DCMAKE_CXX_FLAGS=-std=c++11 Hope that helps, and best of luck if not. --Davis On Fri, Oct 30, 2015 at 12:54 PM, Michael Jackson < mike.jackson at bluequartz.net> wrote: > The issue is that I am probably missing something when configuring ITK. > Looking in my CMake configure logs I have this message: > > Run Build Command:"/usr/local/bin/ninja" "cmTC_2927f" > [1/2] Building CXX object CMakeFiles/cmTC_2927f.dir/CheckIncludeFile.cxx.o > FAILED: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ > -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 > -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused > -Wwrite-strings -funit-at-a-time -Wno-strict-overflow -Wno-deprecated > -Wno-invalid-offsetof -Woverloaded-virtual -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk > -mmacosx-version-min=10.7 -o > CMakeFiles/cmTC_2927f.dir/CheckIncludeFile.cxx.o -c CheckIncludeFile.cxx > CheckIncludeFile.cxx:1:10: fatal error: 'type_traits' file not found > #include > ^ > 1 error generated. > ninja: build stopped: subcommand failed. > > If you take that same command line and file to compile but simply add > "-std=c++11 -stdlib=libc++? to the command line then the compile succeeds. > So this is clearly a ?user error?. How do I ensure that when CMake is > running all of its detection tests that those flags get added? Otherwise > the tests are not really valid for the way I am going to compile the codes. > I figured by creating an initial CMakeCache.txt file that those flags would > get added to every ?test? but I guess that is not the way to accomplish > that task. > -- > Michael A. Jackson > BlueQuartz Software, LLC > [e]: mike.jackson at bluequartz.net > > > On Oct 29, 2015, at 11:37 PM, Matt McCormick > wrote: > > > > Hi Michael, > > > >>> I am getting the following compile error when I compile my codes > against > >>> ITK 4.8.1 > >>> > >>> /Users/Shared/DREAM3D_SDK/InsightToolkit-4.8.1/Modules/Core/Common/ > >>> include/itkImageAlgorithm.h:26:12: fatal error: 'tr1/type_traits' file > >>> not found > >>> # include > >>> > >>> I compiled ITK with C++ 11 support by initializing ITK?s CMake cache > >>> with the following values: > >>> > >>> > >>> echo "CMAKE_CXX_STANDARD=11" >> $cacheFile > >>> echo "CMAKE_CXX_STANDARD_REQUIRED:BOOL=ON" >> $cacheFile > >>> echo ?CMAKE_OSX_DEPLOYMENT_TARGET=10.7" >> $cacheFile > >>> echo "CMAKE_OSX_SYSROOT:Path=$OSX_SDK" >> $cacheFile > >>> echo "CMAKE_CXX_FLAGS:STRING=-stdlib=libc++ -std=c++11 " >> cacheFile > >>> > >>> ITK seemed to compile and install but I only compiled the libraries and > >>> none of the tests. > >>> > >>> Has anyone ever had this issue? And what do I need to do to solve it. > > > > Where the same CMake variables used when building your codes? All > > these should be consistent throughout all compiled and linked code. > > > > Hope this helps, > > Matt > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carminepagliaro at gmail.com Fri Oct 30 10:59:39 2015 From: carminepagliaro at gmail.com (Carmine Pagliaro) Date: Fri, 30 Oct 2015 15:59:39 +0100 Subject: [ITK-users] (no subject) Message-ID: Dear ITK team, in the file attacched I register 2 mri image in nifti format. the optimization algorithm is gradientdescent typedef itk::RegularStepGradientDescentOptimizer OptimizerType; I would make one myself using annealing. so how can I do this? how could I must modified the follow code ? what is optimizer? OptimizerType::Pointer optimizer = OptimizerType::New(); registration->SetOptimizer( optimizer ); thank you very much -- Carmine Pagliaro *Life is for sharing.* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ImageRegistrationMethod.cxx Type: text/x-c++src Size: 9953 bytes Desc: not available URL: From mike.jackson at bluequartz.net Fri Oct 30 11:35:13 2015 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Fri, 30 Oct 2015 11:35:13 -0400 Subject: [ITK-users] [ITK] Buffered Region out of Range error In-Reply-To: References: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> <5EA71915-616F-4FFD-91E8-26941201051C@mail.nih.gov> <29375C19-58B7-4A9A-9B6D-EF79D51A7691@bluequartz.net> Message-ID: > On Oct 29, 2015, at 11:40 AM, Matt McCormick wrote: > > On Thu, Oct 29, 2015 at 10:00 AM, Michael Jackson > wrote: >> We also ran an experiment where we moved the ITK Dependency from just the >> plugin down into one of our lower level libraries. So now we have the plugin >> dependent on a lower level library which then is dependent on the ITK >> Libraries. Now the code seems to execute and produce results. This was on OS >> X 10.9 and 10.10. So it seems that there is some odd issue with loading the >> ITK libraries through a plugin mechanism? Does ITK need the ?-fPIC? added to >> the list of compile commands? > > If ITK is built in a plugin as shared libraries, then it will already > be built with -fPIC. > > >> Qt is actually built WITHOUT C++11 support but still links against libc++. >> They (the Qt Devs) set the OS X Min Deployment Version to 10.7. I have no >> idea what that triggers or not. > > All code should be built with the same C++ standard and OSX deployment > target. When building ITK and related code, set > CMAKE_OSX_DEPLOYMENT_TARGET [1] to 10.7 to ensure all binaries are > using consistent libraries. > > HTH, > Matt > > [1] https://cmake.org/cmake/help/v3.3/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html Matt, We have verified that ALL dependent libraries are built with libC++, 10.7 as the min deployment, C++11 enabled. This goes for Boost, HDF5, Eigen, ITK, and Qt 5.5.1. We still have the issue. We can also reproduce that if we move the dependency to a lower level then the issue goes away. So it would seem that there is a problem with multiple plugins being dependent on the same External library. in this case it is ITK. I?ll try to diagram below. ## Failure Mode ## A.plugin depends on ITK A.plugin depends on SIMPlib. B.plugin depends on ITK B.plugin depends on SIMPlib. B.plugin will fail to execute properly. ## Success Mode ## A.plugin depends on SIMPlib. SIMPlib depends on ITK B.plugin depends on SIMPlib. SIMPlib depends on ITK The DREAM.3D filters both execute properly and give the proper output. -- Michael A. Jackson BlueQuartz Software, LLC [e]: mike.jackson at bluequartz.net From matt.mccormick at kitware.com Fri Oct 30 12:02:10 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 30 Oct 2015 12:02:10 -0400 Subject: [ITK-users] (no subject) In-Reply-To: References: Message-ID: Hi Carmine, To see all the optimizer options, go to the base class in Doxygen: http://www.itk.org/Doxygen/html/classitk_1_1SingleValuedNonLinearOptimizer.html Then, look at the inheritance diagram. There are options like the OnePlusOneEvolutionaryOptimizer and ParticleSwarmOptimizer. Hope this helps, Matt On Fri, Oct 30, 2015 at 10:59 AM, Carmine Pagliaro wrote: > Dear ITK team, > > in the file attacched I register 2 mri image in nifti format. > > the optimization algorithm is gradientdescent > > typedef itk::RegularStepGradientDescentOptimizer OptimizerType; > > I would make one myself using annealing. so how can I do this? > > how could I must modified the follow code ? what is optimizer? > > OptimizerType::Pointer optimizer = OptimizerType::New(); > registration->SetOptimizer( optimizer ); > > thank you very much > -- > Carmine Pagliaro > Life is for sharing. > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Fri Oct 30 12:05:10 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 30 Oct 2015 12:05:10 -0400 Subject: [ITK-users] [ITK] Buffered Region out of Range error In-Reply-To: References: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> <5EA71915-616F-4FFD-91E8-26941201051C@mail.nih.gov> <29375C19-58B7-4A9A-9B6D-EF79D51A7691@bluequartz.net> Message-ID: Hi Michael, Sorry to be redundant, and just to be sure: are both A.plugin and B.plugin built with the same C++ standard library, OSX deployment target, and C++ standard? Thanks, Matt On Fri, Oct 30, 2015 at 11:35 AM, Michael Jackson wrote: > > >> On Oct 29, 2015, at 11:40 AM, Matt McCormick wrote: >> >> On Thu, Oct 29, 2015 at 10:00 AM, Michael Jackson >> wrote: >>> We also ran an experiment where we moved the ITK Dependency from just the >>> plugin down into one of our lower level libraries. So now we have the plugin >>> dependent on a lower level library which then is dependent on the ITK >>> Libraries. Now the code seems to execute and produce results. This was on OS >>> X 10.9 and 10.10. So it seems that there is some odd issue with loading the >>> ITK libraries through a plugin mechanism? Does ITK need the ?-fPIC? added to >>> the list of compile commands? >> >> If ITK is built in a plugin as shared libraries, then it will already >> be built with -fPIC. >> >> >>> Qt is actually built WITHOUT C++11 support but still links against libc++. >>> They (the Qt Devs) set the OS X Min Deployment Version to 10.7. I have no >>> idea what that triggers or not. >> >> All code should be built with the same C++ standard and OSX deployment >> target. When building ITK and related code, set >> CMAKE_OSX_DEPLOYMENT_TARGET [1] to 10.7 to ensure all binaries are >> using consistent libraries. >> >> HTH, >> Matt >> >> [1] https://cmake.org/cmake/help/v3.3/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html > > Matt, > We have verified that ALL dependent libraries are built with libC++, 10.7 as the min deployment, C++11 enabled. This goes for Boost, HDF5, Eigen, ITK, and Qt 5.5.1. We still have the issue. We can also reproduce that if we move the dependency to a lower level then the issue goes away. So it would seem that there is a problem with multiple plugins being dependent on the same External library. in this case it is ITK. I?ll try to diagram below. > ## Failure Mode ## > A.plugin depends on ITK > A.plugin depends on SIMPlib. > > B.plugin depends on ITK > B.plugin depends on SIMPlib. > > B.plugin will fail to execute properly. > > ## Success Mode ## > A.plugin depends on SIMPlib. > SIMPlib depends on ITK > > B.plugin depends on SIMPlib. > SIMPlib depends on ITK > > The DREAM.3D filters both execute properly and give the proper output. > > -- > Michael A. Jackson > BlueQuartz Software, LLC > [e]: mike.jackson at bluequartz.net > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From mike.jackson at bluequartz.net Fri Oct 30 12:57:15 2015 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Fri, 30 Oct 2015 12:57:15 -0400 Subject: [ITK-users] [ITK] Buffered Region out of Range error In-Reply-To: References: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> <5EA71915-616F-4FFD-91E8-26941201051C@mail.nih.gov> <29375C19-58B7-4A9A-9B6D-EF79D51A7691@bluequartz.net> Message-ID: <454718DB-56FA-4AC3-B1CF-59964ED9523B@bluequartz.net> Yes. Verified. Both plugins are built as part of DREAM.3D and we don?t put any extra CXX_FLAGS in any of the CMake files. We also built with VERBOSE=1 and looked at the compile commands to ensure that what we wanted was actually being used. Then we looked at the libraries themselves with otool -L to ensure they all link against libC++. Which they do. -- Michael A. Jackson BlueQuartz Software, LLC [e]: mike.jackson at bluequartz.net > On Oct 30, 2015, at 12:05 PM, Matt McCormick wrote: > > Hi Michael, > > Sorry to be redundant, and just to be sure: are both A.plugin and > B.plugin built with the same C++ standard library, OSX deployment > target, and C++ standard? > > Thanks, > Matt > > On Fri, Oct 30, 2015 at 11:35 AM, Michael Jackson > wrote: >> >> >>> On Oct 29, 2015, at 11:40 AM, Matt McCormick wrote: >>> >>> On Thu, Oct 29, 2015 at 10:00 AM, Michael Jackson >>> wrote: >>>> We also ran an experiment where we moved the ITK Dependency from just the >>>> plugin down into one of our lower level libraries. So now we have the plugin >>>> dependent on a lower level library which then is dependent on the ITK >>>> Libraries. Now the code seems to execute and produce results. This was on OS >>>> X 10.9 and 10.10. So it seems that there is some odd issue with loading the >>>> ITK libraries through a plugin mechanism? Does ITK need the ?-fPIC? added to >>>> the list of compile commands? >>> >>> If ITK is built in a plugin as shared libraries, then it will already >>> be built with -fPIC. >>> >>> >>>> Qt is actually built WITHOUT C++11 support but still links against libc++. >>>> They (the Qt Devs) set the OS X Min Deployment Version to 10.7. I have no >>>> idea what that triggers or not. >>> >>> All code should be built with the same C++ standard and OSX deployment >>> target. When building ITK and related code, set >>> CMAKE_OSX_DEPLOYMENT_TARGET [1] to 10.7 to ensure all binaries are >>> using consistent libraries. >>> >>> HTH, >>> Matt >>> >>> [1] https://cmake.org/cmake/help/v3.3/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html >> >> Matt, >> We have verified that ALL dependent libraries are built with libC++, 10.7 as the min deployment, C++11 enabled. This goes for Boost, HDF5, Eigen, ITK, and Qt 5.5.1. We still have the issue. We can also reproduce that if we move the dependency to a lower level then the issue goes away. So it would seem that there is a problem with multiple plugins being dependent on the same External library. in this case it is ITK. I?ll try to diagram below. >> ## Failure Mode ## >> A.plugin depends on ITK >> A.plugin depends on SIMPlib. >> >> B.plugin depends on ITK >> B.plugin depends on SIMPlib. >> >> B.plugin will fail to execute properly. >> >> ## Success Mode ## >> A.plugin depends on SIMPlib. >> SIMPlib depends on ITK >> >> B.plugin depends on SIMPlib. >> SIMPlib depends on ITK >> >> The DREAM.3D filters both execute properly and give the proper output. >> >> -- >> Michael A. Jackson >> BlueQuartz Software, LLC >> [e]: mike.jackson at bluequartz.net >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users From mike.jackson at bluequartz.net Fri Oct 30 13:36:10 2015 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Fri, 30 Oct 2015 13:36:10 -0400 Subject: [ITK-users] [ITK] Buffered Region out of Range error In-Reply-To: <454718DB-56FA-4AC3-B1CF-59964ED9523B@bluequartz.net> References: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> <5EA71915-616F-4FFD-91E8-26941201051C@mail.nih.gov> <29375C19-58B7-4A9A-9B6D-EF79D51A7691@bluequartz.net> <454718DB-56FA-4AC3-B1CF-59964ED9523B@bluequartz.net> Message-ID: <7EFC0503-D75F-4E0D-94F9-42679FBFF090@bluequartz.net> Some more data. If we create an intermediate library that links to ITK, called ITKSupport, and then have our plugins link against ITKSupport then the code executes correctly. Just another data point. -- Michael A. Jackson BlueQuartz Software, LLC [e]: mike.jackson at bluequartz.net > On Oct 30, 2015, at 12:57 PM, Michael Jackson wrote: > > Yes. Verified. Both plugins are built as part of DREAM.3D and we don?t put any extra CXX_FLAGS in any of the CMake files. We also built with VERBOSE=1 and looked at the compile commands to ensure that what we wanted was actually being used. Then we looked at the libraries themselves with otool -L to ensure they all link against libC++. Which they do. > > > -- > Michael A. Jackson > BlueQuartz Software, LLC > [e]: mike.jackson at bluequartz.net > >> On Oct 30, 2015, at 12:05 PM, Matt McCormick wrote: >> >> Hi Michael, >> >> Sorry to be redundant, and just to be sure: are both A.plugin and >> B.plugin built with the same C++ standard library, OSX deployment >> target, and C++ standard? >> >> Thanks, >> Matt >> >> On Fri, Oct 30, 2015 at 11:35 AM, Michael Jackson >> wrote: >>> >>> >>>> On Oct 29, 2015, at 11:40 AM, Matt McCormick wrote: >>>> >>>> On Thu, Oct 29, 2015 at 10:00 AM, Michael Jackson >>>> wrote: >>>>> We also ran an experiment where we moved the ITK Dependency from just the >>>>> plugin down into one of our lower level libraries. So now we have the plugin >>>>> dependent on a lower level library which then is dependent on the ITK >>>>> Libraries. Now the code seems to execute and produce results. This was on OS >>>>> X 10.9 and 10.10. So it seems that there is some odd issue with loading the >>>>> ITK libraries through a plugin mechanism? Does ITK need the ?-fPIC? added to >>>>> the list of compile commands? >>>> >>>> If ITK is built in a plugin as shared libraries, then it will already >>>> be built with -fPIC. >>>> >>>> >>>>> Qt is actually built WITHOUT C++11 support but still links against libc++. >>>>> They (the Qt Devs) set the OS X Min Deployment Version to 10.7. I have no >>>>> idea what that triggers or not. >>>> >>>> All code should be built with the same C++ standard and OSX deployment >>>> target. When building ITK and related code, set >>>> CMAKE_OSX_DEPLOYMENT_TARGET [1] to 10.7 to ensure all binaries are >>>> using consistent libraries. >>>> >>>> HTH, >>>> Matt >>>> >>>> [1] https://cmake.org/cmake/help/v3.3/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html >>> >>> Matt, >>> We have verified that ALL dependent libraries are built with libC++, 10.7 as the min deployment, C++11 enabled. This goes for Boost, HDF5, Eigen, ITK, and Qt 5.5.1. We still have the issue. We can also reproduce that if we move the dependency to a lower level then the issue goes away. So it would seem that there is a problem with multiple plugins being dependent on the same External library. in this case it is ITK. I?ll try to diagram below. >>> ## Failure Mode ## >>> A.plugin depends on ITK >>> A.plugin depends on SIMPlib. >>> >>> B.plugin depends on ITK >>> B.plugin depends on SIMPlib. >>> >>> B.plugin will fail to execute properly. >>> >>> ## Success Mode ## >>> A.plugin depends on SIMPlib. >>> SIMPlib depends on ITK >>> >>> B.plugin depends on SIMPlib. >>> SIMPlib depends on ITK >>> >>> The DREAM.3D filters both execute properly and give the proper output. >>> >>> -- >>> Michael A. Jackson >>> BlueQuartz Software, LLC >>> [e]: mike.jackson at bluequartz.net >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Fri Oct 30 16:07:15 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 30 Oct 2015 16:07:15 -0400 Subject: [ITK-users] [ITK] Buffered Region out of Range error In-Reply-To: <7EFC0503-D75F-4E0D-94F9-42679FBFF090@bluequartz.net> References: <9D1176BA-4865-45C9-B499-234F66922463@bluequartz.net> <17C498DE-21D8-4EE5-BCD9-85286B8B9E50@mail.nih.gov> <5EA71915-616F-4FFD-91E8-26941201051C@mail.nih.gov> <29375C19-58B7-4A9A-9B6D-EF79D51A7691@bluequartz.net> <454718DB-56FA-4AC3-B1CF-59964ED9523B@bluequartz.net> <7EFC0503-D75F-4E0D-94F9-42679FBFF090@bluequartz.net> Message-ID: Thanks for the information. It is hard to tell, but maybe it is related to factory registration. To test, try this: In the plugin CMake code, add set(ITK_NO_IO_FACTORY_REGISTER_MANAGER 1) before include(${ITK_USE_FILE}) Then see if neither plugins work, both plugins work, and one of the plugins works. HTH, Matt On Fri, Oct 30, 2015 at 1:36 PM, Michael Jackson wrote: > Some more data. If we create an intermediate library that links to ITK, called ITKSupport, and then have our plugins link against ITKSupport then the code executes correctly. Just another data point. > -- > Michael A. Jackson > BlueQuartz Software, LLC > [e]: mike.jackson at bluequartz.net > >> On Oct 30, 2015, at 12:57 PM, Michael Jackson wrote: >> >> Yes. Verified. Both plugins are built as part of DREAM.3D and we don?t put any extra CXX_FLAGS in any of the CMake files. We also built with VERBOSE=1 and looked at the compile commands to ensure that what we wanted was actually being used. Then we looked at the libraries themselves with otool -L to ensure they all link against libC++. Which they do. >> >> >> -- >> Michael A. Jackson >> BlueQuartz Software, LLC >> [e]: mike.jackson at bluequartz.net >> >>> On Oct 30, 2015, at 12:05 PM, Matt McCormick wrote: >>> >>> Hi Michael, >>> >>> Sorry to be redundant, and just to be sure: are both A.plugin and >>> B.plugin built with the same C++ standard library, OSX deployment >>> target, and C++ standard? >>> >>> Thanks, >>> Matt >>> >>> On Fri, Oct 30, 2015 at 11:35 AM, Michael Jackson >>> wrote: >>>> >>>> >>>>> On Oct 29, 2015, at 11:40 AM, Matt McCormick wrote: >>>>> >>>>> On Thu, Oct 29, 2015 at 10:00 AM, Michael Jackson >>>>> wrote: >>>>>> We also ran an experiment where we moved the ITK Dependency from just the >>>>>> plugin down into one of our lower level libraries. So now we have the plugin >>>>>> dependent on a lower level library which then is dependent on the ITK >>>>>> Libraries. Now the code seems to execute and produce results. This was on OS >>>>>> X 10.9 and 10.10. So it seems that there is some odd issue with loading the >>>>>> ITK libraries through a plugin mechanism? Does ITK need the ?-fPIC? added to >>>>>> the list of compile commands? >>>>> >>>>> If ITK is built in a plugin as shared libraries, then it will already >>>>> be built with -fPIC. >>>>> >>>>> >>>>>> Qt is actually built WITHOUT C++11 support but still links against libc++. >>>>>> They (the Qt Devs) set the OS X Min Deployment Version to 10.7. I have no >>>>>> idea what that triggers or not. >>>>> >>>>> All code should be built with the same C++ standard and OSX deployment >>>>> target. When building ITK and related code, set >>>>> CMAKE_OSX_DEPLOYMENT_TARGET [1] to 10.7 to ensure all binaries are >>>>> using consistent libraries. >>>>> >>>>> HTH, >>>>> Matt >>>>> >>>>> [1] https://cmake.org/cmake/help/v3.3/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html >>>> >>>> Matt, >>>> We have verified that ALL dependent libraries are built with libC++, 10.7 as the min deployment, C++11 enabled. This goes for Boost, HDF5, Eigen, ITK, and Qt 5.5.1. We still have the issue. We can also reproduce that if we move the dependency to a lower level then the issue goes away. So it would seem that there is a problem with multiple plugins being dependent on the same External library. in this case it is ITK. I?ll try to diagram below. >>>> ## Failure Mode ## >>>> A.plugin depends on ITK >>>> A.plugin depends on SIMPlib. >>>> >>>> B.plugin depends on ITK >>>> B.plugin depends on SIMPlib. >>>> >>>> B.plugin will fail to execute properly. >>>> >>>> ## Success Mode ## >>>> A.plugin depends on SIMPlib. >>>> SIMPlib depends on ITK >>>> >>>> B.plugin depends on SIMPlib. >>>> SIMPlib depends on ITK >>>> >>>> The DREAM.3D filters both execute properly and give the proper output. >>>> >>>> -- >>>> Michael A. Jackson >>>> BlueQuartz Software, LLC >>>> [e]: mike.jackson at bluequartz.net >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >> > From carminepagliaro at gmail.com Sat Oct 31 07:07:26 2015 From: carminepagliaro at gmail.com (Carmine Pagliaro) Date: Sat, 31 Oct 2015 12:07:26 +0100 Subject: [ITK-users] (no subject) In-Reply-To: References: Message-ID: Thank you for the reply, Dr. McCormick. But that not help me. I don't understand how I can create a new optimizer algorithm and pass it to the registration->SetOptimizer() method 2015-10-30 17:02 GMT+01:00 Matt McCormick : > Hi Carmine, > > To see all the optimizer options, go to the base class in Doxygen: > > > http://www.itk.org/Doxygen/html/classitk_1_1SingleValuedNonLinearOptimizer.html > > Then, look at the inheritance diagram. There are options like the > OnePlusOneEvolutionaryOptimizer and ParticleSwarmOptimizer. > > Hope this helps, > Matt > > On Fri, Oct 30, 2015 at 10:59 AM, Carmine Pagliaro > wrote: > > Dear ITK team, > > > > in the file attacched I register 2 mri image in nifti format. > > > > the optimization algorithm is gradientdescent > > > > typedef itk::RegularStepGradientDescentOptimizer OptimizerType; > > > > I would make one myself using annealing. so how can I do this? > > > > how could I must modified the follow code ? what is optimizer? > > > > OptimizerType::Pointer optimizer = OptimizerType::New(); > > registration->SetOptimizer( optimizer ); > > > > thank you very much > > -- > > Carmine Pagliaro > > Life is for sharing. > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -- Carmine Pagliaro *Life is for sharing.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Sat Oct 31 11:51:14 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Sat, 31 Oct 2015 11:51:14 -0400 Subject: [ITK-users] Demons Registration on a Region of Interest In-Reply-To: <1124110917.5970566.1446126548319.JavaMail.zimbra@univ-poitiers.fr> References: <1124110917.5970566.1446126548319.JavaMail.zimbra@univ-poitiers.fr> Message-ID: Have you tried extracting only the regions of interest using RoI filter and registering these two smaller images? That is the usual workaround if some filter does not respect requested region. HTH On Thu, Oct 29, 2015 at 9:49 AM, HONG NHUNG PHAM < hong.nhung.pham at univ-poitiers.fr> wrote: > Hello everyone, > > I want to apply Demons Registration to register two medical images, the > image information is strong at the center, therefore I want to apply > registration method on only the center region of the images. For example, > take a center region of moving image, and find the corresponding positions > of each pixel of the region in the fixed image. However, I can not find a > method that allows processing on a region like that in > itkDemonsRegistrationFilter.h. I tried passing the full fixed image as > SetFixedImage, and only the center region of moving image as > SetMovingImage. However, it crashes because it requires same size of fixed > image and moving image. > > Does anyone have any idea of how to pass a region to demons registration > filter? > > Thank you in advance! > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Oct 31 11:54:58 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Sat, 31 Oct 2015 11:54:58 -0400 Subject: [ITK-users] (no subject) In-Reply-To: References: Message-ID: You should probably look at one of the registration examples to see how an optimizer is used: http://itk.org/Wiki/ITK/Examples/Included/Registration HTH On Sat, Oct 31, 2015 at 7:07 AM, Carmine Pagliaro wrote: > Thank you for the reply, Dr. McCormick. > But that not help me. > I don't understand how I can create a new optimizer algorithm and pass it > to the registration->SetOptimizer() method > > > 2015-10-30 17:02 GMT+01:00 Matt McCormick : > >> Hi Carmine, >> >> To see all the optimizer options, go to the base class in Doxygen: >> >> >> http://www.itk.org/Doxygen/html/classitk_1_1SingleValuedNonLinearOptimizer.html >> >> Then, look at the inheritance diagram. There are options like the >> OnePlusOneEvolutionaryOptimizer and ParticleSwarmOptimizer. >> >> Hope this helps, >> Matt >> >> On Fri, Oct 30, 2015 at 10:59 AM, Carmine Pagliaro >> wrote: >> > Dear ITK team, >> > >> > in the file attacched I register 2 mri image in nifti format. >> > >> > the optimization algorithm is gradientdescent >> > >> > typedef itk::RegularStepGradientDescentOptimizer OptimizerType; >> > >> > I would make one myself using annealing. so how can I do this? >> > >> > how could I must modified the follow code ? what is optimizer? >> > >> > OptimizerType::Pointer optimizer = OptimizerType::New(); >> > registration->SetOptimizer( optimizer ); >> > >> > thank you very much >> > -- >> > Carmine Pagliaro >> > Life is for sharing. >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > >> > > > > -- > Carmine Pagliaro > *Life is for sharing.* > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 andrew.buckler at elucidbio.com Sat Oct 31 11:33:53 2015 From: andrew.buckler at elucidbio.com (Andrew J. Buckler (Elucid Bioimaging)) Date: Sat, 31 Oct 2015 15:33:53 +0000 Subject: [ITK-users] ITK 4.8.1 build on Cygwin Message-ID: Hello, I am working to build ITK 4.8.1 on Cygwin, but receive the following error: /cygdrive/c/Users/Andrew Buckler/My Documents/projects/InsightToolkit-4.8.1/Modules/ThirdParty/KWSys/src/KWSys/SystemTools.cxx: In function 'void Realpath(const string&, std::string&, std::string*)': /cygdrive/c/Users/Andrew Buckler/My Documents/projects/InsightToolkit-4.8.1/Modules/ThirdParty/KWSys/src/KWSys/SystemTools.cxx:326:51: error: 'realpath' was not declared in this scope char *ret = realpath(path.c_str(), resolved_name); I had run cmake beforehand, using the following: $ cmake -DCMAKE_CXX_FLAGS=-std=c++11 -DCMAKE_PREFIX_PATH=../VTK-build -DModule_ITKReview:BOOL=ON -DModule_MinimalPathExtraction:BOOL=ON -DModule_ITKVtkGlue:BOOL=ON ../InsightToolkit-4.8.1 Which ran successfully. As it happens, I did have what seems the same error building VTK. A request to that list elicited a most helpful message from Cory, pointing me to http://hvrl.ics.keio.ac.jp/kimura/vtk/vtk-6.3.0.html which included a patch and instructions that cleared the problem. Before posting this message to the list, I did ask Cory whether he had or knew of a similar fix for ITK, but he replied suggesting I post to this list (apparently indicating that he had more specific experience on this point for VTK than ITK). Any help would be most wlecome, with my thanks. Happy Halloween, Andy ------------------------------------- Andrew J. Buckler, President and CEO Elucid Bioimaging Inc. 225 Main Street, Suite 15 | Wenham, MA 01984 USA Office: +1-978-468-0508 Mobile: +1-978-473-1986 Fax: +1-978-468-0527 andrew.buckler at elucidbio.com | www.elucidbio.com This e-mail is from Elucid Bioimaging Inc., a product development and contract research company, and may contain information that is confidential or privileged. If you are not the intended recipient, do not read, copy or distribute the e-mail or any attachments. Instead, please notify the sender and delete the e-mail and any attachments. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carminepagliaro at gmail.com Sat Oct 31 12:07:10 2015 From: carminepagliaro at gmail.com (Carmine Pagliaro) Date: Sat, 31 Oct 2015 17:07:10 +0100 Subject: [ITK-users] (no subject) In-Reply-To: References: Message-ID: oh yes but, I would know how can I create a new one. i.e RegularStepGradientDescentBaseOptimizer becomes MyPersonalOptimizer. in this class i'll write my personal algorithm. 2015-10-31 16:54 GMT+01:00 D?enan Zuki? : > You should probably look at one of the registration examples to see how an > optimizer is used: > http://itk.org/Wiki/ITK/Examples/Included/Registration > > HTH > > On Sat, Oct 31, 2015 at 7:07 AM, Carmine Pagliaro < > carminepagliaro at gmail.com> wrote: > >> Thank you for the reply, Dr. McCormick. >> But that not help me. >> I don't understand how I can create a new optimizer algorithm and pass it >> to the registration->SetOptimizer() method >> >> >> 2015-10-30 17:02 GMT+01:00 Matt McCormick : >> >>> Hi Carmine, >>> >>> To see all the optimizer options, go to the base class in Doxygen: >>> >>> >>> http://www.itk.org/Doxygen/html/classitk_1_1SingleValuedNonLinearOptimizer.html >>> >>> Then, look at the inheritance diagram. There are options like the >>> OnePlusOneEvolutionaryOptimizer and ParticleSwarmOptimizer. >>> >>> Hope this helps, >>> Matt >>> >>> On Fri, Oct 30, 2015 at 10:59 AM, Carmine Pagliaro >>> wrote: >>> > Dear ITK team, >>> > >>> > in the file attacched I register 2 mri image in nifti format. >>> > >>> > the optimization algorithm is gradientdescent >>> > >>> > typedef itk::RegularStepGradientDescentOptimizer OptimizerType; >>> > >>> > I would make one myself using annealing. so how can I do this? >>> > >>> > how could I must modified the follow code ? what is optimizer? >>> > >>> > OptimizerType::Pointer optimizer = OptimizerType::New(); >>> > registration->SetOptimizer( optimizer ); >>> > >>> > thank you very much >>> > -- >>> > Carmine Pagliaro >>> > Life is for sharing. >>> > >>> > >>> > _____________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Kitware offers ITK Training Courses, for more information visit: >>> > http://www.kitware.com/products/protraining.php >>> > >>> > Please keep messages on-topic and check the ITK FAQ at: >>> > http://www.itk.org/Wiki/ITK_FAQ >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/insight-users >>> > >>> >> >> >> >> -- >> Carmine Pagliaro >> *Life is for sharing.* >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> > -- Carmine Pagliaro *Life is for sharing.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From phnhung98 at gmail.com Sat Oct 31 12:07:25 2015 From: phnhung98 at gmail.com (Nhung Pham) Date: Sat, 31 Oct 2015 17:07:25 +0100 Subject: [ITK-users] Demons Registration on a Region of Interest In-Reply-To: References: <1124110917.5970566.1446126548319.JavaMail.zimbra@univ-poitiers.fr> Message-ID: Normally with Python, I can register one template( e.g: a center region of reference image) to the target image to find the corresponding position of the template in the target image. In this Demon Registration algorithm, we of course do not know the position of the template in the fixed image, so my goal is not to register two smaller images but to find the best match of the small region in the fixed image, or do you mean I should do registration with small regions of fixed image iteratively? (Sorry, my English is not so good) Best regards, =============================== Pha?m H??ng Nhung, ICT Department, University of Science and Technology of Hanoi. Mobile: +84979093732 Gmail: phnhung98 at gmail.com Skype: phnhung98 On Sat, Oct 31, 2015 at 4:51 PM, D?enan Zuki? wrote: > Have you tried extracting only the regions of interest using RoI > > filter and registering these two smaller images? That is the usual > workaround if some filter does not respect requested region. > > HTH > > On Thu, Oct 29, 2015 at 9:49 AM, HONG NHUNG PHAM < > hong.nhung.pham at univ-poitiers.fr> wrote: > >> Hello everyone, >> >> I want to apply Demons Registration to register two medical images, the >> image information is strong at the center, therefore I want to apply >> registration method on only the center region of the images. For example, >> take a center region of moving image, and find the corresponding positions >> of each pixel of the region in the fixed image. However, I can not find a >> method that allows processing on a region like that in >> itkDemonsRegistrationFilter.h. I tried passing the full fixed image as >> SetFixedImage, and only the center region of moving image as >> SetMovingImage. However, it crashes because it requires same size of fixed >> image and moving image. >> >> Does anyone have any idea of how to pass a region to demons registration >> filter? >> >> Thank you in advance! >> >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 Sat Oct 31 12:49:51 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 31 Oct 2015 12:49:51 -0400 Subject: [ITK-users] (no subject) In-Reply-To: References: Message-ID: Hi Carmine, Use the existing optimizer classes as an example, and examine the API and its descriptions in the Doxygen documentation. HTH, Matt On Sat, Oct 31, 2015 at 12:07 PM, Carmine Pagliaro wrote: > oh yes but, I would know how can I create a new one. i.e > RegularStepGradientDescentBaseOptimizer becomes MyPersonalOptimizer. in this > class i'll write my personal algorithm. > > 2015-10-31 16:54 GMT+01:00 D?enan Zuki? : >> >> You should probably look at one of the registration examples to see how an >> optimizer is used: >> http://itk.org/Wiki/ITK/Examples/Included/Registration >> >> HTH >> >> On Sat, Oct 31, 2015 at 7:07 AM, Carmine Pagliaro >> wrote: >>> >>> Thank you for the reply, Dr. McCormick. >>> But that not help me. >>> I don't understand how I can create a new optimizer algorithm and pass it >>> to the registration->SetOptimizer() method >>> >>> >>> 2015-10-30 17:02 GMT+01:00 Matt McCormick : >>>> >>>> Hi Carmine, >>>> >>>> To see all the optimizer options, go to the base class in Doxygen: >>>> >>>> >>>> http://www.itk.org/Doxygen/html/classitk_1_1SingleValuedNonLinearOptimizer.html >>>> >>>> Then, look at the inheritance diagram. There are options like the >>>> OnePlusOneEvolutionaryOptimizer and ParticleSwarmOptimizer. >>>> >>>> Hope this helps, >>>> Matt >>>> >>>> On Fri, Oct 30, 2015 at 10:59 AM, Carmine Pagliaro >>>> wrote: >>>> > Dear ITK team, >>>> > >>>> > in the file attacched I register 2 mri image in nifti format. >>>> > >>>> > the optimization algorithm is gradientdescent >>>> > >>>> > typedef itk::RegularStepGradientDescentOptimizer OptimizerType; >>>> > >>>> > I would make one myself using annealing. so how can I do this? >>>> > >>>> > how could I must modified the follow code ? what is optimizer? >>>> > >>>> > OptimizerType::Pointer optimizer = OptimizerType::New(); >>>> > registration->SetOptimizer( optimizer ); >>>> > >>>> > thank you very much >>>> > -- >>>> > Carmine Pagliaro >>>> > Life is for sharing. >>>> > >>>> > >>>> > _____________________________________ >>>> > Powered by www.kitware.com >>>> > >>>> > Visit other Kitware open-source projects at >>>> > http://www.kitware.com/opensource/opensource.html >>>> > >>>> > Kitware offers ITK Training Courses, for more information visit: >>>> > http://www.kitware.com/products/protraining.php >>>> > >>>> > Please keep messages on-topic and check the ITK FAQ at: >>>> > http://www.itk.org/Wiki/ITK_FAQ >>>> > >>>> > Follow this link to subscribe/unsubscribe: >>>> > http://public.kitware.com/mailman/listinfo/insight-users >>>> > >>> >>> >>> >>> >>> -- >>> Carmine Pagliaro >>> Life is for sharing. >>> >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >> > > > > -- > Carmine Pagliaro > Life is for sharing. > From carminepagliaro at gmail.com Sat Oct 31 12:51:30 2015 From: carminepagliaro at gmail.com (Carmine Pagliaro) Date: Sat, 31 Oct 2015 17:51:30 +0100 Subject: [ITK-users] (no subject) In-Reply-To: References: Message-ID: ok 2015-10-31 17:49 GMT+01:00 Matt McCormick : > Hi Carmine, > > Use the existing optimizer classes as an example, and examine the API > and its descriptions in the Doxygen documentation. > > HTH, > Matt > > On Sat, Oct 31, 2015 at 12:07 PM, Carmine Pagliaro > wrote: > > oh yes but, I would know how can I create a new one. i.e > > RegularStepGradientDescentBaseOptimizer becomes MyPersonalOptimizer. in > this > > class i'll write my personal algorithm. > > > > 2015-10-31 16:54 GMT+01:00 D?enan Zuki? : > >> > >> You should probably look at one of the registration examples to see how > an > >> optimizer is used: > >> http://itk.org/Wiki/ITK/Examples/Included/Registration > >> > >> HTH > >> > >> On Sat, Oct 31, 2015 at 7:07 AM, Carmine Pagliaro > >> wrote: > >>> > >>> Thank you for the reply, Dr. McCormick. > >>> But that not help me. > >>> I don't understand how I can create a new optimizer algorithm and pass > it > >>> to the registration->SetOptimizer() method > >>> > >>> > >>> 2015-10-30 17:02 GMT+01:00 Matt McCormick >: > >>>> > >>>> Hi Carmine, > >>>> > >>>> To see all the optimizer options, go to the base class in Doxygen: > >>>> > >>>> > >>>> > http://www.itk.org/Doxygen/html/classitk_1_1SingleValuedNonLinearOptimizer.html > >>>> > >>>> Then, look at the inheritance diagram. There are options like the > >>>> OnePlusOneEvolutionaryOptimizer and ParticleSwarmOptimizer. > >>>> > >>>> Hope this helps, > >>>> Matt > >>>> > >>>> On Fri, Oct 30, 2015 at 10:59 AM, Carmine Pagliaro > >>>> wrote: > >>>> > Dear ITK team, > >>>> > > >>>> > in the file attacched I register 2 mri image in nifti format. > >>>> > > >>>> > the optimization algorithm is gradientdescent > >>>> > > >>>> > typedef itk::RegularStepGradientDescentOptimizer > OptimizerType; > >>>> > > >>>> > I would make one myself using annealing. so how can I do this? > >>>> > > >>>> > how could I must modified the follow code ? what is optimizer? > >>>> > > >>>> > OptimizerType::Pointer optimizer = OptimizerType::New(); > >>>> > registration->SetOptimizer( optimizer ); > >>>> > > >>>> > thank you very much > >>>> > -- > >>>> > Carmine Pagliaro > >>>> > Life is for sharing. > >>>> > > >>>> > > >>>> > _____________________________________ > >>>> > Powered by www.kitware.com > >>>> > > >>>> > Visit other Kitware open-source projects at > >>>> > http://www.kitware.com/opensource/opensource.html > >>>> > > >>>> > Kitware offers ITK Training Courses, for more information visit: > >>>> > http://www.kitware.com/products/protraining.php > >>>> > > >>>> > Please keep messages on-topic and check the ITK FAQ at: > >>>> > http://www.itk.org/Wiki/ITK_FAQ > >>>> > > >>>> > Follow this link to subscribe/unsubscribe: > >>>> > http://public.kitware.com/mailman/listinfo/insight-users > >>>> > > >>> > >>> > >>> > >>> > >>> -- > >>> Carmine Pagliaro > >>> Life is for sharing. > >>> > >>> > >>> _____________________________________ > >>> Powered by www.kitware.com > >>> > >>> Visit other Kitware open-source projects at > >>> http://www.kitware.com/opensource/opensource.html > >>> > >>> Kitware offers ITK Training Courses, for more information visit: > >>> http://www.kitware.com/products/protraining.php > >>> > >>> Please keep messages on-topic and check the ITK FAQ at: > >>> http://www.itk.org/Wiki/ITK_FAQ > >>> > >>> Follow this link to subscribe/unsubscribe: > >>> http://public.kitware.com/mailman/listinfo/insight-users > >>> > >> > > > > > > > > -- > > Carmine Pagliaro > > Life is for sharing. > > > -- Carmine Pagliaro *Life is for sharing.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From rfrank at dominionsw.com Sat Oct 31 13:02:18 2015 From: rfrank at dominionsw.com (Richard Frank) Date: Sat, 31 Oct 2015 17:02:18 +0000 Subject: [ITK-users] ItkVtkglue and VTK OpenGL2 Message-ID: <3DEFA5A8-871A-493C-A328-5D3664D8566E@dominionsw.com> Hi, Any further developments on this? If there's a patch I can apply I would like to try it. Would like to have the OpenGL 2 support for an application using the vtkITK bridge. Thanks, Rick Date: Thu, 29 Oct 2015 18:32:49 -0400 From: Bill Lorensen > To: Richard Frank > Cc: Insight-Users > Subject: Re: [ITK-users] ItkVtkglue and VTK OpenGL2? Message-ID: > Content-Type: text/plain; charset="utf-8" I'll check into this. On Oct 29, 2015 6:31 PM, "Richard Frank" > wrote: It seems that in itkVtkGlue.cmake CMake is looking for vtkRenderingOpenGL which isn't available with OpenGL2 flags turned on for CMake. Is this a problem with the Cmake file or did I forget to check or uncheck something? Rick Frank Sent from my iPad -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sat Oct 31 13:30:47 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 31 Oct 2015 13:30:47 -0400 Subject: [ITK-users] ItkVtkglue and VTK OpenGL2 In-Reply-To: <3DEFA5A8-871A-493C-A328-5D3664D8566E@dominionsw.com> References: <3DEFA5A8-871A-493C-A328-5D3664D8566E@dominionsw.com> Message-ID: It's on my list. Thanks for the reminder. On Sat, Oct 31, 2015 at 1:02 PM, Richard Frank wrote: > > Hi, > > Any further developments on this? If there's a patch I can apply I would > like to try it. > Would like to have the OpenGL 2 support for an application using the vtkITK > bridge. > > > Thanks, > > Rick > > > Date: Thu, 29 Oct 2015 18:32:49 -0400 > From: Bill Lorensen > To: Richard Frank > Cc: Insight-Users > Subject: Re: [ITK-users] ItkVtkglue and VTK OpenGL2? > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > I'll check into this. > > On Oct 29, 2015 6:31 PM, "Richard Frank" wrote: > > > It seems that in itkVtkGlue.cmake CMake is looking for vtkRenderingOpenGL > > which isn't available with OpenGL2 flags turned on for CMake. > > > Is this a problem with the Cmake file or did I forget to check or uncheck > > something? > > Rick Frank > > Sent from my iPad -- Unpaid intern in BillsBasement at noware dot com