From matt.mccormick at kitware.com Mon May 2 10:38:53 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 2 May 2016 10:38:53 -0400 Subject: [ITK] [ITK-dev] Upcoming ITK 4.10rc1 Message-ID: Hi folks, Please have reviewed, build robot verified feature enhancements merged by the end of this week in preparation for the upcoming 4.10 release candidate 1 next week. Thanks, Matt _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From davis.vigneault at gmail.com Mon May 2 13:22:56 2016 From: davis.vigneault at gmail.com (DVigneault) Date: Mon, 2 May 2016 10:22:56 -0700 (MST) Subject: [ITK] [ITK-users] Determining parent cell following (iterative Loop) subdivision? Message-ID: <1462209776737-7588798.post@n2.nabble.com> All-- Take this example [1] as a starting point, where an itk::QuadEdgeMesh is iteratively subdivided using the Loop scheme. Given a cell in the child mesh, is there a way to determine from which cell in the original mesh it is descended? In an attempt to pass this information down, I tried setting the cell data in the parent mesh to the cell's ID and then checking the cell data in the child mesh; however, the cell data unfortunately isn't passed down. (In retrospect this makes sense, as a cell in the output of a subdivision filter will not, in general, correspond in a 1-to-1 fashion to a cell in its parent.) I tried to add this functionality to the subcases where there *is* a 1-to-1 correspondence by modifying the GenerateOutputCells() method [2], but I got hung up because I couldn't determine the relationship between the QEPrimal returned from AddTriangleFace() [3] and the cell ID to which I would need to assign the data. Before going farther down the rabbit hole, I thought I'd write to see if there is a better way of approaching my original problem. Best, and thanks, --Davis [1] http://itk.org/Wiki/ITK/Examples/Meshes/LoopTriangleCellSubdivision [2] https://github.com/InsightSoftwareConsortium/itkSubdivisionQuadEdgeMeshFilter/blob/master/include/itkTriangleCellSubdivisionQuadEdgeMeshFilter.hxx [3] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx#L1395 -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Determining-parent-cell-following-iterative-Loop-subdivision-tp7588798.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From tj.jackson1226 at gmail.com Mon May 2 13:46:56 2016 From: tj.jackson1226 at gmail.com (Tim Jackson) Date: Mon, 2 May 2016 13:46:56 -0400 Subject: [ITK] [ITK-dev] problems with programs crashing -- potentially due to multiple versions of ITK? In-Reply-To: References: Message-ID: Thank you D?enan and Matt for your replies. I've always built ITK as static libraries, so I don't think that's what the problem is. After using Dependency Walker as Matt suggested, it looks like the crashing is the result of a Java error. It's looking for procedures in java.dll, zip.dll, and hpi.dll and not finding them, and then the program exits JAVAW.EXE with code 255. I originally thought this was a problem of conflicting ITK versions, but I realize too that I recently downloaded new versions of Java and changed the Java Path environmental variables in order to do plugin development for ImageJ. Is it possible that something I changed is resulting in the ITK programs to find conflicting versions of java? If so, how do I fix that? Best, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From matt.mccormick at kitware.com Mon May 2 13:58:40 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 2 May 2016 13:58:40 -0400 Subject: [ITK] [ITK-dev] problems with programs crashing -- potentially due to multiple versions of ITK? In-Reply-To: References: Message-ID: Hi Tim, The behavior is likely unrelated to ITK unless you are using the SCIFIO ITK plugin. This plugin will pick up Java environmental variables if set: https://github.com/scifio/scifio-imageio/blob/5baa6b28a5b56a9862fbb6aaac75ffd533852677/src/itkSCIFIOImageIO.cxx.in#L281-L286 HTH, Matt On Mon, May 2, 2016 at 1:46 PM, Tim Jackson wrote: > Thank you D?enan and Matt for your replies. > > I've always built ITK as static libraries, so I don't think that's what the > problem is. After using Dependency Walker as Matt suggested, it looks like > the crashing is the result of a Java error. It's looking for procedures in > java.dll, zip.dll, and hpi.dll and not finding them, and then the program > exits JAVAW.EXE with code 255. > > I originally thought this was a problem of conflicting ITK versions, but I > realize too that I recently downloaded new versions of Java and changed the > Java Path environmental variables in order to do plugin development for > ImageJ. Is it possible that something I changed is resulting in the ITK > programs to find conflicting versions of java? If so, how do I fix that? > > Best, > Tim _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From matt.mccormick at kitware.com Mon May 2 17:38:12 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 2 May 2016 17:38:12 -0400 Subject: [ITK] [Example] Perform Registration on Vector Images In-Reply-To: References: Message-ID: Erratum: the original code and test was added by Jeff Duda. On Fri, Apr 29, 2016 at 4:22 PM, Matt McCormick wrote: > Hi folks, > > Based off Nick Tustison's code and test, we have a new example on how > to perform registration on vector images: > > http://itk.org/ITKExamples/src/Registration/Metricsv4/PerformRegistrationOnVectorImages/Documentation.html > > > Matt From zhuangming.shen at sphic.org.cn Mon May 2 22:40:02 2016 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Tue, 3 May 2016 02:40:02 +0000 Subject: [ITK] [ITK-users] Strange situation when ITK writes DICOM file In-Reply-To: References: <1450834862664.8600@sphic.org.cn> <1461914235636.15330@sphic.org.cn>, Message-ID: <1462243202460.83843@sphic.org.cn> Hi D?enan, Thanks for your prompt response. I used ITK 4.9.1 and your attached code (just changed inDir and outFile) to test both public DICOM data (http://www.osirix-viewer.com/datasets/DATA/BREBIX.zip) and private DICOM data, the results are still incorrect (please see the attached screenshot). What's the problem? Besides, as far as I know, rescaling the intensity from short type to char type leads to lose precision because the DICOM tags ( (0028,0100) and (0028,0101) ) show the BitsAllocated is 16-bits and the BitsStored is 12-bits. Consequently, this solution doesn't seem to be a good solution. Is it possible to output the DICOM file by other tools (e.g. DCMTK) if the GDCM doesn't support short type?? Regards, Zhuangming Shen ________________________________ From: D?enan Zuki? Sent: Friday, April 29, 2016 9:59 PM To: ??? Cc: insight-users at itk.org; Matt McCormick Subject: Re: [ITK-users] Strange situation when ITK writes DICOM file Hi Shen, GDCM version was updated recently. It now complains that short type is unsupported, and works correctly with char type. I attached an example which rescales the intensity and works correctly. Regards, D?enan On Fri, Apr 29, 2016 at 3:17 AM, ??? > wrote: Hi D?enan, ? I'd like to know if the bug regarding 3D DICOM writer has been fixed. When I tried to run the same code but using ITK 4.9.1, I still got the same results, i.e. the output DICOM file does not properly record original image's origin and spacing. Regards, Zhuangming Shen ________________________________ From: D?enan Zuki? > Sent: Saturday, December 26, 2015 1:44 AM To: ??? Cc: insight-users at itk.org Subject: Re: [ITK-users] Strange situation when ITK writes DICOM file ?I have confirmed this bug and entered it into tracker along with a DICOM series which reproduces it.? Thanks Shen On Tue, Dec 22, 2015 at 8:41 PM, ??? > wrote: Hi all, I met a very strange situation when I used ITK 4.8.1. I'd like to read a DICOM series, write it to a DICOM file (i.e. save the volume created by the DICOM series to a .dcm file), and read the DICOM file. Theoretically, the DICOM series and the DCM file should have the same information, e.g origin, spacing, size. However, My results show me that the information has been changed. When I use other ITK-support file format (e.g. nii, nrrd), the information has not been changed. It seems a bug. My code and results are listed as below. Has anyone met the same situation? Regards, Zhuangming Shen ? ================ My code ================= import itk input_dir = "/home/zshen/workspace/Data/testDCM/bbb" output_filename = "/home/zshen/workspace/Data/bbb2.dcm" # read DICOM series dicom_io = itk.GDCMImageIO.New() reader = itk.ImageSeriesReader[itk.Image.SS3].New() reader.SetImageIO(dicom_io) name_generator = itk.GDCMSeriesFileNames.New() name_generator.SetUseSeriesDetails(True) name_generator.SetDirectory(input_dir) series_uid = name_generator.GetSeriesUIDs() series_identifier = series_uid[0] file_names = name_generator.GetFileNames(series_identifier) reader.SetFileNames(file_names) reader.Update() print("**** series DICOM information: *****") print("size: "+str(reader.GetOutput().GetLargestPossibleRegion().GetSize())) print("origin: "+str(reader.GetOutput().GetOrigin())) print("spacing: "+str(reader.GetOutput().GetSpacing())) writer = itk.ImageFileWriter[itk.Image.SS3].New() writer.SetInput(reader.GetOutput()) writer.SetFileName(output_filename) writer.Update() # read again reader2 = itk.ImageFileReader[itk.Image.SS3].New() reader2.SetFileName(output_filename) reader2.Update() print("**** DICOM information: *****") print("size: "+str(reader2.GetOutput().GetLargestPossibleRegion().GetSize())) print("origin: "+str(reader2.GetOutput().GetOrigin())) print("spacing: "+str(reader2.GetOutput().GetSpacing())) ================= My results ==================== **** series DICOM information: ***** size: itkSize3 ([512, 512, 118]) origin: itkPointD3 ([-229.5, -96.5, -553]) spacing: itkVectorD3 ([0.896484, 0.896484, 3]) **** DICOM information: ***** size: itkSize3 ([512, 512, 118]) origin: itkPointD3 ([0, 0, 0]) spacing: itkVectorD3 ([0.896484, 0.896484, 1]) _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Result.png Type: image/png Size: 23765 bytes Desc: Result.png URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From aptekarev at gmail.com Tue May 3 02:00:33 2016 From: aptekarev at gmail.com (=?utf-8?B?0KTRkdC00L7RgCDQkNC/0YLQtdC60LDRgNC10LI=?=) Date: Tue, 3 May 2016 09:00:33 +0300 Subject: [ITK] Subcontractor for ITK segmentation job Message-ID: <6F9E5DAE-A96A-4E74-B3A5-D7BC290508BF@gmail.com> Hi list! I am doing a project in the field of medical image analysis. I was doing research and looking for a subcontractor for CBCT image segmentation and the ITK community seems the best place to ask the following question: - Where would the list members advise me to look for a freelance software engineer to outsource writing of a CBCT segmentation module? - Is there anyone reading these lines who can be our subcontractor for a job? (sorry if this question is inappropriate for the list) Currently VTK with python bindings is used to do mesh manipulation and to send the 3d models to a WebGL renderer. Cheers, Theodor From abenchaaben at histalim.com Tue May 3 05:13:52 2016 From: abenchaaben at histalim.com (abenchaaben) Date: Tue, 3 May 2016 02:13:52 -0700 (MST) Subject: [ITK] [ITK-users] Itk Volume From Slices Message-ID: <1462266832069-7588801.post@n2.nabble.com> Hi, I'm using the volume from slices ITK example to build a volume from 2d RGB png files. I want to know if they a condition on the numbers of images that i should pass to the seriesReader class. Because my applicvation just crash when i put many image to the class. Regards. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Itk-Volume-From-Slices-tp7588801.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From tobias.wood at kcl.ac.uk Tue May 3 12:01:49 2016 From: tobias.wood at kcl.ac.uk (Wood, Tobias) Date: Tue, 3 May 2016 16:01:49 +0000 Subject: [ITK] PasteImageFilter versus TileImageFilter Message-ID: <0A18AB0C-330A-424A-B489-19D19EE69AEA@kcl.ac.uk> Hello, I have two linked questions: 1 - What is the correct way to set the direction/spacing etc. of TileImageFilter? 2 - Is it possible to run PasteImageFilter in-place? i.e. overwrite a section of the destination image? I have a pipeline where the input is a 4D file. I extract each 3D volume, process it, and then need to combine the 3D volumes back into a 4D file with the same direction/spacing as the input. I was using TileImageFilter to do this, but I observed that the direction/spacing did not match the input. I resorted to disconnecting the pipeline from the output image and copying the direction/spacing manually from the input image. You can see that version of the pipeline here: https://github.com/spinicist/QUIT/blob/development/Source/qikfilter.cpp. Is there a more ?correct? way to do this? As an alternative, today I experimented with PasteImageFilter. I was hoping to be able to run this in-place to save memory, but if I set InPlaceOn(), I get the following error: libc++abi.dylib: terminating with uncaught exception of type itk::ExceptionObject: ?/ITK/Modules/Core/Common/src/itkMultiThreader.cxx:420: itk::ERROR: MultiThreader(0x7f8509009600): Exception occurred during SingleMethodExecute ?/include/ITK-4.10/itkImageConstIterator.h:211: itk::ERROR: Region ImageRegion (0x7fff52f4f980) Dimension: 4 Index: [0, 0, 0, 1] Size: [96, 96, 24, 1] is outside of buffered region ImageRegion (0x7f850998dd80) Dimension: 4 Index: [0, 0, 0, 0] Size: [0, 0, 0, 0] Which suggests the output is not being allocated (which I guess it shouldn?t)? So do I need to do something more than set InPlaceOn()? Thanks, Toby From Anchit.Dhar at mathworks.com Tue May 3 17:28:35 2016 From: Anchit.Dhar at mathworks.com (Anchit Dhar) Date: Tue, 3 May 2016 21:28:35 +0000 Subject: [ITK] [ITK-users] Registration performance regression on machines with large number of cores Message-ID: Hello, We are registering two images using the 'MultiResolutionImageRegistrationMethod' in ITK v4.8 and are seeing a performance degradation on machines with large number of cores. We use the MultiResolutionImageRegistrationMethod with RegularStepGradientDescent optimizer and MeanSquares metric. Two separate issues are observed here: 1. Performance degradation of image registration on machines with higher number of cores as compared to ones with lower number. A Dual-core machine showed better performance with the image registration than one with 20 cores. The performance degradation observed on a machine with 20 physical cores and also on one with 6 physical (12 logical cores). 2. Performance degradation of image registration on subsequent runs on the same machine (with higher number of cores) The performance of registration continuously regresses on subsequent runs within an application session. This issue gets resolved on setting the number of cores to a lower number (setting to number of physical cores rather than logical cores) I have gone ahead and created the a bug for this issue. https://issues.itk.org/jira/browse/ITK-3427 Has anyone else had similar experiences with the multi-threaded MultiResolutionImageRegistrationMethod? Thanks. -Anchit -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From Aude.CHENET-ext at galderma.com Wed May 4 10:15:00 2016 From: Aude.CHENET-ext at galderma.com (CHENET Aude (External)) Date: Wed, 4 May 2016 14:15:00 +0000 Subject: [ITK] [ITK-users] Using ITK with python wrapping Message-ID: <512AA6AA7E7E224A874888677C6CB2FB586B60@WWEURMBX03.galderma.com> Hello I've built ITK 4.9 with Python wrapping. Compilation is OK. I tried to use ITK in my python code : import itk pixelType = itk.UC imageType = itk.Image[pixelType,2] readerType = itk.ImageFileReader[imageType] reader = readerType.New() reader.SetFileName('test.tif') There is the following error : Traceback (most recent call last): File "C:\test.py", line 12, in imageType = itk.Image[pixelType,2] File "C:\Python27\Lib\site-packages\itkLazy.py", line 42, in __getattribute__ itkBase.LoadModule(module, namespace) File "C:\Python27\Lib\site-packages\itkBase.py", line 118, in LoadModule LoadModule(dep, namespace) File "C:\Python27\Lib\site-packages\itkBase.py", line 118, in LoadModule LoadModule(dep, namespace) File "C:\Python27\Lib\site-packages\itkBase.py", line 118, in LoadModule LoadModule(dep, namespace) File "C:\Python27\Lib\site-packages\itkBase.py", line 118, in LoadModule LoadModule(dep, namespace) File "C:\Python27\Lib\site-packages\itkBase.py", line 128, in LoadModule module = loader.load(swigModuleName) File "C:\Python27\Lib\site-packages\itkBase.py", line 245, in load return imp.load_module(name, fp, pathname, description) File "C:\Python27\Lib\site-packages\itk\ITKCommonPython.py", line 32, in _ITKCommonPython = swig_import_helper() File "C:\Python27\Lib\site-packages\itk\ITKCommonPython.py", line 28, in swig_import_helper _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) ImportError: DLL load failed: Le module sp?cifi? est introuvable. Can someone help me to use itk in my code? Aude -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From silvain.beriault at zimmercas.com Wed May 4 11:17:25 2016 From: silvain.beriault at zimmercas.com (=?iso-8859-1?Q?Silvain_B=E9riault?=) Date: Wed, 4 May 2016 15:17:25 +0000 Subject: [ITK] Write and read itkEuler3DTransform with m_ComputeZYX = 1 Message-ID: <351795E88040B54CAFE6E977EC789B180109AF7F@SRV-EXCHANGE.zimmercas.com> Hello, I and trying to write an itk::Euler3DTransform (with m_ComputeZYX = 1) to file (*.tfm file format). However, I noticed the flag m_ComputeZYX is not saved to the tfm file. Consequently, when I read-back the transform from file, I get a different transform (i.e. a transform with same angles but different matrix since m_ComputeZYX = 0 ). I am using ITK version 4.9.1 (latest release). Any help on this issue would be greatly appreciated. An example follows. Regards, Silvain Beriault, Ph.D. code sample: include #include #include #include int main() { typedef itk::Euler3DTransform TransformType; TransformType::Pointer transformIn = TransformType::New(); transformIn->SetComputeZYX(true); double angleX = 90; double angleY = 180; double angleZ = 0; double deg2rad = itk::Math::pi / 180.0; transformIn->SetRotation(angleX * deg2rad, angleY * deg2rad, angleZ * deg2rad); typedef itk::TransformFileWriterTemplate WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetInput(transformIn); writer->SetFileName("D:/tmp/transform.tfm"); writer->Update(); typedef itk::TransformFileReaderTemplate ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName("D:/tmp/transform.tfm"); reader->Update(); auto transformOut = (reader->GetTransformList()->begin())->GetPointer(); std::cout << "****TransformIn****" << std::endl; std::cout << transformIn << std::endl << std::endl << std::endl; std::cout << "****TransformOut****" << std::endl; std::cout << *transformOut << std::endl << std::endl << std::endl; } The screen output is: ****TransformIn**** Euler3DTransform (0000000000461BF0) RTTI typeinfo: class itk::Euler3DTransform Reference Count: 4 Modified Time: 12 Debug: Off Object Name: Observers: none Matrix: -1 1.22465e-016 7.4988e-033 0 6.12323e-017 -1 -1.22465e-016 -1 -6.12323e-017 Offset: [0, 0, 0] Center: [0, 0, 0] Translation: [0, 0, 0] Inverse: -1 0 -1.22465e-016 1.22465e-016 0 -1 0 -1 0 Singular: 0 Euler's angles: AngleX=1.5708 AngleY=3.14159 AngleZ=0 m_ComputeZYX = 1 ****TransformOut**** Euler3DTransform (0000000000473180) RTTI typeinfo: class itk::Euler3DTransform Reference Count: 2 Modified Time: 673 Debug: Off Object Name: Observers: none Matrix: -1 0 1.22465e-016 1.22465e-016 6.12323e-017 1 -7.4988e-033 1 -6.12323e-017 Offset: [0, 0, 0] Center: [0, 0, 0] Translation: [0, 0, 0] Inverse: -1 1.22465e-016 -7.4988e-033 -7.4988e-033 4.59169e-049 1 1.22465e-016 1 4.59169e-049 Singular: 0 Euler's angles: AngleX=1.5708 AngleY=3.14159 AngleZ=0 m_ComputeZYX = 0 The saved transform is : #Insight Transform File V1.0 #Transform 0 Transform: Euler3DTransform_double_3_3 Parameters: 1.5707963267948966 3.141592653589793 0 0 0 0 FixedParameters: 0 0 0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fausto.milletari at gmail.com Wed May 4 13:14:37 2016 From: fausto.milletari at gmail.com (=?utf-8?Q?fausto_milletar=C3=AC?=) Date: Wed, 4 May 2016 19:14:37 +0200 Subject: [ITK] [ITK-users] SimpleITK, read MHD volume and convert it into a numpy array respecting its transformation Message-ID: <251D64E2-389D-425C-A142-FF43AD08D18D@gmail.com> Hello everyone, I have a probably naive question about simpleITK. I find simpleITK extremely useful to process medical data such as MRI scans but I would like also to enjoy being able to convert my images in numpy format while respecting the transformation of the volume. In other words I would like to get the MRI image in numpy rotated by the correct amount around each axis with zero padding for example. when i do simply sitk.GetArrayFromImage(imgResampledCropped)I get back the raw data itself, but what I would like to do is to have a numpy array that contains the data ?ready to visualise? by simple slicing of the array itself. Do you think this is doable? Is there a standard way of doing it? Kind regards, Fausto -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From javij1 at gmail.com Wed May 4 14:15:22 2016 From: javij1 at gmail.com (=?UTF-8?Q?Javier_Juan_Albarrac=c3=adn?=) Date: Wed, 4 May 2016 20:15:22 +0200 Subject: [ITK] [ITK-users] Get for each voxel of a 4D image inside a mask, their corresponding 4D values Message-ID: <5cfb5664-dddf-c842-4d43-817c85659a9a@gmail.com> Hello, I am sorry if the question is too simple but I am a newbie with ITK and I don't find the way to solve my problem I have a 4D image, which is a DSC Perfusion weighted MRI. First of all, the type of the image must be itk::Image or itk::Image, 3> ?? In the later case, I do not know at compile time the value of N. And the core question, supose the image is of size 270x270x171x34, I want to extract for each voxel of the image which is inside the intracraneal mask, their 34 corresponding values. The intracraneal mask is not a rectangular region, but is a brain-like mask (itk::Image volume). In a classic "for loop" scheme (where I come from) the code would be for (int x = 0; x < image.width(); x++) { for (int y = 0; y < image.height(); y++) { for (int z = 0; z < image.depth(); z++) { if (!mask(x, y, z)) continue; for (int c = 0; c < image.spectrum(); c++) int v = image(x, y, z, c); i++; } } } How can do this in ITK?? I have read several ImageRegionIterator examples, but I do not find a clean and correct way to do what I want. Thank you very much. Regards. Javier. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From zivrafael.yaniv at nih.gov Wed May 4 14:26:42 2016 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Wed, 4 May 2016 18:26:42 +0000 Subject: [ITK] Write and read itkEuler3DTransform with m_ComputeZYX = 1 Message-ID: Hello Silvain, I reproduced this bug, and yes you are correct in that it is because the m_ComputeZYX variable is not serialized. Will likely add it as an additional fixed parameter which should solve this issue. Will keep you posted when the patch is on gerrit. Also, the current behavior of the class when turning this flag on/off is inconsistent: SetParameters(); SetComputeZYX(); vs. SetComputeZYX(); SetParameters(); yield different matrices. Ziv From: Silvain B?riault > Date: Wednesday, May 4, 2016 at 11:17 AM To: "community at itk.org" > Subject: [ITK] Write and read itkEuler3DTransform with m_ComputeZYX = 1 Hello, I and trying to write an itk::Euler3DTransform (with m_ComputeZYX = 1) to file (*.tfm file format). However, I noticed the flag m_ComputeZYX is not saved to the tfm file. Consequently, when I read-back the transform from file, I get a different transform (i.e. a transform with same angles but different matrix since m_ComputeZYX = 0 ). I am using ITK version 4.9.1 (latest release). Any help on this issue would be greatly appreciated. An example follows. Regards, Silvain Beriault, Ph.D. code sample: include #include #include #include intmain() { typedefitk::Euler3DTransform TransformType; TransformType::PointertransformIn = TransformType::New(); transformIn->SetComputeZYX(true); doubleangleX = 90; doubleangleY = 180; doubleangleZ = 0; doubledeg2rad = itk::Math::pi / 180.0; transformIn->SetRotation(angleX * deg2rad, angleY * deg2rad, angleZ * deg2rad); typedefitk::TransformFileWriterTemplate WriterType; WriterType::Pointerwriter = WriterType::New(); writer->SetInput(transformIn); writer->SetFileName("D:/tmp/transform.tfm"); writer->Update(); typedefitk::TransformFileReaderTemplate ReaderType; ReaderType::Pointerreader = ReaderType::New(); reader->SetFileName("D:/tmp/transform.tfm"); reader->Update(); autotransformOut = (reader->GetTransformList()->begin())->GetPointer(); std::cout << "****TransformIn****" << std::endl; std::cout << transformIn << std::endl << std::endl << std::endl; std::cout << "****TransformOut****" << std::endl; std::cout << *transformOut << std::endl << std::endl << std::endl; } The screen output is: ****TransformIn**** Euler3DTransform (0000000000461BF0) RTTI typeinfo: class itk::Euler3DTransform Reference Count: 4 Modified Time: 12 Debug: Off Object Name: Observers: none Matrix: -1 1.22465e-016 7.4988e-033 0 6.12323e-017 -1 -1.22465e-016 -1 -6.12323e-017 Offset: [0, 0, 0] Center: [0, 0, 0] Translation: [0, 0, 0] Inverse: -1 0 -1.22465e-016 1.22465e-016 0 -1 0 -1 0 Singular: 0 Euler's angles: AngleX=1.5708 AngleY=3.14159 AngleZ=0 m_ComputeZYX = 1 ****TransformOut**** Euler3DTransform (0000000000473180) RTTI typeinfo: class itk::Euler3DTransform Reference Count: 2 Modified Time: 673 Debug: Off Object Name: Observers: none Matrix: -1 0 1.22465e-016 1.22465e-016 6.12323e-017 1 -7.4988e-033 1 -6.12323e-017 Offset: [0, 0, 0] Center: [0, 0, 0] Translation: [0, 0, 0] Inverse: -1 1.22465e-016 -7.4988e-033 -7.4988e-033 4.59169e-049 1 1.22465e-016 1 4.59169e-049 Singular: 0 Euler's angles: AngleX=1.5708 AngleY=3.14159 AngleZ=0 m_ComputeZYX = 0 The saved transform is : #Insight Transform File V1.0 #Transform 0 Transform: Euler3DTransform_double_3_3 Parameters: 1.5707963267948966 3.141592653589793 0 0 0 0 FixedParameters: 0 0 0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Wed May 4 14:36:43 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Wed, 4 May 2016 18:36:43 +0000 Subject: [ITK] [ITK-users] SimpleITK, read MHD volume and convert it into a numpy array respecting its transformation In-Reply-To: <251D64E2-389D-425C-A142-FF43AD08D18D@gmail.com> References: <251D64E2-389D-425C-A142-FF43AD08D18D@gmail.com> Message-ID: <2E7CE142-2BFD-4C27-ADF5-794E633224FE@mail.nih.gov> Hello, If I understand you correctly you want to rotate the image and pad it for visualization before exporting to numpy. Have you looked into the ResampleImageFilter? It accepts a transform, along with output image geometry so that you can readily manipulate the image for display. You also may want to scale the image?s intensity with a WindowLevelImageFilter for better visualization of the range of interest. HTH, Brad On May 4, 2016, at 1:14 PM, fausto milletar? > wrote: Hello everyone, I have a probably naive question about simpleITK. I find simpleITK extremely useful to process medical data such as MRI scans but I would like also to enjoy being able to convert my images in numpy format while respecting the transformation of the volume. In other words I would like to get the MRI image in numpy rotated by the correct amount around each axis with zero padding for example. when i do simply sitk.GetArrayFromImage(imgResampledCropped)I get back the raw data itself, but what I would like to do is to have a numpy array that contains the data ?ready to visualise? by simple slicing of the array itself. Do you think this is doable? Is there a standard way of doing it? Kind regards, Fausto _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From fausto.milletari at gmail.com Wed May 4 14:40:23 2016 From: fausto.milletari at gmail.com (=?utf-8?Q?fausto_milletar=C3=AC?=) Date: Wed, 4 May 2016 20:40:23 +0200 Subject: [ITK] [ITK-users] SimpleITK, read MHD volume and convert it into a numpy array respecting its transformation In-Reply-To: <2E7CE142-2BFD-4C27-ADF5-794E633224FE@mail.nih.gov> References: <251D64E2-389D-425C-A142-FF43AD08D18D@gmail.com> <2E7CE142-2BFD-4C27-ADF5-794E633224FE@mail.nih.gov> Message-ID: <6DA80880-E1D3-42EF-B32F-81020FF76C1B@gmail.com> Hello, I thank you for you fast and accurate answer. This was exactly what I was looking for. Actually I don?t need to visualise the data but further process it in a common reference frame. I think that your answer solves the problem. I will look into the ResampleImageFilter (that so far I was using only to adjust the resolution of different volumes acquired with different scanners to a common one). Thanks a lot! Fausto Milletari > On 04 May 2016, at 20:36, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: > > Hello, > > If I understand you correctly you want to rotate the image and pad it for visualization before exporting to numpy. > > Have you looked into the ResampleImageFilter? It accepts a transform, along with output image geometry so that you can readily manipulate the image for display. You also may want to scale the image?s intensity with a WindowLevelImageFilter for better visualization of the range of interest. > > HTH, > Brad > >> On May 4, 2016, at 1:14 PM, fausto milletar? > wrote: >> >> Hello everyone, >> >> I have a probably naive question about simpleITK. I find simpleITK extremely useful to process medical data such as MRI scans but I would like also to enjoy being able to convert my images in numpy format while respecting the transformation of the volume. >> >> In other words I would like to get the MRI image in numpy rotated by the correct amount around each axis with zero padding for example. >> >> when i do simply sitk.GetArrayFromImage(imgResampledCropped)I get back the raw data itself, but what I would like to do is to have a numpy array that contains the data ?ready to visualise? by simple slicing of the array itself. >> >> Do you think this is doable? Is there a standard way of doing it? >> >> >> >> Kind regards, >> >> Fausto >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From hans-johnson at uiowa.edu Wed May 4 14:19:02 2016 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Wed, 4 May 2016 18:19:02 +0000 Subject: [ITK] [ITK-users] Get for each voxel of a 4D image inside a mask, their corresponding 4D values In-Reply-To: <5cfb5664-dddf-c842-4d43-817c85659a9a@gmail.com> References: <5cfb5664-dddf-c842-4d43-817c85659a9a@gmail.com> Message-ID: Consider the ?ImageRegionIteratorWithIndex? for(it.GotoBegin(); !it.IsAtEnd(); ++it) { const IndexType index = it.GetIndex(); If(mask.Get(Index)) { newvalue = it->GetValue() } } Hans -- On 5/4/16, 1:15 PM, "Insight-users on behalf of Javier Juan Albarrac?n" wrote: >Hello, > >I am sorry if the question is too simple but I am a newbie with ITK and >I don't find the way to solve my problem > >I have a 4D image, which is a DSC Perfusion weighted MRI. First of all, >the type of the image must be itk::Image or >itk::Image, 3> ?? In the later case, I do >not know at compile time the value of N. > >And the core question, supose the image is of size 270x270x171x34, I >want to extract for each voxel of the image which is inside the >intracraneal mask, their 34 corresponding values. The intracraneal mask >is not a rectangular region, but is a brain-like mask (itk::Image3> volume). > >In a classic "for loop" scheme (where I come from) the code would be > >for (int x = 0; x < image.width(); x++) >{ > for (int y = 0; y < image.height(); y++) > { > for (int z = 0; z < image.depth(); z++) > { > if (!mask(x, y, z)) > continue; > > for (int c = 0; c < image.spectrum(); c++) > int v = image(x, y, z, c); > i++; > } > } >} > > >How can do this in ITK?? I have read several ImageRegionIterator >examples, but I do not find a clean and correct way to do what I want. > >Thank you very much. >Regards. > >Javier. >_____________________________________ >Powered by www.kitware.com > >Visit other Kitware open-source projects at >http://www.kitware.com/opensource/opensource.html > >Kitware offers ITK Training Courses, for more information visit: >http://www.kitware.com/products/protraining.php > >Please keep messages on-topic and check the 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 insight-users at itk.org Wed May 4 15:36:07 2016 From: insight-users at itk.org (Paolo Zaffino via Insight-users) Date: Wed, 4 May 2016 21:36:07 +0200 Subject: [ITK] [ITK-users] SimpleITK, read MHD volume and convert it into a numpy array respecting its transformation In-Reply-To: <6DA80880-E1D3-42EF-B32F-81020FF76C1B@gmail.com> References: <251D64E2-389D-425C-A142-FF43AD08D18D@gmail.com> <2E7CE142-2BFD-4C27-ADF5-794E633224FE@mail.nih.gov> <6DA80880-E1D3-42EF-B32F-81020FF76C1B@gmail.com> Message-ID: <2e9e205a-8f6a-5eb0-71ca-0ac730685f10@yahoo.it> Hi Fausto, if you want to accomplish all the stuff entirely from the scipy/scikit side, I think you could use [1] and [2] (check the matching between documentation version and library version). HTH. Best. Paolo [1] http://docs.scipy.org/doc/scipy-0.16.0/reference/generated/scipy.ndimage.interpolation.rotate.html [2] http://scikit-image.org/docs/dev/api/skimage.transform.html#skimage.transform.rotate On 04/05/2016 20:40, fausto milletar? wrote: > Hello, > > I thank you for you fast and accurate answer. This was exactly what I > was looking for. Actually I don?t need to visualise the data but > further process it in a common reference frame. I think that your > answer solves the problem. I will look into the ResampleImageFilter > (that so far I was using only to adjust the resolution of different > volumes acquired with different scanners to a common one). > > > Thanks a lot! > > Fausto Milletari >> On 04 May 2016, at 20:36, Lowekamp, Bradley (NIH/NLM/LHC) [C] >> > wrote: >> >> Hello, >> >> If I understand you correctly you want to rotate the image and pad it >> for visualization before exporting to numpy. >> >> Have you looked into the ResampleImageFilter? It accepts a transform, >> along with output image geometry so that you can readily manipulate >> the image for display. You also may want to scale the image?s >> intensity with a WindowLevelImageFilter for better visualization of >> the range of interest. >> >> HTH, >> Brad >> >>> On May 4, 2016, at 1:14 PM, fausto milletar? >>> > wrote: >>> >>> Hello everyone, >>> >>> I have a probably naive question about simpleITK. I find simpleITK >>> extremely useful to process medical data such as MRI scans but I >>> would like also to enjoy being able to convert my images in numpy >>> format while respecting the transformation of the volume. >>> >>> In other words I would like to get the MRI image in numpy rotated by >>> the correct amount around each axis with zero padding for example. >>> >>> when i do simply sitk.GetArrayFromImage(imgResampledCropped)I get >>> back the raw data itself, but what I would like to do is to have a >>> numpy array that contains the data ?ready to visualise? by simple >>> slicing of the array itself. >>> >>> Do you think this is doable? Is there a standard way of doing it? >>> >>> >>> >>> Kind regards, >>> >>> Fausto >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From fausto.milletari at gmail.com Wed May 4 16:17:56 2016 From: fausto.milletari at gmail.com (=?utf-8?Q?fausto_milletar=C3=AC?=) Date: Wed, 4 May 2016 22:17:56 +0200 Subject: [ITK] [ITK-users] SimpleITK, read MHD volume and convert it into a numpy array respecting its transformation In-Reply-To: <6DA80880-E1D3-42EF-B32F-81020FF76C1B@gmail.com> References: <251D64E2-389D-425C-A142-FF43AD08D18D@gmail.com> <2E7CE142-2BFD-4C27-ADF5-794E633224FE@mail.nih.gov> <6DA80880-E1D3-42EF-B32F-81020FF76C1B@gmail.com> Message-ID: <79C2352D-F2E6-40B4-AADE-3901CF2E2956@gmail.com> Hello, just as a brief attempt i tried: resample=sitk.ResampleImageFilter() resample.SetReferenceImage(img) resample.SetOutputDirection(img.GetDirection()) Seems that, after I obtain the numpy array as: test=resample.Execute(img) volume=sitk.GetArrayFromImage(test) Nothing changes in terms of data array. If I also add resample.SetOutputSpacing(img.GetSpacing()/2.) then the numpy array changes and depicts a down-sampled version of the image. I suspect i have to use resample.SetTransform() but I will need to create this transform using one of the transform types available in sitk. How can I create a transform that is equivalent to the one contained in the header of my MHD file? Should I create a transform starting from the volume direction and maybe offset? I could not find any example of this so far? Best regards and thanks much for your help and your answers, Fausto > On 04 May 2016, at 20:40, fausto milletar? wrote: > > Hello, > > I thank you for you fast and accurate answer. This was exactly what I was looking for. Actually I don?t need to visualise the data but further process it in a common reference frame. I think that your answer solves the problem. I will look into the ResampleImageFilter (that so far I was using only to adjust the resolution of different volumes acquired with different scanners to a common one). > > > Thanks a lot! > > Fausto Milletari >> On 04 May 2016, at 20:36, Lowekamp, Bradley (NIH/NLM/LHC) [C] > wrote: >> >> Hello, >> >> If I understand you correctly you want to rotate the image and pad it for visualization before exporting to numpy. >> >> Have you looked into the ResampleImageFilter? It accepts a transform, along with output image geometry so that you can readily manipulate the image for display. You also may want to scale the image?s intensity with a WindowLevelImageFilter for better visualization of the range of interest. >> >> HTH, >> Brad >> >>> On May 4, 2016, at 1:14 PM, fausto milletar? > wrote: >>> >>> Hello everyone, >>> >>> I have a probably naive question about simpleITK. I find simpleITK extremely useful to process medical data such as MRI scans but I would like also to enjoy being able to convert my images in numpy format while respecting the transformation of the volume. >>> >>> In other words I would like to get the MRI image in numpy rotated by the correct amount around each axis with zero padding for example. >>> >>> when i do simply sitk.GetArrayFromImage(imgResampledCropped)I get back the raw data itself, but what I would like to do is to have a numpy array that contains the data ?ready to visualise? by simple slicing of the array itself. >>> >>> Do you think this is doable? Is there a standard way of doing it? >>> >>> >>> >>> Kind regards, >>> >>> Fausto >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From javij1 at gmail.com Thu May 5 05:48:24 2016 From: javij1 at gmail.com (=?UTF-8?Q?Javier_Juan_Albarrac=c3=adn?=) Date: Thu, 5 May 2016 11:48:24 +0200 Subject: [ITK] [ITK-users] 4D Image to Matrix inside mask In-Reply-To: <5cfb5664-dddf-c842-4d43-817c85659a9a@gmail.com> References: <5cfb5664-dddf-c842-4d43-817c85659a9a@gmail.com> Message-ID: Hello, I have a 4D image, which is a DSC Perfusion weighted MRI. Supose the image has the dimenisions 270x270x171x34. I want to convert this image into a Matrix of size Nx34, where N are the number of voxels inside the intracraneal mask. The Matrix class comes from Eigen library. In a classic "for loop" scheme the code would be for (int x = 0; x < image.width(); x++) { for (int y = 0; y < image.height(); y++) { for (int z = 0; z < image.depth(); z++) { if (!mask(x, y, z)) continue; for (int c = 0; c < image.spectrum(); c++) Matrix(i, c) = image(x, y, z, c); i++; } } } How can I do this in ITK?? I have read several ImageRegionIterator examples, but I do not find a clean and correct way to do what I want. Thank you very much. Regards. Javier. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From blowekamp at mail.nih.gov Thu May 5 09:18:33 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Thu, 5 May 2016 13:18:33 +0000 Subject: [ITK] [ITK-users] SimpleITK, read MHD volume and convert it into a numpy array respecting its transformation In-Reply-To: <79C2352D-F2E6-40B4-AADE-3901CF2E2956@gmail.com> References: <251D64E2-389D-425C-A142-FF43AD08D18D@gmail.com> <2E7CE142-2BFD-4C27-ADF5-794E633224FE@mail.nih.gov> <6DA80880-E1D3-42EF-B32F-81020FF76C1B@gmail.com> <79C2352D-F2E6-40B4-AADE-3901CF2E2956@gmail.com> Message-ID: <5D73897C-30E8-4368-9ADD-447F5C0F8F64@mail.nih.gov> Hi, One of the key feature of ITK is that images are not just voxel, but oriented object that have a physical location. This is why the Image class has associated with the an Origin, Spacing, and Direction. You can use the Image::TransformIndexToPhysicalPoint to see this mapping. Also print the SimpleITK image and look at these attributes. The ResampleImageFilter applies a geometric transform from the input image's physical space to the output image's physical space defined by the Output parameters of the ResampleImageFiler. In your first attempt, your input image and output image are in the same physical space so it is expected that they would be the same. The input and output image maintain the same meta-data, because of the call the SetReferenceIamge(img). From your initial post, it sounds like you want to resample a set of images to a common reference frame. So you need to define that common reference image?s origin, spacing, direction, and size. And use that information in the ResampleImageFilter. This assumes that you don?t want to change the physical location of the image. HTH, Brad On May 4, 2016, at 4:17 PM, fausto milletar? > wrote: Hello, just as a brief attempt i tried: resample=sitk.ResampleImageFilter() resample.SetReferenceImage(img) resample.SetOutputDirection(img.GetDirection()) Seems that, after I obtain the numpy array as: test=resample.Execute(img) volume=sitk.GetArrayFromImage(test) Nothing changes in terms of data array. If I also add resample.SetOutputSpacing(img.GetSpacing()/2.) then the numpy array changes and depicts a down-sampled version of the image. I suspect i have to use resample.SetTransform() but I will need to create this transform using one of the transform types available in sitk. How can I create a transform that is equivalent to the one contained in the header of my MHD file? Should I create a transform starting from the volume direction and maybe offset? I could not find any example of this so far? Best regards and thanks much for your help and your answers, Fausto On 04 May 2016, at 20:40, fausto milletar? > wrote: Hello, I thank you for you fast and accurate answer. This was exactly what I was looking for. Actually I don?t need to visualise the data but further process it in a common reference frame. I think that your answer solves the problem. I will look into the ResampleImageFilter (that so far I was using only to adjust the resolution of different volumes acquired with different scanners to a common one). Thanks a lot! Fausto Milletari On 04 May 2016, at 20:36, Lowekamp, Bradley (NIH/NLM/LHC) [C] > wrote: Hello, If I understand you correctly you want to rotate the image and pad it for visualization before exporting to numpy. Have you looked into the ResampleImageFilter? It accepts a transform, along with output image geometry so that you can readily manipulate the image for display. You also may want to scale the image?s intensity with a WindowLevelImageFilter for better visualization of the range of interest. HTH, Brad On May 4, 2016, at 1:14 PM, fausto milletar? > wrote: Hello everyone, I have a probably naive question about simpleITK. I find simpleITK extremely useful to process medical data such as MRI scans but I would like also to enjoy being able to convert my images in numpy format while respecting the transformation of the volume. In other words I would like to get the MRI image in numpy rotated by the correct amount around each axis with zero padding for example. when i do simply sitk.GetArrayFromImage(imgResampledCropped)I get back the raw data itself, but what I would like to do is to have a numpy array that contains the data ?ready to visualise? by simple slicing of the array itself. Do you think this is doable? Is there a standard way of doing it? Kind regards, Fausto _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Thu May 5 10:12:06 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 5 May 2016 10:12:06 -0400 Subject: [ITK] [ITK-users] Using ITK with python wrapping In-Reply-To: <512AA6AA7E7E224A874888677C6CB2FB586B60@WWEURMBX03.galderma.com> References: <512AA6AA7E7E224A874888677C6CB2FB586B60@WWEURMBX03.galderma.com> Message-ID: Hello Aude, Welcome to ITK! The directory containing the ITK DLL files needs to be added to the PATH environmental variable on Windows. For more information, see the Wrapping section of the ITK Software Guide: https://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch3.html#x34-410003.7 As of ITK 4.10, this will no longer be necessary if BUILD_SHARED_LIBS is OFF in the CMake configuration. Hope this helps, Matt On Wed, May 4, 2016 at 10:15 AM, CHENET Aude (External) wrote: > Hello > > > > I?ve built ITK 4.9 with Python wrapping. Compilation is OK. > > I tried to use ITK in my python code : > > > > import itk > > pixelType = itk.UC > > imageType = itk.Image[pixelType,2] > > readerType = itk.ImageFileReader[imageType] > > reader = readerType.New() > > reader.SetFileName(?test.tif?) > > > > There is the following error : > > > > Traceback (most recent call last): > > File "C:\test.py", line 12, in > > imageType = itk.Image[pixelType,2] > > File "C:\Python27\Lib\site-packages\itkLazy.py", line 42, in > __getattribute__ > > itkBase.LoadModule(module, namespace) > > File "C:\Python27\Lib\site-packages\itkBase.py", line 118, in LoadModule > > LoadModule(dep, namespace) > > File "C:\Python27\Lib\site-packages\itkBase.py", line 118, in LoadModule > > LoadModule(dep, namespace) > > File "C:\Python27\Lib\site-packages\itkBase.py", line 118, in LoadModule > > LoadModule(dep, namespace) > > File "C:\Python27\Lib\site-packages\itkBase.py", line 118, in LoadModule > > LoadModule(dep, namespace) > > File "C:\Python27\Lib\site-packages\itkBase.py", line 128, in LoadModule > > module = loader.load(swigModuleName) > > File "C:\Python27\Lib\site-packages\itkBase.py", line 245, in load > > return imp.load_module(name, fp, pathname, description) > > File "C:\Python27\Lib\site-packages\itk\ITKCommonPython.py", line 32, in > > > _ITKCommonPython = swig_import_helper() > > File "C:\Python27\Lib\site-packages\itk\ITKCommonPython.py", line 28, in > swig_import_helper > > _mod = imp.load_module('_ITKCommonPython', fp, pathname, description) > > ImportError: DLL load failed: Le module sp?cifi? est introuvable. > > > > > > Can someone help me to use itk in my code? > > > > Aude > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Thu May 5 10:21:12 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 5 May 2016 10:21:12 -0400 Subject: [ITK] [ITK-users] Strange situation when ITK writes DICOM file In-Reply-To: <1462243202460.83843@sphic.org.cn> References: <1450834862664.8600@sphic.org.cn> <1461914235636.15330@sphic.org.cn> <1462243202460.83843@sphic.org.cn> Message-ID: Hi Zhuangming Shen, GDCM was updated in ITK Git master, to be released in ITK 4.10. Instructions on how to obtain this version can be found here: https://itk.org/Wiki/ITK/Git/Download Thanks, Matt On Mon, May 2, 2016 at 10:40 PM, ??? wrote: > Hi D?enan, > > > Thanks for your prompt response. I used ITK 4.9.1 and your attached code > (just changed inDir and outFile) to test both public DICOM data > (http://www.osirix-viewer.com/datasets/DATA/BREBIX.zip) and private DICOM > data, the results are still incorrect (please see the attached screenshot). > What's the problem? > > > Besides, as far as I know, rescaling the intensity from short type to char > type leads to lose precision because the DICOM tags ( (0028,0100) and > (0028,0101) ) show the BitsAllocated is 16-bits and the BitsStored is > 12-bits. Consequently, this solution doesn't seem to be a good solution. Is > it possible to output the DICOM file by other tools (e.g. DCMTK) if the GDCM > doesn't support short type? > > > > Regards, > > > Zhuangming Shen > > > > > ________________________________ > From: D?enan Zuki? > Sent: Friday, April 29, 2016 9:59 PM > To: ??? > Cc: insight-users at itk.org; Matt McCormick > > Subject: Re: [ITK-users] Strange situation when ITK writes DICOM file > > Hi Shen, > > GDCM version was updated recently. It now complains that short type is > unsupported, and works correctly with char type. I attached an example which > rescales the intensity and works correctly. > > Regards, > D?enan > > On Fri, Apr 29, 2016 at 3:17 AM, ??? wrote: >> >> Hi D?enan, >> >> >> I'd like to know if the bug regarding 3D DICOM writer has been fixed. When >> I tried to run the same code but using ITK 4.9.1, I still got the same >> results, i.e. the output DICOM file does not properly record original >> image's origin and spacing. >> >> >> >> Regards, >> >> >> Zhuangming Shen >> >> ________________________________ >> From: D?enan Zuki? >> Sent: Saturday, December 26, 2015 1:44 AM >> To: ??? >> Cc: insight-users at itk.org >> Subject: Re: [ITK-users] Strange situation when ITK writes DICOM file >> >> I have confirmed this bug and entered it into tracker along with a DICOM >> series which reproduces it. >> >> Thanks Shen >> >> On Tue, Dec 22, 2015 at 8:41 PM, ??? wrote: >>> >>> Hi all, >>> >>> >>> I met a very strange situation when I used ITK 4.8.1. I'd like to read a >>> DICOM series, write it to a DICOM file (i.e. save the volume created by the >>> DICOM series to a .dcm file), and read the DICOM file. Theoretically, the >>> DICOM series and the DCM file should have the same information, e.g origin, >>> spacing, size. However, My results show me that the information has been >>> changed. When I use other ITK-support file format (e.g. nii, nrrd), the >>> information has not been changed. It seems a bug. My code and results are >>> listed as below. Has anyone met the same situation? >>> >>> >>> Regards, >>> >>> >>> Zhuangming Shen >>> >>> >>> >>> >>> ================ My code ================= >>> >>> >>> import itk >>> >>> input_dir = "/home/zshen/workspace/Data/testDCM/bbb" >>> output_filename = "/home/zshen/workspace/Data/bbb2.dcm" >>> >>> # read DICOM series >>> dicom_io = itk.GDCMImageIO.New() >>> >>> reader = itk.ImageSeriesReader[itk.Image.SS3].New() >>> reader.SetImageIO(dicom_io) >>> >>> name_generator = itk.GDCMSeriesFileNames.New() >>> name_generator.SetUseSeriesDetails(True) >>> name_generator.SetDirectory(input_dir) >>> >>> series_uid = name_generator.GetSeriesUIDs() >>> >>> series_identifier = series_uid[0] >>> >>> file_names = name_generator.GetFileNames(series_identifier) >>> >>> reader.SetFileNames(file_names) >>> reader.Update() >>> >>> print("**** series DICOM information: *****") >>> print("size: >>> "+str(reader.GetOutput().GetLargestPossibleRegion().GetSize())) >>> print("origin: "+str(reader.GetOutput().GetOrigin())) >>> print("spacing: "+str(reader.GetOutput().GetSpacing())) >>> >>> writer = itk.ImageFileWriter[itk.Image.SS3].New() >>> writer.SetInput(reader.GetOutput()) >>> writer.SetFileName(output_filename) >>> writer.Update() >>> >>> # read again >>> reader2 = itk.ImageFileReader[itk.Image.SS3].New() >>> reader2.SetFileName(output_filename) >>> reader2.Update() >>> >>> print("**** DICOM information: *****") >>> print("size: >>> "+str(reader2.GetOutput().GetLargestPossibleRegion().GetSize())) >>> print("origin: "+str(reader2.GetOutput().GetOrigin())) >>> print("spacing: "+str(reader2.GetOutput().GetSpacing())) >>> >>> >>> ================= My results ==================== >>> >>> **** series DICOM information: ***** >>> size: itkSize3 ([512, 512, 118]) >>> origin: itkPointD3 ([-229.5, -96.5, -553]) >>> spacing: itkVectorD3 ([0.896484, 0.896484, 3]) >>> **** DICOM information: ***** >>> size: itkSize3 ([512, 512, 118]) >>> origin: itkPointD3 ([0, 0, 0]) >>> spacing: itkVectorD3 ([0.896484, 0.896484, 1]) >>> >>> >>> >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >> > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From alexfd7 at gmail.com Thu May 5 10:46:05 2016 From: alexfd7 at gmail.com (alexfd7) Date: Thu, 5 May 2016 07:46:05 -0700 (MST) Subject: [ITK] [ITK-users] image->GetBufferPointer() and opposite way for 3d images Message-ID: <1462459565166-7588815.post@n2.nabble.com> Hello everyone, I have a problem, someone help me? I'm getting the image buffer. So I want to do the opposite way, import the buffer (pixelData) back to the image object, I am using importImageFilter filter to have the original image again. 2D images works very well, however with 3d images (.nrrd) i'm not getting good result, I get a darker resulting image than the original. I thank the attention and the available space for me to post my question float* pixelData; /**< Pointer to image data */ typedef float InputPixelType; typedef float OutputPixelType; typedef itk::Image InputImageType; typedef itk::Image OutputImageType; typedef itk::ImageFileReader ReaderType; typedef itk::ImageFileWriter WriterType; typedef itk::ImportImageFilter< float, 3 > ImportFilterType; ImportFilterType::Pointer importFilter = ImportFilterType::New(); typename ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( inputVolume.c_str() ); reader->Update(); typename InputImageType::Pointer image = reader->GetOutput(); typename InputImageType::RegionType region = image->GetLargestPossibleRegion(); typename InputImageType::SizeType size = region.GetSize(); int sizePixel = (size[0]*size[1]*size[2]); pixelData = (float*)malloc(size[0]*size[1]*size[2] * sizeof(float)); memcpy( pixelData, image->GetBufferPointer(), size[0]*size[1]*size[2]*sizeof(float)); ImportFilterType::SizeType sizeImport; sizeImport[0] = size[0]; // size along X sizeImport[1] = size[1]; // size along Y sizeImport[2] = size[2]; // size along Y ImportFilterType::IndexType start; start.Fill( 0 ); ImportFilterType::RegionType regionImport; regionImport.SetIndex( start ); regionImport.SetSize( sizeImport ); importFilter->SetRegion( regionImport ); const itk::SpacePrecisionType origin[ 3 ] = { 0.0, 0.0, 0.0}; importFilter->SetOrigin( origin ); const itk::SpacePrecisionType spacing[ 3 ] = { 1.0, 1.0, 1.0}; importFilter->SetSpacing( spacing ); const bool importImageFilterWillOwnTheBuffer = true; importFilter->SetImportPointer( pixelData, sizePixel, importImageFilterWillOwnTheBuffer ); importFilter->Update(); typename WriterType::Pointer writer = WriterType::New(); writer->SetFileName( outputVolume.c_str() ); writer->SetInput( importFilter->GetOutput() ); writer->SetUseCompression(1); writer->Update(); -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/image-GetBufferPointer-and-opposite-way-for-3d-images-tp7588815.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Thu May 5 11:11:40 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 5 May 2016 11:11:40 -0400 Subject: [ITK] [ITK-dev] [vtk-developers] Wiki scrapping regression after web page update In-Reply-To: References: Message-ID: Hi Bill, itk.org/ was recently changed to use HTTPS -- does making that change to your configuration help? Thanks, Matt On Thu, May 5, 2016 at 11:00 AM, Bill Lorensen wrote: > Looks like itk has been changed. Now I can no longer scrape the wiki. HELP! > > > On Tue, May 5, 2015 at 11:07 AM, David E DeMarle > wrote: >> So Bill trying to close the loop on this. >> >> We should now use. >> site = mwclient.Site('www.(project).org', '/Wiki/') >> page = site.Pages['PROJECT/Examples] >> >> That will work now and if/when www.itk.org gets it's own facelift. >> >> hth >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Thu, Apr 16, 2015 at 6:31 PM, Jean-Christophe Fillion-Robin >> wrote: >>> >>> Hi Bill, >>> >>> I wrote too fast. Ignore my previous email. >>> >>> Jc >>> >>> On Thu, Apr 16, 2015 at 6:30 PM, Jean-Christophe Fillion-Robin >>> wrote: >>>> >>>> Hi Bill, >>>> >>>> Seems the wiki is available here: http://www.vtk.org/Wiki/VTK >>>> >>>> Instead of >>>> >>>> site = mwclient.Site('vtk.org', '/Wiki/') >>>> >>>> try this >>>> >>>> site = mwclient.Site('vtk.org', '/Wiki/VTK/') >>>> >>>> Hth >>>> Jc >>>> >>>> On Mon, Apr 13, 2015 at 11:45 AM, David E DeMarle >>>> wrote: >>>>> >>>>> I'll take a look. >>>>> thanks >>>>> >>>>> David E DeMarle >>>>> Kitware, Inc. >>>>> R&D Engineer >>>>> 21 Corporate Drive >>>>> Clifton Park, NY 12065-8662 >>>>> Phone: 518-881-4909 >>>>> >>>>> On Tue, Mar 31, 2015 at 3:30 PM, Bill Lorensen >>>>> wrote: >>>>>> >>>>>> Folks, >>>>>> >>>>>> I scrape the vtk.org wiki site each evening to maintain the vtk wiki >>>>>> examples. I have a python program that uses mwclient >>>>>> (https://github.com/mwclient/mwclient) that uses the MediaWiki API. >>>>>> >>>>>> Ever since the vtk.org page was updated, my nightly scripts have been >>>>>> failing. >>>>>> The error are occur on this line: >>>>>> >>>>>> site = mwclient.Site('vtk.org', '/Wiki/') >>>>>> >>>>>> If I change vtk.org to itk.org, my scripts work. >>>>>> >>>>>> I suspect some sort of web magic going on. I can workaround the >>>>>> problem but specifying itk.org, but I'd like to understand what >>>>>> happened just in case the itk.org site changes in the future. >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Bill >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Search the list archives at: >>>>>> http://markmail.org/search/?q=vtk-developers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Search the list archives at: >>>>> http://markmail.org/search/?q=vtk-developers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> +1 919 869 8849 >>> >>> >>> >>> >>> -- >>> +1 919 869 8849 >> >> > > > > -- > Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From matt.mccormick at kitware.com Thu May 5 11:17:37 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 5 May 2016 11:17:37 -0400 Subject: [ITK] [ITK-users] image->GetBufferPointer() and opposite way for 3d images In-Reply-To: <1462459565166-7588815.post@n2.nabble.com> References: <1462459565166-7588815.post@n2.nabble.com> Message-ID: Hello, It looks like it may just be a change in the window / level of the visualization tool being used? HTH, Matt On Thu, May 5, 2016 at 10:46 AM, alexfd7 wrote: > Hello everyone, I have a problem, someone help me? > > > I'm getting the image buffer. So I want to do the opposite way, import the > buffer (pixelData) back to the image object, I am using importImageFilter > filter to have the original image again. 2D images works very well, however > with 3d images (.nrrd) i'm not getting good result, I get a darker resulting > image than the original. > > > I thank the attention and the available space for me to post my question > > > float* pixelData; /**< Pointer to image data */ > > > typedef float InputPixelType; > typedef float OutputPixelType; > > typedef itk::Image InputImageType; > typedef itk::Image OutputImageType; > > typedef itk::ImageFileReader ReaderType; > typedef itk::ImageFileWriter WriterType; > > typedef itk::ImportImageFilter< float, 3 > ImportFilterType; > ImportFilterType::Pointer importFilter = ImportFilterType::New(); > > typename ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileName( inputVolume.c_str() ); > > reader->Update(); > > typename InputImageType::Pointer image = reader->GetOutput(); > > typename InputImageType::RegionType region = > image->GetLargestPossibleRegion(); > > typename InputImageType::SizeType size = region.GetSize(); > > int sizePixel = (size[0]*size[1]*size[2]); > > pixelData = (float*)malloc(size[0]*size[1]*size[2] * sizeof(float)); > memcpy( pixelData, image->GetBufferPointer(), > size[0]*size[1]*size[2]*sizeof(float)); > > > ImportFilterType::SizeType sizeImport; > sizeImport[0] = size[0]; // size along X > sizeImport[1] = size[1]; // size along Y > sizeImport[2] = size[2]; // size along Y > ImportFilterType::IndexType start; > start.Fill( 0 ); > ImportFilterType::RegionType regionImport; > regionImport.SetIndex( start ); > regionImport.SetSize( sizeImport ); > > importFilter->SetRegion( regionImport ); > > > const itk::SpacePrecisionType origin[ 3 ] = { 0.0, 0.0, 0.0}; > importFilter->SetOrigin( origin ); > > const itk::SpacePrecisionType spacing[ 3 ] = { 1.0, 1.0, 1.0}; > importFilter->SetSpacing( spacing ); > > const bool importImageFilterWillOwnTheBuffer = true; > importFilter->SetImportPointer( pixelData, sizePixel, > importImageFilterWillOwnTheBuffer ); > > importFilter->Update(); > > > typename WriterType::Pointer writer = WriterType::New(); > writer->SetFileName( outputVolume.c_str() ); > writer->SetInput( importFilter->GetOutput() ); > writer->SetUseCompression(1); > writer->Update(); > > > > > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/image-GetBufferPointer-and-opposite-way-for-3d-images-tp7588815.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From bill.lorensen at gmail.com Thu May 5 11:30:52 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 5 May 2016 11:30:52 -0400 Subject: [ITK] [ITK-dev] [vtk-developers] Wiki scrapping regression after web page update In-Reply-To: References: Message-ID: Matt, The change to https is what is causing the problem. I can modify my call from site = mwclient.Site(('itk.org', '/Wiki/') to site = mwclient.Site(('https','itk.org'), '/Wiki/') Thanks, Bill On Thu, May 5, 2016 at 11:11 AM, Matt McCormick wrote: > Hi Bill, > > itk.org/ was recently changed to use HTTPS -- does making that change > to your configuration help? > > Thanks, > Matt > > On Thu, May 5, 2016 at 11:00 AM, Bill Lorensen wrote: >> Looks like itk has been changed. Now I can no longer scrape the wiki. HELP! >> >> >> On Tue, May 5, 2015 at 11:07 AM, David E DeMarle >> wrote: >>> So Bill trying to close the loop on this. >>> >>> We should now use. >>> site = mwclient.Site('www.(project).org', '/Wiki/') >>> page = site.Pages['PROJECT/Examples] >>> >>> That will work now and if/when www.itk.org gets it's own facelift. >>> >>> hth >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Thu, Apr 16, 2015 at 6:31 PM, Jean-Christophe Fillion-Robin >>> wrote: >>>> >>>> Hi Bill, >>>> >>>> I wrote too fast. Ignore my previous email. >>>> >>>> Jc >>>> >>>> On Thu, Apr 16, 2015 at 6:30 PM, Jean-Christophe Fillion-Robin >>>> wrote: >>>>> >>>>> Hi Bill, >>>>> >>>>> Seems the wiki is available here: http://www.vtk.org/Wiki/VTK >>>>> >>>>> Instead of >>>>> >>>>> site = mwclient.Site('vtk.org', '/Wiki/') >>>>> >>>>> try this >>>>> >>>>> site = mwclient.Site('vtk.org', '/Wiki/VTK/') >>>>> >>>>> Hth >>>>> Jc >>>>> >>>>> On Mon, Apr 13, 2015 at 11:45 AM, David E DeMarle >>>>> wrote: >>>>>> >>>>>> I'll take a look. >>>>>> thanks >>>>>> >>>>>> David E DeMarle >>>>>> Kitware, Inc. >>>>>> R&D Engineer >>>>>> 21 Corporate Drive >>>>>> Clifton Park, NY 12065-8662 >>>>>> Phone: 518-881-4909 >>>>>> >>>>>> On Tue, Mar 31, 2015 at 3:30 PM, Bill Lorensen >>>>>> wrote: >>>>>>> >>>>>>> Folks, >>>>>>> >>>>>>> I scrape the vtk.org wiki site each evening to maintain the vtk wiki >>>>>>> examples. I have a python program that uses mwclient >>>>>>> (https://github.com/mwclient/mwclient) that uses the MediaWiki API. >>>>>>> >>>>>>> Ever since the vtk.org page was updated, my nightly scripts have been >>>>>>> failing. >>>>>>> The error are occur on this line: >>>>>>> >>>>>>> site = mwclient.Site('vtk.org', '/Wiki/') >>>>>>> >>>>>>> If I change vtk.org to itk.org, my scripts work. >>>>>>> >>>>>>> I suspect some sort of web magic going on. I can workaround the >>>>>>> problem but specifying itk.org, but I'd like to understand what >>>>>>> happened just in case the itk.org site changes in the future. >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Bill >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Search the list archives at: >>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Search the list archives at: >>>>>> http://markmail.org/search/?q=vtk-developers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> +1 919 869 8849 >>>> >>>> >>>> >>>> >>>> -- >>>> +1 919 869 8849 >>> >>> >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From bill.lorensen at gmail.com Thu May 5 11:00:31 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 5 May 2016 11:00:31 -0400 Subject: [ITK] [ITK-dev] [vtk-developers] Wiki scrapping regression after web page update Message-ID: Looks like itk has been changed. Now I can no longer scrape the wiki. HELP! On Tue, May 5, 2015 at 11:07 AM, David E DeMarle wrote: > So Bill trying to close the loop on this. > > We should now use. > site = mwclient.Site('www.(project).org', '/Wiki/') > page = site.Pages['PROJECT/Examples] > > That will work now and if/when www.itk.org gets it's own facelift. > > hth > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Thu, Apr 16, 2015 at 6:31 PM, Jean-Christophe Fillion-Robin > wrote: >> >> Hi Bill, >> >> I wrote too fast. Ignore my previous email. >> >> Jc >> >> On Thu, Apr 16, 2015 at 6:30 PM, Jean-Christophe Fillion-Robin >> wrote: >>> >>> Hi Bill, >>> >>> Seems the wiki is available here: http://www.vtk.org/Wiki/VTK >>> >>> Instead of >>> >>> site = mwclient.Site('vtk.org', '/Wiki/') >>> >>> try this >>> >>> site = mwclient.Site('vtk.org', '/Wiki/VTK/') >>> >>> Hth >>> Jc >>> >>> On Mon, Apr 13, 2015 at 11:45 AM, David E DeMarle >>> wrote: >>>> >>>> I'll take a look. >>>> thanks >>>> >>>> David E DeMarle >>>> Kitware, Inc. >>>> R&D Engineer >>>> 21 Corporate Drive >>>> Clifton Park, NY 12065-8662 >>>> Phone: 518-881-4909 >>>> >>>> On Tue, Mar 31, 2015 at 3:30 PM, Bill Lorensen >>>> wrote: >>>>> >>>>> Folks, >>>>> >>>>> I scrape the vtk.org wiki site each evening to maintain the vtk wiki >>>>> examples. I have a python program that uses mwclient >>>>> (https://github.com/mwclient/mwclient) that uses the MediaWiki API. >>>>> >>>>> Ever since the vtk.org page was updated, my nightly scripts have been >>>>> failing. >>>>> The error are occur on this line: >>>>> >>>>> site = mwclient.Site('vtk.org', '/Wiki/') >>>>> >>>>> If I change vtk.org to itk.org, my scripts work. >>>>> >>>>> I suspect some sort of web magic going on. I can workaround the >>>>> problem but specifying itk.org, but I'd like to understand what >>>>> happened just in case the itk.org site changes in the future. >>>>> >>>>> Thanks, >>>>> >>>>> Bill >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Search the list archives at: >>>>> http://markmail.org/search/?q=vtk-developers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Search the list archives at: >>>> http://markmail.org/search/?q=vtk-developers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>> >>>> >>> >>> >>> >>> -- >>> +1 919 869 8849 >> >> >> >> >> -- >> +1 919 869 8849 > > -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From hans-johnson at uiowa.edu Thu May 5 11:27:39 2016 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Thu, 5 May 2016 15:27:39 +0000 Subject: [ITK] [ITK-users] Image to matrix and viceversa In-Reply-To: <441468380.25788.1462459750877.JavaMail.administrator@mjim.nabble.com> References: <441468380.25788.1462459750877.JavaMail.administrator@mjim.nabble.com> Message-ID: Javier, Please keep the conversation on the public mailing list. This does not sound like you are having ITK issues per-se, but rather issues data reformatting. Here is pseudo-code that I think would address your problem. #include #include #include itk::Array2D MakeMatrix(itk::Image,3>::Pointer image, itk::Image::Pointer mask) { if( mask->GetLargestPossibleRegion() != image->GetLargestPossibleRegion() ) { std::cerr << "ERROR regions must match" << std::endl; } itk::ImageRegionConstIteratorWithIndex > maskIt(mask,mask->GetLargestPossibleRegion()); itk::ImageRegionIteratorWithIndex,3> > imIt(image,image->GetLargestPossibleRegion()); size_t numInMaskVoxels = 0; for(maskIt.GoToBegin(); !maskIt.IsAtEnd(); ++maskIt) { if(maskIt.Value() > 0) { ++numInMaskVoxels; } } imIt.GoToBegin(); const size_t numElementsInPixel = imIt.Value().size(); itk::Array2D myMatrix(numInMaskVoxels,numElementsInPixel); size_t curr_row = 0; for(maskIt.GoToBegin(); !maskIt.IsAtEnd(); ++maskIt) { if (maskIt.Value() > 0) { const itk::Image::IndexType & index = maskIt.GetIndex(); const std::vector & refPixel = image->GetPixel(index); size_t curr_col = 0; for(std::vector::const_iterator vi = refPixel.begin(), refPixelEnd = refPixel.end(); vi != refPixelEnd; ++vi ) { myMatrix(curr_row,curr_col) = *vi; ++curr_row; ++curr_col; } } } return myMatrix; } Hans -- On 5/5/16, 9:49 AM, "javij1 at gmail.com" wrote: > >Dear Johnson, Hans > >First of all, sorry for bother you again, but I cannot solve the problem I have and you are the only one that has answered my question. Please, I would appreciatte a lot if you can help me to solve the issue. I have the following problem: > >I have an image that has the dimensions 270x270x171x34. I want to convert this image into a Matrix of size Nx34, where N is the number of voxels inside a mask of size 270x270x171. The Matrix datatype is an Eigen Matrix class. In a classic "for loop" scheme the code to get what I want is > >for (int x = 0; x < image.width(); x++) >{ > for (int y = 0; y < image.height(); y++) > { > for (int z = 0; z < image.depth(); z++) > { > if (!mask(x, y, z)) > continue; > > for (int c = 0; c < image.spectrum(); c++) > Matrix(i, c) = image(x, y, z, c); > i++; > } > } >} > > >How can I do this in ITK?? I have read several ImageRegionIterator examples, but I do not find a clean and correct way to do it. I need to walk around my image and for those pixels that are inside the mask, store their 34 values in a row of the matrix. > >Thank you very much. >Regards. > >Javier. > >_____________________________________ >Sent from http://itk-insight-users.2283740.n2.nabble.com > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From alexfd7 at gmail.com Thu May 5 12:36:31 2016 From: alexfd7 at gmail.com (Alexandre Freitas Duarte) Date: Thu, 5 May 2016 13:36:31 -0300 Subject: [ITK] [ITK-users] image->GetBufferPointer() and opposite way for 3d images In-Reply-To: References: <1462459565166-7588815.post@n2.nabble.com> Message-ID: I opened the original 3D image in the slicer, and then i opened the resulting image to compare. How can be a change in the window, have any idea? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Thu May 5 12:44:52 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 5 May 2016 12:44:52 -0400 Subject: [ITK] [ITK-users] image->GetBufferPointer() and opposite way for 3d images In-Reply-To: References: <1462459565166-7588815.post@n2.nabble.com> Message-ID: The Window / Level is displayed and can be adjusted in the Volumes module: https://www.slicer.org/slicerWiki/index.php/Documentation/4.5/Modules/Volumes On Thu, May 5, 2016 at 12:36 PM, Alexandre Freitas Duarte wrote: > I opened the original 3D image in the slicer, and then i opened the > resulting image to compare. How can be a change in the window, have any > idea? _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From aptea at mskcc.org Thu May 5 12:55:26 2016 From: aptea at mskcc.org (aptea at mskcc.org) Date: Thu, 5 May 2016 16:55:26 +0000 Subject: [ITK] [ITK-users] write out intermediate results during texture calculation Message-ID: I am using the following example to generate GLCM texture images: https://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures Is there an example code to print/write out intermediate results like the discretized image, discretization levels, co-occurrence matrix? thx, Aditya ===================================================================== Please note that this e-mail and any files transmitted from Memorial Sloan Kettering Cancer Center may be privileged, confidential, and protected from disclosure under applicable law. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this communication or any of its attachments is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and deleting this message, any attachments, and all copies and backups from your computer. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From zivrafael.yaniv at nih.gov Thu May 5 16:52:26 2016 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Thu, 5 May 2016 20:52:26 +0000 Subject: [ITK] Write and read itkEuler3DTransform with m_ComputeZYX = 1 Message-ID: Hello Silvain, The patch addressing your issue is up on gerrit for review (http://review.source.kitware.com/#/c/21095/). Hopefully it will be approved in the next couple of days and the problem will be resolved. Ziv From: Silvain B?riault > Date: Wednesday, May 4, 2016 at 11:17 AM To: "community at itk.org" > Subject: [ITK] Write and read itkEuler3DTransform with m_ComputeZYX = 1 Hello, I and trying to write an itk::Euler3DTransform (with m_ComputeZYX = 1) to file (*.tfm file format). However, I noticed the flag m_ComputeZYX is not saved to the tfm file. Consequently, when I read-back the transform from file, I get a different transform (i.e. a transform with same angles but different matrix since m_ComputeZYX = 0 ). I am using ITK version 4.9.1 (latest release). Any help on this issue would be greatly appreciated. An example follows. Regards, Silvain Beriault, Ph.D. code sample: include #include #include #include intmain() { typedefitk::Euler3DTransform TransformType; TransformType::PointertransformIn = TransformType::New(); transformIn->SetComputeZYX(true); doubleangleX = 90; doubleangleY = 180; doubleangleZ = 0; doubledeg2rad = itk::Math::pi / 180.0; transformIn->SetRotation(angleX * deg2rad, angleY * deg2rad, angleZ * deg2rad); typedefitk::TransformFileWriterTemplate WriterType; WriterType::Pointerwriter = WriterType::New(); writer->SetInput(transformIn); writer->SetFileName("D:/tmp/transform.tfm"); writer->Update(); typedefitk::TransformFileReaderTemplate ReaderType; ReaderType::Pointerreader = ReaderType::New(); reader->SetFileName("D:/tmp/transform.tfm"); reader->Update(); autotransformOut = (reader->GetTransformList()->begin())->GetPointer(); std::cout << "****TransformIn****" << std::endl; std::cout << transformIn << std::endl << std::endl << std::endl; std::cout << "****TransformOut****" << std::endl; std::cout << *transformOut << std::endl << std::endl << std::endl; } The screen output is: ****TransformIn**** Euler3DTransform (0000000000461BF0) RTTI typeinfo: class itk::Euler3DTransform Reference Count: 4 Modified Time: 12 Debug: Off Object Name: Observers: none Matrix: -1 1.22465e-016 7.4988e-033 0 6.12323e-017 -1 -1.22465e-016 -1 -6.12323e-017 Offset: [0, 0, 0] Center: [0, 0, 0] Translation: [0, 0, 0] Inverse: -1 0 -1.22465e-016 1.22465e-016 0 -1 0 -1 0 Singular: 0 Euler's angles: AngleX=1.5708 AngleY=3.14159 AngleZ=0 m_ComputeZYX = 1 ****TransformOut**** Euler3DTransform (0000000000473180) RTTI typeinfo: class itk::Euler3DTransform Reference Count: 2 Modified Time: 673 Debug: Off Object Name: Observers: none Matrix: -1 0 1.22465e-016 1.22465e-016 6.12323e-017 1 -7.4988e-033 1 -6.12323e-017 Offset: [0, 0, 0] Center: [0, 0, 0] Translation: [0, 0, 0] Inverse: -1 1.22465e-016 -7.4988e-033 -7.4988e-033 4.59169e-049 1 1.22465e-016 1 4.59169e-049 Singular: 0 Euler's angles: AngleX=1.5708 AngleY=3.14159 AngleZ=0 m_ComputeZYX = 0 The saved transform is : #Insight Transform File V1.0 #Transform 0 Transform: Euler3DTransform_double_3_3 Parameters: 1.5707963267948966 3.141592653589793 0 0 0 0 FixedParameters: 0 0 0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From artioml at post.bgu.ac.il Sat May 7 09:26:27 2016 From: artioml at post.bgu.ac.il (Artiom Lapshin) Date: Sat, 7 May 2016 06:26:27 -0700 (MST) Subject: [ITK] [ITK-users] Vector image deformable registration In-Reply-To: References: <1460792423106-37034.post@n7.nabble.com> <1460868866870-37035.post@n7.nabble.com> Message-ID: <1462627587438-7588821.post@n2.nabble.com> Hello Matt, Thank you for the example. I have always used /itkImageRegistrationMethodv4/, but it doesn't support vector metrics. The workaround of using Optimization and Metric directly without the /itkImageRegistrationMethodv4/ does work but limit the registration features (The built in multi-resolution registration). The reason /itkImageRegistrationMethodv4/ doesn't support vector registration is the hard coded MetricTraits it assumes. Take a look at line 149 : ImageRegistrationMethodv4 It always use the default MetricTrait. I tried to add the MetricTraits to the templates that /itkImageRegistrationMethodv4/ receives, but there are conflicts with PointSetMetric. At the end I just created my own version of /itkImageRegistrationMethodv4/ and commented out any code that works with PointSet metric. Here are the source files: DeformableRegistrationArt.cxx itkArtImageRegistrationMethodv4.h itkArtImageRegistrationMethodv4.hxx Please tell me what you think. Maybe I missed something and all the changes in the code weren't necessary. If there is no other solution I can re-factor my code and create /itkVectorImageRegistrationMethodv4/. Hope this is useful, Thank you, Art. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Vector-image-deformable-registration-tp7588750p7588821.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From tevain at telecom-paristech.fr Mon May 9 05:47:35 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Mon, 9 May 2016 11:47:35 +0200 (CEST) Subject: [ITK] [ITK-users] 4D Image to Matrix inside mask In-Reply-To: References: <5cfb5664-dddf-c842-4d43-817c85659a9a@gmail.com> Message-ID: <1724813147.51217614.1462787255881.JavaMail.zimbra@enst.fr> Hello Javier, About the question on pixel type, both are possible, it just depends on how you see it. But since it is for a temporal evolution of MRI image I would choose a 4D image. A 3D vector image is used to represent thing like displacement field or gradient of 3D images. One way to do it is to iterate over your mask image and get the value where the spatial coordinates match your perfusion image: itk::ImageRegionConstIteratorWithIndex> MyIterator(MaskImage,MaskImage->GetLargestPossibleRegion()); MyIterator.GoToBegin(); std::vector> MyMatrix(N);//N number of ON pixels of the mask for(int NbPix=0;NbPix tmp_vect(34); MyMatrix.pushback(tmp_vect); } int count=0; while(!MyIterator.IsAtEnd()) { if (MyIterator.Get()==1)//Mask Pixel is ON { itk::Index<3> SpatialIndex=MyIterator.GetIndex(); for (int i=0;i<34;i++) { itk::Index<4> FullIndex; FullIndex[0]=SpatialIndex[0]; FullIndex[1]=SpatialIndex[1]; FullIndex[2]=SpatialIndex[2]; FullIndex[3]=i; MyMatrix[count][i]=PerfusionImage->GetPixel(FullIndex); } count++; } ++MyIterator; } I've taken std::vector to do the matrix here, but you could change for the eigen matrix pretty easily if I remember well. HTH, Tim ----- Mail original ----- De: "Javier Juan Albarrac?n" ?: insight-users at itk.org Envoy?: Jeudi 5 Mai 2016 11:48:24 Objet: [ITK] [ITK-users] 4D Image to Matrix inside mask Hello, I have a 4D image, which is a DSC Perfusion weighted MRI. Supose the image has the dimenisions 270x270x171x34. I want to convert this image into a Matrix of size Nx34, where N are the number of voxels inside the intracraneal mask. The Matrix class comes from Eigen library. In a classic "for loop" scheme the code would be for (int x = 0; x < image.width(); x++) { for (int y = 0; y < image.height(); y++) { for (int z = 0; z < image.depth(); z++) { if (!mask(x, y, z)) continue; for (int c = 0; c < image.spectrum(); c++) Matrix(i, c) = image(x, y, z, c); i++; } } } How can I do this in ITK?? I have read several ImageRegionIterator examples, but I do not find a clean and correct way to do what I want. Thank you very much. Regards. Javier. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From grothausmann.roman at mh-hannover.de Mon May 9 10:21:14 2016 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Mon, 9 May 2016 16:21:14 +0200 Subject: [ITK] [ITK-users] reading images of vectors with variable length in addition to scalar, RGB, RGBA (itkVectorGradientMagnitudeImageFilter) Message-ID: <57309CDA.6010108@mh-hannover.de> Dear mailing list members, Based on Bill's feedback I created a template.cxx (https://github.com/romangrothausmann/ITK-CLIs/blob/master/template.cxx) that I just extend according to some ITK-filters when needed. In general it works well for images of varying dimension and for scalar, often even for RGB and RGBA types. However, now I'm in the need to apply itkVectorGradientMagnitudeImageFilter to images of vectors with lengths 2 to 5 for which my approach with VariableLengthVector does not work. gradient_mag_vec.cxx (https://github.com/romangrothausmann/ITK-CLIs/blob/master/gradient_mag_vec.cxx) is based on template.cxx (diff: https://github.com/romangrothausmann/ITK-CLIs/commit/544345b259adce2ef903183553a1aa97648e85b8) with dim= 1 and scalar removed (because not supported by itkVectorGradientMagnitudeImageFilter). gradient_mag_vec.cxx compiles fine if complex and vector are commented out but for e.g. RGB yields outputs where the last DimSize is 3* the input DimSize. Including vector compilation aborts with complains like: itkVectorGradientMagnitudeImageFilter.h:184:62: error: ?Dimension? is not a member of ?itk::Image, 3u>::PixelType {aka itk::VariableLengthVector}? typedef typename ConstNeighborhoodIteratorType::RadiusType RadiusType; What would I have to change to make this work for images composed of vectors with e.g. 2 to 5 elements? Would that also solve the incorrect output for RGB/RGBA? Is there any elegant way to circumvent using GetNumberOfComponentsPerPixel to instantiate another template level in case a vector image is detected? Many thanks for any help or hints. Roman -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From mohammedrashadkm at gmail.com Mon May 9 16:27:37 2016 From: mohammedrashadkm at gmail.com (Rashad Kanavath) Date: Mon, 9 May 2016 22:27:37 +0200 Subject: [ITK] [ITK-dev] installed ITK cannot be moved due to absolute path Message-ID: Hello all, I have some issue when copying ITK install directory to a different system. I agree this is not usual and may not appear on a linux distro or windows. My requirement is bit different. I cross-compile ITK and then use the binaries on Windows. Using dll and headers are fine. But the installed cmake files are a problem. They have absolute path in ITK-4.8/Modules/*.cmake files. It is not in all .cmake files even though I put a wildcard there.. For a easy and quick workaround. I rely on mighty sed command to insert something into installed cmake file. For example see this; lib/cmake/ITK-4.8/ITKTargets-release.cmake set(CMAKE_IMPORT_FILE_VERSION 1) set(LIB_INSTALL_PREFIX) get_filename_component(CURRENT_FILE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) get_filename_component(LIB_INSTALL_PREFIX "${CURRENT_FILE_DIR}" PATH) get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH) get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH) and at last: $(SED) -i 's,$(PREFIX)/$(TARGET),\${LIB_INSTALL_PREFIX},g' 'lib/cmake/ITK-$(ITK_VER)/ITKTargets-release.cmake' I would like to have this patch inside the other .cmake files in the installation and avoid the sed commands during post-installation Here is the list of cmake files that needs this change. lib/cmake/ITK-4.8/ITKTargets-release.cmake lib/cmake/ITK-4.8/Modules/ITKZLIB.cmake lib/cmake/ITK-4.8/Modules/ITKExpat.cmake lib/cmake/ITK-4.8/Modules/ITKHDF5.cmake lib/cmake/ITK-4.8/Modules/ITKJPEG.cmake lib/cmake/ITK-4.8/Modules/ITKTIFF.cmake lib/cmake/ITK-4.8/Modules/ITKPNG.cmake So is it possible to make the change into future version of ITK? The major issue here is those cmake files are generated by cmake. Is there a way cmake could use relative path ? -- Regards, Rashad -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From krismz at sci.utah.edu Mon May 9 16:18:40 2016 From: krismz at sci.utah.edu (Kristen Zygmunt) Date: Mon, 9 May 2016 14:18:40 -0600 Subject: [ITK] [ITK-users] reading images of vectors with variable length in addition to scalar, RGB, RGBA (itkVectorGradientMagnitudeImageFilter) In-Reply-To: References: Message-ID: <18B5E78A-B0BB-4B93-B2A1-584A747344D1@sci.utah.edu> Hi Roman, You can also take a look at the Patch Based Denoising Filter that was designed to work with both VectorImage and Image types. For example, the DispatchedMinMax and DispatchedArrayMinMax methods in Modules/Filtering/Denoising/itkPatchBasedDenoisingImageFilter.hxx are instantiated appropriately to use the NthElementImageAdaptor as necessary to aid in calling filters for certain image types. You should be also able to uncomment the VectorImage examples in itkPatchBasedDenoisingImageFilterTest.cxx as they will compile now. -Kris > Date: Mon, 9 May 2016 16:21:14 +0200 > From: "Grothausmann, Roman Dr." > To: ITK Mailing List > Subject: [ITK-users] reading images of vectors with variable length in > addition to scalar, RGB, RGBA (itkVectorGradientMagnitudeImageFilter) > Message-ID: <57309CDA.6010108 at mh-hannover.de> > Content-Type: text/plain; charset=utf-8; format=flowed > > Dear mailing list members, > > > Based on Bill's feedback I created a template.cxx > (https://github.com/romangrothausmann/ITK-CLIs/blob/master/template.cxx) that I > just extend according to some ITK-filters when needed. In general it works well > for images of varying dimension and for scalar, often even for RGB and RGBA types. > However, now I'm in the need to apply itkVectorGradientMagnitudeImageFilter to > images of vectors with lengths 2 to 5 for which my approach with > VariableLengthVector does not work. > > gradient_mag_vec.cxx > (https://github.com/romangrothausmann/ITK-CLIs/blob/master/gradient_mag_vec.cxx) > is based on template.cxx (diff: > https://github.com/romangrothausmann/ITK-CLIs/commit/544345b259adce2ef903183553a1aa97648e85b8) > > with dim= 1 and scalar removed (because not supported by > itkVectorGradientMagnitudeImageFilter). > gradient_mag_vec.cxx compiles fine if complex and vector are commented out but > for e.g. RGB yields outputs where the last DimSize is 3* the input DimSize. > > Including vector compilation aborts with complains like: > > itkVectorGradientMagnitudeImageFilter.h:184:62: error: ?Dimension? is not a > member of ?itk::Image, 3u>::PixelType {aka > itk::VariableLengthVector}? > typedef typename ConstNeighborhoodIteratorType::RadiusType RadiusType; > > What would I have to change to make this work for images composed of vectors > with e.g. 2 to 5 elements? > Would that also solve the incorrect output for RGB/RGBA? > Is there any elegant way to circumvent using GetNumberOfComponentsPerPixel to > instantiate another template level in case a vector image is detected? > > Many thanks for any help or hints. > Roman > > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-2900 > > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From zhuangming.shen at sphic.org.cn Mon May 9 20:45:10 2016 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Tue, 10 May 2016 00:45:10 +0000 Subject: [ITK] [ITK-users] Strange situation when ITK writes DICOM file In-Reply-To: References: <1450834862664.8600@sphic.org.cn> <1461914235636.15330@sphic.org.cn> <1462243202460.83843@sphic.org.cn>, Message-ID: <1462841109770.29758@sphic.org.cn> Hi Matt, Thank you for your reply. I have tried to use ITK Git master and the code provided by D?enan, it can work correctly. Thanks again. By the way, could you list what data types (e.g. char type) do the updated GDCM support now? Regards, Zhuangming Shen ________________________________________ From: Matt McCormick Sent: Thursday, May 5, 2016 10:21 PM To: ??? Cc: D?enan Zuki?; insight-users at itk.org Subject: Re: [ITK-users] Strange situation when ITK writes DICOM file Hi Zhuangming Shen, GDCM was updated in ITK Git master, to be released in ITK 4.10. Instructions on how to obtain this version can be found here: https://itk.org/Wiki/ITK/Git/Download Thanks, Matt On Mon, May 2, 2016 at 10:40 PM, ??? wrote: > Hi D?enan, > > > Thanks for your prompt response. I used ITK 4.9.1 and your attached code > (just changed inDir and outFile) to test both public DICOM data > (http://www.osirix-viewer.com/datasets/DATA/BREBIX.zip) and private DICOM > data, the results are still incorrect (please see the attached screenshot). > What's the problem? > > > Besides, as far as I know, rescaling the intensity from short type to char > type leads to lose precision because the DICOM tags ( (0028,0100) and > (0028,0101) ) show the BitsAllocated is 16-bits and the BitsStored is > 12-bits. Consequently, this solution doesn't seem to be a good solution. Is > it possible to output the DICOM file by other tools (e.g. DCMTK) if the GDCM > doesn't support short type? > > > > Regards, > > > Zhuangming Shen > > > > > ________________________________ > From: D?enan Zuki? > Sent: Friday, April 29, 2016 9:59 PM > To: ??? > Cc: insight-users at itk.org; Matt McCormick > > Subject: Re: [ITK-users] Strange situation when ITK writes DICOM file > > Hi Shen, > > GDCM version was updated recently. It now complains that short type is > unsupported, and works correctly with char type. I attached an example which > rescales the intensity and works correctly. > > Regards, > D?enan > > On Fri, Apr 29, 2016 at 3:17 AM, ??? wrote: >> >> Hi D?enan, >> >> >> I'd like to know if the bug regarding 3D DICOM writer has been fixed. When >> I tried to run the same code but using ITK 4.9.1, I still got the same >> results, i.e. the output DICOM file does not properly record original >> image's origin and spacing. >> >> >> >> Regards, >> >> >> Zhuangming Shen >> >> ________________________________ >> From: D?enan Zuki? >> Sent: Saturday, December 26, 2015 1:44 AM >> To: ??? >> Cc: insight-users at itk.org >> Subject: Re: [ITK-users] Strange situation when ITK writes DICOM file >> >> I have confirmed this bug and entered it into tracker along with a DICOM >> series which reproduces it. >> >> Thanks Shen >> >> On Tue, Dec 22, 2015 at 8:41 PM, ??? wrote: >>> >>> Hi all, >>> >>> >>> I met a very strange situation when I used ITK 4.8.1. I'd like to read a >>> DICOM series, write it to a DICOM file (i.e. save the volume created by the >>> DICOM series to a .dcm file), and read the DICOM file. Theoretically, the >>> DICOM series and the DCM file should have the same information, e.g origin, >>> spacing, size. However, My results show me that the information has been >>> changed. When I use other ITK-support file format (e.g. nii, nrrd), the >>> information has not been changed. It seems a bug. My code and results are >>> listed as below. Has anyone met the same situation? >>> >>> >>> Regards, >>> >>> >>> Zhuangming Shen >>> >>> >>> >>> >>> ================ My code ================= >>> >>> >>> import itk >>> >>> input_dir = "/home/zshen/workspace/Data/testDCM/bbb" >>> output_filename = "/home/zshen/workspace/Data/bbb2.dcm" >>> >>> # read DICOM series >>> dicom_io = itk.GDCMImageIO.New() >>> >>> reader = itk.ImageSeriesReader[itk.Image.SS3].New() >>> reader.SetImageIO(dicom_io) >>> >>> name_generator = itk.GDCMSeriesFileNames.New() >>> name_generator.SetUseSeriesDetails(True) >>> name_generator.SetDirectory(input_dir) >>> >>> series_uid = name_generator.GetSeriesUIDs() >>> >>> series_identifier = series_uid[0] >>> >>> file_names = name_generator.GetFileNames(series_identifier) >>> >>> reader.SetFileNames(file_names) >>> reader.Update() >>> >>> print("**** series DICOM information: *****") >>> print("size: >>> "+str(reader.GetOutput().GetLargestPossibleRegion().GetSize())) >>> print("origin: "+str(reader.GetOutput().GetOrigin())) >>> print("spacing: "+str(reader.GetOutput().GetSpacing())) >>> >>> writer = itk.ImageFileWriter[itk.Image.SS3].New() >>> writer.SetInput(reader.GetOutput()) >>> writer.SetFileName(output_filename) >>> writer.Update() >>> >>> # read again >>> reader2 = itk.ImageFileReader[itk.Image.SS3].New() >>> reader2.SetFileName(output_filename) >>> reader2.Update() >>> >>> print("**** DICOM information: *****") >>> print("size: >>> "+str(reader2.GetOutput().GetLargestPossibleRegion().GetSize())) >>> print("origin: "+str(reader2.GetOutput().GetOrigin())) >>> print("spacing: "+str(reader2.GetOutput().GetSpacing())) >>> >>> >>> ================= My results ==================== >>> >>> **** series DICOM information: ***** >>> size: itkSize3 ([512, 512, 118]) >>> origin: itkPointD3 ([-229.5, -96.5, -553]) >>> spacing: itkVectorD3 ([0.896484, 0.896484, 3]) >>> **** DICOM information: ***** >>> size: itkSize3 ([512, 512, 118]) >>> origin: itkPointD3 ([0, 0, 0]) >>> spacing: itkVectorD3 ([0.896484, 0.896484, 1]) >>> >>> >>> >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >> > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK 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 Tue May 10 05:17:37 2016 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Tue, 10 May 2016 11:17:37 +0200 Subject: [ITK] [ITK-users] reading images of vectors with variable length in addition to scalar, RGB, RGBA (itkVectorGradientMagnitudeImageFilter) In-Reply-To: <18B5E78A-B0BB-4B93-B2A1-584A747344D1@sci.utah.edu> References: <18B5E78A-B0BB-4B93-B2A1-584A747344D1@sci.utah.edu> Message-ID: <5731A731.6070505@mh-hannover.de> Hi Kris, Many thanks for Your quick reply. Looking at itkPatchBasedDenoisingImageFilter.hxx and according to itkPatchBasedDenoisingImageFilterTest.cxx I exchanged itkImage of VariableLengthVector with itkVectorImage (https://github.com/romangrothausmann/ITK-CLIs/commit/87281e2bad89e1d1d3303ac6605b3c43963026d3) but the error stays the same. I think my problem arises from VectorGradientMagnitudeImageFilter not being able to cope with VariableLengthVector which is also used by VectorImage. So I guess I would either have to modify VectorGradientMagnitudeImageFilter to handle VariableLengthVector or create itkImage of Vector using another template level to set fixed NumberOfComponentsPerPixel as needed. What does it depend on whether a Filter can handle VariableLengthVector or just Vector? Many thanks for Your help. Roman On 09/05/16 22:18, Kristen Zygmunt wrote: > Hi Roman, You can also take a look at the Patch Based Denoising Filter that > was designed to work with both VectorImage and Image types. For example, the > DispatchedMinMax and DispatchedArrayMinMax methods in > Modules/Filtering/Denoising/itkPatchBasedDenoisingImageFilter.hxx are > instantiated appropriately to use the NthElementImageAdaptor as necessary to > aid in calling filters for certain image types. You should be also able to > uncomment the VectorImage examples in > itkPatchBasedDenoisingImageFilterTest.cxx as they will compile now. > > -Kris > >> Date: Mon, 9 May 2016 16:21:14 +0200 From: "Grothausmann, Roman Dr." >> To: ITK Mailing List >> Subject: [ITK-users] reading images of vectors with >> variable length in addition to scalar, RGB, RGBA >> (itkVectorGradientMagnitudeImageFilter) Message-ID: >> <57309CDA.6010108 at mh-hannover.de> Content-Type: text/plain; charset=utf-8; >> format=flowed >> >> Dear mailing list members, >> >> >> Based on Bill's feedback I created a template.cxx >> (https://github.com/romangrothausmann/ITK-CLIs/blob/master/template.cxx) >> that I just extend according to some ITK-filters when needed. In general it >> works well for images of varying dimension and for scalar, often even for >> RGB and RGBA types. However, now I'm in the need to apply >> itkVectorGradientMagnitudeImageFilter to images of vectors with lengths 2 >> to 5 for which my approach with VariableLengthVector does not work. >> >> gradient_mag_vec.cxx >> (https://github.com/romangrothausmann/ITK-CLIs/blob/master/gradient_mag_vec.cxx) >> >> is based on template.cxx (diff: >> https://github.com/romangrothausmann/ITK-CLIs/commit/544345b259adce2ef903183553a1aa97648e85b8) >> >> >> with dim= 1 and scalar removed (because not supported by >> itkVectorGradientMagnitudeImageFilter). gradient_mag_vec.cxx compiles fine >> if complex and vector are commented out but for e.g. RGB yields outputs >> where the last DimSize is 3* the input DimSize. >> >> Including vector compilation aborts with complains like: >> >> itkVectorGradientMagnitudeImageFilter.h:184:62: error: ?Dimension? is not >> a member of ?itk::Image, 3u>::PixelType >> {aka itk::VariableLengthVector}? typedef typename >> ConstNeighborhoodIteratorType::RadiusType RadiusType; >> >> What would I have to change to make this work for images composed of >> vectors with e.g. 2 to 5 elements? Would that also solve the incorrect >> output for RGB/RGBA? Is there any elegant way to circumvent using >> GetNumberOfComponentsPerPixel to instantiate another template level in case >> a vector image is detected? >> >> Many thanks for any help or hints. Roman >> >> -- Dr. Roman Grothausmann >> >> Tomographie und Digitale Bildverarbeitung Tomography and Digital Image >> Analysis >> >> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische >> Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover >> >> Tel. +49 511 532-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 _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK 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 Tue May 10 08:27:04 2016 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Tue, 10 May 2016 14:27:04 +0200 Subject: [ITK] [ITK-users] reading images of vectors with variable length in addition to scalar, RGB, RGBA (itkVectorGradientMagnitudeImageFilter) In-Reply-To: <57309CDA.6010108@mh-hannover.de> References: <57309CDA.6010108@mh-hannover.de> Message-ID: <5731D398.3080000@mh-hannover.de> Got it working with Kris' help, adding another template level to set fixed NumberOfComponentsPerPixel, which is needed because VectorGradientMagnitudeImageFilter cannot handle VariableLengthVector (which is also used by VectorImage): https://github.com/romangrothausmann/ITK-CLIs/commit/75bf503a923b408e7b9a229d123b797c3765dc85 On 09/05/16 16:21, Grothausmann, Roman Dr. wrote: > Dear mailing list members, > > > Based on Bill's feedback I created a template.cxx > (https://github.com/romangrothausmann/ITK-CLIs/blob/master/template.cxx) that I > just extend according to some ITK-filters when needed. In general it works well > for images of varying dimension and for scalar, often even for RGB and RGBA types. > However, now I'm in the need to apply itkVectorGradientMagnitudeImageFilter to > images of vectors with lengths 2 to 5 for which my approach with > VariableLengthVector does not work. > > gradient_mag_vec.cxx > (https://github.com/romangrothausmann/ITK-CLIs/blob/master/gradient_mag_vec.cxx) > is based on template.cxx (diff: > https://github.com/romangrothausmann/ITK-CLIs/commit/544345b259adce2ef903183553a1aa97648e85b8) > > with dim= 1 and scalar removed (because not supported by > itkVectorGradientMagnitudeImageFilter). > gradient_mag_vec.cxx compiles fine if complex and vector are commented out but > for e.g. RGB yields outputs where the last DimSize is 3* the input DimSize. > > Including vector compilation aborts with complains like: > > itkVectorGradientMagnitudeImageFilter.h:184:62: error: ?Dimension? is not a > member of ?itk::Image, 3u>::PixelType {aka > itk::VariableLengthVector}? > typedef typename ConstNeighborhoodIteratorType::RadiusType RadiusType; > > What would I have to change to make this work for images composed of vectors > with e.g. 2 to 5 elements? > Would that also solve the incorrect output for RGB/RGBA? > Is there any elegant way to circumvent using GetNumberOfComponentsPerPixel to > instantiate another template level in case a vector image is detected? > > Many thanks for any help or hints. > Roman > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From Aude.CHENET-ext at galderma.com Tue May 10 10:19:55 2016 From: Aude.CHENET-ext at galderma.com (CHENET Aude (External)) Date: Tue, 10 May 2016 14:19:55 +0000 Subject: [ITK] [ITK-users] Using Requested Regions with Filter Message-ID: <512AA6AA7E7E224A874888677C6CB2FB587011@WWEURMBX03.galderma.com> Hello, I'm using ITK (with Python wrapping) and I'd like to work only on a part of an image (because of memory problems) I've declared the requestedRegion for the output of my filter, but still have the memory problem. Do I have to declare something else to the filter? Here is my code : pixelType = itk.SS imageType = itk.Image[pixelType,3] readerType = itk.ImageFileReader[imageType] reader = readerType.New() reader.SetFileName('resamp.tif') imageResamp = reader.GetOutput() idx = itk.Index[3]() idx[1]=80 s = itk.Size[3]() s[0]=1354 s[1]=20 s[2]=1440 region = itk.ImageRegion[3]() region.SetIndex(idx) region.SetSize(s) imageResamp.SetBufferedRegion(region) imageResamp.SetRequestedRegion(region) h = itk.HessianRecursiveGaussianImageFilter[imageType].New() h2v = itk.Hessian3DToVesselnessMeasureImageFilter[itk.SS].New() h2v.SetInput(h.GetOutput()) h.SetInput(imageResamp) h2v.GetOutput().SetRequestedRegion(region) h2v.GetOutput().UpdateOutputInformation() h2v.GetOutput().PropagateRequestedRegion() h2v.Update() Thanks for your help. Aude -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Tue May 10 13:59:33 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 10 May 2016 13:59:33 -0400 Subject: [ITK] [ITK-users] Using Requested Regions with Filter In-Reply-To: <512AA6AA7E7E224A874888677C6CB2FB587011@WWEURMBX03.galderma.com> References: <512AA6AA7E7E224A874888677C6CB2FB587011@WWEURMBX03.galderma.com> Message-ID: Hi Aude, The itk::HessianRecursiveGaussianImageFilter does not currently support streaming: https://github.com/InsightSoftwareConsortium/ITK/blob/4944f06ca0d25d6fd23b7cef3c3da730ac26ff8f/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx#L137-L154 so the pipeline will not stream. Some options: - Use an itk::RegionOfInterestImageFilter on the reader output. - Implement a Hessian image filter that is capable of streaming. The itkDiscreteHessianGaussianImageFunction.{h,hxx} in the ITK Review module may be useful. HTH, Matt On Tue, May 10, 2016 at 10:19 AM, CHENET Aude (External) wrote: > Hello, > > > > I?m using ITK (with Python wrapping) and I?d like to work only on a part of > an image (because of memory problems) > > I?ve declared the requestedRegion for the output of my filter, but still > have the memory problem. > > Do I have to declare something else to the filter? > > > > Here is my code : > > pixelType = itk.SS > > imageType = itk.Image[pixelType,3] > > readerType = itk.ImageFileReader[imageType] > > reader = readerType.New() > > reader.SetFileName('resamp.tif') > > > > imageResamp = reader.GetOutput() > > > > idx = itk.Index[3]() > > idx[1]=80 > > s = itk.Size[3]() > > s[0]=1354 > > s[1]=20 > > s[2]=1440 > > region = itk.ImageRegion[3]() > > region.SetIndex(idx) > > region.SetSize(s) > > > > imageResamp.SetBufferedRegion(region) > > imageResamp.SetRequestedRegion(region) > > > > h = itk.HessianRecursiveGaussianImageFilter[imageType].New() > > h2v = itk.Hessian3DToVesselnessMeasureImageFilter[itk.SS].New() > > h2v.SetInput(h.GetOutput()) > > > > h.SetInput(imageResamp) > > h2v.GetOutput().SetRequestedRegion(region) > > h2v.GetOutput().UpdateOutputInformation() > > h2v.GetOutput().PropagateRequestedRegion() > > > > h2v.Update() > > > > > > Thanks for your help. > > > > Aude > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 ehsand56 at gmail.com Tue May 10 14:45:32 2016 From: ehsand56 at gmail.com (Ehsan Dehghan) Date: Tue, 10 May 2016 11:45:32 -0700 Subject: [ITK] Problem with LabelShapeStatisticsImageFilter Message-ID: I'm using LabelShapeStatisticsImageFilter with Java to get statistics on a labeled image. I use the following code: LabelShapeStatisticsImageFilter labelStat = new LabelShapeStatisticsImageFilter(); labelStat.execute(slice, 0, false, false); int labelsCount = (int) labelStat.getLabels().size(); int n = (int) labelStat.getNumberOfLabels(); volPix = labelStat.getNumberOfPixels(1); In the above code labelsCount will be calculated correctly. The value for "n" which should be equal to labelsCount is a huge and wrong number (=252578752). Surprisingly "volPix" is also equal to "n". Slice is a 512*512 image of UInt. Any help is much appreciated. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Tue May 10 16:50:03 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 10 May 2016 16:50:03 -0400 Subject: [ITK] [ITK-dev] installed ITK cannot be moved due to absolute path In-Reply-To: References: Message-ID: Hi Rashad, a few months ago relative paths were completely removed from CMake, because they were never fully implemented. Have you followed recommendations from here for cross-compiling? As for integrating your changes into ITK, you should submit a patch following the instructions here . If your changes don't break anything, they are likely to be integrated. Regards, D?enan On Mon, May 9, 2016 at 4:27 PM, Rashad Kanavath wrote: > Hello all, > > I have some issue when copying ITK install directory to a different > system. I agree this is not usual and may not appear on a linux distro or > windows. > > My requirement is bit different. I cross-compile ITK and then use the > binaries on Windows. Using dll and headers are fine. But the installed > cmake files are a problem. They have absolute path in > ITK-4.8/Modules/*.cmake files. It is not in all .cmake files even though I > put a wildcard there.. > > For a easy and quick workaround. I rely on mighty sed command to insert > something into installed cmake file. > > For example see this; > lib/cmake/ITK-4.8/ITKTargets-release.cmake > > set(CMAKE_IMPORT_FILE_VERSION 1) > set(LIB_INSTALL_PREFIX) > get_filename_component(CURRENT_FILE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) > get_filename_component(LIB_INSTALL_PREFIX "${CURRENT_FILE_DIR}" PATH) > get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH) > get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH) > > and at last: > > $(SED) -i 's,$(PREFIX)/$(TARGET),\${LIB_INSTALL_PREFIX},g' > 'lib/cmake/ITK-$(ITK_VER)/ITKTargets-release.cmake' > > I would like to have this patch inside the other .cmake files in the > installation and avoid the sed commands during post-installation > > Here is the list of cmake files that needs this change. > lib/cmake/ITK-4.8/ITKTargets-release.cmake > lib/cmake/ITK-4.8/Modules/ITKZLIB.cmake > lib/cmake/ITK-4.8/Modules/ITKExpat.cmake > lib/cmake/ITK-4.8/Modules/ITKHDF5.cmake > lib/cmake/ITK-4.8/Modules/ITKJPEG.cmake > lib/cmake/ITK-4.8/Modules/ITKTIFF.cmake > lib/cmake/ITK-4.8/Modules/ITKPNG.cmake > > So is it possible to make the change into future version of ITK? > > The major issue here is those cmake files are generated by cmake. Is there > a way cmake could use relative path ? > > > -- > Regards, > Rashad > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From mohammedrashadkm at gmail.com Tue May 10 17:25:11 2016 From: mohammedrashadkm at gmail.com (Rashad Kanavath) Date: Tue, 10 May 2016 23:25:11 +0200 Subject: [ITK] [ITK-dev] installed ITK cannot be moved due to absolute path In-Reply-To: References: Message-ID: On Tue, May 10, 2016 at 10:50 PM, D?enan Zuki? wrote: > Hi Rashad, > > a few months ago relative paths were completely removed from CMake, > because they were never fully implemented. Have you followed > recommendations from here for > cross-compiling? > Yes. indeed. I had updated the mxe/src/itk.mk for several versions of ITK! Regarding relative path in cmake, I don't understand. I didn't use cmake specific REL_PATH. > > As for integrating your changes into ITK, you should submit a patch > following the instructions here . > If your changes don't break anything, they are likely to be integrated. > issue here is a bit different. For all libitk* stuff the story ends well. For thirdparties, zlib, expat etc.. it is good idea to put the full path because we don't know if they are in same install directory as ITK or not. But this make the installed cmake modules non-portable even to a different location on the same disk. Now if anyone want to provide a distributable setup of ITK. patch the generated cmake files with sed and then copy it. This is what I am doing right now! A simple not perfect solution is to have all thirdparties make _PREFIX variable inside the ITKConfig.cmake and for each library we use _PREFIX/include and _PREFIX/lib Another option is to avoid full path directly inside cmake module files and put find_package() calls in the install tree. As these files are autogenerated by cmake, don't know what is possible. > Regards, > D?enan > > On Mon, May 9, 2016 at 4:27 PM, Rashad Kanavath < > mohammedrashadkm at gmail.com> wrote: > >> Hello all, >> >> I have some issue when copying ITK install directory to a different >> system. I agree this is not usual and may not appear on a linux distro or >> windows. >> >> My requirement is bit different. I cross-compile ITK and then use the >> binaries on Windows. Using dll and headers are fine. But the installed >> cmake files are a problem. They have absolute path in >> ITK-4.8/Modules/*.cmake files. It is not in all .cmake files even though I >> put a wildcard there.. >> >> For a easy and quick workaround. I rely on mighty sed command to insert >> something into installed cmake file. >> >> For example see this; >> lib/cmake/ITK-4.8/ITKTargets-release.cmake >> >> set(CMAKE_IMPORT_FILE_VERSION 1) >> set(LIB_INSTALL_PREFIX) >> get_filename_component(CURRENT_FILE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) >> get_filename_component(LIB_INSTALL_PREFIX "${CURRENT_FILE_DIR}" PATH) >> get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH) >> get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH) >> >> and at last: >> >> $(SED) -i 's,$(PREFIX)/$(TARGET),\${LIB_INSTALL_PREFIX},g' >> 'lib/cmake/ITK-$(ITK_VER)/ITKTargets-release.cmake' >> >> I would like to have this patch inside the other .cmake files in the >> installation and avoid the sed commands during post-installation >> >> Here is the list of cmake files that needs this change. >> lib/cmake/ITK-4.8/ITKTargets-release.cmake >> lib/cmake/ITK-4.8/Modules/ITKZLIB.cmake >> lib/cmake/ITK-4.8/Modules/ITKExpat.cmake >> lib/cmake/ITK-4.8/Modules/ITKHDF5.cmake >> lib/cmake/ITK-4.8/Modules/ITKJPEG.cmake >> lib/cmake/ITK-4.8/Modules/ITKTIFF.cmake >> lib/cmake/ITK-4.8/Modules/ITKPNG.cmake >> >> So is it possible to make the change into future version of ITK? >> >> The major issue here is those cmake files are generated by cmake. Is >> there a way cmake could use relative path ? >> >> >> -- >> Regards, >> Rashad >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-developers >> >> > -- Regards, Rashad -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From sami.koho at gmail.com Wed May 11 06:18:51 2016 From: sami.koho at gmail.com (Sami Koho) Date: Wed, 11 May 2016 13:18:51 +0300 Subject: [ITK] [ITK-users] SimpleITK - Transform construction Message-ID: <2499BF08-25FD-44E2-AC94-ED8F1AEBA2FF@gmail.com> Hi, I am planning to save SimpleITK spatial transforms into a HDF5 file, as image attributes. I have divided the transform into three arguments: 1. params = transform.GetParameters() 2. fixed_params = transform.GetFixedParameters() 3. transform_type = an integer based on the TransformEnum I tried to rebuild the transform from those parameters using the constructor: > itk::simple::Transform::Transform (unsigned int dimensions, TransformEnum type) and then setting the fixed and moving parameters. This appears to work fine. There are a couple of small problems however: 1. In the itk::simple::Transform Class Reference it is written that the said constructor is Deprecated. What would be the up-to-date method for constructing a specific Transform? 2. Is there a way of extracting the type of a Transform from an existing spatial transform? I tried transform.GetName() and type(transform).__name__, but both produce ?Transform?, instead of the specific transform Name. Best, Sami -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From dzenanz at gmail.com Wed May 11 08:56:23 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 11 May 2016 08:56:23 -0400 Subject: [ITK] [ITK-users] Itk Volume From Slices In-Reply-To: <1462266832069-7588801.post@n2.nabble.com> References: <1462266832069-7588801.post@n2.nabble.com> Message-ID: Have you tried running you application under debugger? Where in code does it crash, and what is the error/exception? Regards, D?enan On Tue, May 3, 2016 at 5:13 AM, abenchaaben wrote: > Hi, > > I'm using the volume from slices ITK example to build a volume from 2d RGB > png files. I want to know if they a condition on the numbers of images that > i should pass to the seriesReader class. Because my applicvation just crash > when i put many image to the class. > > Regards. > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Itk-Volume-From-Slices-tp7588801.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From blowekamp at mail.nih.gov Wed May 11 09:07:33 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Wed, 11 May 2016 13:07:33 +0000 Subject: [ITK] Problem with LabelShapeStatisticsImageFilter In-Reply-To: References: Message-ID: Hello, Did you compile SimpleITK yourself? What OS, architecture and Java version are you using? Looking at this filter [1], I see both of these problematic methods are returning ?uint64_t? in C++. There appears to be some problem with the conversion of integers. What is the return type in your Java for getNumberOfLabels()? Is may be BigInteger? HTH, Brad [1] https://itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1LabelShapeStatisticsImageFilter.html > On May 10, 2016, at 2:45 PM, Ehsan Dehghan wrote: > > I'm using LabelShapeStatisticsImageFilter with Java to get statistics on a labeled image. I use the following code: > > LabelShapeStatisticsImageFilter labelStat = new LabelShapeStatisticsImageFilter(); > labelStat.execute(slice, 0, false, false); > > int labelsCount = (int) labelStat.getLabels().size(); > int n = (int) labelStat.getNumberOfLabels(); > volPix = labelStat.getNumberOfPixels(1); > > > In the above code labelsCount will be calculated correctly. The value for "n" which should be equal to labelsCount is a huge and wrong number (=252578752). Surprisingly "volPix" is also equal to "n". Slice is a 512*512 image of UInt. > > Any help is much appreciated. > > Thanks. > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From blowekamp at mail.nih.gov Wed May 11 09:24:11 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Wed, 11 May 2016 13:24:11 +0000 Subject: [ITK] [ITK-users] SimpleITK - Transform construction In-Reply-To: <2499BF08-25FD-44E2-AC94-ED8F1AEBA2FF@gmail.com> References: <2499BF08-25FD-44E2-AC94-ED8F1AEBA2FF@gmail.com> Message-ID: <2BD27E3C-AEF1-44A1-A09F-CAA7F081BB9F@mail.nih.gov> Hello, ITK Transform IO already have an HDF5 format for serialization. Is there a way you can reuse this code? Perhaps using some type of HDF5 utility to merge two files? More answers inline: > > 1. In the itk::simple::Transform Class Reference it is written that the said constructor is Deprecated. What would be the up-to-date method for constructing a specific Transform? There was a lot of negative feedback with this method and the base sitk::Transform interface, because it presented all transforms as the same. So the transform specific classes derived from this class are the recommended interface to use. Also you can not create a displacement field with this method. It would be recommended to handle the construction of each transform separately. > > 2. Is there a way of extracting the type of a Transform from an existing spatial transform? I tried transform.GetName() and type(transform).__name__, but both produce ?Transform?, instead of the specific transform Name. There should be a method to at least get the TransformEnum, but there are several cases where the underlying transform may be unknown. I?ll add that right away. There is also the ToString method which will print the underlying ITK transform. HTH, Brad > > Best, > > Sami > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 ehsand56 at gmail.com Wed May 11 12:46:22 2016 From: ehsand56 at gmail.com (Ehsan Dehghan) Date: Wed, 11 May 2016 09:46:22 -0700 Subject: [ITK] Problem with LabelShapeStatisticsImageFilter In-Reply-To: References: Message-ID: Hi Brad, I did not compile simpleITK myself. I am using version 0.9.0 on Windows 7, 64 bits. I am running Java 1.7.0. Both of these methods return Long. Thanks, Ehsan On Wed, May 11, 2016 at 6:07 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] < blowekamp at mail.nih.gov> wrote: > Hello, > > Did you compile SimpleITK yourself? What OS, architecture and Java version > are you using? > > Looking at this filter [1], I see both of these problematic methods are > returning ?uint64_t? in C++. There appears to be some problem with the > conversion of integers. What is the return type in your Java for > getNumberOfLabels()? Is may be BigInteger? > > HTH, > Brad > > > [1] > https://itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1LabelShapeStatisticsImageFilter.html > > > > On May 10, 2016, at 2:45 PM, Ehsan Dehghan wrote: > > > > I'm using LabelShapeStatisticsImageFilter with Java to get statistics on > a labeled image. I use the following code: > > > > LabelShapeStatisticsImageFilter labelStat = new > LabelShapeStatisticsImageFilter(); > > labelStat.execute(slice, 0, false, false); > > > > int labelsCount = (int) labelStat.getLabels().size(); > > int n = (int) labelStat.getNumberOfLabels(); > > volPix = labelStat.getNumberOfPixels(1); > > > > > > In the above code labelsCount will be calculated correctly. The value > for "n" which should be equal to labelsCount is a huge and wrong number > (=252578752). Surprisingly "volPix" is also equal to "n". Slice is a > 512*512 image of UInt. > > > > Any help is much appreciated. > > > > Thanks. > > _______________________________________________ > > Community mailing list > > Community at itk.org > > http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Thu May 12 09:56:36 2016 From: matimontg at gmail.com (Matias Montroull) Date: Thu, 12 May 2016 13:56:36 +0000 Subject: [ITK] [ITK-users] Windows Levels after write Message-ID: Hi, I've written code to flip an image in its X axis, it work fine but for some reason, the flipped image has its window levels changed... Original image has WW 40 and WC 400 and the resulting image has WW -435 and WC 5178. *The images I'm trying are signed short Dicom files.* The original file has rescaleintercept -1024 and the resulting image has this value set to 0 which is also strange Any reason why this happens? Here's the code: #include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "itkFlipImageFilter.h" int main(int argc, char* argv[]) { if (argc != 4) { std::cerr << "Usage: " << argv[0]; std::cerr << " "; std::cerr << std::endl; return EXIT_FAILURE; } typedef itk::Image< signed short, 2 > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(argv[1]); typedef itk::FlipImageFilter< ImageType > FlipImageFilterType; FlipImageFilterType::Pointer flipFilter = FlipImageFilterType::New(); flipFilter->SetInput(reader->GetOutput()); FlipImageFilterType::FlipAxesArrayType flipAxes; if (atoi(argv[3]) == 0) { flipAxes[0] = true; flipAxes[1] = false; } else { flipAxes[0] = false; flipAxes[1] = true; } flipFilter->SetFlipAxes(flipAxes); typedef itk::ImageFileWriter< ImageType > WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName(argv[2]); writer->SetInput(flipFilter->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject & error) { std::cerr << "Error: " << error << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; } -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Thu May 12 14:53:22 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 12 May 2016 14:53:22 -0400 Subject: [ITK] [ANN] ITK 4.10 Release Candidate 1 is ready for testing! Message-ID: On behalf of the Insight Toolkit community, we are proud to announce that ITK 4.10 release candidate 1 has been tagged and is available for testing! Please take this opportunity to test the new features in the release candidate. To obtain the source code, git clone http://itk.org/ITK.git cd ITK git checkout -q --detach v4.10rc01 For more details, please see the Git documentation [1]. A few selected highlights for this release: - New Remote module: TwoProjectionRegistration performs simultaneous registration of two projection images to a 3D image volume, which is useful for external beam radiotherapy and other applications. It uses Powell?s method for optimization and the Siddon-Jacobs fast ray-tracing algorithm. - First update to internal VNL in five years. Many improvements were made to upstream VNL. We now push patches upstream and stay in sync via a Git subtree workflow. - Windows builds now support processing 4GB+ images by default - GDCM updated for better DICOM support Additionally, in the Python wrapping, type specification is no longer necessary during the creation of most filters. The required type is inferred from a primary input passed on filter creation. For example, instead of the explicit type specification: median = itk.MedianImageFilter[ImageType, ImageType].New() median.SetInput(reader.GetOutput()) It is now possible to call: median = itk.MedianImageFilter.New(Input=reader.GetOutput()) Or, the shortened: median = itk.MedianImageFilter.New(reader.GetOutput()) Or: median = itk.MedianImageFliter.New(reader) An itk.ImageFileReader can be created by specifying the FileName during instantiation: reader = itk.ImageFileReader.New(FileName=?inputFile.mha?) Please test the release candidate and share your experiences on the mailing list, issue tracker, and Gerrit Code Review. An Experimental build, which demonstrates how the test suite performs on your local build system, can be submitted to the dashboard [2] with: mkdir ../ITK-build cd ../ITK-build cmake ../ITK ctest -j 4 -M Experimental -T Configure -T Build -T Test -T Submit Visual Studio builds must also add ?-C Release? to the ctest command. Notify the mailing list if there are any unexpected failures. Testing your own applications against the RC is also appreciated. Congratulations and well done to the 26 contributors to this release. We would especially like to recognize the new contributors: Andrey Fedorov, Sujin Philip, Francois Budin, and b'Alvaro Sanchez. The 4.10.0 final release is scheduled for the end of May. [1] http://www.itk.org/Wiki/ITK/Git [2] http://open.cdash.org/index.php?project=Insight New Features --------------------- * Wrapping improvements - ITK_USE_64BITS_IDS supported on Windows - Faster builds (CastXML calls and build targets reduced by half) - Faster runtime loading and smaller binary size due to hidden symbol visibility - Wrapping with BUILD_SHARED_LIBS disabled is supported - Do not link to libpython when possible - Filter types do not need to be specified when ?Input=inputImage? is specified in the constructor - Improved wrapping class coverage - Visual Studio 2015 Update 2 Supported * New Remote Module - TwoProjectionRegistration - 2D-3D registration designed for radiotherapy - http://hdl.handle.net/10380/3245 * Core Improvements - Data and build tool downloads now over HTTPS - Extended constexpr usage with ITK_CONSTEXPR and ITKCONSTEXPR_FUNC macros - ITK_USE_64BITS_IDS, required to process 4GB+ images on Windows, now enabled by default - VNL updated and modernized - CMake configuration major modernization - vcl has been removed in favor of the standard libraries - vnl_math_ function avoided in favor of std:: and itk::Math - VNL had suppressed integer data conversion warnings on Visual Studio (C4257); this suppression has been removed and all warnings addressed - Various improvements for building a module externally against an ITK build tree - CMAKE_POSITION_INDEPENDENT_CODE is enabled by default - Improved EXERCISE_BASIC_OBJECT_METHODS testing macro * Filtering Improvements - RGB pixel support added to itk::ImageToVTKImageFilter - itk::Box* filters moved out of the Review module - itk::GaussianDerivativeOperator moved out of the Review module - MaskLabel is deprecated in N4BiasFieldCorrectionFilter in favor any non-zero pixel * Registration Improvements - Fixed and moving masks added to the v4 registration methods * Documentation Improvements - Updates to the Software Guide, Doxygen, Wiki and Sphinx Examples * Third Party Library Updates - pygccxml updated to v1.7.3 - GDCM updated to the release branch latest - VNL updated to latest upstream - MINC updated to the latest upstream - SWIG updated to v3.0.8 - PCRE update to v8.38 * Improved code coverage -- we are at 85.0%! * *Lots* of important bug fixes * And much more! See details in the log below. Changes from v4.9.0..v4.10rc01 ------------------------------------------------ Alvaro Sanchez (1): STYLE: moved itkKappaSigmaThresholdImageFilter/Calculator from Nonunit/Review Andrey Fedorov (2): BUG: Add missing itk_expat_mangle.h install target BUG: fix typo in file name Bill Hoffman (2): COMP: fix shared build on Windows when Review is on. COMP: work around for VS 2015 optimizer bug causing test failures. Bill Lorensen (6): ENH: Bump version for style fixups. ENH: Bump wiki examples version, new remote module process ENH: Bump wiki examples version, new remote module process STYLE: SuperClass should be Superclass COMP: Resolve clang linkage issue BUG: Valgrind detected an invalid read Bradley Lowekamp (21): BUG: Compilation problem with GCC 4.1 and explicit instantiation ENH: Update Insight Journal handle links to https ENH: Adding const qualifier to results BUG: Adding missing const qualifier for GetConfusionMatrix method BUG: Use Set/GetMacros, fix const correctness and PrintSelf. ENH: added inlined Zero and one values for integer NumericTraits ENH: Use constexpr for floating point NumericTraits ENH: Make NumericTraits functions constexpr for intrinsic BUG: Add definition of static constexpr NumericTrait members BUG: Declared static constexpr members need to be defined as constexpr ENH: ITK_CONSTEXPR_FUNC implies inline BUG: Addressing VS10 and VS11 NumericTraits linkage issue BUG: Use LargestPossible region for BSpline domain BUG: Remove errant file COMP: Address warning about this usage in initializer list ENH: Prefer ZeroValue function over variable STYLE: Use consistent path for try_compiles binary directory BUG: Don't use "=" in cmake variable name ENH: Test address of NumericTraits One and Zero constexpr ENH: Use ITK_USE_64BITS_IDS for windows 64 by default ENH: Enable run-time dependency on Python library Davis Vigneault (4): ENH: Update itkFileTools to allow std::string arguments. ENH: Add Floored and Truncated Modulus to VNL ENH: Add Ternary Operator Image Filter STYLE: Prefer static cast D?enan Zuki? (1): ENH: CovariantVector's Normalize returns the norm. Francois Budin (6): PERF: Simplify itkTemplate New() input type identification. ENH: Avoid template type specification for image reader in Python wrapping BUG: Missing IOPixelType strings in ImageIOBase BUG: Wrapping intermediate files were not automatically updated ENH: Reduce number of dependencies for XML files generated for wrapping BUG: GCC is limited when calling overloaded base class functions GCC-XML Upstream (1): ENH: pygccxml v1.7.3 (reduced) GDCM Upstream (1): GDCM 2015-09-02 (1efe9e28) Hans Johnson (27): COMP: Static analysis warning COMP: Incorrect delete found by static analysis PERF: Avoid temporary std:vector copying. COMP: Provide VXL backward compatible includes COMP: ITK requires legacy methods ENH: Need propagate ITK_LIBRARY_PROPERTIES ENH: Added UpdateFromUpstream.sh for VNL ENH: Manual copy from vxl/master STYLE: vnl_math_[min|max] -> std::[min|max] STYLE: Text files should end with a newline COMP: Prefer C++11 constexpr when possible COMP: Prefer C++11 constexpr when possible ENH: Simplify std:: math function definitions COMP: Error in constexpr usage COMP: Add const to previous const variables COMP: SizeValueType can has different definition for itkArray ENH: Added utility for modernizing vcl_ to std:: ENH: Reference vnl_math.h constants directly ENH: Avoid using vnl_math_ functions COMP: Missing symbol for itkStaticConstMacro COMP: Function override missing in BioCell ENH: Convert vcl_ to std:: BUG: Windows vcl_snprintf failures addressed COMP: Disabmiguate function calls to SetData ENH: Provided static code API for external applications COMP: Remove possible type conversion warnings ENH: Merge GDCM release branch Hyun Jae Kang (25): COMP: Fixed the compiler error of ITKCommon2TestDriver on OSX 10.6 BUG: Fixed the runtime crash of VideoSourceTest on OSX 10.6 BUG: Fixed the runtime crash of itkTimeProbeTest2 BUG: Fixed the runtime crash of ITKFastMarchingTestDriver's tests on OSX 10.6 BUG: Fixed the runtime crash of ITKReviewTestDriver on OSX 10.6 COMP: Fixed the data conversion warning messages of itkResourceProbe BUG: Fixed the runtime crash of itkLabelOverlapMeasuresImageFilterTest BUG: Fixed the runtime crash of ITKStatisticsTestDriver tests on OSX 10.6 BUG: Fixed the runtime crash of itkMRIBiasFieldCorrectionFilterTest BUG: Fixed the runtime crash of itkBinaryShapeOpeningImageFilterTest1 BUG: Fixed the runtime crash of vnl_test_complex on OSX 10.6 BUG: Fixed the runtime crash of vnl_test_numeric_traits BUG: Fixed the runtime crash of test_pow_log on OSX 10.6 BUG: Exclude a test code of ITKLabelMapTestDriver on OSX 10.6 BUG: Fixed the failed test case of itkSTLThreadTest on OS X 10.8 COMP: Update KWStyle to utilize the latest boost library COMP: Fixed the compiler error of ITK on Mingw-w64 COMP: Temporarily suppress the warning messages of data-conversion on VS14 COMP: Put back the disappeared option of "BUILD EXAMPLES". BUG: Fix segmentation faults on mingw-W64 x86_64. BUG: Fix the failed test of itkCastImageFilterTest on mingw-w64 compiler. COMP: Fixed the cmake configuration for ITK_WRAP_DOC COMP: Fixed the warning messages on VS14. COMP: Add a missing head file at itkNumericTraitsStdVector.h COMP: Fix the wraning message of data-conversion Jean-Christophe Fillion-Robin (4): COMP: ITKExternalModule: Support building module without test directory. STYLE: Facilitate maintenance of CastXML generator refactoring CMakeLists COMP: Allow use of multiple "ITK external modules" in the same project. STYLE: UseITK: Document static registration of ITK IO factories. See #3393 Jon Haitz Legarreta (7): COMP: Delete unused variable compiler warning. ENH: Refactored itkBioCellTest ENH: Exercise non-tested itk::Math methods. ENH: Improve MersenneTwister class and test. ENH: Improve itkFEMLoadPoint coverage. ENH: Improve itkVersion class code coverage. ENH: Perform class name checks in test macro KWSys Robot (1): KWSys 2016-03-09 (36d8666f) Lucas Gandel (9): ENH: Implement GetNumberOfParameter() in ImageToSpatialObjectMetric COMP: Enable wrapping of multiple "ITK external modules" in the same project COMP: Fix CASTXML_EXECUTABLE value for multiple external module COMP: Fix external module testing COMP: Fix git protocol setup ENH: Conditionally add testing for External Modules BUG: Fix call to std::max() with different variable types Manuel Grizonnet (1): COMP: add ITKCommon_EXPORT to fix link issues with external applications Matthew McCormick (73): ENH: Add TwoProjectionRegistration Remote Module. ENH: Allow ITKVideoBridgeOpenCV to be built externally. COMP: Add export specification for itk::ResourceProbe. ENH: Do not force shared libraries when wrapping. BUG: BUILD_TESTING should be not advanced. ENH: Bump ITK version to 4.10.0. DOC: Correct ITKImageNoise description spelling. ENH: Wrap FFTNormalizedCorrelationImageFilter. BUG: Remove Azure ExternalData resource. BUG: ExternalData downloads from midas3.kitware.com only supports https. BUG: Update ExternalData resource. BUG: slicer.kitware.com/midas3/ ExternalData will not support http. ENH: Add ITK_CUSTOM_LIBRARY_SUFFIX variable. ENH: Wrap PipelineMonitorImageFilter. BUG: Update MIDAS url for https in archive testing data script. ENH: Wrap std::vector< itk::ImageRegion >. BUG: Fix wrapping build with DEFAULT_MODULES OFF. ENH: Add RGB pixel support to ImageToVTKImageFilter. ENH: Add RGB and vector pixel type wrapping for ImageToVTKImageFilter. STYLE: Use PixelType and ImageType in Python tests. ENH: Avoid template type specification in Python wrapping. COMP: Do not use has_key in itkTemplate New. DOC: Emphasize that push access is not required to contribute patches. ENH: Download SWIG and PCRE from midas3.kitware.com. COMP: Ignore build warning from KWStyle's boost. BUG: Remove Azure ExternalData resource. BUG: ExternalData downloads from midas3.kitware.com only supports https. BUG: slicer.kitware.com/midas3/ ExternalData will not support http. ENH: Update the VNL README-ITK.txt subtree commit revision. BUG: Mark VXL internal CMake variables as advanced. BUG: Run itk_module_target on itknetlib. DOC: Direct patches for VXL upstream to the GitHub repository. BUG: Run itk_module_target on itknetlib. COMP: Account for removal of vcl_* from upstream VXL. COMP: Remove itkTypeMacro from BioCellHelper. COMP: Convert itkBioCellTest arguments from double to int. COMP: Turn off BUILD_DOCUMENTATION for VNL. BUG: Install VXL config files to backwards-compatible locations. ENH: Remove vcl_complex from the wrapping. BUG: Install vnl_export.h and vnl_algo_export.h to previous locations. BUG: midas3.kitware.com only supports the https protocol. BUG: ImageIOBase SetDimensions should take SizeValueType. ENH: Add wrapping for ImagePCAShapeModelEstimator. COMP: Do not specify COMPONENTS with find_package(VTK. DOC: Fix FFTW warning grammar. COMP: Build against system HDF5 1.8.16. ENH: Set a default CMAKE_BUILD_TYPE when building a module externally COMP: Make initial HDF5 discovery of 1.8.16 quiet. ENH: Use hidden symbol visibility for the CPython extension modules. ENH: Turn on CMAKE_POSITION_INDEPENDENT_CODE by default. BUG: FEMLoadPoint uninitialized value in the constructor. BUG: Fix wrapping of complex types in VNL. ENH: Bump CMakeLists.txt version 4.9.1. COMP: Address ITKCommon Python submodule order. BUG: Extend ExternalData_TIMEOUT_ABSOLUTE to 900 seconds. BUG: Do not run KWStyle Git config on a release tarball. COMP: Ambiguous RGBPixel access in CustomColormapFunction. BUG: Prevent division by zero in PhasedArray3DSpecialCoordinatesImage. BUG: Initialize azimuth and elevation to pi/2 in PhasedArray3D. BUG: Increase MaskLabel backwards compatibility in N4 bias correction. ENH: Deprecate MaskLabel in N4BiasFieldCorrectionImageFilter. COMP: Update CastXML to support Visual Studio 2015 Update 2. COMP: Do not set wrapping library visibility with static builds. COMP: Update CastXML to support Visual Studio 2015 Update 2. COMP: Broaden the KWStyle warning exception. COMP: Update KWStyle version. BUG: Do not use the same output file in N4BiasField Test 2,3. COMP: Expand EXERCISE_BASIC_OBJECT_METHODS for other GCC versions. ENH: Update Cuberille Remote to 2015-05-01. ENH: Enable registration of the IOOpenSlide module through CMake. ENH: Update itk.org URL's for HTTPS support. BUG: Use CastXML built against LLVM with LLVM_ENABLE_TERMINFO OFF. BUG: Fix Python wrapping on Windows when ITK_USE_64BIT_IDS is ON. Michka Popoff (12): ENH: Use importlib for python 3.4 instead of imp ENH: Update to Swig 3.0.8 ENH: Update PCRE to version 8.38 ENH: Wrap RayCastInterpolateImageFunction ENH: Wrap RayCastInterpolateImageFunction COMP: Remove debug output after vcl_complex removal from wrapping ENH: Consolidate .idx file generation with swig .i generation. ENH: Update UpdatepygccxmlFromUpstream.sh script COMP: Set CastXML path and name for pygccxml 1.7.3 COMP: Fix RayCastInterpolateImageFunction wrapping for image dim 2 ENH: Use argparse instead of optparse in igenerator.py ENH: Use https URL for OS X castxml binary (for consistency) Nick Tustison (2): ENH: Add fixed/moving masking in reg. methods. ENH: Making the mask usage consistent with ITK. Pablo Hernandez-Cerdan (1): COMP: Fix warn in FFTW about delete []. Sean McBride (18): COMP: Made script OS X compatible COMP: mark GDCM GetSeriesHelper() method as deprecated BUG: update script to fetch GDCM from its release-2-4 branch instead of master DOC: Updated comment to reflect new GDCM version COMP: Fixed recently introduced build error with deprecated GDCM method BUG: Fixed invalid memory access found by ASan COMP: Fixed clang warning about macro expansion giving defined COMP: Fixed minor dashboards warnings and typos. COMP: Fixed a bunch of clang -Wunreachable-code-break warnings COMP: fixed some dashboard warnings (dead code, false positive) BUG: Fixed off-by-1 error found by ASan COMP: Fixed clang -Wcomma warning COMP: Introduce ITK_FALLTHROUGH, to suppress switch fall through warnings COMP: Fixed -Wwritable-strings warnings COMP: Fixed remaining -Wcomma warnings ENH: switch gdcm to release branch, not release-2-4 COMP: Hack HDF5 to build under ASan & UBSan COMP: fixed clang -Wdeprecated-writable-strings warning Shawn Waldon (1): STYLE: move itkGaussianDerivativeOperator Sujin Philip (1): STYLE: Move itkBox* Filters Sumedha Singla (3): ENH: Issue: ITK#3363 Replaced assignment in SetParameters function. ENH: Remove unnecessary const_cast BUG: Fixed the test itkHDF5ImageIOTest VXL Maintainers (9): VNL 2015-11-22 (ea1d60fb) VNL 2016-03-02 (cb31149e) VNL 2016-03-13 (ae34f0fc) VNL 2016-03-15 (751698ab) VNL 2016-03-19 (df10fefa) VNL 2016-03-25 (f0040231) VNL 2016-03-30 (88f50849) VNL 2016-04-22 (0ed18124) VNL 2016-04-26 (6b168535) Vladimir S. FONOV (3): MINC 2015-12-17 (dcb93a5f) MINC 2016-01-30 (783bca38) MINC 2016-02-24 (8632513e) Ziv Yaniv (1): BUG: Interpretation of the Euler angles ZYX or ZXY was not exported. ----------------------------------------------------- Errors or omissions? Please fix them here: https://docs.google.com/document/d/1n6xDC3phae7bH40OVO-QTECZ6gKRlPr1dwZR3fydzfU/edit From bakkari.abdelkhalek at hotmail.fr Fri May 13 05:18:12 2016 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Fri, 13 May 2016 10:18:12 +0100 Subject: [ITK] [ITK-users] Reading of .dcm and .mha series Message-ID: Dear ITK-users, I would like to ask about how can I read .dcm and .mha series for the same application. Any help ! Any suggestion. Kind regards, Abdelkhalek BakkariPh.D candidate in Computer ScienceInstitute of Applied Computer ScienceLodz University of Technology, Poland Virus-free. www.avast.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From ehsan.basafa at gmail.com Fri May 13 11:26:07 2016 From: ehsan.basafa at gmail.com (ebasafa) Date: Fri, 13 May 2016 08:26:07 -0700 (MST) Subject: [ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue Message-ID: <1463153167301-7588837.post@n2.nabble.com> Hi everyone, Recently I noticed that BinaryImageToShapeLabelMapFilter does not calculate roundness of objects correctly, and I traced it back to perimeter calculation. More curiously, the results I get from the GetRoundness() and GetPerimeter() methods differ between debug and release builds! And to make it even more confusing, it's a machine-dependent problem, i.e. on some machines debug and release give the same (correct?) numbers and on some machines they don't. I suspect that release results are erroneous, since some roundness numbers turn out to be >1.0 in release but are always <1.0 in debug mode. I am working in a Windows 8.1 64-bit environment and am using the latest release of ITK (4.9.1) on all different machines. I have tried several searches to see if this is a resolved issue, but the latest post I found was from 2011 (link below) and has been unanswered. http://itk-users.7.n7.nabble.com/Perimeter-Calculation-via-LabelImageToShapeLabelMapFilter-td14917.html Seems like there was a bug report filed that time (https://itk.org/Bug/view.php?id=11934) whose status still says "assigned". I appreciate any help. Thanks, Ehsan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From hyunjae.kang at kitware.com Fri May 13 11:51:28 2016 From: hyunjae.kang at kitware.com (Hyun Jae Kang) Date: Fri, 13 May 2016 11:51:28 -0400 Subject: [ITK] [ITK-dev] About the failing case of itkTestTransformGetInverse. Message-ID: Hi Alexander, Thank you for submit nightly dashboard. We are trying to figure out the test failing case [1] on your machine. Could you check the test code and provide us more information about the failing case? [1] https://open.cdash.org/viewTest.php?onlyfailed&buildid=4363789 Thanks, Hyun Jae -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From blowekamp at mail.nih.gov Fri May 13 12:14:42 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Fri, 13 May 2016 16:14:42 +0000 Subject: [ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue In-Reply-To: <1463153167301-7588837.post@n2.nabble.com> References: <1463153167301-7588837.post@n2.nabble.com> Message-ID: <2D593B3D-C6D6-45EF-93C8-75484575FD49@mail.nih.gov> Hello, You can find additional information about how this parameter is defined in the following insight journal: http://www.insight-journal.org/browse/publication/852 This method is generalizable to N-D, so it may not be the most accurate in 2D. The method can produce roundness numbers that are >1. However is should be consistent in debug and release modes. Getting consistent numeric computation with C++ and vectorizable operations can be challenging with different architectures. You did not provide any specifics for the difference in computation between release and debug modes. HTH, Brad > On May 13, 2016, at 11:26 AM, ebasafa wrote: > > Hi everyone, > > Recently I noticed that BinaryImageToShapeLabelMapFilter does not calculate > roundness of objects correctly, and I traced it back to perimeter > calculation. More curiously, the results I get from the GetRoundness() and > GetPerimeter() methods differ between debug and release builds! And to make > it even more confusing, it's a machine-dependent problem, i.e. on some > machines debug and release give the same (correct?) numbers and on some > machines they don't. I suspect that release results are erroneous, since > some roundness numbers turn out to be >1.0 in release but are always <1.0 in > debug mode. I am working in a Windows 8.1 64-bit environment and am using > the latest release of ITK (4.9.1) on all different machines. > > I have tried several searches to see if this is a resolved issue, but the > latest post I found was from 2011 (link below) and has been unanswered. > > http://itk-users.7.n7.nabble.com/Perimeter-Calculation-via-LabelImageToShapeLabelMapFilter-td14917.html > > Seems like there was a bug report filed that time > (https://itk.org/Bug/view.php?id=11934) whose status still says "assigned". > I appreciate any help. > > Thanks, > Ehsan > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From ehsan.basafa at gmail.com Fri May 13 15:12:13 2016 From: ehsan.basafa at gmail.com (ebasafa) Date: Fri, 13 May 2016 12:12:13 -0700 (MST) Subject: [ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue In-Reply-To: <2D593B3D-C6D6-45EF-93C8-75484575FD49@mail.nih.gov> References: <1463153167301-7588837.post@n2.nabble.com> <2D593B3D-C6D6-45EF-93C8-75484575FD49@mail.nih.gov> Message-ID: <1463166733620-7588839.post@n2.nabble.com> Thank you! The IJ article is really helpful. However, the issue still remains that debug and release give different answers. I do not know what specifics I need to provide. Basically, I have a pipeline that loads a volume from file, thresholds the image into a binary image, and then passes it to BinaryImageToShapeLabelMapFilter to process all the objects found after thresholding. The exact same pipeline, run over the same image volume, prints out different values for perimeter and roundness of the same objects. I should have mentioned that I am working in 3D, and also the values I get for other shape parameters, e.g. flatness, elongation, equivalent ellipsoid radii, volume, etc. are the same for debug and release. My very naive guess is that, possibly, there is some uninitialized parameter being used somewhere in the filter, which results in debug and release initializing it to two different values. Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote > Hello, > > You can find additional information about how this parameter is defined in > the following insight journal: > http://www.insight-journal.org/browse/publication/852 > > This method is generalizable to N-D, so it may not be the most accurate in > 2D. The method can produce roundness numbers that are >1. However is > should be consistent in debug and release modes. Getting consistent > numeric computation with C++ and vectorizable operations can be > challenging with different architectures. > > You did not provide any specifics for the difference in computation > between release and debug modes. > > HTH, > Brad > >> On May 13, 2016, at 11:26 AM, ebasafa < > ehsan.basafa@ > > wrote: >> >> Hi everyone, >> >> Recently I noticed that BinaryImageToShapeLabelMapFilter does not >> calculate >> roundness of objects correctly, and I traced it back to perimeter >> calculation. More curiously, the results I get from the GetRoundness() >> and >> GetPerimeter() methods differ between debug and release builds! And to >> make >> it even more confusing, it's a machine-dependent problem, i.e. on some >> machines debug and release give the same (correct?) numbers and on some >> machines they don't. I suspect that release results are erroneous, since >> some roundness numbers turn out to be >1.0 in release but are always <1.0 >> in >> debug mode. I am working in a Windows 8.1 64-bit environment and am using >> the latest release of ITK (4.9.1) on all different machines. >> >> I have tried several searches to see if this is a resolved issue, but the >> latest post I found was from 2011 (link below) and has been unanswered. >> >> http://itk-users.7.n7.nabble.com/Perimeter-Calculation-via-LabelImageToShapeLabelMapFilter-td14917.html >> >> Seems like there was a bug report filed that time >> (https://itk.org/Bug/view.php?id=11934) whose status still says >> "assigned". >> I appreciate any help. >> >> Thanks, >> Ehsan >> >> >> >> >> -- >> View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837.html >> Sent from the ITK Insight Users mailing list archive at Nabble.com. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> _______________________________________________ >> Community mailing list >> > Community@ >> 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 Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote > Hello, > > You can find additional information about how this parameter is defined in > the following insight journal: > http://www.insight-journal.org/browse/publication/852 > > This method is generalizable to N-D, so it may not be the most accurate in > 2D. The method can produce roundness numbers that are >1. However is > should be consistent in debug and release modes. Getting consistent > numeric computation with C++ and vectorizable operations can be > challenging with different architectures. > > You did not provide any specifics for the difference in computation > between release and debug modes. > > HTH, > Brad > >> On May 13, 2016, at 11:26 AM, ebasafa < > ehsan.basafa@ > > wrote: >> >> Hi everyone, >> >> Recently I noticed that BinaryImageToShapeLabelMapFilter does not >> calculate >> roundness of objects correctly, and I traced it back to perimeter >> calculation. More curiously, the results I get from the GetRoundness() >> and >> GetPerimeter() methods differ between debug and release builds! And to >> make >> it even more confusing, it's a machine-dependent problem, i.e. on some >> machines debug and release give the same (correct?) numbers and on some >> machines they don't. I suspect that release results are erroneous, since >> some roundness numbers turn out to be >1.0 in release but are always <1.0 >> in >> debug mode. I am working in a Windows 8.1 64-bit environment and am using >> the latest release of ITK (4.9.1) on all different machines. >> >> I have tried several searches to see if this is a resolved issue, but the >> latest post I found was from 2011 (link below) and has been unanswered. >> >> http://itk-users.7.n7.nabble.com/Perimeter-Calculation-via-LabelImageToShapeLabelMapFilter-td14917.html >> >> Seems like there was a bug report filed that time >> (https://itk.org/Bug/view.php?id=11934) whose status still says >> "assigned". >> I appreciate any help. >> >> Thanks, >> Ehsan >> >> >> >> >> -- >> View this message in context: >> http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837.html >> Sent from the ITK Insight Users mailing list archive at Nabble.com. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> _______________________________________________ >> Community mailing list >> > Community@ >> 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 -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837p7588839.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From blowekamp at mail.nih.gov Fri May 13 15:39:57 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Fri, 13 May 2016 19:39:57 +0000 Subject: [ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue In-Reply-To: <1463166733620-7588839.post@n2.nabble.com> References: <1463153167301-7588837.post@n2.nabble.com> <2D593B3D-C6D6-45EF-93C8-75484575FD49@mail.nih.gov> <1463166733620-7588839.post@n2.nabble.com> Message-ID: <2841BCB1-D769-4736-B82F-E23CA390494C@mail.nih.gov> Hi, I was initially wondering the magnitude of the difference, but this should not be a problem for this algorithm. Looking at the algorithm a little closer, I see it is computed mostly by counting voxel and intercepts ( not with floating point operations ), so the results should be extremely numerically stable and not subject to accumulation error. It would be good to find a reproducible and shareable case. That is can you share a small image where the problem occours? Hopefully it can be reproduced by just reading it and running BinaryImageToShapLabelMapFilter. Do you know if the release or debug state is correct? To roll out a threading issue, can you set ITK to use only one thread, with the env variable ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1, or itk::MultiThreader::SetGlobalDefaultNumberOfThread(1) and see if the problem persists? If the problem persists with one thread then, add a debug message to this method [1], to print the label ID and number of intercepts for each axis. This should be the same. HTH, Brad [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx#L633 On May 13, 2016, at 3:12 PM, ebasafa > wrote: Thank you! The IJ article is really helpful. However, the issue still remains that debug and release give different answers. I do not know what specifics I need to provide. Basically, I have a pipeline that loads a volume from file, thresholds the image into a binary image, and then passes it to BinaryImageToShapeLabelMapFilter to process all the objects found after thresholding. The exact same pipeline, run over the same image volume, prints out different values for perimeter and roundness of the same objects. I should have mentioned that I am working in 3D, and also the values I get for other shape parameters, e.g. flatness, elongation, equivalent ellipsoid radii, volume, etc. are the same for debug and release. My very naive guess is that, possibly, there is some uninitialized parameter being used somewhere in the filter, which results in debug and release initializing it to two different values. Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote Hello, You can find additional information about how this parameter is defined in the following insight journal: http://www.insight-journal.org/browse/publication/852 This method is generalizable to N-D, so it may not be the most accurate in 2D. The method can produce roundness numbers that are >1. However is should be consistent in debug and release modes. Getting consistent numeric computation with C++ and vectorizable operations can be challenging with different architectures. You did not provide any specifics for the difference in computation between release and debug modes. HTH, Brad On May 13, 2016, at 11:26 AM, ebasafa < ehsan.basafa@ > wrote: Hi everyone, Recently I noticed that BinaryImageToShapeLabelMapFilter does not calculate roundness of objects correctly, and I traced it back to perimeter calculation. More curiously, the results I get from the GetRoundness() and GetPerimeter() methods differ between debug and release builds! And to make it even more confusing, it's a machine-dependent problem, i.e. on some machines debug and release give the same (correct?) numbers and on some machines they don't. I suspect that release results are erroneous, since some roundness numbers turn out to be >1.0 in release but are always <1.0 in debug mode. I am working in a Windows 8.1 64-bit environment and am using the latest release of ITK (4.9.1) on all different machines. I have tried several searches to see if this is a resolved issue, but the latest post I found was from 2011 (link below) and has been unanswered. http://itk-users.7.n7.nabble.com/Perimeter-Calculation-via-LabelImageToShapeLabelMapFilter-td14917.html Seems like there was a bug report filed that time (https://itk.org/Bug/view.php?id=11934) whose status still says "assigned". I appreciate any help. Thanks, Ehsan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community@ 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 Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote Hello, You can find additional information about how this parameter is defined in the following insight journal: http://www.insight-journal.org/browse/publication/852 This method is generalizable to N-D, so it may not be the most accurate in 2D. The method can produce roundness numbers that are >1. However is should be consistent in debug and release modes. Getting consistent numeric computation with C++ and vectorizable operations can be challenging with different architectures. You did not provide any specifics for the difference in computation between release and debug modes. HTH, Brad On May 13, 2016, at 11:26 AM, ebasafa < ehsan.basafa@ > wrote: Hi everyone, Recently I noticed that BinaryImageToShapeLabelMapFilter does not calculate roundness of objects correctly, and I traced it back to perimeter calculation. More curiously, the results I get from the GetRoundness() and GetPerimeter() methods differ between debug and release builds! And to make it even more confusing, it's a machine-dependent problem, i.e. on some machines debug and release give the same (correct?) numbers and on some machines they don't. I suspect that release results are erroneous, since some roundness numbers turn out to be >1.0 in release but are always <1.0 in debug mode. I am working in a Windows 8.1 64-bit environment and am using the latest release of ITK (4.9.1) on all different machines. I have tried several searches to see if this is a resolved issue, but the latest post I found was from 2011 (link below) and has been unanswered. http://itk-users.7.n7.nabble.com/Perimeter-Calculation-via-LabelImageToShapeLabelMapFilter-td14917.html Seems like there was a bug report filed that time (https://itk.org/Bug/view.php?id=11934) whose status still says "assigned". I appreciate any help. Thanks, Ehsan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community@ 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 -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837p7588839.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From ehsan.basafa at gmail.com Fri May 13 17:28:04 2016 From: ehsan.basafa at gmail.com (ebasafa) Date: Fri, 13 May 2016 14:28:04 -0700 (MST) Subject: [ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue In-Reply-To: <2841BCB1-D769-4736-B82F-E23CA390494C@mail.nih.gov> References: <1463153167301-7588837.post@n2.nabble.com> <2D593B3D-C6D6-45EF-93C8-75484575FD49@mail.nih.gov> <1463166733620-7588839.post@n2.nabble.com> <2841BCB1-D769-4736-B82F-E23CA390494C@mail.nih.gov> Message-ID: <1463174884133-7588841.post@n2.nabble.com> Thank you for the pointer! After fiddling with the hxx file for a couple hours, I traced the issue further and found out the method vnl_math_abs() called on line 537 (which seems like in the repository has been replaced by itk::Math::abs() but not implemented in the stable release), provides different answers for absolute values in debug and release. Surprisingly, for example, this method reports -1 as absolute value of -1 in release! Replacing that with std::abs() resolves the issue and now roundness and perimeter are the same and (seemingly) correct. I think a bug fix, if not already done via itk::Math as I mentioned, is in order. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837p7588841.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From dzenanz at gmail.com Fri May 13 19:09:54 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 13 May 2016 19:09:54 -0400 Subject: [ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue In-Reply-To: <1463174884133-7588841.post@n2.nabble.com> References: <1463153167301-7588837.post@n2.nabble.com> <2D593B3D-C6D6-45EF-93C8-75484575FD49@mail.nih.gov> <1463166733620-7588839.post@n2.nabble.com> <2841BCB1-D769-4736-B82F-E23CA390494C@mail.nih.gov> <1463174884133-7588841.post@n2.nabble.com> Message-ID: You have found a bug, great! Now share the patch with the rest of us the world. If you get stuck, please let us know. Thanks, D?enan On Fri, May 13, 2016 at 5:28 PM, ebasafa wrote: > Thank you for the pointer! After fiddling with the hxx file for a couple > hours, I traced the issue further and found out the method vnl_math_abs() > called on line 537 (which seems like in the repository has been replaced by > itk::Math::abs() but not implemented in the stable release), provides > different answers for absolute values in debug and release. Surprisingly, > for example, this method reports -1 as absolute value of -1 in release! > Replacing that with std::abs() resolves the issue and now roundness and > perimeter are the same and (seemingly) correct. I think a bug fix, if not > already done via itk::Math as I mentioned, is in order. > > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837p7588841.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From blowekamp at mail.nih.gov Sat May 14 07:18:55 2016 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sat, 14 May 2016 07:18:55 -0400 Subject: [ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue In-Reply-To: <1463174884133-7588841.post@n2.nabble.com> References: <1463153167301-7588837.post@n2.nabble.com> <2D593B3D-C6D6-45EF-93C8-75484575FD49@mail.nih.gov> <1463166733620-7588839.post@n2.nabble.com> <2841BCB1-D769-4736-B82F-E23CA390494C@mail.nih.gov> <1463174884133-7588841.post@n2.nabble.com> Message-ID: <4667DA58-5F4B-4C4F-B1E6-C907A432DCAC@mail.nih.gov> Hello, Great work tracking the issue down! Does updating to the 4.10rc1 fix your problem? Brad > On May 13, 2016, at 5:28 PM, ebasafa wrote: > > Thank you for the pointer! After fiddling with the hxx file for a couple > hours, I traced the issue further and found out the method vnl_math_abs() > called on line 537 (which seems like in the repository has been replaced by > itk::Math::abs() but not implemented in the stable release), provides > different answers for absolute values in debug and release. Surprisingly, > for example, this method reports -1 as absolute value of -1 in release! > Replacing that with std::abs() resolves the issue and now roundness and > perimeter are the same and (seemingly) correct. I think a bug fix, if not > already done via itk::Math as I mentioned, is in order. > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837p7588841.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matimontg at gmail.com Sat May 14 19:42:44 2016 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 14 May 2016 23:42:44 +0000 Subject: [ITK] [ITK-users] SetOutputOrigin(origin) not working on writer Message-ID: Hi, I have the following code to flip an image and preserve origin and spacing. For some reason, the writer doesn't copy the Origin from the original image into the output Image. I can see the Output Image origin is the Original Image origin but I don't understand why the writer doesn't take that value. I have no issues with the spacing, that one is copied just fine into the output image. I'm using ITK 4.7.2 #include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "itkFlipImageFilter.h" #include "itkChangeInformationImageFilter.h" int main(int argc, char* argv[]) { if (argc != 4) { std::cerr << "Usage: " << argv[0]; std::cerr << " "; std::cerr << std::endl; return EXIT_FAILURE; } typedef itk::Image ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(argv[1]); ImageType::Pointer inputImage = reader->GetOutput(); inputImage->Update(); //Importante!! Sin esto no agarra el origen ImageType::PointType origin = inputImage->GetOrigin(); ImageType::SpacingType spacing = inputImage->GetSpacing(); typedef itk::FlipImageFilter< ImageType > FlipImageFilterType; FlipImageFilterType::Pointer flipFilter = FlipImageFilterType::New(); typedef itk::ChangeInformationImageFilter< ImageType > FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetInput(reader->GetOutput()); filter->SetOutputOrigin(origin); filter->ChangeOriginOn(); filter->SetOutputSpacing(spacing); filter->ChangeSpacingOn(); flipFilter->SetInput(filter->GetOutput()); flipFilter->Update(); FlipImageFilterType::FlipAxesArrayType flipAxes; if (atoi(argv[3]) == 0) { flipAxes[0] = true; flipAxes[1] = false; } else { flipAxes[0] = false; flipAxes[1] = true; } flipFilter->SetFlipAxes(flipAxes); typedef itk::ImageFileWriter< ImageType > WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName(argv[2]); writer->SetInput(flipFilter->GetOutput()); try { writer->Update(); std::cout << "Input origin is: " << reader->GetOutput()->GetOrigin() << std::endl; std::cout << "Output origin is: " << flipFilter->GetOutput()->GetOrigin() << std::endl; } catch (itk::ExceptionObject & error) { std::cerr << "Error: " << error << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; } -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From b12011130 at njupt.edu.cn Sun May 15 07:27:12 2016 From: b12011130 at njupt.edu.cn (=?GBK?B?uN/A1g==?=) Date: Sun, 15 May 2016 19:27:12 +0800 (GMT+08:00) Subject: [ITK] CenteredRigid2DTransform Message-ID: <5ab54193.16298.154b42b889a.Coremail.b12011130@njupt.edu.cn> Hello! I am using ITK for image registration now, and I build the source code ImageRegistration5.cxx in ~/InsightToolkit-4.9.0/Examples/RegistrationITKv4. And in this code, it uses CenteredRigid2DTransform, but I found is that I got a image that was scaled, I don't know why. So, is the CenteredRigid2DTransform includes SCALE parameters? -- Gao le School?Nanjing University of Posts and Telecommunications Major?Biomedical Engineering Tel?18362972078 Email?B12011130 at njupt.edu.cn -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans-johnson at uiowa.edu Sun May 15 09:24:30 2016 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Sun, 15 May 2016 13:24:30 +0000 Subject: [ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue In-Reply-To: <4667DA58-5F4B-4C4F-B1E6-C907A432DCAC@mail.nih.gov> References: <1463153167301-7588837.post@n2.nabble.com> <2D593B3D-C6D6-45EF-93C8-75484575FD49@mail.nih.gov> <1463166733620-7588839.post@n2.nabble.com> <2841BCB1-D769-4736-B82F-E23CA390494C@mail.nih.gov> <1463174884133-7588841.post@n2.nabble.com> <4667DA58-5F4B-4C4F-B1E6-C907A432DCAC@mail.nih.gov> Message-ID: <90B961A4-E84E-4BD5-97CD-21A33E9770B7@uiowa.edu> Ebasafa Can you please modify one of the tests in ?ITK/Modules/Filtering/LabelMap/test? to expose the bug that you are encountering? If you can extend one of these tests so that the test demonstrates the failure (i.e. starts reporting failures to the dashboard), you will gain support of many of the community in fixing the problem in the most robust way. Thanks, Hans -- On 5/14/16, 6:18 AM, "Insight-users on behalf of Bradley Lowekamp" wrote: >Hello, > >Great work tracking the issue down! > >Does updating to the 4.10rc1 fix your problem? > >Brad >> On May 13, 2016, at 5:28 PM, ebasafa wrote: >> >> Thank you for the pointer! After fiddling with the hxx file for a couple >> hours, I traced the issue further and found out the method vnl_math_abs() >> called on line 537 (which seems like in the repository has been replaced by >> itk::Math::abs() but not implemented in the stable release), provides >> different answers for absolute values in debug and release. Surprisingly, >> for example, this method reports -1 as absolute value of -1 in release! >> Replacing that with std::abs() resolves the issue and now roundness and >> perimeter are the same and (seemingly) correct. I think a bug fix, if not >> already done via itk::Math as I mentioned, is in order. >> >> >> >> >> -- >> View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837p7588841.html >> Sent from the ITK Insight Users mailing list archive at Nabble.com. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >_____________________________________ >Powered by www.kitware.com > >Visit other Kitware open-source projects at >http://www.kitware.com/opensource/opensource.html > >Kitware offers ITK Training Courses, for more information visit: >http://www.kitware.com/products/protraining.php > >Please keep messages on-topic and check the 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 hans-johnson at uiowa.edu Sun May 15 09:15:10 2016 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Sun, 15 May 2016 13:15:10 +0000 Subject: [ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue In-Reply-To: <4667DA58-5F4B-4C4F-B1E6-C907A432DCAC@mail.nih.gov> References: <1463153167301-7588837.post@n2.nabble.com> <2D593B3D-C6D6-45EF-93C8-75484575FD49@mail.nih.gov> <1463166733620-7588839.post@n2.nabble.com> <2841BCB1-D769-4736-B82F-E23CA390494C@mail.nih.gov> <1463174884133-7588841.post@n2.nabble.com> <4667DA58-5F4B-4C4F-B1E6-C907A432DCAC@mail.nih.gov> Message-ID: <6D4C82AF-0CF6-458C-97E9-C2710D5DD223@uiowa.edu> ehsan.basafa at gmail.com Could you please provide a new details about the compiler settings that caused problems. It is great that a solution was found, but I would like to understand the root cause of this problem. Were you building with C++11 or C++98 compliance? GCC or clang or windows? What version of ITK are you using? (i.e. what is the git hash? Thank you, Hans -- On 5/14/16, 6:18 AM, "Insight-users on behalf of Bradley Lowekamp" wrote: >Hello, > >Great work tracking the issue down! > >Does updating to the 4.10rc1 fix your problem? > >Brad >> On May 13, 2016, at 5:28 PM, ebasafa wrote: >> >> Thank you for the pointer! After fiddling with the hxx file for a couple >> hours, I traced the issue further and found out the method vnl_math_abs() >> called on line 537 (which seems like in the repository has been replaced by >> itk::Math::abs() but not implemented in the stable release), provides >> different answers for absolute values in debug and release. Surprisingly, >> for example, this method reports -1 as absolute value of -1 in release! >> Replacing that with std::abs() resolves the issue and now roundness and >> perimeter are the same and (seemingly) correct. I think a bug fix, if not >> already done via itk::Math as I mentioned, is in order. >> >> >> >> >> -- >> View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837p7588841.html >> Sent from the ITK Insight Users mailing list archive at Nabble.com. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >_____________________________________ >Powered by www.kitware.com > >Visit other Kitware open-source projects at >http://www.kitware.com/opensource/opensource.html > >Kitware offers ITK Training Courses, for more information visit: >http://www.kitware.com/products/protraining.php > >Please keep messages on-topic and check the 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 javij1 at gmail.com Sun May 15 10:41:10 2016 From: javij1 at gmail.com (=?UTF-8?Q?Javier_Juan_Albarrac=c3=adn?=) Date: Sun, 15 May 2016 16:41:10 +0200 Subject: [ITK] [ITK-users] Check if an image is 2D or 3D Message-ID: <5a59bd00-2c47-d2f2-4896-579eb3a0c88c@gmail.com> Hello, I have an algorithm than can only be applied to 3D volumes, not 2D images. I plann to implement the function as: bool Algorithm::run(ImagePointer image) Is there any form to know through the ImageType or ImagePointer whether is a 3D or a 2D volume?? Or should I change the header of the function to something like: bool Algorithmrun(ImagePointer image) With this function header I have direct access to the image dimension, but in the other header, there is no form to know the image dimension through the typedef ImageType?? Thank you _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From bill.lorensen at gmail.com Sun May 15 11:45:37 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 15 May 2016 11:45:37 -0400 Subject: [ITK] [ITK-users] SetOutputOrigin(origin) not working on writer In-Reply-To: References: Message-ID: After reader->SetFileName(argv[1]); reader->Update(); No need for inputImage->Update(); Since you did not Update the reader, the origin and spacing will be (0,0,0) and(1,1,1) by defulat. On Sat, May 14, 2016 at 7:42 PM, Matias Montroull wrote: > Hi, > > I have the following code to flip an image and preserve origin and spacing. > For some reason, the writer doesn't copy the Origin from the original image > into the output Image. > > I can see the Output Image origin is the Original Image origin but I don't > understand why the writer doesn't take that value. I have no issues with the > spacing, that one is copied just fine into the output image. > > I'm using ITK 4.7.2 > > #include "itkImage.h" > #include "itkImageFileReader.h" > #include "itkImageFileWriter.h" > #include "itkFlipImageFilter.h" > #include "itkChangeInformationImageFilter.h" > > int main(int argc, char* argv[]) > { > if (argc != 4) > { > std::cerr << "Usage: " << argv[0]; > std::cerr << " "; > std::cerr << std::endl; > return EXIT_FAILURE; > } > > typedef itk::Image ImageType; > > typedef itk::ImageFileReader< ImageType > ReaderType; > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileName(argv[1]); > > ImageType::Pointer inputImage = reader->GetOutput(); > inputImage->Update(); //Importante!! Sin esto no agarra el origen > > ImageType::PointType origin = inputImage->GetOrigin(); > ImageType::SpacingType spacing = inputImage->GetSpacing(); > > typedef itk::FlipImageFilter< ImageType > FlipImageFilterType; > FlipImageFilterType::Pointer flipFilter = FlipImageFilterType::New(); > > typedef itk::ChangeInformationImageFilter< ImageType > FilterType; > FilterType::Pointer filter = FilterType::New(); > filter->SetInput(reader->GetOutput()); > > filter->SetOutputOrigin(origin); > filter->ChangeOriginOn(); > filter->SetOutputSpacing(spacing); > filter->ChangeSpacingOn(); > > flipFilter->SetInput(filter->GetOutput()); > flipFilter->Update(); > > FlipImageFilterType::FlipAxesArrayType flipAxes; > if (atoi(argv[3]) == 0) > { > flipAxes[0] = true; > flipAxes[1] = false; > } > else > { > flipAxes[0] = false; > flipAxes[1] = true; > } > > flipFilter->SetFlipAxes(flipAxes); > typedef itk::ImageFileWriter< ImageType > WriterType; > WriterType::Pointer writer = WriterType::New(); > writer->SetFileName(argv[2]); > writer->SetInput(flipFilter->GetOutput()); > try > { > writer->Update(); > std::cout << "Input origin is: " << reader->GetOutput()->GetOrigin() << > std::endl; > std::cout << "Output origin is: " << flipFilter->GetOutput()->GetOrigin() << > std::endl; > } > catch (itk::ExceptionObject & error) > { > std::cerr << "Error: " << error << std::endl; > return EXIT_FAILURE; > } > > return EXIT_SUCCESS; > } > > -- > Matias > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -- Unpaid intern in BillsBasement at noware dot com _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From dzenanz at gmail.com Sun May 15 12:13:00 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Sun, 15 May 2016 12:13:00 -0400 Subject: [ITK] [ITK-users] Check if an image is 2D or 3D In-Reply-To: <5a59bd00-2c47-d2f2-4896-579eb3a0c88c@gmail.com> References: <5a59bd00-2c47-d2f2-4896-579eb3a0c88c@gmail.com> Message-ID: Hi Javier, you can also access image dimension with the other signature too, like this: ImageType::ImageDimension Regards, D?enan On Sun, May 15, 2016 at 10:41 AM, Javier Juan Albarrac?n wrote: > > Hello, I have an algorithm than can only be applied to 3D volumes, not 2D > images. > > I plann to implement the function as: > > bool Algorithm::run(ImagePointer image) > > Is there any form to know through the ImageType or ImagePointer whether is > a 3D or a 2D volume?? Or should I change the header of the function to > something like: > > bool Algorithmrun(ImagePointer image) > > With this function header I have direct access to the image dimension, but > in the other header, there is no form to know the image dimension through > the typedef ImageType?? > > Thank you > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From blowekamp at mail.nih.gov Mon May 16 09:59:48 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Mon, 16 May 2016 13:59:48 +0000 Subject: [ITK] [ITK-dev] SimpleITK update to ITK 4.10rc1 and VNL issues Message-ID: <1CB7DF80-F3A1-41BF-8E3D-6E1B90F3D5B3@mail.nih.gov> Hans, I update SimpleITK next to use ITK 4.10rc1 and I am getting some CMake errors on the dashboard [1]: Target "itkvcl" INTERFACE_INCLUDE_DIRECTORIES property contains relative path: "include/ITK-4.10" Do you know if this is addressed in upstream VXL? Does it look familiar? Or should I take a dive into the issue? Thanks, Brad [1] https://open.cdash.org/viewBuildError.php?buildid=4367313 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From axel.largent at hotmail.fr Mon May 16 10:56:02 2016 From: axel.largent at hotmail.fr (Axel Largent) Date: Mon, 16 May 2016 16:56:02 +0200 Subject: [ITK] ConstNeighborhoodIterator random access with a image buffer Message-ID: Hello everyone, I would like to move a constNeighborhoodIterator (inside a reference image) with a random access. I used the method setLocation but it's very time consuming. I look for something which could help to move this iterator thanks to a pointer on the reference image buffer or something more efficient that setLocation. I saw this attribut inside the class m_nNeighborhoodAccessorFunctor.SetBegin() but it's protected. Is someone have an idea to do that ? Best regards -- Axel LARGENT Mobile : +33 (0)6 58 20 37 83 fr.linkedin.com/pub/axel-largent/34/250/b94/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From scorpiuni at gmail.com Mon May 16 11:30:35 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 16 May 2016 08:30:35 -0700 (MST) Subject: [ITK] [ITK-users] Geodesic Active Contour Error: Inputs do not occupy the same physical space! Message-ID: <1463412635700-7588851.post@n2.nabble.com> Hi, I have an error which I can't find a solution for (or even the origin of it): I have a 3D Volume, which I preprocess with several filters: smoothing->SetInput( reader->GetOutput() ); gradientMagnitude->SetInput( smoothing->GetOutput() ); sigmoid->SetInput( gradientMagnitude->GetOutput() ); std::cout << "-------After sigmoid IMPORTANT--------"<< std::endl; const InternalImageType::PointType & origin2 = sigmoid->GetOutput()->GetOrigin(); std::cout << "Origin = "; std::cout << origin2[0] << ", " << origin2[1] << ", " << origin2[2] << std::endl; The Origin Output here is 0,0,0 as expected. Now I do this: geodesicActiveContour->SetInput( fastMarching->GetOutput() ); std::cout << "-------After fastmarching -> GetOutput() IMPORTANT--------"<< std::endl; const InternalImageType::PointType & origin3 = fastMarching->GetOutput()->GetOrigin(); std::cout << "Origin = "; std::cout << origin3[0] << ", " << origin3[1] << ", " << origin3[2] << std::endl; //Output still is 0 0 0 float ori[3] = {0, 0, 0}; sigmoid->GetOutput()->SetOrigin(ori); geodesicActiveContour->SetFeatureImage( sigmoid->GetOutput() ); const InternalImageType::PointType & originx = sigmoid->GetOutput()->GetOrigin(); std::cout << "Origin Important= "; std::cout << originx[0] << ", " << originx[1] << ", " << originx[2] << std::endl; Again, here, the cout for the origin says 0,0,0, which should be correct, and work with the filter. Now when I execute the whole thing, this pops up: Exception caught ! itk::ExceptionObject (0xfb0a10) Location: "void itk::ImageToImageFilter::VerifyInputInformation() [with TInputImage = itk::Image; TOutputImage = itk::Image]" File: /usr/local/include/ITK-4.9/itkImageToImageFilter.hxx Line: 250 Description: itk::ERROR: GeodesicActiveContourLevelSetImageFilter(0xf87d40): Inputs do not occupy the same physical space! InputImage Origin: [0.0000000e+00, 0.0000000e+00, 0.0000000e+00], InputImage_1 Origin: [7.2991424e+00, 1.0553263e+01, -7.8717673e+00] Tolerance: 1.0000000e-06 InputImage Spacing: [1.0000000e+00, 1.0000000e+00, 1.0000000e+00], InputImage_1 Spacing: [1.6000000e-01, 1.6000000e-01, 1.5999985e-01] Tolerance: 1.0000000e-06 InputImage Direction: 1.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 , InputImage_1 Direction: -1.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 -1.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 Tolerance: 1.0000000e-06 No matter what I set the origin to (called ori in the above code), this output stays the same. InputImage_1 should be my sigmoid Image, however, right? Why does the spacing, origin, etc change here? Any help is appreciated! Robert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Active-Contour-Error-Inputs-do-not-occupy-the-same-physical-space-tp7588851.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Mon May 16 11:38:54 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 16 May 2016 11:38:54 -0400 Subject: [ITK] [ITK-dev] SimpleITK update to ITK 4.10rc1 and VNL issues In-Reply-To: <1CB7DF80-F3A1-41BF-8E3D-6E1B90F3D5B3@mail.nih.gov> References: <1CB7DF80-F3A1-41BF-8E3D-6E1B90F3D5B3@mail.nih.gov> Message-ID: Hi Brad, Thanks for testing the RC! It looks like that system is running CMake 2.8.11.2. This issue was addressed in upstream VXL here: https://github.com/vxl/vxl/commit/d7d6314fb9846b923a5e90e8f7f65b3ab28bfc8e for CMake 2.8.11, but it is evidently still present for CMake 2.8.11.2. Here is a patch: https://github.com/vxl/vxl/pull/296 I am looking at addressing some of the VNL warnings on the ITK dashboard -- we will do a VXL Git subtree update soon. Thanks, Matt On Mon, May 16, 2016 at 9:59 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: > Hans, > > I update SimpleITK next to use ITK 4.10rc1 and I am getting some CMake > errors on the dashboard [1]: > > Target "itkvcl" INTERFACE_INCLUDE_DIRECTORIES property contains relative > path: > > "include/ITK-4.10" > > > Do you know if this is addressed in upstream VXL? Does it look familiar? Or > should I take a dive into the issue? > > Thanks, > Brad > > [1] https://open.cdash.org/viewBuildError.php?buildid=4367313 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From matt.mccormick at kitware.com Mon May 16 11:43:47 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 16 May 2016 11:43:47 -0400 Subject: [ITK] [ITK-users] Geodesic Active Contour Error: Inputs do not occupy the same physical space! In-Reply-To: <1463412635700-7588851.post@n2.nabble.com> References: <1463412635700-7588851.post@n2.nabble.com> Message-ID: Hi Robert, Has ->Update() been called on all filters before checking their output Origin's? If the origin is checked before the image has been populated, it might not be the correct value. HTH, Matt On Mon, May 16, 2016 at 11:30 AM, Robert wrote: > Hi, > I have an error which I can't find a solution for (or even the origin of > it): > > I have a 3D Volume, which I preprocess with several filters: > > smoothing->SetInput( reader->GetOutput() ); > > gradientMagnitude->SetInput( smoothing->GetOutput() ); > > sigmoid->SetInput( gradientMagnitude->GetOutput() ); > > std::cout << "-------After sigmoid IMPORTANT--------"<< std::endl; > const InternalImageType::PointType & origin2 = > sigmoid->GetOutput()->GetOrigin(); > std::cout << "Origin = "; > std::cout << origin2[0] << ", " > << origin2[1] << ", " > << origin2[2] << std::endl; > > The Origin Output here is 0,0,0 as expected. > Now I do this: > > geodesicActiveContour->SetInput( fastMarching->GetOutput() ); > > > std::cout << "-------After fastmarching -> GetOutput() > IMPORTANT--------"<< std::endl; > const InternalImageType::PointType & origin3 = > fastMarching->GetOutput()->GetOrigin(); > std::cout << "Origin = "; > std::cout << origin3[0] << ", " > << origin3[1] << ", " > << origin3[2] << std::endl; > > //Output still is 0 0 0 > > float ori[3] = {0, 0, 0}; > sigmoid->GetOutput()->SetOrigin(ori); > geodesicActiveContour->SetFeatureImage( sigmoid->GetOutput() ); > const InternalImageType::PointType & originx = > sigmoid->GetOutput()->GetOrigin(); > std::cout << "Origin Important= "; > std::cout << originx[0] << ", " > << originx[1] << ", " > << originx[2] << std::endl; > > Again, here, the cout for the origin says 0,0,0, which should be correct, > and work with the filter. > Now when I execute the whole thing, this pops up: > > Exception caught ! > > itk::ExceptionObject (0xfb0a10) > Location: "void itk::ImageToImageFilter TOutputImage>::VerifyInputInformation() [with TInputImage = > itk::Image; TOutputImage = itk::Image]" > File: /usr/local/include/ITK-4.9/itkImageToImageFilter.hxx > Line: 250 > Description: itk::ERROR: GeodesicActiveContourLevelSetImageFilter(0xf87d40): > Inputs do not occupy the same physical space! > InputImage Origin: [0.0000000e+00, 0.0000000e+00, 0.0000000e+00], > InputImage_1 Origin: [7.2991424e+00, 1.0553263e+01, -7.8717673e+00] > Tolerance: 1.0000000e-06 > InputImage Spacing: [1.0000000e+00, 1.0000000e+00, 1.0000000e+00], > InputImage_1 Spacing: [1.6000000e-01, 1.6000000e-01, 1.5999985e-01] > Tolerance: 1.0000000e-06 > InputImage Direction: 1.0000000e+00 0.0000000e+00 0.0000000e+00 > 0.0000000e+00 1.0000000e+00 0.0000000e+00 > 0.0000000e+00 0.0000000e+00 1.0000000e+00 > , InputImage_1 Direction: -1.0000000e+00 0.0000000e+00 0.0000000e+00 > 0.0000000e+00 -1.0000000e+00 0.0000000e+00 > 0.0000000e+00 0.0000000e+00 1.0000000e+00 > > Tolerance: 1.0000000e-06 > > No matter what I set the origin to (called ori in the above code), this > output stays the same. > > InputImage_1 should be my sigmoid Image, however, right? Why does the > spacing, origin, etc change here? > Any help is appreciated! > > Robert > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Active-Contour-Error-Inputs-do-not-occupy-the-same-physical-space-tp7588851.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From basafa at clearguidemedical.com Mon May 16 12:13:15 2016 From: basafa at clearguidemedical.com (ebasafa) Date: Mon, 16 May 2016 09:13:15 -0700 (MST) Subject: [ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue In-Reply-To: <90B961A4-E84E-4BD5-97CD-21A33E9770B7@uiowa.edu> References: <1463153167301-7588837.post@n2.nabble.com> <2D593B3D-C6D6-45EF-93C8-75484575FD49@mail.nih.gov> <1463166733620-7588839.post@n2.nabble.com> <2841BCB1-D769-4736-B82F-E23CA390494C@mail.nih.gov> <1463174884133-7588841.post@n2.nabble.com> <4667DA58-5F4B-4C4F-B1E6-C907A432DCAC@mail.nih.gov> <90B961A4-E84E-4BD5-97CD-21A33E9770B7@uiowa.edu> Message-ID: <1463415195648-7588854.post@n2.nabble.com> So I downloaded and built the latest repository snapshot (https://github.com/InsightSoftwareConsortium/ITK) and it doesn't have that issue anymore. As far as I can see, all instances of vnl_math have been replaced by std or itk::Math methods. So I assume the next release will not have this issue, correct? More details about the compiler and versions: Windows (Visual Studio 2015 Express Desktop); I was using the latest ITK release (4.9.1) as I had mentioned. I will try to come up with a modified test that exposes this issue. So far I have only been a user of ITK, so please excuse the sluggishness. Best, Ehsan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837p7588854.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 16 12:54:22 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 16 May 2016 09:54:22 -0700 (MST) Subject: [ITK] [ITK-users] Geodesic Active Contour Error: Inputs do not occupy the same physical space! In-Reply-To: References: <1463412635700-7588851.post@n2.nabble.com> Message-ID: <1463417662617-7588855.post@n2.nabble.com> Hello, Yes, the Update was actually part of the problem, why could I forget this... However, now I have this result: Code: fastMarching->GetOutput()->SetOrigin(sigmoid->GetOutput()->GetOrigin()); fastMarching->GetOutput()->SetSpacing(sigmoid->GetOutput()->GetSpacing()); fastMarching->GetOutput()->SetDirection(sigmoid->GetOutput()->GetDirection()); fastMarching->GetOutput()->Update(); geodesicActiveContour->SetInput( fastMarching->GetOutput() ); // geodesicActiveContour->SetInput( fastMarching->GetOutput() ); // geodesicActiveContour->Print( std::cout ); std::cout << "-------After geodesicActiveContour fastmarching -> GetOutput() IMPORTANT--------"<< std::endl; const InternalImageType::PointType & origin3 = fastMarching->GetOutput()->GetOrigin(); std::cout << "Origin FastMarching = "; std::cout << origin3[0] << ", " << origin3[1] << ", " << origin3[2] << std::endl; InternalImageType::SpacingType spacing = fastMarching->GetOutput()->GetSpacing(); std::cout << "spacing FastMarching = "; std::cout << spacing[0] << ", " << spacing[1] << ", " << spacing[2] << std::endl; const InternalImageType::DirectionType& direction = fastMarching->GetOutput()->GetDirection(); std::cout << "Direction fast marching = " << std::endl; std::cout << direction << std::endl; // float ori[3] = {7, 7, 7}; // sigmoid->GetOutput()->SetOrigin(ori); geodesicActiveContour->SetFeatureImage( sigmoid->GetOutput() ); // sigmoid->GetOutput()->Set fastMarching->GetOutput()->Update(); const InternalImageType::PointType & originx = sigmoid->GetOutput()->GetOrigin(); std::cout << "Origin Sigmoid= "; std::cout << originx[0] << ", " << originx[1] << ", " << originx[2] << std::endl; InternalImageType::SpacingType spacing1 = sigmoid->GetOutput()->GetSpacing(); std::cout << "spacing Sigmoid = "; std::cout << spacing1[0] << ", " << spacing1[1] << ", " << spacing1[2] << std::endl; const InternalImageType::DirectionType& direction1 = sigmoid->GetOutput()->GetDirection(); std::cout << "Direction Sigmoid = " << std::endl; std::cout << direction1 << std::endl; // geodesicActiveContour->SetFeatureImage( sigmoid->GetOutput() ); // geodesicActiveContour->Print( std::cout ); Console Output: Origin FastMarching = 7.29914, 10.5533, -7.87177 spacing FastMarching = 0.16, 0.16, 0.16 Direction fast marching = -1 0 0 0 -1 0 0 0 1 Origin Sigmoid= 7.29914, 10.5533, -7.87177 spacing Sigmoid = 0.16, 0.16, 0.16 Direction Sigmoid = -1 0 0 0 -1 0 0 0 1 -------After thresholder-------- Origin Thresholder = 7.29914, 10.5533, -7.87177 Exception caught ! itk::ExceptionObject (0x125d5f0) Location: "void itk::ImageToImageFilter::VerifyInputInformation() [with TInputImage = itk::Image; TOutputImage = itk::Image]" File: /usr/local/include/ITK-4.9/itkImageToImageFilter.hxx Line: 250 Description: itk::ERROR: GeodesicActiveContourLevelSetImageFilter(0x1256d40): Inputs do not occupy the same physical space! InputImage Origin: [0.0000000e+00, 0.0000000e+00, 0.0000000e+00], InputImage_1 Origin: [7.2991424e+00, 1.0553263e+01, -7.8717673e+00] Tolerance: 1.0000000e-06 InputImage Spacing: [1.0000000e+00, 1.0000000e+00, 1.0000000e+00], InputImage_1 Spacing: [1.6000000e-01, 1.6000000e-01, 1.5999985e-01] Tolerance: 1.0000000e-06 InputImage Direction: 1.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 , InputImage_1 Direction: -1.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 -1.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 Tolerance: 1.0000000e-06 So the error is still the same as before, even with my 2 filters updated/having the same output now.... Is there another Update() that I missed? I mean, it should now get 2 times the same values, right? -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Active-Contour-Error-Inputs-do-not-occupy-the-same-physical-space-tp7588851p7588855.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From bill.lorensen at gmail.com Mon May 16 13:00:56 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 16 May 2016 13:00:56 -0400 Subject: [ITK] [ITK-users] Geodesic Active Contour Error: Inputs do not occupy the same physical space! In-Reply-To: <1463417662617-7588855.post@n2.nabble.com> References: <1463412635700-7588851.post@n2.nabble.com> <1463417662617-7588855.post@n2.nabble.com> Message-ID: Run updates on your filters, not your images. On Mon, May 16, 2016 at 12:54 PM, Robert wrote: > Hello, > Yes, the Update was actually part of the problem, why could I forget this... > However, now I have this result: > Code: > fastMarching->GetOutput()->SetOrigin(sigmoid->GetOutput()->GetOrigin()); > fastMarching->GetOutput()->SetSpacing(sigmoid->GetOutput()->GetSpacing()); > > fastMarching->GetOutput()->SetDirection(sigmoid->GetOutput()->GetDirection()); > fastMarching->GetOutput()->Update(); > geodesicActiveContour->SetInput( fastMarching->GetOutput() ); > // geodesicActiveContour->SetInput( fastMarching->GetOutput() ); > // geodesicActiveContour->Print( std::cout ); > > > std::cout << "-------After geodesicActiveContour fastmarching -> > GetOutput() IMPORTANT--------"<< std::endl; > const InternalImageType::PointType & origin3 = > fastMarching->GetOutput()->GetOrigin(); > std::cout << "Origin FastMarching = "; > std::cout << origin3[0] << ", " > << origin3[1] << ", " > << origin3[2] << std::endl; > InternalImageType::SpacingType spacing = > fastMarching->GetOutput()->GetSpacing(); > std::cout << "spacing FastMarching = "; > std::cout << spacing[0] << ", " > << spacing[1] << ", " > << spacing[2] << std::endl; > const InternalImageType::DirectionType& direction = > fastMarching->GetOutput()->GetDirection(); > std::cout << "Direction fast marching = " << std::endl; > std::cout << direction << std::endl; > > > > // float ori[3] = {7, 7, 7}; > // sigmoid->GetOutput()->SetOrigin(ori); > geodesicActiveContour->SetFeatureImage( sigmoid->GetOutput() ); > // sigmoid->GetOutput()->Set > fastMarching->GetOutput()->Update(); > const InternalImageType::PointType & originx = > sigmoid->GetOutput()->GetOrigin(); > std::cout << "Origin Sigmoid= "; > std::cout << originx[0] << ", " > << originx[1] << ", " > << originx[2] << std::endl; > InternalImageType::SpacingType spacing1 = > sigmoid->GetOutput()->GetSpacing(); > std::cout << "spacing Sigmoid = "; > std::cout << spacing1[0] << ", " > << spacing1[1] << ", " > << spacing1[2] << std::endl; > const InternalImageType::DirectionType& direction1 = > sigmoid->GetOutput()->GetDirection(); > std::cout << "Direction Sigmoid = " << std::endl; > std::cout << direction1 << std::endl; > // geodesicActiveContour->SetFeatureImage( sigmoid->GetOutput() ); > // geodesicActiveContour->Print( std::cout ); > > Console Output: > > Origin FastMarching = 7.29914, 10.5533, -7.87177 > spacing FastMarching = 0.16, 0.16, 0.16 > Direction fast marching = > -1 0 0 > 0 -1 0 > 0 0 1 > > Origin Sigmoid= 7.29914, 10.5533, -7.87177 > spacing Sigmoid = 0.16, 0.16, 0.16 > Direction Sigmoid = > -1 0 0 > 0 -1 0 > 0 0 1 > > -------After thresholder-------- > Origin Thresholder = 7.29914, 10.5533, -7.87177 > Exception caught ! > > itk::ExceptionObject (0x125d5f0) > Location: "void itk::ImageToImageFilter TOutputImage>::VerifyInputInformation() [with TInputImage = > itk::Image; TOutputImage = itk::Image]" > File: /usr/local/include/ITK-4.9/itkImageToImageFilter.hxx > Line: 250 > Description: itk::ERROR: > GeodesicActiveContourLevelSetImageFilter(0x1256d40): Inputs do not occupy > the same physical space! > InputImage Origin: [0.0000000e+00, 0.0000000e+00, 0.0000000e+00], > InputImage_1 Origin: [7.2991424e+00, 1.0553263e+01, -7.8717673e+00] > Tolerance: 1.0000000e-06 > InputImage Spacing: [1.0000000e+00, 1.0000000e+00, 1.0000000e+00], > InputImage_1 Spacing: [1.6000000e-01, 1.6000000e-01, 1.5999985e-01] > Tolerance: 1.0000000e-06 > InputImage Direction: 1.0000000e+00 0.0000000e+00 0.0000000e+00 > 0.0000000e+00 1.0000000e+00 0.0000000e+00 > 0.0000000e+00 0.0000000e+00 1.0000000e+00 > , InputImage_1 Direction: -1.0000000e+00 0.0000000e+00 0.0000000e+00 > 0.0000000e+00 -1.0000000e+00 0.0000000e+00 > 0.0000000e+00 0.0000000e+00 1.0000000e+00 > > Tolerance: 1.0000000e-06 > > So the error is still the same as before, even with my 2 filters > updated/having the same output now.... Is there another Update() that I > missed? I mean, it should now get 2 times the same values, right? > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Active-Contour-Error-Inputs-do-not-occupy-the-same-physical-space-tp7588851p7588855.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -- Unpaid intern in BillsBasement at noware dot com _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK 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 Mon May 16 13:02:21 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 16 May 2016 13:02:21 -0400 Subject: [ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue In-Reply-To: <1463415195648-7588854.post@n2.nabble.com> References: <1463153167301-7588837.post@n2.nabble.com> <2D593B3D-C6D6-45EF-93C8-75484575FD49@mail.nih.gov> <1463166733620-7588839.post@n2.nabble.com> <2841BCB1-D769-4736-B82F-E23CA390494C@mail.nih.gov> <1463174884133-7588841.post@n2.nabble.com> <4667DA58-5F4B-4C4F-B1E6-C907A432DCAC@mail.nih.gov> <90B961A4-E84E-4BD5-97CD-21A33E9770B7@uiowa.edu> <1463415195648-7588854.post@n2.nabble.com> Message-ID: Hi Ehsan, master version always has more bugs fixed and a few extra features than the latest release. It is always best to check if a problem has been fixed in master branch before going through creation of a minimum working example to reproduce some problem. Poke around to see if the issue was properly fixed in master, and then report your findings. Regards, D?enan On Mon, May 16, 2016 at 12:13 PM, ebasafa wrote: > So I downloaded and built the latest repository snapshot > (https://github.com/InsightSoftwareConsortium/ITK) and it doesn't have > that > issue anymore. As far as I can see, all instances of vnl_math have been > replaced by std or itk::Math methods. So I assume the next release will not > have this issue, correct? > > More details about the compiler and versions: Windows (Visual Studio 2015 > Express Desktop); I was using the latest ITK release (4.9.1) as I had > mentioned. > > I will try to come up with a modified test that exposes this issue. So far > I > have only been a user of ITK, so please excuse the sluggishness. > > Best, > Ehsan > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837p7588854.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 16 13:49:56 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 16 May 2016 10:49:56 -0700 (MST) Subject: [ITK] [ITK-users] Geodesic Active Contour Error: Inputs do not occupy the same physical space! In-Reply-To: References: <1463412635700-7588851.post@n2.nabble.com> <1463417662617-7588855.post@n2.nabble.com> Message-ID: <1463420996987-7588858.post@n2.nabble.com> Ooops, you're right. But I still don't get it. Now the last error persisting is this one: terminate called after throwing an instance of 'itk::ExceptionObject' what(): /usr/local/include/ITK-4.9/itkImageToImageFilter.hxx:250: itk::ERROR: GeodesicActiveContourLevelSetImageFilter(0x2127d40): Inputs do not occupy the same physical space! InputImage Origin: [0.0000000e+00, 0.0000000e+00, 0.0000000e+00], InputImage_1 Origin: [7.2991424e+00, 1.0553263e+01, -7.8717673e+00] Tolerance: 1.6000000e-07 Why doesn't the Origin change?! I tried GetOrigin etc as well, nothing worked. It always sets the Origin as 0 0 0. Spacing and Direction now seem to work. Is there some order that needs to be respected? If I change the order of the commands, it seems like the first ont called always fails... Or is it simply impossible to get all 3 arguments correct without modifying the Tolerance somewhere? When 2 Args seem to be right, the 3rd one always fails.... InternalImageType::PointType newOrigin; //newOrigin.Fill(0.0); newOrigin[0] = 7.2991424; newOrigin[1] = 10.553263; newOrigin[2] = -7.8717673; fastMarching->GetOutput()->SetOrigin(newOrigin); fastMarching->Update(); fastMarching->GetOutput()->SetSpacing(sigmoid->GetOutput()->GetSpacing()); fastMarching->Update(); fastMarching->GetOutput()->SetDirection(sigmoid->GetOutput()->GetDirection()); //fastMarching->GetOutput()->Update(); fastMarching->Update(); -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Active-Contour-Error-Inputs-do-not-occupy-the-same-physical-space-tp7588851p7588858.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From bill.lorensen at gmail.com Mon May 16 13:54:48 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 16 May 2016 13:54:48 -0400 Subject: [ITK] [ITK-users] Geodesic Active Contour Error: Inputs do not occupy the same physical space! In-Reply-To: <1463420996987-7588858.post@n2.nabble.com> References: <1463412635700-7588851.post@n2.nabble.com> <1463417662617-7588855.post@n2.nabble.com> <1463420996987-7588858.post@n2.nabble.com> Message-ID: You cannot set the origin, direciton and spacing directly. Use the itkChangeInformationImageFilter. It does not copy the data, just changes the meta information. On Mon, May 16, 2016 at 1:49 PM, Robert wrote: > Ooops, you're right. > But I still don't get it. > Now the last error persisting is this one: > > terminate called after throwing an instance of 'itk::ExceptionObject' > what(): /usr/local/include/ITK-4.9/itkImageToImageFilter.hxx:250: > itk::ERROR: GeodesicActiveContourLevelSetImageFilter(0x2127d40): Inputs do > not occupy the same physical space! > InputImage Origin: [0.0000000e+00, 0.0000000e+00, 0.0000000e+00], > InputImage_1 Origin: [7.2991424e+00, 1.0553263e+01, -7.8717673e+00] > Tolerance: 1.6000000e-07 > > Why doesn't the Origin change?! I tried GetOrigin etc as well, nothing > worked. It always sets the Origin as 0 0 0. Spacing and Direction now seem > to work. Is there some order that needs to be respected? If I change the > order of the commands, it seems like the first ont called always fails... Or > is it simply impossible to get all 3 arguments correct without modifying the > Tolerance somewhere? When 2 Args seem to be right, the 3rd one always > fails.... > > InternalImageType::PointType newOrigin; > //newOrigin.Fill(0.0); > newOrigin[0] = 7.2991424; > newOrigin[1] = 10.553263; > newOrigin[2] = -7.8717673; > > fastMarching->GetOutput()->SetOrigin(newOrigin); > fastMarching->Update(); > fastMarching->GetOutput()->SetSpacing(sigmoid->GetOutput()->GetSpacing()); > fastMarching->Update(); > > fastMarching->GetOutput()->SetDirection(sigmoid->GetOutput()->GetDirection()); > //fastMarching->GetOutput()->Update(); > fastMarching->Update(); > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Active-Contour-Error-Inputs-do-not-occupy-the-same-physical-space-tp7588851p7588858.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -- Unpaid intern in BillsBasement at noware dot com _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK 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 Mon May 16 13:59:24 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 16 May 2016 13:59:24 -0400 Subject: [ITK] [ITK-users] Geodesic Active Contour Error: Inputs do not occupy the same physical space! In-Reply-To: <1463420996987-7588858.post@n2.nabble.com> References: <1463412635700-7588851.post@n2.nabble.com> <1463417662617-7588855.post@n2.nabble.com> <1463420996987-7588858.post@n2.nabble.com> Message-ID: Hi Robert, if you want to modify an intermediate result, you should save it to a variable, e.g.: ImageType::Pointer fmOutput=fastMarching->GetOutput(); then call Set* methods on fmOutput. Otherwise the pipeline update propagation mechanism might interfere with intermediate results and overwrite your changes. Regards, D?enan On Mon, May 16, 2016 at 1:49 PM, Robert wrote: > Ooops, you're right. > But I still don't get it. > Now the last error persisting is this one: > > terminate called after throwing an instance of 'itk::ExceptionObject' > what(): /usr/local/include/ITK-4.9/itkImageToImageFilter.hxx:250: > itk::ERROR: GeodesicActiveContourLevelSetImageFilter(0x2127d40): Inputs do > not occupy the same physical space! > InputImage Origin: [0.0000000e+00, 0.0000000e+00, 0.0000000e+00], > InputImage_1 Origin: [7.2991424e+00, 1.0553263e+01, -7.8717673e+00] > Tolerance: 1.6000000e-07 > > Why doesn't the Origin change?! I tried GetOrigin etc as well, nothing > worked. It always sets the Origin as 0 0 0. Spacing and Direction now seem > to work. Is there some order that needs to be respected? If I change the > order of the commands, it seems like the first ont called always fails... > Or > is it simply impossible to get all 3 arguments correct without modifying > the > Tolerance somewhere? When 2 Args seem to be right, the 3rd one always > fails.... > > InternalImageType::PointType newOrigin; > //newOrigin.Fill(0.0); > newOrigin[0] = 7.2991424; > newOrigin[1] = 10.553263; > newOrigin[2] = -7.8717673; > > fastMarching->GetOutput()->SetOrigin(newOrigin); > fastMarching->Update(); > > fastMarching->GetOutput()->SetSpacing(sigmoid->GetOutput()->GetSpacing()); > fastMarching->Update(); > > > fastMarching->GetOutput()->SetDirection(sigmoid->GetOutput()->GetDirection()); > //fastMarching->GetOutput()->Update(); > fastMarching->Update(); > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Active-Contour-Error-Inputs-do-not-occupy-the-same-physical-space-tp7588851p7588858.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 16 14:06:50 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 16 May 2016 11:06:50 -0700 (MST) Subject: [ITK] [ITK-users] SimpleITK OtsuThresholdImageFilter In-Reply-To: <1463356404009-7588850.post@n2.nabble.com> References: <1463356404009-7588850.post@n2.nabble.com> Message-ID: <1463422010010-7588861.post@n2.nabble.com> Just a shot in the dark as I'm currently not on my programming environment in order to test it for myself, but did you try setting/changing the thresholds? There should be a function like filter.SetInsideValue() and filter.SetOutsideValue() or filter.SetTreshold (this one for the BinaryThresholdImageFilter, as otsu should calculate one on the fly). -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/SimpleITK-OtsuThresholdImageFilter-tp7588850p7588861.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From hans-johnson at uiowa.edu Mon May 16 14:07:12 2016 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Mon, 16 May 2016 18:07:12 +0000 Subject: [ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue In-Reply-To: <1463415195648-7588854.post@n2.nabble.com> References: <1463153167301-7588837.post@n2.nabble.com> <2D593B3D-C6D6-45EF-93C8-75484575FD49@mail.nih.gov> <1463166733620-7588839.post@n2.nabble.com> <2841BCB1-D769-4736-B82F-E23CA390494C@mail.nih.gov> <1463174884133-7588841.post@n2.nabble.com> <4667DA58-5F4B-4C4F-B1E6-C907A432DCAC@mail.nih.gov> <90B961A4-E84E-4BD5-97CD-21A33E9770B7@uiowa.edu> <1463415195648-7588854.post@n2.nabble.com> Message-ID: <9624EA1B-1C34-474C-99F8-8B9D941591AB@uiowa.edu> GREAT! I do think this is resolved in the latest versions of ITK. It will be even more fortified on the next VXL upgrade to ITK where C++11 features of VS are handled better. Hans -- On 5/16/16, 11:13 AM, "Insight-users on behalf of ebasafa" wrote: >So I downloaded and built the latest repository snapshot >(https://github.com/InsightSoftwareConsortium/ITK) and it doesn't have that >issue anymore. As far as I can see, all instances of vnl_math have been >replaced by std or itk::Math methods. So I assume the next release will not >have this issue, correct? > >More details about the compiler and versions: Windows (Visual Studio 2015 >Express Desktop); I was using the latest ITK release (4.9.1) as I had >mentioned. > >I will try to come up with a modified test that exposes this issue. So far I >have only been a user of ITK, so please excuse the sluggishness. > >Best, >Ehsan > > > >-- >View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837p7588854.html >Sent from the ITK Insight Users mailing list archive at Nabble.com. >_____________________________________ >Powered by www.kitware.com > >Visit other Kitware open-source projects at >http://www.kitware.com/opensource/opensource.html > >Kitware offers ITK Training Courses, for more information visit: >http://www.kitware.com/products/protraining.php > >Please keep messages on-topic and check the ITK FAQ at: >http://www.itk.org/Wiki/ITK_FAQ > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From emonclus at cs.upc.edu Tue May 17 05:12:50 2016 From: emonclus at cs.upc.edu (Eva Monclus) Date: Tue, 17 May 2016 11:12:50 +0200 Subject: [ITK] ITK 4.9 and file itkContourExtractor2DImageFilter Message-ID: <573AE092.4080109@cs.upc.edu> Hi, Until now I have been using ITK 3.6 version. Now, I'm trying to migrate all my code to the new version of itk (4.9) and I'm having some problems at compilation time. It seems that in the installation of this version of itk, the file itkContourExtractor2DImageFilter.h is missing. I thought that the problem was going to be solved by changing the default "ccmake" configuration, but after activating all the following flags, I couldn't resolve it. The cmake flags that I put on were: ITKV3_COMPATIBILITY --> ON ITK_BUILD_DEFAULT_MODULES --> ON Module_ITKReview --> ON Any idea on what I am doing wrong? Thanks in advance, Eva From blowekamp at mail.nih.gov Tue May 17 08:55:45 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Tue, 17 May 2016 12:55:45 +0000 Subject: [ITK] ITK 4.9 and file itkContourExtractor2DImageFilter In-Reply-To: <573AE092.4080109@cs.upc.edu> References: <573AE092.4080109@cs.upc.edu> Message-ID: <88067E5D-15B7-4D07-B5CC-C7138C96F267@mail.nih.gov> Hello, Sharing you error message would greatly help assisting you along with a snippet of the problematic code. Brad > On May 17, 2016, at 5:12 AM, Eva Monclus wrote: > > Hi, > > Until now I have been using ITK 3.6 version. > Now, I'm trying to migrate all my code to the new version of itk (4.9) and I'm having some problems at compilation time. > It seems that in the installation of this version of itk, the file itkContourExtractor2DImageFilter.h is missing. > > I thought that the problem was going to be solved by changing the default "ccmake" configuration, but after activating all the following flags, I couldn't resolve it. > The cmake flags that I put on were: > ITKV3_COMPATIBILITY --> ON > ITK_BUILD_DEFAULT_MODULES --> ON > Module_ITKReview --> ON > > > Any idea on what I am doing wrong? > > Thanks in advance, > Eva > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From blowekamp at mail.nih.gov Tue May 17 10:14:38 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Tue, 17 May 2016 14:14:38 +0000 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error Message-ID: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> Hello, On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am getting the following compilation error with VS9 2008[1]: 3>3>------ Build started: Project: itkv3p_netlib, Configuration: MinSizeRel x64 ------ 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 ------ 3>2>Compiling... 3>4>Compiling... 3>1>Compiling... 3>2>triangle.c 3>1>vcl_deprecated.cxx 3>4>FStream.cxx 3>3>Compiling... 3>3>v3p_netlib_init.c 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) : fatal error C1189: #error : "Missing definition for SHARED_PTR" Is this addressed in VNL upstream yet? or should I begin looking into it? Thanks, Brad [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From blowekamp at mail.nih.gov Tue May 17 10:34:23 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Tue, 17 May 2016 14:34:23 +0000 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> Message-ID: <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> Hans, I?ll take a look into it. Thanks for the offer for a hang out, well go there if needed. I haven?t tries this my self, but there is the Free, VS for Python 2.7, that is suppose to be based on VS9 2008[1]. I don?t know how this works with general CMake project, but maybe it will help improve your access. Brad [1] https://www.visualstudio.com/en-us/features/python-vs.aspx On May 17, 2016, at 10:29 AM, Johnson, Hans J > wrote: This is not fixed in VXL upstream. There are currently no windows builds on VXL dashboard: https://open.cdash.org/index.php?project=vxl I don?t see any VS9 builds for ITK either. I?d be happy to help identify a solution, but I don?t have the VS resources. If you would like to have a hang out, I?d be interested in assisting with the fix. Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 9:14 AM To: "insight-developers at itk.org" > Cc: Hans Johnson > Subject: ITK4.10rc1 SimpleITK VNL error Hello, On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am getting the following compilation error with VS9 2008[1]: 3>3>------ Build started: Project: itkv3p_netlib, Configuration: MinSizeRel x64 ------ 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 ------ 3>2>Compiling... 3>4>Compiling... 3>1>Compiling... 3>2>triangle.c 3>1>vcl_deprecated.cxx 3>4>FStream.cxx 3>3>Compiling... 3>3>v3p_netlib_init.c 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) : fatal error C1189: #error : "Missing definition for SHARED_PTR" Is this addressed in VNL upstream yet? or should I begin looking into it? Thanks, Brad [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From hans-johnson at uiowa.edu Tue May 17 10:29:48 2016 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Tue, 17 May 2016 14:29:48 +0000 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> Message-ID: <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> This is not fixed in VXL upstream. There are currently no windows builds on VXL dashboard: https://open.cdash.org/index.php?project=vxl I don?t see any VS9 builds for ITK either. I?d be happy to help identify a solution, but I don?t have the VS resources. If you would like to have a hang out, I?d be interested in assisting with the fix. Hans -- From: Bradley Lowekamp Date: Tuesday, May 17, 2016 at 9:14 AM To: "insight-developers at itk.org" Cc: Hans Johnson Subject: ITK4.10rc1 SimpleITK VNL error Hello, On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am getting the following compilation error with VS9 2008[1]: 3>3>------ Build started: Project: itkv3p_netlib, Configuration: MinSizeRel x64 ------ 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 ------ 3>2>Compiling... 3>4>Compiling... 3>1>Compiling... 3>2>triangle.c 3>1>vcl_deprecated.cxx 3>4>FStream.cxx 3>3>Compiling... 3>3>v3p_netlib_init.c 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) : fatal error C1189: #error : "Missing definition for SHARED_PTR" Is this addressed in VNL upstream yet? or should I begin looking into it? Thanks, Brad [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From hans-johnson at uiowa.edu Tue May 17 11:07:30 2016 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Tue, 17 May 2016 15:07:30 +0000 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> Message-ID: Thanks Brad. Do you know if this version can be installed along side of VS 2015 without conflicts? Hans -- From: Bradley Lowekamp Date: Tuesday, May 17, 2016 at 9:34 AM To: Hans Johnson Cc: "insight-developers at itk.org" Subject: Re: ITK4.10rc1 SimpleITK VNL error Hans, I?ll take a look into it. Thanks for the offer for a hang out, well go there if needed. I haven?t tries this my self, but there is the Free, VS for Python 2.7, that is suppose to be based on VS9 2008[1]. I don?t know how this works with general CMake project, but maybe it will help improve your access. Brad [1] https://www.visualstudio.com/en-us/features/python-vs.aspx On May 17, 2016, at 10:29 AM, Johnson, Hans J > wrote: This is not fixed in VXL upstream. There are currently no windows builds on VXL dashboard: https://open.cdash.org/index.php?project=vxl I don?t see any VS9 builds for ITK either. I?d be happy to help identify a solution, but I don?t have the VS resources. If you would like to have a hang out, I?d be interested in assisting with the fix. Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 9:14 AM To: "insight-developers at itk.org" > Cc: Hans Johnson > Subject: ITK4.10rc1 SimpleITK VNL error Hello, On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am getting the following compilation error with VS9 2008[1]: 3>3>------ Build started: Project: itkv3p_netlib, Configuration: MinSizeRel x64 ------ 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 ------ 3>2>Compiling... 3>4>Compiling... 3>1>Compiling... 3>2>triangle.c 3>1>vcl_deprecated.cxx 3>4>FStream.cxx 3>3>Compiling... 3>3>v3p_netlib_init.c 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) : fatal error C1189: #error : "Missing definition for SHARED_PTR" Is this addressed in VNL upstream yet? or should I begin looking into it? Thanks, Brad [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From scorpiuni at gmail.com Tue May 17 12:37:47 2016 From: scorpiuni at gmail.com (Robert) Date: Tue, 17 May 2016 09:37:47 -0700 (MST) Subject: [ITK] [ITK-users] Geodesic Active Contour Error: Inputs do not occupy the same physical space! In-Reply-To: References: <1463412635700-7588851.post@n2.nabble.com> <1463417662617-7588855.post@n2.nabble.com> <1463420996987-7588858.post@n2.nabble.com> Message-ID: <1463503067706-7588863.post@n2.nabble.com> Thanks for the tip, it now works! -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Active-Contour-Error-Inputs-do-not-occupy-the-same-physical-space-tp7588851p7588863.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From blowekamp at mail.nih.gov Tue May 17 15:44:43 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Tue, 17 May 2016 19:44:43 +0000 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> Message-ID: <71FCFB79-1B08-4A59-BE33-A8CEAA45ED37@mail.nih.gov> Hans, This looks like an issue with tr1 includes [1]. This is very tricky business with VS, gcc, clang and libstdc++ and libc++. And it looks like VCL is now requiring shared_ptr support? It that intentional? In my tests for SimpleITK, I have it noted [2], that Visual Studio 2008, 2010, 2012 don?t need the tr1 in the include path for tr1 headers. The checks in VXL seem to require this sub-folder arrangement. So check like the following should be done: CHECK_TYPE_EXISTS_ZERO(std::tr1::shared_ptr memory VCL_MEMORY_HAS_TR1_SHARED_PTR) Note the tr1 namespace but not the tr1 include path. I?m working on testing this now. [1] https://github.com/vxl/vxl/blob/abb93b9cea365318028cf18c9b84020c3c6a1d67/vcl/vcl_compiler.h#L942-L955 [2] https://github.com/SimpleITK/SimpleITK/blob/fc6bbeaf91dd74ebb294db57ccef8f9bb9e5e6b0/CMake/sitkCheckCXX11.cmake#L59-L61 On May 17, 2016, at 11:07 AM, Johnson, Hans J > wrote: Thanks Brad. Do you know if this version can be installed along side of VS 2015 without conflicts? Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 9:34 AM To: Hans Johnson > Cc: "insight-developers at itk.org" > Subject: Re: ITK4.10rc1 SimpleITK VNL error Hans, I?ll take a look into it. Thanks for the offer for a hang out, well go there if needed. I haven?t tries this my self, but there is the Free, VS for Python 2.7, that is suppose to be based on VS9 2008[1]. I don?t know how this works with general CMake project, but maybe it will help improve your access. Brad [1] https://www.visualstudio.com/en-us/features/python-vs.aspx On May 17, 2016, at 10:29 AM, Johnson, Hans J > wrote: This is not fixed in VXL upstream. There are currently no windows builds on VXL dashboard: https://open.cdash.org/index.php?project=vxl I don?t see any VS9 builds for ITK either. I?d be happy to help identify a solution, but I don?t have the VS resources. If you would like to have a hang out, I?d be interested in assisting with the fix. Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 9:14 AM To: "insight-developers at itk.org" > Cc: Hans Johnson > Subject: ITK4.10rc1 SimpleITK VNL error Hello, On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am getting the following compilation error with VS9 2008[1]: 3>3>------ Build started: Project: itkv3p_netlib, Configuration: MinSizeRel x64 ------ 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 ------ 3>2>Compiling... 3>4>Compiling... 3>1>Compiling... 3>2>triangle.c 3>1>vcl_deprecated.cxx 3>4>FStream.cxx 3>3>Compiling... 3>3>v3p_netlib_init.c 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) : fatal error C1189: #error : "Missing definition for SHARED_PTR" Is this addressed in VNL upstream yet? or should I begin looking into it? Thanks, Brad [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From hans-johnson at uiowa.edu Tue May 17 15:51:41 2016 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Tue, 17 May 2016 19:51:41 +0000 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: <71FCFB79-1B08-4A59-BE33-A8CEAA45ED37@mail.nih.gov> References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> <71FCFB79-1B08-4A59-BE33-A8CEAA45ED37@mail.nih.gov> Message-ID: <9BAF0F8F-1EB8-4650-AB49-AA927ED4C63F@uiowa.edu> Brad, Thank you for your assistance. I am hopeful that your solution can maintain a relatively simple set of rules implementing cross platform support. I?ll review ASAP when you have a patch set to look at. Your assistance is GREATLY appreciated. Hans -- From: Bradley Lowekamp Date: Tuesday, May 17, 2016 at 2:44 PM To: Hans Johnson Cc: "insight-developers at itk.org" Subject: Re: ITK4.10rc1 SimpleITK VNL error Hans, This looks like an issue with tr1 includes [1]. This is very tricky business with VS, gcc, clang and libstdc++ and libc++. And it looks like VCL is now requiring shared_ptr support? It that intentional? In my tests for SimpleITK, I have it noted [2], that Visual Studio 2008, 2010, 2012 don?t need the tr1 in the include path for tr1 headers. The checks in VXL seem to require this sub-folder arrangement. So check like the following should be done: CHECK_TYPE_EXISTS_ZERO(std::tr1::shared_ptr memory VCL_MEMORY_HAS_TR1_SHARED_PTR) Note the tr1 namespace but not the tr1 include path. I?m working on testing this now. [1] https://github.com/vxl/vxl/blob/abb93b9cea365318028cf18c9b84020c3c6a1d67/vcl/vcl_compiler.h#L942-L955 [2] https://github.com/SimpleITK/SimpleITK/blob/fc6bbeaf91dd74ebb294db57ccef8f9bb9e5e6b0/CMake/sitkCheckCXX11.cmake#L59-L61 On May 17, 2016, at 11:07 AM, Johnson, Hans J > wrote: Thanks Brad. Do you know if this version can be installed along side of VS 2015 without conflicts? Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 9:34 AM To: Hans Johnson > Cc: "insight-developers at itk.org" > Subject: Re: ITK4.10rc1 SimpleITK VNL error Hans, I?ll take a look into it. Thanks for the offer for a hang out, well go there if needed. I haven?t tries this my self, but there is the Free, VS for Python 2.7, that is suppose to be based on VS9 2008[1]. I don?t know how this works with general CMake project, but maybe it will help improve your access. Brad [1] https://www.visualstudio.com/en-us/features/python-vs.aspx On May 17, 2016, at 10:29 AM, Johnson, Hans J > wrote: This is not fixed in VXL upstream. There are currently no windows builds on VXL dashboard: https://open.cdash.org/index.php?project=vxl I don?t see any VS9 builds for ITK either. I?d be happy to help identify a solution, but I don?t have the VS resources. If you would like to have a hang out, I?d be interested in assisting with the fix. Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 9:14 AM To: "insight-developers at itk.org" > Cc: Hans Johnson > Subject: ITK4.10rc1 SimpleITK VNL error Hello, On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am getting the following compilation error with VS9 2008[1]: 3>3>------ Build started: Project: itkv3p_netlib, Configuration: MinSizeRel x64 ------ 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 ------ 3>2>Compiling... 3>4>Compiling... 3>1>Compiling... 3>2>triangle.c 3>1>vcl_deprecated.cxx 3>4>FStream.cxx 3>3>Compiling... 3>3>v3p_netlib_init.c 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) : fatal error C1189: #error : "Missing definition for SHARED_PTR" Is this addressed in VNL upstream yet? or should I begin looking into it? Thanks, Brad [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From matimontg at gmail.com Tue May 17 21:51:45 2016 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 18 May 2016 01:51:45 +0000 Subject: [ITK] [ITK-users] SetOutputOrigin(origin) not working on writer In-Reply-To: References: Message-ID: Thanks, I actually had to add this line of code to the writer: writer->UseInputMetaDataDictionaryOff(); Not sure why but it worked and it also copied all tags from the original image into the output image. El dom., 15 de may. de 2016 a la(s) 12:45, Bill Lorensen < bill.lorensen at gmail.com> escribi?: > After > reader->SetFileName(argv[1]); > reader->Update(); > > No need for inputImage->Update(); > > Since you did not Update the reader, the origin and spacing will be > (0,0,0) and(1,1,1) by defulat. > > > On Sat, May 14, 2016 at 7:42 PM, Matias Montroull > wrote: > > Hi, > > > > I have the following code to flip an image and preserve origin and > spacing. > > For some reason, the writer doesn't copy the Origin from the original > image > > into the output Image. > > > > I can see the Output Image origin is the Original Image origin but I > don't > > understand why the writer doesn't take that value. I have no issues with > the > > spacing, that one is copied just fine into the output image. > > > > I'm using ITK 4.7.2 > > > > #include "itkImage.h" > > #include "itkImageFileReader.h" > > #include "itkImageFileWriter.h" > > #include "itkFlipImageFilter.h" > > #include "itkChangeInformationImageFilter.h" > > > > int main(int argc, char* argv[]) > > { > > if (argc != 4) > > { > > std::cerr << "Usage: " << argv[0]; > > std::cerr << " "; > > std::cerr << std::endl; > > return EXIT_FAILURE; > > } > > > > typedef itk::Image ImageType; > > > > typedef itk::ImageFileReader< ImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > > > reader->SetFileName(argv[1]); > > > > ImageType::Pointer inputImage = reader->GetOutput(); > > inputImage->Update(); //Importante!! Sin esto no agarra el origen > > > > ImageType::PointType origin = inputImage->GetOrigin(); > > ImageType::SpacingType spacing = inputImage->GetSpacing(); > > > > typedef itk::FlipImageFilter< ImageType > FlipImageFilterType; > > FlipImageFilterType::Pointer flipFilter = FlipImageFilterType::New(); > > > > typedef itk::ChangeInformationImageFilter< ImageType > FilterType; > > FilterType::Pointer filter = FilterType::New(); > > filter->SetInput(reader->GetOutput()); > > > > filter->SetOutputOrigin(origin); > > filter->ChangeOriginOn(); > > filter->SetOutputSpacing(spacing); > > filter->ChangeSpacingOn(); > > > > flipFilter->SetInput(filter->GetOutput()); > > flipFilter->Update(); > > > > FlipImageFilterType::FlipAxesArrayType flipAxes; > > if (atoi(argv[3]) == 0) > > { > > flipAxes[0] = true; > > flipAxes[1] = false; > > } > > else > > { > > flipAxes[0] = false; > > flipAxes[1] = true; > > } > > > > flipFilter->SetFlipAxes(flipAxes); > > typedef itk::ImageFileWriter< ImageType > WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->SetFileName(argv[2]); > > writer->SetInput(flipFilter->GetOutput()); > > try > > { > > writer->Update(); > > std::cout << "Input origin is: " << reader->GetOutput()->GetOrigin() << > > std::endl; > > std::cout << "Output origin is: " << > flipFilter->GetOutput()->GetOrigin() << > > std::endl; > > } > > catch (itk::ExceptionObject & error) > > { > > std::cerr << "Error: " << error << std::endl; > > return EXIT_FAILURE; > > } > > > > return EXIT_SUCCESS; > > } > > > > -- > > Matias > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From emonclus at cs.upc.edu Wed May 18 05:41:59 2016 From: emonclus at cs.upc.edu (Eva Monclus) Date: Wed, 18 May 2016 11:41:59 +0200 Subject: [ITK] ITK 4.9 and file itkContourExtractor2DImageFilter Message-ID: <573C38E7.5060305@cs.upc.edu> Hi, I have been using ITK 3.6 for many years. Now, I'm trying to migrate all my code to the new version of itk (4.9) and I'm having some problems at compilation time. It seems that in the installation of this version of itk, the file itkContourExtractor2DImageFilter.h is missing. Here, a snippet of the problematic code: #include #include #include #include #include #include #include #include #include #include The message error compilation is: fatal error: itkContourExtractor2DImageFilter.h: No such file or directory I thought that the problem was going to be solved by changing the default "ccmake" configuration, but after activating all the following flags, I couldn't resolve it. The cmake flags that I put on were: ITKV3_COMPATIBILITY --> ON ITK_BUILD_DEFAULT_MODULES --> ON Module_ITKReview --> ON Any idea on what I am doing wrong? Thanks in advance, Eva From blowekamp at mail.nih.gov Wed May 18 08:27:12 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Wed, 18 May 2016 12:27:12 +0000 Subject: [ITK] ITK 4.9 and file itkContourExtractor2DImageFilter In-Reply-To: <573C38E7.5060305@cs.upc.edu> References: <573C38E7.5060305@cs.upc.edu> Message-ID: <7D65EB97-1EB1-4D42-8797-0FFEC9167530@mail.nih.gov> Hello, This sounds like a CMake issue. You have not shared what compiler, or build environment you are using. Here is a basic sample CMake project using ITK [1]. HTH, Brad [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/Installation/CMakeLists.txt > On May 18, 2016, at 5:41 AM, Eva Monclus wrote: > > Hi, > > I have been using ITK 3.6 for many years. Now, I'm trying to migrate all my code to the new version of itk (4.9) and I'm having some problems at compilation time. It seems that in the installation of this version of itk, the file itkContourExtractor2DImageFilter.h is missing. > > Here, a snippet of the problematic code: > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > > The message error compilation is: fatal error: itkContourExtractor2DImageFilter.h: No such file or directory > > > > I thought that the problem was going to be solved by changing the default "ccmake" configuration, but after activating all the following flags, I couldn't resolve it. > > The cmake flags that I put on were: > ITKV3_COMPATIBILITY --> ON > ITK_BUILD_DEFAULT_MODULES --> ON > Module_ITKReview --> ON > > Any idea on what I am doing wrong? Thanks in advance, Eva > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community From blowekamp at mail.nih.gov Wed May 18 08:35:59 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Wed, 18 May 2016 12:35:59 +0000 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: <9BAF0F8F-1EB8-4650-AB49-AA927ED4C63F@uiowa.edu> References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> <71FCFB79-1B08-4A59-BE33-A8CEAA45ED37@mail.nih.gov> <9BAF0F8F-1EB8-4650-AB49-AA927ED4C63F@uiowa.edu> Message-ID: Is VXL in a state to update ITK with the current mater? Brad On May 17, 2016, at 3:51 PM, Johnson, Hans J > wrote: Brad, Thank you for your assistance. I am hopeful that your solution can maintain a relatively simple set of rules implementing cross platform support. I?ll review ASAP when you have a patch set to look at. Your assistance is GREATLY appreciated. Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 2:44 PM To: Hans Johnson > Cc: "insight-developers at itk.org" > Subject: Re: ITK4.10rc1 SimpleITK VNL error Hans, This looks like an issue with tr1 includes [1]. This is very tricky business with VS, gcc, clang and libstdc++ and libc++. And it looks like VCL is now requiring shared_ptr support? It that intentional? In my tests for SimpleITK, I have it noted [2], that Visual Studio 2008, 2010, 2012 don?t need the tr1 in the include path for tr1 headers. The checks in VXL seem to require this sub-folder arrangement. So check like the following should be done: CHECK_TYPE_EXISTS_ZERO(std::tr1::shared_ptr memory VCL_MEMORY_HAS_TR1_SHARED_PTR) Note the tr1 namespace but not the tr1 include path. I?m working on testing this now. [1] https://github.com/vxl/vxl/blob/abb93b9cea365318028cf18c9b84020c3c6a1d67/vcl/vcl_compiler.h#L942-L955 [2] https://github.com/SimpleITK/SimpleITK/blob/fc6bbeaf91dd74ebb294db57ccef8f9bb9e5e6b0/CMake/sitkCheckCXX11.cmake#L59-L61 On May 17, 2016, at 11:07 AM, Johnson, Hans J > wrote: Thanks Brad. Do you know if this version can be installed along side of VS 2015 without conflicts? Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 9:34 AM To: Hans Johnson > Cc: "insight-developers at itk.org" > Subject: Re: ITK4.10rc1 SimpleITK VNL error Hans, I?ll take a look into it. Thanks for the offer for a hang out, well go there if needed. I haven?t tries this my self, but there is the Free, VS for Python 2.7, that is suppose to be based on VS9 2008[1]. I don?t know how this works with general CMake project, but maybe it will help improve your access. Brad [1] https://www.visualstudio.com/en-us/features/python-vs.aspx On May 17, 2016, at 10:29 AM, Johnson, Hans J > wrote: This is not fixed in VXL upstream. There are currently no windows builds on VXL dashboard: https://open.cdash.org/index.php?project=vxl I don?t see any VS9 builds for ITK either. I?d be happy to help identify a solution, but I don?t have the VS resources. If you would like to have a hang out, I?d be interested in assisting with the fix. Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 9:14 AM To: "insight-developers at itk.org" > Cc: Hans Johnson > Subject: ITK4.10rc1 SimpleITK VNL error Hello, On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am getting the following compilation error with VS9 2008[1]: 3>3>------ Build started: Project: itkv3p_netlib, Configuration: MinSizeRel x64 ------ 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 ------ 3>2>Compiling... 3>4>Compiling... 3>1>Compiling... 3>2>triangle.c 3>1>vcl_deprecated.cxx 3>4>FStream.cxx 3>3>Compiling... 3>3>v3p_netlib_init.c 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) : fatal error C1189: #error : "Missing definition for SHARED_PTR" Is this addressed in VNL upstream yet? or should I begin looking into it? Thanks, Brad [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From blowekamp at mail.nih.gov Wed May 18 09:37:06 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Wed, 18 May 2016 13:37:06 +0000 Subject: [ITK] [ITK-dev] CDash - Where is the CMake version Message-ID: Hello, I can?t seem to find the cmake version for builds any more. Where is it now? Thanks, Brad _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From scorpiuni at gmail.com Wed May 18 09:38:44 2016 From: scorpiuni at gmail.com (Robert) Date: Wed, 18 May 2016 06:38:44 -0700 (MST) Subject: [ITK] [ITK-users] Geodesic Active Contour with Shape Guidance Parameters Message-ID: <1463578724389-7588865.post@n2.nabble.com> Hello, I was trying out the Geodesic Active Contour with Shape Guidance example from the ITK book, but I can't get the same result as described in the book. There is a parameter called "startx" and "starty" that you need to provide. This isn't explained in the text. How do I need to choose those parameters, and what do they mean/influence? I tried a few different ones, but I don't see any influence, however my "final parameters" result is different than in the book. Also, my output image looks wrong in the sense that it is not rotated at all, it does not seem to find the right spot in the image.... Could anyone explain those parameters to me? -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Active-Contour-with-Shape-Guidance-Parameters-tp7588865.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From hans-johnson at uiowa.edu Wed May 18 10:11:19 2016 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Wed, 18 May 2016 14:11:19 +0000 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> <71FCFB79-1B08-4A59-BE33-A8CEAA45ED37@mail.nih.gov> <9BAF0F8F-1EB8-4650-AB49-AA927ED4C63F@uiowa.edu> Message-ID: <03BB5B28-804D-4FAA-8F52-7D1C913A1CB6@uiowa.edu> I believe so. I am pretty sure that it will improve C++11 support in ITK. Hans -- From: Bradley Lowekamp Date: Wednesday, May 18, 2016 at 7:35 AM To: Hans Johnson Cc: "insight-developers at itk.org" Subject: Re: ITK4.10rc1 SimpleITK VNL error Is VXL in a state to update ITK with the current mater? Brad On May 17, 2016, at 3:51 PM, Johnson, Hans J > wrote: Brad, Thank you for your assistance. I am hopeful that your solution can maintain a relatively simple set of rules implementing cross platform support. I?ll review ASAP when you have a patch set to look at. Your assistance is GREATLY appreciated. Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 2:44 PM To: Hans Johnson > Cc: "insight-developers at itk.org" > Subject: Re: ITK4.10rc1 SimpleITK VNL error Hans, This looks like an issue with tr1 includes [1]. This is very tricky business with VS, gcc, clang and libstdc++ and libc++. And it looks like VCL is now requiring shared_ptr support? It that intentional? In my tests for SimpleITK, I have it noted [2], that Visual Studio 2008, 2010, 2012 don?t need the tr1 in the include path for tr1 headers. The checks in VXL seem to require this sub-folder arrangement. So check like the following should be done: CHECK_TYPE_EXISTS_ZERO(std::tr1::shared_ptr memory VCL_MEMORY_HAS_TR1_SHARED_PTR) Note the tr1 namespace but not the tr1 include path. I?m working on testing this now. [1] https://github.com/vxl/vxl/blob/abb93b9cea365318028cf18c9b84020c3c6a1d67/vcl/vcl_compiler.h#L942-L955 [2] https://github.com/SimpleITK/SimpleITK/blob/fc6bbeaf91dd74ebb294db57ccef8f9bb9e5e6b0/CMake/sitkCheckCXX11.cmake#L59-L61 On May 17, 2016, at 11:07 AM, Johnson, Hans J > wrote: Thanks Brad. Do you know if this version can be installed along side of VS 2015 without conflicts? Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 9:34 AM To: Hans Johnson > Cc: "insight-developers at itk.org" > Subject: Re: ITK4.10rc1 SimpleITK VNL error Hans, I?ll take a look into it. Thanks for the offer for a hang out, well go there if needed. I haven?t tries this my self, but there is the Free, VS for Python 2.7, that is suppose to be based on VS9 2008[1]. I don?t know how this works with general CMake project, but maybe it will help improve your access. Brad [1] https://www.visualstudio.com/en-us/features/python-vs.aspx On May 17, 2016, at 10:29 AM, Johnson, Hans J > wrote: This is not fixed in VXL upstream. There are currently no windows builds on VXL dashboard: https://open.cdash.org/index.php?project=vxl I don?t see any VS9 builds for ITK either. I?d be happy to help identify a solution, but I don?t have the VS resources. If you would like to have a hang out, I?d be interested in assisting with the fix. Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 9:14 AM To: "insight-developers at itk.org" > Cc: Hans Johnson > Subject: ITK4.10rc1 SimpleITK VNL error Hello, On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am getting the following compilation error with VS9 2008[1]: 3>3>------ Build started: Project: itkv3p_netlib, Configuration: MinSizeRel x64 ------ 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 ------ 3>2>Compiling... 3>4>Compiling... 3>1>Compiling... 3>2>triangle.c 3>1>vcl_deprecated.cxx 3>4>FStream.cxx 3>3>Compiling... 3>3>v3p_netlib_init.c 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) : fatal error C1189: #error : "Missing definition for SHARED_PTR" Is this addressed in VNL upstream yet? or should I begin looking into it? Thanks, Brad [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From zack.galbreath at kitware.com Wed May 18 11:11:10 2016 From: zack.galbreath at kitware.com (Zack Galbreath) Date: Wed, 18 May 2016 11:11:10 -0400 Subject: [ITK] [ITK-dev] CDash - Where is the CMake version In-Reply-To: References: Message-ID: On Wed, May 18, 2016 at 9:37 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] < blowekamp at mail.nih.gov> wrote: > Hello, > > I can?t seem to find the cmake version for builds any more. Where is it > now? > It's still available on buildSummary.php (click on the build name from index.php). It's shown as CTest version, but this should correspond to the version of CMake used to configure the build. Is there some other spot where you were expecting to see this information? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ctest_version.png Type: image/png Size: 132014 bytes Desc: not available URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From dzenanz at gmail.com Wed May 18 11:16:51 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 18 May 2016 11:16:51 -0400 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> Message-ID: Hi Hans, Python support is included with default installation of VS2015. You just need to tick it when installing, or modifying your installation. Or were you asking about something different? Regards On Tue, May 17, 2016 at 11:07 AM, Johnson, Hans J wrote: > Thanks Brad. Do you know if this version can be installed along side of > VS 2015 without conflicts? > > > > Hans > > -- > > > > > > *From: *Bradley Lowekamp > *Date: *Tuesday, May 17, 2016 at 9:34 AM > *To: *Hans Johnson > *Cc: *"insight-developers at itk.org" > *Subject: *Re: ITK4.10rc1 SimpleITK VNL error > > > > Hans, > > > > I?ll take a look into it. Thanks for the offer for a hang out, well go > there if needed. > > > > I haven?t tries this my self, but there is the Free, VS for Python 2.7, > that is suppose to be based on VS9 2008[1]. I don?t know how this works > with general CMake project, but maybe it will help improve your access. > > > > Brad > > > > > > [1] https://www.visualstudio.com/en-us/features/python-vs.aspx > > > > On May 17, 2016, at 10:29 AM, Johnson, Hans J > wrote: > > > > This is not fixed in VXL upstream. > > > > There are currently no windows builds on VXL dashboard: > https://open.cdash.org/index.php?project=vxl > > > > I don?t see any VS9 builds for ITK either. > > > > I?d be happy to help identify a solution, but I don?t have the VS > resources. If you would like to have a hang out, I?d be interested in > assisting with the fix. > > > > Hans > > > > -- > > > > > > *From: *Bradley Lowekamp > *Date: *Tuesday, May 17, 2016 at 9:14 AM > *To: *"insight-developers at itk.org" > *Cc: *Hans Johnson > *Subject: *ITK4.10rc1 SimpleITK VNL error > > > > Hello, > > > > On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am > getting the following compilation error with VS9 2008[1]: > > > > 3>3>------ Build started: Project: itkv3p_netlib, Configuration: MinSizeRel x64 ------ > > 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 ------ > > 3>2>Compiling... > > 3>4>Compiling... > > 3>1>Compiling... > > 3>2>triangle.c > > 3>1>vcl_deprecated.cxx > > 3>4>FStream.cxx > > 3>3>Compiling... > > 3>3>v3p_netlib_init.c > > *3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) : fatal error C1189: #error : "Missing definition for SHARED_PTR"* > > > > Is this addressed in VNL upstream yet? or should I begin looking into it? > > > > Thanks, > > Brad > > > > > > [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From blowekamp at mail.nih.gov Wed May 18 11:33:32 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Wed, 18 May 2016 15:33:32 +0000 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> Message-ID: <4F248E77-5B69-48EF-B547-0E6D17695A23@mail.nih.gov> @Hans, I have 5 versions of VS on the same system without problems. I would not try to mix multiple versions of the same release i.e. VS9 for Python with VS9 or VS14 with VS14 express. I?d expect VS14 and VS9 for Python 2.7 to work fine. @Dzenan The official Python.org 2.7 is compiled and distributed with the VS9 tool chain. This the the compiler recommenced to build Python 2.7 extensions according to PyPA[1]. While you can build an extension and mix the compilers, when something crashes unexpectedly I?d blame this first :) HTH, Brad [1] https://media.readthedocs.org/pdf/python-packaging-user-guide/latest/python-packaging-user-guide.pdf Visual Su On May 18, 2016, at 11:16 AM, D?enan Zuki? > wrote: Hi Hans, Python support is included with default installation of VS2015. You just need to tick it when installing, or modifying your installation. Or were you asking about something different? Regards On Tue, May 17, 2016 at 11:07 AM, Johnson, Hans J > wrote: Thanks Brad. Do you know if this version can be installed along side of VS 2015 without conflicts? Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 9:34 AM To: Hans Johnson > Cc: "insight-developers at itk.org" > Subject: Re: ITK4.10rc1 SimpleITK VNL error Hans, I?ll take a look into it. Thanks for the offer for a hang out, well go there if needed. I haven?t tries this my self, but there is the Free, VS for Python 2.7, that is suppose to be based on VS9 2008[1]. I don?t know how this works with general CMake project, but maybe it will help improve your access. Brad [1] https://www.visualstudio.com/en-us/features/python-vs.aspx On May 17, 2016, at 10:29 AM, Johnson, Hans J > wrote: This is not fixed in VXL upstream. There are currently no windows builds on VXL dashboard: https://open.cdash.org/index.php?project=vxl I don?t see any VS9 builds for ITK either. I?d be happy to help identify a solution, but I don?t have the VS resources. If you would like to have a hang out, I?d be interested in assisting with the fix. Hans -- From: Bradley Lowekamp > Date: Tuesday, May 17, 2016 at 9:14 AM To: "insight-developers at itk.org" > Cc: Hans Johnson > Subject: ITK4.10rc1 SimpleITK VNL error Hello, On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am getting the following compilation error with VS9 2008[1]: 3>3>------ Build started: Project: itkv3p_netlib, Configuration: MinSizeRel x64 ------ 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 ------ 3>2>Compiling... 3>4>Compiling... 3>1>Compiling... 3>2>triangle.c 3>1>vcl_deprecated.cxx 3>4>FStream.cxx 3>3>Compiling... 3>3>v3p_netlib_init.c 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) : fatal error C1189: #error : "Missing definition for SHARED_PTR" Is this addressed in VNL upstream yet? or should I begin looking into it? Thanks, Brad [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From matt.mccormick at kitware.com Wed May 18 11:34:08 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 18 May 2016 11:34:08 -0400 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> Message-ID: There are a many enhancements in VXL master that have not been sufficiently tested to merge for ITK 4.10 at this point in the release cycle. This patch https://github.com/vxl/vxl/commit/ebd2d26bea536a669ce10a88ec21ff28bd659533 is a high risk. If there are individual patches that are bug fixes or provide improved compiler support, please let me know, and I will port them to the ITK subtree for the 4.10 release. Thanks, Matt On Wed, May 18, 2016 at 11:16 AM, D?enan Zuki? wrote: > Hi Hans, > > Python support is included with default installation of VS2015. You just > need to tick it when installing, or modifying your installation. Or were you > asking about something different? > > Regards > > On Tue, May 17, 2016 at 11:07 AM, Johnson, Hans J > wrote: >> >> Thanks Brad. Do you know if this version can be installed along side of >> VS 2015 without conflicts? >> >> >> >> Hans >> >> -- >> >> >> >> >> >> From: Bradley Lowekamp >> Date: Tuesday, May 17, 2016 at 9:34 AM >> To: Hans Johnson >> Cc: "insight-developers at itk.org" >> Subject: Re: ITK4.10rc1 SimpleITK VNL error >> >> >> >> Hans, >> >> >> >> I?ll take a look into it. Thanks for the offer for a hang out, well go >> there if needed. >> >> >> >> I haven?t tries this my self, but there is the Free, VS for Python 2.7, >> that is suppose to be based on VS9 2008[1]. I don?t know how this works with >> general CMake project, but maybe it will help improve your access. >> >> >> >> Brad >> >> >> >> >> >> [1] https://www.visualstudio.com/en-us/features/python-vs.aspx >> >> >> >> On May 17, 2016, at 10:29 AM, Johnson, Hans J >> wrote: >> >> >> >> This is not fixed in VXL upstream. >> >> >> >> There are currently no windows builds on VXL dashboard: >> https://open.cdash.org/index.php?project=vxl >> >> >> >> I don?t see any VS9 builds for ITK either. >> >> >> >> I?d be happy to help identify a solution, but I don?t have the VS >> resources. If you would like to have a hang out, I?d be interested in >> assisting with the fix. >> >> >> >> Hans >> >> >> >> -- >> >> >> >> >> >> From: Bradley Lowekamp >> Date: Tuesday, May 17, 2016 at 9:14 AM >> To: "insight-developers at itk.org" >> Cc: Hans Johnson >> Subject: ITK4.10rc1 SimpleITK VNL error >> >> >> >> Hello, >> >> >> >> On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am >> getting the following compilation error with VS9 2008[1]: >> >> >> >> 3>3>------ Build started: Project: itkv3p_netlib, Configuration: >> MinSizeRel x64 ------ >> >> 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 >> ------ >> >> 3>2>Compiling... >> >> 3>4>Compiling... >> >> 3>1>Compiling... >> >> 3>2>triangle.c >> >> 3>1>vcl_deprecated.cxx >> >> 3>4>FStream.cxx >> >> 3>3>Compiling... >> >> 3>3>v3p_netlib_init.c >> >> >> 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) >> : fatal error C1189: #error : "Missing definition for SHARED_PTR" >> >> >> >> Is this addressed in VNL upstream yet? or should I begin looking into it? >> >> >> >> Thanks, >> >> Brad >> >> >> >> >> >> [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-developers >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From blowekamp at mail.nih.gov Wed May 18 11:38:29 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Wed, 18 May 2016 15:38:29 +0000 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> Message-ID: The is an important one causing problem with SimpleITK and complaints with Slicer users too: https://github.com/vxl/vxl/pull/298 Brad > On May 18, 2016, at 11:34 AM, Matt McCormick wrote: > > There are a many enhancements in VXL master that have not been > sufficiently tested to merge for ITK 4.10 at this point in the release > cycle. > > This patch > > https://github.com/vxl/vxl/commit/ebd2d26bea536a669ce10a88ec21ff28bd659533 > > is a high risk. > > > If there are individual patches that are bug fixes or provide improved > compiler support, please let me know, and I will port them to the ITK > subtree for the 4.10 release. > > Thanks, > Matt > > On Wed, May 18, 2016 at 11:16 AM, D?enan Zuki? wrote: >> Hi Hans, >> >> Python support is included with default installation of VS2015. You just >> need to tick it when installing, or modifying your installation. Or were you >> asking about something different? >> >> Regards >> >> On Tue, May 17, 2016 at 11:07 AM, Johnson, Hans J >> wrote: >>> >>> Thanks Brad. Do you know if this version can be installed along side of >>> VS 2015 without conflicts? >>> >>> >>> >>> Hans >>> >>> -- >>> >>> >>> >>> >>> >>> From: Bradley Lowekamp >>> Date: Tuesday, May 17, 2016 at 9:34 AM >>> To: Hans Johnson >>> Cc: "insight-developers at itk.org" >>> Subject: Re: ITK4.10rc1 SimpleITK VNL error >>> >>> >>> >>> Hans, >>> >>> >>> >>> I?ll take a look into it. Thanks for the offer for a hang out, well go >>> there if needed. >>> >>> >>> >>> I haven?t tries this my self, but there is the Free, VS for Python 2.7, >>> that is suppose to be based on VS9 2008[1]. I don?t know how this works with >>> general CMake project, but maybe it will help improve your access. >>> >>> >>> >>> Brad >>> >>> >>> >>> >>> >>> [1] https://www.visualstudio.com/en-us/features/python-vs.aspx >>> >>> >>> >>> On May 17, 2016, at 10:29 AM, Johnson, Hans J >>> wrote: >>> >>> >>> >>> This is not fixed in VXL upstream. >>> >>> >>> >>> There are currently no windows builds on VXL dashboard: >>> https://open.cdash.org/index.php?project=vxl >>> >>> >>> >>> I don?t see any VS9 builds for ITK either. >>> >>> >>> >>> I?d be happy to help identify a solution, but I don?t have the VS >>> resources. If you would like to have a hang out, I?d be interested in >>> assisting with the fix. >>> >>> >>> >>> Hans >>> >>> >>> >>> -- >>> >>> >>> >>> >>> >>> From: Bradley Lowekamp >>> Date: Tuesday, May 17, 2016 at 9:14 AM >>> To: "insight-developers at itk.org" >>> Cc: Hans Johnson >>> Subject: ITK4.10rc1 SimpleITK VNL error >>> >>> >>> >>> Hello, >>> >>> >>> >>> On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am >>> getting the following compilation error with VS9 2008[1]: >>> >>> >>> >>> 3>3>------ Build started: Project: itkv3p_netlib, Configuration: >>> MinSizeRel x64 ------ >>> >>> 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 >>> ------ >>> >>> 3>2>Compiling... >>> >>> 3>4>Compiling... >>> >>> 3>1>Compiling... >>> >>> 3>2>triangle.c >>> >>> 3>1>vcl_deprecated.cxx >>> >>> 3>4>FStream.cxx >>> >>> 3>3>Compiling... >>> >>> 3>3>v3p_netlib_init.c >>> >>> >>> 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) >>> : fatal error C1189: #error : "Missing definition for SHARED_PTR" >>> >>> >>> >>> Is this addressed in VNL upstream yet? or should I begin looking into it? >>> >>> >>> >>> Thanks, >>> >>> Brad >>> >>> >>> >>> >>> >>> [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 >>> >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-developers >>> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-developers >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From tevain at telecom-paristech.fr Wed May 18 11:40:09 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Wed, 18 May 2016 17:40:09 +0200 (CEST) Subject: [ITK] [ITK-users] Geodesic Active Contour with Shape Guidance Parameters In-Reply-To: <1463578724389-7588865.post@n2.nabble.com> References: <1463578724389-7588865.post@n2.nabble.com> Message-ID: <435157526.59418114.1463586009463.JavaMail.zimbra@enst.fr> Hello, Quote from the ITK book right beside the code snippet that troubles you (at least in my book version, i.e. 4.5): "Before starting the segmentation process we need to also supply the initial best-fit shape estimate. In this example, we start with the unrotated mean shape with the initial x- and y- translation specified through command-line arguments." So startx and starty are the initial translation (of shape model) parameters that are given as the optimizer initialization. The other parameters are the rotation and the principal component multipliers as explained earlier in the example. About the influence, it highly depends on the scale parameters. If you gave them a high scale value relative to others, they are likely to stay stable during the optimization. HTH, Tim ----- Mail original ----- De: "Robert" ?: insight-users at itk.org Envoy?: Mercredi 18 Mai 2016 15:38:44 Objet: [ITK] [ITK-users] Geodesic Active Contour with Shape Guidance Parameters Hello, I was trying out the Geodesic Active Contour with Shape Guidance example from the ITK book, but I can't get the same result as described in the book. There is a parameter called "startx" and "starty" that you need to provide. This isn't explained in the text. How do I need to choose those parameters, and what do they mean/influence? I tried a few different ones, but I don't see any influence, however my "final parameters" result is different than in the book. Also, my output image looks wrong in the sense that it is not rotated at all, it does not seem to find the right spot in the image.... Could anyone explain those parameters to me? -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Active-Contour-with-Shape-Guidance-Parameters-tp7588865.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK 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 May 18 12:16:56 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 18 May 2016 12:16:56 -0400 Subject: [ITK] [ITK-users] Geodesic Active Contour with Shape Guidance Parameters In-Reply-To: <435157526.59418114.1463586009463.JavaMail.zimbra@enst.fr> References: <1463578724389-7588865.post@n2.nabble.com> <435157526.59418114.1463586009463.JavaMail.zimbra@enst.fr> Message-ID: Hi, Additionally, it may be helpful to look at the source code that is used to generate the text: https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx There is also a test in ITK. Turn on BUILD_EXAMPLES and BUILD_TESTING in ITK's CMake configuration. To see the command use to run the test, execute "ctest" from the ITK build tree with the "-V" flag for verbose and "-R" to select the test name. `--> ctest -R GeodesicActiveContourShapePriorCallosumTest -V [...] Start 2489: GeodesicActiveContourShapePriorCallosumTest 2489: Test command: /home/matt/bin/ITK-Clang-MinSizeRel/bin/itkTestDriver "--compare" "/home/matt/bin/ITK-Clang-MinSizeRel/ExternalData/Testing/Data/Baseline/Segmentation/GeodesicActiveContourShapePriorCallosumTest.png" "/home/matt/bin/ITK-Clang-MinSizeRel/Testing/Temporary/GeodesicActiveContourShapePriorCallosumTest.png" "/home/matt/bin/ITK-Clang-MinSizeRel/bin/GeodesicActiveContourShapePriorLevelSetImageFilter" "/home/matt/src/ITK/Examples/Data/BrainMidSagittalSlice.png" "/home/matt/bin/ITK-Clang-MinSizeRel/Testing/Temporary/GeodesicActiveContourShapePriorCallosumTest.png" "120" "85" "60" "102" "88" "83" "6" "1.0" "0.5" "0.02" "/home/matt/src/ITK/Examples/Data/CorpusCallosumMeanShape.mha" "3" "/home/matt/src/ITK/Examples/Data/CorpusCallosumMode%d.mha" "10" "0" 2489: Test timeout computed to be: 1500 2489: 1: 0.045812 [-0.035055221959695966, -0.09800734065323966, 0.04907730547869208, 0.005318973983536123, 10.86828403407632, 1.004596337951197] 2489: 2: 0.042193 [-0.059140664486747936, -0.08336078625977526, 0.04435292989759791, 0.004098441654243041, 10.432127400031401, 0.4590531607561731] 2489: 3: 0.0404411 [-0.07105401413026971, -0.06988223639208144, 0.06116857571760887, 0.0014592130990724208, 11.267062616976325, 0.57187964997921] 2489: 4: 0.0387712 [-0.07105401413026971, -0.06988223639208144, 0.06116857571760887, 0.0014592130990724208, 11.267062616976325, 0.57187964997921] [...] HTH, Matt On Wed, May 18, 2016 at 11:40 AM, Timothee Evain wrote: > Hello, > > Quote from the ITK book right beside the code snippet that troubles you (at least in my book version, i.e. 4.5): > "Before starting the segmentation process we need to also supply the initial best-fit shape estimate. > In this example, we start with the unrotated mean shape with the initial x- and y- translation > specified through command-line arguments." > > So startx and starty are the initial translation (of shape model) parameters that are given as the optimizer initialization. > The other parameters are the rotation and the principal component multipliers as explained earlier in the example. > > About the influence, it highly depends on the scale parameters. > If you gave them a high scale value relative to others, they are likely to stay stable during the optimization. > > HTH, > > Tim > > > ----- Mail original ----- > De: "Robert" > ?: insight-users at itk.org > Envoy?: Mercredi 18 Mai 2016 15:38:44 > Objet: [ITK] [ITK-users] Geodesic Active Contour with Shape Guidance Parameters > > Hello, > I was trying out the Geodesic Active Contour with Shape Guidance example > from the ITK book, but I can't get the same result as described in the book. > There is a parameter called "startx" and "starty" that you need to provide. > This isn't explained in the text. How do I need to choose those parameters, > and what do they mean/influence? I tried a few different ones, but I don't > see any influence, however my "final parameters" result is different than in > the book. Also, my output image looks wrong in the sense that it is not > rotated at all, it does not seem to find the right spot in the image.... > Could anyone explain those parameters to me? > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Active-Contour-with-Shape-Guidance-Parameters-tp7588865.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Wed May 18 14:26:36 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 18 May 2016 14:26:36 -0400 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> Message-ID: Thanks. This patch has been merged to the release branch. M On Wed, May 18, 2016 at 11:38 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: > The is an important one causing problem with SimpleITK and complaints with Slicer users too: > > https://github.com/vxl/vxl/pull/298 > > Brad > > >> On May 18, 2016, at 11:34 AM, Matt McCormick wrote: >> >> There are a many enhancements in VXL master that have not been >> sufficiently tested to merge for ITK 4.10 at this point in the release >> cycle. >> >> This patch >> >> https://github.com/vxl/vxl/commit/ebd2d26bea536a669ce10a88ec21ff28bd659533 >> >> is a high risk. >> >> >> If there are individual patches that are bug fixes or provide improved >> compiler support, please let me know, and I will port them to the ITK >> subtree for the 4.10 release. >> >> Thanks, >> Matt >> >> On Wed, May 18, 2016 at 11:16 AM, D?enan Zuki? wrote: >>> Hi Hans, >>> >>> Python support is included with default installation of VS2015. You just >>> need to tick it when installing, or modifying your installation. Or were you >>> asking about something different? >>> >>> Regards >>> >>> On Tue, May 17, 2016 at 11:07 AM, Johnson, Hans J >>> wrote: >>>> >>>> Thanks Brad. Do you know if this version can be installed along side of >>>> VS 2015 without conflicts? >>>> >>>> >>>> >>>> Hans >>>> >>>> -- >>>> >>>> >>>> >>>> >>>> >>>> From: Bradley Lowekamp >>>> Date: Tuesday, May 17, 2016 at 9:34 AM >>>> To: Hans Johnson >>>> Cc: "insight-developers at itk.org" >>>> Subject: Re: ITK4.10rc1 SimpleITK VNL error >>>> >>>> >>>> >>>> Hans, >>>> >>>> >>>> >>>> I?ll take a look into it. Thanks for the offer for a hang out, well go >>>> there if needed. >>>> >>>> >>>> >>>> I haven?t tries this my self, but there is the Free, VS for Python 2.7, >>>> that is suppose to be based on VS9 2008[1]. I don?t know how this works with >>>> general CMake project, but maybe it will help improve your access. >>>> >>>> >>>> >>>> Brad >>>> >>>> >>>> >>>> >>>> >>>> [1] https://www.visualstudio.com/en-us/features/python-vs.aspx >>>> >>>> >>>> >>>> On May 17, 2016, at 10:29 AM, Johnson, Hans J >>>> wrote: >>>> >>>> >>>> >>>> This is not fixed in VXL upstream. >>>> >>>> >>>> >>>> There are currently no windows builds on VXL dashboard: >>>> https://open.cdash.org/index.php?project=vxl >>>> >>>> >>>> >>>> I don?t see any VS9 builds for ITK either. >>>> >>>> >>>> >>>> I?d be happy to help identify a solution, but I don?t have the VS >>>> resources. If you would like to have a hang out, I?d be interested in >>>> assisting with the fix. >>>> >>>> >>>> >>>> Hans >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> >>>> >>>> From: Bradley Lowekamp >>>> Date: Tuesday, May 17, 2016 at 9:14 AM >>>> To: "insight-developers at itk.org" >>>> Cc: Hans Johnson >>>> Subject: ITK4.10rc1 SimpleITK VNL error >>>> >>>> >>>> >>>> Hello, >>>> >>>> >>>> >>>> On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am >>>> getting the following compilation error with VS9 2008[1]: >>>> >>>> >>>> >>>> 3>3>------ Build started: Project: itkv3p_netlib, Configuration: >>>> MinSizeRel x64 ------ >>>> >>>> 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 >>>> ------ >>>> >>>> 3>2>Compiling... >>>> >>>> 3>4>Compiling... >>>> >>>> 3>1>Compiling... >>>> >>>> 3>2>triangle.c >>>> >>>> 3>1>vcl_deprecated.cxx >>>> >>>> 3>4>FStream.cxx >>>> >>>> 3>3>Compiling... >>>> >>>> 3>3>v3p_netlib_init.c >>>> >>>> >>>> 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) >>>> : fatal error C1189: #error : "Missing definition for SHARED_PTR" >>>> >>>> >>>> >>>> Is this addressed in VNL upstream yet? or should I begin looking into it? >>>> >>>> >>>> >>>> Thanks, >>>> >>>> Brad >>>> >>>> >>>> >>>> >>>> >>>> [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-developers >>>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-developers >>> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From blowekamp at mail.nih.gov Wed May 18 14:28:22 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Wed, 18 May 2016 18:28:22 +0000 Subject: [ITK] [ITK-dev] ITK4.10rc1 SimpleITK VNL error In-Reply-To: References: <3FF9413D-8B06-4A57-A213-3A9E467233B6@mail.nih.gov> <1D0811FD-3C63-4F0E-A7EE-689F54CCA717@uiowa.edu> <77525D9D-3613-4E62-A4E6-C8EE33792676@mail.nih.gov> Message-ID: <856371F5-CAD5-42BB-A1EE-D039CF7DBEFA@mail.nih.gov> Awesome! Thank you! > On May 18, 2016, at 2:26 PM, Matt McCormick wrote: > > Thanks. This patch has been merged to the release branch. > > M > > On Wed, May 18, 2016 at 11:38 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] > wrote: >> The is an important one causing problem with SimpleITK and complaints with Slicer users too: >> >> https://github.com/vxl/vxl/pull/298 >> >> Brad >> >> >>> On May 18, 2016, at 11:34 AM, Matt McCormick wrote: >>> >>> There are a many enhancements in VXL master that have not been >>> sufficiently tested to merge for ITK 4.10 at this point in the release >>> cycle. >>> >>> This patch >>> >>> https://github.com/vxl/vxl/commit/ebd2d26bea536a669ce10a88ec21ff28bd659533 >>> >>> is a high risk. >>> >>> >>> If there are individual patches that are bug fixes or provide improved >>> compiler support, please let me know, and I will port them to the ITK >>> subtree for the 4.10 release. >>> >>> Thanks, >>> Matt >>> >>> On Wed, May 18, 2016 at 11:16 AM, D?enan Zuki? wrote: >>>> Hi Hans, >>>> >>>> Python support is included with default installation of VS2015. You just >>>> need to tick it when installing, or modifying your installation. Or were you >>>> asking about something different? >>>> >>>> Regards >>>> >>>> On Tue, May 17, 2016 at 11:07 AM, Johnson, Hans J >>>> wrote: >>>>> >>>>> Thanks Brad. Do you know if this version can be installed along side of >>>>> VS 2015 without conflicts? >>>>> >>>>> >>>>> >>>>> Hans >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> From: Bradley Lowekamp >>>>> Date: Tuesday, May 17, 2016 at 9:34 AM >>>>> To: Hans Johnson >>>>> Cc: "insight-developers at itk.org" >>>>> Subject: Re: ITK4.10rc1 SimpleITK VNL error >>>>> >>>>> >>>>> >>>>> Hans, >>>>> >>>>> >>>>> >>>>> I?ll take a look into it. Thanks for the offer for a hang out, well go >>>>> there if needed. >>>>> >>>>> >>>>> >>>>> I haven?t tries this my self, but there is the Free, VS for Python 2.7, >>>>> that is suppose to be based on VS9 2008[1]. I don?t know how this works with >>>>> general CMake project, but maybe it will help improve your access. >>>>> >>>>> >>>>> >>>>> Brad >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> [1] https://www.visualstudio.com/en-us/features/python-vs.aspx >>>>> >>>>> >>>>> >>>>> On May 17, 2016, at 10:29 AM, Johnson, Hans J >>>>> wrote: >>>>> >>>>> >>>>> >>>>> This is not fixed in VXL upstream. >>>>> >>>>> >>>>> >>>>> There are currently no windows builds on VXL dashboard: >>>>> https://open.cdash.org/index.php?project=vxl >>>>> >>>>> >>>>> >>>>> I don?t see any VS9 builds for ITK either. >>>>> >>>>> >>>>> >>>>> I?d be happy to help identify a solution, but I don?t have the VS >>>>> resources. If you would like to have a hang out, I?d be interested in >>>>> assisting with the fix. >>>>> >>>>> >>>>> >>>>> Hans >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> From: Bradley Lowekamp >>>>> Date: Tuesday, May 17, 2016 at 9:14 AM >>>>> To: "insight-developers at itk.org" >>>>> Cc: Hans Johnson >>>>> Subject: ITK4.10rc1 SimpleITK VNL error >>>>> >>>>> >>>>> >>>>> Hello, >>>>> >>>>> >>>>> >>>>> On the SimpleITK dashboard with SimpleITK compiled with ITK 4.10rc1 I am >>>>> getting the following compilation error with VS9 2008[1]: >>>>> >>>>> >>>>> >>>>> 3>3>------ Build started: Project: itkv3p_netlib, Configuration: >>>>> MinSizeRel x64 ------ >>>>> >>>>> 3>4>------ Build started: Project: itksys, Configuration: MinSizeRel x64 >>>>> ------ >>>>> >>>>> 3>2>Compiling... >>>>> >>>>> 3>4>Compiling... >>>>> >>>>> 3>1>Compiling... >>>>> >>>>> 3>2>triangle.c >>>>> >>>>> 3>1>vcl_deprecated.cxx >>>>> >>>>> 3>4>FStream.cxx >>>>> >>>>> 3>3>Compiling... >>>>> >>>>> 3>3>v3p_netlib_init.c >>>>> >>>>> >>>>> 3>1>c:\d\vs9\simpleitk-build\itk\modules\thirdparty\vnl\src\vxl\vcl\vcl_compiler.h(940) >>>>> : fatal error C1189: #error : "Missing definition for SHARED_PTR" >>>>> >>>>> >>>>> >>>>> Is this addressed in VNL upstream yet? or should I begin looking into it? >>>>> >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Brad >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> [1] https://open.cdash.org/viewBuildError.php?buildid=4368953 >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-developers >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-developers >>>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-developers >> _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From matt.mccormick at kitware.com Wed May 18 14:28:38 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 18 May 2016 14:28:38 -0400 Subject: [ITK] [ITK-dev] SimpleITK update to ITK 4.10rc1 and VNL issues In-Reply-To: References: <1CB7DF80-F3A1-41BF-8E3D-6E1B90F3D5B3@mail.nih.gov> Message-ID: The patch submitted to upstream VXL has been backported to the ITK release branch. Thanks, Matt On Mon, May 16, 2016 at 11:38 AM, Matt McCormick wrote: > Hi Brad, > > Thanks for testing the RC! > > It looks like that system is running CMake 2.8.11.2. This issue was > addressed in upstream VXL here: > > https://github.com/vxl/vxl/commit/d7d6314fb9846b923a5e90e8f7f65b3ab28bfc8e > > for CMake 2.8.11, but it is evidently still present for CMake 2.8.11.2. > > Here is a patch: > > https://github.com/vxl/vxl/pull/296 > > I am looking at addressing some of the VNL warnings on the ITK > dashboard -- we will do a VXL Git subtree update soon. > > Thanks, > Matt > > On Mon, May 16, 2016 at 9:59 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] > wrote: >> Hans, >> >> I update SimpleITK next to use ITK 4.10rc1 and I am getting some CMake >> errors on the dashboard [1]: >> >> Target "itkvcl" INTERFACE_INCLUDE_DIRECTORIES property contains relative >> path: >> >> "include/ITK-4.10" >> >> >> Do you know if this is addressed in upstream VXL? Does it look familiar? Or >> should I take a dive into the issue? >> >> Thanks, >> Brad >> >> [1] https://open.cdash.org/viewBuildError.php?buildid=4367313 >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-developers >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From emonclus at cs.upc.edu Thu May 19 08:33:29 2016 From: emonclus at cs.upc.edu (Eva Monclus) Date: Thu, 19 May 2016 14:33:29 +0200 Subject: [ITK] ITK 4.9 gdcmDicomDir Message-ID: <573DB299.9080001@cs.upc.edu> Hi, I have been using ITK 3.6 for several years. Now, I'm trying to migrate all my code to the new version of itk (4.9) and I'm having some problems with respect to gdcm support. When using ITK 3.6 there was a class gdcm::DicomDir which was very useful to parse recursively a folder with Dicom files. This class helped me to print for each pacient, its set of studies and for each study, you could obtain its set of series. The goal is to fill in an "Open DICOM" dialog with such information, in order to let the user load a single DICOM Series. I would like to show to the user the set of Dicom series sorted by patient and study. In itk 4.9, is there any helper class to explore available DICOM Series and/or Studies in a folder with DICOM files and subfolders? Thanks in advance, Eva -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Thu May 19 08:57:15 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 19 May 2016 08:57:15 -0400 Subject: [ITK] ITK 4.9 gdcmDicomDir In-Reply-To: <573DB299.9080001@cs.upc.edu> References: <573DB299.9080001@cs.upc.edu> Message-ID: Does this example help? On Thu, May 19, 2016 at 8:33 AM, Eva Monclus wrote: > Hi, > > I have been using ITK 3.6 for several years. Now, I'm trying to migrate > all my code to the new version of itk (4.9) and I'm having some problems > with respect to gdcm support. > When using ITK 3.6 there was a class gdcm::DicomDir which was very useful > to parse recursively a folder with Dicom files. This class helped me to > print for each pacient, its set of studies and for each study, you could > obtain its set of series. The goal is to fill in an "Open DICOM" dialog > with such information, in > order to let the user load a single DICOM Series. I would like to show to > the user the set of Dicom series sorted by patient and study. > > In itk 4.9, is there any helper class to explore available DICOM Series > and/or Studies in a folder with DICOM files and subfolders? > > Thanks in advance, > Eva > > > > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu May 19 13:22:50 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 19 May 2016 13:22:50 -0400 Subject: [ITK] [ITK-users] Strange situation when ITK writes DICOM file In-Reply-To: <1462841109770.29758@sphic.org.cn> References: <1450834862664.8600@sphic.org.cn> <1461914235636.15330@sphic.org.cn> <1462243202460.83843@sphic.org.cn> <1462841109770.29758@sphic.org.cn> Message-ID: Hi Zhuangming, That is great to hear. As far as the data types supported by GDCM that are exposed by ITK, this code snippet is informative: https://github.com/InsightSoftwareConsortium/ITK/blob/417d6a36d01aa3b835855349cc481a9b3dca8506/Modules/IO/GDCM/src/itkGDCMImageIO.cxx#L334-L370 Hope this helps, Matt On Mon, May 9, 2016 at 8:45 PM, ??? wrote: > Hi Matt, > > Thank you for your reply. I have tried to use ITK Git master and the code provided by D?enan, it can work correctly. Thanks again. > > By the way, could you list what data types (e.g. char type) do the updated GDCM support now? > > > Regards, > > Zhuangming Shen > ________________________________________ > From: Matt McCormick > Sent: Thursday, May 5, 2016 10:21 PM > To: ??? > Cc: D?enan Zuki?; insight-users at itk.org > Subject: Re: [ITK-users] Strange situation when ITK writes DICOM file > > Hi Zhuangming Shen, > > GDCM was updated in ITK Git master, to be released in ITK 4.10. > Instructions on how to obtain this version can be found here: > > https://itk.org/Wiki/ITK/Git/Download > > Thanks, > Matt > > On Mon, May 2, 2016 at 10:40 PM, ??? wrote: >> Hi D?enan, >> >> >> Thanks for your prompt response. I used ITK 4.9.1 and your attached code >> (just changed inDir and outFile) to test both public DICOM data >> (http://www.osirix-viewer.com/datasets/DATA/BREBIX.zip) and private DICOM >> data, the results are still incorrect (please see the attached screenshot). >> What's the problem? >> >> >> Besides, as far as I know, rescaling the intensity from short type to char >> type leads to lose precision because the DICOM tags ( (0028,0100) and >> (0028,0101) ) show the BitsAllocated is 16-bits and the BitsStored is >> 12-bits. Consequently, this solution doesn't seem to be a good solution. Is >> it possible to output the DICOM file by other tools (e.g. DCMTK) if the GDCM >> doesn't support short type? >> >> >> >> Regards, >> >> >> Zhuangming Shen >> >> >> >> >> ________________________________ >> From: D?enan Zuki? >> Sent: Friday, April 29, 2016 9:59 PM >> To: ??? >> Cc: insight-users at itk.org; Matt McCormick >> >> Subject: Re: [ITK-users] Strange situation when ITK writes DICOM file >> >> Hi Shen, >> >> GDCM version was updated recently. It now complains that short type is >> unsupported, and works correctly with char type. I attached an example which >> rescales the intensity and works correctly. >> >> Regards, >> D?enan >> >> On Fri, Apr 29, 2016 at 3:17 AM, ??? wrote: >>> >>> Hi D?enan, >>> >>> >>> I'd like to know if the bug regarding 3D DICOM writer has been fixed. When >>> I tried to run the same code but using ITK 4.9.1, I still got the same >>> results, i.e. the output DICOM file does not properly record original >>> image's origin and spacing. >>> >>> >>> >>> Regards, >>> >>> >>> Zhuangming Shen >>> >>> ________________________________ >>> From: D?enan Zuki? >>> Sent: Saturday, December 26, 2015 1:44 AM >>> To: ??? >>> Cc: insight-users at itk.org >>> Subject: Re: [ITK-users] Strange situation when ITK writes DICOM file >>> >>> I have confirmed this bug and entered it into tracker along with a DICOM >>> series which reproduces it. >>> >>> Thanks Shen >>> >>> On Tue, Dec 22, 2015 at 8:41 PM, ??? wrote: >>>> >>>> Hi all, >>>> >>>> >>>> I met a very strange situation when I used ITK 4.8.1. I'd like to read a >>>> DICOM series, write it to a DICOM file (i.e. save the volume created by the >>>> DICOM series to a .dcm file), and read the DICOM file. Theoretically, the >>>> DICOM series and the DCM file should have the same information, e.g origin, >>>> spacing, size. However, My results show me that the information has been >>>> changed. When I use other ITK-support file format (e.g. nii, nrrd), the >>>> information has not been changed. It seems a bug. My code and results are >>>> listed as below. Has anyone met the same situation? >>>> >>>> >>>> Regards, >>>> >>>> >>>> Zhuangming Shen >>>> >>>> >>>> >>>> >>>> ================ My code ================= >>>> >>>> >>>> import itk >>>> >>>> input_dir = "/home/zshen/workspace/Data/testDCM/bbb" >>>> output_filename = "/home/zshen/workspace/Data/bbb2.dcm" >>>> >>>> # read DICOM series >>>> dicom_io = itk.GDCMImageIO.New() >>>> >>>> reader = itk.ImageSeriesReader[itk.Image.SS3].New() >>>> reader.SetImageIO(dicom_io) >>>> >>>> name_generator = itk.GDCMSeriesFileNames.New() >>>> name_generator.SetUseSeriesDetails(True) >>>> name_generator.SetDirectory(input_dir) >>>> >>>> series_uid = name_generator.GetSeriesUIDs() >>>> >>>> series_identifier = series_uid[0] >>>> >>>> file_names = name_generator.GetFileNames(series_identifier) >>>> >>>> reader.SetFileNames(file_names) >>>> reader.Update() >>>> >>>> print("**** series DICOM information: *****") >>>> print("size: >>>> "+str(reader.GetOutput().GetLargestPossibleRegion().GetSize())) >>>> print("origin: "+str(reader.GetOutput().GetOrigin())) >>>> print("spacing: "+str(reader.GetOutput().GetSpacing())) >>>> >>>> writer = itk.ImageFileWriter[itk.Image.SS3].New() >>>> writer.SetInput(reader.GetOutput()) >>>> writer.SetFileName(output_filename) >>>> writer.Update() >>>> >>>> # read again >>>> reader2 = itk.ImageFileReader[itk.Image.SS3].New() >>>> reader2.SetFileName(output_filename) >>>> reader2.Update() >>>> >>>> print("**** DICOM information: *****") >>>> print("size: >>>> "+str(reader2.GetOutput().GetLargestPossibleRegion().GetSize())) >>>> print("origin: "+str(reader2.GetOutput().GetOrigin())) >>>> print("spacing: "+str(reader2.GetOutput().GetSpacing())) >>>> >>>> >>>> ================= My results ==================== >>>> >>>> **** series DICOM information: ***** >>>> size: itkSize3 ([512, 512, 118]) >>>> origin: itkPointD3 ([-229.5, -96.5, -553]) >>>> spacing: itkVectorD3 ([0.896484, 0.896484, 3]) >>>> **** DICOM information: ***** >>>> size: itkSize3 ([512, 512, 118]) >>>> origin: itkPointD3 ([0, 0, 0]) >>>> spacing: itkVectorD3 ([0.896484, 0.896484, 1]) >>>> >>>> >>>> >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>> >> _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From cgodshall at enthought.com Thu May 19 14:11:20 2016 From: cgodshall at enthought.com (Courtenay Godshall (Enthought)) Date: Thu, 19 May 2016 13:11:20 -0500 Subject: [ITK] [ITK-users] SciPy 2016 Conference (Scientific Computing with Python): Tutorials and Talks Announced In-Reply-To: <014401d1b1f9$c51250e0$4f36f2a0$@enthought.com> References: <010c01d1b1f9$58adc010$0a094030$@enthought.com> <011401d1b1f9$6a748810$3f5d9830$@enthought.com> <011c01d1b1f9$7b622e20$72268a60$@enthought.com> <012401d1b1f9$8c646da0$a52d48e0$@enthought.com> <013101d1b1f9$aa4e5b50$feeb11f0$@enthought.com> <013c01d1b1f9$b5bf9620$213ec260$@enthought.com> <014401d1b1f9$c51250e0$4f36f2a0$@enthought.com> Message-ID: <014c01d1b1f9$d8abb600$8a032200$@enthought.com> **ANN: SciPy 2016 Conference (Scientific Computing with Python): Tutorials and Talks Announced** We're excited to announce this year's accepted Talks & Posters and Tutorial Schedule ! This year's 3 major talk tracks include Python in Data Science, High Performance Computing, and general Scientific Computing. Our six mini-symposia include: Earth and Space Science, Engineering, Medicine and Biology, Case Studies in Industry, Education, and Reproducibility. For tutorials, you can choose from 18 different SciPy tutorials, including a 1 day Software Carpentry Scientific Python course that assumes some programming experience but no Python knowledge, or a 2-day Software Carpentry Instructor Training. We hope you'll join us - early bird registration ENDS May 22, 2016. Register at: http://scipy2016.scipy.org/ehome/146062/332936/ About SciPy 2016 SciPy 2016 , the 15th annual Scientific Computing with Python conference, will be held July 11-17, 2016 in Austin, Texas. SciPy is a community dedicated to the advancement of scientific computing through open source Python software for mathematics, science, and engineering. The annual SciPy Conference brings together over 650 participants from industry, academia, and government to showcase their latest projects, learn from skilled users and developers, and collaborate on code development. The full program will consist of 2 days of tutorials (July 11-12), 3 days of talks (July 13-15), and 2days of developer sprints (July 16-17). More info is available on the conference website at http://scipy2016.scipy.org (where you can sign up for the mailing list); or follow @scipyconf on Twitter. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Thu May 19 14:14:06 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 19 May 2016 14:14:06 -0400 Subject: [ITK] [ITK-dev] mug ITK Nightly non-zero return value in ctest Message-ID: Hi Dave, Thanks for submitting the ITK Windows Nightly. Sometime we are getting the opaque build error: *** WARNING non-zero return value in ctest from: C:\Program Files (x86)\CMake\bin\cmake.exe https://open.cdash.org/viewBuildError.php?type=1&buildid=4372761 Do you know what is happening with this build? Thanks, Matt _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From matt.mccormick at kitware.com Thu May 19 15:20:52 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 19 May 2016 15:20:52 -0400 Subject: [ITK] [ANN] ITK 4.10 Release Candidate 2 is ready for testing! Message-ID: On behalf of the Insight Toolkit community, we are proud to announce that ITK 4.10 release candidate 2 has been tagged and is available for testing! Please take this opportunity to test the new features in the release candidate. To obtain the source code, git clone https://itk.org/ITK.git cd ITK git checkout -q --detach v4.10rc02 For more details, please see the Git documentation [1]. A few selected highlights for this release: * New Remote module: TwoProjectionRegistration performs simultaneous registration of two projection images to a 3D image volume, which is useful for external beam radiotherapy and other applications. It uses Powell?s method for optimization and the Siddon-Jacobs fast ray-tracing algorithm. * First update to internal VNL in five years. Many improvements were made to upstream VNL. We now push patches upstream and stay in sync via a Git subtree workflow. * Windows builds now support processing 4GB+ images by default * GDCM updated for better DICOM support Additionally, in the Python wrapping, type specification is no longer necessary during the creation of most filters. The required type is inferred from a primary input passed on filter creation. For example, instead of the explicit type specification: median = itk.MedianImageFilter[ImageType, ImageType].New() median.SetInput(reader.GetOutput()) It is now possible to call: median = itk.MedianImageFilter.New(Input=reader.GetOutput()) Or, the shortened: median = itk.MedianImageFilter.New(reader.GetOutput()) Or: median = itk.MedianImageFliter.New(reader) An itk.ImageFileReader can be created by specifying the FileName during instantiation: reader = itk.ImageFileReader.New(FileName=?inputFile.mha?) Please test the release candidate and share your experiences on the mailing list, issue tracker, and Gerrit Code Review. An Experimental build, which demonstrates how the test suite performs on your local build system, can be submitted to the dashboard [2] with: mkdir ../ITK-build cd ../ITK-build cmake ../ITK ctest -j 4 -M Experimental -T Configure -T Build -T Test -T Submit Visual Studio builds must also add ?-C Release? to the ctest command. Notify the mailing list if there are any unexpected failures. Testing your own applications against the RC is also appreciated. Congratulations to the 26 contributors to this release. We would especially like to recognize the new contributors: Andrey Fedorov, Sujin Philip, Francois Budin, and b'Alvaro Sanchez. The 4.10.0 final release is scheduled for the end of May. [1] http://www.itk.org/Wiki/ITK/Git [2] http://open.cdash.org/index.php?project=Insight New Features =========== * Wrapping improvements ---------------------------------------- * ITK_USE_64BITS_IDS supported on Windows * Faster builds (CastXML calls and build targets reduced by half) * Faster runtime loading and smaller binary size due to hidden symbol visibility * Wrapping with BUILD_SHARED_LIBS disabled is supported * Do not link to libpython when possible * Filter types do not need to be specified when ?Input=inputImage? is specified in the constructor * Improved wrapping class coverage * Visual Studio 2015 Update 2 Supported * New Remote Module ----------------------------------- * TwoProjectionRegistration * 2D-3D registration designed for radiotherapy * http://hdl.handle.net/10380/3245 * Core Improvements --------------------------------- * Data and build tool downloads now over HTTPS * Extended constexpr usage with ITK_CONSTEXPR and ITKCONSTEXPR_FUNC macros * ITK_USE_64BITS_IDS, required to process 4GB+ images on Windows, now enabled by default * VNL updated and modernized * CMake configuration major modernization * vcl has been removed in favor of the standard libraries * vnl_math_ function avoided in favor of std:: and itk::Math * VNL had suppressed integer data conversion warnings on Visual Studio (C4257); this suppression has been removed and all warnings addressed * Various improvements for building a module externally against an ITK build tree * CMAKE_POSITION_INDEPENDENT_CODE is enabled by default * Improved EXERCISE_BASIC_OBJECT_METHODS testing macro * Filtering Improvements --------------------------------------- * RGB pixel support added to itk::ImageToVTKImageFilter * itk::Box* filters moved out of the Review module * itk::GaussianDerivativeOperator moved out of the Review module * MaskLabel is deprecated in N4BiasFieldCorrectionFilter in favor any non-zero pixel * Registration Improvements ------------------------------------------- * Fixed and moving masks added to the v4 registration methods * Documentation Improvements -------------------------------------------------- * Updates to the Software Guide, Doxygen, Wiki and Sphinx Examples * Third Party Library Updates --------------------------------------------- * pygccxml updated to v1.7.3 * GDCM updated to the release branch latest * VNL updated to latest upstream * MINC updated to the latest upstream * SWIG updated to v3.0.8 * PCRE update to v8.38 * Improved code coverage -- we are at 85.0%! * *Lots* of important bug fixes * And much more! See details in the log below. Changes from v4.10rc01..v4.10rc02 ------------------------------------------------ Davis Vigneault (1): BUG: Improve error checking and testing for ConnectedRegionsMesh Hyun Jae Kang (2): BUG: Address the issue of "Missing Delete" within SwapZeroCornerToIRP. COMP: Fixed Mac OSX wrapping configuration warning Matthew McCormick (6): BUG: The ImageFileReader internal pipeline methods should be protected. BUG: Use new VNL include directory variables. COMP: Add missing NeighborhoodAccessor methods to PhasedArray3D image. BUG: Adjust itk.org ExternalData URL. COMP: Do not use target_include_directories with CMake 2.8.11.2. BUG: Address missing shared_ptr for VS9 Changes from v4.9.0..v4.10rc01 ------------------------------------------------ Alvaro Sanchez (1): STYLE: moved itkKappaSigmaThresholdImageFilter/Calculator from Nonunit/Review Andrey Fedorov (2): BUG: Add missing itk_expat_mangle.h install target BUG: fix typo in file name Bill Hoffman (2): COMP: fix shared build on Windows when Review is on. COMP: work around for VS 2015 optimizer bug causing test failures. Bill Lorensen (6): ENH: Bump version for style fixups. ENH: Bump wiki examples version, new remote module process ENH: Bump wiki examples version, new remote module process STYLE: SuperClass should be Superclass COMP: Resolve clang linkage issue BUG: Valgrind detected an invalid read Bradley Lowekamp (21): BUG: Compilation problem with GCC 4.1 and explicit instantiation ENH: Update Insight Journal handle links to https ENH: Adding const qualifier to results BUG: Adding missing const qualifier for GetConfusionMatrix method BUG: Use Set/GetMacros, fix const correctness and PrintSelf. ENH: added inlined Zero and one values for integer NumericTraits ENH: Use constexpr for floating point NumericTraits ENH: Make NumericTraits functions constexpr for intrinsic BUG: Add definition of static constexpr NumericTrait members BUG: Declared static constexpr members need to be defined as constexpr ENH: ITK_CONSTEXPR_FUNC implies inline BUG: Addressing VS10 and VS11 NumericTraits linkage issue BUG: Use LargestPossible region for BSpline domain BUG: Remove errant file COMP: Address warning about this usage in initializer list ENH: Prefer ZeroValue function over variable STYLE: Use consistent path for try_compiles binary directory BUG: Don't use "=" in cmake variable name ENH: Test address of NumericTraits One and Zero constexpr ENH: Use ITK_USE_64BITS_IDS for windows 64 by default ENH: Enable run-time dependency on Python library Davis Vigneault (4): ENH: Update itkFileTools to allow std::string arguments. ENH: Add Floored and Truncated Modulus to VNL ENH: Add Ternary Operator Image Filter STYLE: Prefer static cast D?enan Zuki? (1): ENH: CovariantVector's Normalize returns the norm. Francois Budin (6): PERF: Simplify itkTemplate New() input type identification. ENH: Avoid template type specification for image reader in Python wrapping BUG: Missing IOPixelType strings in ImageIOBase BUG: Wrapping intermediate files were not automatically updated ENH: Reduce number of dependencies for XML files generated for wrapping BUG: GCC is limited when calling overloaded base class functions GCC-XML Upstream (1): ENH: pygccxml v1.7.3 (reduced) GDCM Upstream (1): GDCM 2015-09-02 (1efe9e28) Hans Johnson (27): COMP: Static analysis warning COMP: Incorrect delete found by static analysis PERF: Avoid temporary std:vector copying. COMP: Provide VXL backward compatible includes COMP: ITK requires legacy methods ENH: Need propagate ITK_LIBRARY_PROPERTIES ENH: Added UpdateFromUpstream.sh for VNL ENH: Manual copy from vxl/master STYLE: vnl_math_[min|max] -> std::[min|max] STYLE: Text files should end with a newline COMP: Prefer C++11 constexpr when possible COMP: Prefer C++11 constexpr when possible ENH: Simplify std:: math function definitions COMP: Error in constexpr usage COMP: Add const to previous const variables COMP: SizeValueType can has different definition for itkArray ENH: Added utility for modernizing vcl_ to std:: ENH: Reference vnl_math.h constants directly ENH: Avoid using vnl_math_ functions COMP: Missing symbol for itkStaticConstMacro COMP: Function override missing in BioCell ENH: Convert vcl_ to std:: BUG: Windows vcl_snprintf failures addressed COMP: Disabmiguate function calls to SetData ENH: Provided static code API for external applications COMP: Remove possible type conversion warnings ENH: Merge GDCM release branch Hyun Jae Kang (25): COMP: Fixed the compiler error of ITKCommon2TestDriver on OSX 10.6 BUG: Fixed the runtime crash of VideoSourceTest on OSX 10.6 BUG: Fixed the runtime crash of itkTimeProbeTest2 BUG: Fixed the runtime crash of ITKFastMarchingTestDriver's tests on OSX 10.6 BUG: Fixed the runtime crash of ITKReviewTestDriver on OSX 10.6 COMP: Fixed the data conversion warning messages of itkResourceProbe BUG: Fixed the runtime crash of itkLabelOverlapMeasuresImageFilterTest BUG: Fixed the runtime crash of ITKStatisticsTestDriver tests on OSX 10.6 BUG: Fixed the runtime crash of itkMRIBiasFieldCorrectionFilterTest BUG: Fixed the runtime crash of itkBinaryShapeOpeningImageFilterTest1 BUG: Fixed the runtime crash of vnl_test_complex on OSX 10.6 BUG: Fixed the runtime crash of vnl_test_numeric_traits BUG: Fixed the runtime crash of test_pow_log on OSX 10.6 BUG: Exclude a test code of ITKLabelMapTestDriver on OSX 10.6 BUG: Fixed the failed test case of itkSTLThreadTest on OS X 10.8 COMP: Update KWStyle to utilize the latest boost library COMP: Fixed the compiler error of ITK on Mingw-w64 COMP: Temporarily suppress the warning messages of data-conversion on VS14 COMP: Put back the disappeared option of "BUILD EXAMPLES". BUG: Fix segmentation faults on mingw-W64 x86_64. BUG: Fix the failed test of itkCastImageFilterTest on mingw-w64 compiler. COMP: Fixed the cmake configuration for ITK_WRAP_DOC COMP: Fixed the warning messages on VS14. COMP: Add a missing head file at itkNumericTraitsStdVector.h COMP: Fix the wraning message of data-conversion Jean-Christophe Fillion-Robin (4): COMP: ITKExternalModule: Support building module without test directory. STYLE: Facilitate maintenance of CastXML generator refactoring CMakeLists COMP: Allow use of multiple "ITK external modules" in the same project. STYLE: UseITK: Document static registration of ITK IO factories. See #3393 Jon Haitz Legarreta (7): COMP: Delete unused variable compiler warning. ENH: Refactored itkBioCellTest ENH: Exercise non-tested itk::Math methods. ENH: Improve MersenneTwister class and test. ENH: Improve itkFEMLoadPoint coverage. ENH: Improve itkVersion class code coverage. ENH: Perform class name checks in test macro KWSys Robot (1): KWSys 2016-03-09 (36d8666f) Lucas Gandel (9): ENH: Implement GetNumberOfParameter() in ImageToSpatialObjectMetric COMP: Enable wrapping of multiple "ITK external modules" in the same project COMP: Fix CASTXML_EXECUTABLE value for multiple external module COMP: Fix external module testing COMP: Fix git protocol setup ENH: Conditionally add testing for External Modules BUG: Fix call to std::max() with different variable types Manuel Grizonnet (1): COMP: add ITKCommon_EXPORT to fix link issues with external applications Matthew McCormick (73): ENH: Add TwoProjectionRegistration Remote Module. ENH: Allow ITKVideoBridgeOpenCV to be built externally. COMP: Add export specification for itk::ResourceProbe. ENH: Do not force shared libraries when wrapping. BUG: BUILD_TESTING should be not advanced. ENH: Bump ITK version to 4.10.0. DOC: Correct ITKImageNoise description spelling. ENH: Wrap FFTNormalizedCorrelationImageFilter. BUG: Remove Azure ExternalData resource. BUG: ExternalData downloads from midas3.kitware.com only supports https. BUG: Update ExternalData resource. BUG: slicer.kitware.com/midas3/ ExternalData will not support http. ENH: Add ITK_CUSTOM_LIBRARY_SUFFIX variable. ENH: Wrap PipelineMonitorImageFilter. BUG: Update MIDAS url for https in archive testing data script. ENH: Wrap std::vector< itk::ImageRegion >. BUG: Fix wrapping build with DEFAULT_MODULES OFF. ENH: Add RGB pixel support to ImageToVTKImageFilter. ENH: Add RGB and vector pixel type wrapping for ImageToVTKImageFilter. STYLE: Use PixelType and ImageType in Python tests. ENH: Avoid template type specification in Python wrapping. COMP: Do not use has_key in itkTemplate New. DOC: Emphasize that push access is not required to contribute patches. ENH: Download SWIG and PCRE from midas3.kitware.com. COMP: Ignore build warning from KWStyle's boost. BUG: Remove Azure ExternalData resource. BUG: ExternalData downloads from midas3.kitware.com only supports https. BUG: slicer.kitware.com/midas3/ ExternalData will not support http. ENH: Update the VNL README-ITK.txt subtree commit revision. BUG: Mark VXL internal CMake variables as advanced. BUG: Run itk_module_target on itknetlib. DOC: Direct patches for VXL upstream to the GitHub repository. BUG: Run itk_module_target on itknetlib. COMP: Account for removal of vcl_* from upstream VXL. COMP: Remove itkTypeMacro from BioCellHelper. COMP: Convert itkBioCellTest arguments from double to int. COMP: Turn off BUILD_DOCUMENTATION for VNL. BUG: Install VXL config files to backwards-compatible locations. ENH: Remove vcl_complex from the wrapping. BUG: Install vnl_export.h and vnl_algo_export.h to previous locations. BUG: midas3.kitware.com only supports the https protocol. BUG: ImageIOBase SetDimensions should take SizeValueType. ENH: Add wrapping for ImagePCAShapeModelEstimator. COMP: Do not specify COMPONENTS with find_package(VTK. DOC: Fix FFTW warning grammar. COMP: Build against system HDF5 1.8.16. ENH: Set a default CMAKE_BUILD_TYPE when building a module externally COMP: Make initial HDF5 discovery of 1.8.16 quiet. ENH: Use hidden symbol visibility for the CPython extension modules. ENH: Turn on CMAKE_POSITION_INDEPENDENT_CODE by default. BUG: FEMLoadPoint uninitialized value in the constructor. BUG: Fix wrapping of complex types in VNL. ENH: Bump CMakeLists.txt version 4.9.1. COMP: Address ITKCommon Python submodule order. BUG: Extend ExternalData_TIMEOUT_ABSOLUTE to 900 seconds. BUG: Do not run KWStyle Git config on a release tarball. COMP: Ambiguous RGBPixel access in CustomColormapFunction. BUG: Prevent division by zero in PhasedArray3DSpecialCoordinatesImage. BUG: Initialize azimuth and elevation to pi/2 in PhasedArray3D. BUG: Increase MaskLabel backwards compatibility in N4 bias correction. ENH: Deprecate MaskLabel in N4BiasFieldCorrectionImageFilter. COMP: Update CastXML to support Visual Studio 2015 Update 2. COMP: Do not set wrapping library visibility with static builds. COMP: Update CastXML to support Visual Studio 2015 Update 2. COMP: Broaden the KWStyle warning exception. COMP: Update KWStyle version. BUG: Do not use the same output file in N4BiasField Test 2,3. COMP: Expand EXERCISE_BASIC_OBJECT_METHODS for other GCC versions. ENH: Update Cuberille Remote to 2015-05-01. ENH: Enable registration of the IOOpenSlide module through CMake. ENH: Update itk.org URL's for HTTPS support. BUG: Use CastXML built against LLVM with LLVM_ENABLE_TERMINFO OFF. BUG: Fix Python wrapping on Windows when ITK_USE_64BIT_IDS is ON. Michka Popoff (12): ENH: Use importlib for python 3.4 instead of imp ENH: Update to Swig 3.0.8 ENH: Update PCRE to version 8.38 ENH: Wrap RayCastInterpolateImageFunction ENH: Wrap RayCastInterpolateImageFunction COMP: Remove debug output after vcl_complex removal from wrapping ENH: Consolidate .idx file generation with swig .i generation. ENH: Update UpdatepygccxmlFromUpstream.sh script COMP: Set CastXML path and name for pygccxml 1.7.3 COMP: Fix RayCastInterpolateImageFunction wrapping for image dim 2 ENH: Use argparse instead of optparse in igenerator.py ENH: Use https URL for OS X castxml binary (for consistency) Nick Tustison (2): ENH: Add fixed/moving masking in reg. methods. ENH: Making the mask usage consistent with ITK. Pablo Hernandez-Cerdan (1): COMP: Fix warn in FFTW about delete []. Sean McBride (18): COMP: Made script OS X compatible COMP: mark GDCM GetSeriesHelper() method as deprecated BUG: update script to fetch GDCM from its release-2-4 branch instead of master DOC: Updated comment to reflect new GDCM version COMP: Fixed recently introduced build error with deprecated GDCM method BUG: Fixed invalid memory access found by ASan COMP: Fixed clang warning about macro expansion giving defined COMP: Fixed minor dashboards warnings and typos. COMP: Fixed a bunch of clang -Wunreachable-code-break warnings COMP: fixed some dashboard warnings (dead code, false positive) BUG: Fixed off-by-1 error found by ASan COMP: Fixed clang -Wcomma warning COMP: Introduce ITK_FALLTHROUGH, to suppress switch fall through warnings COMP: Fixed -Wwritable-strings warnings COMP: Fixed remaining -Wcomma warnings ENH: switch gdcm to release branch, not release-2-4 COMP: Hack HDF5 to build under ASan & UBSan COMP: fixed clang -Wdeprecated-writable-strings warning Shawn Waldon (1): STYLE: move itkGaussianDerivativeOperator Sujin Philip (1): STYLE: Move itkBox* Filters Sumedha Singla (3): ENH: Issue: ITK#3363 Replaced assignment in SetParameters function. ENH: Remove unnecessary const_cast BUG: Fixed the test itkHDF5ImageIOTest VXL Maintainers (9): VNL 2015-11-22 (ea1d60fb) VNL 2016-03-02 (cb31149e) VNL 2016-03-13 (ae34f0fc) VNL 2016-03-15 (751698ab) VNL 2016-03-19 (df10fefa) VNL 2016-03-25 (f0040231) VNL 2016-03-30 (88f50849) VNL 2016-04-22 (0ed18124) VNL 2016-04-26 (6b168535) Vladimir S. FONOV (3): MINC 2015-12-17 (dcb93a5f) MINC 2016-01-30 (783bca38) MINC 2016-02-24 (8632513e) Ziv Yaniv (1): BUG: Interpretation of the Euler angles ZYX or ZXY was not exported. ----------------------------------------------------- Errors or omissions? Please fix them here: https://docs.google.com/document/d/1n6xDC3phae7bH40OVO-QTECZ6gKRlPr1dwZR3fydzfU/edit From Tao.Zhao at intusurg.com Thu May 19 23:40:40 2016 From: Tao.Zhao at intusurg.com (Tao Zhao) Date: Fri, 20 May 2016 03:40:40 +0000 Subject: [ITK] [ITK-users] Switching between debug and release libaraies in Visual Studio Message-ID: Hi, This might be a cmake question but it is related on how to use itk. I built ITK in both debug and release modes and had them installed under ITK - Debug - Release I would like my application to link against ITK debug libs in debug mode and release libs in release mode. I can easily do this under qtcreator. However when I am using Visual Studio, ${CMAKE_BUILD_TYPE} does not take effect. I know there is a way if the libs are in one folder but have different names. I was wondering how can I achieve this with standard ITK set up (i.e., not using different names but using different path for debug and release libs). Thank you very much! Tao -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From zhuangming.shen at sphic.org.cn Fri May 20 05:00:52 2016 From: zhuangming.shen at sphic.org.cn (=?gb2312?B?yfLXr8P3?=) Date: Fri, 20 May 2016 09:00:52 +0000 Subject: [ITK] [ITK-users] Iterator for python supported ITK Message-ID: <1463734848567.2024@sphic.org.cn> Hi all, Could anyone give me an example on "itk::ImageRegionIterator" using Python supported ITK? I can't find the wrapped "iterator". Thanks in advance. Regards, Zhuangming Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Fri May 20 08:00:08 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 20 May 2016 08:00:08 -0400 Subject: [ITK] [ITK-users] Iterator for python supported ITK In-Reply-To: <1463734848567.2024@sphic.org.cn> References: <1463734848567.2024@sphic.org.cn> Message-ID: Hi Zhuangming, Iterating through pixels is slow in Python -- the iterators may not be wrapped because it is always a good idea to use C++ in this case. HTH, Matt On Fri, May 20, 2016 at 5:00 AM, ??? wrote: > Hi all, > > > Could anyone give me an example on "itk::ImageRegionIterator" using Python > supported ITK? I can't find the wrapped "iterator". Thanks in advance. > > > > Regards, > > > Zhuangming Shen > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From dzenanz at gmail.com Fri May 20 09:58:48 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 20 May 2016 09:58:48 -0400 Subject: [ITK] [ITK-users] Switching between debug and release libaraies in Visual Studio In-Reply-To: References: Message-ID: Hi Tao, with standard ITK setup, you don't have to do anything special. CMake takes care of setting up paths so you just switch between Debug and Release in your application which uses ITK. Regards, D?enan On Thu, May 19, 2016 at 11:40 PM, Tao Zhao wrote: > Hi, > > > > This might be a cmake question but it is related on how to use itk. > > > > I built ITK in both debug and release modes and had them installed under > > ITK > > - Debug > > - Release > > > > I would like my application to link against ITK debug libs in debug mode > and release libs in release mode. I can easily do this under qtcreator. > However when I am using Visual Studio, ${CMAKE_BUILD_TYPE} does not take > effect. I know there is a way if the libs are in one folder but have > different names. I was wondering how can I achieve this with standard ITK > set up (i.e., not using different names but using different path for debug > and release libs). > > > > Thank you very much! > > > Tao > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Fri May 20 10:45:40 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 20 May 2016 10:45:40 -0400 Subject: [ITK] [ITK-dev] mug ITK Nightly non-zero return value in ctest In-Reply-To: References: Message-ID: Thanks for the note. Anecdotally, I have also encountered this error: > C:/Program Files (x86)/Windows Kits/8.1/bin/x86/mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file "bin\ITKIOPNGTestDriver.exe". The syst em cannot open the device or file specified. MT failed. when using ninja. I did not find the underlying cause, but I did find that using a different shell (Git Bash vs a shell within ConEmu) helped. A Google search identifies this behavior with anti-virus checker interference. Thanks, Matt On Fri, May 20, 2016 at 10:29 AM, David Cole wrote: > I do not know. There must be some sort of build error which ctest is > not properly detecting. > > The log of the stderr shows only "Error(s) when building project": > > ElapsedTime='0' delta='0' context='EasyDashboardVariables-TopOfScript' > ElapsedTime='0' delta='0' context='EasyDashboardVariables-BottomOfScript' > ElapsedTime='0' delta='0' context='EasyDashboard-TopOfScript' > ElapsedTime='0' delta='0' context='before > CTEST_EMPTY_BINARY_DIRECTORY("C:/n/r/Nightly/ITK > Win32-ninja-cl12-Release")' > ElapsedTime='49' delta='49' context='after > CTEST_EMPTY_BINARY_DIRECTORY("C:/n/r/Nightly/ITK > Win32-ninja-cl12-Release")' > ElapsedTime='49' delta='0' context='before CTEST_START("Nightly" )' > ElapsedTime='49' delta='0' context='after CTEST_START("Nightly" )' > ElapsedTime='49' delta='0' context='before CTEST_UPDATE("C:/n/r/ITK")' > ElapsedTime='113' delta='64' context='after CTEST_UPDATE("C:/n/r/ITK")' > ElapsedTime='113' delta='0' context='before > CTEST_CONFIGURE("C:/n/r/Nightly/ITK Win32-ninja-cl12-Release")' > ElapsedTime='370' delta='257' context='after > CTEST_CONFIGURE("C:/n/r/Nightly/ITK Win32-ninja-cl12-Release")' > ElapsedTime='370' delta='0' context='before > CTEST_READ_CUSTOM_FILES("C:/n/r/Nightly/ITK > Win32-ninja-cl12-Release")' > ElapsedTime='370' delta='0' context='after > CTEST_READ_CUSTOM_FILES("C:/n/r/Nightly/ITK > Win32-ninja-cl12-Release")' > BullseyeCoverage Build Enable/Disable 8.8.11 Windows License 9529 > > Copyright (c) Bullseye Testing Technology 1990-2014 > > ElapsedTime='370' delta='0' context='before > CTEST_SUBMIT(PARTS;Notes;Update;Configure)' > ElapsedTime='372' delta='2' context='after > CTEST_SUBMIT(PARTS;Notes;Update;Configure)' > ElapsedTime='372' delta='2' context='before > CTEST_BUILD("C:/n/r/Nightly/ITK Win32-ninja-cl12-Release")' > Error(s) when building project > ElapsedTime='615' delta='243' context='after > CTEST_BUILD("C:/n/r/Nightly/ITK Win32-ninja-cl12-Release")' > ElapsedTime='615' delta='0' context='before CTEST_SUBMIT(PARTS;Build)' > ElapsedTime='615' delta='0' context='after CTEST_SUBMIT(PARTS;Build)' > ElapsedTime='615' delta='0' context='before > CTEST_TEST("C:/n/r/Nightly/ITK Win32-ninja-cl12-Release" > PARALLEL_LEVEL;4)' > Unable to find executable: C:/n/r/Nightly/ITK > Win32-ninja-cl12-Release/bin/ITKImageNoiseTestDriver.exe > Unable to find executable: C:/n/r/Nightly/ITK > Win32-ninja-cl12-Release/bin/ITKImageNoiseTestDriver.exe > ... > thousands more lines like this > ... > > > I tried rebuilding manually, and got this error: > > [1894/3315] Linking CXX executable bin\ITKIOPNGTestDriver.exe > FAILED: cmd.exe /C "cd . && "C:\Program Files > (x86)\CMake\bin\cmake.exe" -E vs_link_exe C: > \PROGRA~2\MICROS~2.0\VC\bin\link.exe /nologo > Modules\IO\PNG\test\CMakeFiles\ITKIOPNGTestDr > iver.dir\ITKIOPNGTestDriver.cxx.obj > Modules\IO\PNG\test\CMakeFiles\ITKIOPNGTestDriver.dir\ > itkPNGImageIOTest.cxx.obj > Modules\IO\PNG\test\CMakeFiles\ITKIOPNGTestDriver.dir\itkPNGImag > eIOTest2.cxx.obj /out:bin\ITKIOPNGTestDriver.exe > /implib:lib\ITKIOPNGTestDriver.lib /pdb: > bin\ITKIOPNGTestDriver.pdb /version:0.0 /machine:X86 /INCREMENTAL:NO > /subsystem:console > lib\ITKIOPNG-4.10.lib lib\ITKCommon-4.10.lib > lib\itkdouble-conversion-4.10.lib lib\ITKIOB > MP-4.10.lib lib\ITKIOGDCM-4.10.lib lib\ITKIOGIPL-4.10.lib > lib\ITKIOImageBase-4.10.lib lib\ > ITKIOJPEG-4.10.lib lib\ITKIOMeta-4.10.lib lib\ITKIONIFTI-4.10.lib > lib\ITKIONRRD-4.10.lib l > ib\ITKIOPNG-4.10.lib lib\ITKIOTIFF-4.10.lib lib\ITKIOVTK-4.10.lib > lib\itksys-4.10.lib lib\ > ITKCommon-4.10.lib lib\itkdouble-conversion-4.10.lib > lib\ITKIOBMP-4.10.lib lib\ITKIOGDCM-4 > .10.lib lib\ITKIOGIPL-4.10.lib lib\ITKIOImageBase-4.10.lib > lib\ITKIOJPEG-4.10.lib lib\ITKI > OMeta-4.10.lib lib\ITKIONIFTI-4.10.lib lib\ITKIONRRD-4.10.lib > lib\ITKIOPNG-4.10.lib lib\IT > KIOTIFF-4.10.lib lib\ITKIOVTK-4.10.lib lib\itksys-4.10.lib > lib\itkpng-4.10.lib lib\itkgdcm > MSFF-4.10.lib lib\itkgdcmDICT-4.10.lib lib\itkgdcmIOD-4.10.lib > lib\itkgdcmDSED-4.10.lib li > b\itkgdcmCommon-4.10.lib crypt32.lib lib\ITKEXPAT-4.10.lib > lib\itkgdcmjpeg8-4.10.lib lib\i > tkgdcmjpeg12-4.10.lib lib\itkgdcmjpeg16-4.10.lib > lib\itkgdcmopenjpeg-4.10.lib lib\itkgdcmc > harls-4.10.lib rpcrt4.lib lib\ITKMetaIO-4.10.lib comctl32.lib > wsock32.lib lib\ITKniftiio-4 > .10.lib lib\ITKznz-4.10.lib lib\ITKTransform-4.10.lib > lib\ITKNrrdIO-4.10.lib lib\itktiff-4 > .10.lib lib\itkzlib-4.10.lib lib\itkjpeg-4.10.lib > lib\ITKIOImageBase-4.10.lib lib\ITKCommo > n-4.10.lib lib\itkdouble-conversion-4.10.lib lib\itksys-4.10.lib > ws2_32.lib Psapi.lib lib\ > ITKVNLInstantiation-4.10.lib lib\itkvnl_algo-4.10.lib > lib\itkvnl-4.10.lib lib\itkv3p_netli > b-4.10.lib lib\itknetlib-4.10.lib lib\itkvcl-4.10.lib kernel32.lib > user32.lib gdi32.lib wi > nspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib > advapi32.lib && cd ." > > C:/Program Files (x86)/Windows Kits/8.1/bin/x86/mt.exe : general error > c101008d: Failed to > write the updated manifest to the resource of file > "bin\ITKIOPNGTestDriver.exe". The syst > em cannot open the device or file specified. > MT failed. with 31 > [1894/3315] Building CXX object > Modules\IO\...AWTestDriver.dir\ITKIORAWTestDriver.cxx.obj > ninja: build stopped: subcommand failed. > > > HTH, > David C. > > > On Thu, May 19, 2016 at 2:14 PM, Matt McCormick > wrote: >> Hi Dave, >> >> Thanks for submitting the ITK Windows Nightly. Sometime we are >> getting the opaque build error: >> >> *** WARNING non-zero return value in ctest from: C:\Program Files >> (x86)\CMake\bin\cmake.exe >> >> https://open.cdash.org/viewBuildError.php?type=1&buildid=4372761 >> >> Do you know what is happening with this build? >> >> Thanks, >> Matt _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From Tao.Zhao at intusurg.com Fri May 20 11:57:03 2016 From: Tao.Zhao at intusurg.com (Tao Zhao) Date: Fri, 20 May 2016 15:57:03 +0000 Subject: [ITK] [ITK-users] Switching between debug and release libaraies in Visual Studio In-Reply-To: References: Message-ID: Hi D?enan, Thank you for your reply. Here is the details: I assume that I have to have something like this in my application cmake file: set( ITK_DIR "${CMAKE_SOURCE_DIR}/build/external/ITK/Debug/lib/cmake/ITK-4.9" ) find_package(ITK REQUIRED) include(${ITK_USE_FILE}) This works for debug version, but does not adapt to release when I build Release in Visual Studio. I believe this is a pretty common need and there must be a solution. Thanks, Tao From: D?enan Zuki? [mailto:dzenanz at gmail.com] Sent: Friday, May 20, 2016 6:59 AM To: Tao Zhao Cc: insight-users at itk.org Subject: Re: [ITK-users] Switching between debug and release libaraies in Visual Studio Hi Tao, with standard ITK setup, you don't have to do anything special. CMake takes care of setting up paths so you just switch between Debug and Release in your application which uses ITK. Regards, D?enan On Thu, May 19, 2016 at 11:40 PM, Tao Zhao > wrote: Hi, This might be a cmake question but it is related on how to use itk. I built ITK in both debug and release modes and had them installed under ITK - Debug - Release I would like my application to link against ITK debug libs in debug mode and release libs in release mode. I can easily do this under qtcreator. However when I am using Visual Studio, ${CMAKE_BUILD_TYPE} does not take effect. I know there is a way if the libs are in one folder but have different names. I was wondering how can I achieve this with standard ITK set up (i.e., not using different names but using different path for debug and release libs). Thank you very much! Tao _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users ________________________________ NOTE THAT THIS EMAIL ORIGINATED FROM OUTSIDE OF INTUITIVE SURGICAL.. Be alert for fraudulent emails that spoof internal ?@intusurg.com? email addresses. Report these or other security threats to: ITRequest at intusurg.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From tevain at telecom-paristech.fr Fri May 20 12:06:31 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Fri, 20 May 2016 18:06:31 +0200 (CEST) Subject: [ITK] [ITK-users] Switching between debug and release libaraies in Visual Studio In-Reply-To: References: Message-ID: <1553502143.61574075.1463760391386.JavaMail.zimbra@enst.fr> Hello Tao, Have you tried the package finder which comes with cmake? It will automatically do the job of taking different builds. Something like this in your cmake file: FIND_PACKAGE ( ITK ) IF ( ITK_FOUND ) INCLUDE( ${ITK_USE_FILE} ) ENDIF( ITK_FOUND ) [...] TARGET_LINK_LIBRARIES ( MyProject ${ITK_LIBRARIES} ) HTH, Tim ----- Mail original ----- De: "Tao Zhao" ?: "D?enan Zuki?" Cc: insight-users at itk.org Envoy?: Vendredi 20 Mai 2016 17:57:03 Objet: Re: [ITK] [ITK-users] Switching between debug and release libaraies in Visual Studio Hi D?enan, Thank you for your reply. Here is the details: I assume that I have to have something like this in my application cmake file: set( ITK_DIR "${CMAKE_SOURCE_DIR}/build/external/ITK/ Debug /lib/cmake/ITK-4.9" ) find_package(ITK REQUIRED) include(${ITK_USE_FILE}) This works for debug version, but does not adapt to release when I build Release in Visual Studio. I believe this is a pretty common need and there must be a solution. Thanks, Tao From: D?enan Zuki? [mailto:dzenanz at gmail.com] Sent: Friday, May 20, 2016 6:59 AM To: Tao Zhao Cc: insight-users at itk.org Subject: Re: [ITK-users] Switching between debug and release libaraies in Visual Studio Hi Tao, with standard ITK setup, you don't have to do anything special. CMake takes care of setting up paths so you just switch between Debug and Release in your application which uses ITK. Regards, D?enan On Thu, May 19, 2016 at 11:40 PM, Tao Zhao < Tao.Zhao at intusurg.com > wrote: Hi, This might be a cmake question but it is related on how to use itk. I built ITK in both debug and release modes and had them installed under ITK - Debug - Release I would like my application to link against ITK debug libs in debug mode and release libs in release mode. I can easily do this under qtcreator. However when I am using Visual Studio, ${CMAKE_BUILD_TYPE} does not take effect. I know there is a way if the libs are in one folder but have different names. I was wondering how can I achieve this with standard ITK set up (i.e., not using different names but using different path for debug and release libs). Thank you very much! Tao _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users NOTE THAT THIS EMAIL ORIGINATED FROM OUTSIDE OF INTUITIVE SURGICAL.. Be alert for fraudulent emails that spoof internal ?@intusurg.com? email addresses. Report these or other security threats to: ITRequest at intusurg.com . _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scapegoat.sarthak at gmail.com Fri May 20 12:10:32 2016 From: scapegoat.sarthak at gmail.com (Scapegoat Sarthak) Date: Fri, 20 May 2016 12:10:32 -0400 Subject: [ITK] [ITK-users] Switching between debug and release libaraies in Visual Studio In-Reply-To: <1553502143.61574075.1463760391386.JavaMail.zimbra@enst.fr> References: <1553502143.61574075.1463760391386.JavaMail.zimbra@enst.fr> Message-ID: Building up on Tim's answer: When you build ITK, let's say the binary folder is present in ${ITK_BUILD_DIR}. Here you have built both the Debug and Release variants of the library (basically, ${ITK_BUILD_DIR}/lib/Debug and ${ITK_BUILD_DIR}/lib/Release folders are populated with the required libraries). In this setup, when you trying link your project to ITK, you will need to set ITK_DIR in your CMake configuration to ${ITK_BUILD_DIR} and CMake will take care of everything. Cheers and all the best! On 20 May 2016 at 12:06, Timothee Evain wrote: > Hello Tao, > > Have you tried the package finder which comes with cmake? It will > automatically do the job of taking different builds. > Something like this in your cmake file: > FIND_PACKAGE ( ITK ) > IF ( ITK_FOUND ) > INCLUDE( ${ITK_USE_FILE} ) > ENDIF( ITK_FOUND ) > > [...] > > TARGET_LINK_LIBRARIES ( MyProject ${ITK_LIBRARIES} ) > > HTH, > > Tim > > ----- Mail original ----- > De: "Tao Zhao" > ?: "D?enan Zuki?" > Cc: insight-users at itk.org > Envoy?: Vendredi 20 Mai 2016 17:57:03 > Objet: Re: [ITK] [ITK-users] Switching between debug and release libaraies > in Visual Studio > > > > Hi D?enan, > > > Thank you for your reply. Here is the details: > > > > I assume that I have to have something like this in my application cmake > file: > > > > set( ITK_DIR "${CMAKE_SOURCE_DIR}/build/external/ITK/ Debug > /lib/cmake/ITK-4.9" ) > > find_package(ITK REQUIRED) > > include(${ITK_USE_FILE}) > > > > This works for debug version, but does not adapt to release when I build > Release in Visual Studio. I believe this is a pretty common need and there > must be a solution. > > > > Thanks, > Tao > > > > From: D?enan Zuki? [mailto:dzenanz at gmail.com] > Sent: Friday, May 20, 2016 6:59 AM > To: Tao Zhao > Cc: insight-users at itk.org > Subject: Re: [ITK-users] Switching between debug and release libaraies in > Visual Studio > > > > > Hi Tao, > > > > > > with standard ITK setup, you don't have to do anything special. CMake > takes care of setting up paths so you just switch between Debug and Release > in your application which uses ITK. > > > > > > Regards, > > > D?enan > > > > > > On Thu, May 19, 2016 at 11:40 PM, Tao Zhao < Tao.Zhao at intusurg.com > > wrote: > > > Hi, > > > > This might be a cmake question but it is related on how to use itk. > > > > I built ITK in both debug and release modes and had them installed under > > ITK > > - Debug > > - Release > > > > I would like my application to link against ITK debug libs in debug mode > and release libs in release mode. I can easily do this under qtcreator. > However when I am using Visual Studio, ${CMAKE_BUILD_TYPE} does not take > effect. I know there is a way if the libs are in one folder but have > different names. I was wondering how can I achieve this with standard ITK > set up (i.e., not using different names but using different path for debug > and release libs). > > > > Thank you very much! > > > Tao > > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > > > > > NOTE THAT THIS EMAIL ORIGINATED FROM OUTSIDE OF INTUITIVE SURGICAL.. > Be alert for fraudulent emails that spoof internal ?@intusurg.com? email > addresses. Report these or other security threats to: > ITRequest at intusurg.com . > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From pauloguilhermefreire at gmail.com Fri May 20 12:36:17 2016 From: pauloguilhermefreire at gmail.com (Paulo Guilherme Freire) Date: Fri, 20 May 2016 16:36:17 +0000 Subject: [ITK] Read raw image and save as nii Message-ID: Hello, everyone. I am trying to do something quite simple: I have a raw image (and its corresponding .nhdr file) and I want to read it and save it in .nii format. The image type, according to the .nhdr file, is short. Below is the code I'm using. My question is: what am I missing here? After I save the image to file and open it, I don't get the expected result; rather, I get an image that reminds a TV static. Could you please help me? Thanks in advance! Best, Paulo #include #include #include #include int main(int argc, char* argv[]) { typedef itk::Image ImageType; if(argc < 3) { // programName .nhdr .nii std::cerr << "Usage: " << argv[0] << " Output1.nhdr Output2.nii\n"; return EXIT_FAILURE; } // Read .nhdr file typedef itk::ImageFileReader< ImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(argv[1]); reader->Update(); // Save it as nii typedef itk::ImageFileWriter< ImageType > WriterType; WriterType::Pointer writer = WriterType::New(); writer->UseInputMetaDataDictionaryOn(); // is this necessary? writer->SetInput(reader->GetOutput()); writer->SetFileName(argv[2]); try { writer->Update(); } catch(itk::ExceptionObject e) { std::cout << "Could not save image to file\n"; } return EXIT_SUCCESS; } -- "Se podes olhar, v?. Se podes ver, repara." -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Fri May 20 14:03:38 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 20 May 2016 14:03:38 -0400 Subject: [ITK] Read raw image and save as nii In-Reply-To: References: Message-ID: Hi Paulo, Your code looks good. Is the image pixel type correct for the input data? HTH, Matt On Fri, May 20, 2016 at 12:36 PM, Paulo Guilherme Freire wrote: > Hello, everyone. > > I am trying to do something quite simple: I have a raw image (and its > corresponding .nhdr file) and I want to read it and save it in .nii format. > The image type, according to the .nhdr file, is short. Below is the code I'm > using. > > My question is: what am I missing here? After I save the image to file and > open it, I don't get the expected result; rather, I get an image that > reminds a TV static. > > Could you please help me? > > Thanks in advance! > > Best, > Paulo > > #include > #include > #include > #include > > int main(int argc, char* argv[]) > { > > typedef itk::Image ImageType; > > if(argc < 3) > { > // programName .nhdr .nii > std::cerr << "Usage: " << argv[0] << " Output1.nhdr Output2.nii\n"; > return EXIT_FAILURE; > } > > // Read .nhdr file > typedef itk::ImageFileReader< ImageType > ReaderType; > ReaderType::Pointer reader = ReaderType::New(); > reader->SetFileName(argv[1]); > reader->Update(); > > // Save it as nii > typedef itk::ImageFileWriter< ImageType > WriterType; > WriterType::Pointer writer = WriterType::New(); > writer->UseInputMetaDataDictionaryOn(); // is this necessary? > writer->SetInput(reader->GetOutput()); > writer->SetFileName(argv[2]); > > try > { > writer->Update(); > } > catch(itk::ExceptionObject e) > { > std::cout << "Could not save image to file\n"; > } > > return EXIT_SUCCESS; > } > > > -- > "Se podes olhar, v?. Se podes ver, repara." > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From blowekamp at mail.nih.gov Fri May 20 14:13:12 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Fri, 20 May 2016 18:13:12 +0000 Subject: [ITK] [ITK-dev] ITKv4.10rc2 - Why are there so many new CMake variable? Message-ID: I am now getting a whole bunch of X11 related CMake variables in the advanced configuration of CMake. These are very annoying and not useful. There also seems to be a bunch of other VXL related variables, that didn?t use to be there. Brad _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From pauloguilhermefreire at gmail.com Fri May 20 14:18:27 2016 From: pauloguilhermefreire at gmail.com (Paulo Guilherme Freire) Date: Fri, 20 May 2016 18:18:27 +0000 Subject: [ITK] Read raw image and save as nii In-Reply-To: References: Message-ID: Hi, Matt. Thank you for your answer! I tried different kinds of image pixel type (short, unsigned short, int, unsigned char, double) but to no avail. I really don't know what's wrong. An example of a .nhdr file I'm using is the following: NRRD0004 # Complete NRRD file format specification at: # http://teem.sourceforge.net/nrrd/format.html type: short dimension: 3 space: left-posterior-superior sizes: 512 512 512 space directions: (0.5,0,0) (0,0.5,0) (0,0,0.5) kinds: domain domain domain endian: little encoding: raw space origin: (0,0,0) data file: CHB_train_Case01_FLAIR.raw Best, Paulo Matt McCormick schrieb am Fr., 20. Mai 2016, 15:03: > Hi Paulo, > > Your code looks good. Is the image pixel type correct for the input data? > > HTH, > Matt > > On Fri, May 20, 2016 at 12:36 PM, Paulo Guilherme Freire > wrote: > > Hello, everyone. > > > > I am trying to do something quite simple: I have a raw image (and its > > corresponding .nhdr file) and I want to read it and save it in .nii > format. > > The image type, according to the .nhdr file, is short. Below is the code > I'm > > using. > > > > My question is: what am I missing here? After I save the image to file > and > > open it, I don't get the expected result; rather, I get an image that > > reminds a TV static. > > > > Could you please help me? > > > > Thanks in advance! > > > > Best, > > Paulo > > > > #include > > #include > > #include > > #include > > > > int main(int argc, char* argv[]) > > { > > > > typedef itk::Image ImageType; > > > > if(argc < 3) > > { > > // programName .nhdr .nii > > std::cerr << "Usage: " << argv[0] << " Output1.nhdr Output2.nii\n"; > > return EXIT_FAILURE; > > } > > > > // Read .nhdr file > > typedef itk::ImageFileReader< ImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileName(argv[1]); > > reader->Update(); > > > > // Save it as nii > > typedef itk::ImageFileWriter< ImageType > WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->UseInputMetaDataDictionaryOn(); // is this necessary? > > writer->SetInput(reader->GetOutput()); > > writer->SetFileName(argv[2]); > > > > try > > { > > writer->Update(); > > } > > catch(itk::ExceptionObject e) > > { > > std::cout << "Could not save image to file\n"; > > } > > > > return EXIT_SUCCESS; > > } > > > > > > -- > > "Se podes olhar, v?. Se podes ver, repara." > > > > _______________________________________________ > > Community mailing list > > Community at itk.org > > http://public.kitware.com/mailman/listinfo/community > > > -- "Se podes olhar, v?. Se podes ver, repara." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Fri May 20 16:45:41 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 20 May 2016 16:45:41 -0400 Subject: [ITK] Read raw image and save as nii In-Reply-To: References: Message-ID: Can you try endian: big? On Fri, May 20, 2016 at 2:18 PM, Paulo Guilherme Freire < pauloguilhermefreire at gmail.com> wrote: > Hi, Matt. > > Thank you for your answer! I tried different kinds of image pixel type > (short, unsigned short, int, unsigned char, double) but to no avail. I > really don't know what's wrong. > > An example of a .nhdr file I'm using is the following: > > NRRD0004 > # Complete NRRD file format specification at: > # http://teem.sourceforge.net/nrrd/format.html > type: short > dimension: 3 > space: left-posterior-superior > sizes: 512 512 512 > space directions: (0.5,0,0) (0,0.5,0) (0,0,0.5) > kinds: domain domain domain > endian: little > encoding: raw > space origin: (0,0,0) > data file: CHB_train_Case01_FLAIR.raw > > Best, > Paulo > > Matt McCormick schrieb am Fr., 20. Mai 2016, > 15:03: > >> Hi Paulo, >> >> Your code looks good. Is the image pixel type correct for the input data? >> >> HTH, >> Matt >> >> On Fri, May 20, 2016 at 12:36 PM, Paulo Guilherme Freire >> wrote: >> > Hello, everyone. >> > >> > I am trying to do something quite simple: I have a raw image (and its >> > corresponding .nhdr file) and I want to read it and save it in .nii >> format. >> > The image type, according to the .nhdr file, is short. Below is the >> code I'm >> > using. >> > >> > My question is: what am I missing here? After I save the image to file >> and >> > open it, I don't get the expected result; rather, I get an image that >> > reminds a TV static. >> > >> > Could you please help me? >> > >> > Thanks in advance! >> > >> > Best, >> > Paulo >> > >> > #include >> > #include >> > #include >> > #include >> > >> > int main(int argc, char* argv[]) >> > { >> > >> > typedef itk::Image ImageType; >> > >> > if(argc < 3) >> > { >> > // programName .nhdr .nii >> > std::cerr << "Usage: " << argv[0] << " Output1.nhdr Output2.nii\n"; >> > return EXIT_FAILURE; >> > } >> > >> > // Read .nhdr file >> > typedef itk::ImageFileReader< ImageType > ReaderType; >> > ReaderType::Pointer reader = ReaderType::New(); >> > reader->SetFileName(argv[1]); >> > reader->Update(); >> > >> > // Save it as nii >> > typedef itk::ImageFileWriter< ImageType > WriterType; >> > WriterType::Pointer writer = WriterType::New(); >> > writer->UseInputMetaDataDictionaryOn(); // is this necessary? >> > writer->SetInput(reader->GetOutput()); >> > writer->SetFileName(argv[2]); >> > >> > try >> > { >> > writer->Update(); >> > } >> > catch(itk::ExceptionObject e) >> > { >> > std::cout << "Could not save image to file\n"; >> > } >> > >> > return EXIT_SUCCESS; >> > } >> > >> > >> > -- >> > "Se podes olhar, v?. Se podes ver, repara." >> > >> > _______________________________________________ >> > Community mailing list >> > Community at itk.org >> > http://public.kitware.com/mailman/listinfo/community >> > >> > -- > "Se podes olhar, v?. Se podes ver, repara." > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pauloguilhermefreire at gmail.com Fri May 20 16:54:44 2016 From: pauloguilhermefreire at gmail.com (Paulo Guilherme Freire) Date: Fri, 20 May 2016 20:54:44 +0000 Subject: [ITK] Read raw image and save as nii In-Reply-To: References: Message-ID: Hello, D?enan. Thank you for your suggestion. I just tried using endian: big, but still no success. Best, Paulo On Fri, May 20, 2016 at 5:46 PM D?enan Zuki? wrote: > Can you try endian: big? > > On Fri, May 20, 2016 at 2:18 PM, Paulo Guilherme Freire < > pauloguilhermefreire at gmail.com> wrote: > >> Hi, Matt. >> >> Thank you for your answer! I tried different kinds of image pixel type >> (short, unsigned short, int, unsigned char, double) but to no avail. I >> really don't know what's wrong. >> >> An example of a .nhdr file I'm using is the following: >> >> NRRD0004 >> # Complete NRRD file format specification at: >> # http://teem.sourceforge.net/nrrd/format.html >> type: short >> dimension: 3 >> space: left-posterior-superior >> sizes: 512 512 512 >> space directions: (0.5,0,0) (0,0.5,0) (0,0,0.5) >> kinds: domain domain domain >> endian: little >> encoding: raw >> space origin: (0,0,0) >> data file: CHB_train_Case01_FLAIR.raw >> >> Best, >> Paulo >> >> Matt McCormick schrieb am Fr., 20. Mai >> 2016, 15:03: >> >>> Hi Paulo, >>> >>> Your code looks good. Is the image pixel type correct for the input data? >>> >>> HTH, >>> Matt >>> >>> On Fri, May 20, 2016 at 12:36 PM, Paulo Guilherme Freire >>> wrote: >>> > Hello, everyone. >>> > >>> > I am trying to do something quite simple: I have a raw image (and its >>> > corresponding .nhdr file) and I want to read it and save it in .nii >>> format. >>> > The image type, according to the .nhdr file, is short. Below is the >>> code I'm >>> > using. >>> > >>> > My question is: what am I missing here? After I save the image to file >>> and >>> > open it, I don't get the expected result; rather, I get an image that >>> > reminds a TV static. >>> > >>> > Could you please help me? >>> > >>> > Thanks in advance! >>> > >>> > Best, >>> > Paulo >>> > >>> > #include >>> > #include >>> > #include >>> > #include >>> > >>> > int main(int argc, char* argv[]) >>> > { >>> > >>> > typedef itk::Image ImageType; >>> > >>> > if(argc < 3) >>> > { >>> > // programName .nhdr .nii >>> > std::cerr << "Usage: " << argv[0] << " Output1.nhdr Output2.nii\n"; >>> > return EXIT_FAILURE; >>> > } >>> > >>> > // Read .nhdr file >>> > typedef itk::ImageFileReader< ImageType > ReaderType; >>> > ReaderType::Pointer reader = ReaderType::New(); >>> > reader->SetFileName(argv[1]); >>> > reader->Update(); >>> > >>> > // Save it as nii >>> > typedef itk::ImageFileWriter< ImageType > WriterType; >>> > WriterType::Pointer writer = WriterType::New(); >>> > writer->UseInputMetaDataDictionaryOn(); // is this necessary? >>> > writer->SetInput(reader->GetOutput()); >>> > writer->SetFileName(argv[2]); >>> > >>> > try >>> > { >>> > writer->Update(); >>> > } >>> > catch(itk::ExceptionObject e) >>> > { >>> > std::cout << "Could not save image to file\n"; >>> > } >>> > >>> > return EXIT_SUCCESS; >>> > } >>> > >>> > >>> > -- >>> > "Se podes olhar, v?. Se podes ver, repara." >>> > >>> > _______________________________________________ >>> > Community mailing list >>> > Community at itk.org >>> > http://public.kitware.com/mailman/listinfo/community >>> > >>> >> -- >> "Se podes olhar, v?. Se podes ver, repara." >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> >> > -- "Se podes olhar, v?. Se podes ver, repara." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Sat May 21 07:47:10 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Sat, 21 May 2016 13:47:10 +0200 (CEST) Subject: [ITK] Read raw image and save as nii In-Reply-To: References: Message-ID: <1772296168.62426884.1463831230058.JavaMail.zimbra@enst.fr> Hi Paulo, Some suggestions: -Is the LPS orientation of your data streamed successfully to your new file ? -Which filter is in cause ? the reader or the writer ? Are you able to visualize your data after loading it but before writing it (with VTK for example) ? Tim ----- Mail original ----- De: "Paulo Guilherme Freire" ?: "D?enan Zuki?" Cc: community at itk.org Envoy?: Vendredi 20 Mai 2016 22:54:44 Objet: Re: [ITK] Read raw image and save as nii Hello, D?enan. Thank you for your suggestion. I just tried using endian: big, but still no success. Best, Paulo On Fri, May 20, 2016 at 5:46 PM D?enan Zuki? < dzenanz at gmail.com > wrote: Can you try endian: big? On Fri, May 20, 2016 at 2:18 PM, Paulo Guilherme Freire < pauloguilhermefreire at gmail.com > wrote: Hi, Matt. Thank you for your answer! I tried different kinds of image pixel type (short, unsigned short, int, unsigned char, double) but to no avail. I really don't know what's wrong. An example of a .nhdr file I'm using is the following: NRRD0004 # Complete NRRD file format specification at: # http://teem.sourceforge.net/nrrd/format.html type: short dimension: 3 space: left-posterior-superior sizes: 512 512 512 space directions: (0.5,0,0) (0,0.5,0) (0,0,0.5) kinds: domain domain domain endian: little encoding: raw space origin: (0,0,0) data file: CHB_train_Case01_FLAIR.raw Best, Paulo Matt McCormick < matt.mccormick at kitware.com > schrieb am Fr., 20. Mai 2016, 15:03: Hi Paulo, Your code looks good. Is the image pixel type correct for the input data? HTH, Matt On Fri, May 20, 2016 at 12:36 PM, Paulo Guilherme Freire < pauloguilhermefreire at gmail.com > wrote: > Hello, everyone. > > I am trying to do something quite simple: I have a raw image (and its > corresponding .nhdr file) and I want to read it and save it in .nii format. > The image type, according to the .nhdr file, is short. Below is the code I'm > using. > > My question is: what am I missing here? After I save the image to file and > open it, I don't get the expected result; rather, I get an image that > reminds a TV static. > > Could you please help me? > > Thanks in advance! > > Best, > Paulo > > #include > #include > #include > #include > > int main(int argc, char* argv[]) > { > > typedef itk::Image ImageType; > > if(argc < 3) > { > // programName .nhdr .nii > std::cerr << "Usage: " << argv[0] << " Output1.nhdr Output2.nii\n"; > return EXIT_FAILURE; > } > > // Read .nhdr file > typedef itk::ImageFileReader< ImageType > ReaderType; > ReaderType::Pointer reader = ReaderType::New(); > reader->SetFileName(argv[1]); > reader->Update(); > > // Save it as nii > typedef itk::ImageFileWriter< ImageType > WriterType; > WriterType::Pointer writer = WriterType::New(); > writer->UseInputMetaDataDictionaryOn(); // is this necessary? > writer->SetInput(reader->GetOutput()); > writer->SetFileName(argv[2]); > > try > { > writer->Update(); > } > catch(itk::ExceptionObject e) > { > std::cout << "Could not save image to file\n"; > } > > return EXIT_SUCCESS; > } > > > -- > "Se podes olhar, v?. Se podes ver, repara." > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > -- "Se podes olhar, v?. Se podes ver, repara." _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community -- "Se podes olhar, v?. Se podes ver, repara." _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From pauloguilhermefreire at gmail.com Sat May 21 08:59:00 2016 From: pauloguilhermefreire at gmail.com (Paulo Guilherme Freire) Date: Sat, 21 May 2016 12:59:00 +0000 Subject: [ITK] Read raw image and save as nii In-Reply-To: <1772296168.62426884.1463831230058.JavaMail.zimbra@enst.fr> References: <1772296168.62426884.1463831230058.JavaMail.zimbra@enst.fr> Message-ID: Hello, Timothee. Thank you for your suggestions. I opened the new file on ITK-Snap and saw that the LPS orientation was not successfully streamed to it. The orientation ITK-Snap is showing the image is in is RAI. I tried changing the LPS orientation to RAS in the .nhdr file (since according to http://teem.sourceforge.net/nrrd/format.html#space, there is no support to RAI). By doing so, I wasn't even able to save the image to a new file. Regarding the filter that is causing this problem, I believe that the reader is to blame. If I open the raw image on ITK-Snap and manually input the .nhdr information, the image is loaded (almost) succesfully. I say almost because the orientation still remains RAI instead of LPS. Best, Paulo On Sat, May 21, 2016 at 8:47 AM Timothee Evain wrote: > Hi Paulo, > > Some suggestions: > -Is the LPS orientation of your data streamed successfully to your new > file ? > -Which filter is in cause ? the reader or the writer ? Are you able to > visualize your data after loading it but before writing it (with VTK for > example) ? > > Tim > > > > ----- Mail original ----- > De: "Paulo Guilherme Freire" > ?: "D?enan Zuki?" > Cc: community at itk.org > Envoy?: Vendredi 20 Mai 2016 22:54:44 > Objet: Re: [ITK] Read raw image and save as nii > > Hello, D?enan. Thank you for your suggestion. I just tried using endian: > big, but still no success. > > Best, > Paulo > > On Fri, May 20, 2016 at 5:46 PM D?enan Zuki? < dzenanz at gmail.com > wrote: > > > > Can you try endian: big? > > On Fri, May 20, 2016 at 2:18 PM, Paulo Guilherme Freire < > pauloguilhermefreire at gmail.com > wrote: > > > > Hi, Matt. > > Thank you for your answer! I tried different kinds of image pixel type > (short, unsigned short, int, unsigned char, double) but to no avail. I > really don't know what's wrong. > > An example of a .nhdr file I'm using is the following: > > NRRD0004 > # Complete NRRD file format specification at: > # http://teem.sourceforge.net/nrrd/format.html > type: short > dimension: 3 > space: left-posterior-superior > sizes: 512 512 512 > space directions: (0.5,0,0) (0,0.5,0) (0,0,0.5) > kinds: domain domain domain > endian: little > encoding: raw > space origin: (0,0,0) > data file: CHB_train_Case01_FLAIR.raw > > Best, > Paulo > > Matt McCormick < matt.mccormick at kitware.com > schrieb am Fr., 20. Mai > 2016, 15:03: > > > Hi Paulo, > > Your code looks good. Is the image pixel type correct for the input data? > > HTH, > Matt > > On Fri, May 20, 2016 at 12:36 PM, Paulo Guilherme Freire > < pauloguilhermefreire at gmail.com > wrote: > > Hello, everyone. > > > > I am trying to do something quite simple: I have a raw image (and its > > corresponding .nhdr file) and I want to read it and save it in .nii > format. > > The image type, according to the .nhdr file, is short. Below is the code > I'm > > using. > > > > My question is: what am I missing here? After I save the image to file > and > > open it, I don't get the expected result; rather, I get an image that > > reminds a TV static. > > > > Could you please help me? > > > > Thanks in advance! > > > > Best, > > Paulo > > > > #include > > #include > > #include > > #include > > > > int main(int argc, char* argv[]) > > { > > > > typedef itk::Image ImageType; > > > > if(argc < 3) > > { > > // programName .nhdr .nii > > std::cerr << "Usage: " << argv[0] << " Output1.nhdr Output2.nii\n"; > > return EXIT_FAILURE; > > } > > > > // Read .nhdr file > > typedef itk::ImageFileReader< ImageType > ReaderType; > > ReaderType::Pointer reader = ReaderType::New(); > > reader->SetFileName(argv[1]); > > reader->Update(); > > > > // Save it as nii > > typedef itk::ImageFileWriter< ImageType > WriterType; > > WriterType::Pointer writer = WriterType::New(); > > writer->UseInputMetaDataDictionaryOn(); // is this necessary? > > writer->SetInput(reader->GetOutput()); > > writer->SetFileName(argv[2]); > > > > try > > { > > writer->Update(); > > } > > catch(itk::ExceptionObject e) > > { > > std::cout << "Could not save image to file\n"; > > } > > > > return EXIT_SUCCESS; > > } > > > > > > -- > > "Se podes olhar, v?. Se podes ver, repara." > > > > _______________________________________________ > > Community mailing list > > Community at itk.org > > http://public.kitware.com/mailman/listinfo/community > > > -- > "Se podes olhar, v?. Se podes ver, repara." > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > > -- > "Se podes olhar, v?. Se podes ver, repara." > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > -- "Se podes olhar, v?. Se podes ver, repara." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Sat May 21 10:06:33 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Sat, 21 May 2016 10:06:33 -0400 Subject: [ITK] Read raw image and save as nii In-Reply-To: References: <1772296168.62426884.1463831230058.JavaMail.zimbra@enst.fr> Message-ID: ITK's naming convention is opposite to DICOM's. DICOM's LPS is called RAI in ITK. So there might not be any problem regarding that. On Sat, May 21, 2016 at 8:59 AM, Paulo Guilherme Freire < pauloguilhermefreire at gmail.com> wrote: > Hello, Timothee. Thank you for your suggestions. > > I opened the new file on ITK-Snap and saw that the LPS orientation was not > successfully streamed to it. The orientation ITK-Snap is showing the image > is in is RAI. I tried changing the LPS orientation to RAS in the .nhdr file > (since according to http://teem.sourceforge.net/nrrd/format.html#space, > there is no support to RAI). By doing so, I wasn't even able to save the > image to a new file. > > Regarding the filter that is causing this problem, I believe that the > reader is to blame. If I open the raw image on ITK-Snap and manually input > the .nhdr information, the image is loaded (almost) succesfully. I say > almost because the orientation still remains RAI instead of LPS. > > Best, > Paulo > > On Sat, May 21, 2016 at 8:47 AM Timothee Evain < > tevain at telecom-paristech.fr> wrote: > >> Hi Paulo, >> >> Some suggestions: >> -Is the LPS orientation of your data streamed successfully to your new >> file ? >> -Which filter is in cause ? the reader or the writer ? Are you able to >> visualize your data after loading it but before writing it (with VTK for >> example) ? >> >> Tim >> >> >> >> ----- Mail original ----- >> De: "Paulo Guilherme Freire" >> ?: "D?enan Zuki?" >> Cc: community at itk.org >> Envoy?: Vendredi 20 Mai 2016 22:54:44 >> Objet: Re: [ITK] Read raw image and save as nii >> >> Hello, D?enan. Thank you for your suggestion. I just tried using endian: >> big, but still no success. >> >> Best, >> Paulo >> >> On Fri, May 20, 2016 at 5:46 PM D?enan Zuki? < dzenanz at gmail.com > wrote: >> >> >> >> Can you try endian: big? >> >> On Fri, May 20, 2016 at 2:18 PM, Paulo Guilherme Freire < >> pauloguilhermefreire at gmail.com > wrote: >> >> >> >> Hi, Matt. >> >> Thank you for your answer! I tried different kinds of image pixel type >> (short, unsigned short, int, unsigned char, double) but to no avail. I >> really don't know what's wrong. >> >> An example of a .nhdr file I'm using is the following: >> >> NRRD0004 >> # Complete NRRD file format specification at: >> # http://teem.sourceforge.net/nrrd/format.html >> type: short >> dimension: 3 >> space: left-posterior-superior >> sizes: 512 512 512 >> space directions: (0.5,0,0) (0,0.5,0) (0,0,0.5) >> kinds: domain domain domain >> endian: little >> encoding: raw >> space origin: (0,0,0) >> data file: CHB_train_Case01_FLAIR.raw >> >> Best, >> Paulo >> >> Matt McCormick < matt.mccormick at kitware.com > schrieb am Fr., 20. Mai >> 2016, 15:03: >> >> >> Hi Paulo, >> >> Your code looks good. Is the image pixel type correct for the input data? >> >> HTH, >> Matt >> >> On Fri, May 20, 2016 at 12:36 PM, Paulo Guilherme Freire >> < pauloguilhermefreire at gmail.com > wrote: >> > Hello, everyone. >> > >> > I am trying to do something quite simple: I have a raw image (and its >> > corresponding .nhdr file) and I want to read it and save it in .nii >> format. >> > The image type, according to the .nhdr file, is short. Below is the >> code I'm >> > using. >> > >> > My question is: what am I missing here? After I save the image to file >> and >> > open it, I don't get the expected result; rather, I get an image that >> > reminds a TV static. >> > >> > Could you please help me? >> > >> > Thanks in advance! >> > >> > Best, >> > Paulo >> > >> > #include >> > #include >> > #include >> > #include >> > >> > int main(int argc, char* argv[]) >> > { >> > >> > typedef itk::Image ImageType; >> > >> > if(argc < 3) >> > { >> > // programName .nhdr .nii >> > std::cerr << "Usage: " << argv[0] << " Output1.nhdr Output2.nii\n"; >> > return EXIT_FAILURE; >> > } >> > >> > // Read .nhdr file >> > typedef itk::ImageFileReader< ImageType > ReaderType; >> > ReaderType::Pointer reader = ReaderType::New(); >> > reader->SetFileName(argv[1]); >> > reader->Update(); >> > >> > // Save it as nii >> > typedef itk::ImageFileWriter< ImageType > WriterType; >> > WriterType::Pointer writer = WriterType::New(); >> > writer->UseInputMetaDataDictionaryOn(); // is this necessary? >> > writer->SetInput(reader->GetOutput()); >> > writer->SetFileName(argv[2]); >> > >> > try >> > { >> > writer->Update(); >> > } >> > catch(itk::ExceptionObject e) >> > { >> > std::cout << "Could not save image to file\n"; >> > } >> > >> > return EXIT_SUCCESS; >> > } >> > >> > >> > -- >> > "Se podes olhar, v?. Se podes ver, repara." >> > >> > _______________________________________________ >> > Community mailing list >> > Community at itk.org >> > http://public.kitware.com/mailman/listinfo/community >> > >> -- >> "Se podes olhar, v?. Se podes ver, repara." >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> >> >> -- >> "Se podes olhar, v?. Se podes ver, repara." >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> > -- > "Se podes olhar, v?. Se podes ver, repara." > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pauloguilhermefreire at gmail.com Sat May 21 16:53:32 2016 From: pauloguilhermefreire at gmail.com (Paulo Guilherme Freire) Date: Sat, 21 May 2016 20:53:32 +0000 Subject: [ITK] Read raw image and save as nii In-Reply-To: References: <1772296168.62426884.1463831230058.JavaMail.zimbra@enst.fr> Message-ID: Thanks for the clarification, D?enan! I didn't know that. So the problem is not in the orientation. I wish I could get a grasp on what's wrong with my code. Unfortunately, I'm clueless so far. Best, Paulo D?enan Zuki? schrieb am Sa., 21. Mai 2016, 11:06: > ITK's naming convention is opposite to DICOM's. DICOM's LPS is called RAI > in ITK. So there might not be any problem regarding that. > > On Sat, May 21, 2016 at 8:59 AM, Paulo Guilherme Freire < > pauloguilhermefreire at gmail.com> wrote: > >> Hello, Timothee. Thank you for your suggestions. >> >> I opened the new file on ITK-Snap and saw that the LPS orientation was >> not successfully streamed to it. The orientation ITK-Snap is showing the >> image is in is RAI. I tried changing the LPS orientation to RAS in the >> .nhdr file (since according to >> http://teem.sourceforge.net/nrrd/format.html#space, there is no support >> to RAI). By doing so, I wasn't even able to save the image to a new file. >> >> Regarding the filter that is causing this problem, I believe that the >> reader is to blame. If I open the raw image on ITK-Snap and manually input >> the .nhdr information, the image is loaded (almost) succesfully. I say >> almost because the orientation still remains RAI instead of LPS. >> >> Best, >> Paulo >> >> On Sat, May 21, 2016 at 8:47 AM Timothee Evain < >> tevain at telecom-paristech.fr> wrote: >> >>> Hi Paulo, >>> >>> Some suggestions: >>> -Is the LPS orientation of your data streamed successfully to your new >>> file ? >>> -Which filter is in cause ? the reader or the writer ? Are you able to >>> visualize your data after loading it but before writing it (with VTK for >>> example) ? >>> >>> Tim >>> >>> >>> >>> ----- Mail original ----- >>> De: "Paulo Guilherme Freire" >>> ?: "D?enan Zuki?" >>> Cc: community at itk.org >>> Envoy?: Vendredi 20 Mai 2016 22:54:44 >>> Objet: Re: [ITK] Read raw image and save as nii >>> >>> Hello, D?enan. Thank you for your suggestion. I just tried using endian: >>> big, but still no success. >>> >>> Best, >>> Paulo >>> >>> On Fri, May 20, 2016 at 5:46 PM D?enan Zuki? < dzenanz at gmail.com > >>> wrote: >>> >>> >>> >>> Can you try endian: big? >>> >>> On Fri, May 20, 2016 at 2:18 PM, Paulo Guilherme Freire < >>> pauloguilhermefreire at gmail.com > wrote: >>> >>> >>> >>> Hi, Matt. >>> >>> Thank you for your answer! I tried different kinds of image pixel type >>> (short, unsigned short, int, unsigned char, double) but to no avail. I >>> really don't know what's wrong. >>> >>> An example of a .nhdr file I'm using is the following: >>> >>> NRRD0004 >>> # Complete NRRD file format specification at: >>> # http://teem.sourceforge.net/nrrd/format.html >>> type: short >>> dimension: 3 >>> space: left-posterior-superior >>> sizes: 512 512 512 >>> space directions: (0.5,0,0) (0,0.5,0) (0,0,0.5) >>> kinds: domain domain domain >>> endian: little >>> encoding: raw >>> space origin: (0,0,0) >>> data file: CHB_train_Case01_FLAIR.raw >>> >>> Best, >>> Paulo >>> >>> Matt McCormick < matt.mccormick at kitware.com > schrieb am Fr., 20. Mai >>> 2016, 15:03: >>> >>> >>> Hi Paulo, >>> >>> Your code looks good. Is the image pixel type correct for the input data? >>> >>> HTH, >>> Matt >>> >>> On Fri, May 20, 2016 at 12:36 PM, Paulo Guilherme Freire >>> < pauloguilhermefreire at gmail.com > wrote: >>> > Hello, everyone. >>> > >>> > I am trying to do something quite simple: I have a raw image (and its >>> > corresponding .nhdr file) and I want to read it and save it in .nii >>> format. >>> > The image type, according to the .nhdr file, is short. Below is the >>> code I'm >>> > using. >>> > >>> > My question is: what am I missing here? After I save the image to file >>> and >>> > open it, I don't get the expected result; rather, I get an image that >>> > reminds a TV static. >>> > >>> > Could you please help me? >>> > >>> > Thanks in advance! >>> > >>> > Best, >>> > Paulo >>> > >>> > #include >>> > #include >>> > #include >>> > #include >>> > >>> > int main(int argc, char* argv[]) >>> > { >>> > >>> > typedef itk::Image ImageType; >>> > >>> > if(argc < 3) >>> > { >>> > // programName .nhdr .nii >>> > std::cerr << "Usage: " << argv[0] << " Output1.nhdr Output2.nii\n"; >>> > return EXIT_FAILURE; >>> > } >>> > >>> > // Read .nhdr file >>> > typedef itk::ImageFileReader< ImageType > ReaderType; >>> > ReaderType::Pointer reader = ReaderType::New(); >>> > reader->SetFileName(argv[1]); >>> > reader->Update(); >>> > >>> > // Save it as nii >>> > typedef itk::ImageFileWriter< ImageType > WriterType; >>> > WriterType::Pointer writer = WriterType::New(); >>> > writer->UseInputMetaDataDictionaryOn(); // is this necessary? >>> > writer->SetInput(reader->GetOutput()); >>> > writer->SetFileName(argv[2]); >>> > >>> > try >>> > { >>> > writer->Update(); >>> > } >>> > catch(itk::ExceptionObject e) >>> > { >>> > std::cout << "Could not save image to file\n"; >>> > } >>> > >>> > return EXIT_SUCCESS; >>> > } >>> > >>> > >>> > -- >>> > "Se podes olhar, v?. Se podes ver, repara." >>> > >>> > _______________________________________________ >>> > Community mailing list >>> > Community at itk.org >>> > http://public.kitware.com/mailman/listinfo/community >>> > >>> -- >>> "Se podes olhar, v?. Se podes ver, repara." >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >>> >>> >>> -- >>> "Se podes olhar, v?. Se podes ver, repara." >>> >>> _______________________________________________ >>> Community mailing list >>> Community at itk.org >>> http://public.kitware.com/mailman/listinfo/community >>> >> -- >> "Se podes olhar, v?. Se podes ver, repara." >> > > -- "Se podes olhar, v?. Se podes ver, repara." -------------- next part -------------- An HTML attachment was scrubbed... URL: From scorpiuni at gmail.com Sun May 22 16:16:36 2016 From: scorpiuni at gmail.com (Robert) Date: Sun, 22 May 2016 13:16:36 -0700 (MST) Subject: [ITK] [ITK-users] PCA on 3D Data Message-ID: <1463948196197-7588879.post@n2.nabble.com> Hello, I have a set of masked anatomical structures on a CT/MRT/... Scan. It basically is segmented Volume Data, and I want a Shape model based on those files. So I used the ImagePCAShapeModelEstimator, which I input my data to. I've read that you need to provide distance maps, so I used SignedDanielssonDistanceMapImageFilter on my thresholded, binarized data. Now when I write the mean image as well as the different components as .nrrd volume, I get a "mean distance map" as mean image. This output as distance map however is not the result that I need. I then tried to generate some actual shape models using the previous mean image with corresponding eigenvalues, but the result is not really helpful. I guess I could get better results here when experimenting more with the lower and upper threshold values of my final thresholding filter, but I first wanted to ask if there is a better alternative way to create a mean image and shape models, and to ask if my approach is even correct at all. Thanks for your attention, Robert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/PCA-on-3D-Data-tp7588879.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From zhuangming.shen at sphic.org.cn Sun May 22 20:20:48 2016 From: zhuangming.shen at sphic.org.cn (=?gb2312?B?yfLXr8P3?=) Date: Mon, 23 May 2016 00:20:48 +0000 Subject: [ITK] [ITK-users] Iterator for python supported ITK In-Reply-To: References: <1463734848567.2024@sphic.org.cn>, Message-ID: <1463962845332.70502@sphic.org.cn> Hi Matt, Thanks for your prompt reply. Actually, I'd like to know how to further improve the performance when I need to get each pixel value from an image using python supported ITK. Regards, Zhuangming Shen ________________________________________ From: Matt McCormick Sent: Friday, May 20, 2016 8:00 PM To: ??? Cc: insight-users at itk.org Subject: Re: [ITK-users] Iterator for python supported ITK Hi Zhuangming, Iterating through pixels is slow in Python -- the iterators may not be wrapped because it is always a good idea to use C++ in this case. HTH, Matt On Fri, May 20, 2016 at 5:00 AM, ??? wrote: > Hi all, > > > Could anyone give me an example on "itk::ImageRegionIterator" using Python > supported ITK? I can't find the wrapped "iterator". Thanks in advance. > > > > Regards, > > > Zhuangming Shen > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From tevain at telecom-paristech.fr Mon May 23 04:02:38 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Mon, 23 May 2016 10:02:38 +0200 (CEST) Subject: [ITK] [ITK-users] PCA on 3D Data In-Reply-To: <1463948196197-7588879.post@n2.nabble.com> References: <1463948196197-7588879.post@n2.nabble.com> Message-ID: <1318805807.63708890.1463990558977.JavaMail.zimbra@enst.fr> Hi Robert, That's quite difficult to help you without more insight on what you are expecting to get or to do with this shape model. When you use ImagePCAShapeModelEstimator to generate your model, you should expect a mean image as a signed distance map (i.e. the mean shape is the set of pixels <0), and some "variation" images corresponding to the principal components. These images can multiplied to some magnitude and then added/subtracted to the mean image to get a particular instance of your model as a new distance map. To see the new shape, just threshold to get all pixels <0. You can refer to: https://itk.org/Doxygen/html/classitk_1_1PCAShapeSignedDistanceFunction.html which is the function used by itk in the geodesic level set segmentation with shape prior. HTH, Tim ----- Mail original ----- De: "Robert" ?: insight-users at itk.org Envoy?: Dimanche 22 Mai 2016 22:16:36 Objet: [ITK] [ITK-users] PCA on 3D Data Hello, I have a set of masked anatomical structures on a CT/MRT/... Scan. It basically is segmented Volume Data, and I want a Shape model based on those files. So I used the ImagePCAShapeModelEstimator, which I input my data to. I've read that you need to provide distance maps, so I used SignedDanielssonDistanceMapImageFilter on my thresholded, binarized data. Now when I write the mean image as well as the different components as .nrrd volume, I get a "mean distance map" as mean image. This output as distance map however is not the result that I need. I then tried to generate some actual shape models using the previous mean image with corresponding eigenvalues, but the result is not really helpful. I guess I could get better results here when experimenting more with the lower and upper threshold values of my final thresholding filter, but I first wanted to ask if there is a better alternative way to create a mean image and shape models, and to ask if my approach is even correct at all. Thanks for your attention, Robert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/PCA-on-3D-Data-tp7588879.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From emonclus at cs.upc.edu Mon May 23 04:36:42 2016 From: emonclus at cs.upc.edu (Eva Monclus) Date: Mon, 23 May 2016 10:36:42 +0200 Subject: [ITK] ITK 4.9 gdcmDicomDir In-Reply-To: References: <573DB299.9080001@cs.upc.edu> Message-ID: <5742C11A.5010808@cs.upc.edu> On 19/05/16 14:57, D?enan Zuki? wrote: > Does this > > example help? Not so much :-( I do not have problems for reading the dicom series of a folder, I was looking for any GDCM class that helps me to scan a directory and sorts the set of series by pacient/study/series (as gdcm::DicomDirclass performed in the 3.6 ITK). Thanks in advance, Eva > > On Thu, May 19, 2016 at 8:33 AM, Eva Monclus > wrote: > > Hi, > > I have been using ITK 3.6 for several years. Now, I'm trying to > migrate all my code to the new version of itk (4.9) and I'm having > some problems with respect to gdcm support. > When using ITK 3.6 there was a class gdcm::DicomDir which was very > useful to parse recursively a folder with Dicom files. This class > helped me to print for each pacient, its set of studies and for > each study, you could obtain its set of series. The goal is to > fill in an "Open DICOM" dialog with such information, in > order to let the user load a single DICOM Series. I would like to > show to the user the set of Dicom series sorted by patient and study. > > In itk 4.9, is there any helper class to explore available DICOM > Series and/or Studies in a folder with DICOM files and subfolders? > > Thanks in advance, > Eva > > > > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scorpiuni at gmail.com Mon May 23 04:43:54 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 23 May 2016 01:43:54 -0700 (MST) Subject: [ITK] [ITK-users] PCA on 3D Data In-Reply-To: <1318805807.63708890.1463990558977.JavaMail.zimbra@enst.fr> References: <1463948196197-7588879.post@n2.nabble.com> <1318805807.63708890.1463990558977.JavaMail.zimbra@enst.fr> Message-ID: <1463993034231-7588882.post@n2.nabble.com> Hello, Thanks for your input, that's what I did so far. The result, however, in my opinion, does not look anything like I'd imagine the result looking like. It works fine with 2D Images, but the third dimension (or maybe the Pixel Value range?) seem to destroy the result. >From your response however I think that my approach is correct. I want to create the different shapes in order to use them as an input in the Geodesic Active Contour with Shape Guidance filter. My problem is that, if I use the filter without shape guidance, or if I use simple fastmarching, the segmented result is too big, it bleeds into structures that are not part of my current project. I hope that with shape guidance, those regions won't be affected (at least not that much as they currently are). -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/PCA-on-3D-Data-tp7588879p7588882.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From tevain at telecom-paristech.fr Mon May 23 05:44:12 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Mon, 23 May 2016 11:44:12 +0200 (CEST) Subject: [ITK] [ITK-users] PCA on 3D Data In-Reply-To: <1463993034231-7588882.post@n2.nabble.com> References: <1463948196197-7588879.post@n2.nabble.com> <1318805807.63708890.1463990558977.JavaMail.zimbra@enst.fr> <1463993034231-7588882.post@n2.nabble.com> Message-ID: <1416565469.63846234.1463996652180.JavaMail.zimbra@enst.fr> Well, that's the good way to do it. I've used the estimator to get models of 3D shapes without particular troubles. Have you registered your binary training data to get a true PCA response ? Here a link to a kitware blog post about creating ASM (in 2D but the application in 3D is trivial): https://blog.kitware.com/creating-a-2d-active-shape-model-in-itk/ HTH, Tim ----- Mail original ----- De: "Robert" ?: insight-users at itk.org Envoy?: Lundi 23 Mai 2016 10:43:54 Objet: Re: [ITK] [ITK-users] PCA on 3D Data Hello, Thanks for your input, that's what I did so far. The result, however, in my opinion, does not look anything like I'd imagine the result looking like. It works fine with 2D Images, but the third dimension (or maybe the Pixel Value range?) seem to destroy the result. From your response however I think that my approach is correct. I want to create the different shapes in order to use them as an input in the Geodesic Active Contour with Shape Guidance filter. My problem is that, if I use the filter without shape guidance, or if I use simple fastmarching, the segmented result is too big, it bleeds into structures that are not part of my current project. I hope that with shape guidance, those regions won't be affected (at least not that much as they currently are). -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/PCA-on-3D-Data-tp7588879p7588882.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK 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 Mon May 23 08:10:05 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 23 May 2016 08:10:05 -0400 Subject: [ITK] ITK 4.9 gdcmDicomDir In-Reply-To: <5742C11A.5010808@cs.upc.edu> References: <573DB299.9080001@cs.upc.edu> <5742C11A.5010808@cs.upc.edu> Message-ID: Slicer's DICOM browser does what you want. I don't know whether it is too complicated for you. HTH, D?enan On Mon, May 23, 2016 at 4:36 AM, Eva Monclus wrote: > > > On 19/05/16 14:57, D?enan Zuki? wrote: > > Does this > > example help? > > > Not so much :-( > > I do not have problems for reading the dicom series of a folder, I was > looking for any GDCM class that helps me to scan a directory and sorts the > set of series by pacient/study/series (as gdcm::DicomDirclass performed in > the 3.6 ITK). > > Thanks in advance, > Eva > > > On Thu, May 19, 2016 at 8:33 AM, Eva Monclus wrote: > >> Hi, >> >> I have been using ITK 3.6 for several years. Now, I'm trying to migrate >> all my code to the new version of itk (4.9) and I'm having some problems >> with respect to gdcm support. >> When using ITK 3.6 there was a class gdcm::DicomDir which was very useful >> to parse recursively a folder with Dicom files. This class helped me to >> print for each pacient, its set of studies and for each study, you could >> obtain its set of series. The goal is to fill in an "Open DICOM" dialog >> with such information, in >> order to let the user load a single DICOM Series. I would like to show to >> the user the set of Dicom series sorted by patient and study. >> >> In itk 4.9, is there any helper class to explore available DICOM Series >> and/or Studies in a folder with DICOM files and subfolders? >> >> Thanks in advance, >> Eva >> >> >> >> >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Mon May 23 08:46:43 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Mon, 23 May 2016 12:46:43 +0000 Subject: [ITK] [ITK-users] Iterator for python supported ITK In-Reply-To: <1463962845332.70502@sphic.org.cn> References: <1463734848567.2024@sphic.org.cn> <1463962845332.70502@sphic.org.cn> Message-ID: Hello, This is an intrinsic problem with using an interpretive language to perform per-element operations with many elements. Fundamentally these type of operation in C++ involve just a few CPU instructions, while in native python it will involve 100X more with string compares and symbol table look ups. There is the same problem if you tries to index your way through a numpy array. In numpy there are many optimization frameworks such a cython and numba implemented to optimize and ?compile? these types of operations. But sometimes if your image is small and performance doesn?t matter the ITK iterators would be OK. You could look into wrapping them following the instructions in the ITK Software guide. Brad > On May 22, 2016, at 8:20 PM, ??? wrote: > > Hi Matt, > > Thanks for your prompt reply. Actually, I'd like to know how to further improve the performance when I need to get each pixel value from an image using python supported ITK. > > > Regards, > > Zhuangming Shen > ________________________________________ > From: Matt McCormick > Sent: Friday, May 20, 2016 8:00 PM > To: ??? > Cc: insight-users at itk.org > Subject: Re: [ITK-users] Iterator for python supported ITK > > Hi Zhuangming, > > Iterating through pixels is slow in Python -- the iterators may not be > wrapped because it is always a good idea to use C++ in this case. > > HTH, > Matt > > On Fri, May 20, 2016 at 5:00 AM, ??? wrote: >> Hi all, >> >> >> Could anyone give me an example on "itk::ImageRegionIterator" using Python >> supported ITK? I can't find the wrapped "iterator". Thanks in advance. >> >> >> >> Regards, >> >> >> Zhuangming Shen >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Mon May 23 13:43:23 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 23 May 2016 13:43:23 -0400 Subject: [ITK] [ITK-dev] ITKv4.10rc2 - Why are there so many new CMake variable? In-Reply-To: References: Message-ID: Hi, I looked into this and I found two places that find_package(X11) are called. The first one is in a netlib example, which could easily be disabled: https://github.com/InsightSoftwareConsortium/ITK/blob/2e04f1da5984be79ef1eb6c3ac6f3a905a0f709a/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/examples/CMakeLists.txt#L7 The second, though, is in GDCM's OpenJPEG: https://github.com/InsightSoftwareConsortium/ITK/blob/2e04f1da5984be79ef1eb6c3ac6f3a905a0f709a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg-v2/CMakeLists.txt#L76 https://github.com/Kitware/CMake/blob/c75d91a05c9f442582726e3e80fec41d016da76f/Modules/CMakeBackwardCompatibilityC.cmake#L52 This would have to be changed to only perform the checks it needs. The reduced try_compile checks could also reduce initial configuration time. Thanks, Matt On Fri, May 20, 2016 at 2:13 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: > I am now getting a whole bunch of X11 related CMake variables in the advanced configuration of CMake. These are very annoying and not useful. There also seems to be a bunch of other VXL related variables, that didn?t use to be there. > > Brad > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From blowekamp at mail.nih.gov Mon May 23 13:55:33 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Mon, 23 May 2016 17:55:33 +0000 Subject: [ITK] [ITK-dev] ITKv4.10rc2 - Why are there so many new CMake variable? In-Reply-To: References: Message-ID: <6259C2E3-6972-4367-A020-84845549BE6A@mail.nih.gov> Matt, Great thanks for digging into this! Based on some other CMake variables popping up, are we enabling VNL testing and examples [1]? Perhaps examples for VNL should be turned off [2]? I think we have always run VNL testings though. Brad [1] https://github.com/InsightSoftwareConsortium/ITK/blob/2e04f1da5984be79ef1eb6c3ac6f3a905a0f709a/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/CMakeLists.txt#L441-L447 [2] https://github.com/InsightSoftwareConsortium/ITK/blob/2e04f1da5984be79ef1eb6c3ac6f3a905a0f709a/Modules/ThirdParty/VNL/src/CMakeLists.txt#L19 > On May 23, 2016, at 1:43 PM, Matt McCormick wrote: > > Hi, > > I looked into this and I found two places that find_package(X11) are called. > > The first one is in a netlib example, which could easily be disabled: > > https://github.com/InsightSoftwareConsortium/ITK/blob/2e04f1da5984be79ef1eb6c3ac6f3a905a0f709a/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/examples/CMakeLists.txt#L7 > > The second, though, is in GDCM's OpenJPEG: > > https://github.com/InsightSoftwareConsortium/ITK/blob/2e04f1da5984be79ef1eb6c3ac6f3a905a0f709a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg-v2/CMakeLists.txt#L76 > https://github.com/Kitware/CMake/blob/c75d91a05c9f442582726e3e80fec41d016da76f/Modules/CMakeBackwardCompatibilityC.cmake#L52 > > This would have to be changed to only perform the checks it needs. > The reduced try_compile checks could also reduce initial configuration > time. > > Thanks, > Matt > > On Fri, May 20, 2016 at 2:13 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] > wrote: >> I am now getting a whole bunch of X11 related CMake variables in the advanced configuration of CMake. These are very annoying and not useful. There also seems to be a bunch of other VXL related variables, that didn?t use to be there. >> >> Brad >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-developers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From matt.mccormick at kitware.com Mon May 23 13:55:15 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 23 May 2016 13:55:15 -0400 Subject: [ITK] [ITK-dev] ITKv4.10rc2 - Why are there so many new CMake variable? In-Reply-To: References: Message-ID: I created an issue to track this: https://issues.itk.org/jira/browse/ITK-3433 On Mon, May 23, 2016 at 1:43 PM, Matt McCormick wrote: > Hi, > > I looked into this and I found two places that find_package(X11) are called. > > The first one is in a netlib example, which could easily be disabled: > > https://github.com/InsightSoftwareConsortium/ITK/blob/2e04f1da5984be79ef1eb6c3ac6f3a905a0f709a/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/examples/CMakeLists.txt#L7 > > The second, though, is in GDCM's OpenJPEG: > > https://github.com/InsightSoftwareConsortium/ITK/blob/2e04f1da5984be79ef1eb6c3ac6f3a905a0f709a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg-v2/CMakeLists.txt#L76 > https://github.com/Kitware/CMake/blob/c75d91a05c9f442582726e3e80fec41d016da76f/Modules/CMakeBackwardCompatibilityC.cmake#L52 > > This would have to be changed to only perform the checks it needs. > The reduced try_compile checks could also reduce initial configuration > time. > > Thanks, > Matt > > On Fri, May 20, 2016 at 2:13 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] > wrote: >> I am now getting a whole bunch of X11 related CMake variables in the advanced configuration of CMake. These are very annoying and not useful. There also seems to be a bunch of other VXL related variables, that didn?t use to be there. >> >> Brad >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-developers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From matt.mccormick at kitware.com Mon May 23 14:03:17 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 23 May 2016 14:03:17 -0400 Subject: [ITK] [ITK-dev] ITKv4.10rc2 - Why are there so many new CMake variable? In-Reply-To: <6259C2E3-6972-4367-A020-84845549BE6A@mail.nih.gov> References: <6259C2E3-6972-4367-A020-84845549BE6A@mail.nih.gov> Message-ID: Good idea. Added here: http://review.source.kitware.com/#/c/21155/ On Mon, May 23, 2016 at 1:55 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: > Matt, > > Great thanks for digging into this! > > Based on some other CMake variables popping up, are we enabling VNL testing and examples [1]? > > Perhaps examples for VNL should be turned off [2]? I think we have always run VNL testings though. > > Brad > > [1] https://github.com/InsightSoftwareConsortium/ITK/blob/2e04f1da5984be79ef1eb6c3ac6f3a905a0f709a/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/CMakeLists.txt#L441-L447 > [2] https://github.com/InsightSoftwareConsortium/ITK/blob/2e04f1da5984be79ef1eb6c3ac6f3a905a0f709a/Modules/ThirdParty/VNL/src/CMakeLists.txt#L19 > >> On May 23, 2016, at 1:43 PM, Matt McCormick wrote: >> >> Hi, >> >> I looked into this and I found two places that find_package(X11) are called. >> >> The first one is in a netlib example, which could easily be disabled: >> >> https://github.com/InsightSoftwareConsortium/ITK/blob/2e04f1da5984be79ef1eb6c3ac6f3a905a0f709a/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/examples/CMakeLists.txt#L7 >> >> The second, though, is in GDCM's OpenJPEG: >> >> https://github.com/InsightSoftwareConsortium/ITK/blob/2e04f1da5984be79ef1eb6c3ac6f3a905a0f709a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg-v2/CMakeLists.txt#L76 >> https://github.com/Kitware/CMake/blob/c75d91a05c9f442582726e3e80fec41d016da76f/Modules/CMakeBackwardCompatibilityC.cmake#L52 >> >> This would have to be changed to only perform the checks it needs. >> The reduced try_compile checks could also reduce initial configuration >> time. >> >> Thanks, >> Matt >> >> On Fri, May 20, 2016 at 2:13 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] >> wrote: >>> I am now getting a whole bunch of X11 related CMake variables in the advanced configuration of CMake. These are very annoying and not useful. There also seems to be a bunch of other VXL related variables, that didn?t use to be there. >>> >>> Brad >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From mrguilfoyle at gmail.com Mon May 23 15:31:11 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Mon, 23 May 2016 20:31:11 +0100 Subject: [ITK] [ITK-users] Access DICOM private tags using SimpleITK Message-ID: <3781B509-3DAA-4888-B6EC-94984E74E5D5@gmail.com> In ITK the GDCMSeriesFileNames class (equivalently the ImageSeriesReader$GetGDCMSeriesFileNames method from Simple ITK) can both take arguments to read private DICOM tags (typically manufacturer specific info that does not follow the general standard.) I cannot figure out how to use this function to actually read in a series of images or a volume with the hidden tags (I know they are there as I can see them in Osirix!) The list of filenames that the two methods above return as no different whether the 'loadPrivateTags' attribute is set on or off. Any ideas how I can access the private tags? 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 blowekamp at mail.nih.gov Mon May 23 15:47:28 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Mon, 23 May 2016 19:47:28 +0000 Subject: [ITK] [ITK-users] Access DICOM private tags using SimpleITK In-Reply-To: <3781B509-3DAA-4888-B6EC-94984E74E5D5@gmail.com> References: <3781B509-3DAA-4888-B6EC-94984E74E5D5@gmail.com> Message-ID: Hello, To get all the tags from the dicom files you need to load them individually. Something along these lines, but iterating over the list generated by GetGDCMSeriesFileNames: from __future__ import print_function import SimpleITK as sitk import sys, os if len ( sys.argv ) < 2: print( "Usage: DicomImagePrintTags " ) sys.exit ( 1 ) inputImage = sitk.ReadImage( sys.argv[1] ) for k in inputImage.GetMetaDataKeys(): v = inputImage.GetMetaData(k) print("({0}) = = \"{2}\"".format(k,v)) HTH, Brad > On May 23, 2016, at 3:31 PM, Mathew Guilfoyle wrote: > > In ITK the GDCMSeriesFileNames class (equivalently the ImageSeriesReader$GetGDCMSeriesFileNames method from Simple ITK) can both take arguments to read private DICOM tags (typically manufacturer specific info that does not follow the general standard.) > > I cannot figure out how to use this function to actually read in a series of images or a volume with the hidden tags (I know they are there as I can see them in Osirix!) > > The list of filenames that the two methods above return as no different whether the 'loadPrivateTags' attribute is set on or off. > > Any ideas how I can access the private tags? > > 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 _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK 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 Mon May 23 15:59:43 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Mon, 23 May 2016 20:59:43 +0100 Subject: [ITK] [ITK-users] Access DICOM private tags using SimpleITK In-Reply-To: References: <3781B509-3DAA-4888-B6EC-94984E74E5D5@gmail.com> Message-ID: Thanks Brad - the trouble I'm having is that some of the keys are private/hidden. For instance, in my images when I use the image.GetMetaDataKeys() method it returns a list of 107 keys but the one I need is a private manufacturer-specific timing tag that is not part of the standard meta-data dictionary. I know the tag I need because OsiriX viewer shows all the standard and private tags and it is in there with associated data. However, if I run image.HasMetaDataKey(my_private_key) it returns FALSE. Reading various sources, including the ITK docs, it seems GDCM library has a setting that needs to be turned on to read private DICOM tags. However, the only reference I can see to this setting in SimpleITK is as an argument to the GetGDCMSeriesFileNames method and I'm not clear what function it serves there as the list of files is the same irrespective. What I need somehow is to tell ReadImage or ImageSeriesReader to parse the private tags...?? Thanks Mat > On 23 May 2016, at 20:47, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: > > Hello, > > To get all the tags from the dicom files you need to load them individually. Something along these lines, but iterating over the list generated by GetGDCMSeriesFileNames: > > from __future__ import print_function > > import SimpleITK as sitk > import sys, os > > if len ( sys.argv ) < 2: > print( "Usage: DicomImagePrintTags " ) > sys.exit ( 1 ) > > inputImage = sitk.ReadImage( sys.argv[1] ) > > for k in inputImage.GetMetaDataKeys(): > v = inputImage.GetMetaData(k) > print("({0}) = = \"{2}\"".format(k,v)) > > > HTH, > Brad > > > >> On May 23, 2016, at 3:31 PM, Mathew Guilfoyle wrote: >> >> In ITK the GDCMSeriesFileNames class (equivalently the ImageSeriesReader$GetGDCMSeriesFileNames method from Simple ITK) can both take arguments to read private DICOM tags (typically manufacturer specific info that does not follow the general standard.) >> >> I cannot figure out how to use this function to actually read in a series of images or a volume with the hidden tags (I know they are there as I can see them in Osirix!) >> >> The list of filenames that the two methods above return as no different whether the 'loadPrivateTags' attribute is set on or off. >> >> Any ideas how I can access the private tags? >> >> 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 > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From sebastian.ordas at gmail.com Mon May 23 16:29:51 2016 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Mon, 23 May 2016 17:29:51 -0300 Subject: [ITK] [ITK-users] cannot save transform to file: Can't Create IO object Message-ID: <9d8c22ce-801c-11a2-a6f4-917c475271bb@gmail.com> Hello, I am trying to run the code bellow from my application (using ITK 4.9) but I get the following error : ERROR: Caught exception: itk::ERROR: TransformFileWriterTemplate(000000000CD770E0): Can't Create IO object for file test.tfm I am sure that if I test it from a simple test application this should work, but I am trying to understand what I am missing from within my project (maybe some factory not yet registered or even some registration-related module not yet enabled in cmake?) typedef itk::VersorRigid3DTransform< double > TransformType; TransformType::Pointer trf = TransformType::New(); trf->SetIdentity(); itk::TransformFileWriterTemplate::Pointer writer = itk::TransformFileWriterTemplate::New(); writer->SetFileName("test.tfm"); writer->SetInput(trf); try { writer->Update(); } catch (itk::ExceptionObject& e) { std::cerr << "Caught exception: " << e.GetDescription() << std::endl; } -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Mon May 23 16:35:32 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 23 May 2016 16:35:32 -0400 Subject: [ITK] [ITK-users] cannot save transform to file: Can't Create IO object In-Reply-To: <9d8c22ce-801c-11a2-a6f4-917c475271bb@gmail.com> References: <9d8c22ce-801c-11a2-a6f4-917c475271bb@gmail.com> Message-ID: Hello Sebastian, By running against ITK with this patch checked out: http://review.source.kitware.com/#/c/21115/ the error message will state what transform IO classes are registered. HTH, Matt On Mon, May 23, 2016 at 4:29 PM, Sebastian Ordas wrote: > Hello, I am trying to run the code bellow from my application (using ITK > 4.9) but I get the following error : > > ERROR: Caught exception: itk::ERROR: > TransformFileWriterTemplate(000000000CD770E0): Can't Create IO object > for file test.tfm > > I am sure that if I test it from a simple test application this should work, > but I am trying to understand what I am missing from within my project > (maybe some factory not yet registered or even some registration-related > module not yet enabled in cmake?) > > typedef itk::VersorRigid3DTransform< double > TransformType; > TransformType::Pointer trf = TransformType::New(); > trf->SetIdentity(); > > itk::TransformFileWriterTemplate::Pointer writer = > itk::TransformFileWriterTemplate::New(); > > writer->SetFileName("test.tfm"); > writer->SetInput(trf); > > try > { > writer->Update(); > } > catch (itk::ExceptionObject& e) > { > std::cerr << "Caught exception: " << e.GetDescription() << std::endl; > } > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Mon May 23 17:24:38 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 23 May 2016 17:24:38 -0400 Subject: [ITK] CenteredRigid2DTransform In-Reply-To: <5ab54193.16298.154b42b889a.Coremail.b12011130@njupt.edu.cn> References: <5ab54193.16298.154b42b889a.Coremail.b12011130@njupt.edu.cn> Message-ID: Hello, The CenteredRigid2DTransform does not include scale parameters. What indicates that the image was scaled? Thanks, Matt On Sun, May 15, 2016 at 7:27 AM, ?? wrote: > > Hello! > > I am using ITK for image registration now, and I build the source code > ImageRegistration5.cxx in ~/InsightToolkit-4.9.0/Examples/RegistrationITKv4. > And in this code, it uses CenteredRigid2DTransform, but I found is that I > got a image that was scaled, I don't know why. > So, is the CenteredRigid2DTransform includes SCALE parameters? > > -- > Gao le > School?Nanjing University of Posts and Telecommunications > Major?Biomedical Engineering > Tel?18362972078 > Email?B12011130 at njupt.edu.cn > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > From j.plumat at auckland.ac.nz Mon May 23 17:54:58 2016 From: j.plumat at auckland.ac.nz (Jerome Plumat) Date: Tue, 24 May 2016 09:54:58 +1200 Subject: [ITK] [ITK-users] reading 3D temporal MRA dicom: miss ordered Message-ID: <57437C32.4030301@auckland.ac.nz> Dear all, I'm facing to a problem while reading a 3D Angiography dicom data set and transforming it in MHA with ITK 4.8.1. The angiography is a TWIST generated by a 3T Siemens scanner. Each slice is a projection of the head at a specific time after the contrast agent injection. The dicom is detected as 3D (0018,0023) CS [3D] # 2, 1 MRAcquisitionType While I try to load the whole dicom with ITK (using the lines below) it creates a volume but the slices are not well ordered. Indeed, each slice has a timer tag and the generated sequence has is not in the proper order. Has anyone faced this problem? Thanks a lot. Jerome Plumat Reading the DCM Angiography with: const unsigned int Dimension = 3; typedef float PixelType; typedef itk::Image ImageType; typedef unsigned short DcmPixelType; typedef typename itk::Image DCMImageType; typedef typename itk::Image OutputImageType; typedef itk::ImageSeriesReader< DCMImageType > DCMReaderType; typedef itk::GDCMSeriesFileNames NamesGeneratorType; typedef itk::GDCMImageIO ImageIOType; typedef std::vector< std::string > SeriesIdContainer; typedef std::vector< std::string > FileNamesContainer; ImageIOType::Pointer dicomIO = ImageIOType::New(); NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New(); DCMReaderType::Pointer reader = DCMReaderType::New(); reader->SetImageIO( dicomIO ); nameGenerator->SetUseSeriesDetails( true ); // restrict to the serie date nameGenerator->AddSeriesRestriction("0008|0021" ); nameGenerator->SetDirectory( inputPath ); // m_path designates the DCM folder const SeriesIdContainer & seriesUID = nameGenerator->GetSeriesUIDs(); std::string seriesIdentifier = seriesUID.begin()->c_str(); FileNamesContainer fileNames; fileNames = nameGenerator->GetFileNames( seriesIdentifier ); reader->SetFileNames( fileNames ); typedef itk::CastImageFilter< DCMImageType, OutputImageType > CastFilterType; typename CastFilterType::Pointer caster = CastFilterType::New(); caster->SetInput( reader->GetOutput() ); // write the volume typedef itk::ImageFileWriter< OutputImageType > MetaWriterType; MetaWriterType::Pointer writer = MetaWriterType::New(); writer->SetFileName( outputPath ); // volume.mha writer->SetInput( caster->GetOutput() ); try{ writer->Update(); }catch( itk::ExceptionObject &err){ std::cerr << "Error while writing the volume as: " << outputPath << std::endl; std::cerr << err << std::endl; exit( EXIT_FAILURE ); } _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Mon May 23 19:21:39 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 23 May 2016 19:21:39 -0400 Subject: [ITK] [ITK-dev] installed ITK cannot be moved due to absolute path In-Reply-To: References: Message-ID: Hi Rashad, It looks like MXE is configured to use system versions of EXPAT, HDF5, JPEG, PNG, TIFF, and ZLIB: https://github.com/mxe/mxe/blob/4135f9b1227ba56b92ceb8a982016370ad5c8894/src/itk.mk#L28-L33 USE_SYSTEM could be disabled for these libraries. Or, it may be possible for the module system to learn relative locations of these libraries with ITK_USE_SYSTEM*. But, it would work best if these projects were configured with CMake, create a Config.cmake or -config.cmake file, and use relative paths internally. HTH, Matt On Tue, May 10, 2016 at 5:25 PM, Rashad Kanavath wrote: > > > On Tue, May 10, 2016 at 10:50 PM, D?enan Zuki? wrote: >> >> Hi Rashad, >> >> a few months ago relative paths were completely removed from CMake, >> because they were never fully implemented. Have you followed recommendations >> from here for cross-compiling? > > > Yes. indeed. I had updated the mxe/src/itk.mk for several versions of ITK! > > Regarding relative path in cmake, I don't understand. I didn't use cmake > specific REL_PATH. >> >> >> As for integrating your changes into ITK, you should submit a patch >> following the instructions here. If your changes don't break anything, they >> are likely to be integrated. > > > issue here is a bit different. For all libitk* stuff the story ends well. > For thirdparties, zlib, expat etc.. it is good idea to put the full path > because we don't know if they are in same install directory as ITK or not. > But this make the installed cmake modules non-portable even to a different > location on the same disk. > > Now if anyone want to provide a distributable setup of ITK. patch the > generated cmake files with sed and then copy it. This is what I am doing > right now! > A simple not perfect solution is to have all thirdparties make > _PREFIX variable inside the ITKConfig.cmake > > and for each library we use _PREFIX/include and > _PREFIX/lib > > > Another option is to avoid full path directly inside cmake module files and > put find_package() calls in the install tree. > > As these files are autogenerated by cmake, don't know what is possible. > > > > > >> >> Regards, >> D?enan >> >> On Mon, May 9, 2016 at 4:27 PM, Rashad Kanavath >> wrote: >>> >>> Hello all, >>> >>> I have some issue when copying ITK install directory to a different >>> system. I agree this is not usual and may not appear on a linux distro or >>> windows. >>> >>> My requirement is bit different. I cross-compile ITK and then use the >>> binaries on Windows. Using dll and headers are fine. But the installed cmake >>> files are a problem. They have absolute path in ITK-4.8/Modules/*.cmake >>> files. It is not in all .cmake files even though I put a wildcard there.. >>> >>> For a easy and quick workaround. I rely on mighty sed command to insert >>> something into installed cmake file. >>> >>> For example see this; >>> lib/cmake/ITK-4.8/ITKTargets-release.cmake >>> >>> set(CMAKE_IMPORT_FILE_VERSION 1) >>> set(LIB_INSTALL_PREFIX) >>> get_filename_component(CURRENT_FILE_DIR "${CMAKE_CURRENT_LIST_FILE}" >>> PATH) >>> get_filename_component(LIB_INSTALL_PREFIX "${CURRENT_FILE_DIR}" PATH) >>> get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH) >>> get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH) >>> >>> and at last: >>> >>> $(SED) -i 's,$(PREFIX)/$(TARGET),\${LIB_INSTALL_PREFIX},g' >>> 'lib/cmake/ITK-$(ITK_VER)/ITKTargets-release.cmake' >>> >>> I would like to have this patch inside the other .cmake files in the >>> installation and avoid the sed commands during post-installation >>> >>> Here is the list of cmake files that needs this change. >>> lib/cmake/ITK-4.8/ITKTargets-release.cmake >>> lib/cmake/ITK-4.8/Modules/ITKZLIB.cmake >>> lib/cmake/ITK-4.8/Modules/ITKExpat.cmake >>> lib/cmake/ITK-4.8/Modules/ITKHDF5.cmake >>> lib/cmake/ITK-4.8/Modules/ITKJPEG.cmake >>> lib/cmake/ITK-4.8/Modules/ITKTIFF.cmake >>> lib/cmake/ITK-4.8/Modules/ITKPNG.cmake >>> >>> So is it possible to make the change into future version of ITK? >>> >>> The major issue here is those cmake files are generated by cmake. Is >>> there a way cmake could use relative path ? >>> >>> >>> -- >>> Regards, >>> Rashad >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-developers >>> >> > > > > -- > Regards, > Rashad > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From sebastian.ordas at gmail.com Mon May 23 20:42:38 2016 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Mon, 23 May 2016 21:42:38 -0300 Subject: [ITK] [ITK-users] cannot save transform to file: Can't Create IO object In-Reply-To: References: <9d8c22ce-801c-11a2-a6f4-917c475271bb@gmail.com> Message-ID: Thanks Matt, The retrieved transformIO is null I looked into my ITK 4.9 build and I am trying something like this: itk::TransformFileWriterTemplate::Pointer writer = itk::TransformFileWriterTemplate::New(); // are .tfm and .txt the right file extensions? itk::TransformIOFactoryTemplate::TransformIOBasePointer tranformIO = itk::TransformIOFactoryTemplate::CreateTransformIO( "fiducials_transform.tfm", itk::TransformIOFactoryFileModeType::WriteMode ); if (tranformIO.IsNull()) { MITK_ERROR << "transform IO is null"; return; } writer->SetTransformIO(tranformIO); writer->SetFileName("fiducials_transform.tfm"); writer->SetInput(transform); try { writer->Update(); } catch (itk::ExceptionObject& e) { MITK_ERROR << "Caught exception: " << e.GetDescription(); QMessageBox::information( this, "Save transform", "Could not save transform. See error log for details." ); } thank you sebastian On 23/05/2016 05:35 p.m., Matt McCormick wrote: > Hello Sebastian, > > By running against ITK with this patch checked out: > > http://review.source.kitware.com/#/c/21115/ > > the error message will state what transform IO classes are registered. > > HTH, > Matt > > On Mon, May 23, 2016 at 4:29 PM, Sebastian Ordas > wrote: >> Hello, I am trying to run the code bellow from my application (using ITK >> 4.9) but I get the following error : >> >> ERROR: Caught exception: itk::ERROR: >> TransformFileWriterTemplate(000000000CD770E0): Can't Create IO object >> for file test.tfm >> >> I am sure that if I test it from a simple test application this should work, >> but I am trying to understand what I am missing from within my project >> (maybe some factory not yet registered or even some registration-related >> module not yet enabled in cmake?) >> >> typedef itk::VersorRigid3DTransform< double > TransformType; >> TransformType::Pointer trf = TransformType::New(); >> trf->SetIdentity(); >> >> itk::TransformFileWriterTemplate::Pointer writer = >> itk::TransformFileWriterTemplate::New(); >> >> writer->SetFileName("test.tfm"); >> writer->SetInput(trf); >> >> try >> { >> writer->Update(); >> } >> catch (itk::ExceptionObject& e) >> { >> std::cerr << "Caught exception: " << e.GetDescription() << std::endl; >> } >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 basafa at clearguidemedical.com Mon May 23 20:54:40 2016 From: basafa at clearguidemedical.com (ebasafa) Date: Mon, 23 May 2016 17:54:40 -0700 (MST) Subject: [ITK] [ITK-users] reading 3D temporal MRA dicom: miss ordered In-Reply-To: <57437C32.4030301@auckland.ac.nz> References: <57437C32.4030301@auckland.ac.nz> Message-ID: <1464051280226-7588892.post@n2.nabble.com> Does this mean that all slices have the same location information and you want them to be ordered based on the time stamp? If so, I am afraid GDCM might not be able to sort them properly. If all slices have the same location (Image Position Patient) and orientation (Image Orientation Patient), the sorting might fail. Take a look at how GDCM sorts DICOM slices (https://itk.org/Doxygen/html/classitk_1_1GDCMSeriesFileNames.html): "This class generates a sequence of files whose filenames point to a DICOM file. The ordering is based on the following strategy: Read all images in the directory (assuming there is only one study/series) 1) Extract Image Orientation & Image Position from DICOM images, and then calculate the ordering based on the 3D coordinate of the slice. 2) If for some reason this information is not found or failed, another strategy is used: the ordering is based on 'Image Number'. 3) If this strategy also failed, then the filenames are ordered by lexicographical order." HTH Ehsan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-reading-3D-temporal-MRA-dicom-miss-ordered-tp7588890p7588892.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From Roy.Harnish at ucsf.edu Mon May 23 21:56:31 2016 From: Roy.Harnish at ucsf.edu (Harnish, Roy) Date: Tue, 24 May 2016 01:56:31 +0000 Subject: [ITK] [ITK-users] suppressing print statements when using Python wrappers Message-ID: Hi, I'm wondering if anyone else is getting lots output to the console when using the Python wrappers? If I try to run the SNIPPET below with an itkImage: > I get many lines of print statements. Would like to know how to suppress. Thanks for any info. Roy SNIPPET: def itkImage_orient_to_axial(itkImage, itkImageType): orienterType = itk.OrientImageFilter[ itkImageType, itkImageType ] orienter = orienterType.New() orienter.UseImageDirectionOn() orienter.SetGivenCoordinateDirection(itkImage.GetDirection()) orienter.SetInput( itkImage ) orienter.SetDesiredCoordinateOrientationToAxial() orienter.Update() return orienter.GetOutput() itkImage_axial = itkImage_orient_to_axial(itkImage,imageType) OUTPUT: itkOrientImageFilterISS3ISS3: 0.343294itkOrientImageFilterISS3ISS3: 0.346615itkOrientImageFilterISS3ISS3: 0.349935itkOrientImageFilterISS3ISS3: 0.353255itkOrientImageFilterISS3ISS3: 0.356575itkOrientImageFilterISS3ISS3: 0.359896itkOrientImageFilterISS3ISS3: 0.363216itkOrientImageFilterISS3ISS3: 0.366536itkOrientImageFilterISS3ISS3: 0.369857itkOrientImageFilterISS3ISS3: 0.373177itkOrientImageFilterISS3ISS3: 0.376497itkOrientImageFilterISS3ISS3: 0.379818itkOrientImageFilterISS3ISS3: 0.383138itkOrientImageFilterISS3ISS3: 0.386458itkOrientImageFilterISS3ISS3: 0.389779itkOrientImageFilterISS3ISS3: 0.393099itkOrientImageFilterISS3ISS3: 0.396419itkOrientImageFilterISS3ISS3: 0.399740itkOrientImageFilterISS3ISS3: 0.403060itkOrientImageFilterISS3ISS3: 0.406380itkOrientImageFilterISS3ISS3: 0.409701itkOrientImageFilterISS3ISS3: 0.413021itkOrientImageFilterISS3ISS3: 0.416341itkOrientImageFilterISS3ISS3: 0.419661itkOrientImageFilterISS3ISS3: 0.422982itkOrientImageFilterISS3ISS3: 0.426302itkOrientImageFilterISS3ISS3: 0.429622itkOrientImageFilterISS3ISS3: 0.432943itkOrientImageFilterISS3ISS3: 0.436263itkOrientImageFilterISS3ISS3: 0.439583itkOrientImageFilterISS3ISS3: 0.442904itkOrientImageFilterISS3ISS3: 0.446224itkOrientImageFilterISS3ISS3: 0.449544itkOrientImageFilterISS3ISS3: 0.452865itkOrientImageFilterISS3ISS3: 0.456185itkOrientImageFilterISS3ISS3: 0.459505itkOrientImageFilterISS3ISS3: 0.462825itkOrientImageFilterISS3ISS3: 0.466146itkOrientImageFilterISS3ISS3: 0.469466itkOrientImageFilterISS3ISS3: 0.472786itkOrientImageFilterISS3ISS3: 0.476107itkOrientImageFilterISS3ISS3: 0.479427itkOrientImageFilterISS3ISS3: 0.482747itkOrientImageFilterISS3ISS3: 0.486068itkOrientImageFilterISS3ISS3: 0.489388itkOrientImageFilterISS3ISS3: 0.492708itkOrientImageFilterISS3ISS3: 0.496029itkOrientImageFilterISS3ISS3: 0.499349itkOrientImageFilterISS3ISS3: 0.502669itkOrientImageFilterISS3ISS3: 0.505990itkOrientImageFilterISS3ISS3: 0.509310itkOrientImageFilterISS3ISS3: 0.512630itkOrientImageFilterISS3ISS3: 0.515951itkOrientImageFilterISS3ISS3: 0.519271itkOrientImageFilterISS3ISS3: 0.522591itkOrientImageFilterISS3ISS3: 0.525911itkOrientImageFilterISS3ISS3: 0.529232itkOrientImageFilterISS3ISS3: 0.532552itkOrientImageFilterISS3ISS3: 0.535872itkOrientImageFilterISS3ISS3: 0.539193itkOrientImageFilterISS3ISS3: 0.542513itkOrientImageFilterISS3ISS3: 0.545833itkOrientImageFilterISS3ISS3: 0.549154itkOrientImageFilterISS3ISS3: 0.552474itkOrientImageFilterISS3ISS3: 0.555794itkOrientImageFilterISS3ISS3: 0.559115itkOrientImageFilterISS3ISS3: 0.562435itkOrientImageFilterISS3ISS3: 0.565755itkOrientImageFilterISS3ISS3: 0.569075itkOrientImageFilterISS3ISS3: 0.572396itkOrientImageFilterISS3ISS3: 0.575716itkOrientImageFilterISS3ISS3: 0.579036itkOrientImageFilterISS3ISS3: 0.582357itkOrientImageFilterISS3ISS3: 0.585677itkOrientImageFilterISS3ISS3: 0.588997itkOrientImageFilterISS3ISS3: 0.592318itkOrientImageFilterISS3ISS3: 0.595638itkOrientImageFilterISS3ISS3: 0.598958itkOrientImageFilterISS3ISS3: 0.602279itkOrientImageFilterISS3ISS3: 0.605599itkOrientImageFilterISS3ISS3: 0.608919itkOrientImageFilterISS3ISS3: 0.612240itkOrientImageFilterISS3ISS3: 0.615560itkOrientImageFilterISS3ISS3: 0.618880itkOrientImageFilterISS3ISS3: 0.622200itkOrientImageFilterISS3ISS3: 0.625521itkOrientImageFilterISS3ISS3: 0.628841itkOrientImageFilterISS3ISS3: 0.632161itkOrientImageFilterISS3ISS3: 0.635482itkOrientImageFilterISS3ISS3: 0.638802itkOrientImageFilterISS3ISS3: 0.642122itkOrientImageFilterISS3ISS3: 0.645443itkOrientImageFilterISS3ISS3: 0.648763itkOrientImageFilterISS3ISS3: 0.652083itkOrientImageFilterISS3ISS3: 0.655404itkOrientImageFilterISS3ISS3: 0.658724itkOrientImageFilterISS3ISS3: 0.662044itkOrientImageFilterISS3ISS3: 0.665365itkOrientImageFilterISS3ISS3: 0.666667itkOrientImageFilterISS3ISS3: 0.666667itkOrientImageFilterISS3ISS3: 1.000000 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matt.mccormick at kitware.com Mon May 23 22:33:11 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 23 May 2016 22:33:11 -0400 Subject: [ITK] [ITK-users] suppressing print statements when using Python wrappers In-Reply-To: References: Message-ID: Hi Roy, Does import itkConfig itkConfig.ProgressCallback = None address the issue? HTH, Matt On Mon, May 23, 2016 at 9:56 PM, Harnish, Roy wrote: > Hi, > > I'm wondering if anyone else is getting lots output to the console when > using the Python wrappers? If I try to run the SNIPPET below with an > itkImage: > > at 0x7f1ec3bc5060> > > > I get many lines of print statements. Would like to know how to suppress. > > Thanks for any info. > > Roy > > > SNIPPET: > > def itkImage_orient_to_axial(itkImage, itkImageType): > orienterType = itk.OrientImageFilter[ itkImageType, itkImageType ] > orienter = orienterType.New() > orienter.UseImageDirectionOn() > orienter.SetGivenCoordinateDirection(itkImage.GetDirection()) > orienter.SetInput( itkImage ) > orienter.SetDesiredCoordinateOrientationToAxial() > orienter.Update() > return orienter.GetOutput() > > itkImage_axial = itkImage_orient_to_axial(itkImage,imageType) > > > OUTPUT: > > itkOrientImageFilterISS3ISS3: 0.343294itkOrientImageFilterISS3ISS3: > 0.346615itkOrientImageFilterISS3ISS3: 0.349935itkOrientImageFilterISS3ISS3: > 0.353255itkOrientImageFilterISS3ISS3: 0.356575itkOrientImageFilterISS3ISS3: > 0.359896itkOrientImageFilterISS3ISS3: 0.363216itkOrientImageFilterISS3ISS3: > 0.366536itkOrientImageFilterISS3ISS3: 0.369857itkOrientImageFilterISS3ISS3: > 0.373177itkOrientImageFilterISS3ISS3: 0.376497itkOrientImageFilterISS3ISS3: > 0.379818itkOrientImageFilterISS3ISS3: 0.383138itkOrientImageFilterISS3ISS3: > 0.386458itkOrientImageFilterISS3ISS3: 0.389779itkOrientImageFilterISS3ISS3: > 0.393099itkOrientImageFilterISS3ISS3: 0.396419itkOrientImageFilterISS3ISS3: > 0.399740itkOrientImageFilterISS3ISS3: 0.403060itkOrientImageFilterISS3ISS3: > 0.406380itkOrientImageFilterISS3ISS3: 0.409701itkOrientImageFilterISS3ISS3: > 0.413021itkOrientImageFilterISS3ISS3: 0.416341itkOrientImageFilterISS3ISS3: > 0.419661itkOrientImageFilterISS3ISS3: 0.422982itkOrientImageFilterISS3ISS3: > 0.426302itkOrientImageFilterISS3ISS3: 0.429622itkOrientImageFilterISS3ISS3: > 0.432943itkOrientImageFilterISS3ISS3: 0.436263itkOrientImageFilterISS3ISS3: > 0.439583itkOrientImageFilterISS3ISS3: 0.442904itkOrientImageFilterISS3ISS3: > 0.446224itkOrientImageFilterISS3ISS3: 0.449544itkOrientImageFilterISS3ISS3: > 0.452865itkOrientImageFilterISS3ISS3: 0.456185itkOrientImageFilterISS3ISS3: > 0.459505itkOrientImageFilterISS3ISS3: 0.462825itkOrientImageFilterISS3ISS3: > 0.466146itkOrientImageFilterISS3ISS3: 0.469466itkOrientImageFilterISS3ISS3: > 0.472786itkOrientImageFilterISS3ISS3: 0.476107itkOrientImageFilterISS3ISS3: > 0.479427itkOrientImageFilterISS3ISS3: 0.482747itkOrientImageFilterISS3ISS3: > 0.486068itkOrientImageFilterISS3ISS3: 0.489388itkOrientImageFilterISS3ISS3: > 0.492708itkOrientImageFilterISS3ISS3: 0.496029itkOrientImageFilterISS3ISS3: > 0.499349itkOrientImageFilterISS3ISS3: 0.502669itkOrientImageFilterISS3ISS3: > 0.505990itkOrientImageFilterISS3ISS3: 0.509310itkOrientImageFilterISS3ISS3: > 0.512630itkOrientImageFilterISS3ISS3: 0.515951itkOrientImageFilterISS3ISS3: > 0.519271itkOrientImageFilterISS3ISS3: 0.522591itkOrientImageFilterISS3ISS3: > 0.525911itkOrientImageFilterISS3ISS3: 0.529232itkOrientImageFilterISS3ISS3: > 0.532552itkOrientImageFilterISS3ISS3: 0.535872itkOrientImageFilterISS3ISS3: > 0.539193itkOrientImageFilterISS3ISS3: 0.542513itkOrientImageFilterISS3ISS3: > 0.545833itkOrientImageFilterISS3ISS3: 0.549154itkOrientImageFilterISS3ISS3: > 0.552474itkOrientImageFilterISS3ISS3: 0.555794itkOrientImageFilterISS3ISS3: > 0.559115itkOrientImageFilterISS3ISS3: 0.562435itkOrientImageFilterISS3ISS3: > 0.565755itkOrientImageFilterISS3ISS3: 0.569075itkOrientImageFilterISS3ISS3: > 0.572396itkOrientImageFilterISS3ISS3: 0.575716itkOrientImageFilterISS3ISS3: > 0.579036itkOrientImageFilterISS3ISS3: 0.582357itkOrientImageFilterISS3ISS3: > 0.585677itkOrientImageFilterISS3ISS3: 0.588997itkOrientImageFilterISS3ISS3: > 0.592318itkOrientImageFilterISS3ISS3: 0.595638itkOrientImageFilterISS3ISS3: > 0.598958itkOrientImageFilterISS3ISS3: 0.602279itkOrientImageFilterISS3ISS3: > 0.605599itkOrientImageFilterISS3ISS3: 0.608919itkOrientImageFilterISS3ISS3: > 0.612240itkOrientImageFilterISS3ISS3: 0.615560itkOrientImageFilterISS3ISS3: > 0.618880itkOrientImageFilterISS3ISS3: 0.622200itkOrientImageFilterISS3ISS3: > 0.625521itkOrientImageFilterISS3ISS3: 0.628841itkOrientImageFilterISS3ISS3: > 0.632161itkOrientImageFilterISS3ISS3: 0.635482itkOrientImageFilterISS3ISS3: > 0.638802itkOrientImageFilterISS3ISS3: 0.642122itkOrientImageFilterISS3ISS3: > 0.645443itkOrientImageFilterISS3ISS3: 0.648763itkOrientImageFilterISS3ISS3: > 0.652083itkOrientImageFilterISS3ISS3: 0.655404itkOrientImageFilterISS3ISS3: > 0.658724itkOrientImageFilterISS3ISS3: 0.662044itkOrientImageFilterISS3ISS3: > 0.665365itkOrientImageFilterISS3ISS3: 0.666667itkOrientImageFilterISS3ISS3: > 0.666667itkOrientImageFilterISS3ISS3: 1.000000 > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Roy.Harnish at ucsf.edu Mon May 23 23:31:21 2016 From: Roy.Harnish at ucsf.edu (Harnish, Roy) Date: Tue, 24 May 2016 03:31:21 +0000 Subject: [ITK] [ITK-users] suppressing print statements when using Python wrappers In-Reply-To: References: , Message-ID: Hi Matt, That did it! Many thanks. Roy ________________________________________ From: Matt McCormick [matt.mccormick at kitware.com] Sent: Monday, May 23, 2016 7:33 PM To: Harnish, Roy Cc: insight-users at itk.org Subject: Re: [ITK-users] suppressing print statements when using Python wrappers Hi Roy, Does import itkConfig itkConfig.ProgressCallback = None address the issue? HTH, Matt On Mon, May 23, 2016 at 9:56 PM, Harnish, Roy wrote: > Hi, > > I'm wondering if anyone else is getting lots output to the console when > using the Python wrappers? If I try to run the SNIPPET below with an > itkImage: > > at 0x7f1ec3bc5060> > > > I get many lines of print statements. Would like to know how to suppress. > > Thanks for any info. > > Roy > > > SNIPPET: > > def itkImage_orient_to_axial(itkImage, itkImageType): > orienterType = itk.OrientImageFilter[ itkImageType, itkImageType ] > orienter = orienterType.New() > orienter.UseImageDirectionOn() > orienter.SetGivenCoordinateDirection(itkImage.GetDirection()) > orienter.SetInput( itkImage ) > orienter.SetDesiredCoordinateOrientationToAxial() > orienter.Update() > return orienter.GetOutput() > > itkImage_axial = itkImage_orient_to_axial(itkImage,imageType) > > > OUTPUT: > > itkOrientImageFilterISS3ISS3: 0.343294itkOrientImageFilterISS3ISS3: > 0.346615itkOrientImageFilterISS3ISS3: 0.349935itkOrientImageFilterISS3ISS3: > 0.353255itkOrientImageFilterISS3ISS3: 0.356575itkOrientImageFilterISS3ISS3: > 0.359896itkOrientImageFilterISS3ISS3: 0.363216itkOrientImageFilterISS3ISS3: > 0.366536itkOrientImageFilterISS3ISS3: 0.369857itkOrientImageFilterISS3ISS3: > 0.373177itkOrientImageFilterISS3ISS3: 0.376497itkOrientImageFilterISS3ISS3: > 0.379818itkOrientImageFilterISS3ISS3: 0.383138itkOrientImageFilterISS3ISS3: > 0.386458itkOrientImageFilterISS3ISS3: 0.389779itkOrientImageFilterISS3ISS3: > 0.393099itkOrientImageFilterISS3ISS3: 0.396419itkOrientImageFilterISS3ISS3: > 0.399740itkOrientImageFilterISS3ISS3: 0.403060itkOrientImageFilterISS3ISS3: > 0.406380itkOrientImageFilterISS3ISS3: 0.409701itkOrientImageFilterISS3ISS3: > 0.413021itkOrientImageFilterISS3ISS3: 0.416341itkOrientImageFilterISS3ISS3: > 0.419661itkOrientImageFilterISS3ISS3: 0.422982itkOrientImageFilterISS3ISS3: > 0.426302itkOrientImageFilterISS3ISS3: 0.429622itkOrientImageFilterISS3ISS3: > 0.432943itkOrientImageFilterISS3ISS3: 0.436263itkOrientImageFilterISS3ISS3: > 0.439583itkOrientImageFilterISS3ISS3: 0.442904itkOrientImageFilterISS3ISS3: > 0.446224itkOrientImageFilterISS3ISS3: 0.449544itkOrientImageFilterISS3ISS3: > 0.452865itkOrientImageFilterISS3ISS3: 0.456185itkOrientImageFilterISS3ISS3: > 0.459505itkOrientImageFilterISS3ISS3: 0.462825itkOrientImageFilterISS3ISS3: > 0.466146itkOrientImageFilterISS3ISS3: 0.469466itkOrientImageFilterISS3ISS3: > 0.472786itkOrientImageFilterISS3ISS3: 0.476107itkOrientImageFilterISS3ISS3: > 0.479427itkOrientImageFilterISS3ISS3: 0.482747itkOrientImageFilterISS3ISS3: > 0.486068itkOrientImageFilterISS3ISS3: 0.489388itkOrientImageFilterISS3ISS3: > 0.492708itkOrientImageFilterISS3ISS3: 0.496029itkOrientImageFilterISS3ISS3: > 0.499349itkOrientImageFilterISS3ISS3: 0.502669itkOrientImageFilterISS3ISS3: > 0.505990itkOrientImageFilterISS3ISS3: 0.509310itkOrientImageFilterISS3ISS3: > 0.512630itkOrientImageFilterISS3ISS3: 0.515951itkOrientImageFilterISS3ISS3: > 0.519271itkOrientImageFilterISS3ISS3: 0.522591itkOrientImageFilterISS3ISS3: > 0.525911itkOrientImageFilterISS3ISS3: 0.529232itkOrientImageFilterISS3ISS3: > 0.532552itkOrientImageFilterISS3ISS3: 0.535872itkOrientImageFilterISS3ISS3: > 0.539193itkOrientImageFilterISS3ISS3: 0.542513itkOrientImageFilterISS3ISS3: > 0.545833itkOrientImageFilterISS3ISS3: 0.549154itkOrientImageFilterISS3ISS3: > 0.552474itkOrientImageFilterISS3ISS3: 0.555794itkOrientImageFilterISS3ISS3: > 0.559115itkOrientImageFilterISS3ISS3: 0.562435itkOrientImageFilterISS3ISS3: > 0.565755itkOrientImageFilterISS3ISS3: 0.569075itkOrientImageFilterISS3ISS3: > 0.572396itkOrientImageFilterISS3ISS3: 0.575716itkOrientImageFilterISS3ISS3: > 0.579036itkOrientImageFilterISS3ISS3: 0.582357itkOrientImageFilterISS3ISS3: > 0.585677itkOrientImageFilterISS3ISS3: 0.588997itkOrientImageFilterISS3ISS3: > 0.592318itkOrientImageFilterISS3ISS3: 0.595638itkOrientImageFilterISS3ISS3: > 0.598958itkOrientImageFilterISS3ISS3: 0.602279itkOrientImageFilterISS3ISS3: > 0.605599itkOrientImageFilterISS3ISS3: 0.608919itkOrientImageFilterISS3ISS3: > 0.612240itkOrientImageFilterISS3ISS3: 0.615560itkOrientImageFilterISS3ISS3: > 0.618880itkOrientImageFilterISS3ISS3: 0.622200itkOrientImageFilterISS3ISS3: > 0.625521itkOrientImageFilterISS3ISS3: 0.628841itkOrientImageFilterISS3ISS3: > 0.632161itkOrientImageFilterISS3ISS3: 0.635482itkOrientImageFilterISS3ISS3: > 0.638802itkOrientImageFilterISS3ISS3: 0.642122itkOrientImageFilterISS3ISS3: > 0.645443itkOrientImageFilterISS3ISS3: 0.648763itkOrientImageFilterISS3ISS3: > 0.652083itkOrientImageFilterISS3ISS3: 0.655404itkOrientImageFilterISS3ISS3: > 0.658724itkOrientImageFilterISS3ISS3: 0.662044itkOrientImageFilterISS3ISS3: > 0.665365itkOrientImageFilterISS3ISS3: 0.666667itkOrientImageFilterISS3ISS3: > 0.666667itkOrientImageFilterISS3ISS3: 1.000000 > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 weiehome at sina.com Tue May 24 02:46:08 2016 From: weiehome at sina.com (weiehome at sina.com) Date: Tue, 24 May 2016 14:46:08 +0800 Subject: [ITK] itk extract filter not working properly References: Message-ID: <201605241446072465558@sina.com> Hi itk experts, I need to reduce the size of a 3d ct volume from original [512,512,64] to [256,256,12]. i was trying to apply a simple ExtractimageFilter with Index [128,128,0] and size [128,128,12],and it keeps showing me the exception " Extraction Region not consistent with Output image"? I checked my input 3d image volume is corret , but what is the problem with the exception? Thank you ! weiehome at sina.com From: community-request Date: 2016-05-24 10:09 To: community Subject: Community Digest, Vol 32, Issue 52 Send Community mailing list submissions to community at itk.org To subscribe or unsubscribe via the World Wide Web, visit http://public.kitware.com/mailman/listinfo/community or, via email, send a message with subject or body 'help' to community-request at itk.org You can reach the person managing the list at community-owner at itk.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Community digest..." Today's Topics: 1. Re: [ITK-dev] installed ITK cannot be moved due to absolute path (Matt McCormick) 2. Re: [ITK-users] cannot save transform to file: Can't Create IO object (Sebastian Ordas) 3. Re: [ITK-users] reading 3D temporal MRA dicom: miss ordered (ebasafa) 4. [ITK-users] suppressing print statements when using Python wrappers (Harnish, Roy) ---------------------------------------------------------------------- Message: 1 Date: Mon, 23 May 2016 19:21:39 -0400 From: Matt McCormick To: Rashad Kanavath Cc: ITK Subject: Re: [ITK] [ITK-dev] installed ITK cannot be moved due to absolute path Message-ID: Content-Type: text/plain; charset="utf-8" Hi Rashad, It looks like MXE is configured to use system versions of EXPAT, HDF5, JPEG, PNG, TIFF, and ZLIB: https://github.com/mxe/mxe/blob/4135f9b1227ba56b92ceb8a982016370ad5c8894/src/itk.mk#L28-L33 USE_SYSTEM could be disabled for these libraries. Or, it may be possible for the module system to learn relative locations of these libraries with ITK_USE_SYSTEM*. But, it would work best if these projects were configured with CMake, create a Config.cmake or -config.cmake file, and use relative paths internally. HTH, Matt On Tue, May 10, 2016 at 5:25 PM, Rashad Kanavath wrote: > > > On Tue, May 10, 2016 at 10:50 PM, D?enan Zuki? wrote: >> >> Hi Rashad, >> >> a few months ago relative paths were completely removed from CMake, >> because they were never fully implemented. Have you followed recommendations >> from here for cross-compiling? > > > Yes. indeed. I had updated the mxe/src/itk.mk for several versions of ITK! > > Regarding relative path in cmake, I don't understand. I didn't use cmake > specific REL_PATH. >> >> >> As for integrating your changes into ITK, you should submit a patch >> following the instructions here. If your changes don't break anything, they >> are likely to be integrated. > > > issue here is a bit different. For all libitk* stuff the story ends well. > For thirdparties, zlib, expat etc.. it is good idea to put the full path > because we don't know if they are in same install directory as ITK or not. > But this make the installed cmake modules non-portable even to a different > location on the same disk. > > Now if anyone want to provide a distributable setup of ITK. patch the > generated cmake files with sed and then copy it. This is what I am doing > right now! > A simple not perfect solution is to have all thirdparties make > _PREFIX variable inside the ITKConfig.cmake > > and for each library we use _PREFIX/include and > _PREFIX/lib > > > Another option is to avoid full path directly inside cmake module files and > put find_package() calls in the install tree. > > As these files are autogenerated by cmake, don't know what is possible. > > > > > >> >> Regards, >> D?enan >> >> On Mon, May 9, 2016 at 4:27 PM, Rashad Kanavath >> wrote: >>> >>> Hello all, >>> >>> I have some issue when copying ITK install directory to a different >>> system. I agree this is not usual and may not appear on a linux distro or >>> windows. >>> >>> My requirement is bit different. I cross-compile ITK and then use the >>> binaries on Windows. Using dll and headers are fine. But the installed cmake >>> files are a problem. They have absolute path in ITK-4.8/Modules/*.cmake >>> files. It is not in all .cmake files even though I put a wildcard there.. >>> >>> For a easy and quick workaround. I rely on mighty sed command to insert >>> something into installed cmake file. >>> >>> For example see this; >>> lib/cmake/ITK-4.8/ITKTargets-release.cmake >>> >>> set(CMAKE_IMPORT_FILE_VERSION 1) >>> set(LIB_INSTALL_PREFIX) >>> get_filename_component(CURRENT_FILE_DIR "${CMAKE_CURRENT_LIST_FILE}" >>> PATH) >>> get_filename_component(LIB_INSTALL_PREFIX "${CURRENT_FILE_DIR}" PATH) >>> get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH) >>> get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH) >>> >>> and at last: >>> >>> $(SED) -i 's,$(PREFIX)/$(TARGET),\${LIB_INSTALL_PREFIX},g' >>> 'lib/cmake/ITK-$(ITK_VER)/ITKTargets-release.cmake' >>> >>> I would like to have this patch inside the other .cmake files in the >>> installation and avoid the sed commands during post-installation >>> >>> Here is the list of cmake files that needs this change. >>> lib/cmake/ITK-4.8/ITKTargets-release.cmake >>> lib/cmake/ITK-4.8/Modules/ITKZLIB.cmake >>> lib/cmake/ITK-4.8/Modules/ITKExpat.cmake >>> lib/cmake/ITK-4.8/Modules/ITKHDF5.cmake >>> lib/cmake/ITK-4.8/Modules/ITKJPEG.cmake >>> lib/cmake/ITK-4.8/Modules/ITKTIFF.cmake >>> lib/cmake/ITK-4.8/Modules/ITKPNG.cmake >>> >>> So is it possible to make the change into future version of ITK? >>> >>> The major issue here is those cmake files are generated by cmake. Is >>> there a way cmake could use relative path ? >>> >>> >>> -- >>> Regards, >>> Rashad >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-developers >>> >> > > > > -- > Regards, > Rashad > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers ------------------------------ Message: 2 Date: Mon, 23 May 2016 21:42:38 -0300 From: Sebastian Ordas To: "insight-users at itk.org" Subject: Re: [ITK] [ITK-users] cannot save transform to file: Can't Create IO object Message-ID: Content-Type: text/plain; charset="us-ascii"; Format="flowed" Thanks Matt, The retrieved transformIO is null I looked into my ITK 4.9 build and I am trying something like this: itk::TransformFileWriterTemplate::Pointer writer = itk::TransformFileWriterTemplate::New(); // are .tfm and .txt the right file extensions? itk::TransformIOFactoryTemplate::TransformIOBasePointer tranformIO = itk::TransformIOFactoryTemplate::CreateTransformIO( "fiducials_transform.tfm", itk::TransformIOFactoryFileModeType::WriteMode ); if (tranformIO.IsNull()) { MITK_ERROR << "transform IO is null"; return; } writer->SetTransformIO(tranformIO); writer->SetFileName("fiducials_transform.tfm"); writer->SetInput(transform); try { writer->Update(); } catch (itk::ExceptionObject& e) { MITK_ERROR << "Caught exception: " << e.GetDescription(); QMessageBox::information( this, "Save transform", "Could not save transform. See error log for details." ); } thank you sebastian On 23/05/2016 05:35 p.m., Matt McCormick wrote: > Hello Sebastian, > > By running against ITK with this patch checked out: > > http://review.source.kitware.com/#/c/21115/ > > the error message will state what transform IO classes are registered. > > HTH, > Matt > > On Mon, May 23, 2016 at 4:29 PM, Sebastian Ordas > wrote: >> Hello, I am trying to run the code bellow from my application (using ITK >> 4.9) but I get the following error : >> >> ERROR: Caught exception: itk::ERROR: >> TransformFileWriterTemplate(000000000CD770E0): Can't Create IO object >> for file test.tfm >> >> I am sure that if I test it from a simple test application this should work, >> but I am trying to understand what I am missing from within my project >> (maybe some factory not yet registered or even some registration-related >> module not yet enabled in cmake?) >> >> typedef itk::VersorRigid3DTransform< double > TransformType; >> TransformType::Pointer trf = TransformType::New(); >> trf->SetIdentity(); >> >> itk::TransformFileWriterTemplate::Pointer writer = >> itk::TransformFileWriterTemplate::New(); >> >> writer->SetFileName("test.tfm"); >> writer->SetInput(trf); >> >> try >> { >> writer->Update(); >> } >> catch (itk::ExceptionObject& e) >> { >> std::cerr << "Caught exception: " << e.GetDescription() << std::endl; >> } >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 ------------------------------ Message: 3 Date: Mon, 23 May 2016 17:54:40 -0700 (MST) From: ebasafa To: insight-users at itk.org Subject: Re: [ITK] [ITK-users] reading 3D temporal MRA dicom: miss ordered Message-ID: <1464051280226-7588892.post at n2.nabble.com> Content-Type: text/plain; charset="us-ascii" Does this mean that all slices have the same location information and you want them to be ordered based on the time stamp? If so, I am afraid GDCM might not be able to sort them properly. If all slices have the same location (Image Position Patient) and orientation (Image Orientation Patient), the sorting might fail. Take a look at how GDCM sorts DICOM slices (https://itk.org/Doxygen/html/classitk_1_1GDCMSeriesFileNames.html): "This class generates a sequence of files whose filenames point to a DICOM file. The ordering is based on the following strategy: Read all images in the directory (assuming there is only one study/series) 1) Extract Image Orientation & Image Position from DICOM images, and then calculate the ordering based on the 3D coordinate of the slice. 2) If for some reason this information is not found or failed, another strategy is used: the ordering is based on 'Image Number'. 3) If this strategy also failed, then the filenames are ordered by lexicographical order." HTH Ehsan -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-reading-3D-temporal-MRA-dicom-miss-ordered-tp7588890p7588892.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users ------------------------------ Message: 4 Date: Tue, 24 May 2016 01:56:31 +0000 From: "Harnish, Roy" To: "insight-users at itk.org" Subject: [ITK] [ITK-users] suppressing print statements when using Python wrappers Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi, I'm wondering if anyone else is getting lots output to the console when using the Python wrappers? If I try to run the SNIPPET below with an itkImage: > I get many lines of print statements. Would like to know how to suppress. Thanks for any info. Roy SNIPPET: def itkImage_orient_to_axial(itkImage, itkImageType): orienterType = itk.OrientImageFilter[ itkImageType, itkImageType ] orienter = orienterType.New() orienter.UseImageDirectionOn() orienter.SetGivenCoordinateDirection(itkImage.GetDirection()) orienter.SetInput( itkImage ) orienter.SetDesiredCoordinateOrientationToAxial() orienter.Update() return orienter.GetOutput() itkImage_axial = itkImage_orient_to_axial(itkImage,imageType) OUTPUT: itkOrientImageFilterISS3ISS3: 0.343294itkOrientImageFilterISS3ISS3: 0.346615itkOrientImageFilterISS3ISS3: 0.349935itkOrientImageFilterISS3ISS3: 0.353255itkOrientImageFilterISS3ISS3: 0.356575itkOrientImageFilterISS3ISS3: 0.359896itkOrientImageFilterISS3ISS3: 0.363216itkOrientImageFilterISS3ISS3: 0.366536itkOrientImageFilterISS3ISS3: 0.369857itkOrientImageFilterISS3ISS3: 0.373177itkOrientImageFilterISS3ISS3: 0.376497itkOrientImageFilterISS3ISS3: 0.379818itkOrientImageFilterISS3ISS3: 0.383138itkOrientImageFilterISS3ISS3: 0.386458itkOrientImageFilterISS3ISS3: 0.389779itkOrientImageFilterISS3ISS3: 0.393099itkOrientImageFilterISS3ISS3: 0.396419itkOrientImageFilterISS3ISS3: 0.399740itkOrientImageFilterISS3ISS3: 0.403060itkOrientImageFilterISS3ISS3: 0.406380itkOrientImageFilterISS3ISS3: 0.409701itkOrientImageFilterISS3ISS3: 0.413021itkOrientImageFilterISS3ISS3: 0.416341itkOrientImageFilterISS3ISS3: 0.419661itkOrientImageFilterISS3ISS3: 0.422982itkOrientImageFilterISS3ISS3: 0.426302itkOrientI mageFilterISS3ISS3: 0.429622itkOrientImageFilterISS3ISS3: 0.432943itkOrientImageFilterISS3ISS3: 0.436263itkOrientImageFilterISS3ISS3: 0.439583itkOrientImageFilterISS3ISS3: 0.442904itkOrientImageFilterISS3ISS3: 0.446224itkOrientImageFilterISS3ISS3: 0.449544itkOrientImageFilterISS3ISS3: 0.452865itkOrientImageFilterISS3ISS3: 0.456185itkOrientImageFilterISS3ISS3: 0.459505itkOrientImageFilterISS3ISS3: 0.462825itkOrientImageFilterISS3ISS3: 0.466146itkOrientImageFilterISS3ISS3: 0.469466itkOrientImageFilterISS3ISS3: 0.472786itkOrientImageFilterISS3ISS3: 0.476107itkOrientImageFilterISS3ISS3: 0.479427itkOrientImageFilterISS3ISS3: 0.482747itkOrientImageFilterISS3ISS3: 0.486068itkOrientImageFilterISS3ISS3: 0.489388itkOrientImageFilterISS3ISS3: 0.492708itkOrientImageFilterISS3ISS3: 0.496029itkOrientImageFilterISS3ISS3: 0.499349itkOrientImageFilterISS3ISS3: 0.502669itkOrientImageFilterISS3ISS3: 0.505990itkOrientImageFilterISS3ISS3: 0.509310itkOrientImageFilterISS3ISS3: 0.512630itkOrientImageFilte rISS3ISS3: 0.515951itkOrientImageFilterISS3ISS3: 0.519271itkOrientImageFilterISS3ISS3: 0.522591itkOrientImageFilterISS3ISS3: 0.525911itkOrientImageFilterISS3ISS3: 0.529232itkOrientImageFilterISS3ISS3: 0.532552itkOrientImageFilterISS3ISS3: 0.535872itkOrientImageFilterISS3ISS3: 0.539193itkOrientImageFilterISS3ISS3: 0.542513itkOrientImageFilterISS3ISS3: 0.545833itkOrientImageFilterISS3ISS3: 0.549154itkOrientImageFilterISS3ISS3: 0.552474itkOrientImageFilterISS3ISS3: 0.555794itkOrientImageFilterISS3ISS3: 0.559115itkOrientImageFilterISS3ISS3: 0.562435itkOrientImageFilterISS3ISS3: 0.565755itkOrientImageFilterISS3ISS3: 0.569075itkOrientImageFilterISS3ISS3: 0.572396itkOrientImageFilterISS3ISS3: 0.575716itkOrientImageFilterISS3ISS3: 0.579036itkOrientImageFilterISS3ISS3: 0.582357itkOrientImageFilterISS3ISS3: 0.585677itkOrientImageFilterISS3ISS3: 0.588997itkOrientImageFilterISS3ISS3: 0.592318itkOrientImageFilterISS3ISS3: 0.595638itkOrientImageFilterISS3ISS3: 0.598958itkOrientImageFilterISS3ISS3 : 0.602279itkOrientImageFilterISS3ISS3: 0.605599itkOrientImageFilterISS3ISS3: 0.608919itkOrientImageFilterISS3ISS3: 0.612240itkOrientImageFilterISS3ISS3: 0.615560itkOrientImageFilterISS3ISS3: 0.618880itkOrientImageFilterISS3ISS3: 0.622200itkOrientImageFilterISS3ISS3: 0.625521itkOrientImageFilterISS3ISS3: 0.628841itkOrientImageFilterISS3ISS3: 0.632161itkOrientImageFilterISS3ISS3: 0.635482itkOrientImageFilterISS3ISS3: 0.638802itkOrientImageFilterISS3ISS3: 0.642122itkOrientImageFilterISS3ISS3: 0.645443itkOrientImageFilterISS3ISS3: 0.648763itkOrientImageFilterISS3ISS3: 0.652083itkOrientImageFilterISS3ISS3: 0.655404itkOrientImageFilterISS3ISS3: 0.658724itkOrientImageFilterISS3ISS3: 0.662044itkOrientImageFilterISS3ISS3: 0.665365itkOrientImageFilterISS3ISS3: 0.666667itkOrientImageFilterISS3ISS3: 0.666667itkOrientImageFilterISS3ISS3: 1.000000 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users ------------------------------ Subject: Digest Footer _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community ------------------------------ End of Community Digest, Vol 32, Issue 52 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From kolin9105 at gmail.com Tue May 24 03:24:21 2016 From: kolin9105 at gmail.com (meikolin saimara) Date: Tue, 24 May 2016 14:24:21 +0700 Subject: [ITK] [ITK-users] My Problem Message-ID: I have a Question what are the function of SeedX and SeedY in connected thershold and can you give me what is the conncected thershold algorithm.. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From emonclus at cs.upc.edu Tue May 24 04:29:06 2016 From: emonclus at cs.upc.edu (Eva Monclus) Date: Tue, 24 May 2016 10:29:06 +0200 Subject: [ITK] ITK 4.9 gdcmDicomDir In-Reply-To: References: <573DB299.9080001@cs.upc.edu> <5742C11A.5010808@cs.upc.edu> Message-ID: <574410D2.4000906@cs.upc.edu> On 23/05/16 14:10, D?enan Zuki? wrote: > Slicer's DICOM > > browser does what you want. I don't know whether it is too complicated > for you. Thanks. But I want to integrate this functionality in my code and I do not want more software dependencies. I 'm developing an application that show to the user a file dialog in order to choose a Dicom series from the set of patient/studies/series which are located inside a folder. This is way the gdcm class gdcmDicomDir (contained in ITK 3. 6) was very useful to perform this kind of functionality. Eva > > HTH, > D?enan > > On Mon, May 23, 2016 at 4:36 AM, Eva Monclus > wrote: > > > > On 19/05/16 14:57, D?enan Zuki? wrote: >> Does this >> >> example help? > > Not so much :-( > > I do not have problems for reading the dicom series of a folder, I > was looking for any GDCM class that helps me to scan a directory > and sorts the set of series by pacient/study/series (as > gdcm::DicomDirclass performed in the 3.6 ITK). > > Thanks in advance, > Eva >> >> On Thu, May 19, 2016 at 8:33 AM, Eva Monclus > > wrote: >> >> Hi, >> >> I have been using ITK 3.6 for several years. Now, I'm trying >> to migrate all my code to the new version of itk (4.9) and >> I'm having some problems with respect to gdcm support. >> When using ITK 3.6 there was a class gdcm::DicomDir which was >> very useful to parse recursively a folder with Dicom files. >> This class helped me to print for each pacient, its set of >> studies and for each study, you could obtain its set of >> series. The goal is to fill in an "Open DICOM" dialog with >> such information, in >> order to let the user load a single DICOM Series. I would >> like to show to the user the set of Dicom series sorted by >> patient and study. >> >> In itk 4.9, is there any helper class to explore available >> DICOM Series and/or Studies in a folder with DICOM files and >> subfolders? >> >> Thanks in advance, >> Eva >> >> >> >> >> >> _______________________________________________ >> Community mailing list >> Community at itk.org >> http://public.kitware.com/mailman/listinfo/community >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abenchaaben at histalim.com Tue May 24 04:39:38 2016 From: abenchaaben at histalim.com (abenchaaben) Date: Tue, 24 May 2016 01:39:38 -0700 (MST) Subject: [ITK] [ITK-users] Deform/warp an object in an image Message-ID: <1464079178302-7588897.post@n2.nabble.com> I'm trying to warp/deform a contour of an image to fit another contour in another images (i want to have the two images side by side in one images) As the images shows, i want to fit the two side of the contours in the two images. Is they a method to do that (i try to do a registration with landmarks using ITK, but it didn't give me a good result). I'm opened to any opinions. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Deform-warp-an-object-in-an-image-tp7588897.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From tevain at telecom-paristech.fr Tue May 24 04:40:43 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Tue, 24 May 2016 10:40:43 +0200 (CEST) Subject: [ITK] itk extract filter not working properly In-Reply-To: <201605241446072465558@sina.com> References: <201605241446072465558@sina.com> Message-ID: <263712630.64781435.1464079243796.JavaMail.zimbra@enst.fr> Hi, What do you mean by "reduce the size" ? Are you trying to transform your input image into a smaller one (i.e. resampling) or are you expecting to get just a part of the original image ? Given that you are using the ExtractImageFilter, I assume the later. First, if you need to extract a 256*256*12 volume, the size should be of [256,256,12], not [128,128,12], given that the index is just the position of the extraction. Second, the error seems to indicate that the output image type is not consistent with your ROI, ensure the OutputImageType is 3D. Remember to set a collapse strategy when using the ExtractImageFilter, or use the RegionOfInterestImageFilter since you don't seem to need dimensionality reduction. HTH Tim ----- Mail original ----- De: weiehome at sina.com ?: community at itk.org Envoy?: Mardi 24 Mai 2016 08:46:08 Objet: [ITK] itk extract filter not working properly Hi itk experts, I need to reduce the size of a 3d ct volume from original [512,512,64] to [256,256,12]. i was trying to apply a simple ExtractimageFilter with Index [128,128,0] and size [128,128,12],and it keeps showing me the exception " Extraction Region not consistent with Output image"? I checked my input 3d image volume is corret , but what is the problem with the exception? Thank you ! weiehome at sina.com From weiehome at sina.com Tue May 24 07:06:40 2016 From: weiehome at sina.com (=?utf-8?B?6LCi546u5a6c?=) Date: Tue, 24 May 2016 19:06:40 +0800 Subject: [ITK] =?utf-8?b?562U5aSNOiAgaXRrIGV4dHJhY3QgZmlsdGVyIG5vdCB3b3Jr?= =?utf-8?q?ing_properly?= In-Reply-To: <263712630.64781435.1464079243796.JavaMail.zimbra@enst.fr> References: <201605241446072465558@sina.com> <263712630.64781435.1464079243796.JavaMail.zimbra@enst.fr> Message-ID: <008401d1b5ac$5930ae60$0b920b20$@sina.com> Hi, Evain I simply changed to RegionOfInterestImageFilter as you suggest, things are working. However I still don't know what is the problem with ExtractImageFilter. Anyway, I will look into some of itk c++ codes to see if any hint there. Thanks! -----????----- ???: Timothee Evain [mailto:tevain at telecom-paristech.fr] ????: 2016?5?24? 16:41 ???: weiehome at sina.com ??: community at itk.org ??: Re: [ITK] itk extract filter not working properly Hi, What do you mean by "reduce the size" ? Are you trying to transform your input image into a smaller one (i.e. resampling) or are you expecting to get just a part of the original image ? Given that you are using the ExtractImageFilter, I assume the later. First, if you need to extract a 256*256*12 volume, the size should be of [256,256,12], not [128,128,12], given that the index is just the position of the extraction. Second, the error seems to indicate that the output image type is not consistent with your ROI, ensure the OutputImageType is 3D. Remember to set a collapse strategy when using the ExtractImageFilter, or use the RegionOfInterestImageFilter since you don't seem to need dimensionality reduction. HTH Tim ----- Mail original ----- De: weiehome at sina.com ?: community at itk.org Envoy?: Mardi 24 Mai 2016 08:46:08 Objet: [ITK] itk extract filter not working properly Hi itk experts, I need to reduce the size of a 3d ct volume from original [512,512,64] to [256,256,12]. i was trying to apply a simple ExtractimageFilter with Index [128,128,0] and size [128,128,12],and it keeps showing me the exception " Extraction Region not consistent with Output image"? I checked my input 3d image volume is corret , but what is the problem with the exception? Thank you ! weiehome at sina.com From dzenanz at gmail.com Tue May 24 08:56:46 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 24 May 2016 08:56:46 -0400 Subject: [ITK] [ITK-users] Deform/warp an object in an image In-Reply-To: <1464079178302-7588897.post@n2.nabble.com> References: <1464079178302-7588897.post@n2.nabble.com> Message-ID: If you want to append the left side of the right image onto the right side of the left image, you might have more luck if you inverted one of the images. You should also initialize registration with a bit of overlap. And providing more details about why and how landmark registration failed, or at least what you did would not hurt. Regards, D?enan On Tue, May 24, 2016 at 4:39 AM, abenchaaben wrote: > I'm trying to warp/deform a contour of an image to fit another contour in > another images (i want to have the two images side by side in one images) > > As the images shows, i want to fit the two side of the contours in the two > images. Is they a method to do that (i try to do a registration with > landmarks using ITK, but it didn't give me a good result). I'm opened to > any > opinions. > > > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Deform-warp-an-object-in-an-image-tp7588897.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From blowekamp at mail.nih.gov Tue May 24 09:04:12 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Tue, 24 May 2016 13:04:12 +0000 Subject: [ITK] [ITK-users] My Problem In-Reply-To: References: Message-ID: <0E569D8C-54AC-49C3-B903-EEFC42E4C9B0@mail.nih.gov> Hello, ITK is an open source project! So you can look at the source code to determine what parameters do an how the algorithm is implemented. https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx HTH, Brad On May 24, 2016, at 3:24 AM, meikolin saimara > wrote: I have a Question what are the function of SeedX and SeedY in connected thershold and can you give me what is the conncected thershold algorithm.. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From blowekamp at mail.nih.gov Tue May 24 09:44:09 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Tue, 24 May 2016 13:44:09 +0000 Subject: [ITK] [ITK-users] Access DICOM private tags using SimpleITK In-Reply-To: References: <3781B509-3DAA-4888-B6EC-94984E74E5D5@gmail.com> Message-ID: Hello, Please find a patch here in Gerrit [1], which adds the option to load these private data tags. You should be able to download and compile to get the feature. Also note that itk::GDCMImageIO loads the private tags and encodes the with Base64 into strings [2]. I am working on finding some test data to verify behavior and write some tests and documentation. HTH, Brad [1] http://review.source.kitware.com/#/c/21160/ [2] https://github.com/InsightSoftwareConsortium/ITK/blob/bf3f02c6b75a26da3987afc296af140259215e85/Modules/IO/GDCM/src/itkGDCMImageIO.cxx#L567-L587 > On May 23, 2016, at 3:59 PM, Mathew Guilfoyle wrote: > > Thanks Brad - the trouble I'm having is that some of the keys are private/hidden. > > For instance, in my images when I use the image.GetMetaDataKeys() method it returns a list of 107 keys but the one I need is a private manufacturer-specific timing tag that is not part of the standard meta-data dictionary. I know the tag I need because OsiriX viewer shows all the standard and private tags and it is in there with associated data. However, if I run image.HasMetaDataKey(my_private_key) it returns FALSE. > > Reading various sources, including the ITK docs, it seems GDCM library has a setting that needs to be turned on to read private DICOM tags. However, the only reference I can see to this setting in SimpleITK is as an argument to the GetGDCMSeriesFileNames method and I'm not clear what function it serves there as the list of files is the same irrespective. What I need somehow is to tell ReadImage or ImageSeriesReader to parse the private tags...?? > > Thanks > Mat > >> On 23 May 2016, at 20:47, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: >> >> Hello, >> >> To get all the tags from the dicom files you need to load them individually. Something along these lines, but iterating over the list generated by GetGDCMSeriesFileNames: >> >> from __future__ import print_function >> >> import SimpleITK as sitk >> import sys, os >> >> if len ( sys.argv ) < 2: >> print( "Usage: DicomImagePrintTags " ) >> sys.exit ( 1 ) >> >> inputImage = sitk.ReadImage( sys.argv[1] ) >> >> for k in inputImage.GetMetaDataKeys(): >> v = inputImage.GetMetaData(k) >> print("({0}) = = \"{2}\"".format(k,v)) >> >> >> HTH, >> Brad >> >> >> >>> On May 23, 2016, at 3:31 PM, Mathew Guilfoyle wrote: >>> >>> In ITK the GDCMSeriesFileNames class (equivalently the ImageSeriesReader$GetGDCMSeriesFileNames method from Simple ITK) can both take arguments to read private DICOM tags (typically manufacturer specific info that does not follow the general standard.) >>> >>> I cannot figure out how to use this function to actually read in a series of images or a volume with the hidden tags (I know they are there as I can see them in Osirix!) >>> >>> The list of filenames that the two methods above return as no different whether the 'loadPrivateTags' attribute is set on or off. >>> >>> Any ideas how I can access the private tags? >>> >>> 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 >> > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scapegoat.sarthak at gmail.com Tue May 24 09:48:48 2016 From: scapegoat.sarthak at gmail.com (Scapegoat Sarthak) Date: Tue, 24 May 2016 09:48:48 -0400 Subject: [ITK] [ITK-users] Vectorize/Linearize itk::Image Message-ID: Hello All, What would be the fastest way to convert an itk::Image< DataType, Dimensions > to a single vector of intensities? Ideally, I would like to concatenate multiple such vectors and pass them to machine learning algorithms. Thanks, Sarthak -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From dzenanz at gmail.com Tue May 24 09:54:22 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 24 May 2016 09:54:22 -0400 Subject: [ITK] [ITK-users] Vectorize/Linearize itk::Image In-Reply-To: References: Message-ID: Hi Sarthak, use iterators to go through all the pixels, and add each of them to a vector of your choice. HTH On Tue, May 24, 2016 at 9:48 AM, Scapegoat Sarthak < scapegoat.sarthak at gmail.com> wrote: > Hello All, > > What would be the fastest way to convert an itk::Image< DataType, > Dimensions > to a single vector of intensities? Ideally, I would like to > concatenate multiple such vectors and pass them to machine learning > algorithms. > > Thanks, > Sarthak > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From blowekamp at mail.nih.gov Tue May 24 09:55:18 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Tue, 24 May 2016 13:55:18 +0000 Subject: [ITK] [ITK-users] Vectorize/Linearize itk::Image In-Reply-To: References: Message-ID: <60BA2C5F-6C09-49AD-9774-46337FFDAF9E@mail.nih.gov> Hello, You want to look at the ImportImageContainer[1]. Every itk::Image has one of these object to hold the buffer. The fastest way to ?convert? the image, is not to do any work and just get a pointer to the buffer. HTH, Brad [1] https://itk.org/Doxygen/html/classitk_1_1ImportImageContainer.html > On May 24, 2016, at 9:48 AM, Scapegoat Sarthak wrote: > > Hello All, > > What would be the fastest way to convert an itk::Image< DataType, Dimensions > to a single vector of intensities? Ideally, I would like to concatenate multiple such vectors and pass them to machine learning algorithms. > > Thanks, > Sarthak > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scapegoat.sarthak at gmail.com Tue May 24 10:05:28 2016 From: scapegoat.sarthak at gmail.com (Scapegoat Sarthak) Date: Tue, 24 May 2016 10:05:28 -0400 Subject: [ITK] [ITK-users] Vectorize/Linearize itk::Image In-Reply-To: <60BA2C5F-6C09-49AD-9774-46337FFDAF9E@mail.nih.gov> References: <60BA2C5F-6C09-49AD-9774-46337FFDAF9E@mail.nih.gov> Message-ID: Hi Bradley, Dzenan, Thanks for your replies. The main idea is the following: 1. Read image from file -- inputImage 2. Generate a mask to remove background information (either using Otsu or reading another image with this information) -- inputMask 3. Vectorize the inputImage in the region defined by inputMask -- tempColMat or tempRowMat 4. Concatenate multiple tempColMat/tempRowMat -- trainingData 5. Pass trainingData to classifier of choice. I have tried both the solutions presented and neither work as optimally as I would like. Ideally, I would like to use a single multi-threaded filter which takes a mask as input along with the mask and extracts pixel values as a vector in return. Best, Sarthak On 24 May 2016 at 09:55, Lowekamp, Bradley (NIH/NLM/LHC) [C] < blowekamp at mail.nih.gov> wrote: > Hello, > > You want to look at the ImportImageContainer[1]. Every itk::Image has one > of these object to hold the buffer. The fastest way to ?convert? the image, > is not to do any work and just get a pointer to the buffer. > > HTH, > Brad > > [1] https://itk.org/Doxygen/html/classitk_1_1ImportImageContainer.html > > > On May 24, 2016, at 9:48 AM, Scapegoat Sarthak < > scapegoat.sarthak at gmail.com> wrote: > > > > Hello All, > > > > What would be the fastest way to convert an itk::Image< DataType, > Dimensions > to a single vector of intensities? Ideally, I would like to > concatenate multiple such vectors and pass them to machine learning > algorithms. > > > > Thanks, > > Sarthak > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From tevain at telecom-paristech.fr Tue May 24 10:56:22 2016 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Tue, 24 May 2016 16:56:22 +0200 (CEST) Subject: [ITK] [ITK-users] Vectorize/Linearize itk::Image In-Reply-To: References: <60BA2C5F-6C09-49AD-9774-46337FFDAF9E@mail.nih.gov> Message-ID: <569712495.65270291.1464101782479.JavaMail.zimbra@enst.fr> Hi Sarthak, That's not really a generic framework so I doubt you will find a ready-to-use filter to do that. If you want to hide all the processing code you may want to write your own filter. On a side note, if you're only interested in intensities as output, and willing to discard the correspondance between position and value, why not just compute the otsu threshold, then parse the buffer, adding the value to your vector when it's over/under this threshold (depending on what you consider as background)? That would be less hassle than a full mask image. HTH Tim ----- Mail original ----- De: "Scapegoat Sarthak" ?: "Bradley Lowekamp (NIH/NLM/LHC) [C]" , dzenanz at gmail.com Cc: insight-users at itk.org Envoy?: Mardi 24 Mai 2016 16:05:28 Objet: Re: [ITK] [ITK-users] Vectorize/Linearize itk::Image Hi Bradley, Dzenan, Thanks for your replies. The main idea is the following: 1. Read image from file -- inputImage 2. Generate a mask to remove background information (either using Otsu or reading another image with this information) -- inputMask 3. Vectorize the inputImage in the region defined by inputMask -- tempColMat or tempRowMat 4. Concatenate multiple tempColMat/tempRowMat -- trainingData 5. Pass trainingData to classifier of choice. I have tried both the solutions presented and neither work as optimally as I would like. Ideally, I would like to use a single multi-threaded filter which takes a mask as input along with the mask and extracts pixel values as a vector in return. Best, Sarthak On 24 May 2016 at 09:55, Lowekamp, Bradley (NIH/NLM/LHC) [C] < blowekamp at mail.nih.gov > wrote: Hello, You want to look at the ImportImageContainer[1]. Every itk::Image has one of these object to hold the buffer. The fastest way to ?convert? the image, is not to do any work and just get a pointer to the buffer. HTH, Brad [1] https://itk.org/Doxygen/html/classitk_1_1ImportImageContainer.html > On May 24, 2016, at 9:48 AM, Scapegoat Sarthak < scapegoat.sarthak at gmail.com > wrote: > > Hello All, > > What would be the fastest way to convert an itk::Image< DataType, Dimensions > to a single vector of intensities? Ideally, I would like to concatenate multiple such vectors and pass them to machine learning algorithms. > > Thanks, > Sarthak > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scapegoat.sarthak at gmail.com Tue May 24 11:11:04 2016 From: scapegoat.sarthak at gmail.com (Scapegoat Sarthak) Date: Tue, 24 May 2016 11:11:04 -0400 Subject: [ITK] [ITK-users] Vectorize/Linearize itk::Image In-Reply-To: <569712495.65270291.1464101782479.JavaMail.zimbra@enst.fr> References: <60BA2C5F-6C09-49AD-9774-46337FFDAF9E@mail.nih.gov> <569712495.65270291.1464101782479.JavaMail.zimbra@enst.fr> Message-ID: Hi Tim, Thanks for your reply. That is what I could expect - I was planning on starting with ResampleFilter and put in the option of setting a mask in the filter and do modifications accordingly... The thing is, since I know the image to be fairly large (in the order of 150x250x120), having this as a multi-threaded filter would be an efficient solution instead of checking for threshold linearly. Also, I would like the flexibility to input the mask from a separate image and not having to do the computation in the main filter, if it can be avoided. Best, Sarthak On 24 May 2016 at 10:56, Timothee Evain wrote: > Hi Sarthak, > > That's not really a generic framework so I doubt you will find a > ready-to-use filter to do that. > If you want to hide all the processing code you may want to write your own > filter. > On a side note, if you're only interested in intensities as output, and > willing to discard the correspondance between position and value, why not > just compute the otsu threshold, then parse the buffer, adding the value to > your vector when it's over/under this threshold (depending on what you > consider as background)? > That would be less hassle than a full mask image. > > HTH > Tim > > > ----- Mail original ----- > De: "Scapegoat Sarthak" > ?: "Bradley Lowekamp (NIH/NLM/LHC) [C]" , > dzenanz at gmail.com > Cc: insight-users at itk.org > Envoy?: Mardi 24 Mai 2016 16:05:28 > Objet: Re: [ITK] [ITK-users] Vectorize/Linearize itk::Image > > Hi Bradley, Dzenan, > > Thanks for your replies. The main idea is the following: > > 1. Read image from file -- inputImage > 2. Generate a mask to remove background information (either using Otsu or > reading another image with this information) -- inputMask > 3. Vectorize the inputImage in the region defined by inputMask -- > tempColMat or tempRowMat > 4. Concatenate multiple tempColMat/tempRowMat -- trainingData > 5. Pass trainingData to classifier of choice. > > I have tried both the solutions presented and neither work as optimally as > I would like. Ideally, I would like to use a single multi-threaded filter > which takes a mask as input along with the mask and extracts pixel values > as a vector in return. > > Best, > Sarthak > > > On 24 May 2016 at 09:55, Lowekamp, Bradley (NIH/NLM/LHC) [C] < > blowekamp at mail.nih.gov > wrote: > > > Hello, > > You want to look at the ImportImageContainer[1]. Every itk::Image has one > of these object to hold the buffer. The fastest way to ?convert? the image, > is not to do any work and just get a pointer to the buffer. > > HTH, > Brad > > [1] https://itk.org/Doxygen/html/classitk_1_1ImportImageContainer.html > > > On May 24, 2016, at 9:48 AM, Scapegoat Sarthak < > scapegoat.sarthak at gmail.com > wrote: > > > > Hello All, > > > > What would be the fastest way to convert an itk::Image< DataType, > Dimensions > to a single vector of intensities? Ideally, I would like to > concatenate multiple such vectors and pass them to machine learning > algorithms. > > > > Thanks, > > Sarthak > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From M.Staring at lumc.nl Tue May 24 10:55:39 2016 From: M.Staring at lumc.nl (M.Staring at lumc.nl) Date: Tue, 24 May 2016 14:55:39 +0000 Subject: [ITK] [ITK-dev] imagefilereader Message-ID: <24D8AA23EC0DCB4498C35EC60401E76144000AD9@MAIL-MB02.lumcnet.prod.intern> Hi Matt, This change: https://itk.org/gitweb?p=ITK.git;a=commitdiff;h=3e1d822985b9eb3548e4fb9891f6773452467a81 is breaking our code where we rely on the availability of the GenerateOutputInformation() function to read image info while avoiding to read the actual data. We use that information to select the correct reader from a list of instantiated readers. I had a look, and indeed in the base class (ProcessObject) this function is protected, so I guess it qualifies as a bug that GenerateOutputInformation() was public previously. This change does break backward compatibility however. Do you have a suggestion on how to fix this? I really would like to have functionality in the image readers that read the meta data only, and not the data itself. Thanks for your advice, Marius Marius Staring, PhD Division of Image Processing (LKEB) Department of Radiology Leiden University Medical Center PO Box 9600, 2300 RC Leiden, The Netherlands phone: +31 (0)71 52 62137, fax: +31 (0)71 524 8256 m.staring at lumc.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From blowekamp at mail.nih.gov Tue May 24 11:29:27 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Tue, 24 May 2016 15:29:27 +0000 Subject: [ITK] [ITK-dev] imagefilereader In-Reply-To: <24D8AA23EC0DCB4498C35EC60401E76144000AD9@MAIL-MB02.lumcnet.prod.intern> References: <24D8AA23EC0DCB4498C35EC60401E76144000AD9@MAIL-MB02.lumcnet.prod.intern> Message-ID: Hello Marius, The commit you linked to has the simple change needed: - reader->GenerateOutputInformation(); + reader->UpdateOutputInformation(); HTH, Brad On May 24, 2016, at 10:55 AM, M.Staring at lumc.nl wrote: Hi Matt, This change: https://itk.org/gitweb?p=ITK.git;a=commitdiff;h=3e1d822985b9eb3548e4fb9891f6773452467a81 is breaking our code where we rely on the availability of the GenerateOutputInformation() function to read image info while avoiding to read the actual data. We use that information to select the correct reader from a list of instantiated readers. I had a look, and indeed in the base class (ProcessObject) this function is protected, so I guess it qualifies as a bug that GenerateOutputInformation() was public previously. This change does break backward compatibility however. Do you have a suggestion on how to fix this? I really would like to have functionality in the image readers that read the meta data only, and not the data itself. Thanks for your advice, Marius Marius Staring, PhD Division of Image Processing (LKEB) Department of Radiology Leiden University Medical Center PO Box 9600, 2300 RC Leiden, The Netherlands phone: +31 (0)71 52 62137, fax: +31 (0)71 524 8256 m.staring at lumc.nl _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From bill.lorensen at gmail.com Tue May 24 12:18:15 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 24 May 2016 12:18:15 -0400 Subject: [ITK] [ITK-dev] imagefilereader In-Reply-To: References: <24D8AA23EC0DCB4498C35EC60401E76144000AD9@MAIL-MB02.lumcnet.prod.intern> Message-ID: Without looking at the code, are you saying that a customer has to change their application from: reader->GenerateOutputInformation(); to reader->UpdateOutputInformation(); Why? On Tue, May 24, 2016 at 11:29 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: > Hello Marius, > > The commit you linked to has the simple change needed: > > - reader->GenerateOutputInformation(); > + reader->UpdateOutputInformation(); > > > HTH, > Brad > > On May 24, 2016, at 10:55 AM, M.Staring at lumc.nl wrote: > > Hi Matt, > > This change: > https://itk.org/gitweb?p=ITK.git;a=commitdiff;h=3e1d822985b9eb3548e4fb9891f6773452467a81 > is breaking our code where we rely on the availability of the > GenerateOutputInformation() function to read image info while avoiding to > read the actual data. We use that information to select the correct reader > from a list of instantiated readers. > > I had a look, and indeed in the base class (ProcessObject) this function is > protected, so I guess it qualifies as a bug that GenerateOutputInformation() > was public previously. This change does break backward compatibility > however. > > Do you have a suggestion on how to fix this? I really would like to have > functionality in the image readers that read the meta data only, and not the > data itself. > > Thanks for your advice, > Marius > > Marius Staring, PhD > Division of Image Processing (LKEB) > Department of Radiology > Leiden University Medical Center > PO Box 9600, 2300 RC Leiden, The Netherlands > phone: +31 (0)71 52 62137, fax: +31 (0)71 524 8256 m.staring at lumc.nl > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From olivier.commowick at inria.fr Tue May 24 13:13:37 2016 From: olivier.commowick at inria.fr (Olivier Commowick) Date: Tue, 24 May 2016 19:13:37 +0200 Subject: [ITK] [ITK-users] VXL compilation in ITK 4.10 RC2 Message-ID: Hello, I am writing this email about a small problem for compiling in the latest RCs on Fedora. VXL has been updated recently and does not compile when setting CMAKE_CXX_STANDARD to 11 on that OS. Looking into it, this is because a cmake test is not yet accounting for that variable in VXL introspection file. And since on fedora C++11 is not activated by default in gcc, the compilation fails or a fpermissive flag has to be set for the compilation. I had submitted a small, yet not robust and ad-hoc patch, on gerrit and was told it has actually been corrected in a more recent version of VXL github. Since I do not know how this repo is merged / updated into ITK, would it be possible for someone to update VXL to its latest version in ITK master and release branches? Of course, this is definitely not urgent since a workaround exists but I feel that would be great for the rest of us on fedoras. Thanks a lot in advance. Olivier _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From hans-johnson at uiowa.edu Tue May 24 13:25:30 2016 From: hans-johnson at uiowa.edu (Johnson, Hans J) Date: Tue, 24 May 2016 17:25:30 +0000 Subject: [ITK] [ITK-users] VXL compilation in ITK 4.10 RC2 In-Reply-To: References: Message-ID: This will hopefully be fixed in the next RC release: See: http://review.source.kitware.com/#/c/21161/ Hans -- On 5/24/16, 12:13 PM, "Insight-users on behalf of Olivier Commowick" wrote: >Hello, > >I am writing this email about a small problem for compiling in the latest RCs on Fedora. VXL has been updated recently and does not compile when setting CMAKE_CXX_STANDARD to 11 on that OS. Looking into it, this is because a cmake test is not yet accounting for that variable in VXL introspection file. And since on fedora C++11 is not activated by default in gcc, the compilation fails or a fpermissive flag has to be set for the compilation. > >I had submitted a small, yet not robust and ad-hoc patch, on gerrit and was told it has actually been corrected in a more recent version of VXL github. Since I do not know how this repo is merged / updated into ITK, would it be possible for someone to update VXL to its latest version in ITK master and release branches? Of course, this is definitely not urgent since a workaround exists but I feel that would be great for the rest of us on fedoras. > >Thanks a lot in advance. >Olivier >_____________________________________ >Powered by www.kitware.com > >Visit other Kitware open-source projects at >http://www.kitware.com/opensource/opensource.html > >Kitware offers ITK Training Courses, for more information visit: >http://www.kitware.com/products/protraining.php > >Please keep messages on-topic and check the 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 Tue May 24 14:06:49 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 24 May 2016 14:06:49 -0400 Subject: [ITK] [ITK-dev] imagefilereader In-Reply-To: References: <24D8AA23EC0DCB4498C35EC60401E76144000AD9@MAIL-MB02.lumcnet.prod.intern> Message-ID: On Tue, May 24, 2016 at 12:18 PM, Bill Lorensen wrote: > Without looking at the code, are you saying that a customer has to > change their application from: > > reader->GenerateOutputInformation(); > > to > > reader->UpdateOutputInformation(); Yes. UpdateOutputInformation() is the public method that a user wants to call. GenerateOutputInformation() is a protected member that the algorithm implemented defines. > Why? GeneratedOutputInformation() gets called when UpdateOutputInformation() gets called. It is possible that GenerateOutputInformation() will not generate the correct output information; unlike UpdateOutputInformation(), it does not ensure that the inputs that it is generating its output information from have been updated. Thanks, Matt _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From bill.lorensen at gmail.com Tue May 24 14:19:26 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 24 May 2016 14:19:26 -0400 Subject: [ITK] [ITK-dev] imagefilereader In-Reply-To: References: <24D8AA23EC0DCB4498C35EC60401E76144000AD9@MAIL-MB02.lumcnet.prod.intern> Message-ID: How would a customer know about this? Maybe we should warn with a deprecated message first? Something like: GenerateOutputInformation will be protected in release x.x. Change GenerateOutputInformation to UpdateOutputInformation. On Tue, May 24, 2016 at 2:06 PM, Matt McCormick wrote: > On Tue, May 24, 2016 at 12:18 PM, Bill Lorensen wrote: >> Without looking at the code, are you saying that a customer has to >> change their application from: >> >> reader->GenerateOutputInformation(); >> >> to >> >> reader->UpdateOutputInformation(); > > Yes. UpdateOutputInformation() is the public method that a user wants > to call. GenerateOutputInformation() is a protected member that the > algorithm implemented defines. > > >> Why? > > GeneratedOutputInformation() gets called when > UpdateOutputInformation() gets called. It is possible that > GenerateOutputInformation() will not generate the correct output > information; unlike UpdateOutputInformation(), it does not ensure that > the inputs that it is generating its output information from have been > updated. > > > Thanks, > Matt -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From matt.mccormick at kitware.com Tue May 24 14:48:34 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 24 May 2016 14:48:34 -0400 Subject: [ITK] [ITK-dev] imagefilereader In-Reply-To: References: <24D8AA23EC0DCB4498C35EC60401E76144000AD9@MAIL-MB02.lumcnet.prod.intern> Message-ID: On Tue, May 24, 2016 at 2:19 PM, Bill Lorensen wrote: > How would a customer know about this? Maybe we should warn with a > deprecated message first? Something like: > GenerateOutputInformation will be protected in release x.x. Change > GenerateOutputInformation to UpdateOutputInformation. This is a good idea, but I do not know a way it can be implemented. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From matt.mccormick at kitware.com Tue May 24 23:38:40 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 24 May 2016 23:38:40 -0400 Subject: [ITK] [ITK-users] cannot save transform to file: Can't Create IO object In-Reply-To: References: <9d8c22ce-801c-11a2-a6f4-917c475271bb@gmail.com> Message-ID: Hi Sebastian, Is this in a plugin? There are significant issues when dealing with dynamic_cast's of the templates in plugins. Does building against ITK with this branch checked out help?: http://review.source.kitware.com/#/c/21102 Thanks, Matt On Mon, May 23, 2016 at 8:42 PM, Sebastian Ordas wrote: > Thanks Matt, > > The retrieved transformIO is null > > I looked into my ITK 4.9 build and I am trying something like this: > > itk::TransformFileWriterTemplate::Pointer writer = > itk::TransformFileWriterTemplate::New(); > > // are .tfm and .txt the right file extensions? > > itk::TransformIOFactoryTemplate::TransformIOBasePointer tranformIO = > itk::TransformIOFactoryTemplate::CreateTransformIO( > "fiducials_transform.tfm", itk::TransformIOFactoryFileModeType::WriteMode ); > > if (tranformIO.IsNull()) > { > MITK_ERROR << "transform IO is null"; > return; > } > > writer->SetTransformIO(tranformIO); > > writer->SetFileName("fiducials_transform.tfm"); > > writer->SetInput(transform); > > try > { > writer->Update(); > } > catch (itk::ExceptionObject& e) > { > MITK_ERROR << "Caught exception: " << e.GetDescription(); > QMessageBox::information( this, "Save transform", "Could not save > transform. See error log for details." ); > } > > thank you > sebastian > > > On 23/05/2016 05:35 p.m., Matt McCormick wrote: >> >> Hello Sebastian, >> >> By running against ITK with this patch checked out: >> >> http://review.source.kitware.com/#/c/21115/ >> >> the error message will state what transform IO classes are registered. >> >> HTH, >> Matt >> >> On Mon, May 23, 2016 at 4:29 PM, Sebastian Ordas >> wrote: >>> >>> Hello, I am trying to run the code bellow from my application (using ITK >>> 4.9) but I get the following error : >>> >>> ERROR: Caught exception: itk::ERROR: >>> TransformFileWriterTemplate(000000000CD770E0): Can't Create IO object >>> for file test.tfm >>> >>> I am sure that if I test it from a simple test application this should >>> work, >>> but I am trying to understand what I am missing from within my project >>> (maybe some factory not yet registered or even some registration-related >>> module not yet enabled in cmake?) >>> >>> typedef itk::VersorRigid3DTransform< double > TransformType; >>> TransformType::Pointer trf = TransformType::New(); >>> trf->SetIdentity(); >>> >>> itk::TransformFileWriterTemplate::Pointer writer = >>> itk::TransformFileWriterTemplate::New(); >>> >>> writer->SetFileName("test.tfm"); >>> writer->SetInput(trf); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject& e) >>> { >>> std::cerr << "Caught exception: " << e.GetDescription() << >>> std::endl; >>> } >>> >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 M.Staring at lumc.nl Wed May 25 05:51:43 2016 From: M.Staring at lumc.nl (M.Staring at lumc.nl) Date: Wed, 25 May 2016 09:51:43 +0000 Subject: [ITK] [ITK-dev] imagefilereader In-Reply-To: References: <24D8AA23EC0DCB4498C35EC60401E76144000AD9@MAIL-MB02.lumcnet.prod.intern> Message-ID: <24D8AA23EC0DCB4498C35EC60401E76144000BBE@MAIL-MB02.lumcnet.prod.intern> Thanks for the feedback, we will change our code to use UpdateOutputInformation() Best, Marius > -----Original Message----- > From: Insight-developers [mailto:insight-developers-bounces at itk.org] On > Behalf Of Matt McCormick > Sent: dinsdag 24 mei 2016 20:49 > To: Bill Lorensen > Cc: insight-developers at itk.org; Shamonin, D.P. (LKEB) > Subject: Re: [ITK-dev] [ITK] imagefilereader > > On Tue, May 24, 2016 at 2:19 PM, Bill Lorensen > wrote: > > How would a customer know about this? Maybe we should warn with a > > deprecated message first? Something like: > > GenerateOutputInformation will be protected in release x.x. Change > > GenerateOutputInformation to UpdateOutputInformation. > > This is a good idea, but I do not know a way it can be implemented. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From suneezahanif02 at gmail.com Wed May 25 09:09:01 2016 From: suneezahanif02 at gmail.com (suneeza hanif) Date: Wed, 25 May 2016 15:09:01 +0200 Subject: [ITK] [ITK-users] 3D Registration Message-ID: Hi Everyone, I am reading two different sets of DICOM image series in two different folders to perform a registration. Everything is working fine but when I write the registration output again as DICOM series images some of the slices appear as black empty images. Does anyone know the cause of this problem and how to fix it? Thanks in advance. Best Regards, Suneeza -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From matimontg at gmail.com Wed May 25 09:21:43 2016 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 25 May 2016 10:21:43 -0300 Subject: [ITK] [ITK-users] 3D Registration In-Reply-To: References: Message-ID: Can you send us the dcm series? I have a working affine registration (CT-MR) that I can test with your images. I have been using it and works just fine. Sometimes is up to what parameters you select. Matias On May 25, 2016 10:09 AM, "suneeza hanif" wrote: > Hi Everyone, > > I am reading two different sets of DICOM image series in two different > folders to perform a registration. Everything is working fine but when I > write the registration output again as DICOM series images some of the > slices appear as black empty images. > > Does anyone know the cause of this problem and how to fix it? > > Thanks in advance. > > Best Regards, > Suneeza > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From abou_zeid_wassim at hotmail.com Wed May 25 10:05:35 2016 From: abou_zeid_wassim at hotmail.com (wassim bouzeid) Date: Wed, 25 May 2016 14:05:35 +0000 Subject: [ITK] Metric Evaluation Message-ID: Hi Everyone, I want to explore the domain of an image metric by exhaustive search (moving the second image with respect to the first image from a negative position to a positive position) so I am using the example in the source code MeanSquaresImageMetric1.cxx on 2D images. The time to compute the metric value for a specified parameters on these 2D images is approximately 0.02 sec. (PC with 32000 MB memory, and 1 cores @ 3201 MHz). When I am applying this example to 3D nifti images, the computation time of the metric value is large (more than 5 sec.). Does anyone know how to speed up the computation time on 3D images without using an optimizer? Thanks in advance. Best, Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Wed May 25 11:13:59 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 25 May 2016 11:13:59 -0400 Subject: [ITK] Metric Evaluation In-Reply-To: References: Message-ID: Hi Sam, the reason for inventing the optimizers is that exhaustive search takes too long for most application domains, including 3D images. Regards, D?enan On Wed, May 25, 2016 at 10:05 AM, wassim bouzeid < abou_zeid_wassim at hotmail.com> wrote: > Hi Everyone, > > I want to explore the domain of an image metric by exhaustive search > (moving the second image with respect to the first image from a negative > position to a positive position) so I am using the example in the source > code MeanSquaresImageMetric1.cxx on 2D images. The time to compute the > metric value for a specified parameters on these 2D images is approximately > 0.02 sec. (PC with 32000 MB memory, and 1 cores @ 3201 MHz). > > When I am applying this example to 3D nifti images, the computation time > of the metric value is large (more than 5 sec.). > > Does anyone know how to speed up the computation time on 3D images without > using an optimizer? > > Thanks in advance. > > Best, > Sam > > > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zivrafael.yaniv at nih.gov Wed May 25 11:41:26 2016 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Wed, 25 May 2016 15:41:26 +0000 Subject: [ITK] Metric Evaluation In-Reply-To: References: Message-ID: Hello Wassim, The following SimpleITK Jupyter notebook may be of interest to you (uses the exhaustive optimizer as an initialization approach): https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks/blob/master/63_Registration_Initialization.ipynb. Based on your runtime of 5sec I suspect you are not using sampling when computing the metric. Possibly consider random or uniform sampling. There are cases where you can achieve a decent registration using less than 10% of the data. hope this helps Ziv From: wassim bouzeid > Date: Wednesday, May 25, 2016 at 10:05 AM To: "community at itk.org" > Subject: [ITK] Metric Evaluation Hi Everyone, I want to explore the domain of an image metric by exhaustive search (moving the second image with respect to the first image from a negative position to a positive position) so I am using the example in the source code MeanSquaresImageMetric1.cxx on 2D images. The time to compute the metric value for a specified parameters on these 2D images is approximately 0.02 sec. (PC with 32000 MB memory, and 1 cores @ 3201 MHz). When I am applying this example to 3D nifti images, the computation time of the metric value is large (more than 5 sec.). Does anyone know how to speed up the computation time on 3D images without using an optimizer? Thanks in advance. Best, Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed May 25 15:47:56 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 25 May 2016 15:47:56 -0400 Subject: [ITK] [ITK-dev] Merging for ITK 4.10.1 and ITK 4.11.0 Message-ID: Hi folks, After cleaning up the dashboard and addressing remaining issues for the release, the v4.10.0 tag has been added to the Git repository! Following an amazing surge in community contributions over the last week, we have quite the queue in Gerrit ready to be merged to master. Let's merge them in stages so it is easier to catch the source of any issues that may arise on the Nightly builds. I merged ten for today. Thanks, Matt _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers From sebastian.ordas at gmail.com Wed May 25 18:38:03 2016 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Wed, 25 May 2016 19:38:03 -0300 Subject: [ITK] [ITK-users] cannot save transform to file: Can't Create IO object In-Reply-To: References: <9d8c22ce-801c-11a2-a6f4-917c475271bb@gmail.com> Message-ID: <0ba2cb09-284e-0ec4-49f5-d4dad25a3cf2@gmail.com> Yes, this is within a plugin in a very complex framework (MITK) I will try to use that ITK branch but will take some time. Before that, I will try to do the save/load functionality from a MITK module. Anyway, I will share your hint with the MITK team and come back to the ITK list thank you, sebastian On 25/05/2016 12:38 a.m., Matt McCormick wrote: > Hi Sebastian, > > Is this in a plugin? There are significant issues when dealing with > dynamic_cast's of the templates in plugins. > > Does building against ITK with this branch checked out help?: > > http://review.source.kitware.com/#/c/21102 > > Thanks, > Matt > > On Mon, May 23, 2016 at 8:42 PM, Sebastian Ordas > wrote: >> Thanks Matt, >> >> The retrieved transformIO is null >> >> I looked into my ITK 4.9 build and I am trying something like this: >> >> itk::TransformFileWriterTemplate::Pointer writer = >> itk::TransformFileWriterTemplate::New(); >> >> // are .tfm and .txt the right file extensions? >> >> itk::TransformIOFactoryTemplate::TransformIOBasePointer tranformIO = >> itk::TransformIOFactoryTemplate::CreateTransformIO( >> "fiducials_transform.tfm", itk::TransformIOFactoryFileModeType::WriteMode ); >> >> if (tranformIO.IsNull()) >> { >> MITK_ERROR << "transform IO is null"; >> return; >> } >> >> writer->SetTransformIO(tranformIO); >> >> writer->SetFileName("fiducials_transform.tfm"); >> >> writer->SetInput(transform); >> >> try >> { >> writer->Update(); >> } >> catch (itk::ExceptionObject& e) >> { >> MITK_ERROR << "Caught exception: " << e.GetDescription(); >> QMessageBox::information( this, "Save transform", "Could not save >> transform. See error log for details." ); >> } >> >> thank you >> sebastian >> >> >> On 23/05/2016 05:35 p.m., Matt McCormick wrote: >>> Hello Sebastian, >>> >>> By running against ITK with this patch checked out: >>> >>> http://review.source.kitware.com/#/c/21115/ >>> >>> the error message will state what transform IO classes are registered. >>> >>> HTH, >>> Matt >>> >>> On Mon, May 23, 2016 at 4:29 PM, Sebastian Ordas >>> wrote: >>>> Hello, I am trying to run the code bellow from my application (using ITK >>>> 4.9) but I get the following error : >>>> >>>> ERROR: Caught exception: itk::ERROR: >>>> TransformFileWriterTemplate(000000000CD770E0): Can't Create IO object >>>> for file test.tfm >>>> >>>> I am sure that if I test it from a simple test application this should >>>> work, >>>> but I am trying to understand what I am missing from within my project >>>> (maybe some factory not yet registered or even some registration-related >>>> module not yet enabled in cmake?) >>>> >>>> typedef itk::VersorRigid3DTransform< double > TransformType; >>>> TransformType::Pointer trf = TransformType::New(); >>>> trf->SetIdentity(); >>>> >>>> itk::TransformFileWriterTemplate::Pointer writer = >>>> itk::TransformFileWriterTemplate::New(); >>>> >>>> writer->SetFileName("test.tfm"); >>>> writer->SetInput(trf); >>>> >>>> try >>>> { >>>> writer->Update(); >>>> } >>>> catch (itk::ExceptionObject& e) >>>> { >>>> std::cerr << "Caught exception: " << e.GetDescription() << >>>> std::endl; >>>> } >>>> >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the 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 blowekamp at mail.nih.gov Thu May 26 08:31:50 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Thu, 26 May 2016 12:31:50 +0000 Subject: [ITK] [ITK-users] cannot save transform to file: Can't Create IO object In-Reply-To: <0ba2cb09-284e-0ec4-49f5-d4dad25a3cf2@gmail.com> References: <9d8c22ce-801c-11a2-a6f4-917c475271bb@gmail.com> <0ba2cb09-284e-0ec4-49f5-d4dad25a3cf2@gmail.com> Message-ID: <89164634-8978-4676-83E3-30E235467C1B@mail.nih.gov> Hello, That branch makes some improvements, but there really does need a redesign of a few key initializations and shared library policies to work correctly. Brad > On May 25, 2016, at 6:38 PM, Sebastian Ordas wrote: > > Yes, this is within a plugin in a very complex framework (MITK) > > I will try to use that ITK branch but will take some time. Before that, I will try to do the save/load functionality from a MITK module. > > Anyway, I will share your hint with the MITK team and come back to the ITK list > > thank you, > > sebastian > > > On 25/05/2016 12:38 a.m., Matt McCormick wrote: >> Hi Sebastian, >> >> Is this in a plugin? There are significant issues when dealing with >> dynamic_cast's of the templates in plugins. >> >> Does building against ITK with this branch checked out help?: >> >> http://review.source.kitware.com/#/c/21102 >> >> Thanks, >> Matt >> >> On Mon, May 23, 2016 at 8:42 PM, Sebastian Ordas >> wrote: >>> Thanks Matt, >>> >>> The retrieved transformIO is null >>> >>> I looked into my ITK 4.9 build and I am trying something like this: >>> >>> itk::TransformFileWriterTemplate::Pointer writer = >>> itk::TransformFileWriterTemplate::New(); >>> >>> // are .tfm and .txt the right file extensions? >>> >>> itk::TransformIOFactoryTemplate::TransformIOBasePointer tranformIO = >>> itk::TransformIOFactoryTemplate::CreateTransformIO( >>> "fiducials_transform.tfm", itk::TransformIOFactoryFileModeType::WriteMode ); >>> >>> if (tranformIO.IsNull()) >>> { >>> MITK_ERROR << "transform IO is null"; >>> return; >>> } >>> >>> writer->SetTransformIO(tranformIO); >>> >>> writer->SetFileName("fiducials_transform.tfm"); >>> >>> writer->SetInput(transform); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject& e) >>> { >>> MITK_ERROR << "Caught exception: " << e.GetDescription(); >>> QMessageBox::information( this, "Save transform", "Could not save >>> transform. See error log for details." ); >>> } >>> >>> thank you >>> sebastian >>> >>> >>> On 23/05/2016 05:35 p.m., Matt McCormick wrote: >>>> Hello Sebastian, >>>> >>>> By running against ITK with this patch checked out: >>>> >>>> http://review.source.kitware.com/#/c/21115/ >>>> >>>> the error message will state what transform IO classes are registered. >>>> >>>> HTH, >>>> Matt >>>> >>>> On Mon, May 23, 2016 at 4:29 PM, Sebastian Ordas >>>> wrote: >>>>> Hello, I am trying to run the code bellow from my application (using ITK >>>>> 4.9) but I get the following error : >>>>> >>>>> ERROR: Caught exception: itk::ERROR: >>>>> TransformFileWriterTemplate(000000000CD770E0): Can't Create IO object >>>>> for file test.tfm >>>>> >>>>> I am sure that if I test it from a simple test application this should >>>>> work, >>>>> but I am trying to understand what I am missing from within my project >>>>> (maybe some factory not yet registered or even some registration-related >>>>> module not yet enabled in cmake?) >>>>> >>>>> typedef itk::VersorRigid3DTransform< double > TransformType; >>>>> TransformType::Pointer trf = TransformType::New(); >>>>> trf->SetIdentity(); >>>>> >>>>> itk::TransformFileWriterTemplate::Pointer writer = >>>>> itk::TransformFileWriterTemplate::New(); >>>>> >>>>> writer->SetFileName("test.tfm"); >>>>> writer->SetInput(trf); >>>>> >>>>> try >>>>> { >>>>> writer->Update(); >>>>> } >>>>> catch (itk::ExceptionObject& e) >>>>> { >>>>> std::cerr << "Caught exception: " << e.GetDescription() << >>>>> std::endl; >>>>> } >>>>> >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From pip010 at gmail.com Thu May 26 09:26:47 2016 From: pip010 at gmail.com (Petar Petrov) Date: Thu, 26 May 2016 15:26:47 +0200 Subject: [ITK] [ITK-users] image transform in worldspace Message-ID: Hello ITK community, I would really like to know how to perform any transformation (like rotation) of an image so that only the header information is modified. So far I understand a typical registration pipeline is supposed to do exactly that. However, can I simply use ResampleImageFilter with some itk transform object? It seems it will actually reorient the voxels and not the image-to-world matrix in the headers of various file formats? Please any direction will be appreciated, cheers, Petar -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From simon.rit at gmail.com Thu May 26 09:44:02 2016 From: simon.rit at gmail.com (Simon Rit) Date: Thu, 26 May 2016 15:44:02 +0200 Subject: [ITK] [ITK-users] C++11 compiler warnings with cuda <6.5 Message-ID: Hi, I have upgraded to ITK 4.11 (compiled with gcc 5.3.1) and I now get a lot of warnings with my GPU code compiled with nvcc (cuda 6.5) (see RTK dashboard, e.g., here ) due to this itkConfigure.h.in commit . I can see two workarounds: - disable the warning when including itkConfigure.h.in when I compile CUDA code. This can be done with pragmas (like explained here ) but it is a bit of work to make it cross platform. Note that I don't fear a problem since I only include this ITK file to know the configuration, the rest is independent from ITK because, in my experience, nvcc doesn't compile ITK code... Are you sure this warning is required and, if yes, would there be a better way to disable this warning in my specific case? - disable c++11 when compiling ITK and RTK but that's a pity. Has anyone else experienced such a problem? Would there be a better solution? Thanks in advance, Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From dzenanz at gmail.com Thu May 26 09:49:37 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 26 May 2016 09:49:37 -0400 Subject: [ITK] [ITK-users] image transform in worldspace In-Reply-To: References: Message-ID: Hi Petar, rigid+scaling transformation can be accomplished with header only changes by modifying header information (origin, spacing, directions). Resample image filter will re-orient the voxels. If you want to avoid voxel resampling, you need to apply transformation to the header information and change it accordingly. I don't think there is an existing solution for that. Regards, D?enan On Thu, May 26, 2016 at 9:26 AM, Petar Petrov wrote: > Hello ITK community, > > I would really like to know how to perform any transformation (like > rotation) > of an image so that only the header information is modified. > > So far I understand a typical registration pipeline is supposed to do > exactly that. > > However, can I simply use ResampleImageFilter with some itk transform > object? > It seems it will actually reorient the voxels and not the image-to-world > matrix in the headers of various file formats? > > Please any direction will be appreciated, > > cheers, > Petar > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From lasso at queensu.ca Thu May 26 12:36:44 2016 From: lasso at queensu.ca (Andras Lasso) Date: Thu, 26 May 2016 16:36:44 +0000 Subject: [ITK] [ITK-users] cannot save transform to file: Can't Create IO object In-Reply-To: <89164634-8978-4676-83E3-30E235467C1B@mail.nih.gov> References: <9d8c22ce-801c-11a2-a6f4-917c475271bb@gmail.com> <0ba2cb09-284e-0ec4-49f5-d4dad25a3cf2@gmail.com> <89164634-8978-4676-83E3-30E235467C1B@mail.nih.gov> Message-ID: You can have a look at the workaround that has been implemented in 3D Slicer: https://github.com/Slicer/Slicer/commit/12743c6fcebb67ff9b22319cbe52a322a3738134 Some more background information: http://slicer-devel.65872.n3.nabble.com/Empty-deformable-transforms-with-Mac-build-td4036248.html I think it's unacceptable in the long term that dynamic_cast is broken for ITK transform objects but at least we have a workaround for now. It would be nice if somebody could implement a proper solution. Andras -----Original Message----- From: Community [mailto:community-bounces at itk.org] On Behalf Of Lowekamp, Bradley (NIH/NLM/LHC) [C] Sent: May 26, 2016 8:32 AM To: Sebastian Ordas Cc: insight-users at itk.org Subject: Re: [ITK] [ITK-users] cannot save transform to file: Can't Create IO object Hello, That branch makes some improvements, but there really does need a redesign of a few key initializations and shared library policies to work correctly. Brad > On May 25, 2016, at 6:38 PM, Sebastian Ordas wrote: > > Yes, this is within a plugin in a very complex framework (MITK) > > I will try to use that ITK branch but will take some time. Before that, I will try to do the save/load functionality from a MITK module. > > Anyway, I will share your hint with the MITK team and come back to the > ITK list > > thank you, > > sebastian > > > On 25/05/2016 12:38 a.m., Matt McCormick wrote: >> Hi Sebastian, >> >> Is this in a plugin? There are significant issues when dealing with >> dynamic_cast's of the templates in plugins. >> >> Does building against ITK with this branch checked out help?: >> >> http://review.source.kitware.com/#/c/21102 >> >> Thanks, >> Matt >> >> On Mon, May 23, 2016 at 8:42 PM, Sebastian Ordas >> wrote: >>> Thanks Matt, >>> >>> The retrieved transformIO is null >>> >>> I looked into my ITK 4.9 build and I am trying something like this: >>> >>> itk::TransformFileWriterTemplate::Pointer writer = >>> itk::TransformFileWriterTemplate::New(); >>> >>> // are .tfm and .txt the right file extensions? >>> >>> itk::TransformIOFactoryTemplate::TransformIOBasePointer >>> tranformIO = >>> itk::TransformIOFactoryTemplate::CreateTransformIO( >>> "fiducials_transform.tfm", >>> itk::TransformIOFactoryFileModeType::WriteMode ); >>> >>> if (tranformIO.IsNull()) >>> { >>> MITK_ERROR << "transform IO is null"; >>> return; >>> } >>> >>> writer->SetTransformIO(tranformIO); >>> >>> writer->SetFileName("fiducials_transform.tfm"); >>> >>> writer->SetInput(transform); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject& e) >>> { >>> MITK_ERROR << "Caught exception: " << e.GetDescription(); >>> QMessageBox::information( this, "Save transform", "Could not >>> save transform. See error log for details." ); >>> } >>> >>> thank you >>> sebastian >>> >>> >>> On 23/05/2016 05:35 p.m., Matt McCormick wrote: >>>> Hello Sebastian, >>>> >>>> By running against ITK with this patch checked out: >>>> >>>> http://review.source.kitware.com/#/c/21115/ >>>> >>>> the error message will state what transform IO classes are registered. >>>> >>>> HTH, >>>> Matt >>>> >>>> On Mon, May 23, 2016 at 4:29 PM, Sebastian Ordas >>>> wrote: >>>>> Hello, I am trying to run the code bellow from my application >>>>> (using ITK >>>>> 4.9) but I get the following error : >>>>> >>>>> ERROR: Caught exception: itk::ERROR: >>>>> TransformFileWriterTemplate(000000000CD770E0): Can't Create IO >>>>> object for file test.tfm >>>>> >>>>> I am sure that if I test it from a simple test application this >>>>> should work, but I am trying to understand what I am missing from >>>>> within my project (maybe some factory not yet registered or even >>>>> some registration-related module not yet enabled in cmake?) >>>>> >>>>> typedef itk::VersorRigid3DTransform< double > TransformType; >>>>> TransformType::Pointer trf = TransformType::New(); >>>>> trf->SetIdentity(); >>>>> >>>>> itk::TransformFileWriterTemplate::Pointer writer = >>>>> itk::TransformFileWriterTemplate::New(); >>>>> >>>>> writer->SetFileName("test.tfm"); >>>>> writer->SetInput(trf); >>>>> >>>>> try >>>>> { >>>>> writer->Update(); >>>>> } >>>>> catch (itk::ExceptionObject& e) >>>>> { >>>>> std::cerr << "Caught exception: " << e.GetDescription() << >>>>> std::endl; >>>>> } >>>>> >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From sebastian.ordas at gmail.com Thu May 26 16:08:26 2016 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Thu, 26 May 2016 17:08:26 -0300 Subject: [ITK] [ITK-users] cannot save transform to file: Can't Create IO object In-Reply-To: References: <9d8c22ce-801c-11a2-a6f4-917c475271bb@gmail.com> <0ba2cb09-284e-0ec4-49f5-d4dad25a3cf2@gmail.com> <89164634-8978-4676-83E3-30E235467C1B@mail.nih.gov> Message-ID: <44d5e0c3-bbb2-6308-5be1-595cc2989508@gmail.com> thank you all. I will let you know if I can apply the same approach Sebastian On 26/05/2016 01:36 p.m., Andras Lasso wrote: > You can have a look at the workaround that has been implemented in 3D Slicer: > https://github.com/Slicer/Slicer/commit/12743c6fcebb67ff9b22319cbe52a322a3738134 > > Some more background information: > http://slicer-devel.65872.n3.nabble.com/Empty-deformable-transforms-with-Mac-build-td4036248.html > > I think it's unacceptable in the long term that dynamic_cast is broken for ITK transform objects but at least we have a workaround for now. It would be nice if somebody could implement a proper solution. > > Andras > > -----Original Message----- > From: Community [mailto:community-bounces at itk.org] On Behalf Of Lowekamp, Bradley (NIH/NLM/LHC) [C] > Sent: May 26, 2016 8:32 AM > To: Sebastian Ordas > Cc: insight-users at itk.org > Subject: Re: [ITK] [ITK-users] cannot save transform to file: Can't Create IO object > > Hello, > > That branch makes some improvements, but there really does need a redesign of a few key initializations and shared library policies to work correctly. > > Brad > >> On May 25, 2016, at 6:38 PM, Sebastian Ordas wrote: >> >> Yes, this is within a plugin in a very complex framework (MITK) >> >> I will try to use that ITK branch but will take some time. Before that, I will try to do the save/load functionality from a MITK module. >> >> Anyway, I will share your hint with the MITK team and come back to the >> ITK list >> >> thank you, >> >> sebastian >> >> >> On 25/05/2016 12:38 a.m., Matt McCormick wrote: >>> Hi Sebastian, >>> >>> Is this in a plugin? There are significant issues when dealing with >>> dynamic_cast's of the templates in plugins. >>> >>> Does building against ITK with this branch checked out help?: >>> >>> http://review.source.kitware.com/#/c/21102 >>> >>> Thanks, >>> Matt >>> >>> On Mon, May 23, 2016 at 8:42 PM, Sebastian Ordas >>> wrote: >>>> Thanks Matt, >>>> >>>> The retrieved transformIO is null >>>> >>>> I looked into my ITK 4.9 build and I am trying something like this: >>>> >>>> itk::TransformFileWriterTemplate::Pointer writer = >>>> itk::TransformFileWriterTemplate::New(); >>>> >>>> // are .tfm and .txt the right file extensions? >>>> >>>> itk::TransformIOFactoryTemplate::TransformIOBasePointer >>>> tranformIO = >>>> itk::TransformIOFactoryTemplate::CreateTransformIO( >>>> "fiducials_transform.tfm", >>>> itk::TransformIOFactoryFileModeType::WriteMode ); >>>> >>>> if (tranformIO.IsNull()) >>>> { >>>> MITK_ERROR << "transform IO is null"; >>>> return; >>>> } >>>> >>>> writer->SetTransformIO(tranformIO); >>>> >>>> writer->SetFileName("fiducials_transform.tfm"); >>>> >>>> writer->SetInput(transform); >>>> >>>> try >>>> { >>>> writer->Update(); >>>> } >>>> catch (itk::ExceptionObject& e) >>>> { >>>> MITK_ERROR << "Caught exception: " << e.GetDescription(); >>>> QMessageBox::information( this, "Save transform", "Could not >>>> save transform. See error log for details." ); >>>> } >>>> >>>> thank you >>>> sebastian >>>> >>>> >>>> On 23/05/2016 05:35 p.m., Matt McCormick wrote: >>>>> Hello Sebastian, >>>>> >>>>> By running against ITK with this patch checked out: >>>>> >>>>> http://review.source.kitware.com/#/c/21115/ >>>>> >>>>> the error message will state what transform IO classes are registered. >>>>> >>>>> HTH, >>>>> Matt >>>>> >>>>> On Mon, May 23, 2016 at 4:29 PM, Sebastian Ordas >>>>> wrote: >>>>>> Hello, I am trying to run the code bellow from my application >>>>>> (using ITK >>>>>> 4.9) but I get the following error : >>>>>> >>>>>> ERROR: Caught exception: itk::ERROR: >>>>>> TransformFileWriterTemplate(000000000CD770E0): Can't Create IO >>>>>> object for file test.tfm >>>>>> >>>>>> I am sure that if I test it from a simple test application this >>>>>> should work, but I am trying to understand what I am missing from >>>>>> within my project (maybe some factory not yet registered or even >>>>>> some registration-related module not yet enabled in cmake?) >>>>>> >>>>>> typedef itk::VersorRigid3DTransform< double > TransformType; >>>>>> TransformType::Pointer trf = TransformType::New(); >>>>>> trf->SetIdentity(); >>>>>> >>>>>> itk::TransformFileWriterTemplate::Pointer writer = >>>>>> itk::TransformFileWriterTemplate::New(); >>>>>> >>>>>> writer->SetFileName("test.tfm"); >>>>>> writer->SetInput(trf); >>>>>> >>>>>> try >>>>>> { >>>>>> writer->Update(); >>>>>> } >>>>>> catch (itk::ExceptionObject& e) >>>>>> { >>>>>> std::cerr << "Caught exception: " << e.GetDescription() << >>>>>> std::endl; >>>>>> } >>>>>> >>>>>> >>>>>> _____________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>> http://www.kitware.com/products/protraining.php >>>>>> >>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From j.plumat at auckland.ac.nz Thu May 26 21:27:27 2016 From: j.plumat at auckland.ac.nz (Jerome Plumat) Date: Fri, 27 May 2016 13:27:27 +1200 Subject: [ITK] [ITK-users] reading 3D temporal MRA dicom: miss ordered [SOLVED] In-Reply-To: <1464051280226-7588892.post@n2.nabble.com> References: <57437C32.4030301@auckland.ac.nz> <1464051280226-7588892.post@n2.nabble.com> Message-ID: <5747A27F.4040209@auckland.ac.nz> Hi Ehsan, Thanks a lot for your answer. Your indication guided me to the solution. Below is the core part of the code to load the DCM angiography with MRI (MRA) on Siemens. Hope it may help further. Jerome Note: DCMDate is an object storing the acquisition content and the pointer to the image, sortByAcquisitionDate is a simple ordering function see http://www.cplusplus.com/articles/NhA0RXSz/ // .... // order the angiography capture using Content Time const std::string entry_id = "0008|0033"; ImageIOType::Pointer dicomIO = ImageIOType::New(); NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New(); DCMReaderType::Pointer reader = DCMReaderType::New(); reader->SetImageIO( dicomIO ); // get all the dicom slices in the pointing folder nameGenerator->SetDirectory( inputPath ); // point to the folder containing the dcm files const SeriesIdContainer & seriesUID = nameGenerator->GetSeriesUIDs(); std::string seriesIdentifier = seriesUID.begin()->c_str(); FileNamesContainer fileNames; fileNames = nameGenerator->GetFileNames( seriesIdentifier ); std::vector dcm_list = std::vector(fileNames.size()); // Read all the DCM files and find the content time for( int i=0; iSetFileName( fileNames.at(i)); // read the slice DCMImageType::Pointer im; try{ f_reader->Update(); im = f_reader->GetOutput(); }catch(itk::ExceptionObject &err ){ std::cerr << err << std::endl; return EXIT_FAILURE; } // find the acquisition date const DictionaryType & dictionary = im->GetMetaDataDictionary(); DictionaryType::ConstIterator tagItr = dictionary.Find( entry_id ); if( tagItr == dictionary.End() ){ std::cerr << ">> Tag " << entry_id; std::cerr << " not found in the DICOM header" << std::endl; return EXIT_FAILURE; } MetaDataStringType::ConstPointer entryvalue = dynamic_cast( tagItr->second.GetPointer() ); // if we find the value, create an object if( entryvalue ){ std::string tagkey = tagItr->first; std::string labelId; bool found = itk::GDCMImageIO::GetLabelFromTag( tagkey, labelId ); std::string tagvalue = entryvalue->GetMetaDataObjectValue(); if(found){ if(verbose){ std::cout.precision(16); std::cout << "(" << tagkey << ") "; std::cout << labelId << " = " << atof(tagvalue.c_str()); std::cout << std::endl; } dcm_list.at(i) = DCMDate(atof(tagvalue.c_str()), im.GetPointer()); } }else{ std::cerr << "Entry not found." << std::endl; return EXIT_FAILURE; } im = DCMImageType::New(); } // order all the slice by acquisition time std::sort(dcm_list.begin(), dcm_list.end(), sortByAcquisitionDate); // then, save each element of the list on a slice of a volume and write the volume on HD. On 24/05/16 12:54, ebasafa wrote: > Does this mean that all slices have the same location information and you > want them to be ordered based on the time stamp? If so, I am afraid GDCM > might not be able to sort them properly. If all slices have the same > location (Image Position Patient) and orientation (Image Orientation > Patient), the sorting might fail. Take a look at how GDCM sorts DICOM slices > (https://itk.org/Doxygen/html/classitk_1_1GDCMSeriesFileNames.html): > > "This class generates a sequence of files whose filenames point to a DICOM > file. The ordering is based on the following strategy: Read all images in > the directory (assuming there is only one study/series) > > 1) Extract Image Orientation & Image Position from DICOM images, and then > calculate the ordering based on the 3D coordinate of the slice. > 2) If for some reason this information is not found or failed, another > strategy is used: the ordering is based on 'Image Number'. > 3) If this strategy also failed, then the filenames are ordered by > lexicographical order." > > HTH > Ehsan > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-reading-3D-temporal-MRA-dicom-miss-ordered-tp7588890p7588892.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From mrguilfoyle at gmail.com Fri May 27 11:29:19 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Fri, 27 May 2016 16:29:19 +0100 Subject: [ITK] [ITK-users] Access DICOM private tags using SimpleITK In-Reply-To: References: <3781B509-3DAA-4888-B6EC-94984E74E5D5@gmail.com> Message-ID: <97FF68E7-091E-4B45-B5B3-FBE81C35505E@gmail.com> Dear Brad Thanks for the patch - I have successfully recompiled and the private tag functions are exposed in the R wrapping to SimpleITK. For instance I can do the following: reader = ImageFileReader() reader$LoadPrivateTagsOn() or reader$SetLoadPrivateTags(TRUE) However, neither of the above seem to have an effect i.e. a call to reader$GetLoadPrivateTags() returns FALSE after both of the above and the summary of my reader object has the 'loadPrivateTag' attribute at 0 irrespective. If I execute the reader I get an image with only the 107 public tags I had before. There are now errors reports with any of the commands. Any ideas on how to get this working? Cheers Mathew > On 24 May 2016, at 14:44, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: > > Hello, > > Please find a patch here in Gerrit [1], which adds the option to load these private data tags. You should be able to download and compile to get the feature. Also note that itk::GDCMImageIO loads the private tags and encodes the with Base64 into strings [2]. I am working on finding some test data to verify behavior and write some tests and documentation. > > HTH, > Brad > > [1] http://review.source.kitware.com/#/c/21160/ > [2] https://github.com/InsightSoftwareConsortium/ITK/blob/bf3f02c6b75a26da3987afc296af140259215e85/Modules/IO/GDCM/src/itkGDCMImageIO.cxx#L567-L587 > >> On May 23, 2016, at 3:59 PM, Mathew Guilfoyle wrote: >> >> Thanks Brad - the trouble I'm having is that some of the keys are private/hidden. >> >> For instance, in my images when I use the image.GetMetaDataKeys() method it returns a list of 107 keys but the one I need is a private manufacturer-specific timing tag that is not part of the standard meta-data dictionary. I know the tag I need because OsiriX viewer shows all the standard and private tags and it is in there with associated data. However, if I run image.HasMetaDataKey(my_private_key) it returns FALSE. >> >> Reading various sources, including the ITK docs, it seems GDCM library has a setting that needs to be turned on to read private DICOM tags. However, the only reference I can see to this setting in SimpleITK is as an argument to the GetGDCMSeriesFileNames method and I'm not clear what function it serves there as the list of files is the same irrespective. What I need somehow is to tell ReadImage or ImageSeriesReader to parse the private tags...?? >> >> Thanks >> Mat >> >>> On 23 May 2016, at 20:47, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: >>> >>> Hello, >>> >>> To get all the tags from the dicom files you need to load them individually. Something along these lines, but iterating over the list generated by GetGDCMSeriesFileNames: >>> >>> from __future__ import print_function >>> >>> import SimpleITK as sitk >>> import sys, os >>> >>> if len ( sys.argv ) < 2: >>> print( "Usage: DicomImagePrintTags " ) >>> sys.exit ( 1 ) >>> >>> inputImage = sitk.ReadImage( sys.argv[1] ) >>> >>> for k in inputImage.GetMetaDataKeys(): >>> v = inputImage.GetMetaData(k) >>> print("({0}) = = \"{2}\"".format(k,v)) >>> >>> >>> HTH, >>> Brad >>> >>> >>> >>>> On May 23, 2016, at 3:31 PM, Mathew Guilfoyle wrote: >>>> >>>> In ITK the GDCMSeriesFileNames class (equivalently the ImageSeriesReader$GetGDCMSeriesFileNames method from Simple ITK) can both take arguments to read private DICOM tags (typically manufacturer specific info that does not follow the general standard.) >>>> >>>> I cannot figure out how to use this function to actually read in a series of images or a volume with the hidden tags (I know they are there as I can see them in Osirix!) >>>> >>>> The list of filenames that the two methods above return as no different whether the 'loadPrivateTags' attribute is set on or off. >>>> >>>> Any ideas how I can access the private tags? >>>> >>>> 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 >>> >> > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK 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 May 27 16:08:31 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Fri, 27 May 2016 20:08:31 +0000 Subject: [ITK] [ITK-users] Access DICOM private tags using SimpleITK In-Reply-To: <97FF68E7-091E-4B45-B5B3-FBE81C35505E@gmail.com> References: <3781B509-3DAA-4888-B6EC-94984E74E5D5@gmail.com> <97FF68E7-091E-4B45-B5B3-FBE81C35505E@gmail.com> Message-ID: <9643D292-09B9-4021-B665-2722E4C4E10A@mail.nih.gov> Hi, Sorry that didn?t work. I was able to get some dicom data with private tags. I have updated the patch with more commits in the topic: http://review.source.kitware.com/#/q/status:open+project:SimpleITK+branch:master+topic:AddLoadPrivateTagsOptions Now that I have tested it with data, I have merged it into the ?next? branch. What are these ?error reports? with any command? Brad > On May 27, 2016, at 11:29 AM, Mathew Guilfoyle wrote: > > Dear Brad > > Thanks for the patch - I have successfully recompiled and the private tag functions are exposed in the R wrapping to SimpleITK. For instance I can do the following: > > reader = ImageFileReader() > reader$LoadPrivateTagsOn() > > or reader$SetLoadPrivateTags(TRUE) > > However, neither of the above seem to have an effect i.e. a call to reader$GetLoadPrivateTags() returns FALSE after both of the above and the summary of my reader object has the 'loadPrivateTag' attribute at 0 irrespective. If I execute the reader I get an image with only the 107 public tags I had before. There are now errors reports with any of the commands. > > Any ideas on how to get this working? > > Cheers > Mathew > >> On 24 May 2016, at 14:44, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: >> >> Hello, >> >> Please find a patch here in Gerrit [1], which adds the option to load these private data tags. You should be able to download and compile to get the feature. Also note that itk::GDCMImageIO loads the private tags and encodes the with Base64 into strings [2]. I am working on finding some test data to verify behavior and write some tests and documentation. >> >> HTH, >> Brad >> >> [1] http://review.source.kitware.com/#/c/21160/ >> [2] https://github.com/InsightSoftwareConsortium/ITK/blob/bf3f02c6b75a26da3987afc296af140259215e85/Modules/IO/GDCM/src/itkGDCMImageIO.cxx#L567-L587 >> >>> On May 23, 2016, at 3:59 PM, Mathew Guilfoyle wrote: >>> >>> Thanks Brad - the trouble I'm having is that some of the keys are private/hidden. >>> >>> For instance, in my images when I use the image.GetMetaDataKeys() method it returns a list of 107 keys but the one I need is a private manufacturer-specific timing tag that is not part of the standard meta-data dictionary. I know the tag I need because OsiriX viewer shows all the standard and private tags and it is in there with associated data. However, if I run image.HasMetaDataKey(my_private_key) it returns FALSE. >>> >>> Reading various sources, including the ITK docs, it seems GDCM library has a setting that needs to be turned on to read private DICOM tags. However, the only reference I can see to this setting in SimpleITK is as an argument to the GetGDCMSeriesFileNames method and I'm not clear what function it serves there as the list of files is the same irrespective. What I need somehow is to tell ReadImage or ImageSeriesReader to parse the private tags...?? >>> >>> Thanks >>> Mat >>> >>>> On 23 May 2016, at 20:47, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: >>>> >>>> Hello, >>>> >>>> To get all the tags from the dicom files you need to load them individually. Something along these lines, but iterating over the list generated by GetGDCMSeriesFileNames: >>>> >>>> from __future__ import print_function >>>> >>>> import SimpleITK as sitk >>>> import sys, os >>>> >>>> if len ( sys.argv ) < 2: >>>> print( "Usage: DicomImagePrintTags " ) >>>> sys.exit ( 1 ) >>>> >>>> inputImage = sitk.ReadImage( sys.argv[1] ) >>>> >>>> for k in inputImage.GetMetaDataKeys(): >>>> v = inputImage.GetMetaData(k) >>>> print("({0}) = = \"{2}\"".format(k,v)) >>>> >>>> >>>> HTH, >>>> Brad >>>> >>>> >>>> >>>>> On May 23, 2016, at 3:31 PM, Mathew Guilfoyle wrote: >>>>> >>>>> In ITK the GDCMSeriesFileNames class (equivalently the ImageSeriesReader$GetGDCMSeriesFileNames method from Simple ITK) can both take arguments to read private DICOM tags (typically manufacturer specific info that does not follow the general standard.) >>>>> >>>>> I cannot figure out how to use this function to actually read in a series of images or a volume with the hidden tags (I know they are there as I can see them in Osirix!) >>>>> >>>>> The list of filenames that the two methods above return as no different whether the 'loadPrivateTags' attribute is set on or off. >>>>> >>>>> Any ideas how I can access the private tags? >>>>> >>>>> 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 >>>> >>> >> > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK 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 Fri May 27 17:24:04 2016 From: piotpia124 at student.polsl.pl (Piotr Piasecki) Date: Fri, 27 May 2016 23:24:04 +0200 Subject: [ITK] [ITK-users] Problems with image results from simple:itk. Message-ID: Hello Everyone. I have a problem with using itk and more specifically simpleitk. DICOM files after processing and saving in .dcm format can not be correctly opened in programs such as MicroDicom, and stored in Orthanc Dicom server. I tried to load the image using ImageFileReader, and then I wrote it without any changes, using ImageFileWriter. I could open newly created file only in ITK-SNAP. What could be the reason for such errors, and how can they be solved? Best, and thanks, Peter. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From mrguilfoyle at gmail.com Sun May 29 08:50:20 2016 From: mrguilfoyle at gmail.com (Mathew Guilfoyle) Date: Sun, 29 May 2016 13:50:20 +0100 Subject: [ITK] [ITK-users] Access DICOM private tags using SimpleITK In-Reply-To: <9643D292-09B9-4021-B665-2722E4C4E10A@mail.nih.gov> References: <3781B509-3DAA-4888-B6EC-94984E74E5D5@gmail.com> <97FF68E7-091E-4B45-B5B3-FBE81C35505E@gmail.com> <9643D292-09B9-4021-B665-2722E4C4E10A@mail.nih.gov> Message-ID: <21E9C3F1-1DC7-42E4-B1A7-FF812A3BC5CC@gmail.com> This works perfectly now: I can extract the time stamp I need. Sorry for the typo in the previous message, should have read 'There are no error reports...' Many thanks > On 27 May 2016, at 21:08, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: > > Hi, > > Sorry that didn?t work. I was able to get some dicom data with private tags. I have updated the patch with more commits in the topic: > > http://review.source.kitware.com/#/q/status:open+project:SimpleITK+branch:master+topic:AddLoadPrivateTagsOptions > > Now that I have tested it with data, I have merged it into the ?next? branch. > > What are these ?error reports? with any command? > > Brad > > >> On May 27, 2016, at 11:29 AM, Mathew Guilfoyle wrote: >> >> Dear Brad >> >> Thanks for the patch - I have successfully recompiled and the private tag functions are exposed in the R wrapping to SimpleITK. For instance I can do the following: >> >> reader = ImageFileReader() >> reader$LoadPrivateTagsOn() >> >> or reader$SetLoadPrivateTags(TRUE) >> >> However, neither of the above seem to have an effect i.e. a call to reader$GetLoadPrivateTags() returns FALSE after both of the above and the summary of my reader object has the 'loadPrivateTag' attribute at 0 irrespective. If I execute the reader I get an image with only the 107 public tags I had before. There are now errors reports with any of the commands. >> >> Any ideas on how to get this working? >> >> Cheers >> Mathew >> >>> On 24 May 2016, at 14:44, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: >>> >>> Hello, >>> >>> Please find a patch here in Gerrit [1], which adds the option to load these private data tags. You should be able to download and compile to get the feature. Also note that itk::GDCMImageIO loads the private tags and encodes the with Base64 into strings [2]. I am working on finding some test data to verify behavior and write some tests and documentation. >>> >>> HTH, >>> Brad >>> >>> [1] http://review.source.kitware.com/#/c/21160/ >>> [2] https://github.com/InsightSoftwareConsortium/ITK/blob/bf3f02c6b75a26da3987afc296af140259215e85/Modules/IO/GDCM/src/itkGDCMImageIO.cxx#L567-L587 >>> >>>> On May 23, 2016, at 3:59 PM, Mathew Guilfoyle wrote: >>>> >>>> Thanks Brad - the trouble I'm having is that some of the keys are private/hidden. >>>> >>>> For instance, in my images when I use the image.GetMetaDataKeys() method it returns a list of 107 keys but the one I need is a private manufacturer-specific timing tag that is not part of the standard meta-data dictionary. I know the tag I need because OsiriX viewer shows all the standard and private tags and it is in there with associated data. However, if I run image.HasMetaDataKey(my_private_key) it returns FALSE. >>>> >>>> Reading various sources, including the ITK docs, it seems GDCM library has a setting that needs to be turned on to read private DICOM tags. However, the only reference I can see to this setting in SimpleITK is as an argument to the GetGDCMSeriesFileNames method and I'm not clear what function it serves there as the list of files is the same irrespective. What I need somehow is to tell ReadImage or ImageSeriesReader to parse the private tags...?? >>>> >>>> Thanks >>>> Mat >>>> >>>>> On 23 May 2016, at 20:47, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote: >>>>> >>>>> Hello, >>>>> >>>>> To get all the tags from the dicom files you need to load them individually. Something along these lines, but iterating over the list generated by GetGDCMSeriesFileNames: >>>>> >>>>> from __future__ import print_function >>>>> >>>>> import SimpleITK as sitk >>>>> import sys, os >>>>> >>>>> if len ( sys.argv ) < 2: >>>>> print( "Usage: DicomImagePrintTags " ) >>>>> sys.exit ( 1 ) >>>>> >>>>> inputImage = sitk.ReadImage( sys.argv[1] ) >>>>> >>>>> for k in inputImage.GetMetaDataKeys(): >>>>> v = inputImage.GetMetaData(k) >>>>> print("({0}) = = \"{2}\"".format(k,v)) >>>>> >>>>> >>>>> HTH, >>>>> Brad >>>>> >>>>> >>>>> >>>>>> On May 23, 2016, at 3:31 PM, Mathew Guilfoyle wrote: >>>>>> >>>>>> In ITK the GDCMSeriesFileNames class (equivalently the ImageSeriesReader$GetGDCMSeriesFileNames method from Simple ITK) can both take arguments to read private DICOM tags (typically manufacturer specific info that does not follow the general standard.) >>>>>> >>>>>> I cannot figure out how to use this function to actually read in a series of images or a volume with the hidden tags (I know they are there as I can see them in Osirix!) >>>>>> >>>>>> The list of filenames that the two methods above return as no different whether the 'loadPrivateTags' attribute is set on or off. >>>>>> >>>>>> Any ideas how I can access the private tags? >>>>>> >>>>>> 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 >>>>> >>>> >>> >> > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 30 11:06:15 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 30 May 2016 08:06:15 -0700 (MST) Subject: [ITK] [ITK-users] Geodesic 3D Shape guidance Message-ID: <1464620775546-7588926.post@n2.nabble.com> Dear Community, I encountered an error which I really can't get fixed. I wrote some code in order to do a segmentation with the geodesic function with shape guidance, but in 3D. I got my shape models, PCA data, etc, all done. Now in the geodesic code, I preprocess my image in which I want to find my structure (I need shape guidance, as the structure kind of melts to the background at one point, so I need the shape to restrict this). Preprocessing etc is all done, I now give my preprocessed image, and a levelset as well as the mean image and pc-images to my geodesic function (see link to code below). At one point, when testing my code, this error occurs: Description: itk::ERROR: GeodesicActiveContourShapePriorLevelSetImageFilter(0x115f970): Inputs do not occupy the same physical space! Now, as I already encountered this error once, I checked ALL the directions of ANY image in the pipeline (see code, console output usually marked with //*****DEBUG*****). They all give the same, correct value to the console. I really am at my wits end, I can't explain this error. I think it crashed at the writer called "writer", writer->SetInput( thresholder->GetOutput() );, as this one gets as input the output from the geodesic function (so, basically, the writer that will produce the final result). I commented this part out for testing purposes, and there is still a crash even later: "evalOutput5.nrrd" and "paraOutput6.nrrd" can never be reached, the same error message occurs here. I really cant find a solution, and the worst part is that due to this error I can't even test if the result is useful at all. Like I mentioned before, without shape guidance, the result is not satisfying, as "too much" of the structure is being segmented. Any help would be really appreciated. Greetings, Robert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-3D-Shape-guidance-tp7588926.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 30 11:45:57 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 30 May 2016 08:45:57 -0700 (MST) Subject: [ITK] [ITK-users] Shape function not present Message-ID: <1464623157605-7588927.post@n2.nabble.com> Hello, sorry for my last post, that was an older note I already solved(forgot an ->Update()), I therefore deleted it. However, where I can't progress, is the following: my code tells me that the "shape function is not present", and therefore the code is aborted. I however read my meanshape, modes etc, and a PCAShapeSignedDistanceFunction is also initialized. What exactely am I doing wrong here? The error looks kind of werid... terminate called after throwing an instance of 'itk::ExceptionObject' what(): /usr/local/include/ITK-4.9/itkShapePriorSegmentationLevelSetImageFilter.hxx:114: itk::ERROR: GeodesicActiveContourShapePriorLevelSetImageFilter(0x285f970): ShapeFunction is not present Aborted (core dumped) Everything that is needed should be there already... How can there be an error? https://www.dropbox.com/s/ot8gn0i38mh83ql/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx?dl=0 -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Shape-function-not-present-tp7588927.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 30 11:57:58 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 30 May 2016 08:57:58 -0700 (MST) Subject: [ITK] [ITK-users] Processing 3D data question. In-Reply-To: <1464606770304-7588925.post@n2.nabble.com> References: <1464606770304-7588925.post@n2.nabble.com> Message-ID: <1464623878095-7588928.post@n2.nabble.com> I guess, as you have your data as an ITK Image now, you can initialize the filter you want to use kind of like this: typedef itk::Image ImageType; //pixel type is float(?), and you have a 3d matrix as you converted your dataset // to ITK typedef itk::ImageFileReader ReaderType; //here, add reader/writer if you need it typedef itk::MedianImageFilter FilterType; FilterType::Pointer medianFilter = FilterType::New(); medianFilter->SetRadius(radius); medianFilter->SetInput( reader->GetOutput() ); I don't think that there's any difference between using filters on an already prepared volume dataset (.nrrd for example), or on a dataset you converted from DICOM. I hope I could help you, however, I'm not too sure. But I honestly can't imaging that you need to "crop" slice by slice like you described. Please correct me if I'm wrong. Greetings, Robert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Processing-3D-data-question-tp7588925p7588928.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 30 12:00:59 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 30 May 2016 09:00:59 -0700 (MST) Subject: [ITK] [ITK-users] Shape function not present In-Reply-To: <1464623157605-7588927.post@n2.nabble.com> References: <1464623157605-7588927.post@n2.nabble.com> Message-ID: <1464624059338-7588929.post@n2.nabble.com> Oh god, Im so sorry, I will delete this as well, I called an Update earlier to debug that is too early... very sorry. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Shape-function-not-present-tp7588927p7588929.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 30 12:07:32 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 30 May 2016 09:07:32 -0700 (MST) Subject: [ITK] [ITK-users] Segmentation fault (core dumped) Geodesic Active Shape guidance 3D Message-ID: <1464624452928-7588930.post@n2.nabble.com> Hello, I finally managed to finish my 3-dimensional Geodesic Active Shape guidance. However, this error simply occurs, without any other output/ message: Segmentation fault (core dumped) How can I possibly fix this? Does anyone have any experience with this specific crash/ error? I can provide my code here: https://www.dropbox.com/s/ot8gn0i38mh83ql/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx?dl=0 Any help is greatly appreciated. Many thanks, Robert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Segmentation-fault-core-dumped-Geodesic-Active-Shape-guidance-3D-tp7588930.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From bill.lorensen at gmail.com Mon May 30 12:14:39 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 30 May 2016 12:14:39 -0400 Subject: [ITK] [ITK-users] Segmentation fault (core dumped) Geodesic Active Shape guidance 3D In-Reply-To: <1464624452928-7588930.post@n2.nabble.com> References: <1464624452928-7588930.post@n2.nabble.com> Message-ID: Have you run within a debugger? What is the traceback? If you have a linux system, have you tried running valgrind? Can you provide a link to sample data and the command line you use? On Mon, May 30, 2016 at 12:07 PM, Robert wrote: > Hello, > I finally managed to finish my 3-dimensional Geodesic Active Shape guidance. > However, this error simply occurs, without any other output/ message: > > Segmentation fault (core dumped) > > How can I possibly fix this? Does anyone have any experience with this > specific crash/ error? > I can provide my code here: > https://www.dropbox.com/s/ot8gn0i38mh83ql/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx?dl=0 > > Any help is greatly appreciated. > > Many thanks, > Robert > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Segmentation-fault-core-dumped-Geodesic-Active-Shape-guidance-3D-tp7588930.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -- Unpaid intern in BillsBasement at noware dot com _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 30 12:37:04 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 30 May 2016 09:37:04 -0700 (MST) Subject: [ITK] [ITK-users] Segmentation fault (core dumped) Geodesic Active Shape guidance 3D In-Reply-To: References: <1464624452928-7588930.post@n2.nabble.com> Message-ID: <1464626224580-7588932.post@n2.nabble.com> Thanks for the quick reply. I so far only used several DebugOn commands within ITK in order to monitor the progress, this one is the last before the crash. Debug: In /usr/local/include/ITK-4.9/itkPCAShapeSignedDistanceFunction.hxx, line 201 PCAShapeSignedDistanceFunction (0x1c62070): use extrapolator I will try valgrind now, using ubuntu 14. There is a dropbox folder with some minor data that I currently use for debugging as well: https://www.dropbox.com/sh/j2ognv5y5zv61wu/AABOAn-w4PIlYAq-WSW_lPOMa?dl=0 Simply use these arguments, as I used them as well, they are pretty mindless/ I gues not the best ones yet, I just want to get it to work: ./GeodesicActiveContourShapePriorLevelSetImageFilter CochleaCropped.nrrd out.nrrd 25 21 16 16 24 15 16 28 13 3 0.6 0.5 0.02 meanImage.nrrd 3 pcImage*.nrrd 10 10 10 Thanks. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Segmentation-fault-core-dumped-Geodesic-Active-Shape-guidance-3D-tp7588930p7588932.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 30 12:52:24 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 30 May 2016 09:52:24 -0700 (MST) Subject: [ITK] [ITK-users] Segmentation fault (core dumped) Geodesic Active Shape guidance 3D In-Reply-To: <1464626224580-7588932.post@n2.nabble.com> References: <1464624452928-7588930.post@n2.nabble.com> <1464626224580-7588932.post@n2.nabble.com> Message-ID: <1464627144506-7588933.post@n2.nabble.com> Following is the valgrind output, after the last itk debug message: ==22787== Invalid read of size 4 ==22787== at 0x570006: itk::NearestNeighborExtrapolateImageFunction, double>::EvaluateAtContinuousIndex(itk::ContinuousIndex const&) const (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x52C15A: itk::ExtrapolateImageFunction, double>::Evaluate(itk::Point const&) const (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x4FF675: itk::PCAShapeSignedDistanceFunction >::Evaluate(itk::Point const&) const (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x4F9DAF: itk::ShapePriorMAPCostFunction, float>::ComputeLogInsideTerm(itk::OptimizerParameters const&) const (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x4F9389: itk::ShapePriorMAPCostFunctionBase, float>::GetValue(itk::OptimizerParameters const&) const (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x71A7C10: itk::OnePlusOneEvolutionaryOptimizer::StartOptimization() (in /usr/local/lib/libITKOptimizers-4.9.so.1) ==22787== by 0x509838: itk::ShapePriorSegmentationLevelSetImageFilter, itk::Image, float>::InitializeIteration() (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x513000: itk::FiniteDifferenceImageFilter, itk::Image >::GenerateData() (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x50E846: itk::SegmentationLevelSetImageFilter, itk::Image, float>::GenerateData() (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x50DA52: itk::ShapePriorSegmentationLevelSetImageFilter, itk::Image, float>::GenerateData() (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x507341: itk::GeodesicActiveContourShapePriorLevelSetImageFilter, itk::Image, float>::GenerateData() (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x78A89CF: itk::ProcessObject::UpdateOutputData(itk::DataObject*) (in /usr/local/lib/libITKCommon-4.9.so.1) ==22787== Address 0xfffffffffffffffc is not stack'd, malloc'd or (recently) free'd ==22787== ==22787== ==22787== Process terminating with default action of signal 11 (SIGSEGV) ==22787== Access not within mapped region at address 0xFFFFFFFFFFFFFFFC ==22787== at 0x570006: itk::NearestNeighborExtrapolateImageFunction, double>::EvaluateAtContinuousIndex(itk::ContinuousIndex const&) const (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x52C15A: itk::ExtrapolateImageFunction, double>::Evaluate(itk::Point const&) const (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x4FF675: itk::PCAShapeSignedDistanceFunction >::Evaluate(itk::Point const&) const (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x4F9DAF: itk::ShapePriorMAPCostFunction, float>::ComputeLogInsideTerm(itk::OptimizerParameters const&) const (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x4F9389: itk::ShapePriorMAPCostFunctionBase, float>::GetValue(itk::OptimizerParameters const&) const (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x71A7C10: itk::OnePlusOneEvolutionaryOptimizer::StartOptimization() (in /usr/local/lib/libITKOptimizers-4.9.so.1) ==22787== by 0x509838: itk::ShapePriorSegmentationLevelSetImageFilter, itk::Image, float>::InitializeIteration() (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x513000: itk::FiniteDifferenceImageFilter, itk::Image >::GenerateData() (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x50E846: itk::SegmentationLevelSetImageFilter, itk::Image, float>::GenerateData() (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x50DA52: itk::ShapePriorSegmentationLevelSetImageFilter, itk::Image, float>::GenerateData() (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x507341: itk::GeodesicActiveContourShapePriorLevelSetImageFilter, itk::Image, float>::GenerateData() (in /home/scorpi/Desktop/GeoDesic3DShapeGuidance/build/GeodesicActiveContourShapePriorLevelSetImageFilter) ==22787== by 0x78A89CF: itk::ProcessObject::UpdateOutputData(itk::DataObject*) (in /usr/local/lib/libITKCommon-4.9.so.1) ==22787== If you believe this happened as a result of a stack ==22787== overflow in your program's main thread (unlikely but ==22787== possible), you can try to increase the size of the ==22787== main thread stack using the --main-stacksize= flag. ==22787== The main thread stack size used in this run was 8388608. ==22787== ==22787== HEAP SUMMARY: ==22787== in use at exit: 10,936,003 bytes in 71,849 blocks ==22787== total heap usage: 108,116 allocs, 36,267 frees, 19,278,417 bytes allocated ==22787== ==22787== LEAK SUMMARY: ==22787== definitely lost: 0 bytes in 0 blocks ==22787== indirectly lost: 0 bytes in 0 blocks ==22787== possibly lost: 0 bytes in 0 blocks ==22787== still reachable: 10,936,003 bytes in 71,849 blocks ==22787== of which reachable via heuristic: ==22787== stdstring : 1,975,699 bytes in 45,818 blocks ==22787== suppressed: 0 bytes in 0 blocks ==22787== Reachable blocks (those to which a pointer was found) are not shown. ==22787== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==22787== ==22787== For counts of detected and suppressed errors, rerun with: -v ==22787== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Segmentation fault (core dumped) -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Segmentation-fault-core-dumped-Geodesic-Active-Shape-guidance-3D-tp7588930p7588933.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 30 13:02:06 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 30 May 2016 10:02:06 -0700 (MST) Subject: [ITK] [ITK-users] Segmentation fault (core dumped) Geodesic Active Shape guidance 3D In-Reply-To: <1464627144506-7588933.post@n2.nabble.com> References: <1464624452928-7588930.post@n2.nabble.com> <1464626224580-7588932.post@n2.nabble.com> <1464627144506-7588933.post@n2.nabble.com> Message-ID: <1464627726480-7588934.post@n2.nabble.com> I guess it must use a local variable somewhere, after the variable is not there anymore... Now to find it... -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Segmentation-fault-core-dumped-Geodesic-Active-Shape-guidance-3D-tp7588930p7588934.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From dzenanz at gmail.com Mon May 30 13:18:40 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 30 May 2016 13:18:40 -0400 Subject: [ITK] [ITK-users] Geodesic 3D Shape guidance In-Reply-To: <1464620775546-7588926.post@n2.nabble.com> References: <1464620775546-7588926.post@n2.nabble.com> Message-ID: Hi Robert, by default the precision for output does not include all digits in floats and doubles. If there is a difference on 7th decimal place, it will cause the exception but will not be visible in cout. Can you examine origin, spacing and directions on the input images? I had that problem recently (1.99999999 was different from 2.0). HTH, D?enan On Mon, May 30, 2016 at 11:06 AM, Robert wrote: > Dear Community, > I encountered an error which I really can't get fixed. > I wrote some code in order to do a segmentation with the geodesic function > with shape guidance, but in 3D. > I got my shape models, PCA data, etc, all done. > Now in the geodesic code, I preprocess my image in which I want to find my > structure (I need shape guidance, as the structure kind of melts to the > background at one point, so I need the shape to restrict this). > Preprocessing etc is all done, I now give my preprocessed image, and a > levelset as well as the mean image and pc-images to my geodesic function > (see link to code below). > At one point, when testing my code, this error occurs: > Description: itk::ERROR: > GeodesicActiveContourShapePriorLevelSetImageFilter(0x115f970): Inputs do > not > occupy the same physical space! > Now, as I already encountered this error once, I checked ALL the directions > of ANY image in the pipeline (see code, console output usually marked with > //*****DEBUG*****). They all give the same, correct value to the console. > I really am at my wits end, I can't explain this error. > I think it crashed at the writer called "writer", writer->SetInput( > thresholder->GetOutput() );, as this one gets as input the output from the > geodesic function (so, basically, the writer that will produce the final > result). > I commented this part out for testing purposes, and there is still a crash > even later: > "evalOutput5.nrrd" > and > "paraOutput6.nrrd" can never be reached, the same error message occurs > here. > I really cant find a solution, and the worst part is that due to this error > I can't even test if the result is useful at all. Like I mentioned before, > without shape guidance, the result is not satisfying, as "too much" of the > structure is being segmented. > Any help would be really appreciated. > Greetings, > Robert > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Geodesic-3D-Shape-guidance-tp7588926.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 30 13:28:50 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 30 May 2016 10:28:50 -0700 (MST) Subject: [ITK] [ITK-users] Geodesic 3D Shape guidance In-Reply-To: References: Message-ID: <1464629330364-7588936.post@n2.nabble.com> Thanks for your reply, I deleted the thread as I already figured it out: I simply forgot to add one Update() function, so the old values were not overwritten at all. Thanks for your reply anyway! -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Re-ITK-users-Geodesic-3D-Shape-guidance-tp7588935p7588936.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From jaroslawlobaza at gmail.com Mon May 30 15:46:47 2016 From: jaroslawlobaza at gmail.com (Krakers) Date: Mon, 30 May 2016 12:46:47 -0700 (MST) Subject: [ITK] [ITK-users] Processing 3D data question. In-Reply-To: <1464623878095-7588928.post@n2.nabble.com> References: <1464606770304-7588925.post@n2.nabble.com> <1464623878095-7588928.post@n2.nabble.com> Message-ID: <1464637607958-7588937.post@n2.nabble.com> Firstly thanks for your response. I wrote a function which takes image data as input and should return "medianized" picture, but it crushed when gets to medianFilter->Update(); // typedef itk::Image< unsigned char, 3 > ImageType3D; median3D(ImageType3D::Pointer img) { ImageType3D::Pointer bin = 0; ImageType3D::SizeType indexRadius; indexRadius[0] = 1; // radius along x indexRadius[1] = 1; // radius along y indexRadius[2] = 0; // radius along z typedef itk::MedianImageFilter< ImageType3D, ImageType3D > MedianFilterType; typedef itk::MedianImageFilter FilterType; FilterType::Pointer medianFilter = FilterType::New(); medianFilter->SetRadius(indexRadius); medianFilter->SetInput(img); try { medianFilter->Update(); } catch (itk::ExceptionObject & error) { std::cerr << "Error: " << error << std::endl; //return EXIT_FAILURE; } bin = medianFilter->GetOutput(); return bin; } -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Processing-3D-data-question-tp7588925p7588937.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 30 15:59:46 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 30 May 2016 12:59:46 -0700 (MST) Subject: [ITK] [ITK-users] Processing 3D data question. In-Reply-To: <1464637607958-7588937.post@n2.nabble.com> References: <1464606770304-7588925.post@n2.nabble.com> <1464623878095-7588928.post@n2.nabble.com> <1464637607958-7588937.post@n2.nabble.com> Message-ID: <1464638386832-7588938.post@n2.nabble.com> Do you really need this? indexRadius[0] = 1; // radius along x indexRadius[1] = 1; // radius along y indexRadius[2] = 0; // radius along z Usually, in ITK, you define filters like this: First your Imagetype, which is composed from PixelType and Dimension. Your Dimension is 3, Pixeltype is probably float. This is what I meant by this: typedef itk::Image< unsigned char, 3 > ImageType3D; (you got this commented in your code, was that your intention? you use ImageType3D late, so I guess you already got that defined somewhere else) Your filter initialization should work. However, about the radius: Like I said, you work on a 3D image, so you initialize your filter to work with 3D images (your defined type, just like you did it). You usually won't need to kind of iterate slice by slice like if you'd write a "normal" c++ filter. I think this mindset causes your error (judging from using an array as radius). radius can be an integer value. ITK now uses this value in all needed dimensions. There is no need for an array as far as I know. Try using medianFilter->SetRadius(indexRadius); with indexRadius being a single number. Like I said, I never worked with data extracted from dicom slices, but I think it should work if you change the radius. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Processing-3D-data-question-tp7588925p7588938.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From jaroslawlobaza at gmail.com Mon May 30 16:20:25 2016 From: jaroslawlobaza at gmail.com (Krakers) Date: Mon, 30 May 2016 13:20:25 -0700 (MST) Subject: [ITK] [ITK-users] Processing 3D data question. In-Reply-To: <1464638386832-7588938.post@n2.nabble.com> References: <1464606770304-7588925.post@n2.nabble.com> <1464623878095-7588928.post@n2.nabble.com> <1464637607958-7588937.post@n2.nabble.com> <1464638386832-7588938.post@n2.nabble.com> Message-ID: <1464639625300-7588939.post@n2.nabble.com> Yeah by comment I tried to tell it was defined before with Pixel type as unsigned char (now I know it is best to write it) Change you've mentioned unfortunately didn't help and it still breaks when I invoke that function. The worst is that no error is signalized when program hungs, perhaps I have to build in debug to see where is the problem. THANKS. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Processing-3D-data-question-tp7588925p7588939.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From scorpiuni at gmail.com Mon May 30 16:30:09 2016 From: scorpiuni at gmail.com (Robert) Date: Mon, 30 May 2016 13:30:09 -0700 (MST) Subject: [ITK] [ITK-users] Processing 3D data question. In-Reply-To: <1464639625300-7588939.post@n2.nabble.com> References: <1464606770304-7588925.post@n2.nabble.com> <1464623878095-7588928.post@n2.nabble.com> <1464637607958-7588937.post@n2.nabble.com> <1464638386832-7588938.post@n2.nabble.com> <1464639625300-7588939.post@n2.nabble.com> Message-ID: <1464640209908-7588940.post@n2.nabble.com> Your return statement, I don't know what you want to achieve with that. Try initializing a writer with your imagetype as well in the beginning, and then do something like writer->SetFilename("median_out.ENDING");, ENDING being whatever imagetype you use (.nrrd for example) and writer->SetInput(median->GetOutput()); and inside the try/catch block, after you called update on median, call writer->Update();. I don't know what you want to do with bin after returning it, but with the method above you'll write the median filtered image to a file. Have a look at this: https://itk.org/Wiki/ITK/Examples/Smoothing/MedianImageFilter Greetings, Robert -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Processing-3D-data-question-tp7588925p7588940.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From jaroslawlobaza at gmail.com Mon May 30 17:57:51 2016 From: jaroslawlobaza at gmail.com (Krakers) Date: Mon, 30 May 2016 14:57:51 -0700 (MST) Subject: [ITK] [ITK-users] Processing 3D data question. In-Reply-To: <1464640209908-7588940.post@n2.nabble.com> References: <1464606770304-7588925.post@n2.nabble.com> <1464623878095-7588928.post@n2.nabble.com> <1464637607958-7588937.post@n2.nabble.com> <1464638386832-7588938.post@n2.nabble.com> <1464639625300-7588939.post@n2.nabble.com> <1464640209908-7588940.post@n2.nabble.com> Message-ID: <1464645471668-7588941.post@n2.nabble.com> I left behind idea with using special function and simply connected my code with output of VTKImageToImageFilter at place that was invoked. Now it works and saves data :) Thanks once again :) -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Processing-3D-data-question-tp7588925p7588941.html Sent from the ITK Insight Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From Christian.K.Gustafsson at skane.se Tue May 31 08:40:06 2016 From: Christian.K.Gustafsson at skane.se (Gustafsson Christian K) Date: Tue, 31 May 2016 12:40:06 +0000 Subject: [ITK] InvertDisplacementFieldImageFilter in SimpleITK Message-ID: <31BA9FED7BDD6A429EDBA37671C8C47026C3054D@RSMAIL112.REG.SKANE.SE> Hello! What is the unit of measurement that is used in the criterias MeanErrorToleranceThreshold and MaxErrorToleranceThreshold /* Set/Get the mean stopping criterion */ itkSetMacro( MeanErrorToleranceThreshold, RealType ); itkGetConstMacro( MeanErrorToleranceThreshold, RealType ); /* Set/Get the max stopping criterion */ itkSetMacro( MaxErrorToleranceThreshold, RealType ); itkGetConstMacro( MaxErrorToleranceThreshold, RealType ); in InvertDisplacementFieldImageFilter in SimpleITK? Is it amount of pixels? Best regards ________________________________________ Christian Gustafsson Medical Physicist, MRI, PhD candidate Department of Radiation Physics Klinikgatan 5 Sk?ne University Hospital SE 221 85 Lund +46 46 177647 Christian.K.Gustafsson at skane.se -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Tue May 31 10:02:52 2016 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Tue, 31 May 2016 14:02:52 +0000 Subject: [ITK] InvertDisplacementFieldImageFilter in SimpleITK In-Reply-To: <31BA9FED7BDD6A429EDBA37671C8C47026C3054D@RSMAIL112.REG.SKANE.SE> References: <31BA9FED7BDD6A429EDBA37671C8C47026C3054D@RSMAIL112.REG.SKANE.SE> Message-ID: <7A08CC76-99D0-4FC1-BF0E-767252A58FDD@mail.nih.gov> Hello, My assumption would be that the error is in physical space and not pixels as this is standard ITK practice. While the documentation is rather sparse you can look at the source code to gain insight into these types of questions [1]. Also note that there is the InverseDisplacementFieldImageFilter. I don?t recall the difference and if one is generally preferred of the other. HTH, Brad [1] https://github.com/InsightSoftwareConsortium/ITK/blob/1257b0468c147ba2b1a65bae67169bdf35f4fa50/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx#L215-L248 On May 31, 2016, at 8:40 AM, Gustafsson Christian K > wrote: Hello! What is the unit of measurement that is used in the criterias MeanErrorToleranceThreshold and MaxErrorToleranceThreshold /* Set/Get the mean stopping criterion */ itkSetMacro( MeanErrorToleranceThreshold, RealType ); itkGetConstMacro( MeanErrorToleranceThreshold, RealType ); /* Set/Get the max stopping criterion */ itkSetMacro( MaxErrorToleranceThreshold, RealType ); itkGetConstMacro( MaxErrorToleranceThreshold, RealType ); in InvertDisplacementFieldImageFilter in SimpleITK? Is it amount of pixels? Best regards ________________________________________ Christian Gustafsson Medical Physicist, MRI, PhD candidate Department of Radiation Physics Klinikgatan 5 Sk?ne University Hospital SE 221 85 Lund +46 46 177647 Christian.K.Gustafsson at skane.se _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Tue May 31 23:02:01 2016 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 31 May 2016 23:02:01 -0400 Subject: [ITK] [ITK-users] C++11 compiler warnings with cuda <6.5 In-Reply-To: References: Message-ID: Hi Simon, Thanks for reporting the issue. From this page: https://devblogs.nvidia.com/parallelforall/developing-portable-cuda-cc-code-hemi/ it looks like the __NVCC__ macro could be used in this fashion: // Cuda does not need the same C++ standard version #if !defined(__NVCC__) #if ITK_COMPILED_CXX_VERSION > __cplusplus #warning "WARNING: The current project is configured to use a C++ standard version older than the C++ standard used for this build of ITK" #endif #endif Could you please test and submit a patch as documented here?: https://itk.org/Wiki/ITK/Git/Develop Thanks, Matt On Thu, May 26, 2016 at 9:44 AM, Simon Rit wrote: > Hi, > I have upgraded to ITK 4.11 (compiled with gcc 5.3.1) and I now get a lot of > warnings with my GPU code compiled with nvcc (cuda 6.5) (see RTK dashboard, > e.g., here) due to this itkConfigure.h.in commit. I can see two workarounds: > - disable the warning when including itkConfigure.h.in when I compile CUDA > code. This can be done with pragmas (like explained here) but it is a bit of > work to make it cross platform. Note that I don't fear a problem since I > only include this ITK file to know the configuration, the rest is > independent from ITK because, in my experience, nvcc doesn't compile ITK > code... Are you sure this warning is required and, if yes, would there be a > better way to disable this warning in my specific case? > - disable c++11 when compiling ITK and RTK but that's a pity. > Has anyone else experienced such a problem? Would there be a better > solution? > Thanks in advance, > Simon > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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