From matt.mccormick at kitware.com Fri Jul 1 13:38:55 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 1 Jul 2016 13:38:55 -0400 Subject: [ITK-users] Issue on itk.QuadEdgeMeshCellTraitsInfo In-Reply-To: References: <1465709590989.57546@sphic.org.cn> Message-ID: Hi Zhuangming Shen, This patch was created to address the issue: http://review.source.kitware.com/#/c/21286/ Could you please verify that it has fixed your issue? It will included in the 4.10.1 release. Thanks, Matt On Mon, Jun 27, 2016 at 4:25 PM, Michka Popoff wrote: > Hi > > thanks for reporting this. I also could reproduce the warnings. > I opened a bug for this here so we can keep track of it: > https://issues.itk.org/jira/browse/ITK-3448 > > The same error was also reported on the mailing list yesterday. > If you just want to hide the warning you can use: > > import warnings > warnings.simplefilter(?ignore", Warning) > > If you need to use QuadEdgeMeshCellTraitsInfo with Python, > somebody will need to fix this. I already gave it a shot, but > this may take some time. Not sure I will be able to look at > this until next week. > > Thanks > > Michka > > > >> On 12 Jun 2016, at 07:33, ??? wrote: >> >> Hi all, >> >> When I used python-supported ITK 4.10.0 to get the types of itk.QuadEdgeMeshCellTraitsInfo for the first time, I got two warnings >> >> Warning: Unknown parameter 'itk::QuadEdgeMeshCellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned char,itk::QuadEdgeMeshPoint< float,2,itk::GeometricalQuadEdge< unsigned long, unsigned long,bool,bool,true > >,itk::MapContainer< unsigned long,itk::QuadEdgeMeshPoint< float,2,itk::GeometricalQuadEdge< unsigned long,unsigned long,bool,bool,true > > >,std::set< unsigned long >,itk::GeometricalQuadEdge< unsigned long,unsigned long,bool,bool,true > >' in template 'itk::CellInterface' >> Warning: Unknown parameter 'itk::QuadEdgeMeshCellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned char,itk::QuadEdgeMeshPoint< float,3,itk::GeometricalQuadEdge< unsigned long, unsigned long,bool,bool,true > >,itk::MapContainer< unsigned long,itk::QuadEdgeMeshPoint< float,3,itk::GeometricalQuadEdge< unsigned long,unsigned long,bool,bool,true > > >,std::set< unsigned long >,itk::GeometricalQuadEdge< unsigned long,unsigned long,bool,bool,true > >' in template 'itk::CellInterface' >> >> Options: >> >> >> If I run itk.QuadEdgeMeshCellTraitsInfo.GetTypes() again or use ITK 4.9.1 instead, it just displays >> >> >> Options: >> >> >> So what's the problem? What is the unknown parameter? Has someone met this issue? Thanks. >> >> >> 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 > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK 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 Fri Jul 1 16:34:04 2016 From: noreply at insightsoftwareconsortium.org (Insight Journal) Date: Fri, 1 Jul 2016 16:34:04 -0400 (EDT) Subject: [ITK-users] New Submission: Performance Benchmarking the Insight Toolkit Message-ID: <20160701203404.F35403D6207E@insight-journal.org> Hello, A new submission has been added to the Insight Journal. Title: Performance Benchmarking the Insight Toolkit Authors: McCormick M., Kang H.J., Barre S. Abstract: This document describes a module for the Insight Toolkit (ITK) to assist in performance benchmarking and a suite of benchmarks for the toolkit. These resources provide metrics to quantify software computational performance. This is a pre-requisite to improve performance either through algorithmic advancements or better utilization of hardware resources. Computational performance is quantified by reducing factors that confound timing measurements and by estimating measurement variance. New classes are presented that increase operating system process priority to minimize the impact of other processes running on the system. System hardware characteristics are extracted and displayed. The influence of hard disk input/output on runtime measurements is removed in the suite of benchmarks. Additionally, the number of threads used by each benchmark can be specified. These benchmarks consist of common analysis pipelines and run on 3D magnetic resonance brain image data so realistic performance is quantified. Benchmarks can be executed with multiple iterations, and timing statistics are recorded in tab separated value (.tsv) files, which are easily stored or processed for further analysis and visualization. This paper is accompanied with the source code, input data, parameters and output data that the authors used for validating the algorithm described in this paper. This adheres to the fundamental principle that scientific publications must facilitate reproducibility of the reported results. Download and review this publication at: http://hdl.handle.net/10380/3557 Generated by the Insight Journal You are receiving this email because you asked to be informed by the Insight Journal for new submissions. To change your email preference visit http://insight-journal.org/ . From noreply at insightsoftwareconsortium.org Fri Jul 1 17:29:44 2016 From: noreply at insightsoftwareconsortium.org (Insight Journal) Date: Fri, 1 Jul 2016 17:29:44 -0400 (EDT) Subject: [ITK-users] New Submission: OpenCL accelerated GPU binary morphology image filters for ITK Message-ID: <20160701212944.EF55F3D62059@insight-journal.org> Hello, A new submission has been added to the Insight Journal. Title: OpenCL accelerated GPU binary morphology image filters for ITK Authors: Bardosi Z. Abstract: Binary morphological operations are fundamental tools in image processing but the processing time scales with the number of pixels thus making them expensive operations on the CPU for larger 3D datasets that typically appear in medical imaging. Since erosion and dilatation are special neighborhood operators, each pixel in the output depends only on the neighborhood region which makes them fit for massive GPU parallelization. This document introduces a new ITK module that implements generic (OpenCL based) GPU accelerated binary morphology image filters for erosion and dilatation. The filter can be executed within the standard ITKGPU pipeline. Download and review this publication at: http://hdl.handle.net/10380/3525 Generated by the Insight Journal You are receiving this email because you asked to be informed by the Insight Journal for new submissions. To change your email preference visit http://insight-journal.org/ . From jmerkow at gmail.com Sun Jul 3 16:36:38 2016 From: jmerkow at gmail.com (Jameson Merkow) Date: Sun, 3 Jul 2016 13:36:38 -0700 Subject: [ITK-users] Reading an image from a file object with SimpleITK+Python Message-ID: Hello all, Is there a way to read an image with SimpleITK+Python from a file object (as opposed to a string/filename)? I cannot find anything in the Doxygen or otherwise to do this. Here is a toy example: import cStringIO import SimpleITK as sitk dcmfn="test.dcm" with open(dcmfn,'rb') as data: body = data.read() strio=cStringIO.StringIO(body) img=sitk.ReadImage(strio) strio.close() --Jameson -------------- next part -------------- An HTML attachment was scrubbed... URL: From mrguilfoyle at gmail.com Sun Jul 3 21:11:43 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Mon, 4 Jul 2016 02:11:43 +0100 Subject: [ITK-users] LabelStatisticsImageFilter in 3D Message-ID: <6ECF75BD-4C2B-4FE4-BD6D-FFFDC7A414BD@gmail.com> Hi Using SimpleITK I'm trying to get statistics for a grayscale image segmentation for which I have a binary mask. Both image and mask are 3D volumes I have converted my binary mask to a Label map and then tried to apply the LabelStatisticsImageFilter, however I get the following exception: Pixel type: 32-bit float is not supported in 3D I've tried casting the intensity image to unsigned int, Float 64 etc... none of them work. It seems to be the 3D that is the issue. Is this filter defined for 3D images? There is nothing I have found in the documentation/source to suggest not. Thanks From ocuadrosl at gmail.com Mon Jul 4 16:57:31 2016 From: ocuadrosl at gmail.com (Oscar Cuadros Linares) Date: Mon, 4 Jul 2016 13:57:31 -0700 Subject: [ITK-users] 3D registration - teeth image Message-ID: Hi guys I have to register two 3D images of teeth (screenshots attached). I tested several approaches, such as: affine registration, rigid registration, mattes and mean square metric, etc. When I use moments centering I get an error (Too many samples map outside moving image buffer) and when I use geometric centering I do not get error, but the result (resampler) is exactly the same moving image. Any sugestions Thank you so much Oscar -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fixed.png Type: image/png Size: 27133 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: moving.png Type: image/png Size: 36205 bytes Desc: not available URL: From zhuangming.shen at sphic.org.cn Mon Jul 4 20:15:01 2016 From: zhuangming.shen at sphic.org.cn (=?gb2312?B?yfLXr8P3?=) Date: Tue, 5 Jul 2016 00:15:01 +0000 Subject: [ITK-users] Issue on itk.QuadEdgeMeshCellTraitsInfo In-Reply-To: References: <1465709590989.57546@sphic.org.cn> , Message-ID: <1467677701042.44519@sphic.org.cn> Hi Matt and Michka, Thank you for your prompt response. I have verified the issue has been fixed. Thanks again. Regards, Zhuangming Shen ________________________________________ From: Matt McCormick Sent: Saturday, July 2, 2016 1:38 AM To: Michka Popoff Cc: ???; insight-users at itk.org Subject: Re: [ITK-users] Issue on itk.QuadEdgeMeshCellTraitsInfo Hi Zhuangming Shen, This patch was created to address the issue: http://review.source.kitware.com/#/c/21286/ Could you please verify that it has fixed your issue? It will included in the 4.10.1 release. Thanks, Matt On Mon, Jun 27, 2016 at 4:25 PM, Michka Popoff wrote: > Hi > > thanks for reporting this. I also could reproduce the warnings. > I opened a bug for this here so we can keep track of it: > https://issues.itk.org/jira/browse/ITK-3448 > > The same error was also reported on the mailing list yesterday. > If you just want to hide the warning you can use: > > import warnings > warnings.simplefilter(?ignore", Warning) > > If you need to use QuadEdgeMeshCellTraitsInfo with Python, > somebody will need to fix this. I already gave it a shot, but > this may take some time. Not sure I will be able to look at > this until next week. > > Thanks > > Michka > > > >> On 12 Jun 2016, at 07:33, ??? wrote: >> >> Hi all, >> >> When I used python-supported ITK 4.10.0 to get the types of itk.QuadEdgeMeshCellTraitsInfo for the first time, I got two warnings >> >> Warning: Unknown parameter 'itk::QuadEdgeMeshCellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned char,itk::QuadEdgeMeshPoint< float,2,itk::GeometricalQuadEdge< unsigned long, unsigned long,bool,bool,true > >,itk::MapContainer< unsigned long,itk::QuadEdgeMeshPoint< float,2,itk::GeometricalQuadEdge< unsigned long,unsigned long,bool,bool,true > > >,std::set< unsigned long >,itk::GeometricalQuadEdge< unsigned long,unsigned long,bool,bool,true > >' in template 'itk::CellInterface' >> Warning: Unknown parameter 'itk::QuadEdgeMeshCellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned char,itk::QuadEdgeMeshPoint< float,3,itk::GeometricalQuadEdge< unsigned long, unsigned long,bool,bool,true > >,itk::MapContainer< unsigned long,itk::QuadEdgeMeshPoint< float,3,itk::GeometricalQuadEdge< unsigned long,unsigned long,bool,bool,true > > >,std::set< unsigned long >,itk::GeometricalQuadEdge< unsigned long,unsigned long,bool,bool,true > >' in template 'itk::CellInterface' >> >> Options: >> >> >> If I run itk.QuadEdgeMeshCellTraitsInfo.GetTypes() again or use ITK 4.9.1 instead, it just displays >> >> >> Options: >> >> >> So what's the problem? What is the unknown parameter? Has someone met this issue? Thanks. >> >> >> 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 > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From piotpia124 at student.polsl.pl Tue Jul 5 02:46:09 2016 From: piotpia124 at student.polsl.pl (Piotr Piasecki) Date: Tue, 05 Jul 2016 08:46:09 +0200 Subject: [ITK-users] Lost Patient, Study and Series DICOM tags Message-ID: <950a17346e556728857382ebf5cb79e4@poczta.student.polsl.pl> Dear Sir or Madam. I am a student in Biomedical Engineering at the Silesian University of Technology. During my studies I worked with ITK and SimpleITK in C#. I want to use them in my current project, but I have an important question. After loading and processing a series of .dcm files I lost information about the patient and study to which they belong, and that they belong to one series. How can I keep this information? I will be very grateful for any answer. Best regards. Peter. From 2389127171 at qq.com Tue Jul 5 04:38:32 2016 From: 2389127171 at qq.com (=?ISO-8859-1?B?WVlERGFsZ28=?=) Date: Tue, 5 Jul 2016 16:38:32 +0800 Subject: [ITK-users] The method base on Karl Krissian 'Model Based Detection of Tubular Structures in 3D Images' Message-ID: Hi, Now I am working on the detection of tube structure; But it is hard for a freshman to deal with the code. so is there anyone konw how to implement it and can you give a code for studying? Best wishes Even -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Tue Jul 5 04:56:02 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Tue, 5 Jul 2016 10:56:02 +0200 (CEST) Subject: [ITK-users] [ITK] 3D registration - teeth image In-Reply-To: References: Message-ID: <828117311.21362941.1467708962631.JavaMail.zimbra@enst.fr> Hi Oscar, The error you are receiving means that your images don't overlap with the initial transformation in the physical space. You have to set a better transformation initialization. You should take a look to the itk CenteredTransformInitializer ( https://itk.org/Doxygen/html/classitk_1_1CenteredTransformInitializer.html#a3284b1aabf2690889aa7435676fc7893 ), or the versor version of it, if you're using a transform with versor for rotation. This will help setting a good starting position. HTH, Tim ----- Mail original ----- De: "Oscar Cuadros Linares" ?: insight-users at itk.org Envoy?: Lundi 4 Juillet 2016 22:57:31 Objet: [ITK] [ITK-users] 3D registration - teeth image Hi guys I have to register two 3D images of teeth (screenshots attached). I tested several approaches, such as: affine registration, rigid registration, mattes and mean square metric, etc. When I use moments centering I get an error (Too many samples map outside moving image buffer) and when I use geometric centering I do not get error, but the result (resampler) is exactly the same moving image. Any sugestions Thank you so much Oscar _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 Tue Jul 5 09:33:18 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Tue, 5 Jul 2016 13:33:18 +0000 Subject: [ITK-users] Reading an image from a file object with SimpleITK+Python In-Reply-To: References: Message-ID: Hello, SimpleITK does not currently support this low level interface. I am not aware of an ITK ImageIO that directly support reading am image from a C FILE object either. You may find a lower level IO library such as GDCM or jpeg which can support this type of feature, but I have not tried it myself. HTH, Brad > On Jul 3, 2016, at 4:36 PM, Jameson Merkow wrote: > > Hello all, > > Is there a way to read an image with SimpleITK+Python from a file object (as opposed to a string/filename)? I cannot find anything in the Doxygen or otherwise to do this. > > Here is a toy example: > > import cStringIO > import SimpleITK as sitk > dcmfn="test.dcm" > with open(dcmfn,'rb') as data: > body = data.read() > strio=cStringIO.StringIO(body) > img=sitk.ReadImage(strio) > strio.close() > > > > --Jameson > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From dzenanz at gmail.com Tue Jul 5 09:45:16 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 5 Jul 2016 09:45:16 -0400 Subject: [ITK-users] Lost Patient, Study and Series DICOM tags In-Reply-To: <950a17346e556728857382ebf5cb79e4@poczta.student.polsl.pl> References: <950a17346e556728857382ebf5cb79e4@poczta.student.polsl.pl> Message-ID: Hi Piotr, if you want to carry over metadata from input image to output image, you should save the metadata dictionary in a way similar to this: itk::MetaDataDictionary metadata; template< typename TImage > itk::SmartPointer readImage(std::string fileName) { typedef itk::ImageFileReader ReaderType; typename ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(fileName.c_str()); try { reader->Update(); metadata = reader->GetMetaDataDictionary(); return reader->GetOutput(); } catch (itk::ExceptionObject & error) { std::cerr << "Error: " << error << std::endl; return NULL; } } template< typename TImage > void writeImage(itk::SmartPointer image, std::string fileName) { image->SetMetaDataDictionary(metadata); //full metadata typedef itk::ImageFileWriter WriterType; typename WriterType::Pointer writer = WriterType::New(); writer->SetFileName(fileName.c_str()); writer->SetInput(image); try { writer->Update(); } catch (itk::ExceptionObject & error) { std::cerr << "Error: " << error << std::endl; } } On Tue, Jul 5, 2016 at 2:46 AM, Piotr Piasecki wrote: > Dear Sir or Madam. > > I am a student in Biomedical Engineering at the Silesian University of > Technology. During my studies I worked with ITK and SimpleITK in C#. I want > to use them in my current project, but I have an important question. After > loading and processing a series of .dcm files I lost information about the > patient and study to which they belong, and that they belong to one series. > How can I keep this information? > > I will be very grateful for any answer. > > Best regards. > > Peter. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zivrafael.yaniv at nih.gov Tue Jul 5 10:43:57 2016 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Tue, 5 Jul 2016 14:43:57 +0000 Subject: [ITK-users] LabelStatisticsImageFilter in 3D In-Reply-To: <6ECF75BD-4C2B-4FE4-BD6D-FFFDC7A414BD@gmail.com> References: <6ECF75BD-4C2B-4FE4-BD6D-FFFDC7A414BD@gmail.com> Message-ID: Hi Mathew, As I haven?t seen your code I cannot pinpoint the issue, but it is not the dimension of the image. The following SimpleITK code does what I believe you are asking for (image is available here - https://midas3.kitware.com/midas/item/317034): import SimpleITK as sitk image = sitk.ReadImage("training_001_ct.mha") # HU values for bone are 700 and up segmented_image = image>700 # segmented label for the threshold operation is 1 (0 for everything else). # the LabelIntensityStatisticsImageFilter also works with multiple labels and not just a binary segmentation. segmented_label = 1 lisf = sitk.LabelIntensityStatisticsImageFilter() lisf.Execute(segmented_image, image) print("mean HU value: {0:.2f}".format(lisf.GetMean(segmented_label))) hope this helped Ziv On 7/3/16, 9:11 PM, "Mathew Guilfoyle" wrote: >Hi > >Using SimpleITK I'm trying to get statistics for a grayscale image >segmentation for which I have a binary mask. Both image and mask are 3D >volumes > >I have converted my binary mask to a Label map and then tried to apply >the LabelStatisticsImageFilter, however I get the following exception: > >Pixel type: 32-bit float is not supported in 3D > >I've tried casting the intensity image to unsigned int, Float 64 etc... >none of them work. It seems to be the 3D that is the issue. Is this >filter defined for 3D images? There is nothing I have found in the >documentation/source to suggest not. > >Thanks >_____________________________________ >Powered by www.kitware.com > >Visit other Kitware open-source projects at >http://www.kitware.com/opensource/opensource.html > >Kitware offers ITK Training Courses, for more information visit: >http://www.kitware.com/products/protraining.php > >Please keep messages on-topic and check the ITK FAQ at: >http://www.itk.org/Wiki/ITK_FAQ > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/insight-users From mrguilfoyle at gmail.com Tue Jul 5 21:37:00 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Wed, 6 Jul 2016 02:37:00 +0100 Subject: [ITK-users] R-SimpleITK LabelStatisticsImageFilter 3D Error In-Reply-To: References: <6ECF75BD-4C2B-4FE4-BD6D-FFFDC7A414BD@gmail.com> Message-ID: <3F8EFACD-CA13-4B07-86D5-67951C421476@gmail.com> Ziv: thanks for the reply. I'm using the R wrapped version of SimpleITK I've run the equivalent of your example: library('SimpleITK') image = ReadImage('training_001_ct.mha') segmented_image = image>700 lisf = LabelIntensityStatisticsImageFilter() lisf$Execute(segmented_image, image) Unfortunately I'm getting the same error as for my own scripts: Warning message: In f(...) : Exception thrown in SimpleITK Show: /ITK/SITK/Source-Current/Build-290516/ITK-prefix/include/ITK-4.10/itkImageFileWriter.hxx:290: itk::ERROR: ImageFileWriter(0x10c05cbc0): Largest possible region does not fully contain requested paste IO regionPaste IO region: ImageIORegion (0x7fff5fbf6cd8) Dimension: 2 Index: 0 0 Size: 0 0 Largest possible region: ImageRegion (0x7fff5fbf6d70) Dimension: 2 Index: [0, 0] Size: [0, 0] I have a feeling that this is a problem with the LabelIntensityStatisticsImageFilter being templated over 2D and 3D images and when it is instantiated it is defaulting to the 2D? Previously using Python wrapped ITK (i.e. not SimpleITK) when I declared these filters I would give it a 2D or 3D image type but this is not possible in SimpleITK. However, if this is working for you in Python-SimpleITK maybe it is an issue peculiar to the R wrapping? Any further suggestions would be appreciated Cheers > On 5 Jul 2016, at 15:43, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] wrote: > > Hi Mathew, > > As I haven?t seen your code I cannot pinpoint the issue, but it is not the > dimension of the image. > > The following SimpleITK code does what I believe you are asking for (image > is available here - https://midas3.kitware.com/midas/item/317034): > > import SimpleITK as sitk > > image = sitk.ReadImage("training_001_ct.mha") > > # HU values for bone are 700 and up > segmented_image = image>700 > > # segmented label for the threshold operation is 1 (0 for everything else). > # the LabelIntensityStatisticsImageFilter also works with multiple labels > and not just a binary segmentation. > segmented_label = 1 > > lisf = sitk.LabelIntensityStatisticsImageFilter() > lisf.Execute(segmented_image, image) > > print("mean HU value: {0:.2f}".format(lisf.GetMean(segmented_label))) > > hope this helped > > Ziv > > > > > > > On 7/3/16, 9:11 PM, "Mathew Guilfoyle" wrote: > >> Hi >> >> Using SimpleITK I'm trying to get statistics for a grayscale image >> segmentation for which I have a binary mask. Both image and mask are 3D >> volumes >> >> I have converted my binary mask to a Label map and then tried to apply >> the LabelStatisticsImageFilter, however I get the following exception: >> >> Pixel type: 32-bit float is not supported in 3D >> >> I've tried casting the intensity image to unsigned int, Float 64 etc... >> none of them work. It seems to be the 3D that is the issue. Is this >> filter defined for 3D images? There is nothing I have found in the >> documentation/source to suggest not. >> >> Thanks >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From blowekamp at mail.nih.gov Wed Jul 6 08:26:43 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Wed, 6 Jul 2016 12:26:43 +0000 Subject: [ITK-users] R-SimpleITK LabelStatisticsImageFilter 3D Error In-Reply-To: <3F8EFACD-CA13-4B07-86D5-67951C421476@gmail.com> References: <6ECF75BD-4C2B-4FE4-BD6D-FFFDC7A414BD@gmail.com> <3F8EFACD-CA13-4B07-86D5-67951C421476@gmail.com> Message-ID: Hello, Did you compile R SimpleITK from a very recent version of the SimpleITK master branch from git? There have been a lot of improvements for the R wrapping, and required improvement with SWIG too. This looks like an problem that has been fixed related R reference counting. SimpleITK is smart enough to know when to call the 3D or 2D version of a filter. It also knows the pixel types of the inputs and calls the correct template combinations for the ITK filter automatically. When the filter is not instantiated with the pixel types passed to it will give an error message as the original poster of this thread got. HTH, Brad > On Jul 5, 2016, at 9:37 PM, Mathew Guilfoyle wrote: > > Ziv: thanks for the reply. > > I'm using the R wrapped version of SimpleITK > > I've run the equivalent of your example: > > library('SimpleITK') > image = ReadImage('training_001_ct.mha') > > segmented_image = image>700 > > lisf = LabelIntensityStatisticsImageFilter() > lisf$Execute(segmented_image, image) > > Unfortunately I'm getting the same error as for my own scripts: > > Warning message: > In f(...) : > Exception thrown in SimpleITK Show: /ITK/SITK/Source-Current/Build-290516/ITK-prefix/include/ITK-4.10/itkImageFileWriter.hxx:290: > itk::ERROR: ImageFileWriter(0x10c05cbc0): Largest possible region does not fully contain requested paste IO regionPaste IO region: ImageIORegion (0x7fff5fbf6cd8) > Dimension: 2 > Index: 0 0 > Size: 0 0 > Largest possible region: ImageRegion (0x7fff5fbf6d70) > Dimension: 2 > Index: [0, 0] > Size: [0, 0] > > I have a feeling that this is a problem with the LabelIntensityStatisticsImageFilter being templated over 2D and 3D images and when it is instantiated it is defaulting to the 2D? Previously using Python wrapped ITK (i.e. not SimpleITK) when I declared these filters I would give it a 2D or 3D image type but this is not possible in SimpleITK. > > However, if this is working for you in Python-SimpleITK maybe it is an issue peculiar to the R wrapping? > > Any further suggestions would be appreciated > > Cheers > >> On 5 Jul 2016, at 15:43, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] wrote: >> >> Hi Mathew, >> >> As I haven?t seen your code I cannot pinpoint the issue, but it is not the >> dimension of the image. >> >> The following SimpleITK code does what I believe you are asking for (image >> is available here - https://midas3.kitware.com/midas/item/317034): >> >> import SimpleITK as sitk >> >> image = sitk.ReadImage("training_001_ct.mha") >> >> # HU values for bone are 700 and up >> segmented_image = image>700 >> >> # segmented label for the threshold operation is 1 (0 for everything else). >> # the LabelIntensityStatisticsImageFilter also works with multiple labels >> and not just a binary segmentation. >> segmented_label = 1 >> >> lisf = sitk.LabelIntensityStatisticsImageFilter() >> lisf.Execute(segmented_image, image) >> >> print("mean HU value: {0:.2f}".format(lisf.GetMean(segmented_label))) >> >> hope this helped >> >> Ziv >> >> >> >> >> >> >> On 7/3/16, 9:11 PM, "Mathew Guilfoyle" wrote: >> >>> Hi >>> >>> Using SimpleITK I'm trying to get statistics for a grayscale image >>> segmentation for which I have a binary mask. Both image and mask are 3D >>> volumes >>> >>> I have converted my binary mask to a Label map and then tried to apply >>> the LabelStatisticsImageFilter, however I get the following exception: >>> >>> Pixel type: 32-bit float is not supported in 3D >>> >>> I've tried casting the intensity image to unsigned int, Float 64 etc... >>> none of them work. It seems to be the 3D that is the issue. Is this >>> filter defined for 3D images? There is nothing I have found in the >>> documentation/source to suggest not. >>> >>> Thanks >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From mrguilfoyle at gmail.com Wed Jul 6 09:47:29 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Wed, 6 Jul 2016 14:47:29 +0100 Subject: [ITK-users] R-SimpleITK LabelStatisticsImageFilter 3D Error In-Reply-To: References: <6ECF75BD-4C2B-4FE4-BD6D-FFFDC7A414BD@gmail.com> <3F8EFACD-CA13-4B07-86D5-67951C421476@gmail.com> Message-ID: Hi Compiled from a git around two months ago. In fact, though the error report suggests a fatal problem, the code I posted does work in as much as I can use the filter to get the label statistics. I don't know if the warning that comes up impacts on the filter function - I have not found a problem thus far. When I get a chance I'll recompile a more recent version and check the errors again. Thanks On 6 July 2016 at 13:26, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: > Hello, > > Did you compile R SimpleITK from a very recent version of the SimpleITK master branch from git? > > There have been a lot of improvements for the R wrapping, and required improvement with SWIG too. This looks like an problem that has been fixed related R reference counting. > > SimpleITK is smart enough to know when to call the 3D or 2D version of a filter. It also knows the pixel types of the inputs and calls the correct template combinations for the ITK filter automatically. When the filter is not instantiated with the pixel types passed to it will give an error message as the original poster of this thread got. > > HTH, > Brad > >> On Jul 5, 2016, at 9:37 PM, Mathew Guilfoyle wrote: >> >> Ziv: thanks for the reply. >> >> I'm using the R wrapped version of SimpleITK >> >> I've run the equivalent of your example: >> >> library('SimpleITK') >> image = ReadImage('training_001_ct.mha') >> >> segmented_image = image>700 >> >> lisf = LabelIntensityStatisticsImageFilter() >> lisf$Execute(segmented_image, image) >> >> Unfortunately I'm getting the same error as for my own scripts: >> >> Warning message: >> In f(...) : >> Exception thrown in SimpleITK Show: /ITK/SITK/Source-Current/Build-290516/ITK-prefix/include/ITK-4.10/itkImageFileWriter.hxx:290: >> itk::ERROR: ImageFileWriter(0x10c05cbc0): Largest possible region does not fully contain requested paste IO regionPaste IO region: ImageIORegion (0x7fff5fbf6cd8) >> Dimension: 2 >> Index: 0 0 >> Size: 0 0 >> Largest possible region: ImageRegion (0x7fff5fbf6d70) >> Dimension: 2 >> Index: [0, 0] >> Size: [0, 0] >> >> I have a feeling that this is a problem with the LabelIntensityStatisticsImageFilter being templated over 2D and 3D images and when it is instantiated it is defaulting to the 2D? Previously using Python wrapped ITK (i.e. not SimpleITK) when I declared these filters I would give it a 2D or 3D image type but this is not possible in SimpleITK. >> >> However, if this is working for you in Python-SimpleITK maybe it is an issue peculiar to the R wrapping? >> >> Any further suggestions would be appreciated >> >> Cheers >> >>> On 5 Jul 2016, at 15:43, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] wrote: >>> >>> Hi Mathew, >>> >>> As I haven?t seen your code I cannot pinpoint the issue, but it is not the >>> dimension of the image. >>> >>> The following SimpleITK code does what I believe you are asking for (image >>> is available here - https://midas3.kitware.com/midas/item/317034): >>> >>> import SimpleITK as sitk >>> >>> image = sitk.ReadImage("training_001_ct.mha") >>> >>> # HU values for bone are 700 and up >>> segmented_image = image>700 >>> >>> # segmented label for the threshold operation is 1 (0 for everything else). >>> # the LabelIntensityStatisticsImageFilter also works with multiple labels >>> and not just a binary segmentation. >>> segmented_label = 1 >>> >>> lisf = sitk.LabelIntensityStatisticsImageFilter() >>> lisf.Execute(segmented_image, image) >>> >>> print("mean HU value: {0:.2f}".format(lisf.GetMean(segmented_label))) >>> >>> hope this helped >>> >>> Ziv >>> >>> >>> >>> >>> >>> >>> On 7/3/16, 9:11 PM, "Mathew Guilfoyle" wrote: >>> >>>> Hi >>>> >>>> Using SimpleITK I'm trying to get statistics for a grayscale image >>>> segmentation for which I have a binary mask. Both image and mask are 3D >>>> volumes >>>> >>>> I have converted my binary mask to a Label map and then tried to apply >>>> the LabelStatisticsImageFilter, however I get the following exception: >>>> >>>> Pixel type: 32-bit float is not supported in 3D >>>> >>>> I've tried casting the intensity image to unsigned int, Float 64 etc... >>>> none of them work. It seems to be the 3D that is the issue. Is this >>>> filter defined for 3D images? There is nothing I have found in the >>>> documentation/source to suggest not. >>>> >>>> Thanks >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > From mrguilfoyle at gmail.com Wed Jul 6 09:55:45 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Wed, 6 Jul 2016 14:55:45 +0100 Subject: [ITK-users] R-SimpleITK memory management Message-ID: I'm processing a large number of CT scans using R wrapped SimpleITK (some filtering and then registration before a segmentation). I'm running R within RStudio on OS X 10.11 I'm running into memory problems with long processing runs. Though in the R loops I reassign new images to the same R variable the underlying C++ objects do not seem to get deleted but accumulate on each loop - I can see steadily rising memory usage in Activity Monitor until R/RStudio crashes. I have tried explicitly deleting the temporary images during each loop and calling the R garbage collector (gc()), but it doesn't seem to have an effect. If I restart the R session then the memory is cleared. My understanding was that the C++ objects would get garbage collected once all pointers are removed but this doesn't seem to happen. Is there a method to explicitly delete the C++ image objects so I can manage the memory usage myself? Cheers From zivrafael.yaniv at nih.gov Wed Jul 6 10:34:11 2016 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Wed, 6 Jul 2016 14:34:11 +0000 Subject: [ITK-users] R-SimpleITK LabelStatisticsImageFilter 3D Error In-Reply-To: References: <6ECF75BD-4C2B-4FE4-BD6D-FFFDC7A414BD@gmail.com> <3F8EFACD-CA13-4B07-86D5-67951C421476@gmail.com> Message-ID: Hi Mathew, This is an issue with the fact that some filters return a zero sized image for some method calls. The default behavior of R is to attempt to display this variable (showing a zero size image crashes). You have two options either assign to a dummy variable or wrap with ?invisible?. Following code works in R: library(SimpleITK) image <- ReadImage("training_001_ct.mha") segmented_image <- image>700 segmented_label <- 1 lisf <- LabelIntensityStatisticsImageFilter() ignore_me <- lisf$Execute(segmented_image, image) # or invisible(lisf$Execute(segmented_image, image)) cat(lisf$GetMean(segmented_label)) cat(ignore_me$GetSize()) Finally, with regard to building and installing SimpleITK, we now have a one liner (assuming you have git, Cmake and a working compiler and have devtools installed in your R environment): devtools::install_github("SimpleITK/SimpleITKRInstaller", args=c('--configure-vars="MAKEJ=6"')) Please set the number of cores according to what you have (we used 6 for the example). regards Ziv On 7/6/16, 9:47 AM, "Mathew Guilfoyle" wrote: >Hi > >Compiled from a git around two months ago. > >In fact, though the error report suggests a fatal problem, the code I >posted does work in as much as I can use the filter to get the label >statistics. I don't know if the warning that comes up impacts on the >filter function - I have not found a problem thus far. When I get a >chance I'll recompile a more recent version and check the errors >again. > >Thanks > >On 6 July 2016 at 13:26, Lowekamp, Bradley (NIH/NLM/LHC) [C] > wrote: >> Hello, >> >> Did you compile R SimpleITK from a very recent version of the SimpleITK >>master branch from git? >> >> There have been a lot of improvements for the R wrapping, and required >>improvement with SWIG too. This looks like an problem that has been >>fixed related R reference counting. >> >> SimpleITK is smart enough to know when to call the 3D or 2D version of >>a filter. It also knows the pixel types of the inputs and calls the >>correct template combinations for the ITK filter automatically. When the >>filter is not instantiated with the pixel types passed to it will give >>an error message as the original poster of this thread got. >> >> HTH, >> Brad >> >>> On Jul 5, 2016, at 9:37 PM, Mathew Guilfoyle >>>wrote: >>> >>> Ziv: thanks for the reply. >>> >>> I'm using the R wrapped version of SimpleITK >>> >>> I've run the equivalent of your example: >>> >>> library('SimpleITK') >>> image = ReadImage('training_001_ct.mha') >>> >>> segmented_image = image>700 >>> >>> lisf = LabelIntensityStatisticsImageFilter() >>> lisf$Execute(segmented_image, image) >>> >>> Unfortunately I'm getting the same error as for my own scripts: >>> >>> Warning message: >>> In f(...) : >>> Exception thrown in SimpleITK Show: >>>/ITK/SITK/Source-Current/Build-290516/ITK-prefix/include/ITK-4.10/itkIma >>>geFileWriter.hxx:290: >>> itk::ERROR: ImageFileWriter(0x10c05cbc0): Largest possible region does >>>not fully contain requested paste IO regionPaste IO region: >>>ImageIORegion (0x7fff5fbf6cd8) >>> Dimension: 2 >>> Index: 0 0 >>> Size: 0 0 >>> Largest possible region: ImageRegion (0x7fff5fbf6d70) >>> Dimension: 2 >>> Index: [0, 0] >>> Size: [0, 0] >>> >>> I have a feeling that this is a problem with the >>>LabelIntensityStatisticsImageFilter being templated over 2D and 3D >>>images and when it is instantiated it is defaulting to the 2D? >>>Previously using Python wrapped ITK (i.e. not SimpleITK) when I >>>declared these filters I would give it a 2D or 3D image type but this >>>is not possible in SimpleITK. >>> >>> However, if this is working for you in Python-SimpleITK maybe it is an >>>issue peculiar to the R wrapping? >>> >>> Any further suggestions would be appreciated >>> >>> Cheers >>> >>>> On 5 Jul 2016, at 15:43, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] >>>> wrote: >>>> >>>> Hi Mathew, >>>> >>>> As I haven?t seen your code I cannot pinpoint the issue, but it is >>>>not the >>>> dimension of the image. >>>> >>>> The following SimpleITK code does what I believe you are asking for >>>>(image >>>> is available here - https://midas3.kitware.com/midas/item/317034): >>>> >>>> import SimpleITK as sitk >>>> >>>> image = sitk.ReadImage("training_001_ct.mha") >>>> >>>> # HU values for bone are 700 and up >>>> segmented_image = image>700 >>>> >>>> # segmented label for the threshold operation is 1 (0 for everything >>>>else). >>>> # the LabelIntensityStatisticsImageFilter also works with multiple >>>>labels >>>> and not just a binary segmentation. >>>> segmented_label = 1 >>>> >>>> lisf = sitk.LabelIntensityStatisticsImageFilter() >>>> lisf.Execute(segmented_image, image) >>>> >>>> print("mean HU value: {0:.2f}".format(lisf.GetMean(segmented_label))) >>>> >>>> hope this helped >>>> >>>> Ziv >>>> >>>> >>>> >>>> >>>> >>>> >>>> On 7/3/16, 9:11 PM, "Mathew Guilfoyle" wrote: >>>> >>>>> Hi >>>>> >>>>> Using SimpleITK I'm trying to get statistics for a grayscale image >>>>> segmentation for which I have a binary mask. Both image and mask >>>>>are 3D >>>>> volumes >>>>> >>>>> I have converted my binary mask to a Label map and then tried to >>>>>apply >>>>> the LabelStatisticsImageFilter, however I get the following >>>>>exception: >>>>> >>>>> Pixel type: 32-bit float is not supported in 3D >>>>> >>>>> I've tried casting the intensity image to unsigned int, Float 64 >>>>>etc... >>>>> none of them work. It seems to be the 3D that is the issue. Is this >>>>> filter defined for 3D images? There is nothing I have found in the >>>>> documentation/source to suggest not. >>>>> >>>>> Thanks >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> From bakkari.abdelkhalek at hotmail.fr Wed Jul 6 11:11:35 2016 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Wed, 6 Jul 2016 16:11:35 +0100 Subject: [ITK-users] Manual 3d image segmentation using itk Message-ID: Hi, I would like to ask if you could help me with a code source related to Manual interactive 3d image segmentation using itk as described in the video below : https://www.youtube.com/watch?v=7wCC2NaVLjs Thank you in advance. 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 zivrafael.yaniv at nih.gov Wed Jul 6 11:23:37 2016 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Wed, 6 Jul 2016 15:23:37 +0000 Subject: [ITK-users] R-SimpleITK memory management In-Reply-To: References: Message-ID: Hi Mathew, Can you provide a concise example so that we can recreate the problem? I tried the trivial thing with the code we were previously discussing, just repeatedly running it in a loop and the memory useage is as expected, doesn?t change after initial run, code below: library(SimpleITK) library(pryr) for(i in 1:100) { print(mem_used()) image <- ReadImage("training_001_ct.mha") segmented_image <- image>700 segmented_label <- 1 lisf <- LabelIntensityStatisticsImageFilter() invisible(lisf$Execute(segmented_image, image)) print(mem_used()) } When I ran this in R studio the memory usage was higher, but still consistent. Apparently R studio also keeps a reference to every object created on the command line (Hadly Wickham?s book on Advanced R, memory management http://adv-r.had.co.nz/memory.html). Ziv On 7/6/16, 9:55 AM, "Mathew Guilfoyle" wrote: >I'm processing a large number of CT scans using R wrapped SimpleITK >(some filtering and then registration before a segmentation). I'm >running R within RStudio on OS X 10.11 > >I'm running into memory problems with long processing runs. Though in >the R loops I reassign new images to the same R variable the >underlying C++ objects do not seem to get deleted but accumulate on >each loop - I can see steadily rising memory usage in Activity Monitor >until R/RStudio crashes. I have tried explicitly deleting the >temporary images during each loop and calling the R garbage collector >(gc()), but it doesn't seem to have an effect. If I restart the R >session then the memory is cleared. > >My understanding was that the C++ objects would get garbage collected >once all pointers are removed but this doesn't seem to happen. Is >there a method to explicitly delete the C++ image objects so I can >manage the memory usage myself? > >Cheers >_____________________________________ >Powered by www.kitware.com > >Visit other Kitware open-source projects at >http://www.kitware.com/opensource/opensource.html > >Kitware offers ITK Training Courses, for more information visit: >http://www.kitware.com/products/protraining.php > >Please keep messages on-topic and check the ITK FAQ at: >http://www.itk.org/Wiki/ITK_FAQ > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Wed Jul 6 11:42:51 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 6 Jul 2016 11:42:51 -0400 Subject: [ITK-users] [ITK] Manual 3d image segmentation using itk In-Reply-To: References: Message-ID: Hi, You may want to investigate the open source, ITK-based ITK-SNAP project, which has similiar functionality. HTH, Matt On Wed, Jul 6, 2016 at 11:11 AM, Abdelkhalek Bakkari < bakkari.abdelkhalek at hotmail.fr> wrote: > Hi, > > I would like to ask if you could help me with a code source related > to Manual interactive 3d image segmentation using itk as described in the > video below : > https://www.youtube.com/watch?v=7wCC2NaVLjs > > Thank 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 dzenanz at gmail.com Wed Jul 6 14:34:29 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 6 Jul 2016 14:34:29 -0400 Subject: [ITK-users] [ITK] Manual 3d image segmentation using itk In-Reply-To: References: Message-ID: Hi Abdelkhalek, Slicer 's editor module has a graph-cut "effect" which is quite similar to what the video shows. Regards, D?enan On Wed, Jul 6, 2016 at 11:42 AM, Matt McCormick wrote: > Hi, > > You may want to investigate the open source, ITK-based ITK-SNAP project, > which has similiar functionality. > > HTH, > Matt > > On Wed, Jul 6, 2016 at 11:11 AM, Abdelkhalek Bakkari < > bakkari.abdelkhalek at hotmail.fr> wrote: > >> Hi, >> >> I would like to ask if you could help me with a code source related >> to Manual interactive 3d image segmentation using itk as described in the >> video below : >> https://www.youtube.com/watch?v=7wCC2NaVLjs >> >> Thank 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 >> >> > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From piotpia124 at student.polsl.pl Thu Jul 7 08:35:12 2016 From: piotpia124 at student.polsl.pl (Piotr Piasecki) Date: Thu, 7 Jul 2016 14:35:12 +0200 Subject: [ITK-users] Lost Patient, Study and Series DICOM tags In-Reply-To: References: <950a17346e556728857382ebf5cb79e4@poczta.student.polsl.pl> Message-ID: Hi D?enan, thank you for your help and for this example. Unfortunately, I have not found method GetMetaDataDictionary() in SimpleITK in C# (I found only GetMetaDataKeys() and GetMetaData(string key)). Also, I have not found a method SetMetaDataDictionary or any other that allows me to assign DICOM tags. My short piece of code looks like this: static public void ReadImage() { sitk.ImageFileReader reader = new sitk.ImageFileReader(); reader.SetFileName(@".\DICOM_TEST\original.dcm"); var image = reader.Execute(); sitk.ImageFileWriter writer = new sitk.ImageFileWriter(); writer.SetFileName(@".\DICOM_TEST\modified.dcm"); writer.Execute(image); } Another problem is that your example describes only loading and saving a single .dcm file. What if I have to process a whole series of files using sitk.ImageSeriesReader and sitk.ImageSeriesWriter? Regards, Peter. 2016-07-05 15:45 GMT+02:00 D?enan Zuki? : > Hi Piotr, > > if you want to carry over metadata from input image to output image, you > should save the metadata dictionary in a way similar to this: > > itk::MetaDataDictionary metadata; > > template< typename TImage > > itk::SmartPointer readImage(std::string fileName) > { > typedef itk::ImageFileReader ReaderType; > typename ReaderType::Pointer reader = ReaderType::New(); > reader->SetFileName(fileName.c_str()); > try > { > reader->Update(); > metadata = reader->GetMetaDataDictionary(); > return reader->GetOutput(); > } > catch (itk::ExceptionObject & error) > { > std::cerr << "Error: " << error << std::endl; > return NULL; > } > } > > template< typename TImage > > void writeImage(itk::SmartPointer image, std::string fileName) > { > image->SetMetaDataDictionary(metadata); //full metadata > typedef itk::ImageFileWriter WriterType; > typename WriterType::Pointer writer = WriterType::New(); > writer->SetFileName(fileName.c_str()); > writer->SetInput(image); > try > { > writer->Update(); > } > catch (itk::ExceptionObject & error) > { > std::cerr << "Error: " << error << std::endl; > } > } > > On Tue, Jul 5, 2016 at 2:46 AM, Piotr Piasecki < > piotpia124 at student.polsl.pl> wrote: > >> Dear Sir or Madam. >> >> I am a student in Biomedical Engineering at the Silesian University of >> Technology. During my studies I worked with ITK and SimpleITK in C#. I want >> to use them in my current project, but I have an important question. After >> loading and processing a series of .dcm files I lost information about the >> patient and study to which they belong, and that they belong to one series. >> How can I keep this information? >> >> I will be very grateful for any answer. >> >> Best regards. >> >> Peter. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Thu Jul 7 08:45:27 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 7 Jul 2016 08:45:27 -0400 Subject: [ITK-users] Lost Patient, Study and Series DICOM tags In-Reply-To: References: <950a17346e556728857382ebf5cb79e4@poczta.student.polsl.pl> Message-ID: Hi Piotr, instead of ImageReader->GetMetaDataDictionary() call ImageSeriesReader->GetMetaDataDictionary(). Also, the image format you are writing to needs to be able to support metadata (e.g. .mha, .nrrd, DICOM), otherwise the metadata is lost (.nii, .jpg, .bmp etc). But for writing DICOM, the process might be somewhat different from what I described in the first email. Definitely different if you want metadata copied slice for slice from input to output - in this case some metadata needs to be changed anyway, such as flag that this is a derived image and not an original image coming out of a scanner. I suppose that MetaDataDictionary class is not wrapped. You can then loop through all the keys and copy them and their content one by one. Regards On Thu, Jul 7, 2016 at 8:35 AM, Piotr Piasecki wrote: > Hi D?enan, > > thank you for your help and for this example. Unfortunately, I have not > found method GetMetaDataDictionary() in SimpleITK in C# (I found only > GetMetaDataKeys() and GetMetaData(string key)). Also, I have not found a > method SetMetaDataDictionary or any other that allows me to assign DICOM > tags. > > My short piece of code looks like this: > > static public void ReadImage() > { > sitk.ImageFileReader reader = new sitk.ImageFileReader(); > reader.SetFileName(@".\DICOM_TEST\original.dcm"); > var image = reader.Execute(); > > sitk.ImageFileWriter writer = new sitk.ImageFileWriter(); > writer.SetFileName(@".\DICOM_TEST\modified.dcm"); > writer.Execute(image); > } > > Another problem is that your example describes only loading and saving a > single .dcm file. What if I have to process a whole series of files using > sitk.ImageSeriesReader and sitk.ImageSeriesWriter? > > Regards, > > Peter. > > 2016-07-05 15:45 GMT+02:00 D?enan Zuki? : > >> Hi Piotr, >> >> if you want to carry over metadata from input image to output image, you >> should save the metadata dictionary in a way similar to this: >> >> itk::MetaDataDictionary metadata; >> >> template< typename TImage > >> itk::SmartPointer readImage(std::string fileName) >> { >> typedef itk::ImageFileReader ReaderType; >> typename ReaderType::Pointer reader = ReaderType::New(); >> reader->SetFileName(fileName.c_str()); >> try >> { >> reader->Update(); >> metadata = reader->GetMetaDataDictionary(); >> return reader->GetOutput(); >> } >> catch (itk::ExceptionObject & error) >> { >> std::cerr << "Error: " << error << std::endl; >> return NULL; >> } >> } >> >> template< typename TImage > >> void writeImage(itk::SmartPointer image, std::string fileName) >> { >> image->SetMetaDataDictionary(metadata); //full metadata >> typedef itk::ImageFileWriter WriterType; >> typename WriterType::Pointer writer = WriterType::New(); >> writer->SetFileName(fileName.c_str()); >> writer->SetInput(image); >> try >> { >> writer->Update(); >> } >> catch (itk::ExceptionObject & error) >> { >> std::cerr << "Error: " << error << std::endl; >> } >> } >> >> On Tue, Jul 5, 2016 at 2:46 AM, Piotr Piasecki < >> piotpia124 at student.polsl.pl> wrote: >> >>> Dear Sir or Madam. >>> >>> I am a student in Biomedical Engineering at the Silesian University of >>> Technology. During my studies I worked with ITK and SimpleITK in C#. I want >>> to use them in my current project, but I have an important question. After >>> loading and processing a series of .dcm files I lost information about the >>> patient and study to which they belong, and that they belong to one series. >>> How can I keep this information? >>> >>> I will be very grateful for any answer. >>> >>> Best regards. >>> >>> Peter. >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Jul 7 09:49:20 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 7 Jul 2016 09:49:20 -0400 Subject: [ITK-users] Build errors in python wrapping of 4.10.0 In-Reply-To: References: <45356B32-0D4F-4FE9-9157-630919E381EA@uiowa.edu> Message-ID: Following up, this issue was addressed in this patch: http://review.source.kitware.com/#/c/21311/ which will be included in the 4.10.1 release. On Thu, Jun 30, 2016 at 11:55 AM, Christopher Mullins wrote: > Hi all, > > Thanks for the help on this. I've been traveling and haven't had much time > to investigate, but I believe Michka is correct. It looks like the build is > successful with the -std=c++98 flag, and only one test fails [1]. I'll test > the python wrapping and report back if anything terrible happens -- if not > I'll bump the AUR PKGBUILD. Thanks again, > > Chris > > [1] https://open.cdash.org/buildSummary.php?buildid=4435570 > > On Wed, Jun 15, 2016 at 5:22 PM, Johnson, Hans J > wrote: >> >> I?m trying to reproduce now. >> >> Hans >> >> >> -- >> >> >> On 6/15/16, 4:12 PM, "Insight-users on behalf of Michka Popoff" >> wrote: >> >> >Hi >> > >> >I think this bug is not known. I had a look and could reproduce it with >> > gcc 6.0.0, Cmake 3.5.2, Python 3.5.1 on OS X. >> >GCC 6 is using c++14 by default, but even with c++11 you would probably >> > get the problem. >> >The problem is also there with the latest commit from the master branch. >> > >> >Please note that we probably never tested Python Wrappings with c++11, >> > even not speaking of c++14. >> > >> >The problem seems to have appeared with this patch: >> >> > >https://github.com/InsightSoftwareConsortium/ITK/commit/b6b9a8e8849da1edbf75f88e11adb8d8d15bb395 >> > >> >I removed the ITK_DELETE_FUNCTION macro from the itkTriangleHelper copy >> > constructor, and was able to compile >> >with gcc 6. But it may just a side effect of that patch which is now only >> > appearing with c++ >= 11. >> >It is weird that the problem seems to be only for the itkTriangleHelper >> > class. >> > >> >I will have to look what is the difference in the files generated for >> > swig and what is exactly failing, >> >though I do not know how long it will take me. I hope I can do this this >> > weekend. >> > >> >Thanks >> > >> >Michka >> > >> > >> >> On 09 Jun 2016, at 16:14, Christopher Mullins >> >> wrote: >> >> >> >> Hi all, >> >> >> >> Apparently my subscription to this list has lapsed and my first email >> >> was rejected (despite receiving the list in my inbox every day). Sorry if >> >> there's a double post. >> >> >> >> I'm getting the following build errors when building ITK 4.10.0 with >> >> the WRAP_PYTHON option ON[1], [3]. Is this a known issue, or is there a >> >> configuration setting I've set improperly? >> >> >> >> Platform is Arch linux, GCC v6.1.1, Python v3.5.1, CMake v3.5.2. There >> >> are no warnings. See all output details for this machine here [2], and >> >> please let me know if I can provide any others. >> >> >> >> The faster I fix this the faster I'll feel comfortable updating the >> >> Arch linux AUR PKGBUILD for ITK, so I appreciate any help you can offer. >> >> >> >> Thanks, >> >> Chris >> >> >> >> >> >> >> >> [1] https://open.cdash.org/viewBuildError.php?buildid=4403379 >> >> [2] https://open.cdash.org/buildSummary.php?buildid=4403379 >> >> >> >> [3] To save you a click, and for the sake of archiving, the error is: >> >> >> >> /home/chris/projects/MyTests/ITK-build/Wrapping/Modules/ITKCommon/itkTriangleHelperPython.cpp: >> >> In function 'PyObject* _wrap_new_itkTriangleHelperPD2(PyObject*, >> >> PyObject*)': >> >> /home/chris/projects/MyTests/ITK-build/Wrapping/Modules/ITKCommon/itkTriangleHelperPython.cpp:5854:65: >> >> error: no matching function for call to >> >> 'itk::TriangleHelper >::TriangleHelper()' result = >> >> (itkTriangleHelperPD2 *)new itkTriangleHelperPD2(); >> >> _____________________________________ >> >> Powered by www.kitware.com >> >> >> >> Visit other Kitware open-source projects at >> >> http://www.kitware.com/opensource/opensource.html >> >> >> >> Kitware offers ITK Training Courses, for more information visit: >> >> http://www.kitware.com/products/protraining.php >> >> >> >> Please keep messages on-topic and check the ITK FAQ at: >> >> http://www.itk.org/Wiki/ITK_FAQ >> >> >> >> Follow this link to subscribe/unsubscribe: >> >> http://public.kitware.com/mailman/listinfo/insight-users >> > >> >_____________________________________ >> >Powered by www.kitware.com >> > >> >Visit other Kitware open-source projects at >> >http://www.kitware.com/opensource/opensource.html >> > >> >Kitware offers ITK Training Courses, for more information visit: >> >http://www.kitware.com/products/protraining.php >> > >> >Please keep messages on-topic and check the ITK FAQ at: >> >http://www.itk.org/Wiki/ITK_FAQ >> > >> >Follow this link to subscribe/unsubscribe: >> >http://public.kitware.com/mailman/listinfo/insight-users >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From piotpia124 at student.polsl.pl Thu Jul 7 09:49:56 2016 From: piotpia124 at student.polsl.pl (Piotr Piasecki) Date: Thu, 7 Jul 2016 15:49:56 +0200 Subject: [ITK-users] Lost Patient, Study and Series DICOM tags In-Reply-To: References: <950a17346e556728857382ebf5cb79e4@poczta.student.polsl.pl> Message-ID: Hello Again I found the information, that in SimpleITK the MetaDataDictionary interface is only part of the Image class. Currently it provides a read only interface, with the GetMetaDataKeys(), and GetMetaData(key) methods. This get method only returns the type of data in the dictionary converted to a string. The required method would be Image::SetMetaData(key,value). But unfortunately I do not see this method, so I think that this is still not implemented. The only what I need is to keep information that my files belong to one series of images, which belongs to one patient and study ( not necessarily the same study or series as the original). Regards. Peter. 2016-07-07 14:45 GMT+02:00 D?enan Zuki? : > Hi Piotr, > > instead of ImageReader->GetMetaDataDictionary() call > ImageSeriesReader->GetMetaDataDictionary(). Also, the image format you are > writing to needs to be able to support metadata (e.g. .mha, .nrrd, DICOM), > otherwise the metadata is lost (.nii, .jpg, .bmp etc). > > But for writing DICOM, the process might be somewhat different from what I > described in the first email. Definitely different if you want metadata > copied slice for slice from input to output - in this case some metadata > needs to be changed anyway, such as flag that this is a derived image and > not an original image coming out of a scanner. > > I suppose that MetaDataDictionary class is not wrapped. You can then loop > through all the keys and copy them and their content one by one. > > Regards > > On Thu, Jul 7, 2016 at 8:35 AM, Piotr Piasecki < > piotpia124 at student.polsl.pl> wrote: > >> Hi D?enan, >> >> thank you for your help and for this example. Unfortunately, I have not >> found method GetMetaDataDictionary() in SimpleITK in C# (I found only >> GetMetaDataKeys() and GetMetaData(string key)). Also, I have not found a >> method SetMetaDataDictionary or any other that allows me to assign DICOM >> tags. >> >> My short piece of code looks like this: >> >> static public void ReadImage() >> { >> sitk.ImageFileReader reader = new sitk.ImageFileReader(); >> reader.SetFileName(@".\DICOM_TEST\original.dcm"); >> var image = reader.Execute(); >> >> sitk.ImageFileWriter writer = new sitk.ImageFileWriter(); >> writer.SetFileName(@".\DICOM_TEST\modified.dcm"); >> writer.Execute(image); >> } >> >> Another problem is that your example describes only loading and saving a >> single .dcm file. What if I have to process a whole series of files >> using sitk.ImageSeriesReader and sitk.ImageSeriesWriter? >> >> Regards, >> >> Peter. >> >> 2016-07-05 15:45 GMT+02:00 D?enan Zuki? : >> >>> Hi Piotr, >>> >>> if you want to carry over metadata from input image to output image, you >>> should save the metadata dictionary in a way similar to this: >>> >>> itk::MetaDataDictionary metadata; >>> >>> template< typename TImage > >>> itk::SmartPointer readImage(std::string fileName) >>> { >>> typedef itk::ImageFileReader ReaderType; >>> typename ReaderType::Pointer reader = ReaderType::New(); >>> reader->SetFileName(fileName.c_str()); >>> try >>> { >>> reader->Update(); >>> metadata = reader->GetMetaDataDictionary(); >>> return reader->GetOutput(); >>> } >>> catch (itk::ExceptionObject & error) >>> { >>> std::cerr << "Error: " << error << std::endl; >>> return NULL; >>> } >>> } >>> >>> template< typename TImage > >>> void writeImage(itk::SmartPointer image, std::string fileName) >>> { >>> image->SetMetaDataDictionary(metadata); //full metadata >>> typedef itk::ImageFileWriter WriterType; >>> typename WriterType::Pointer writer = WriterType::New(); >>> writer->SetFileName(fileName.c_str()); >>> writer->SetInput(image); >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject & error) >>> { >>> std::cerr << "Error: " << error << std::endl; >>> } >>> } >>> >>> On Tue, Jul 5, 2016 at 2:46 AM, Piotr Piasecki < >>> piotpia124 at student.polsl.pl> wrote: >>> >>>> Dear Sir or Madam. >>>> >>>> I am a student in Biomedical Engineering at the Silesian University of >>>> Technology. During my studies I worked with ITK and SimpleITK in C#. I want >>>> to use them in my current project, but I have an important question. After >>>> loading and processing a series of .dcm files I lost information about the >>>> patient and study to which they belong, and that they belong to one series. >>>> How can I keep this information? >>>> >>>> I will be very grateful for any answer. >>>> >>>> Best regards. >>>> >>>> Peter. >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Thu Jul 7 10:11:21 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 7 Jul 2016 10:11:21 -0400 Subject: [ITK-users] Lost Patient, Study and Series DICOM tags In-Reply-To: References: <950a17346e556728857382ebf5cb79e4@poczta.student.polsl.pl> Message-ID: If SimpleITK does not provide write access to meta-data dictionary, you can indicate patient, study and series in the filename by specially formatting it. Hopefully Brad can provide more useful advice. Regards On Thu, Jul 7, 2016 at 9:49 AM, Piotr Piasecki wrote: > Hello Again > > I found the information, that in SimpleITK the MetaDataDictionary > interface is only part of the Image class. Currently it provides a read > only interface, with the GetMetaDataKeys(), and GetMetaData(key) methods. > This get method only returns the type of data in the dictionary converted > to a string. > > The required method would be Image::SetMetaData(key,value). But > unfortunately I do not see this method, so I think that this is still not > implemented. The only what I need is to keep information that my files > belong to one series of images, which belongs to one patient and study ( > not necessarily the same study or series as the original). > > Regards. > > Peter. > > > > 2016-07-07 14:45 GMT+02:00 D?enan Zuki? : > >> Hi Piotr, >> >> instead of ImageReader->GetMetaDataDictionary() call >> ImageSeriesReader->GetMetaDataDictionary(). Also, the image format you are >> writing to needs to be able to support metadata (e.g. .mha, .nrrd, DICOM), >> otherwise the metadata is lost (.nii, .jpg, .bmp etc). >> >> But for writing DICOM, the process might be somewhat different from what >> I described in the first email. Definitely different if you want metadata >> copied slice for slice from input to output - in this case some metadata >> needs to be changed anyway, such as flag that this is a derived image and >> not an original image coming out of a scanner. >> >> I suppose that MetaDataDictionary class is not wrapped. You can then loop >> through all the keys and copy them and their content one by one. >> >> Regards >> >> On Thu, Jul 7, 2016 at 8:35 AM, Piotr Piasecki < >> piotpia124 at student.polsl.pl> wrote: >> >>> Hi D?enan, >>> >>> thank you for your help and for this example. Unfortunately, I have not >>> found method GetMetaDataDictionary() in SimpleITK in C# (I found only >>> GetMetaDataKeys() and GetMetaData(string key)). Also, I have not found a >>> method SetMetaDataDictionary or any other that allows me to assign DICOM >>> tags. >>> >>> My short piece of code looks like this: >>> >>> static public void ReadImage() >>> { >>> sitk.ImageFileReader reader = new sitk.ImageFileReader(); >>> reader.SetFileName(@".\DICOM_TEST\original.dcm"); >>> var image = reader.Execute(); >>> >>> sitk.ImageFileWriter writer = new sitk.ImageFileWriter(); >>> writer.SetFileName(@".\DICOM_TEST\modified.dcm"); >>> writer.Execute(image); >>> } >>> >>> Another problem is that your example describes only loading and saving a >>> single .dcm file. What if I have to process a whole series of files >>> using sitk.ImageSeriesReader and sitk.ImageSeriesWriter? >>> >>> Regards, >>> >>> Peter. >>> >>> 2016-07-05 15:45 GMT+02:00 D?enan Zuki? : >>> >>>> Hi Piotr, >>>> >>>> if you want to carry over metadata from input image to output image, >>>> you should save the metadata dictionary in a way similar to this: >>>> >>>> itk::MetaDataDictionary metadata; >>>> >>>> template< typename TImage > >>>> itk::SmartPointer readImage(std::string fileName) >>>> { >>>> typedef itk::ImageFileReader ReaderType; >>>> typename ReaderType::Pointer reader = ReaderType::New(); >>>> reader->SetFileName(fileName.c_str()); >>>> try >>>> { >>>> reader->Update(); >>>> metadata = reader->GetMetaDataDictionary(); >>>> return reader->GetOutput(); >>>> } >>>> catch (itk::ExceptionObject & error) >>>> { >>>> std::cerr << "Error: " << error << std::endl; >>>> return NULL; >>>> } >>>> } >>>> >>>> template< typename TImage > >>>> void writeImage(itk::SmartPointer image, std::string fileName) >>>> { >>>> image->SetMetaDataDictionary(metadata); //full metadata >>>> typedef itk::ImageFileWriter WriterType; >>>> typename WriterType::Pointer writer = WriterType::New(); >>>> writer->SetFileName(fileName.c_str()); >>>> writer->SetInput(image); >>>> try >>>> { >>>> writer->Update(); >>>> } >>>> catch (itk::ExceptionObject & error) >>>> { >>>> std::cerr << "Error: " << error << std::endl; >>>> } >>>> } >>>> >>>> On Tue, Jul 5, 2016 at 2:46 AM, Piotr Piasecki < >>>> piotpia124 at student.polsl.pl> wrote: >>>> >>>>> Dear Sir or Madam. >>>>> >>>>> I am a student in Biomedical Engineering at the Silesian University of >>>>> Technology. During my studies I worked with ITK and SimpleITK in C#. I want >>>>> to use them in my current project, but I have an important question. After >>>>> loading and processing a series of .dcm files I lost information about the >>>>> patient and study to which they belong, and that they belong to one series. >>>>> How can I keep this information? >>>>> >>>>> I will be very grateful for any answer. >>>>> >>>>> Best regards. >>>>> >>>>> Peter. >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopherrmullins at gmail.com Thu Jul 7 10:38:10 2016 From: christopherrmullins at gmail.com (Christopher Mullins) Date: Thu, 7 Jul 2016 10:38:10 -0400 Subject: [ITK-users] Build errors in python wrapping of 4.10.0 In-Reply-To: References: <45356B32-0D4F-4FE9-9157-630919E381EA@uiowa.edu> Message-ID: Thank you very much! Chris On Thu, Jul 7, 2016 at 9:49 AM, Matt McCormick wrote: > Following up, this issue was addressed in this patch: > > http://review.source.kitware.com/#/c/21311/ > > which will be included in the 4.10.1 release. > > On Thu, Jun 30, 2016 at 11:55 AM, Christopher Mullins > wrote: > > Hi all, > > > > Thanks for the help on this. I've been traveling and haven't had much > time > > to investigate, but I believe Michka is correct. It looks like the > build is > > successful with the -std=c++98 flag, and only one test fails [1]. I'll > test > > the python wrapping and report back if anything terrible happens -- if > not > > I'll bump the AUR PKGBUILD. Thanks again, > > > > Chris > > > > [1] https://open.cdash.org/buildSummary.php?buildid=4435570 > > > > On Wed, Jun 15, 2016 at 5:22 PM, Johnson, Hans J > > > wrote: > >> > >> I?m trying to reproduce now. > >> > >> Hans > >> > >> > >> -- > >> > >> > >> On 6/15/16, 4:12 PM, "Insight-users on behalf of Michka Popoff" > >> > wrote: > >> > >> >Hi > >> > > >> >I think this bug is not known. I had a look and could reproduce it with > >> > gcc 6.0.0, Cmake 3.5.2, Python 3.5.1 on OS X. > >> >GCC 6 is using c++14 by default, but even with c++11 you would probably > >> > get the problem. > >> >The problem is also there with the latest commit from the master > branch. > >> > > >> >Please note that we probably never tested Python Wrappings with c++11, > >> > even not speaking of c++14. > >> > > >> >The problem seems to have appeared with this patch: > >> > >> > > > https://github.com/InsightSoftwareConsortium/ITK/commit/b6b9a8e8849da1edbf75f88e11adb8d8d15bb395 > >> > > >> >I removed the ITK_DELETE_FUNCTION macro from the itkTriangleHelper copy > >> > constructor, and was able to compile > >> >with gcc 6. But it may just a side effect of that patch which is now > only > >> > appearing with c++ >= 11. > >> >It is weird that the problem seems to be only for the itkTriangleHelper > >> > class. > >> > > >> >I will have to look what is the difference in the files generated for > >> > swig and what is exactly failing, > >> >though I do not know how long it will take me. I hope I can do this > this > >> > weekend. > >> > > >> >Thanks > >> > > >> >Michka > >> > > >> > > >> >> On 09 Jun 2016, at 16:14, Christopher Mullins > >> >> wrote: > >> >> > >> >> Hi all, > >> >> > >> >> Apparently my subscription to this list has lapsed and my first email > >> >> was rejected (despite receiving the list in my inbox every day). > Sorry if > >> >> there's a double post. > >> >> > >> >> I'm getting the following build errors when building ITK 4.10.0 with > >> >> the WRAP_PYTHON option ON[1], [3]. Is this a known issue, or is > there a > >> >> configuration setting I've set improperly? > >> >> > >> >> Platform is Arch linux, GCC v6.1.1, Python v3.5.1, CMake v3.5.2. > There > >> >> are no warnings. See all output details for this machine here [2], > and > >> >> please let me know if I can provide any others. > >> >> > >> >> The faster I fix this the faster I'll feel comfortable updating the > >> >> Arch linux AUR PKGBUILD for ITK, so I appreciate any help you can > offer. > >> >> > >> >> Thanks, > >> >> Chris > >> >> > >> >> > >> >> > >> >> [1] https://open.cdash.org/viewBuildError.php?buildid=4403379 > >> >> [2] https://open.cdash.org/buildSummary.php?buildid=4403379 > >> >> > >> >> [3] To save you a click, and for the sake of archiving, the error is: > >> >> > >> >> > /home/chris/projects/MyTests/ITK-build/Wrapping/Modules/ITKCommon/itkTriangleHelperPython.cpp: > >> >> In function 'PyObject* _wrap_new_itkTriangleHelperPD2(PyObject*, > >> >> PyObject*)': > >> >> > /home/chris/projects/MyTests/ITK-build/Wrapping/Modules/ITKCommon/itkTriangleHelperPython.cpp:5854:65: > >> >> error: no matching function for call to > >> >> 'itk::TriangleHelper >::TriangleHelper()' > result = > >> >> (itkTriangleHelperPD2 *)new itkTriangleHelperPD2(); > >> >> _____________________________________ > >> >> Powered by www.kitware.com > >> >> > >> >> Visit other Kitware open-source projects at > >> >> http://www.kitware.com/opensource/opensource.html > >> >> > >> >> Kitware offers ITK Training Courses, for more information visit: > >> >> http://www.kitware.com/products/protraining.php > >> >> > >> >> Please keep messages on-topic and check the ITK FAQ at: > >> >> http://www.itk.org/Wiki/ITK_FAQ > >> >> > >> >> Follow this link to subscribe/unsubscribe: > >> >> http://public.kitware.com/mailman/listinfo/insight-users > >> > > >> >_____________________________________ > >> >Powered by www.kitware.com > >> > > >> >Visit other Kitware open-source projects at > >> >http://www.kitware.com/opensource/opensource.html > >> > > >> >Kitware offers ITK Training Courses, for more information visit: > >> >http://www.kitware.com/products/protraining.php > >> > > >> >Please keep messages on-topic and check the ITK FAQ at: > >> >http://www.itk.org/Wiki/ITK_FAQ > >> > > >> >Follow this link to subscribe/unsubscribe: > >> >http://public.kitware.com/mailman/listinfo/insight-users > >> > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zivrafael.yaniv at nih.gov Thu Jul 7 10:43:39 2016 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Thu, 7 Jul 2016 14:43:39 +0000 Subject: [ITK-users] Lost Patient, Study and Series DICOM tags In-Reply-To: References: <950a17346e556728857382ebf5cb79e4@poczta.student.polsl.pl> Message-ID: Hello Peter, We are actually working on adding the set method for the upcoming release, which will be out shortly. One issue that we do want to point out, which likely you are aware of but just in case, you have to indicate in the Image Type tag ( (0008,0008) that this is a derived image. Please see the DICOM standard (http://dicom.nema.org/medical/dicom/current/output/pdf/part03.pdf), section C.7.6.1.1.2 for the details. regards Ziv From: Piotr Piasecki > Date: Thursday, July 7, 2016 at 9:49 AM To: D?enan Zuki? >, Bradley Lowekamp >, "insight-users at itk.org" > Subject: Re: [ITK-users] Lost Patient, Study and Series DICOM tags Hello Again I found the information, that in SimpleITK the MetaDataDictionary interface is only part of the Image class. Currently it provides a read only interface, with the GetMetaDataKeys(), and GetMetaData(key) methods. This get method only returns the type of data in the dictionary converted to a string. The required method would be Image::SetMetaData(key,value). But unfortunately I do not see this method, so I think that this is still not implemented. The only what I need is to keep information that my files belong to one series of images, which belongs to one patient and study ( not necessarily the same study or series as the original). Regards. Peter. 2016-07-07 14:45 GMT+02:00 D?enan Zuki? >: Hi Piotr, instead of ImageReader->GetMetaDataDictionary() call ImageSeriesReader->GetMetaDataDictionary(). Also, the image format you are writing to needs to be able to support metadata (e.g. .mha, .nrrd, DICOM), otherwise the metadata is lost (.nii, .jpg, .bmp etc). But for writing DICOM, the process might be somewhat different from what I described in the first email. Definitely different if you want metadata copied slice for slice from input to output - in this case some metadata needs to be changed anyway, such as flag that this is a derived image and not an original image coming out of a scanner. I suppose that MetaDataDictionary class is not wrapped. You can then loop through all the keys and copy them and their content one by one. Regards On Thu, Jul 7, 2016 at 8:35 AM, Piotr Piasecki > wrote: Hi D?enan, thank you for your help and for this example. Unfortunately, I have not found method GetMetaDataDictionary() in SimpleITK in C# (I found only GetMetaDataKeys() and GetMetaData(string key)). Also, I have not found a method SetMetaDataDictionary or any other that allows me to assign DICOM tags. My short piece of code looks like this: static public void ReadImage() { sitk.ImageFileReader reader = new sitk.ImageFileReader(); reader.SetFileName(@".\DICOM_TEST\original.dcm"); var image = reader.Execute(); sitk.ImageFileWriter writer = new sitk.ImageFileWriter(); writer.SetFileName(@".\DICOM_TEST\modified.dcm"); writer.Execute(image); } Another problem is that your example describesonly loading and saving a single .dcm file.What if I have to process a whole series of files using sitk.ImageSeriesReader and sitk.ImageSeriesWriter? Regards, Peter. 2016-07-05 15:45 GMT+02:00 D?enan Zuki? >: Hi Piotr, if you want to carry over metadata from input image to output image, you should save the metadata dictionary in a way similar to this: itk::MetaDataDictionary metadata; template< typename TImage > itk::SmartPointer readImage(std::string fileName) { typedef itk::ImageFileReader ReaderType; typename ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(fileName.c_str()); try { reader->Update(); metadata = reader->GetMetaDataDictionary(); return reader->GetOutput(); } catch (itk::ExceptionObject & error) { std::cerr << "Error: " << error << std::endl; return NULL; } } template< typename TImage > void writeImage(itk::SmartPointer image, std::string fileName) { image->SetMetaDataDictionary(metadata); //full metadata typedef itk::ImageFileWriter WriterType; typename WriterType::Pointer writer = WriterType::New(); writer->SetFileName(fileName.c_str()); writer->SetInput(image); try { writer->Update(); } catch (itk::ExceptionObject & error) { std::cerr << "Error: " << error << std::endl; } } On Tue, Jul 5, 2016 at 2:46 AM, Piotr Piasecki > wrote: Dear Sir or Madam. I am a student in Biomedical Engineering at the Silesian University of Technology. During my studies I worked with ITK and SimpleITK in C#. I want to use them in my current project, but I have an important question. After loading and processing a series of .dcm files I lost information about the patient and study to which they belong, and that they belong to one series. How can I keep this information? I will be very grateful for any answer. Best regards. Peter. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From piotpia124 at student.polsl.pl Fri Jul 8 14:41:45 2016 From: piotpia124 at student.polsl.pl (Piotr Piasecki) Date: Fri, 8 Jul 2016 20:41:45 +0200 Subject: [ITK-users] Lost Patient, Study and Series DICOM tags In-Reply-To: References: <950a17346e556728857382ebf5cb79e4@poczta.student.polsl.pl> Message-ID: I know that GDCM library (or its elements) is used in some cases in ITK. If SimpleITK does not provide write access to dicom tags whether is it possible to use GDCM wrapped in C# to do this? I can imagine a scenario in which I'll use SimpleITK to process image, and GDCM to replace specified tags. Is it possible? If so, I would ask for help person skilled in using GDCM in C#. Are there any examples of how to do such a thing? -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad at lowekamp.net Fri Jul 8 14:53:03 2016 From: brad at lowekamp.net (Bradley Lowekamp) Date: Fri, 8 Jul 2016 14:53:03 -0400 Subject: [ITK-users] Lost Patient, Study and Series DICOM tags In-Reply-To: References: <950a17346e556728857382ebf5cb79e4@poczta.student.polsl.pl> Message-ID: <7E31C0B1-801D-4BC6-AFA5-AAAB36EDA3B9@lowekamp.net> Hello, We have just merged the topic which adds the ?SetMetaData? method to the SimpleITK Image interface into the ?next? development branch of SimpleITK [1]. We expect for this to shortly be merged into the master branch after nightly testing. We are also creating an example which uses it for writing a modified DICOM file. There should be nightly binaries that follow shortly there after for CSharp [2]. This may meet your needs. Directly using GDCM is a sensible way to go for more control over DICOM IO. I have not done what you propose, but I expect it is possible. You would likely need some lower level buffer access as is done here[3]. HTH, Brad [1] https://github.com/SimpleITK/SimpleITK/commit/69865add060e87c175c7f212c7bdddab11e127ab [2] https://itk.org/Wiki/SimpleITK/GettingStarted#Nightly_binaries [3] https://itk.org/SimpleITKDoxygen/html/CSharp_2ImageGetBuffer_8cs-example.html > On Jul 8, 2016, at 2:41 PM, Piotr Piasecki wrote: > > I know that GDCM library (or its elements) is used in some cases in ITK. If SimpleITK does not provide write access to dicom tags whether is it possible to use GDCM wrapped in C# to do this? I can imagine a scenario in which I'll use SimpleITK to process image, and GDCM to replace specified tags. > > Is it possible? If so, I would ask for help person skilled in using GDCM in C#. Are there any examples of how to do such a thing? > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From sami.koho at gmail.com Tue Jul 12 05:29:34 2016 From: sami.koho at gmail.com (Sami Koho) Date: Tue, 12 Jul 2016 12:29:34 +0300 Subject: [ITK-users] SimpleITK landmark based initialisation (and image visualisation) Message-ID: <21BECCEC-1354-4E9A-B08F-D36BFE535407@gmail.com> Hi, I was thinking of adding a manual landmark based initialisation to my image registration method, as the automatic initialiser does not reliably work in my current application. I?m registering correlative microscopy images with very large shift and rotation between moving and fixed images ? usually the moving image also covers only a small part of the area shown in the fixed image. By specifying the initial offset and rotation manually, registration works nicely, but this is a bit cumbersome, because I have to figure out the approximate offsets first. The problem is that I do not seem to have the sitk.LandmarkBasedTransformInitializer() available in my SimpleITK version. It was used in the notebook http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/67_Registration_Semiautomatic_Homework.html. I have SimpleITK 0.9.1 (Compiled Sep 28 2015) that I have installed on Anaconda according to the Wiki instructions. I am using Python 2.7. Would I possibly need some other version of SimpleITK? How could I get it? Alternatively, is there some other simple method for calculating a spatial transformation from control point pairs in SimpleITK? I can of course do that in Numpy, but I wouldn?t like to overly complicate things. Another question, in the notebook above you are using a visualisation module named ?gui" to show nice interactive plots, from which it is possible to make landmark selections as well. Is that by chance publicly available somewhere? Best, Sami -------------- next part -------------- An HTML attachment was scrubbed... URL: From zivrafael.yaniv at nih.gov Tue Jul 12 10:18:37 2016 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Tue, 12 Jul 2016 14:18:37 +0000 Subject: [ITK-users] SimpleITK landmark based initialisation (and image visualisation) In-Reply-To: <21BECCEC-1354-4E9A-B08F-D36BFE535407@gmail.com> References: <21BECCEC-1354-4E9A-B08F-D36BFE535407@gmail.com> Message-ID: Hello Sami, We are just about to release the latest version of SimpleITK which includes the LandmarkBasedTransformInitializer. This will happen in the next couple of weeks. For an immediate solution, you can build the toolkit?s master branch for anaconda using the conda recipe found on my github: git clone https://github.com/zivy/conda-recipes.git cd conda-recipes git checkout simpleitkMaster cd python conda build simpleitk Then just install the package you built. This build process is for people who want to stay on the cutting edge, in between official releases (the master branch is our stable branch so you should be fine). regards Ziv From: Sami Koho > Date: Tuesday, July 12, 2016 at 5:29 AM To: insight-users > Subject: [ITK-users] SimpleITK landmark based initialisation (and image visualisation) Hi, I was thinking of adding a manual landmark based initialisation to my image registration method, as the automatic initialiser does not reliably work in my current application. I?m registering correlative microscopy images with very large shift and rotation between moving and fixed images ? usually the moving image also covers only a small part of the area shown in the fixed image. By specifying the initial offset and rotation manually, registration works nicely, but this is a bit cumbersome, because I have to figure out the approximate offsets first. The problem is that I do not seem to have the sitk.LandmarkBasedTransformInitializer() available in my SimpleITK version. It was used in the notebook http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/67_Registration_Semiautomatic_Homework.html. I have SimpleITK 0.9.1 (Compiled Sep 28 2015) that I have installed on Anaconda according to the Wiki instructions. I am using Python 2.7. Would I possibly need some other version of SimpleITK? How could I get it? Alternatively, is there some other simple method for calculating a spatial transformation from control point pairs in SimpleITK? I can of course do that in Numpy, but I wouldn?t like to overly complicate things. Another question, in the notebook above you are using a visualisation module named ?gui" to show nice interactive plots, from which it is possible to make landmark selections as well. Is that by chance publicly available somewhere? Best, Sami -------------- next part -------------- An HTML attachment was scrubbed... URL: From sg.ele.eng at gmail.com Tue Jul 12 16:54:25 2016 From: sg.ele.eng at gmail.com (Sara Gh) Date: Tue, 12 Jul 2016 16:54:25 -0400 Subject: [ITK-users] [ITK] SimpleITK - Resampling Coronal Image in the Axial View In-Reply-To: <1561329490.15991909.1467020401395.JavaMail.zimbra@enst.fr> References: <1561329490.15991909.1467020401395.JavaMail.zimbra@enst.fr> Message-ID: Hello Tim, Thank you for your helpful email and sorry for late reply. Yes, that's right. The size of resampled imageC should be 256x68x256 and imageC should be rotated -pi/2 around the X axis. Now, my first question is: Can I use the direction of imageA as the OutputDirection instead of using Euler3DTransform? Something like this: # Direction of imageA: (1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) # Direction of imageC: (1.0, 0.0, 0.0, 0.0, -0.0, 1.0, 0.0, -1.0, -0.0) resample = sitk.ResampleImageFilter() resample.SetTransform(sitk.Transform(3, sitk.sitkIdentity)) resample.SetReferenceImage(imageC) resample.SetOutputDirection(imageA.GetDirection()) resample.SetOutputOrigin(imageA.GetOrigin()) spacingCA = [spacingC[0],spacingC[2],spacingC[1]] resample.SetOutputSpacing(spacingCA) sizeC = imageC.GetSize() sizeCA = [sizeC[0], sizeC[2], sizeC[1]] resample.SetSize(sizeCA) imageCA=resample.Execute(imageC) sitk.Show(imageCA) Second, I think I haven't set the correct OutputOrigin for the resampled image because when I compare imageCA with the axial view of imageC (calculated by ImageJ > Stacks> Orthogonal Views), it seems that the resulted imageCA is the translated version of the correct axial view. I have read the ITK guide chapter 2.9 about transformation and resampling processes but it is still vague to me how one should calculate/select the correct origin for the output image. I would be thankful if you could refer me to any other resources that could be helpful to me in this regard. Thank you in advance. Best regards, Sara On Mon, Jun 27, 2016 at 5:40 AM, Timothee Evain wrote: > Hello, > > First of all, it depends on the patient position in the data, but usually > the X axis describe the left/right direction, the Y axis the > anterior/posterior direction and the Z axis the top/bottom one. > So I would expect the resampled imageC size to be 256x68x256 rather than > 68x256x256. > > Then, I think you should try to transform your imageC to be in the imageA > orientation. Let say the imageA have a LPS coordinate system. > If the imageC : > -first direction represents the axis going from the patient's right to the > patient's left > -second direction represents the axis going from the patient's top to the > patient's bottom > -third direction represents the axis going from the patient's front to the > patient's rear > Then you should rotate the imageC by a -pi/2 angle around the X axis. > > You could use the Euler3DTransform to get this rotation. > Then you feed the resample filter with this transform, plus the needed > parameters (origin, spacing, size,...), and you should be able to have your > resampled data. > Just be sure to fully understand the transformation you're making (I > recommend the ResampleImageFilter part of the ITK guide which is quite > useful). > > HTH, > > Tim > > > ----- Mail original ----- > De: "Sara Gh" > ?: insight-users at itk.org > Envoy?: Dimanche 26 Juin 2016 07:57:16 > Objet: [ITK] [ITK-users] SimpleITK - Resampling Coronal Image in the > Axial View > > Hello experts, > > I have two MRI scans: Axial and Coronal > # imageA : Axial MRI scan, size : 256x256x56 (256mmx256mmx168mm) , > spacing: 1,1,3 ( slice gap : 1 => slice thickness : 2 ) > # imageC : Coronal MRI scan, size : 256x256x68 (256mmx256mmx204mm) , > spacing: 1,1,3 ( slice gap : 1 => slice thickness : 2 ) > > I am trying to view Coronal image from the axial view i.e. resampling > Coronal image using the direction of Axial image. Here is my code: > > resample = sitk.ResampleImageFilter() > resample.SetReferenceImage(imageC) > resample.SetOutputDirection(imageA.GetDirection()) > resample.SetOutputOrigin(imageA.GetOrigin()) > imageCA = resample.Execute(imageC) > sitk.Show(imageCA) > > # Result: imageCA: size : 256x256x68 (256mmx256mmx204mm), spacing: 1,1,3 > > I believe I have missed something because, in my idea, the size of > resampled coronal image (imageCA) should be 68x256x256 ( 204mmx256mmx256mm) > with the spacing [3,1,1] . > > I also tried to set the OutputSpacing to [3,1,1], but the size of the > imageCA changes to 256x256x68 (768mmx256mmx68mm). > > I would be thankful if someone could help me in this regard. > > Best regards, > Sara Gh > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 > -- Sara Gharabaghi, Ph.D. Student Graduate Research Assistant Advanced Visual Data Analysis (AViDA) Lab Biomedical Imaging Lab Wright State University -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Wed Jul 13 05:54:55 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Wed, 13 Jul 2016 11:54:55 +0200 (CEST) Subject: [ITK-users] [ITK] SimpleITK - Resampling Coronal Image in the Axial View In-Reply-To: References: <1561329490.15991909.1467020401395.JavaMail.zimbra@enst.fr> Message-ID: <553598682.26391964.1468403695421.JavaMail.zimbra@enst.fr> Hi Sara, The origin of an image is the point in world coordinates where the image "start" (from lower indexes to higher ones), not to be confused with the origin of the reference frame, which is [0,0,0]. When dealing with geometry, a drawing is often helpful to know what happens to the image origin during transformation. And yes, you could do it through direction modification, that's just a bit more complicated. Since modifing direction means transforming the reference frame, you have to compute where and which point will be the new origin of the imageC. Sticking with the previous hypothesis on imageC position, the "true" origin of imageC (origin of imageCA) is the point: -last in the original Y imageC direction -first in the original X imageC direction -first in the original Z imageC direction So if the original origin of imageC is [0,0,0], this point will be [0,SizeC[1]*SpacingC[1],0]. Then this "true" origin will be modified by the rotation of the frame. In your case , -pi/2, giving [0,0,-SizeC[1]*SpacingC[1]]. Put this as the output origin and you should be fine. Of course, is the original origin of imageC isn't [0,0,0], you should compute the new point accordingly. For general matters, it should be noted that this works because the default rotation center is also the reference frame origin (i.e. [0,0,0]) HTH, Tim ----- Mail original ----- De: "Sara Gh" ?: "Timothee Evain" Cc: insight-users at itk.org Envoy?: Mardi 12 Juillet 2016 22:54:25 Objet: Re: [ITK] [ITK-users] SimpleITK - Resampling Coronal Image in the Axial View Hello Tim, Thank you for your helpful email and sorry for late reply. Yes, that's right. The size of resampled imageC should be 256x68x256 and imageC should be rotated -pi/2 around the X axis. Now, my first question is: Can I use the direction of imageA as the OutputDirection instead of using Euler3DTransform? Something like this: # Direction of imageA: (1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) # Direction of imageC: (1.0, 0.0, 0.0, 0.0, -0.0, 1.0, 0.0, -1.0, -0.0) resample = sitk.ResampleImageFilter() resample.SetTransform(sitk.Transform(3, sitk.sitkIdentity)) resample.SetReferenceImage(imageC) resample.SetOutputDirection(imageA.GetDirection()) resample.SetOutputOrigin(imageA.GetOrigin()) spacingCA = [spacingC[0],spacingC[2],spacingC[1]] resample.SetOutputSpacing(spacingCA) sizeC = imageC.GetSize() sizeCA = [sizeC[0], sizeC[2], sizeC[1]] resample.SetSize(sizeCA) imageCA=resample.Execute(imageC) sitk.Show(imageCA) Second, I think I haven't set the correct OutputOrigin for the resampled image because when I compare imageCA with the axial view of imageC (calculated by ImageJ > Stacks> Orthogonal Views), it seems that the resulted imageCA is the translated version of the correct axial view. I have read the ITK guide chapter 2.9 about transformation and resampling processes but it is still vague to me how one should calculate/select the correct origin for the output image. I would be thankful if you could refer me to any other resources that could be helpful to me in this regard. Thank you in advance. Best regards, Sara On Mon, Jun 27, 2016 at 5:40 AM, Timothee Evain wrote: > Hello, > > First of all, it depends on the patient position in the data, but usually > the X axis describe the left/right direction, the Y axis the > anterior/posterior direction and the Z axis the top/bottom one. > So I would expect the resampled imageC size to be 256x68x256 rather than > 68x256x256. > > Then, I think you should try to transform your imageC to be in the imageA > orientation. Let say the imageA have a LPS coordinate system. > If the imageC : > -first direction represents the axis going from the patient's right to the > patient's left > -second direction represents the axis going from the patient's top to the > patient's bottom > -third direction represents the axis going from the patient's front to the > patient's rear > Then you should rotate the imageC by a -pi/2 angle around the X axis. > > You could use the Euler3DTransform to get this rotation. > Then you feed the resample filter with this transform, plus the needed > parameters (origin, spacing, size,...), and you should be able to have your > resampled data. > Just be sure to fully understand the transformation you're making (I > recommend the ResampleImageFilter part of the ITK guide which is quite > useful). > > HTH, > > Tim > > > ----- Mail original ----- > De: "Sara Gh" > ?: insight-users at itk.org > Envoy?: Dimanche 26 Juin 2016 07:57:16 > Objet: [ITK] [ITK-users] SimpleITK - Resampling Coronal Image in the > Axial View > > Hello experts, > > I have two MRI scans: Axial and Coronal > # imageA : Axial MRI scan, size : 256x256x56 (256mmx256mmx168mm) , > spacing: 1,1,3 ( slice gap : 1 => slice thickness : 2 ) > # imageC : Coronal MRI scan, size : 256x256x68 (256mmx256mmx204mm) , > spacing: 1,1,3 ( slice gap : 1 => slice thickness : 2 ) > > I am trying to view Coronal image from the axial view i.e. resampling > Coronal image using the direction of Axial image. Here is my code: > > resample = sitk.ResampleImageFilter() > resample.SetReferenceImage(imageC) > resample.SetOutputDirection(imageA.GetDirection()) > resample.SetOutputOrigin(imageA.GetOrigin()) > imageCA = resample.Execute(imageC) > sitk.Show(imageCA) > > # Result: imageCA: size : 256x256x68 (256mmx256mmx204mm), spacing: 1,1,3 > > I believe I have missed something because, in my idea, the size of > resampled coronal image (imageCA) should be 68x256x256 ( 204mmx256mmx256mm) > with the spacing [3,1,1] . > > I also tried to set the OutputSpacing to [3,1,1], but the size of the > imageCA changes to 256x256x68 (768mmx256mmx68mm). > > I would be thankful if someone could help me in this regard. > > Best regards, > Sara Gh > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 > -- Sara Gharabaghi, Ph.D. Student Graduate Research Assistant Advanced Visual Data Analysis (AViDA) Lab Biomedical Imaging Lab Wright State University From julien.jomier at kitware.com Wed Jul 13 09:12:31 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Wed, 13 Jul 2016 15:12:31 +0200 Subject: [ITK-users] ANN: CMake Course - October 10 in Lyon, France Message-ID: Kitware will be holding a CMake training course on October 10, 2016 at Kitware's office in Lyon, France. This one-day course will cover CMake, CTest, CPack and CDash. Visit our website for more information and registration details (early registration and student discounts available): http://training.kitware.fr/browse/129 Note that the course will be taught in English. If you have any questions, please contact me directly or training at kitware.fr. We are looking forward to seeing you in Lyon, Julien -- Kitware SAS 26 rue Louis Gu?rin 69100 Villeurbanne, France http://www.kitware.eu From brad at lowekamp.net Wed Jul 13 23:03:40 2016 From: brad at lowekamp.net (Bradley Lowekamp) Date: Wed, 13 Jul 2016 22:03:40 -0500 Subject: [ITK-users] SimpleITK 0.10 Release Candidate 1 Message-ID: <3136CBFF-D3A7-456F-80DC-567AE5EA0686@mail.nih.gov> Hello, We are pleased to announce the SimpleITK 0.10 Release Candidate 1 is available! The binaries are available for download from Source Forge: https://sourceforge.net/projects/simpleitk/files/SimpleITK/0.10rc1/ The latest versions of ?pip? is recommended to install the downloaded binary wheel for Python. Python eggs are not longer being distributed. You are encouraged to checkout SimpleITK?s master branch in the git repository for testing building the source code. Key Improvements: * The R language bindings have received extensive improvements and bug fixes. * Added Image::SetMetaData method * Added LandmarkBasedTransformInitializer * Added MultiLableSTAPLEImageFilter * Default sitk::Show support for Fiji over ImageJ * Moved third-party packages Lua, gtest, virtualenv from source code to Superbuild projects * Added Forbid Download option * Enabled each language wrapping to be an independent project dependent on SimpleITK C++ interface and libraries. * Lua languages bindings now compile as a loadable module * Many CMake build improvements to default configurations * CMake version 3.3 is now required Enjoy! Brad From ibr_ex at yahoo.com Thu Jul 14 05:03:08 2016 From: ibr_ex at yahoo.com (ibraheem aldhamari) Date: Thu, 14 Jul 2016 09:03:08 +0000 (UTC) Subject: [ITK-users] Help needed to get the Mean Squared Error and Mutual Information values of two volumes References: <1279017441.3214342.1468486988479.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1279017441.3214342.1468486988479.JavaMail.yahoo@mail.yahoo.com> Dear users,I am trying to get the values of Mean Squared Error and Mutual Information of two images. The input is two volumes:?Imga and Imgb. Both have the?same?data type, size, spacing and origin. Here is my code : typedef itk::MeanSquaresImageToImageMetric < Img_Tuc,Img_Tuc > SDF_T; typedef itk::MutualInformationImageToImageMetric < Img_Tuc,Img_Tuc> MIF_T; // Squared Difference SDF_T::Pointer SD_F = SDF_T::New(); SD_F->SetFixedImage( Imga->GetOutput(0)); SD_F->SetMovingImage( Imgb->GetOutput(0)); float SD=SD_F->GetValue() ; cout<<"SD Result = " << SD <SetFixedImage (Imga->GetOutput(0)); MI_F->SetMovingImage(Imgb->GetOutput(0)); float MI=MI_F->GetValue() ; cout<<"MI Result = " << MI <, itk::Image >::GetValue()' float SD=SD_F->GetValue() ; ^ error: no matching function for call to 'itk::MutualInformationImageToImageMetric, itk::Image >::GetValue()' float MI=MI_F->GetValue() ; ^ Could you please suggest a correction.Have a nice day! Ibraheem -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Thu Jul 14 10:47:07 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 14 Jul 2016 10:47:07 -0400 Subject: [ITK-users] Help needed to get the Mean Squared Error and Mutual Information values of two volumes In-Reply-To: <1279017441.3214342.1468486988479.JavaMail.yahoo@mail.yahoo.com> References: <1279017441.3214342.1468486988479.JavaMail.yahoo.ref@mail.yahoo.com> <1279017441.3214342.1468486988479.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Ibraheem, the signature of GetValue method is: MeasureType GetValue (const ParametersType ¶meters) const override; which means that you need to give transform parameters to get a value. What you might want is create an identity transform and pass that in. Regards, D?enan On Thu, Jul 14, 2016 at 5:03 AM, ibraheem aldhamari via Insight-users < insight-users at itk.org> wrote: > Dear users, > I am trying to get the values of Mean Squared Error and Mutual Information > of two images. The input is two volumes: Imga and Imgb. Both have > the same data type, size, spacing and origin. Here is my code : > > typedef itk::MeanSquaresImageToImageMetric < Img_Tuc,Img_Tuc > SDF_T; > > typedef itk::MutualInformationImageToImageMetric < Img_Tuc,Img_Tuc> MIF_T; > > // Squared Difference > > SDF_T::Pointer SD_F = SDF_T::New(); > > SD_F->SetFixedImage( Imga->GetOutput(0)); > > SD_F->SetMovingImage( Imgb->GetOutput(0)); > > float SD=SD_F->GetValue() ; > > cout<<"SD Result = " << SD < > //Mutual Information > > MIF_T::Pointer MI_F = MIF_T::New(); > > MI_F->SetFixedImage (Imga->GetOutput(0)); > > MI_F->SetMovingImage(Imgb->GetOutput(0)); > > float MI=MI_F->GetValue() ; > > cout<<"MI Result = " << MI < > > but I keep getting these errors: > > error: no matching function for call to 'itk::MeanSquaresImageToImageMetric, itk::Image >::GetValue()' > > float SD=SD_F->GetValue() ; ^ > > error: no matching function for call to 'itk::MutualInformationImageToImageMetric, itk::Image >::GetValue()' > float MI=MI_F->GetValue() ; ^ > > Could you please suggest a correction. > > Have a nice day! > > Ibraheem > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 kolin9105 at gmail.com Thu Jul 14 13:49:23 2016 From: kolin9105 at gmail.com (meikolin saimara) Date: Fri, 15 Jul 2016 00:49:23 +0700 Subject: [ITK-users] my problem Message-ID: hello every one I am so confused until now I haven't find the correct answer about , what is the advantage seedX and seedY in confidence connected filter ??? -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Thu Jul 14 16:54:14 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 14 Jul 2016 16:54:14 -0400 Subject: [ITK-users] my problem In-Reply-To: References: Message-ID: Hi Meikolin, there is no "advantage" to seeds, it is how confidence connected filter operates. It finds all voxels which are connected to the provided seeds with a certain confidence. So seeds are starting points. Regards, D?enan On Thu, Jul 14, 2016 at 1:49 PM, meikolin saimara wrote: > hello every one I am so confused until now I haven't find the correct > answer about , what is the advantage seedX and seedY in confidence > connected filter ??? > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Fri Jul 15 10:34:29 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 15 Jul 2016 10:34:29 -0400 Subject: [ITK-users] my problem In-Reply-To: References: Message-ID: Hi Meikolin, it is not clear to me what your problem is. Can you give some images (what you get, what you want, where you put the seeds) and explain a bit more what you did code-wise? Otherwise I would have to guess. Regards, D?enan On Fri, Jul 15, 2016 at 3:26 AM, meikolin saimara wrote: > thanks before sir.. > I have one problem in my thesis. > I have a image of brain tumor,I can find the tumor and the skull using > confidence connected segmentation, but I just wanna need the tumor no the > skull. I just wanna one picture no full head to analyzed. > can you help me sir?? > please sir.. > > On Fri, Jul 15, 2016 at 3:54 AM, D?enan Zuki? wrote: > >> Hi Meikolin, >> >> there is no "advantage" to seeds, it is how confidence connected filter >> operates. It finds all voxels which are connected to the provided seeds >> with a certain confidence. So seeds are starting points. >> >> Regards, >> D?enan >> >> On Thu, Jul 14, 2016 at 1:49 PM, meikolin saimara >> wrote: >> >>> hello every one I am so confused until now I haven't find the correct >>> answer about , what is the advantage seedX and seedY in confidence >>> connected filter ??? >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 ocuadrosl at gmail.com Fri Jul 15 18:04:58 2016 From: ocuadrosl at gmail.com (Oscar Cuadros Linares) Date: Fri, 15 Jul 2016 15:04:58 -0700 Subject: [ITK-users] region of interest size problem Message-ID: <57895E0A.7010108@gmail.com> Hi Guys I am trying to extract a region of interest (ROI) from a 3D tomography I am using the filter "itkRegionOfInterestImageFilter.h". The issue is that the filter changes the original size of the input image. According the documentation, the output image has the same dimension of the input image. But size of the output image is the size of the selected region (ROI). My code is based on this example: https://itk.org/Wiki/ITK/Examples/ImageProcessing/RegionOfInterestImageFilter Thank you for your suggestions Oscar From dzenanz at gmail.com Sat Jul 16 13:52:54 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Sat, 16 Jul 2016 13:52:54 -0400 Subject: [ITK-users] [ITK] region of interest size problem In-Reply-To: <57895E0A.7010108@gmail.com> References: <57895E0A.7010108@gmail.com> Message-ID: Hi Oscar, the output dimension is the same: 3D input produces 3D output, 2D input produces 2D output etc. But the point of RoI filter is to get an image which is only a part of the input image, and in that respect the filter is working correctly. What did you expect to happen? If you want only part of the image be processed, set its RequestedRegion to something smaller than LargestPossibleRegion. Regards, D?enan On Fri, Jul 15, 2016 at 6:04 PM, Oscar Cuadros Linares wrote: > Hi Guys > > I am trying to extract a region of interest (ROI) from a 3D tomography > I am using the filter "itkRegionOfInterestImageFilter.h". The issue is > that the filter changes the original size of the input image. > According the documentation, the output image has the same > dimension of the input image. But size of the output image > is the size of the selected region (ROI). > My code is based on this example: > > https://itk.org/Wiki/ITK/Examples/ImageProcessing/RegionOfInterestImageFilter > > Thank you for your suggestions > Oscar > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 zhuangming.shen at sphic.org.cn Mon Jul 18 05:00:56 2016 From: zhuangming.shen at sphic.org.cn (=?gb2312?B?yfLXr8P3?=) Date: Mon, 18 Jul 2016 09:00:56 +0000 Subject: [ITK-users] Deformable registration question Message-ID: <1468832456487.30276@sphic.org.cn> Hi all, I have two questions. 1) Has itk::BSplineTransformInitializer been wrapped to python-supported ITK? 2) Which deformable registration algorithms in ITK can deal with multi-modal image registration such as CT-MR registration? Thanks. Regards, Zhuangming Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Mon Jul 18 09:04:44 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 18 Jul 2016 09:04:44 -0400 Subject: [ITK-users] Deformable registration question In-Reply-To: <1468832456487.30276@sphic.org.cn> References: <1468832456487.30276@sphic.org.cn> Message-ID: Hi Shen, 2) for multi-modal registration you need to use one variant of mutual information registration metric. All the other parts of the registration framework should be applicable. Regards, D?enan On Mon, Jul 18, 2016 at 5:00 AM, ??? wrote: > Hi all, > > > I have two questions. > > 1) Has itk::BSplineTransformInitializer been wrapped to python-supported > ITK? > > 2) Which deformable registration algorithms in ITK can deal with > multi-modal image registration such as CT-MR registration? > > Thanks. > > > > 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 dzenanz at gmail.com Mon Jul 18 10:02:55 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 18 Jul 2016 10:02:55 -0400 Subject: [ITK-users] my problem In-Reply-To: References: Message-ID: There is a paper which goes along with the source code, which give more description as well as how to call the filter. On Mon, Jul 18, 2016 at 9:55 AM, meikolin saimara wrote: > I just have tried how to compile the code. I am confused how to use it. > > but I have problem to use that because the skull stripping approaches need > data sheet of brain. > I just want send one image in my thesis no more. > I am sorry sir I am beginner in ITK. > > > On Mon, Jul 18, 2016 at 8:02 PM, D?enan Zuki? wrote: > >> Have you tried some skull stripping approaches? One example is this: >> http://www.insight-journal.org/browse/publication/859 >> >> Also, something similar to what you are trying to do already exists: >> http://volbrain.upv.es >> >> Regards >> >> On Mon, Jul 18, 2016 at 4:34 AM, meikolin saimara >> wrote: >> >>> oke I will explain to you what I want to do in my thesis. >>> in my thesis I want to build web service to analyze large of brain tumor. >>> the steps are client send one image of brain which one will be analyzed >>> after that server will be processed the image without being noticed by >>> client. >>> in server using command prompt to analyzed the image. after that the >>> result will be showed to Client. >>> >>> now my problem is I can't remove outside the skull with itk in my server. >>> if outside the skull Can't be removed so the itk program will enter >>> pixel of the skull mixed the tumor. >>> first image is before processed and second image is after processed. >>> in confidence connected uses the seedX is 100 and the seedY 75. >>> >>> >>> >>> >>> >>> >>> >>> On Fri, Jul 15, 2016 at 9:34 PM, D?enan Zuki? wrote: >>> >>>> Hi Meikolin, >>>> >>>> it is not clear to me what your problem is. Can you give some images >>>> (what you get, what you want, where you put the seeds) and explain a bit >>>> more what you did code-wise? Otherwise I would have to guess. >>>> >>>> Regards, >>>> D?enan >>>> >>>> On Fri, Jul 15, 2016 at 3:26 AM, meikolin saimara >>>> wrote: >>>> >>>>> thanks before sir.. >>>>> I have one problem in my thesis. >>>>> I have a image of brain tumor,I can find the tumor and the skull using >>>>> confidence connected segmentation, but I just wanna need the tumor no the >>>>> skull. I just wanna one picture no full head to analyzed. >>>>> can you help me sir?? >>>>> please sir.. >>>>> >>>>> On Fri, Jul 15, 2016 at 3:54 AM, D?enan Zuki? >>>>> wrote: >>>>> >>>>>> Hi Meikolin, >>>>>> >>>>>> there is no "advantage" to seeds, it is how confidence connected >>>>>> filter operates. It finds all voxels which are connected to the provided >>>>>> seeds with a certain confidence. So seeds are starting points. >>>>>> >>>>>> Regards, >>>>>> D?enan >>>>>> >>>>>> On Thu, Jul 14, 2016 at 1:49 PM, meikolin saimara < >>>>>> kolin9105 at gmail.com> wrote: >>>>>> >>>>>>> hello every one I am so confused until now I haven't find the >>>>>>> correct answer about , what is the advantage seedX and seedY in >>>>>>> confidence connected filter ??? >>>>>>> >>>>>>> _____________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>>> http://www.kitware.com/products/protraining.php >>>>>>> >>>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Mon Jul 18 10:31:20 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 18 Jul 2016 10:31:20 -0400 Subject: [ITK-users] my problem In-Reply-To: References: Message-ID: The image you sent before is a 2D image, and you should do some 2D skull stripping (e.g. this ). Also, can you try to keep the conversation on the mailing list so other people can benefit from it in the future? Regards, D?enan On Mon, Jul 18, 2016 at 10:23 AM, meikolin saimara wrote: > thanks before sir, > I have read this before but I don't about dataset. > how about my image what I send before?? > can you remove the skull?? > > On Mon, Jul 18, 2016 at 9:02 PM, D?enan Zuki? wrote: > >> There is a paper >> which >> goes along with the source code, which give more description as well as how >> to call the filter. >> >> On Mon, Jul 18, 2016 at 9:55 AM, meikolin saimara >> wrote: >> >>> I just have tried how to compile the code. I am confused how to use >>> it. >>> but I have problem to use that because the skull stripping approaches >>> need data sheet of brain. >>> I just want send one image in my thesis no more. >>> I am sorry sir I am beginner in ITK. >>> >>> >>> On Mon, Jul 18, 2016 at 8:02 PM, D?enan Zuki? wrote: >>> >>>> Have you tried some skull stripping approaches? One example is this: >>>> http://www.insight-journal.org/browse/publication/859 >>>> >>>> Also, something similar to what you are trying to do already exists: >>>> http://volbrain.upv.es >>>> >>>> Regards >>>> >>>> On Mon, Jul 18, 2016 at 4:34 AM, meikolin saimara >>>> wrote: >>>> >>>>> oke I will explain to you what I want to do in my thesis. >>>>> in my thesis I want to build web service to analyze large of brain >>>>> tumor. >>>>> the steps are client send one image of brain which one will be >>>>> analyzed after that server will be processed the image without being >>>>> noticed by client. >>>>> in server using command prompt to analyzed the image. after that the >>>>> result will be showed to Client. >>>>> >>>>> now my problem is I can't remove outside the skull with itk in my >>>>> server. >>>>> if outside the skull Can't be removed so the itk program will enter >>>>> pixel of the skull mixed the tumor. >>>>> first image is before processed and second image is after processed. >>>>> in confidence connected uses the seedX is 100 and the seedY 75. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Fri, Jul 15, 2016 at 9:34 PM, D?enan Zuki? >>>>> wrote: >>>>> >>>>>> Hi Meikolin, >>>>>> >>>>>> it is not clear to me what your problem is. Can you give some images >>>>>> (what you get, what you want, where you put the seeds) and explain a bit >>>>>> more what you did code-wise? Otherwise I would have to guess. >>>>>> >>>>>> Regards, >>>>>> D?enan >>>>>> >>>>>> On Fri, Jul 15, 2016 at 3:26 AM, meikolin saimara < >>>>>> kolin9105 at gmail.com> wrote: >>>>>> >>>>>>> thanks before sir.. >>>>>>> I have one problem in my thesis. >>>>>>> I have a image of brain tumor,I can find the tumor and the skull >>>>>>> using confidence connected segmentation, but I just wanna need the tumor no >>>>>>> the skull. I just wanna one picture no full head to analyzed. >>>>>>> can you help me sir?? >>>>>>> please sir.. >>>>>>> >>>>>>> On Fri, Jul 15, 2016 at 3:54 AM, D?enan Zuki? >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Meikolin, >>>>>>>> >>>>>>>> there is no "advantage" to seeds, it is how confidence connected >>>>>>>> filter operates. It finds all voxels which are connected to the provided >>>>>>>> seeds with a certain confidence. So seeds are starting points. >>>>>>>> >>>>>>>> Regards, >>>>>>>> D?enan >>>>>>>> >>>>>>>> On Thu, Jul 14, 2016 at 1:49 PM, meikolin saimara < >>>>>>>> kolin9105 at gmail.com> wrote: >>>>>>>> >>>>>>>>> hello every one I am so confused until now I haven't find the >>>>>>>>> correct answer about , what is the advantage seedX and seedY in >>>>>>>>> confidence connected filter ??? >>>>>>>>> >>>>>>>>> _____________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>>>>> http://www.kitware.com/products/protraining.php >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the 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 ocuadrosl at gmail.com Mon Jul 18 15:01:41 2016 From: ocuadrosl at gmail.com (Oscar Cuadros Linares) Date: Mon, 18 Jul 2016 12:01:41 -0700 Subject: [ITK-users] [ITK] region of interest size problem In-Reply-To: References: <57895E0A.7010108@gmail.com> Message-ID: Hi D?enan Zuki? Thank you for your reply. I know that a 3D input produces a 3D output. I will try to explain better my issue. I have a 3D image and I want to get to a ROI (200x200x100 size) from that image. But the output image has to keep the original information, especially the region size. (400x400x550 in my case). The problem is that the output image is 200x200x100 size and not 400x400x550 like the input image. Thank you so much. Oscar On Sat, Jul 16, 2016 at 10:52 AM, D?enan Zuki? wrote: > Hi Oscar, > > the output dimension is the same: 3D input produces 3D output, 2D input > produces 2D output etc. But the point of RoI filter is to get an image > which is only a part of the input image, and in that respect the filter is > working correctly. What did you expect to happen? If you want only part of > the image be processed, set its RequestedRegion to something smaller than > LargestPossibleRegion. > > Regards, > D?enan > > On Fri, Jul 15, 2016 at 6:04 PM, Oscar Cuadros Linares < > ocuadrosl at gmail.com> wrote: > >> Hi Guys >> >> I am trying to extract a region of interest (ROI) from a 3D tomography >> I am using the filter "itkRegionOfInterestImageFilter.h". The issue is >> that the filter changes the original size of the input image. >> According the documentation, the output image has the same >> dimension of the input image. But size of the output image >> is the size of the selected region (ROI). >> My code is based on this example: >> >> https://itk.org/Wiki/ITK/Examples/ImageProcessing/RegionOfInterestImageFilter >> >> Thank you for your suggestions >> Oscar >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 >> > > -- Oscar Cuadros Linares Computer Science -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Mon Jul 18 15:15:19 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 18 Jul 2016 15:15:19 -0400 Subject: [ITK-users] [ITK] region of interest size problem In-Reply-To: References: <57895E0A.7010108@gmail.com> Message-ID: Hi Oscar, if you want to copy part of the image, and have the rest be filled with zeroes, you should: 1. create a new image 2. copy information from the source image 3. set regions using source's region 4. allocate(true) 5. use PasteImageFilter to copy a portion of source to the new image Does this answer your question? Regards, D?enan On Mon, Jul 18, 2016 at 3:01 PM, Oscar Cuadros Linares wrote: > Hi D?enan Zuki? > > Thank you for your reply. > I know that a 3D input produces a 3D output. I will try to explain better > my issue. > I have a 3D image and I want to get to a ROI (200x200x100 size) from that > image. > But the output image has to keep the original information, especially the > region size. > (400x400x550 in my case). The problem is that the output image is > 200x200x100 size > and not 400x400x550 like the input image. > > Thank you so much. > Oscar > > > > On Sat, Jul 16, 2016 at 10:52 AM, D?enan Zuki? wrote: > >> Hi Oscar, >> >> the output dimension is the same: 3D input produces 3D output, 2D input >> produces 2D output etc. But the point of RoI filter is to get an image >> which is only a part of the input image, and in that respect the filter is >> working correctly. What did you expect to happen? If you want only part of >> the image be processed, set its RequestedRegion to something smaller than >> LargestPossibleRegion. >> >> Regards, >> D?enan >> >> On Fri, Jul 15, 2016 at 6:04 PM, Oscar Cuadros Linares < >> ocuadrosl at gmail.com> wrote: >> >>> Hi Guys >>> >>> I am trying to extract a region of interest (ROI) from a 3D tomography >>> I am using the filter "itkRegionOfInterestImageFilter.h". The issue is >>> that the filter changes the original size of the input image. >>> According the documentation, the output image has the same >>> dimension of the input image. But size of the output image >>> is the size of the selected region (ROI). >>> My code is based on this example: >>> >>> https://itk.org/Wiki/ITK/Examples/ImageProcessing/RegionOfInterestImageFilter >>> >>> Thank you for your suggestions >>> Oscar >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 >>> >> >> > > > -- > Oscar Cuadros Linares > Computer Science > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anton.delehony at gmail.com Mon Jul 18 17:06:54 2016 From: anton.delehony at gmail.com (Anton Delehony) Date: Mon, 18 Jul 2016 17:06:54 -0400 Subject: [ITK-users] simpleITK C# bspline registation Message-ID: Hi all, I noticed that the output of my registration is exactly as the moving image, which means that the code below is not correct, but not sure where is the mistake. I think it has to do with the transform initializer.... Thanks, AD // Read input static itk.simple.ImageFileReader reader1 = new itk.simple.ImageFileReader(); reader1.SetFileName(args[0]); Image static = reader1.Execute(); // Read input moving itk.simple.ImageFileReader reader2 = new itk.simple.ImageFileReader(); reader2.SetFileName(args[0]); Image moving = reader2.Execute(); //registation itk.simple.ImageRegistrationMethod R = new itk.simple.ImageRegistrationMethod(); R.SetMetricAsMattesMutualInformation(50); R.SetMetricSamplingPercentage(30.0); R.SetInterpolator(itk.simple.InterpolatorEnum.sitkLinear); R.SetOptimizerAsLBFGSB(); itk.simple.BSplineTransform transform = new itk.simple.BSplineTransform(3); R.SetInitialTransform( transform); itk.simple.Transform trans_f = R.Execute(static, moving); //resample image itk.simple.ResampleImageFilter resample = new itk.simple.ResampleImageFilter(); resample.SetReferenceImage(static); resample.SetTransform(trans_f); resample.SetInterpolator(itk.simple.InterpolatorEnum.sitkBSpline); itk.simple.Image registered = resample.Execute(moving); -------------- next part -------------- An HTML attachment was scrubbed... URL: From zivrafael.yaniv at nih.gov Mon Jul 18 20:30:33 2016 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Tue, 19 Jul 2016 00:30:33 +0000 Subject: [ITK-users] simpleITK C# bspline registation In-Reply-To: References: Message-ID: Hello Anton, Yes, likely you are correct. Right now your code initializes using the identity transform and as far as I remember your B-spline grid doesn't physically overlap with your images (maybe it does, but this would be by chance). What is a bit surprising is that you did not get an error with regard to too many samples outside the domain (indicating no overlap between images - so I am a bit puzzled as it means your images do overlap sufficiently). This scenario is rare in practice and usually only happens when you are registering temporal data such as 3D volumes from a 4D CT dataset. Please see the following Jupyter Python notebook for an example on setting things up https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks/blob/master/65_Registration_FFD.ipynb . It will be easy for you to translate it to C#. You will also likely need to initialize your registration by performing a registration using a global transformation (rigid/affine) and only then a local registration (FFD). One last thing, there is a bug in the code in the line: R.SetMetricSamplingPercentage(30.0); This is a 300% sampling. The expected values are in (0.0,1.0]. hope this helps Ziv ________________________________ From: Anton Delehony [anton.delehony at gmail.com] Sent: Monday, July 18, 2016 5:06 PM To: insight-users at itk.org Subject: [ITK-users] simpleITK C# bspline registation Hi all, I noticed that the output of my registration is exactly as the moving image, which means that the code below is not correct, but not sure where is the mistake. I think it has to do with the transform initializer.... Thanks, AD // Read input static itk.simple.ImageFileReader reader1 = new itk.simple.ImageFileReader(); reader1.SetFileName(args[0]); Image static = reader1.Execute(); // Read input moving itk.simple.ImageFileReader reader2 = new itk.simple.ImageFileReader(); reader2.SetFileName(args[0]); Image moving = reader2.Execute(); //registation itk.simple.ImageRegistrationMethod R = new itk.simple.ImageRegistrationMethod(); R.SetMetricAsMattesMutualInformation(50); R.SetMetricSamplingPercentage(30.0); R.SetInterpolator(itk.simple.InterpolatorEnum.sitkLinear); R.SetOptimizerAsLBFGSB(); itk.simple.BSplineTransform transform = new itk.simple.BSplineTransform(3); R.SetInitialTransform( transform); itk.simple.Transform trans_f = R.Execute(static, moving); //resample image itk.simple.ResampleImageFilter resample = new itk.simple.ResampleImageFilter(); resample.SetReferenceImage(static); resample.SetTransform(trans_f); resample.SetInterpolator(itk.simple.InterpolatorEnum.sitkBSpline); itk.simple.Image registered = resample.Execute(moving); -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Mon Jul 18 22:45:14 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 18 Jul 2016 22:45:14 -0400 Subject: [ITK-users] Deformable registration question In-Reply-To: References: <1468832456487.30276@sphic.org.cn> Message-ID: Hi, For 1) here is a patch that will add wrapping support for itk::BSplineTransformInitializer: http://review.source.kitware.com/#/c/21341/ HTH, Matt On Mon, Jul 18, 2016 at 9:04 AM, D?enan Zuki? wrote: > Hi Shen, > > 2) for multi-modal registration you need to use one variant of mutual > information registration metric. All the other parts of the registration > framework should be applicable. > > Regards, > D?enan > > On Mon, Jul 18, 2016 at 5:00 AM, ??? wrote: >> >> Hi all, >> >> >> I have two questions. >> >> 1) Has itk::BSplineTransformInitializer been wrapped to python-supported >> ITK? >> >> 2) Which deformable registration algorithms in ITK can deal with >> multi-modal image registration such as CT-MR registration? >> >> Thanks. >> >> >> >> 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 >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From kolin9105 at gmail.com Tue Jul 19 01:40:51 2016 From: kolin9105 at gmail.com (meikolin saimara) Date: Tue, 19 Jul 2016 12:40:51 +0700 Subject: [ITK-users] (no subject) Message-ID: hello every one.. I have a problem in my thesis I want to remove the skull but I didn't. I have a Image 2D. how to remove it??? -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Wed Jul 20 19:09:53 2016 From: tossin at gmail.com (Evan Kao) Date: Wed, 20 Jul 2016 16:09:53 -0700 Subject: [ITK-users] Target Machine type error when trying to build 64-bit ITK using VS2015 Message-ID: Hello all, This may be more of a Visual Studio issue than an ITK issue, but I was wondering if anyone else found a way around this. I'm trying to build ITK 4.10.0 on a Windows 7 64-bit machine with Python (2.7 64-bit) wrapping using Visual Studio 2015. I should add I'm not familiar with either CMake, ITK, or Visual Studio so I could be missing something obvious. I keep getting the following error for multiple *.obj files: x64\Release\*.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' I noticed that CMake generates vxproj files for only Win32 by default. Then the files are modified by Visual Studio when switching the platform to x64 and selecting "Clean Solution", which adds the following lines, among others: Release x64 However, many individual sub-projects are still not updated to account for x64 configurations. I took a look at the Advanced CMAKE variables in the CMake GUI, but had no idea what to modify (everything seems to target Win32). Is there a way to configure CMake to generate x64 files? If not, does anyone know how to correctly configure ITK on x64 platforms in VS2015? Thanks, Evan Kao -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Wed Jul 20 20:00:37 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 20 Jul 2016 20:00:37 -0400 Subject: [ITK-users] Target Machine type error when trying to build 64-bit ITK using VS2015 In-Reply-To: References: Message-ID: Hi Evan, you need to select "Visual Studio 14 2015 Win64" as the generator: [image: Inline image 3] The result of this should be that you only have x64 platform in Visual Studio: [image: Inline image 2] Regards, D?enan On Wed, Jul 20, 2016 at 7:09 PM, Evan Kao wrote: > Hello all, > > This may be more of a Visual Studio issue than an ITK issue, but I was > wondering if anyone else found a way around this. I'm trying to build ITK > 4.10.0 on a Windows 7 64-bit machine with Python (2.7 64-bit) wrapping > using Visual Studio 2015. I should add I'm not familiar with either CMake, > ITK, or Visual Studio so I could be missing something obvious. > > I keep getting the following error for multiple *.obj files: > x64\Release\*.obj : fatal error LNK1112: module machine type 'x64' > conflicts with target machine type 'X86' > > I noticed that CMake generates vxproj files for only Win32 by default. > Then the files are modified by Visual Studio when switching the platform to > x64 and selecting "Clean Solution", which adds the following lines, among > others: > > Release > x64 > > However, many individual sub-projects are still not updated to account for > x64 configurations. I took a look at the Advanced CMAKE variables in the > CMake GUI, but had no idea what to modify (everything seems to target > Win32). > > Is there a way to configure CMake to generate x64 files? If not, does > anyone know how to correctly configure ITK on x64 platforms in VS2015? > > Thanks, > Evan Kao > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2016-07-20 19.54.04.png Type: image/png Size: 17634 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2016-07-20 19.58.16.png Type: image/png Size: 26364 bytes Desc: not available URL: From zhuangming.shen at sphic.org.cn Thu Jul 21 03:06:15 2016 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Thu, 21 Jul 2016 07:06:15 +0000 Subject: [ITK-users] Deformable registration question In-Reply-To: References: <1468832456487.30276@sphic.org.cn> , Message-ID: <1469084775272.2605@sphic.org.cn> Hi Matt and D?enan, Thanks for your prompt replies. Would you please also add python wrapping supports for the three classes below? As a result, I can use B-spline registration under ITKv4 registration framework. Thanks in advance. (1) itk::LBFGSBOptimizerv4 (2) itk::LBFGSOptimizerv4 (3) itk::TransformToDisplacementFieldFilter Regards, Zhuangming Shen ________________________________________ From: Matt McCormick Sent: Tuesday, July 19, 2016 10:45 AM To: D?enan Zuki? Cc: ???; insight-users at itk.org Subject: Re: [ITK-users] Deformable registration question Hi, For 1) here is a patch that will add wrapping support for itk::BSplineTransformInitializer: http://review.source.kitware.com/#/c/21341/ HTH, Matt On Mon, Jul 18, 2016 at 9:04 AM, D?enan Zuki? wrote: > Hi Shen, > > 2) for multi-modal registration you need to use one variant of mutual > information registration metric. All the other parts of the registration > framework should be applicable. > > Regards, > D?enan > > On Mon, Jul 18, 2016 at 5:00 AM, ??? wrote: >> >> Hi all, >> >> >> I have two questions. >> >> 1) Has itk::BSplineTransformInitializer been wrapped to python-supported >> ITK? >> >> 2) Which deformable registration algorithms in ITK can deal with >> multi-modal image registration such as CT-MR registration? >> >> Thanks. >> >> >> >> 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 >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From grothausmann.roman at mh-hannover.de Thu Jul 21 06:41:56 2016 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Thu, 21 Jul 2016 12:41:56 +0200 Subject: [ITK-users] streaming TileImageFilter for arbitrary number of inputs In-Reply-To: References: Message-ID: Dear mailing list members, Based on the examples for TileImageFilter I've created a working CLI to append an arbitrary number of inputs (https://github.com/romangrothausmann/ITK-CLIs/blob/4fdf5778022598dcf83fb38e6002df72bd67bef3/tile.cxx). As there is an example that does not apply Update and DisconnectPipeline on the readers (https://itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2ImageGrid_2AppendTwo3DVolumes_2Code_8cxx-example.html#_a2) I changed my code such that a reader instance is created for each input in a for-loop: https://github.com/romangrothausmann/ITK-CLIs/commit/ebfc0aea37d28cbbf2bb22c3f56be52453cebde9 However, the update from the writer seems not to propagate to the readers whether streaming or not. Can the TileImageFilter not stream in such a case or are further modifications necessary? Thanks for any help or hints Roman On 18/08/14 17:01, Michka Popoff wrote: > Hi > > Going the way described in the CreateVolume example is the way to go. > > Why did you uncomment the DisconnectPipeline() call and Update() call in the for > loop ? They need to stay there, else you will always use the last image. > That?s why you see the same image, the single update call will be triggered at > the end of the script and read only one image. > > You don?t need to call tileFilter->Update(), you can remove this line. The > writer->Update() will take care of the pipeline update. > As a bonus, you may wrap your writer->Update() call, to fetch errors at the end > of the pipeline: > > try > { > writer->Update(); > } > catch( itk::ExceptionObject & error ) > { > std::cerr << "Error: " << error << std::endl; > return EXIT_FAILURE; > } > > I made a little Python prototype, the syntax is a little bit different than in > C++ but it gives you the main idea. > > Michka > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From blowekamp at mail.nih.gov Thu Jul 21 09:41:20 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Thu, 21 Jul 2016 13:41:20 +0000 Subject: [ITK-users] [ITK] streaming TileImageFilter for arbitrary number of inputs In-Reply-To: References: Message-ID: Hello, The TileImageFilter does not fully stream [1]. The filter also has some odd behavior, and other older implementation details. If you are going to work on a streaming pipelines it is best practice to examine the filters to determine how the Requested regions behave. However, there is no reason that the TileImageFilter algorithm couldn?t support streaming. It is just a matter of code and a bunch of testing. A contribution for this issue would be welcomed! Also this filter is in need a refactoring and bring it up to several other best practices. There are several issue with the current implementation that would cause it not to work correctly with a streaming pipeline, and cause excessive execution. You can also use the PipelieMoniotorImageFilter to record and print the pipeline interaction during Update [2]. This information helps with debugging and diagnosing problems, but if the pipeline is mis-behaving ( as the TileImageFilter may ), the information may not be correct. I have tried similar streaming with the JoinSeriesImageFilter. However I ran into many problems with having hundreds of ImageIO being utilized at the same time. There were problems with having too many files open at the same time along with ImageIO libraries that couldn?t handle single threaded access to multiple files. [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/ImageGrid/include/itkTileImageFilter.hxx#L125-L136 [2] https://itk.org/Doxygen/html/classitk_1_1PipelineMonitorImageFilter.html > On Jul 21, 2016, at 6:41 AM, Grothausmann, Roman Dr. wrote: > > Dear mailing list members, > > > Based on the examples for TileImageFilter I've created a working CLI to append an arbitrary number of inputs (https://github.com/romangrothausmann/ITK-CLIs/blob/4fdf5778022598dcf83fb38e6002df72bd67bef3/tile.cxx). > As there is an example that does not apply Update and DisconnectPipeline on the readers (https://itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2ImageGrid_2AppendTwo3DVolumes_2Code_8cxx-example.html#_a2) > I changed my code such that a reader instance is created for each input in a for-loop: > https://github.com/romangrothausmann/ITK-CLIs/commit/ebfc0aea37d28cbbf2bb22c3f56be52453cebde9 > > However, the update from the writer seems not to propagate to the readers whether streaming or not. Can the TileImageFilter not stream in such a case or are further modifications necessary? > > Thanks for any help or hints > Roman > > > On 18/08/14 17:01, Michka Popoff wrote: >> Hi >> >> Going the way described in the CreateVolume example is the way to go. >> >> Why did you uncomment the DisconnectPipeline() call and Update() call in the for >> loop ? They need to stay there, else you will always use the last image. >> That?s why you see the same image, the single update call will be triggered at >> the end of the script and read only one image. >> >> You don?t need to call tileFilter->Update(), you can remove this line. The >> writer->Update() will take care of the pipeline update. >> As a bonus, you may wrap your writer->Update() call, to fetch errors at the end >> of the pipeline: >> >> try >> { >> writer->Update(); >> } >> catch( itk::ExceptionObject & error ) >> { >> std::cerr << "Error: " << error << std::endl; >> return EXIT_FAILURE; >> } >> >> I made a little Python prototype, the syntax is a little bit different than in >> C++ but it gives you the main idea. >> >> Michka >> > > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-2900 > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From grothausmann.roman at mh-hannover.de Fri Jul 22 06:00:26 2016 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Fri, 22 Jul 2016 12:00:26 +0200 Subject: [ITK-users] [ITK] streaming TileImageFilter for arbitrary number of inputs In-Reply-To: References: Message-ID: Many thanks Brad for Your detailed reply. I understand now the problems concerning streaming TileImageFilter. However I still wonder why my non-streaming version also does not work any more after moving the creation of reader instances into the for-loop: https://github.com/romangrothausmann/ITK-CLIs/blob/ebfc0aea37d28cbbf2bb22c3f56be52453cebde9/tile.cxx#L46-L50 Is this construct inappropriate for the TileImageFilter? Why does it work for: https://itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2ImageGrid_2AppendTwo3DVolumes_2Code_8cxx-example.html#_a2 On 21/07/16 15:41, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: > Hello, > > The TileImageFilter does not fully stream [1]. The filter also has some odd > behavior, and other older implementation details. If you are going to work on > a streaming pipelines it is best practice to examine the filters to determine > how the Requested regions behave. > > However, there is no reason that the TileImageFilter algorithm couldn?t > support streaming. It is just a matter of code and a bunch of testing. A > contribution for this issue would be welcomed! Also this filter is in need a > refactoring and bring it up to several other best practices. There are > several issue with the current implementation that would cause it not to work > correctly with a streaming pipeline, and cause excessive execution. > > You can also use the PipelieMoniotorImageFilter to record and print the > pipeline interaction during Update [2]. This information helps with debugging > and diagnosing problems, but if the pipeline is mis-behaving ( as the > TileImageFilter may ), the information may not be correct. > > I have tried similar streaming with the JoinSeriesImageFilter. However I ran > into many problems with having hundreds of ImageIO being utilized at the same > time. There were problems with having too many files open at the same time > along with ImageIO libraries that couldn?t handle single threaded access to > multiple files. > > [1] > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/ImageGrid/include/itkTileImageFilter.hxx#L125-L136 > > [2] https://itk.org/Doxygen/html/classitk_1_1PipelineMonitorImageFilter.html > >> On Jul 21, 2016, at 6:41 AM, Grothausmann, Roman Dr. >> wrote: >> >> Dear mailing list members, >> >> >> Based on the examples for TileImageFilter I've created a working CLI to >> append an arbitrary number of inputs >> (https://github.com/romangrothausmann/ITK-CLIs/blob/4fdf5778022598dcf83fb38e6002df72bd67bef3/tile.cxx). >> >> As there is an example that does not apply Update and DisconnectPipeline on the readers (https://itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2ImageGrid_2AppendTwo3DVolumes_2Code_8cxx-example.html#_a2) >> I changed my code such that a reader instance is created for each input in >> a for-loop: >> https://github.com/romangrothausmann/ITK-CLIs/commit/ebfc0aea37d28cbbf2bb22c3f56be52453cebde9 >> >> >> However, the update from the writer seems not to propagate to the readers whether streaming or not. Can the TileImageFilter not stream in such a case or are further modifications necessary? >> >> Thanks for any help or hints Roman >> >> >> On 18/08/14 17:01, Michka Popoff wrote: >>> Hi >>> >>> Going the way described in the CreateVolume example is the way to go. >>> >>> Why did you uncomment the DisconnectPipeline() call and Update() call in >>> the for loop ? They need to stay there, else you will always use the last >>> image. That?s why you see the same image, the single update call will be >>> triggered at the end of the script and read only one image. >>> >>> You don?t need to call tileFilter->Update(), you can remove this line. >>> The writer->Update() will take care of the pipeline update. As a bonus, >>> you may wrap your writer->Update() call, to fetch errors at the end of >>> the pipeline: >>> >>> try { writer->Update(); } catch( itk::ExceptionObject & error ) { >>> std::cerr << "Error: " << error << std::endl; return EXIT_FAILURE; } >>> >>> I made a little Python prototype, the syntax is a little bit different >>> than in C++ but it gives you the main idea. >>> >>> Michka >>> >> >> -- Dr. Roman Grothausmann >> >> Tomographie und Digitale Bildverarbeitung Tomography and Digital Image >> Analysis >> >> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische >> Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover >> >> Tel. +49 511 532-2900 _____________________________________ Powered by >> www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> _______________________________________________ Community mailing list >> Community at itk.org http://public.kitware.com/mailman/listinfo/community > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From blowekamp at mail.nih.gov Fri Jul 22 08:49:03 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Fri, 22 Jul 2016 12:49:03 +0000 Subject: [ITK-users] [ITK] streaming TileImageFilter for arbitrary number of inputs In-Reply-To: References: Message-ID: Hi, Who is holding the pointer to the newly created ImageFileReader outside of the loop? For that type of operation I?ll frequently just stash smart pointers into a std::vector or list. Regarding the example, look at the scope of the smart pointers with respect to the execution of the pipeline. HTH, Brad > On Jul 22, 2016, at 6:00 AM, Grothausmann, Roman Dr. wrote: > > Many thanks Brad for Your detailed reply. I understand now the problems concerning streaming TileImageFilter. > However I still wonder why my non-streaming version also does not work any more after moving the creation of reader instances into the for-loop: > https://github.com/romangrothausmann/ITK-CLIs/blob/ebfc0aea37d28cbbf2bb22c3f56be52453cebde9/tile.cxx#L46-L50 > > Is this construct inappropriate for the TileImageFilter? > Why does it work for: > https://itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2ImageGrid_2AppendTwo3DVolumes_2Code_8cxx-example.html#_a2 > > On 21/07/16 15:41, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: >> Hello, >> >> The TileImageFilter does not fully stream [1]. The filter also has some odd >> behavior, and other older implementation details. If you are going to work on >> a streaming pipelines it is best practice to examine the filters to determine >> how the Requested regions behave. >> >> However, there is no reason that the TileImageFilter algorithm couldn?t >> support streaming. It is just a matter of code and a bunch of testing. A >> contribution for this issue would be welcomed! Also this filter is in need a >> refactoring and bring it up to several other best practices. There are >> several issue with the current implementation that would cause it not to work >> correctly with a streaming pipeline, and cause excessive execution. >> >> You can also use the PipelieMoniotorImageFilter to record and print the >> pipeline interaction during Update [2]. This information helps with debugging >> and diagnosing problems, but if the pipeline is mis-behaving ( as the >> TileImageFilter may ), the information may not be correct. >> >> I have tried similar streaming with the JoinSeriesImageFilter. However I ran >> into many problems with having hundreds of ImageIO being utilized at the same >> time. There were problems with having too many files open at the same time >> along with ImageIO libraries that couldn?t handle single threaded access to >> multiple files. >> >> [1] >> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/ImageGrid/include/itkTileImageFilter.hxx#L125-L136 >> >> > [2] https://itk.org/Doxygen/html/classitk_1_1PipelineMonitorImageFilter.html >> >>> On Jul 21, 2016, at 6:41 AM, Grothausmann, Roman Dr. >>> wrote: >>> >>> Dear mailing list members, >>> >>> >>> Based on the examples for TileImageFilter I've created a working CLI to >>> append an arbitrary number of inputs >>> (https://github.com/romangrothausmann/ITK-CLIs/blob/4fdf5778022598dcf83fb38e6002df72bd67bef3/tile.cxx). >>> >>> > As there is an example that does not apply Update and DisconnectPipeline on the readers (https://itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2ImageGrid_2AppendTwo3DVolumes_2Code_8cxx-example.html#_a2) >>> I changed my code such that a reader instance is created for each input in >>> a for-loop: >>> https://github.com/romangrothausmann/ITK-CLIs/commit/ebfc0aea37d28cbbf2bb22c3f56be52453cebde9 >>> >>> >>> > However, the update from the writer seems not to propagate to the readers whether streaming or not. Can the TileImageFilter not stream in such a case or are further modifications necessary? >>> >>> Thanks for any help or hints Roman >>> >>> >>> On 18/08/14 17:01, Michka Popoff wrote: >>>> Hi >>>> >>>> Going the way described in the CreateVolume example is the way to go. >>>> >>>> Why did you uncomment the DisconnectPipeline() call and Update() call in >>>> the for loop ? They need to stay there, else you will always use the last >>>> image. That?s why you see the same image, the single update call will be >>>> triggered at the end of the script and read only one image. >>>> >>>> You don?t need to call tileFilter->Update(), you can remove this line. >>>> The writer->Update() will take care of the pipeline update. As a bonus, >>>> you may wrap your writer->Update() call, to fetch errors at the end of >>>> the pipeline: >>>> >>>> try { writer->Update(); } catch( itk::ExceptionObject & error ) { >>>> std::cerr << "Error: " << error << std::endl; return EXIT_FAILURE; } >>>> >>>> I made a little Python prototype, the syntax is a little bit different >>>> than in C++ but it gives you the main idea. >>>> >>>> Michka >>>> >>> >>> -- Dr. Roman Grothausmann >>> >>> Tomographie und Digitale Bildverarbeitung Tomography and Digital Image >>> Analysis >>> >>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische >>> Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover >>> >>> Tel. +49 511 532-2900 _____________________________________ Powered by >>> www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> _______________________________________________ Community mailing list >>> Community at itk.org http://public.kitware.com/mailman/listinfo/community >> > > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-2900 From amirhossein.jaberzadeh at gmail.com Fri Jul 22 11:27:51 2016 From: amirhossein.jaberzadeh at gmail.com (Amir Jaberzadeh) Date: Fri, 22 Jul 2016 11:27:51 -0400 Subject: [ITK-users] Insight journal dataset upload error Message-ID: Dear all, I am submitting an insight journal paper, while uploading my example dataset, it is not possible to upload a file larger than 10 MB. I would like to upload a 89 MB zip file and attaching them one by one was the only solution I could find so far. I appreciate your help in advance, Amir -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Fri Jul 22 12:42:14 2016 From: tossin at gmail.com (Evan Kao) Date: Fri, 22 Jul 2016 09:42:14 -0700 Subject: [ITK-users] Target Machine type error when trying to build 64-bit ITK using VS2015 In-Reply-To: References: Message-ID: Thanks D?enan, that was really helpful. I was able to build it successfully. - Evan On Wed, Jul 20, 2016 at 5:00 PM, D?enan Zuki? wrote: > Hi Evan, > > you need to select "Visual Studio 14 2015 Win64" as the generator: > [image: Inline image 3] > > The result of this should be that you only have x64 platform in Visual > Studio: > [image: Inline image 2] > > Regards, > D?enan > > On Wed, Jul 20, 2016 at 7:09 PM, Evan Kao wrote: > >> Hello all, >> >> This may be more of a Visual Studio issue than an ITK issue, but I was >> wondering if anyone else found a way around this. I'm trying to build ITK >> 4.10.0 on a Windows 7 64-bit machine with Python (2.7 64-bit) wrapping >> using Visual Studio 2015. I should add I'm not familiar with either CMake, >> ITK, or Visual Studio so I could be missing something obvious. >> >> I keep getting the following error for multiple *.obj files: >> x64\Release\*.obj : fatal error LNK1112: module machine type 'x64' >> conflicts with target machine type 'X86' >> >> I noticed that CMake generates vxproj files for only Win32 by default. >> Then the files are modified by Visual Studio when switching the platform to >> x64 and selecting "Clean Solution", which adds the following lines, among >> others: >> >> Release >> x64 >> >> However, many individual sub-projects are still not updated to account >> for x64 configurations. I took a look at the Advanced CMAKE variables >> in the CMake GUI, but had no idea what to modify (everything seems to >> target Win32). >> >> Is there a way to configure CMake to generate x64 files? If not, does >> anyone know how to correctly configure ITK on x64 platforms in VS2015? >> >> Thanks, >> Evan Kao >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2016-07-20 19.58.16.png Type: image/png Size: 26364 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2016-07-20 19.54.04.png Type: image/png Size: 17634 bytes Desc: not available URL: From aharr8 at uwo.ca Sun Jul 24 08:26:13 2016 From: aharr8 at uwo.ca (Andrew Harris) Date: Sun, 24 Jul 2016 08:26:13 -0400 Subject: [ITK-users] Fwd: MeanSquaresImageToImageMetricv4 with unsigned char PixelType results in error C2440 In-Reply-To: References: Message-ID: Hello, I am attempting to build the example in section 3.6.4 of the 2nd volume Insight Toolkit user guide to read unsigned char data rather than float. I have narrowed the error I?m getting down to the MeanSquaresImageToImageMetricv4, and the error I?m getting is: error C2440: ?initializing?: cannot convert from ?itk::Concept::Detail::UniqueType_bool? to ?itk::Concept::Detail::UniqueType_bool? I am using Visual Studio 2013 and ITK 4.10.0, any ideas on how to fix this would be helpful. I read the Microsoft Compiler Error documentation but didn?t really understand it. -- AH ----------------------------------------------------------------------------------------------- *This email and any attachments thereto may contain private, confidential, and privileged materials for the sole use of the intended recipient. Any reviewing, copying, or distribution of this email (or any attachments thereto) by other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently destroy this email and any attachments thereto.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Sun Jul 24 21:05:36 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 24 Jul 2016 21:05:36 -0400 Subject: [ITK-users] Fwd: MeanSquaresImageToImageMetricv4 with unsigned char PixelType results in error C2440 In-Reply-To: References: Message-ID: Hi Andrew, This itk::ConceptCheck [1] says that the pixel values must be float to be used in itk::MeanSquaresImageToImageMetricv4 -- use an itk::CastImageFilter to change the pixel type. HTH, Matt [1] https://itk.org/Wiki/ITK/Proposals:Concept_Checking On Sun, Jul 24, 2016 at 8:26 AM, Andrew Harris wrote: > Hello, > I am attempting to build the example in section 3.6.4 of the 2nd volume > Insight Toolkit user guide to read unsigned char data rather than float. I > have narrowed the error I?m getting down to the > MeanSquaresImageToImageMetricv4, and the error I?m getting is: > > error C2440: ?initializing?: cannot convert from > ?itk::Concept::Detail::UniqueType_bool? to > ?itk::Concept::Detail::UniqueType_bool? > > I am using Visual Studio 2013 and ITK 4.10.0, any ideas on how to fix this > would be helpful. I read the Microsoft Compiler Error documentation but > didn?t really understand it. > > -- > > AH > > > ----------------------------------------------------------------------------------------------- > > This email and any attachments thereto may contain private, confidential, > and privileged materials for the sole use of the intended recipient. Any > reviewing, copying, or distribution of this email (or any attachments > thereto) by other than the intended recipient is strictly prohibited. If you > are not the intended recipient, please contact the sender immediately and > permanently destroy this email and any attachments thereto. > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From grothausmann.roman at mh-hannover.de Mon Jul 25 08:07:30 2016 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Mon, 25 Jul 2016 14:07:30 +0200 Subject: [ITK-users] [ITK] streaming TileImageFilter for arbitrary number of inputs In-Reply-To: References: Message-ID: Many thanks Brad for the hint of the smart pointer scope and storing it in std::vector, at least the non-SDI version now works as expected. On 22/07/16 14:49, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: > Hi, > > Who is holding the pointer to the newly created ImageFileReader outside of > the loop? For that type of operation I?ll frequently just stash smart > pointers into a std::vector or list. > > Regarding the example, look at the scope of the smart pointers with respect > to the execution of the pipeline. > > HTH, Brad > > >> On Jul 22, 2016, at 6:00 AM, Grothausmann, Roman Dr. >> wrote: >> >> Many thanks Brad for Your detailed reply. I understand now the problems >> concerning streaming TileImageFilter. However I still wonder why my >> non-streaming version also does not work any more after moving the creation >> of reader instances into the for-loop: >> https://github.com/romangrothausmann/ITK-CLIs/blob/ebfc0aea37d28cbbf2bb22c3f56be52453cebde9/tile.cxx#L46-L50 >> >> >> Is this construct inappropriate for the TileImageFilter? >> Why does it work for: >> https://itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2ImageGrid_2AppendTwo3DVolumes_2Code_8cxx-example.html#_a2 >> >> >> On 21/07/16 15:41, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: >>> Hello, >>> >>> The TileImageFilter does not fully stream [1]. The filter also has some >>> odd behavior, and other older implementation details. If you are going to >>> work on a streaming pipelines it is best practice to examine the filters >>> to determine how the Requested regions behave. >>> >>> However, there is no reason that the TileImageFilter algorithm couldn?t >>> support streaming. It is just a matter of code and a bunch of testing. A >>> contribution for this issue would be welcomed! Also this filter is in >>> need a refactoring and bring it up to several other best practices. There >>> are several issue with the current implementation that would cause it not >>> to work correctly with a streaming pipeline, and cause excessive >>> execution. >>> >>> You can also use the PipelieMoniotorImageFilter to record and print the >>> pipeline interaction during Update [2]. This information helps with >>> debugging and diagnosing problems, but if the pipeline is mis-behaving ( >>> as the TileImageFilter may ), the information may not be correct. >>> >>> I have tried similar streaming with the JoinSeriesImageFilter. However I >>> ran into many problems with having hundreds of ImageIO being utilized at >>> the same time. There were problems with having too many files open at the >>> same time along with ImageIO libraries that couldn?t handle single >>> threaded access to multiple files. >>> >>> [1] >>> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/ImageGrid/include/itkTileImageFilter.hxx#L125-L136 >>> >>> >> >>> [2] https://itk.org/Doxygen/html/classitk_1_1PipelineMonitorImageFilter.html >>> >>>> On Jul 21, 2016, at 6:41 AM, Grothausmann, Roman Dr. >>>> wrote: >>>> >>>> Dear mailing list members, >>>> >>>> >>>> Based on the examples for TileImageFilter I've created a working CLI >>>> to append an arbitrary number of inputs >>>> (https://github.com/romangrothausmann/ITK-CLIs/blob/4fdf5778022598dcf83fb38e6002df72bd67bef3/tile.cxx). >>>> >>>> >> >>>> As there is an example that does not apply Update and DisconnectPipeline on the readers (https://itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2ImageGrid_2AppendTwo3DVolumes_2Code_8cxx-example.html#_a2) >>>> I changed my code such that a reader instance is created for each input >>>> in a for-loop: >>>> https://github.com/romangrothausmann/ITK-CLIs/commit/ebfc0aea37d28cbbf2bb22c3f56be52453cebde9 >>>> >>>> >>>> >> >>>> However, the update from the writer seems not to propagate to the readers whether streaming or not. Can the TileImageFilter not stream in such a case or are further modifications necessary? >>>> >>>> Thanks for any help or hints Roman >>>> >>>> >>>> On 18/08/14 17:01, Michka Popoff wrote: >>>>> Hi >>>>> >>>>> Going the way described in the CreateVolume example is the way to >>>>> go. >>>>> >>>>> Why did you uncomment the DisconnectPipeline() call and Update() call >>>>> in the for loop ? They need to stay there, else you will always use >>>>> the last image. That?s why you see the same image, the single update >>>>> call will be triggered at the end of the script and read only one >>>>> image. >>>>> >>>>> You don?t need to call tileFilter->Update(), you can remove this >>>>> line. The writer->Update() will take care of the pipeline update. As >>>>> a bonus, you may wrap your writer->Update() call, to fetch errors at >>>>> the end of the pipeline: >>>>> >>>>> try { writer->Update(); } catch( itk::ExceptionObject & error ) { >>>>> std::cerr << "Error: " << error << std::endl; return EXIT_FAILURE; } >>>>> >>>>> I made a little Python prototype, the syntax is a little bit >>>>> different than in C++ but it gives you the main idea. >>>>> >>>>> Michka >>>>> >>>> >>>> -- Dr. Roman Grothausmann >>>> >>>> Tomographie und Digitale Bildverarbeitung Tomography and Digital Image >>>> Analysis >>>> >>>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>>> Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover >>>> >>>> Tel. +49 511 532-2900 _____________________________________ Powered by >>>> www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> _______________________________________________ Community mailing list >>>> Community at itk.org http://public.kitware.com/mailman/listinfo/community >>> >> >> -- Dr. Roman Grothausmann >> >> Tomographie und Digitale Bildverarbeitung Tomography and Digital Image >> Analysis >> >> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische >> Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover >> >> Tel. +49 511 532-2900 > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From dzenanz at gmail.com Tue Jul 26 09:15:06 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 26 Jul 2016 09:15:06 -0400 Subject: [ITK-users] Image spacing In-Reply-To: References: Message-ID: Hi Meikolin, sp is a ImageType::SpacingType variable which is assigned on the line before. If you couldn't deduce that, you should really try going through ITK software guide . Spacing is described in chapter about data representation , section "Defining Origin and Spacing". Regards, D?enan On Tue, Jul 26, 2016 at 4:21 AM, meikolin saimara wrote: > what is sp [0] and sp [1] sir?? > > On Mon, Jul 25, 2016 at 8:25 PM, D?enan Zuki? wrote: > >> Hi Meikolin, >> >> you have image spacing, which gives you the size of one pixel/voxel: >> sp=image->GetSpacing(); >> pixelSize=sp[0]*sp[1]; //square millimeters >> >> Regards, >> D?enan >> >> On Mon, Jul 25, 2016 at 3:10 AM, meikolin saimara >> wrote: >> >>> maybe one pixel = .......Square millimeters??? >>> >>> >>> On Mon, Jul 25, 2016 at 1:45 PM, meikolin saimara >>> wrote: >>> >>>> sir I have question ?? >>>> after we got number of pixel and large of the pixel... >>>> I want to know how we can get the large of the pixel I mean the formula >>>> for it not the source code >>>> maybe can you give me some journal for it. >>>> >>>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aharr8 at uwo.ca Tue Jul 26 13:43:28 2016 From: aharr8 at uwo.ca (Andrew Harris) Date: Tue, 26 Jul 2016 13:43:28 -0400 Subject: [ITK-users] [ITK] itk::CastImageFilter causes AccessViolationException Message-ID: Hello, I am attempting to use the CastImageFilter to convert between unsigned char and float image types, and am getting a System.AccessViolationException at runtime. I have seen reference to this being caused by referring to a pointer that is out of scope, but in this case both the image and the cast filter are delcared in the same method, so I?m not sure how it can be going out of scope. I can include the header and definition files if that would be helpful. -- AH ----------------------------------------------------------------------------------------------- *This email and any attachments thereto may contain private, confidential, and privileged materials for the sole use of the intended recipient. Any reviewing, copying, or distribution of this email (or any attachments thereto) by other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently destroy this email and any attachments thereto.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad at lowekamp.net Tue Jul 26 19:09:52 2016 From: brad at lowekamp.net (Bradley Lowekamp) Date: Tue, 26 Jul 2016 19:09:52 -0400 Subject: [ITK-users] [ITK] itk::CastImageFilter causes AccessViolationException In-Reply-To: References: Message-ID: Hello, The most common mistake here would be forgetting to call Allocate on your image. Beyond that sharing your code would be helpful. Brad > On Jul 26, 2016, at 1:43 PM, Andrew Harris wrote: > > Hello, > I am attempting to use the CastImageFilter to convert between unsigned char and float image types, and am getting a System.AccessViolationException at runtime. I have seen reference to this being caused by referring to a pointer that is out of scope, but in this case both the image and the cast filter are delcared in the same method, so I?m not sure how it can be going out of scope. I can include the header and definition files if that would be helpful. > -- > > AH > > > > ----------------------------------------------------------------------------------------------- > > This email and any attachments thereto may contain private, confidential, and privileged materials for the sole use of the intended recipient. Any reviewing, copying, or distribution of this email (or any attachments thereto) by other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently destroy this email and any attachments thereto. > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Tue Jul 26 23:28:36 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Wed, 27 Jul 2016 03:28:36 +0000 Subject: [ITK-users] SimpleITK 0.10 Release Candidate 2 Message-ID: Hi! We are pleased to announce the SimpleITK 0.10 Release Candidate 2 is now available! The release is expected to follow shortly. There have been many improvements to better support wrapping for R. SimpleITK for R needs to be compiled from the source. The Python Java and CSharp binaries are available for download from Source Forge: https://sourceforge.net/projects/simpleitk/files/SimpleITK/0.10rc2/ The latest versions of ?pip? is recommended to install the downloaded binary wheel for Python. Python eggs are no longer being distributed. You are encouraged to checkout SimpleITK?s master branch in the git repository for testing building from the source code. Also we have packages for the Anaconda Python distributions in the SimpleITK group and under the ?dev" label. These packages can be installed with the following command: $ conda install -c https://conda.anaconda.org/simpleitk/label/dev SimpleITK Since the 0.10rc1, there have been a number of configuration and fixes to support gcc 6.1. Additionally, new examples and updated documentation. Please see the git long for further information Key Improvements since 0.9.1: * The R language bindings have received extensive improvements and bug fixes. * Added Image::SetMetaData method * Added LandmarkBasedTransformInitializer * Added MultiLableSTAPLEImageFilter * Default sitk::Show support for Fiji over ImageJ * Moved third-party packages Lua, gtest, virtualenv from source code to Superbuild projects * Added Forbid Download option * Enabled each language wrapping to be an independent project dependent on SimpleITK C++ interface and libraries. * Lua languages bindings now compile as a loadable module * Many CMake build improvements to default configurations * CMake version 3.3 is now required Enjoy! Brad From dzenanz at gmail.com Wed Jul 27 14:37:34 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 27 Jul 2016 14:37:34 -0400 Subject: [ITK-users] Image spacing In-Reply-To: References: Message-ID: That depends on you image. Try this example with your image. Regards On Wed, Jul 27, 2016 at 1:27 PM, meikolin saimara wrote: > what is the value of sp[0 ] and sp[1] sir?? > > On Tue, Jul 26, 2016 at 8:15 PM, D?enan Zuki? wrote: > >> Hi Meikolin, >> >> sp is a ImageType::SpacingType variable which is assigned on the line >> before. >> >> If you couldn't deduce that, you should really try going through ITK >> software guide . Spacing is >> described in chapter about data representation >> , >> section "Defining Origin and Spacing". >> >> Regards, >> D?enan >> >> On Tue, Jul 26, 2016 at 4:21 AM, meikolin saimara >> wrote: >> >>> what is sp [0] and sp [1] sir?? >>> >>> On Mon, Jul 25, 2016 at 8:25 PM, D?enan Zuki? wrote: >>> >>>> Hi Meikolin, >>>> >>>> you have image spacing, which gives you the size of one pixel/voxel: >>>> sp=image->GetSpacing(); >>>> pixelSize=sp[0]*sp[1]; //square millimeters >>>> >>>> Regards, >>>> D?enan >>>> >>>> On Mon, Jul 25, 2016 at 3:10 AM, meikolin saimara >>>> wrote: >>>> >>>>> maybe one pixel = .......Square millimeters??? >>>>> >>>>> >>>>> On Mon, Jul 25, 2016 at 1:45 PM, meikolin saimara >>>> > wrote: >>>>> >>>>>> sir I have question ?? >>>>>> after we got number of pixel and large of the pixel... >>>>>> I want to know how we can get the large of the pixel I mean the >>>>>> formula for it not the source code >>>>>> maybe can you give me some journal for it. >>>>>> >>>>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aharr8 at uwo.ca Wed Jul 27 15:54:39 2016 From: aharr8 at uwo.ca (Andrew Harris) Date: Wed, 27 Jul 2016 15:54:39 -0400 Subject: [ITK-users] [ITK] itk::CastImageFilter causes AccessViolationException In-Reply-To: References: Message-ID: Thanks for getting back to me, after conferring with a colleague I tried using the output of the cast filter directly in the subsequent pipeline rather than writing it to a new image object of the filter's output type. I got the same error doing that, and also got the same error just running Update() on the cast filter, which leads me to believe I'm doing something wrong in setting up the cast filter. I'm attaching my code for the class I'm writing, hope it's something simple I'm doing wrong. Currently it's throwing the exception at line 85 when the registration transform initializer is activated. -- AH ----------------------------------------------------------------------------------------------- *This email and any attachments thereto may contain private, confidential, and privileged materials for the sole use of the intended recipient. Any reviewing, copying, or distribution of this email (or any attachments thereto) by other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently destroy this email and any attachments thereto.* On Tue, Jul 26, 2016 at 7:09 PM, Bradley Lowekamp wrote: > Hello, > > The most common mistake here would be forgetting to call Allocate on your > image. Beyond that sharing your code would be helpful. > > Brad > > On Jul 26, 2016, at 1:43 PM, Andrew Harris wrote: > > Hello, > I am attempting to use the CastImageFilter to convert between unsigned > char and float image types, and am getting a > System.AccessViolationException at runtime. I have seen reference to this > being caused by referring to a pointer that is out of scope, but in this > case both the image and the cast filter are delcared in the same method, so > I?m not sure how it can be going out of scope. I can include the header > and definition files if that would be helpful. > > -- > > AH > > > > ----------------------------------------------------------------------------------------------- > > *This email and any attachments thereto may contain private, > confidential, and privileged materials for the sole use of the intended > recipient. Any reviewing, copying, or distribution of this email (or any > attachments thereto) by other than the intended recipient is strictly > prohibited. If you are not the intended recipient, please contact the > sender immediately and permanently destroy this email and any attachments > thereto.* > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Correlator3D.cpp Type: text/x-c++src Size: 4425 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Correlator3D.h Type: text/x-chdr Size: 2256 bytes Desc: not available URL: From dzenanz at gmail.com Wed Jul 27 17:16:45 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 27 Jul 2016 17:16:45 -0400 Subject: [ITK-users] [ITK] itk::CastImageFilter causes AccessViolationException In-Reply-To: References: Message-ID: Hi Andrew, I think that line 62 of .cpp should be: castFilter->Update(); I don't see the pipeline updated elsewhere. Regards, D?enan On Wed, Jul 27, 2016 at 3:54 PM, Andrew Harris wrote: > Thanks for getting back to me, after conferring with a colleague I tried > using the output of the cast filter directly in the subsequent pipeline > rather than writing it to a new image object of the filter's output type. I > got the same error doing that, and also got the same error just running > Update() on the cast filter, which leads me to believe I'm doing something > wrong in setting up the cast filter. I'm attaching my code for the class > I'm writing, hope it's something simple I'm doing wrong. Currently it's > throwing the exception at line 85 when the registration transform > initializer is activated. > > -- > > AH > > > > ----------------------------------------------------------------------------------------------- > > *This email and any attachments thereto may contain private, > confidential, and privileged materials for the sole use of the intended > recipient. Any reviewing, copying, or distribution of this email (or any > attachments thereto) by other than the intended recipient is strictly > prohibited. If you are not the intended recipient, please contact the > sender immediately and permanently destroy this email and any attachments > thereto.* > > On Tue, Jul 26, 2016 at 7:09 PM, Bradley Lowekamp > wrote: > >> Hello, >> >> The most common mistake here would be forgetting to call Allocate on your >> image. Beyond that sharing your code would be helpful. >> >> Brad >> >> On Jul 26, 2016, at 1:43 PM, Andrew Harris wrote: >> >> Hello, >> I am attempting to use the CastImageFilter to convert between unsigned >> char and float image types, and am getting a >> System.AccessViolationException at runtime. I have seen reference to this >> being caused by referring to a pointer that is out of scope, but in this >> case both the image and the cast filter are delcared in the same method, so >> I?m not sure how it can be going out of scope. I can include the header >> and definition files if that would be helpful. >> >> -- >> >> AH >> >> >> >> ----------------------------------------------------------------------------------------------- >> >> *This email and any attachments thereto may contain private, >> confidential, and privileged materials for the sole use of the intended >> recipient. Any reviewing, copying, or distribution of this email (or any >> attachments thereto) by other than the intended recipient is strictly >> prohibited. If you are not the intended recipient, please contact the >> sender immediately and permanently destroy this email and any attachments >> thereto.* >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 aharr8 at uwo.ca Wed Jul 27 20:26:08 2016 From: aharr8 at uwo.ca (Andrew Harris) Date: Wed, 27 Jul 2016 20:26:08 -0400 Subject: [ITK-users] [ITK] itk::CastImageFilter causes AccessViolationException In-Reply-To: References: Message-ID: Thanks D?enan, as I said in my previous email running Update() on the castFilter pointer returns the same error. I did put in a try/catch block to update it though. -- AH ----------------------------------------------------------------------------------------------- *This email and any attachments thereto may contain private, confidential, and privileged materials for the sole use of the intended recipient. Any reviewing, copying, or distribution of this email (or any attachments thereto) by other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently destroy this email and any attachments thereto.* On Wed, Jul 27, 2016 at 5:16 PM, D?enan Zuki? wrote: > Hi Andrew, > > I think that line 62 of .cpp should be: > castFilter->Update(); > I don't see the pipeline updated elsewhere. > > Regards, > D?enan > > On Wed, Jul 27, 2016 at 3:54 PM, Andrew Harris wrote: > >> Thanks for getting back to me, after conferring with a colleague I tried >> using the output of the cast filter directly in the subsequent pipeline >> rather than writing it to a new image object of the filter's output type. I >> got the same error doing that, and also got the same error just running >> Update() on the cast filter, which leads me to believe I'm doing something >> wrong in setting up the cast filter. I'm attaching my code for the class >> I'm writing, hope it's something simple I'm doing wrong. Currently it's >> throwing the exception at line 85 when the registration transform >> initializer is activated. >> >> -- >> >> AH >> >> >> >> ----------------------------------------------------------------------------------------------- >> >> *This email and any attachments thereto may contain private, >> confidential, and privileged materials for the sole use of the intended >> recipient. Any reviewing, copying, or distribution of this email (or any >> attachments thereto) by other than the intended recipient is strictly >> prohibited. If you are not the intended recipient, please contact the >> sender immediately and permanently destroy this email and any attachments >> thereto.* >> >> On Tue, Jul 26, 2016 at 7:09 PM, Bradley Lowekamp >> wrote: >> >>> Hello, >>> >>> The most common mistake here would be forgetting to call Allocate on >>> your image. Beyond that sharing your code would be helpful. >>> >>> Brad >>> >>> On Jul 26, 2016, at 1:43 PM, Andrew Harris wrote: >>> >>> Hello, >>> I am attempting to use the CastImageFilter to convert between unsigned >>> char and float image types, and am getting a >>> System.AccessViolationException at runtime. I have seen reference to this >>> being caused by referring to a pointer that is out of scope, but in this >>> case both the image and the cast filter are delcared in the same method, so >>> I?m not sure how it can be going out of scope. I can include the header >>> and definition files if that would be helpful. >>> >>> -- >>> >>> AH >>> >>> >>> >>> ----------------------------------------------------------------------------------------------- >>> >>> *This email and any attachments thereto may contain private, >>> confidential, and privileged materials for the sole use of the intended >>> recipient. Any reviewing, copying, or distribution of this email (or any >>> attachments thereto) by other than the intended recipient is strictly >>> prohibited. If you are not the intended recipient, please contact the >>> sender immediately and permanently destroy this email and any attachments >>> thereto.* >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 hebennink at gmail.com Thu Jul 28 04:37:35 2016 From: hebennink at gmail.com (Edwin Bennink) Date: Thu, 28 Jul 2016 10:37:35 +0200 Subject: [ITK-users] In-place extraction of N-1 dimensional images from N dimensional images Message-ID: Hello, I am working on an ITK/VTK viewer for visualizing 3D+time image data. The data is represented by 4D images in ITK (x,y,z,t). I would like to be able to access the 3D data in VTK without copying it, since that would slow down scrolling through time in large datasets. I noticed that, although in-place extraction should be possible, the ExtractImageFilter 'says no' to in-place extraction when the input and output dimensions differ. Does anyone know a way to achieve my goal using existing ITK functions? For example, if there would be some way of reducing the dimension of 'flat' images, i.e. 3D (Nx,Ny,1) to 2D (Nx, Ny), then I could still use the ExtractImageFilter. Best, Edwin -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at insightsoftwareconsortium.org Thu Jul 28 05:13:18 2016 From: noreply at insightsoftwareconsortium.org (Insight Journal) Date: Thu, 28 Jul 2016 05:13:18 -0400 (EDT) Subject: [ITK-users] New Submission: A new implementation of itk::ImageToImageFilter for efficient parallelization of image processing algorithms using Intel Threading Building Blocks Message-ID: <20160728091318.B625A3D6205E@insight-journal.org> Hello, A new submission has been added to the Insight Journal. Title: A new implementation of itk::ImageToImageFilter for efficient parallelization of image processing algorithms using Intel Threading Building Blocks Authors: Jaberzadeh A., Scherrer B., Warfield S. Abstract: Modern medical imaging makes use of high performance computing to accelerate image acquisition, image reconstruction, image visualization and image analysis. Software libraries that provide implementations of key medical imaging algorithms need to efficiently exploit modern CPU architectures. In particular, workstations with small numbers of cores are being replaced by very high core count architectures, and by many integrated core architectures, which offer acceleration by vectorization and multi-threading. The Insight Toolkit (ITK) is the premier open source implementation of medical imaging algorithms, with a generic design for image processing filters that allows for many developers to rapidly incorporate these algorithms in to new applications. While ITK filters benefit from a generic, platform independent multithreading capability, the current implementation is difficult to exploit to achieve very high performance. Specifically, ITK relies on a static decomposition of the image into subsets of equal size which can be highly inefficient. Threads that terminate early due to uneven work throughout the image finish early and do not contribute further to the processing of more complex regions, leading to idle computational resources and longer execution times. Performance is also difficult to coordinate across multiple algorithms, as the ITK filter assumes each filter operates independently but the global implementation has an impact across filters. In this work, we propose a novel, simple to use, high performance multithreading capability for ITK that accelerates the itk::ImageToImageFilter. We utilise a workpile data decomposition strategy, and leave the task of optimal job scheduling on CPU cores to the library called Threading Building Blocks (TBB). We demonstrate the efficacy of multi-threading with TBB in comparison to the itk::Multithreader class, through three simple example image analysis algorithms. Our implementation provides a new multi-threaded itk::ImageToImageFilter that can be conveniently reused to provide simple and efficient multi-threaded code across applications and algorithm libraries. Our new implementation is distributed as open-source software to the community and is straightforward to adopt. Download and review this publication at: http://hdl.handle.net/10380/3560 Generated by the Insight Journal You are receiving this email because you asked to be informed by the Insight Journal for new submissions. To change your email preference visit http://www.insight-journal.org/ . From dzenanz at gmail.com Thu Jul 28 08:29:46 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 28 Jul 2016 08:29:46 -0400 Subject: [ITK-users] [ITK] itk::CastImageFilter causes AccessViolationException In-Reply-To: References: Message-ID: Have you tried calling Update on the import filter? That might be the problem. Cast filter is simple and non-special, I doubt it is the problem. On Wed, Jul 27, 2016 at 8:26 PM, Andrew Harris wrote: > Thanks D?enan, as I said in my previous email running Update() on the > castFilter pointer returns the same error. I did put in a try/catch block > to update it though. > > -- > > AH > > > > ----------------------------------------------------------------------------------------------- > > *This email and any attachments thereto may contain private, > confidential, and privileged materials for the sole use of the intended > recipient. Any reviewing, copying, or distribution of this email (or any > attachments thereto) by other than the intended recipient is strictly > prohibited. If you are not the intended recipient, please contact the > sender immediately and permanently destroy this email and any attachments > thereto.* > > On Wed, Jul 27, 2016 at 5:16 PM, D?enan Zuki? wrote: > >> Hi Andrew, >> >> I think that line 62 of .cpp should be: >> castFilter->Update(); >> I don't see the pipeline updated elsewhere. >> >> Regards, >> D?enan >> >> On Wed, Jul 27, 2016 at 3:54 PM, Andrew Harris wrote: >> >>> Thanks for getting back to me, after conferring with a colleague I tried >>> using the output of the cast filter directly in the subsequent pipeline >>> rather than writing it to a new image object of the filter's output type. I >>> got the same error doing that, and also got the same error just running >>> Update() on the cast filter, which leads me to believe I'm doing something >>> wrong in setting up the cast filter. I'm attaching my code for the class >>> I'm writing, hope it's something simple I'm doing wrong. Currently it's >>> throwing the exception at line 85 when the registration transform >>> initializer is activated. >>> >>> -- >>> >>> AH >>> >>> >>> >>> ----------------------------------------------------------------------------------------------- >>> >>> *This email and any attachments thereto may contain private, >>> confidential, and privileged materials for the sole use of the intended >>> recipient. Any reviewing, copying, or distribution of this email (or any >>> attachments thereto) by other than the intended recipient is strictly >>> prohibited. If you are not the intended recipient, please contact the >>> sender immediately and permanently destroy this email and any attachments >>> thereto.* >>> >>> On Tue, Jul 26, 2016 at 7:09 PM, Bradley Lowekamp >>> wrote: >>> >>>> Hello, >>>> >>>> The most common mistake here would be forgetting to call Allocate on >>>> your image. Beyond that sharing your code would be helpful. >>>> >>>> Brad >>>> >>>> On Jul 26, 2016, at 1:43 PM, Andrew Harris wrote: >>>> >>>> Hello, >>>> I am attempting to use the CastImageFilter to convert between unsigned >>>> char and float image types, and am getting a >>>> System.AccessViolationException at runtime. I have seen reference to this >>>> being caused by referring to a pointer that is out of scope, but in this >>>> case both the image and the cast filter are delcared in the same method, so >>>> I?m not sure how it can be going out of scope. I can include the header >>>> and definition files if that would be helpful. >>>> >>>> -- >>>> >>>> AH >>>> >>>> >>>> >>>> ----------------------------------------------------------------------------------------------- >>>> >>>> *This email and any attachments thereto may contain private, >>>> confidential, and privileged materials for the sole use of the intended >>>> recipient. Any reviewing, copying, or distribution of this email (or any >>>> attachments thereto) by other than the intended recipient is strictly >>>> prohibited. If you are not the intended recipient, please contact the >>>> sender immediately and permanently destroy this email and any attachments >>>> thereto.* >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the 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 dzenanz at gmail.com Thu Jul 28 08:40:51 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 28 Jul 2016 08:40:51 -0400 Subject: [ITK-users] In-place extraction of N-1 dimensional images from N dimensional images In-Reply-To: References: Message-ID: Hi Edwin, you should be able to achieve your goal using import image filter . ITK has import image filter too , so you can decide in which library to do dimensional reduction. Regards, D?enan On Thu, Jul 28, 2016 at 4:37 AM, Edwin Bennink wrote: > Hello, > > I am working on an ITK/VTK viewer for visualizing 3D+time image data. The > data is represented by 4D images in ITK (x,y,z,t). I would like to be able > to access the 3D data in VTK without copying it, since that would slow down > scrolling through time in large datasets. I noticed that, although in-place > extraction should be possible, the ExtractImageFilter 'says no' to in-place > extraction when the input and output dimensions differ. Does anyone know a > way to achieve my goal using existing ITK functions? For example, if there > would be some way of reducing the dimension of 'flat' images, i.e. 3D > (Nx,Ny,1) to 2D (Nx, Ny), then I could still use the ExtractImageFilter. > > Best, > Edwin > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad at lowekamp.net Thu Jul 28 09:01:57 2016 From: brad at lowekamp.net (Bradley Lowekamp) Date: Thu, 28 Jul 2016 09:01:57 -0400 Subject: [ITK-users] [ITK] itk::CastImageFilter causes AccessViolationException In-Reply-To: References: Message-ID: <673C89C9-8EAE-47FE-B38A-8762FDE10734@lowekamp.net> Hello, I noticed you are using type int for you imageSiize. How big is your image? You may be overflowing when computing the number of pixels. I don?t think you have provided a stack trace of when the error occurs. That would be helpful too. Brad > On Jul 28, 2016, at 8:29 AM, D?enan Zuki? wrote: > > Have you tried calling Update on the import filter? That might be the problem. Cast filter is simple and non-special, I doubt it is the problem. > > On Wed, Jul 27, 2016 at 8:26 PM, Andrew Harris > wrote: > Thanks D?enan, as I said in my previous email running Update() on the castFilter pointer returns the same error. I did put in a try/catch block to update it though. > > -- > > AH > > > > ----------------------------------------------------------------------------------------------- > > This email and any attachments thereto may contain private, confidential, and privileged materials for the sole use of the intended recipient. Any reviewing, copying, or distribution of this email (or any attachments thereto) by other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently destroy this email and any attachments thereto. > > > On Wed, Jul 27, 2016 at 5:16 PM, D?enan Zuki? > wrote: > Hi Andrew, > > I think that line 62 of .cpp should be: > castFilter->Update(); > I don't see the pipeline updated elsewhere. > > Regards, > D?enan > > On Wed, Jul 27, 2016 at 3:54 PM, Andrew Harris > wrote: > Thanks for getting back to me, after conferring with a colleague I tried using the output of the cast filter directly in the subsequent pipeline rather than writing it to a new image object of the filter's output type. I got the same error doing that, and also got the same error just running Update() on the cast filter, which leads me to believe I'm doing something wrong in setting up the cast filter. I'm attaching my code for the class I'm writing, hope it's something simple I'm doing wrong. Currently it's throwing the exception at line 85 when the registration transform initializer is activated. > > -- > > AH > > > > ----------------------------------------------------------------------------------------------- > > This email and any attachments thereto may contain private, confidential, and privileged materials for the sole use of the intended recipient. Any reviewing, copying, or distribution of this email (or any attachments thereto) by other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently destroy this email and any attachments thereto. > > > On Tue, Jul 26, 2016 at 7:09 PM, Bradley Lowekamp > wrote: > Hello, > > The most common mistake here would be forgetting to call Allocate on your image. Beyond that sharing your code would be helpful. > > Brad > > On Jul 26, 2016, at 1:43 PM, Andrew Harris > wrote: > >> Hello, >> I am attempting to use the CastImageFilter to convert between unsigned char and float image types, and am getting a System.AccessViolationException at runtime. I have seen reference to this being caused by referring to a pointer that is out of scope, but in this case both the image and the cast filter are delcared in the same method, so I?m not sure how it can be going out of scope. I can include the header and definition files if that would be helpful. >> -- >> >> AH >> >> >> >> ----------------------------------------------------------------------------------------------- >> >> This email and any attachments thereto may contain private, confidential, and privileged materials for the sole use of the intended recipient. Any reviewing, copying, or distribution of this email (or any attachments thereto) by other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently destroy this email and any attachments thereto. >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From aharr8 at uwo.ca Thu Jul 28 10:24:33 2016 From: aharr8 at uwo.ca (Andrew Harris) Date: Thu, 28 Jul 2016 10:24:33 -0400 Subject: [ITK-users] [ITK] itk::CastImageFilter causes AccessViolationException In-Reply-To: <673C89C9-8EAE-47FE-B38A-8762FDE10734@lowekamp.net> References: <673C89C9-8EAE-47FE-B38A-8762FDE10734@lowekamp.net> Message-ID: Thanks all for getting back to me. I put in a call to update the importFilter and upon debugging found that the image variable is getting the correct size settings and number of elements (or at least it is the same as the importFilter finds). I tried casting the imageSize to unsigned int and got the same numbers throughout, and still had the exception at castImage->Update(). Here is the stack trace at the exception: > BING_Andrew.exe!std::_Transform >(unsigned char* _First, unsigned char* _Last, float* _Dest, itk::ImageAlgorithm::StaticCast _Func) Line 950 + 0x9 bytes C++ BING_Andrew.exe!std::_Transform1 >(unsigned char* _First, unsigned char* _Last, float* _Dest, itk::ImageAlgorithm::StaticCast _Func, std::random_access_iterator_tag __unnamed004, std::random_access_iterator_tag __unnamed005) Line 988 + 0x2b bytes C++ BING_Andrew.exe!std::_Transform1 >(unsigned char* _First, unsigned char* _Last, float* _Dest, itk::ImageAlgorithm::StaticCast _Func, std::integral_constant __unnamed004) Line 1012 + 0x6d bytes C++ BING_Andrew.exe!std::transform >(unsigned char* _First, unsigned char* _Last, float* _Dest, itk::ImageAlgorithm::StaticCast _Func) Line 1026 + 0x48 bytes C++ BING_Andrew.exe!itk::ImageAlgorithm::CopyHelper(unsigned char* first, unsigned char* last, float* result) Line 213 + 0x14 bytes C++ BING_Andrew.exe!itk::ImageAlgorithm::DispatchedCopy,itk::Image >(itk::Image* inImage, itk::Image* outImage, itk::ImageRegion<3>& inRegion, itk::ImageRegion<3>& outRegion, std::integral_constant __unnamed004) Line 136 + 0x12 bytes C++ BING_Andrew.exe!itk::ImageAlgorithm::Copy(itk::Image* inImage, itk::Image* outImage, itk::ImageRegion<3>& inRegion, itk::ImageRegion<3>& outRegion) Line 113 C++ BING_Andrew.exe!itk::CastImageFilter,itk::Image >::ThreadedGenerateData(itk::ImageRegion<3>& outputRegionForThread, unsigned int threadId) Line 73 + 0x13 bytes C++ [External Code] BING_Andrew.exe!itk::ImageSource >::ThreaderCallback(void* arg) Line 316 C++ BING_Andrew.exe!itk::MultiThreader::SingleMethodProxy(void * arg) Line 437 + 0xe bytes C++ msvcr120d.dll!03573651() [Frames below may be incorrect and/or missing, no symbols loaded for msvcr120d.dll] msvcr120d.dll!03573861() kernel32.dll!74c738f4() ntdll.dll!776d5de3() ntdll.dll!776d5dae() I'm attaching this as a txt file also because the formatting looks a little weird in my email client, it might be easier to read as plain text. One other thing I forgot to mention, the window generated by the exception has the following text as well: Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Thanks again for the help. -- AH ----------------------------------------------------------------------------------------------- *This email and any attachments thereto may contain private, confidential, and privileged materials for the sole use of the intended recipient. Any reviewing, copying, or distribution of this email (or any attachments thereto) by other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently destroy this email and any attachments thereto.* On Thu, Jul 28, 2016 at 9:01 AM, Bradley Lowekamp wrote: > Hello, > > I noticed you are using type int for you imageSiize. How big is your > image? You may be overflowing when computing the number of pixels. > > I don?t think you have provided a stack trace of when the error occurs. > That would be helpful too. > > Brad > > On Jul 28, 2016, at 8:29 AM, D?enan Zuki? wrote: > > Have you tried calling Update on the import filter? That might be the > problem. Cast filter is simple and non-special, I doubt it is the problem. > > On Wed, Jul 27, 2016 at 8:26 PM, Andrew Harris wrote: > >> Thanks D?enan, as I said in my previous email running Update() on the >> castFilter pointer returns the same error. I did put in a try/catch block >> to update it though. >> >> -- >> >> AH >> >> >> >> ----------------------------------------------------------------------------------------------- >> >> *This email and any attachments thereto may contain private, >> confidential, and privileged materials for the sole use of the intended >> recipient. Any reviewing, copying, or distribution of this email (or any >> attachments thereto) by other than the intended recipient is strictly >> prohibited. If you are not the intended recipient, please contact the >> sender immediately and permanently destroy this email and any attachments >> thereto.* >> >> On Wed, Jul 27, 2016 at 5:16 PM, D?enan Zuki? wrote: >> >>> Hi Andrew, >>> >>> I think that line 62 of .cpp should be: >>> castFilter->Update(); >>> I don't see the pipeline updated elsewhere. >>> >>> Regards, >>> D?enan >>> >>> On Wed, Jul 27, 2016 at 3:54 PM, Andrew Harris wrote: >>> >>>> Thanks for getting back to me, after conferring with a colleague I >>>> tried using the output of the cast filter directly in the subsequent >>>> pipeline rather than writing it to a new image object of the filter's >>>> output type. I got the same error doing that, and also got the same error >>>> just running Update() on the cast filter, which leads me to believe I'm >>>> doing something wrong in setting up the cast filter. I'm attaching my code >>>> for the class I'm writing, hope it's something simple I'm doing wrong. >>>> Currently it's throwing the exception at line 85 when the registration >>>> transform initializer is activated. >>>> >>>> -- >>>> >>>> AH >>>> >>>> >>>> >>>> ----------------------------------------------------------------------------------------------- >>>> >>>> *This email and any attachments thereto may contain private, >>>> confidential, and privileged materials for the sole use of the intended >>>> recipient. Any reviewing, copying, or distribution of this email (or any >>>> attachments thereto) by other than the intended recipient is strictly >>>> prohibited. If you are not the intended recipient, please contact the >>>> sender immediately and permanently destroy this email and any attachments >>>> thereto.* >>>> >>>> On Tue, Jul 26, 2016 at 7:09 PM, Bradley Lowekamp >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> The most common mistake here would be forgetting to call Allocate on >>>>> your image. Beyond that sharing your code would be helpful. >>>>> >>>>> Brad >>>>> >>>>> On Jul 26, 2016, at 1:43 PM, Andrew Harris wrote: >>>>> >>>>> Hello, >>>>> I am attempting to use the CastImageFilter to convert between unsigned >>>>> char and float image types, and am getting a >>>>> System.AccessViolationException at runtime. I have seen reference to this >>>>> being caused by referring to a pointer that is out of scope, but in this >>>>> case both the image and the cast filter are delcared in the same method, so >>>>> I?m not sure how it can be going out of scope. I can include the header >>>>> and definition files if that would be helpful. >>>>> >>>>> -- >>>>> >>>>> AH >>>>> >>>>> >>>>> >>>>> ----------------------------------------------------------------------------------------------- >>>>> >>>>> *This email and any attachments thereto may contain private, >>>>> confidential, and privileged materials for the sole use of the intended >>>>> recipient. Any reviewing, copying, or distribution of this email (or any >>>>> attachments thereto) by other than the intended recipient is strictly >>>>> prohibited. If you are not the intended recipient, please contact the >>>>> sender immediately and permanently destroy this email and any attachments >>>>> thereto.* >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>>>> >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>>> >>> >> > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- > BING_Andrew.exe!std::_Transform >(unsigned char* _First, unsigned char* _Last, float* _Dest, itk::ImageAlgorithm::StaticCast _Func) Line 950 + 0x9 bytes C++ BING_Andrew.exe!std::_Transform1 >(unsigned char* _First, unsigned char* _Last, float* _Dest, itk::ImageAlgorithm::StaticCast _Func, std::random_access_iterator_tag __unnamed004, std::random_access_iterator_tag __unnamed005) Line 988 + 0x2b bytes C++ BING_Andrew.exe!std::_Transform1 >(unsigned char* _First, unsigned char* _Last, float* _Dest, itk::ImageAlgorithm::StaticCast _Func, std::integral_constant __unnamed004) Line 1012 + 0x6d bytes C++ BING_Andrew.exe!std::transform >(unsigned char* _First, unsigned char* _Last, float* _Dest, itk::ImageAlgorithm::StaticCast _Func) Line 1026 + 0x48 bytes C++ BING_Andrew.exe!itk::ImageAlgorithm::CopyHelper(unsigned char* first, unsigned char* last, float* result) Line 213 + 0x14 bytes C++ BING_Andrew.exe!itk::ImageAlgorithm::DispatchedCopy,itk::Image >(itk::Image* inImage, itk::Image* outImage, itk::ImageRegion<3>& inRegion, itk::ImageRegion<3>& outRegion, std::integral_constant __unnamed004) Line 136 + 0x12 bytes C++ BING_Andrew.exe!itk::ImageAlgorithm::Copy(itk::Image* inImage, itk::Image* outImage, itk::ImageRegion<3>& inRegion, itk::ImageRegion<3>& outRegion) Line 113 C++ BING_Andrew.exe!itk::CastImageFilter,itk::Image >::ThreadedGenerateData(itk::ImageRegion<3>& outputRegionForThread, unsigned int threadId) Line 73 + 0x13 bytes C++ [External Code] BING_Andrew.exe!itk::ImageSource >::ThreaderCallback(void* arg) Line 316 C++ BING_Andrew.exe!itk::MultiThreader::SingleMethodProxy(void * arg) Line 437 + 0xe bytes C++ msvcr120d.dll!03573651() [Frames below may be incorrect and/or missing, no symbols loaded for msvcr120d.dll] msvcr120d.dll!03573861() kernel32.dll!74c738f4() ntdll.dll!776d5de3() ntdll.dll!776d5dae() From dzenanz at gmail.com Thu Jul 28 11:13:30 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 28 Jul 2016 11:13:30 -0400 Subject: [ITK-users] [ITK] itk::CastImageFilter causes AccessViolationException In-Reply-To: References: <673C89C9-8EAE-47FE-B38A-8762FDE10734@lowekamp.net> Message-ID: I would focus on the input array now. The cast filter is perhaps accessing elements past the end of the input array. Try passing a smaller number for Z size and see whether that solves the crash (access violation). On Thu, Jul 28, 2016 at 10:24 AM, Andrew Harris wrote: > Thanks all for getting back to me. I put in a call to update the > importFilter and upon debugging found that the image variable is getting > the correct size settings and number of elements (or at least it is the > same as the importFilter finds). I tried casting the imageSize to unsigned > int and got the same numbers throughout, and still had the exception at > castImage->Update(). Here is the stack trace at the exception: > > > BING_Andrew.exe!std::_Transform *,itk::ImageAlgorithm::StaticCast >(unsigned char* > _First, unsigned char* _Last, float* _Dest, > itk::ImageAlgorithm::StaticCast _Func) Line 950 + 0x9 > bytes C++ > BING_Andrew.exe!std::_Transform1 *,itk::ImageAlgorithm::StaticCast >(unsigned char* > _First, unsigned char* _Last, float* _Dest, > itk::ImageAlgorithm::StaticCast _Func, > std::random_access_iterator_tag __unnamed004, > std::random_access_iterator_tag __unnamed005) Line 988 + 0x2b bytes C++ > BING_Andrew.exe!std::_Transform1 *,itk::ImageAlgorithm::StaticCast >(unsigned char* > _First, unsigned char* _Last, float* _Dest, > itk::ImageAlgorithm::StaticCast _Func, > std::integral_constant __unnamed004) Line 1012 + 0x6d bytes C++ > BING_Andrew.exe!std::transform *,itk::ImageAlgorithm::StaticCast >(unsigned char* > _First, unsigned char* _Last, float* _Dest, > itk::ImageAlgorithm::StaticCast _Func) Line 1026 + > 0x48 bytes C++ > BING_Andrew.exe!itk::ImageAlgorithm::CopyHelper char,float>(unsigned char* first, unsigned char* last, float* result) Line > 213 + 0x14 bytes C++ > BING_Andrew.exe!itk::ImageAlgorithm::DispatchedCopy char,3>,itk::Image >(itk::Image* inImage, > itk::Image* outImage, itk::ImageRegion<3>& inRegion, > itk::ImageRegion<3>& outRegion, std::integral_constant > __unnamed004) Line 136 + 0x12 bytes C++ > BING_Andrew.exe!itk::ImageAlgorithm::Copy char,float,3>(itk::Image* inImage, itk::Image* > outImage, itk::ImageRegion<3>& inRegion, itk::ImageRegion<3>& outRegion) > Line 113 C++ > BING_Andrew.exe!itk::CastImageFilter char,3>,itk::Image >::ThreadedGenerateData(itk::ImageRegion<3>& > outputRegionForThread, unsigned int threadId) Line 73 + 0x13 bytes C++ > [External Code] > BING_Andrew.exe!itk::ImageSource > >::ThreaderCallback(void* arg) Line 316 C++ > BING_Andrew.exe!itk::MultiThreader::SingleMethodProxy(void * arg) Line > 437 + 0xe bytes C++ > msvcr120d.dll!03573651() > [Frames below may be incorrect and/or missing, no symbols loaded for > msvcr120d.dll] > msvcr120d.dll!03573861() > kernel32.dll!74c738f4() > ntdll.dll!776d5de3() > ntdll.dll!776d5dae() > > I'm attaching this as a txt file also because the formatting looks a > little weird in my email client, it might be easier to read as plain text. > One other thing I forgot to mention, the window generated by the exception > has the following text as well: > Additional information: Attempted to read or write protected memory. This > is often an indication that other memory is corrupt. > > Thanks again for the help. > > -- > > AH > > > > ----------------------------------------------------------------------------------------------- > > *This email and any attachments thereto may contain private, > confidential, and privileged materials for the sole use of the intended > recipient. Any reviewing, copying, or distribution of this email (or any > attachments thereto) by other than the intended recipient is strictly > prohibited. If you are not the intended recipient, please contact the > sender immediately and permanently destroy this email and any attachments > thereto.* > > On Thu, Jul 28, 2016 at 9:01 AM, Bradley Lowekamp > wrote: > >> Hello, >> >> I noticed you are using type int for you imageSiize. How big is your >> image? You may be overflowing when computing the number of pixels. >> >> I don?t think you have provided a stack trace of when the error occurs. >> That would be helpful too. >> >> Brad >> >> On Jul 28, 2016, at 8:29 AM, D?enan Zuki? wrote: >> >> Have you tried calling Update on the import filter? That might be the >> problem. Cast filter is simple and non-special, I doubt it is the problem. >> >> On Wed, Jul 27, 2016 at 8:26 PM, Andrew Harris wrote: >> >>> Thanks D?enan, as I said in my previous email running Update() on the >>> castFilter pointer returns the same error. I did put in a try/catch block >>> to update it though. >>> >>> -- >>> >>> AH >>> >>> >>> >>> ----------------------------------------------------------------------------------------------- >>> >>> *This email and any attachments thereto may contain private, >>> confidential, and privileged materials for the sole use of the intended >>> recipient. Any reviewing, copying, or distribution of this email (or any >>> attachments thereto) by other than the intended recipient is strictly >>> prohibited. If you are not the intended recipient, please contact the >>> sender immediately and permanently destroy this email and any attachments >>> thereto.* >>> >>> On Wed, Jul 27, 2016 at 5:16 PM, D?enan Zuki? wrote: >>> >>>> Hi Andrew, >>>> >>>> I think that line 62 of .cpp should be: >>>> castFilter->Update(); >>>> I don't see the pipeline updated elsewhere. >>>> >>>> Regards, >>>> D?enan >>>> >>>> On Wed, Jul 27, 2016 at 3:54 PM, Andrew Harris wrote: >>>> >>>>> Thanks for getting back to me, after conferring with a colleague I >>>>> tried using the output of the cast filter directly in the subsequent >>>>> pipeline rather than writing it to a new image object of the filter's >>>>> output type. I got the same error doing that, and also got the same error >>>>> just running Update() on the cast filter, which leads me to believe I'm >>>>> doing something wrong in setting up the cast filter. I'm attaching my code >>>>> for the class I'm writing, hope it's something simple I'm doing wrong. >>>>> Currently it's throwing the exception at line 85 when the registration >>>>> transform initializer is activated. >>>>> >>>>> -- >>>>> >>>>> AH >>>>> >>>>> >>>>> >>>>> ----------------------------------------------------------------------------------------------- >>>>> >>>>> *This email and any attachments thereto may contain private, >>>>> confidential, and privileged materials for the sole use of the intended >>>>> recipient. Any reviewing, copying, or distribution of this email (or any >>>>> attachments thereto) by other than the intended recipient is strictly >>>>> prohibited. If you are not the intended recipient, please contact the >>>>> sender immediately and permanently destroy this email and any attachments >>>>> thereto.* >>>>> >>>>> On Tue, Jul 26, 2016 at 7:09 PM, Bradley Lowekamp >>>>> wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> The most common mistake here would be forgetting to call Allocate on >>>>>> your image. Beyond that sharing your code would be helpful. >>>>>> >>>>>> Brad >>>>>> >>>>>> On Jul 26, 2016, at 1:43 PM, Andrew Harris wrote: >>>>>> >>>>>> Hello, >>>>>> I am attempting to use the CastImageFilter to convert between >>>>>> unsigned char and float image types, and am getting a >>>>>> System.AccessViolationException at runtime. I have seen reference to this >>>>>> being caused by referring to a pointer that is out of scope, but in this >>>>>> case both the image and the cast filter are delcared in the same method, so >>>>>> I?m not sure how it can be going out of scope. I can include the header >>>>>> and definition files if that would be helpful. >>>>>> >>>>>> -- >>>>>> >>>>>> AH >>>>>> >>>>>> >>>>>> >>>>>> ----------------------------------------------------------------------------------------------- >>>>>> >>>>>> *This email and any attachments thereto may contain private, >>>>>> confidential, and privileged materials for the sole use of the intended >>>>>> recipient. Any reviewing, copying, or distribution of this email (or any >>>>>> attachments thereto) by other than the intended recipient is strictly >>>>>> prohibited. If you are not the intended recipient, please contact the >>>>>> sender immediately and permanently destroy this email and any attachments >>>>>> thereto.* >>>>>> >>>>>> _____________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>> http://www.kitware.com/products/protraining.php >>>>>> >>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>>> >>>>>> >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>>>> >>>> >>> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amirhossein.jaberzadeh at gmail.com Thu Jul 28 11:40:49 2016 From: amirhossein.jaberzadeh at gmail.com (Amir Jaberzadeh) Date: Thu, 28 Jul 2016 11:40:49 -0400 Subject: [ITK-users] Insight journal dataset upload error Message-ID: Dear all, I am submitting an insight journal paper, while uploading my example dataset, it is not possible to upload a file larger than 10 MB. I would like to upload a 89 MB zip file and attaching them one by one was the only solution I could find so far. I appreciate your help in advance, Amir -------------- next part -------------- An HTML attachment was scrubbed... URL: From aharr8 at uwo.ca Thu Jul 28 12:59:13 2016 From: aharr8 at uwo.ca (Andrew Harris) Date: Thu, 28 Jul 2016 12:59:13 -0400 Subject: [ITK-users] [ITK] itk::CastImageFilter causes AccessViolationException In-Reply-To: References: <673C89C9-8EAE-47FE-B38A-8762FDE10734@lowekamp.net> Message-ID: Thanks all for the help, I wrote a for loop to do the same task and got the same error, and upon investigating it turns out the program I am building upon was passing the incorrect dimensions for the image buffer. Turns out this is a PEBKAC error. -- AH ----------------------------------------------------------------------------------------------- *This email and any attachments thereto may contain private, confidential, and privileged materials for the sole use of the intended recipient. Any reviewing, copying, or distribution of this email (or any attachments thereto) by other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently destroy this email and any attachments thereto.* On Thu, Jul 28, 2016 at 11:13 AM, D?enan Zuki? wrote: > I would focus on the input array now. The cast filter is perhaps accessing > elements past the end of the input array. Try passing a smaller number for > Z size and see whether that solves the crash (access violation). > > On Thu, Jul 28, 2016 at 10:24 AM, Andrew Harris wrote: > >> Thanks all for getting back to me. I put in a call to update the >> importFilter and upon debugging found that the image variable is getting >> the correct size settings and number of elements (or at least it is the >> same as the importFilter finds). I tried casting the imageSize to unsigned >> int and got the same numbers throughout, and still had the exception at >> castImage->Update(). Here is the stack trace at the exception: >> >> > BING_Andrew.exe!std::_Transform> *,itk::ImageAlgorithm::StaticCast >(unsigned char* >> _First, unsigned char* _Last, float* _Dest, >> itk::ImageAlgorithm::StaticCast _Func) Line 950 + 0x9 >> bytes C++ >> BING_Andrew.exe!std::_Transform1> *,itk::ImageAlgorithm::StaticCast >(unsigned char* >> _First, unsigned char* _Last, float* _Dest, >> itk::ImageAlgorithm::StaticCast _Func, >> std::random_access_iterator_tag __unnamed004, >> std::random_access_iterator_tag __unnamed005) Line 988 + 0x2b bytes C++ >> BING_Andrew.exe!std::_Transform1> *,itk::ImageAlgorithm::StaticCast >(unsigned char* >> _First, unsigned char* _Last, float* _Dest, >> itk::ImageAlgorithm::StaticCast _Func, >> std::integral_constant __unnamed004) Line 1012 + 0x6d bytes C++ >> BING_Andrew.exe!std::transform> *,itk::ImageAlgorithm::StaticCast >(unsigned char* >> _First, unsigned char* _Last, float* _Dest, >> itk::ImageAlgorithm::StaticCast _Func) Line 1026 + >> 0x48 bytes C++ >> BING_Andrew.exe!itk::ImageAlgorithm::CopyHelper> char,float>(unsigned char* first, unsigned char* last, float* result) Line >> 213 + 0x14 bytes C++ >> BING_Andrew.exe!itk::ImageAlgorithm::DispatchedCopy> char,3>,itk::Image >(itk::Image* inImage, >> itk::Image* outImage, itk::ImageRegion<3>& inRegion, >> itk::ImageRegion<3>& outRegion, std::integral_constant >> __unnamed004) Line 136 + 0x12 bytes C++ >> BING_Andrew.exe!itk::ImageAlgorithm::Copy> char,float,3>(itk::Image* inImage, itk::Image* >> outImage, itk::ImageRegion<3>& inRegion, itk::ImageRegion<3>& outRegion) >> Line 113 C++ >> BING_Andrew.exe!itk::CastImageFilter> char,3>,itk::Image >::ThreadedGenerateData(itk::ImageRegion<3>& >> outputRegionForThread, unsigned int threadId) Line 73 + 0x13 bytes C++ >> [External Code] >> BING_Andrew.exe!itk::ImageSource >> >::ThreaderCallback(void* arg) Line 316 C++ >> BING_Andrew.exe!itk::MultiThreader::SingleMethodProxy(void * arg) >> Line 437 + 0xe bytes C++ >> msvcr120d.dll!03573651() >> [Frames below may be incorrect and/or missing, no symbols loaded for >> msvcr120d.dll] >> msvcr120d.dll!03573861() >> kernel32.dll!74c738f4() >> ntdll.dll!776d5de3() >> ntdll.dll!776d5dae() >> >> I'm attaching this as a txt file also because the formatting looks a >> little weird in my email client, it might be easier to read as plain text. >> One other thing I forgot to mention, the window generated by the exception >> has the following text as well: >> Additional information: Attempted to read or write protected memory. This >> is often an indication that other memory is corrupt. >> >> Thanks again for the help. >> >> -- >> >> AH >> >> >> >> ----------------------------------------------------------------------------------------------- >> >> *This email and any attachments thereto may contain private, >> confidential, and privileged materials for the sole use of the intended >> recipient. Any reviewing, copying, or distribution of this email (or any >> attachments thereto) by other than the intended recipient is strictly >> prohibited. If you are not the intended recipient, please contact the >> sender immediately and permanently destroy this email and any attachments >> thereto.* >> >> On Thu, Jul 28, 2016 at 9:01 AM, Bradley Lowekamp >> wrote: >> >>> Hello, >>> >>> I noticed you are using type int for you imageSiize. How big is your >>> image? You may be overflowing when computing the number of pixels. >>> >>> I don?t think you have provided a stack trace of when the error occurs. >>> That would be helpful too. >>> >>> Brad >>> >>> On Jul 28, 2016, at 8:29 AM, D?enan Zuki? wrote: >>> >>> Have you tried calling Update on the import filter? That might be the >>> problem. Cast filter is simple and non-special, I doubt it is the problem. >>> >>> On Wed, Jul 27, 2016 at 8:26 PM, Andrew Harris wrote: >>> >>>> Thanks D?enan, as I said in my previous email running Update() on the >>>> castFilter pointer returns the same error. I did put in a try/catch block >>>> to update it though. >>>> >>>> -- >>>> >>>> AH >>>> >>>> >>>> >>>> ----------------------------------------------------------------------------------------------- >>>> >>>> *This email and any attachments thereto may contain private, >>>> confidential, and privileged materials for the sole use of the intended >>>> recipient. Any reviewing, copying, or distribution of this email (or any >>>> attachments thereto) by other than the intended recipient is strictly >>>> prohibited. If you are not the intended recipient, please contact the >>>> sender immediately and permanently destroy this email and any attachments >>>> thereto.* >>>> >>>> On Wed, Jul 27, 2016 at 5:16 PM, D?enan Zuki? >>>> wrote: >>>> >>>>> Hi Andrew, >>>>> >>>>> I think that line 62 of .cpp should be: >>>>> castFilter->Update(); >>>>> I don't see the pipeline updated elsewhere. >>>>> >>>>> Regards, >>>>> D?enan >>>>> >>>>> On Wed, Jul 27, 2016 at 3:54 PM, Andrew Harris wrote: >>>>> >>>>>> Thanks for getting back to me, after conferring with a colleague I >>>>>> tried using the output of the cast filter directly in the subsequent >>>>>> pipeline rather than writing it to a new image object of the filter's >>>>>> output type. I got the same error doing that, and also got the same error >>>>>> just running Update() on the cast filter, which leads me to believe I'm >>>>>> doing something wrong in setting up the cast filter. I'm attaching my code >>>>>> for the class I'm writing, hope it's something simple I'm doing wrong. >>>>>> Currently it's throwing the exception at line 85 when the registration >>>>>> transform initializer is activated. >>>>>> >>>>>> -- >>>>>> >>>>>> AH >>>>>> >>>>>> >>>>>> >>>>>> ----------------------------------------------------------------------------------------------- >>>>>> >>>>>> *This email and any attachments thereto may contain private, >>>>>> confidential, and privileged materials for the sole use of the intended >>>>>> recipient. Any reviewing, copying, or distribution of this email (or any >>>>>> attachments thereto) by other than the intended recipient is strictly >>>>>> prohibited. If you are not the intended recipient, please contact the >>>>>> sender immediately and permanently destroy this email and any attachments >>>>>> thereto.* >>>>>> >>>>>> On Tue, Jul 26, 2016 at 7:09 PM, Bradley Lowekamp >>>>>> wrote: >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> The most common mistake here would be forgetting to call Allocate on >>>>>>> your image. Beyond that sharing your code would be helpful. >>>>>>> >>>>>>> Brad >>>>>>> >>>>>>> On Jul 26, 2016, at 1:43 PM, Andrew Harris wrote: >>>>>>> >>>>>>> Hello, >>>>>>> I am attempting to use the CastImageFilter to convert between >>>>>>> unsigned char and float image types, and am getting a >>>>>>> System.AccessViolationException at runtime. I have seen reference to this >>>>>>> being caused by referring to a pointer that is out of scope, but in this >>>>>>> case both the image and the cast filter are delcared in the same method, so >>>>>>> I?m not sure how it can be going out of scope. I can include the header >>>>>>> and definition files if that would be helpful. >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> AH >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----------------------------------------------------------------------------------------------- >>>>>>> >>>>>>> *This email and any attachments thereto may contain private, >>>>>>> confidential, and privileged materials for the sole use of the intended >>>>>>> recipient. Any reviewing, copying, or distribution of this email (or any >>>>>>> attachments thereto) by other than the intended recipient is strictly >>>>>>> prohibited. If you are not the intended recipient, please contact the >>>>>>> sender immediately and permanently destroy this email and any attachments >>>>>>> thereto.* >>>>>>> >>>>>>> _____________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>>> http://www.kitware.com/products/protraining.php >>>>>>> >>>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>>>> >>>>>>> >>>>>> >>>>>> _____________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>> http://www.kitware.com/products/protraining.php >>>>>> >>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>>> >>>>>> >>>>> >>>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Thu Jul 28 13:06:11 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 28 Jul 2016 13:06:11 -0400 Subject: [ITK-users] In-place extraction of N-1 dimensional images from N dimensional images In-Reply-To: <0089D58A-9C8D-443F-AC63-90A9E43E1B8B@kcl.ac.uk> References: <0089D58A-9C8D-443F-AC63-90A9E43E1B8B@kcl.ac.uk> Message-ID: Hi Toby, Extract filter could theoretically run in place only when the extraction region differs from largest possible region only along the slowest changing index. To make this possible, ExtractImageFilter should override CanRunInPlace() which it inherits from InPlaceImageFilter and implement this theoretical check. Of course, other changes will be required to make it function properly. Regards, D?enan On Thu, Jul 28, 2016 at 9:23 AM, Wood, Tobias wrote: > Hello D?enan, > > I have had the same problem as Edwin with ExtractImageFilter, but in a > different context. Eventually I gave up and accepted the speed/memory > penalty of copying the 3D volumes out of the 4D series. Is there really no > way in ITK to get a temporary ?view? of a subregion for processing, without > resorting to referencing the raw arrays? > > Thanks, > Toby > > On 28/07/2016, 13:40, "Insight-users on behalf of D?enan Zuki?" < > insight-users-bounces at itk.org on behalf of dzenanz at gmail.com> wrote: > > > Hi Edwin, > > > you should be able to achieve your goal using > import image filter < > http://www.vtk.org/doc/nightly/html/classvtkImageImport.html#details>. > ITK has import image filter > too , > so you can decide in which library to do dimensional reduction. > > > Regards, > D?enan > > > On Thu, Jul 28, 2016 at 4:37 AM, Edwin Bennink > wrote: > > Hello, > > > I am working on an ITK/VTK viewer for visualizing 3D+time image data. > The data is represented by 4D images in ITK (x,y,z,t). I would like to be > able to access the 3D data in VTK without copying it, since that would slow > down scrolling through time in large > datasets. I noticed that, although in-place extraction should be > possible, the ExtractImageFilter 'says no' to in-place extraction when the > input and output dimensions differ. Does anyone know a way to achieve my > goal using existing ITK functions? For example, > if there would be some way of reducing the dimension of 'flat' > images, i.e. 3D (Nx,Ny,1) to 2D (Nx, Ny), then I could still use the > ExtractImageFilter. > > > Best, > Edwin > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Thu Jul 28 13:24:44 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Thu, 28 Jul 2016 17:24:44 +0000 Subject: [ITK-users] In-place extraction of N-1 dimensional images from N dimensional images In-Reply-To: References: <0089D58A-9C8D-443F-AC63-90A9E43E1B8B@kcl.ac.uk> Message-ID: Hello, I think the missing features to implement this proper is one step lower that the ExtractImageFilter, rather in the ImportImageContainer. The container would need to support presenting one buffer, but holding the whole buffer someplace. Also the ability to share buffers between images is not supported either. When filters are run ?InPlace? the output steals the buffer from the input, so there is no buffer sharing. This is essentially adding different ?view? to a buffer. I had been concerned about the performance of the ExtractImageFilter filter previously. If I recall correctly I update the filter to use the ImageAlgorithm::Copy method and improved the performance by something like 100x for some test cases. You could profile the filter run with the default number of thread and with just 1 thread to determine how best to run it. Also you would need to veriify that the pipeline is executing as expected and efficiently. If this still does not meet your timing requirements you?d likely be better off just writing a function to create a ImportImageContainer with your ?view?, and manage the memory yourself. This would bypass the pipeline. HTH, Brad On Jul 28, 2016, at 1:06 PM, D?enan Zuki? > wrote: Hi Toby, Extract filter could theoretically run in place only when the extraction region differs from largest possible region only along the slowest changing index. To make this possible, ExtractImageFilter should override CanRunInPlace() which it inherits from InPlaceImageFilter and implement this theoretical check. Of course, other changes will be required to make it function properly. Regards, D?enan On Thu, Jul 28, 2016 at 9:23 AM, Wood, Tobias > wrote: Hello D?enan, I have had the same problem as Edwin with ExtractImageFilter, but in a different context. Eventually I gave up and accepted the speed/memory penalty of copying the 3D volumes out of the 4D series. Is there really no way in ITK to get a temporary ?view? of a subregion for processing, without resorting to referencing the raw arrays? Thanks, Toby On 28/07/2016, 13:40, "Insight-users on behalf of D?enan Zuki?" on behalf of dzenanz at gmail.com> wrote: Hi Edwin, you should be able to achieve your goal using import image filter . ITK has import image filter too , so you can decide in which library to do dimensional reduction. Regards, D?enan On Thu, Jul 28, 2016 at 4:37 AM, Edwin Bennink > wrote: Hello, I am working on an ITK/VTK viewer for visualizing 3D+time image data. The data is represented by 4D images in ITK (x,y,z,t). I would like to be able to access the 3D data in VTK without copying it, since that would slow down scrolling through time in large datasets. I noticed that, although in-place extraction should be possible, the ExtractImageFilter 'says no' to in-place extraction when the input and output dimensions differ. Does anyone know a way to achieve my goal using existing ITK functions? For example, if there would be some way of reducing the dimension of 'flat' images, i.e. 3D (Nx,Ny,1) to 2D (Nx, Ny), then I could still use the ExtractImageFilter. Best, Edwin _____________________________________ Powered by www.kitware.com > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 tobias.wood at kcl.ac.uk Thu Jul 28 09:23:36 2016 From: tobias.wood at kcl.ac.uk (Wood, Tobias) Date: Thu, 28 Jul 2016 13:23:36 +0000 Subject: [ITK-users] In-place extraction of N-1 dimensional images from N dimensional images In-Reply-To: References: Message-ID: <0089D58A-9C8D-443F-AC63-90A9E43E1B8B@kcl.ac.uk> Hello D?enan, I have had the same problem as Edwin with ExtractImageFilter, but in a different context. Eventually I gave up and accepted the speed/memory penalty of copying the 3D volumes out of the 4D series. Is there really no way in ITK to get a temporary ?view? of a subregion for processing, without resorting to referencing the raw arrays? Thanks, Toby On 28/07/2016, 13:40, "Insight-users on behalf of D?enan Zuki?" wrote: Hi Edwin, you should be able to achieve your goal using import image filter . ITK has import image filter too , so you can decide in which library to do dimensional reduction. Regards, D?enan On Thu, Jul 28, 2016 at 4:37 AM, Edwin Bennink wrote: Hello, I am working on an ITK/VTK viewer for visualizing 3D+time image data. The data is represented by 4D images in ITK (x,y,z,t). I would like to be able to access the 3D data in VTK without copying it, since that would slow down scrolling through time in large datasets. I noticed that, although in-place extraction should be possible, the ExtractImageFilter 'says no' to in-place extraction when the input and output dimensions differ. Does anyone know a way to achieve my goal using existing ITK functions? For example, if there would be some way of reducing the dimension of 'flat' images, i.e. 3D (Nx,Ny,1) to 2D (Nx, Ny), then I could still use the ExtractImageFilter. Best, Edwin _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From blowekamp at mail.nih.gov Fri Jul 29 14:43:59 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Fri, 29 Jul 2016 18:43:59 +0000 Subject: [ITK-users] [ANNOUNCE] SimpleITK 0.10.0 Release Message-ID: <660C990B-C30F-47FC-928F-B9176B2C9CBD@mail.nih.gov> We are pleased to announce the release of SimpleITK 0.10.0! As with all SimpleITK releases, we have a variety of binaries available. This includes fresh Python Wheels for MS Windows, GNU Linux and Apple OS X, along with Java and CSharp binaries for MS Windows. Additionally, binaries for the Python distribution Anaconda are available. This release features major improvements to the build infrastructure, improved support for R, better downloads with pip and many new features! Information on how to get started and download the binaries: https://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.10.0/ Release Doxygen Documentation: https://www.itk.org/SimpleITKDoxygen010/html/index.html Additional Release Notes: http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#SimpleITK_-_Version_0.10.0_Release Key Improvements * The R language bindings have received extensive improvements and bug fixes. * Added Image::SetMetaData method * Added LandmarkBasedTransformInitializer * Added MultiLableSTAPLEImageFilter * Show now prefers Fiji over the basic ImageJ * Refactored Wrapping directory into separate languages (paths have changed!) * Separated Lua, GTest, and virtualenv into SuperBuild dependencies * Added SITK_FORBID_DOWNLOADS option * Enabled each language wrapping to be an independent project dependent on the SimpleITK C++ interface and libraries. * Many CMake build improvements to default configurations such as visibility, and link library interfaces * Support for gcc 6.1 and compatibility with c++14 * CMake version 3.3 is now required Python * Update your pip version! * Added manylinux1 wheels (PEP 513) * SimpleITK_PYTHON_THREADS enabled by default to better support multi-threading in Python * No egg binary distributions, wheels fully support the standard platforms * Python 2.7 is no longer packaged for 64-bit windows * Avoid linking against libpython.so to improve compatibility and portability Lua * Lua languages bindings now compile as a loadable module * Created Lua rockspec builder (https://github.com/SimpleITK/SimpleITKLuaRock) * Can be used in Lua Torch R * Fix issues with the bracket operator preserving physical location * Created script to generate R man pages * Disabled return Self value from functions * Create simplified R Installer (https://github.com/SimpleITK/SimpleITKRInstaller) Enjoy! Brad From tobias.wood at kcl.ac.uk Fri Jul 29 12:28:52 2016 From: tobias.wood at kcl.ac.uk (Wood, Tobias) Date: Fri, 29 Jul 2016 16:28:52 +0000 Subject: [ITK-users] In-place extraction of N-1 dimensional images from N dimensional images In-Reply-To: References: <0089D58A-9C8D-443F-AC63-90A9E43E1B8B@kcl.ac.uk> Message-ID: Thanks for the technical details Brad. I am going to plead lack of time (and understanding of ITK internals) here, and keep my code as-is. Maybe for the future some time. Best wishes, Toby On 28/07/2016, 18:24, "Lowekamp, Bradley (NIH/NLM/LHC) [C]" wrote: Hello, I think the missing features to implement this proper is one step lower that the ExtractImageFilter, rather in the ImportImageContainer. The container would need to support presenting one buffer, but holding the whole buffer someplace. Also the ability to share buffers between images is not supported either. When filters are run ?InPlace? the output steals the buffer from the input, so there is no buffer sharing. This is essentially adding different ?view? to a buffer. I had been concerned about the performance of the ExtractImageFilter filter previously. If I recall correctly I update the filter to use the ImageAlgorithm::Copy method and improved the performance by something like 100x for some test cases. You could profile the filter run with the default number of thread and with just 1 thread to determine how best to run it. Also you would need to veriify that the pipeline is executing as expected and efficiently. If this still does not meet your timing requirements you?d likely be better off just writing a function to create a ImportImageContainer with your ?view?, and manage the memory yourself. This would bypass the pipeline. HTH, Brad On Jul 28, 2016, at 1:06 PM, D?enan Zuki? wrote: Hi Toby, Extract filter could theoretically run in place only when the extraction region differs from largest possible region only along the slowest changing index. To make this possible, ExtractImageFilter should override CanRunInPlace() which it inherits from InPlaceImageFilter and implement this theoretical check. Of course, other changes will be required to make it function properly. Regards, D?enan On Thu, Jul 28, 2016 at 9:23 AM, Wood, Tobias wrote: Hello D?enan, I have had the same problem as Edwin with ExtractImageFilter, but in a different context. Eventually I gave up and accepted the speed/memory penalty of copying the 3D volumes out of the 4D series. Is there really no way in ITK to get a temporary ?view? of a subregion for processing, without resorting to referencing the raw arrays? Thanks, Toby On 28/07/2016, 13:40, "Insight-users on behalf of D?enan Zuki?" wrote: Hi Edwin, you should be able to achieve your goal using import image filter . ITK has import image filter too , so you can decide in which library to do dimensional reduction. Regards, D?enan On Thu, Jul 28, 2016 at 4:37 AM, Edwin Bennink wrote: Hello, I am working on an ITK/VTK viewer for visualizing 3D+time image data. The data is represented by 4D images in ITK (x,y,z,t). I would like to be able to access the 3D data in VTK without copying it, since that would slow down scrolling through time in large datasets. I noticed that, although in-place extraction should be possible, the ExtractImageFilter 'says no' to in-place extraction when the input and output dimensions differ. Does anyone know a way to achieve my goal using existing ITK functions? For example, if there would be some way of reducing the dimension of 'flat' images, i.e. 3D (Nx,Ny,1) to 2D (Nx, Ny), then I could still use the ExtractImageFilter. Best, Edwin _____________________________________ Powered by www.kitware.com > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Sun Jul 31 19:29:21 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 31 Jul 2016 19:29:21 -0400 Subject: [ITK-users] Import itk always takes ages and results in warnings In-Reply-To: References: Message-ID: Hi JP, The ITK Python import time was increased by a factor of two in 4.10.0 compared to 4.9.0 by hiding symbols in the generated libraries. The next release of ITK will improve the import time by a factor of ten in some cases because the lazy loading has been fixed [1]. Instructions to try out the development version can be found here [2]. HTH, Matt [1] http://review.source.kitware.com/#/c/21305/ [2] https://itk.org/Wiki/ITK/Git/Download On Tue, Jun 28, 2016 at 4:59 AM, wrote: > Dear Michka > Thank you for your reply. > > I will take that into consideration when building ITK next time. > Unfortunately there is little comprehensive guide to what all those options > in cmake really mean or do, so id rather build more than less. > Also VTK is pretty heavy in term of modules, and I have the impression that > it is noticeably faster. > Best > JP > > On Mon, Jun 27, 2016 at 10:03 PM, Michka Popoff > wrote: >> >> Hi >> >> to reduce the import time, one solution would be to reduce the number of >> wrapped modules >> and types (and image/vector dimensions). If you re-build ITK by disabling >> the things you >> don?t need, there will be less things to load. >> >> I have some ideas on how to improve the import situation but never came to >> it, so >> not sure anybody has been working intensively on that. >> >> For the warnings, we need to fix them in ITK. >> The QuadEdgeMeshCellTraitsInfo class is probably not be usable as is. >> >> If you want to hide the warnings, you can use (like for other python >> warnings): >> >> import warnings >> warnings.simplefilter(?ignore", Warning) >> >> You can reset the filter after the import. >> >> That should to it. >> >> >> Michka >> >> > On 26 Jun 2016, at 22:07, cervellone at gmail.com wrote: >> > >> > Hello all, >> > >> > Is there a way to speed up the import of itk in an application and the >> > suppression of the warnings I get every time I run the python script ? >> > >> > Thank you all >> > JP >> > >> > >> > Warning: Unknown parameter 'itk::QuadEdgeMeshCellTraitsInfo< >> > 3,float,float,unsigned long,unsigned long,unsigned >> > char,itk::QuadEdgeMeshPoint< float,3,itk::GeometricalQuadEdge< unsigned >> > long, unsigned long,bool,bool,true > >,itk::MapContainer< unsigned >> > long,itk::QuadEdgeMeshPoint< float,3,itk::GeometricalQuadEdge< unsigned >> > long,unsigned long,bool,bool,true > > >,std::set< unsigned long >> > >,itk::GeometricalQuadEdge< unsigned long,unsigned long,bool,bool,true > >' >> > in template 'itk::CellInterface' >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the 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 >