From olivier.comtois at polymtl.ca Mon Aug 3 17:30:13 2015 From: olivier.comtois at polymtl.ca (Olivier Comtois) Date: Mon, 03 Aug 2015 21:30:13 +0000 Subject: [ITK-users] Generating a warping field with ThinPlateSplineKernelTransform Message-ID: <20150803213013.Horde.k-Tn9jq9s3NiK8P8YzGdJrX@www.imp.polymtl.ca> Hi everyone, I am trying to use ThinPlateSplineKernelTransform in order to produce a warping field. I am closely following the example in Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx however, the field and image outputted this way is completely wrong. I am trying to straighten a set of point (the spinal cord). I have a source set of points which is a set of points alongside of the spinal cord and a corresponding set of points which is a set of points taken from a straightened spinal cord.These points are landmarks on the image. The problem is the output image is still curved and not anywhere close the target landmarks. Thank you in advance, Olivier From siavashk at ece.ubc.ca Tue Aug 4 17:13:16 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Tue, 4 Aug 2015 14:13:16 -0700 (MST) Subject: [ITK-users] Generating a warping field with ThinPlateSplineKernelTransform In-Reply-To: <20150803213013.Horde.k-Tn9jq9s3NiK8P8YzGdJrX@www.imp.polymtl.ca> References: <20150803213013.Horde.k-Tn9jq9s3NiK8P8YzGdJrX@www.imp.polymtl.ca> Message-ID: <1438722796207-35972.post@n7.nabble.com> Having your exact code (on the small chance that it differs from the example), your data, and the argument list would help in debugging your problem. But in the mean time, you can try the following to see where the problem lies: 1. If you write out the defomation field and view it in the context of your volume in a 3rd party software (e.g., Paraview), what would you see? Would it make sense in terms of smoothness and direction? 2. Is the deformed volume (output of itk::ResmapleImageFilter) different compared to the input volume? In other words, is the resampler doing anything? 3. If you invert the deformation field, would your deformed volume be the output that you expect? You can do this by swapping source and target landmarks. Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Generating-a-warping-field-with-ThinPlateSplineKernelTransform-tp35971p35972.html Sent from the ITK - Users mailing list archive at Nabble.com. From siavashk at ece.ubc.ca Tue Aug 4 17:53:46 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Tue, 4 Aug 2015 14:53:46 -0700 (MST) Subject: [ITK-users] 3D/2D registration with itkRayCastInterpolateImageFunction In-Reply-To: References: Message-ID: <1438725226436-35973.post@n7.nabble.com> Is the metric decreasing? (i.e. similarity value) It could be that everything is correct, it is just that you have an ill-posed problem. If the metric is decreasing, it could be that you are converging to a local minimum. Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-3D-2D-registration-with-itkRayCastInterpolateImageFunction-tp35970p35973.html Sent from the ITK - Users mailing list archive at Nabble.com. From lasso at queensu.ca Tue Aug 4 18:38:37 2015 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 4 Aug 2015 22:38:37 +0000 Subject: [ITK-users] [ITK] Generating a warping field with ThinPlateSplineKernelTransform In-Reply-To: <1438722796207-35972.post@n7.nabble.com> References: <20150803213013.Horde.k-Tn9jq9s3NiK8P8YzGdJrX@www.imp.polymtl.ca> <1438722796207-35972.post@n7.nabble.com> Message-ID: You can also load non-linear transforms into 3D Slicer for interactive visualization, application to your images, comparing fixed/moving/registered images, etc. You can also invert, compose, decompose transforms, apply it to marked points, segmented surfaces, etc. See some examples here: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Transforms Paraview is very good but not for analyzing transforms: it can only load exported displacement fields (but for that you would need to be sure that your region of interest is correct and you lose information when you sample the field), it only supports axis-aligned images, and dense vector field visualization has been broken in recent versions (I haven't checked the latest version). Andras -----Original Message----- From: Community [mailto:community-bounces at itk.org] On Behalf Of Siavash Khallaghi Sent: Tuesday, August 4, 2015 5:13 PM To: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Generating a warping field with ThinPlateSplineKernelTransform Having your exact code (on the small chance that it differs from the example), your data, and the argument list would help in debugging your problem. But in the mean time, you can try the following to see where the problem lies: 1. If you write out the defomation field and view it in the context of your volume in a 3rd party software (e.g., Paraview), what would you see? Would it make sense in terms of smoothness and direction? 2. Is the deformed volume (output of itk::ResmapleImageFilter) different compared to the input volume? In other words, is the resampler doing anything? 3. If you invert the deformation field, would your deformed volume be the output that you expect? You can do this by swapping source and target landmarks. Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Generating-a-warping-field-with-ThinPlateSplineKernelTransform-tp35971p35972.html Sent from the ITK - Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From siavashk at ece.ubc.ca Wed Aug 5 18:01:54 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Wed, 5 Aug 2015 15:01:54 -0700 (MST) Subject: [ITK-users] translate: units In-Reply-To: <1438696937794-7587643.post@n2.nabble.com> References: <1438696937794-7587643.post@n2.nabble.com> Message-ID: <1438812114032-7587647.post@n2.nabble.com> They are in physical units, i.e. mm. This is because geometric transformations are always done in physical space in ITK. Siavash -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/translate-units-tp7587643p7587647.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From blowekamp at mail.nih.gov Thu Aug 6 10:37:29 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 06 Aug 2015 10:37:29 -0400 Subject: [ITK-users] SimpleITK: Pass Image from C++ to Python In-Reply-To: <558EA415.8050409@gmx.net> References: <558EA415.8050409@gmx.net> Message-ID: <5D940348-9F6D-441B-93F4-2730E61E6A55@mail.nih.gov> Hello Klaus, Sorry for the very delayed response. I would like to know more about your application requirements. I have implemented an initial prorotype of a public method in the _SimpleITK Python library which allows conversions from the SWIG PyObject to the SimpleITK Image class. This should allow pulling Image objects created in Python SimpleITK into a C++ application. A similar method can be created to go the other way too. I believe this is the interface you need, and just wanted to verify your requirements. Here is the proof of concept branch: https://github.com/blowekamp/SimpleITK/commits/AddCXXConvertInterfaceToPythonLibrary HTH, Brad On Jun 27, 2015, at 9:24 AM, Klaus wrote: > Hi, > > I have a C++ application which I use to do all major image processing > stuff, UI and so on. I embedded python as scripting language to quickly > test new ideas. Currently I am using temporary files and pass file paths > back and forth as a quick and dirty solution to pass images from one > language to the other. However, I would like to directly pass a sitk > (or itk) image from c++ as parameter to a python method/function call. > > Is there a straight forward (and efficient) way to achieve this? > > Thank you! > > Klaus > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 olivier.comtois at polymtl.ca Thu Aug 6 11:53:32 2015 From: olivier.comtois at polymtl.ca (Olivier Comtois) Date: Thu, 06 Aug 2015 15:53:32 +0000 Subject: [ITK-users] Generating a warping field with ThinPlateSplineKernelTransform In-Reply-To: Message-ID: <20150806155332.Horde.prSADUXzWlTSvqlZxJd62Rs@www.imp.polymtl.ca> Thank you for your reply Siavash, Here is my code : It differs from the example in that I take my landmark points from 2 files (one for the source landmarks and another for the target). The source landmarks come from the segmentation of a curved spinal cord while the straight ones come from a template (which is straightened). std::vector ReadLabelValueFromFile(std::string filename) { std::ifstream file(filename.c_str()); string line; char* token; std::vector result; std::vector::iterator it; it = result.begin(); if (file.is_open()) { while (file.good()) { getline(file, line); char * charLine = new char[line.length() + 1]; strcpy(charLine, line.c_str()); token = std::strtok(charLine, ","); while (token != NULL) { result.push_back(std::atof(token)); token = strtok(NULL, ","); } delete[] charLine; } file.close(); } else { throw std::runtime_error(std::string("Cannot open file : ") + filename); } return result; } void GetRealValuePointSetFromFile(itk::ThinPlateSplineKernelTransform< double, 3>::PointSetType::Pointer &source, itk::ThinPlateSplineKernelTransform< double, 3>::PointSetType::Pointer &destination, string curvedFilename, string straightFilename) { //define variables needed for this function string line; string token; std::vector straightValues; std::vector curvedValues; //fetching coordinates from files try { straightValues = ReadLabelValueFromFile(straightFilename); curvedValues = ReadLabelValueFromFile(curvedFilename); //check if not empty if (curvedValues.size() == 0) { throw std::runtime_error( "No value found in the curved labels text file."); } if (straightValues.size() == 0) { throw std::runtime_error( "No value found in straight the labels text file."); } if ((straightValues.size() % 3) != 0) { throw std::runtime_error( "The straight file size must be divisible by 3 (since there is 3 dimensions to the image)"); } if ((curvedValues.size() % 3) != 0) { throw std::runtime_error( "The curved file size must be divisible by 3 (since there is 3 dimensions to the image)"); } if (straightValues.size() != curvedValues.size()) { throw std::runtime_error( "Curved and Straight files do not have the same size."); } } catch (const std::exception &e) { throw; } //Produce the Straight points typedef double Realtype; typedef itk::ThinPlateSplineKernelTransform< double, ImageDimension> TransformType; typedef TransformType::PointSetType PointSetType; std::vector::iterator itS = straightValues.begin(); std::vector::iterator itC = curvedValues.begin(); typedef PointSetType::PointIdentifier PointIdType; PointIdType id = itk::NumericTraits< PointIdType >::ZeroValue(); while (itS != straightValues.end()) { typedef itk::Point PointType; PointType pS; PointType pC; for (int i = 0; i < 3; i++) { pS[i] = *itS; pC[i] = *itC; itS++; itC++; } //Place points in the point sets source->SetPoint(id, pC); source->SetPointData(id, id); destination->SetPoint(id, pS); destination->SetPointData(id, id); id++; } printf("RETURNING POINT VALUES"); return; } int LandmarkBasedWithTextDisplacementFieldTransformInitializer(int argc, char *argv[]) { //////////////////////////////////////////////////////////////////////////////////////////// /*CREATING USEFUL TYPES*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nCREATING USEFUL TYPES\n"); typedef double RealType; typedef unsigned int LabelType; typedef itk::Image LabelImageType; typedef itk::Image RealImageType; typedef itk::Vector VectorType; typedef itk::Vector< double, ImageDimension > FieldVectorType; typedef itk::ResampleImageFilter ResamplerType; typedef itk::LinearInterpolateImageFunction InterpolatorType; typedef itk::ImageFileWriter< LabelImageType > DeformedImageWriterType; typedef itk::Image< FieldVectorType, ImageDimension > DisplacementFieldType; typedef itk::ImageFileWriter< DisplacementFieldType > FieldWriterType; typedef itk::ThinPlateSplineKernelTransform< RealType, ImageDimension> TransformType; typedef itk::ImageFileReader ImageReaderType; typedef TransformType::PointSetType PointSetType; typedef PointSetType::PointIdentifier PointIdType; //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*LOADING FIXED IMAGE*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nLOADING DESTINATION IMAGE\n"); ImageReaderType::Pointer destinationReader = ImageReaderType::New(); destinationReader->SetFileName(argv[2]); destinationReader->Update(); LabelImageType::Pointer destinationImage = destinationReader->GetOutput(); //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*LOADING MOVING IMAGE*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nLOADING SOURCE IMAGE\n"); ImageReaderType::Pointer sourceReader = ImageReaderType::New(); sourceReader->SetFileName(argv[1]); sourceReader->Update(); LabelImageType::Pointer sourceImage = sourceReader->GetOutput(); //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*INIT IMAGE CONTAINERS*/ //////////////////////////////////////////////////////////////////////////////////////////// typedef itk::PointSet RealPointSetType; PointSetType::Pointer destinationPts = PointSetType::New(); PointSetType::Pointer sourcePts = PointSetType::New(); RegistrationType::Pointer registration = RegistrationType::New(); destinationPts->Initialize(); sourcePts->Initialize(); //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*IMPORTING LANDMARKS FROM TEXT FILES*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nIMPORTING LANDMARKS FROM TEXT FILES\n"); if (string(argv[3]).compare("") != 0) { if (string(argv[4]).compare("") != 0) { try { string sourceFilename = argv[3]; string destinationFilename = argv[4]; GetRealValuePointSetFromFile(sourcePts, destinationPts, sourceFilename, destinationFilename); } catch (exception &e) { throw; } } else throw std::runtime_error( "Both arguments the straight and curved file must be specified"); } else throw std::runtime_error( "A file must be specified in order to take input real labels."); //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*DEFINING KERNEL TRANSFORM*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nDEFINING KERNEL TRANSFORM\n"); TransformType::Pointer tps = TransformType::New(); tps->SetSourceLandmarks(sourcePts); tps->SetTargetLandmarks(destinationPts); tps->ComputeWMatrix(); //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*DEFINING RESAMPLER TO EXECUTE TRANSFORM*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nDEFINING RESAMPLER\n"); LabelImageType::ConstPointer inputImage = sourceReader->GetOutput(); LabelImageType::SpacingType spacing = destinationImage->GetSpacing(); LabelImageType::PointType origin = destinationImage->GetOrigin(); LabelImageType::DirectionType direction = destinationImage->GetDirection(); LabelImageType::RegionType region = destinationImage->GetLargestPossibleRegion(); LabelImageType::SizeType size = region.GetSize(); cout << spacing < 6) { ResamplerType::Pointer resampler = ResamplerType::New(); InterpolatorType::Pointer interpolator = InterpolatorType::New(); resampler->SetInterpolator( interpolator ); resampler->SetOutputSpacing( spacing ); resampler->SetOutputDirection( direction ); resampler->SetOutputOrigin( origin ); resampler->SetSize( size ); resampler->SetTransform( tps ); resampler->SetOutputStartIndex( region.GetIndex() ); resampler->SetInput( sourceReader->GetOutput() ); //////////////////////////////////////////////////////////////////////////////////////////// DeformedImageWriterType::Pointer deformedImageWriter = DeformedImageWriterType::New(); deformedImageWriter->SetInput( resampler->GetOutput() ); deformedImageWriter->SetFileName( argv[6] ); try { deformedImageWriter->Update(); } catch( itk::ExceptionObject & excp ) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } } //////////////////////////////////////////////////////////////////////////////////////////// /*DEFINING FIELD*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nDEFINING FIELD\n"); DisplacementFieldType::Pointer field = DisplacementFieldType::New(); field->SetRegions( region ); field->SetOrigin( origin ); field->SetDirection( direction ); field->SetSpacing( spacing ); field->Allocate(); cout << field->GetLargestPossibleRegion() <GetOrigin() <GetDirection() <GetSpacing() <GetLargestPossibleRegion().GetSize() < FieldIterator; FieldIterator fi( field, region ); fi.GoToBegin(); TransformType::InputPointType point1; TransformType::OutputPointType point2; DisplacementFieldType::IndexType index; FieldVectorType displacement; int fieldCount while( ! fi.IsAtEnd() ) { index = fi.GetIndex(); field->TransformIndexToPhysicalPoint( index, point1 ); point2 = tps->TransformPoint( point1 ); for ( int i = 0;i < ImageDimension;i++) { displacement[i] = point2[i] - point1[i]; } fi.Set( displacement ); ++fi; } //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*GENERATING FIELD FILE*/ //////////////////////////////////////////////////////////////////////////////////////////// //Write computed deformation field printf("\nGENERATING FIELD FILE\n"); FieldWriterType::Pointer fieldWriter = FieldWriterType::New(); fieldWriter->SetFileName( argv[5] ); fieldWriter->SetInput( field ); try { fieldWriter->Update(); } catch( itk::ExceptionObject & excp ) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; //////////////////////////////////////////////////////////////////////////////////////////// } insight-users-request at itk.org a ?crit?: > Send Insight-users mailing list submissions to > insight-users at itk.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://public.kitware.com/mailman/listinfo/insight-users > or, via email, send a message with subject or body 'help' to > insight-users-request at itk.org > > You can reach the person managing the list at > insight-users-owner at itk.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Insight-users digest..." > > > Today's Topics: > > 1. Re: Generating a warping field with > ThinPlateSplineKernelTransform (Siavash Khallaghi) > 2. Re: 3D/2D registration with > itkRayCastInterpolateImageFunction (Siavash Khallaghi) > 3. Re: [ITK] Generating a warping field with > ThinPlateSplineKernelTransform (Andras Lasso) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 4 Aug 2015 14:13:16 -0700 (MST) > From: Siavash Khallaghi > To: insight-users at itk.org > Subject: Re: [ITK-users] Generating a warping field with > ThinPlateSplineKernelTransform > Message-ID: <1438722796207-35972.post at n7.nabble.com> > Content-Type: text/plain; charset=us-ascii > > Having your exact code (on the small chance that it differs from the > example), your data, and the argument list would help in debugging your > problem. But in the mean time, you can try the following to see where the > problem lies: > > 1. If you write out the defomation field and view it in the context of your > volume in a 3rd party software (e.g., Paraview), what would you see? Would > it make sense in terms of smoothness and direction? > > 2. Is the deformed volume (output of itk::ResmapleImageFilter) different > compared to the input volume? In other words, is the resampler doing > anything? > > 3. If you invert the deformation field, would your deformed volume be the > output that you expect? You can do this by swapping source and target > landmarks. > > Siavash > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-Generating-a-warping-field-with-ThinPlateSplineKernelTransform-tp35971p35972.html > Sent from the ITK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 2 > Date: Tue, 4 Aug 2015 14:53:46 -0700 (MST) > From: Siavash Khallaghi > To: insight-users at itk.org > Subject: Re: [ITK-users] 3D/2D registration with > itkRayCastInterpolateImageFunction > Message-ID: <1438725226436-35973.post at n7.nabble.com> > Content-Type: text/plain; charset=us-ascii > > Is the metric decreasing? (i.e. similarity value) It could be that everything > is correct, it is just that you have an ill-posed problem. If the metric is > decreasing, it could be that you are converging to a local minimum. > > Siavash > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-3D-2D-registration-with-itkRayCastInterpolateImageFunction-tp35970p35973.html > Sent from the ITK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 3 > Date: Tue, 4 Aug 2015 22:38:37 +0000 > From: Andras Lasso > To: Siavash Khallaghi , "insight-users at itk.org" > > Subject: Re: [ITK-users] [ITK] Generating a warping field with > ThinPlateSplineKernelTransform > Message-ID: > > > Content-Type: text/plain; charset="us-ascii" > > You can also load non-linear transforms into 3D Slicer for > interactive visualization, application to your images, comparing > fixed/moving/registered images, etc. You can also invert, compose, > decompose transforms, apply it to marked points, segmented surfaces, > etc. > > See some examples here: > http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Transforms > > Paraview is very good but not for analyzing transforms: it can only > load exported displacement fields (but for that you would need to be > sure that your region of interest is correct and you lose > information when you sample the field), it only supports > axis-aligned images, and dense vector field visualization has been > broken in recent versions (I haven't checked the latest version). > > Andras > > -----Original Message----- > From: Community [mailto:community-bounces at itk.org] On Behalf Of > Siavash Khallaghi > Sent: Tuesday, August 4, 2015 5:13 PM > To: insight-users at itk.org > Subject: Re: [ITK] [ITK-users] Generating a warping field with > ThinPlateSplineKernelTransform > > Having your exact code (on the small chance that it differs from the > example), your data, and the argument list would help in debugging > your problem. But in the mean time, you can try the following to see > where the problem lies: > > 1. If you write out the defomation field and view it in the context > of your volume in a 3rd party software (e.g., Paraview), what would > you see? Would it make sense in terms of smoothness and direction? > > 2. Is the deformed volume (output of itk::ResmapleImageFilter) > different compared to the input volume? In other words, is the > resampler doing anything? > > 3. If you invert the deformation field, would your deformed volume > be the output that you expect? You can do this by swapping source > and target landmarks. > > Siavash > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-Generating-a-warping-field-with-ThinPlateSplineKernelTransform-tp35971p35972.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Insight-users mailing list > Insight-users at itk.org > http://public.kitware.com/mailman/listinfo/insight-users > > > ------------------------------ > > End of Insight-users Digest, Vol 136, Issue 2 > ********************************************* From lasso at queensu.ca Thu Aug 6 13:33:09 2015 From: lasso at queensu.ca (Andras Lasso) Date: Thu, 6 Aug 2015 17:33:09 +0000 Subject: [ITK-users] [ITK] Generating a warping field with ThinPlateSplineKernelTransform In-Reply-To: <20150806155332.Horde.prSADUXzWlTSvqlZxJd62Rs@www.imp.polymtl.ca> References: <20150806155332.Horde.prSADUXzWlTSvqlZxJd62Rs@www.imp.polymtl.ca> Message-ID: Have you tested if the registration works well with those landmarks? I would suggest to first experiment with the registration in an interactive environment where you can see the registration result in real-time as you define/move landmarks (for example, http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/LandmarkRegistration). After you've figured out how many landmarks, at what distance, what configuration are needed for a good-quality alignment you can dive into coding your own implementation. Andras -----Original Message----- From: Community [mailto:community-bounces at itk.org] On Behalf Of Olivier Comtois Sent: Thursday, August 06, 2015 11:54 AM To: insight-users at itk.org Subject: Re: [ITK] [ITK-users] Generating a warping field with ThinPlateSplineKernelTransform Thank you for your reply Siavash, Here is my code : It differs from the example in that I take my landmark points from 2 files (one for the source landmarks and another for the target). The source landmarks come from the segmentation of a curved spinal cord while the straight ones come from a template (which is straightened). std::vector ReadLabelValueFromFile(std::string filename) { std::ifstream file(filename.c_str()); string line; char* token; std::vector result; std::vector::iterator it; it = result.begin(); if (file.is_open()) { while (file.good()) { getline(file, line); char * charLine = new char[line.length() + 1]; strcpy(charLine, line.c_str()); token = std::strtok(charLine, ","); while (token != NULL) { result.push_back(std::atof(token)); token = strtok(NULL, ","); } delete[] charLine; } file.close(); } else { throw std::runtime_error(std::string("Cannot open file : ") + filename); } return result; } void GetRealValuePointSetFromFile(itk::ThinPlateSplineKernelTransform< double, 3>::PointSetType::Pointer &source, itk::ThinPlateSplineKernelTransform< double, 3>::PointSetType::Pointer &destination, string curvedFilename, string straightFilename) { //define variables needed for this function string line; string token; std::vector straightValues; std::vector curvedValues; //fetching coordinates from files try { straightValues = ReadLabelValueFromFile(straightFilename); curvedValues = ReadLabelValueFromFile(curvedFilename); //check if not empty if (curvedValues.size() == 0) { throw std::runtime_error( "No value found in the curved labels text file."); } if (straightValues.size() == 0) { throw std::runtime_error( "No value found in straight the labels text file."); } if ((straightValues.size() % 3) != 0) { throw std::runtime_error( "The straight file size must be divisible by 3 (since there is 3 dimensions to the image)"); } if ((curvedValues.size() % 3) != 0) { throw std::runtime_error( "The curved file size must be divisible by 3 (since there is 3 dimensions to the image)"); } if (straightValues.size() != curvedValues.size()) { throw std::runtime_error( "Curved and Straight files do not have the same size."); } } catch (const std::exception &e) { throw; } //Produce the Straight points typedef double Realtype; typedef itk::ThinPlateSplineKernelTransform< double, ImageDimension> TransformType; typedef TransformType::PointSetType PointSetType; std::vector::iterator itS = straightValues.begin(); std::vector::iterator itC = curvedValues.begin(); typedef PointSetType::PointIdentifier PointIdType; PointIdType id = itk::NumericTraits< PointIdType >::ZeroValue(); while (itS != straightValues.end()) { typedef itk::Point PointType; PointType pS; PointType pC; for (int i = 0; i < 3; i++) { pS[i] = *itS; pC[i] = *itC; itS++; itC++; } //Place points in the point sets source->SetPoint(id, pC); source->SetPointData(id, id); destination->SetPoint(id, pS); destination->SetPointData(id, id); id++; } printf("RETURNING POINT VALUES"); return; } int LandmarkBasedWithTextDisplacementFieldTransformInitializer(int argc, char *argv[]) { //////////////////////////////////////////////////////////////////////////////////////////// /*CREATING USEFUL TYPES*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nCREATING USEFUL TYPES\n"); typedef double RealType; typedef unsigned int LabelType; typedef itk::Image LabelImageType; typedef itk::Image RealImageType; typedef itk::Vector VectorType; typedef itk::Vector< double, ImageDimension > FieldVectorType; typedef itk::ResampleImageFilter ResamplerType; typedef itk::LinearInterpolateImageFunction InterpolatorType; typedef itk::ImageFileWriter< LabelImageType > DeformedImageWriterType; typedef itk::Image< FieldVectorType, ImageDimension > DisplacementFieldType; typedef itk::ImageFileWriter< DisplacementFieldType > FieldWriterType; typedef itk::ThinPlateSplineKernelTransform< RealType, ImageDimension> TransformType; typedef itk::ImageFileReader ImageReaderType; typedef TransformType::PointSetType PointSetType; typedef PointSetType::PointIdentifier PointIdType; //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*LOADING FIXED IMAGE*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nLOADING DESTINATION IMAGE\n"); ImageReaderType::Pointer destinationReader = ImageReaderType::New(); destinationReader->SetFileName(argv[2]); destinationReader->Update(); LabelImageType::Pointer destinationImage = destinationReader->GetOutput(); //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*LOADING MOVING IMAGE*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nLOADING SOURCE IMAGE\n"); ImageReaderType::Pointer sourceReader = ImageReaderType::New(); sourceReader->SetFileName(argv[1]); sourceReader->Update(); LabelImageType::Pointer sourceImage = sourceReader->GetOutput(); //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*INIT IMAGE CONTAINERS*/ //////////////////////////////////////////////////////////////////////////////////////////// typedef itk::PointSet RealPointSetType; PointSetType::Pointer destinationPts = PointSetType::New(); PointSetType::Pointer sourcePts = PointSetType::New(); RegistrationType::Pointer registration = RegistrationType::New(); destinationPts->Initialize(); sourcePts->Initialize(); //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*IMPORTING LANDMARKS FROM TEXT FILES*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nIMPORTING LANDMARKS FROM TEXT FILES\n"); if (string(argv[3]).compare("") != 0) { if (string(argv[4]).compare("") != 0) { try { string sourceFilename = argv[3]; string destinationFilename = argv[4]; GetRealValuePointSetFromFile(sourcePts, destinationPts, sourceFilename, destinationFilename); } catch (exception &e) { throw; } } else throw std::runtime_error( "Both arguments the straight and curved file must be specified"); } else throw std::runtime_error( "A file must be specified in order to take input real labels."); //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*DEFINING KERNEL TRANSFORM*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nDEFINING KERNEL TRANSFORM\n"); TransformType::Pointer tps = TransformType::New(); tps->SetSourceLandmarks(sourcePts); tps->SetTargetLandmarks(destinationPts); tps->ComputeWMatrix(); //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*DEFINING RESAMPLER TO EXECUTE TRANSFORM*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nDEFINING RESAMPLER\n"); LabelImageType::ConstPointer inputImage = sourceReader->GetOutput(); LabelImageType::SpacingType spacing = destinationImage->GetSpacing(); LabelImageType::PointType origin = destinationImage->GetOrigin(); LabelImageType::DirectionType direction = destinationImage->GetDirection(); LabelImageType::RegionType region = destinationImage->GetLargestPossibleRegion(); LabelImageType::SizeType size = region.GetSize(); cout << spacing < 6) { ResamplerType::Pointer resampler = ResamplerType::New(); InterpolatorType::Pointer interpolator = InterpolatorType::New(); resampler->SetInterpolator( interpolator ); resampler->SetOutputSpacing( spacing ); resampler->SetOutputDirection( direction ); resampler->SetOutputOrigin( origin ); resampler->SetSize( size ); resampler->SetTransform( tps ); resampler->SetOutputStartIndex( region.GetIndex() ); resampler->SetInput( sourceReader->GetOutput() ); //////////////////////////////////////////////////////////////////////////////////////////// DeformedImageWriterType::Pointer deformedImageWriter = DeformedImageWriterType::New(); deformedImageWriter->SetInput( resampler->GetOutput() ); deformedImageWriter->SetFileName( argv[6] ); try { deformedImageWriter->Update(); } catch( itk::ExceptionObject & excp ) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } } //////////////////////////////////////////////////////////////////////////////////////////// /*DEFINING FIELD*/ //////////////////////////////////////////////////////////////////////////////////////////// printf("\nDEFINING FIELD\n"); DisplacementFieldType::Pointer field = DisplacementFieldType::New(); field->SetRegions( region ); field->SetOrigin( origin ); field->SetDirection( direction ); field->SetSpacing( spacing ); field->Allocate(); cout << field->GetLargestPossibleRegion() <GetOrigin() <GetDirection() <GetSpacing() <GetLargestPossibleRegion().GetSize() < FieldIterator; FieldIterator fi( field, region ); fi.GoToBegin(); TransformType::InputPointType point1; TransformType::OutputPointType point2; DisplacementFieldType::IndexType index; FieldVectorType displacement; int fieldCount while( ! fi.IsAtEnd() ) { index = fi.GetIndex(); field->TransformIndexToPhysicalPoint( index, point1 ); point2 = tps->TransformPoint( point1 ); for ( int i = 0;i < ImageDimension;i++) { displacement[i] = point2[i] - point1[i]; } fi.Set( displacement ); ++fi; } //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// /*GENERATING FIELD FILE*/ //////////////////////////////////////////////////////////////////////////////////////////// //Write computed deformation field printf("\nGENERATING FIELD FILE\n"); FieldWriterType::Pointer fieldWriter = FieldWriterType::New(); fieldWriter->SetFileName( argv[5] ); fieldWriter->SetInput( field ); try { fieldWriter->Update(); } catch( itk::ExceptionObject & excp ) { std::cerr << "Exception thrown " << std::endl; std::cerr << excp << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; //////////////////////////////////////////////////////////////////////////////////////////// } insight-users-request at itk.org a ?crit?: > Send Insight-users mailing list submissions to > insight-users at itk.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://public.kitware.com/mailman/listinfo/insight-users > or, via email, send a message with subject or body 'help' to > insight-users-request at itk.org > > You can reach the person managing the list at > insight-users-owner at itk.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Insight-users digest..." > > > Today's Topics: > > 1. Re: Generating a warping field with > ThinPlateSplineKernelTransform (Siavash Khallaghi) > 2. Re: 3D/2D registration with > itkRayCastInterpolateImageFunction (Siavash Khallaghi) > 3. Re: [ITK] Generating a warping field with > ThinPlateSplineKernelTransform (Andras Lasso) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 4 Aug 2015 14:13:16 -0700 (MST) > From: Siavash Khallaghi > To: insight-users at itk.org > Subject: Re: [ITK-users] Generating a warping field with > ThinPlateSplineKernelTransform > Message-ID: <1438722796207-35972.post at n7.nabble.com> > Content-Type: text/plain; charset=us-ascii > > Having your exact code (on the small chance that it differs from the > example), your data, and the argument list would help in debugging > your problem. But in the mean time, you can try the following to see > where the problem lies: > > 1. If you write out the defomation field and view it in the context of > your volume in a 3rd party software (e.g., Paraview), what would you > see? Would it make sense in terms of smoothness and direction? > > 2. Is the deformed volume (output of itk::ResmapleImageFilter) > different compared to the input volume? In other words, is the > resampler doing anything? > > 3. If you invert the deformation field, would your deformed volume be > the output that you expect? You can do this by swapping source and > target landmarks. > > Siavash > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-Generating-a-warping-field- > with-ThinPlateSplineKernelTransform-tp35971p35972.html > Sent from the ITK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 2 > Date: Tue, 4 Aug 2015 14:53:46 -0700 (MST) > From: Siavash Khallaghi > To: insight-users at itk.org > Subject: Re: [ITK-users] 3D/2D registration with > itkRayCastInterpolateImageFunction > Message-ID: <1438725226436-35973.post at n7.nabble.com> > Content-Type: text/plain; charset=us-ascii > > Is the metric decreasing? (i.e. similarity value) It could be that > everything is correct, it is just that you have an ill-posed problem. > If the metric is decreasing, it could be that you are converging to a local minimum. > > Siavash > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-3D-2D-registration-with-itk > RayCastInterpolateImageFunction-tp35970p35973.html > Sent from the ITK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 3 > Date: Tue, 4 Aug 2015 22:38:37 +0000 > From: Andras Lasso > To: Siavash Khallaghi , "insight-users at itk.org" > > Subject: Re: [ITK-users] [ITK] Generating a warping field with > ThinPlateSplineKernelTransform > Message-ID: > > d.outlook.com> > > Content-Type: text/plain; charset="us-ascii" > > You can also load non-linear transforms into 3D Slicer for interactive > visualization, application to your images, comparing > fixed/moving/registered images, etc. You can also invert, compose, > decompose transforms, apply it to marked points, segmented surfaces, > etc. > > See some examples here: > http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modul > es/Transforms > > Paraview is very good but not for analyzing transforms: it can only > load exported displacement fields (but for that you would need to be > sure that your region of interest is correct and you lose information > when you sample the field), it only supports axis-aligned images, and > dense vector field visualization has been broken in recent versions (I > haven't checked the latest version). > > Andras > > -----Original Message----- > From: Community [mailto:community-bounces at itk.org] On Behalf Of > Siavash Khallaghi > Sent: Tuesday, August 4, 2015 5:13 PM > To: insight-users at itk.org > Subject: Re: [ITK] [ITK-users] Generating a warping field with > ThinPlateSplineKernelTransform > > Having your exact code (on the small chance that it differs from the > example), your data, and the argument list would help in debugging > your problem. But in the mean time, you can try the following to see > where the problem lies: > > 1. If you write out the defomation field and view it in the context of > your volume in a 3rd party software (e.g., Paraview), what would you > see? Would it make sense in terms of smoothness and direction? > > 2. Is the deformed volume (output of itk::ResmapleImageFilter) > different compared to the input volume? In other words, is the > resampler doing anything? > > 3. If you invert the deformation field, would your deformed volume be > the output that you expect? You can do this by swapping source and > target landmarks. > > Siavash > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-Generating-a-warping-field- > with-ThinPlateSplineKernelTransform-tp35971p35972.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Insight-users mailing list > Insight-users at itk.org > http://public.kitware.com/mailman/listinfo/insight-users > > > ------------------------------ > > End of Insight-users Digest, Vol 136, Issue 2 > ********************************************* _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From siavashk at ece.ubc.ca Thu Aug 6 14:07:59 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Thu, 6 Aug 2015 11:07:59 -0700 (MST) Subject: [ITK-users] [ITK] Generating a warping field with ThinPlateSplineKernelTransform In-Reply-To: References: <20150803213013.Horde.k-Tn9jq9s3NiK8P8YzGdJrX@www.imp.polymtl.ca> <20150806155332.Horde.prSADUXzWlTSvqlZxJd62Rs@www.imp.polymtl.ca> Message-ID: <1438884479871-7587651.post@n2.nabble.com> Olivier, I did not see anything that was obviously wrong in your code when I was reading through it. I also agree with Andras on this. It could be that your code is correct, but your parameters e.g. number of landmarks) are not suitable for generating a quality deformation field. Might I also suggest that you look into the corresponding Slicer module (http://slicer-users.65878.n3.nabble.com/Thin-plate-spline-transform-support-added-td4028422.html) and see if it is suitable for your purposes? Siavash -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-Generating-a-warping-field-with-ThinPlateSplineKernelTransform-tp7587642p7587651.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From bakkari.abdelkhalek at hotmail.fr Mon Aug 10 08:39:00 2015 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Mon, 10 Aug 2015 13:39:00 +0100 Subject: [ITK-users] =?cp1256?q?Adding_button_for_ITK_snap=FE?= Message-ID: Hi!I am trying to add button for ITK Snap containing an ITK code source for the action of each button.Could any one help me; please.Thank you in advance. Abdelkhalek BakkariPh.D candidate in Computer Science -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Mon Aug 10 09:19:15 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 10 Aug 2015 09:19:15 -0400 Subject: [ITK-users] =?utf-8?q?Adding_button_for_ITK_snap=E2=80=8F?= In-Reply-To: References: Message-ID: Hi, ITK-SNAP is now based off Qt for its GUI widgets. For more information, see the Qt docs. Also, specific messages on the ITK-SNAP mailing lists: http://www.itksnap.org/pmwiki/pmwiki.php?n=Main.HomePage may generate the best support. HTH, Matt On Mon, Aug 10, 2015 at 8:39 AM, Abdelkhalek Bakkari < bakkari.abdelkhalek at hotmail.fr> wrote: > > Hi! > > I am trying to add button for ITK Snap containing an ITK code source for > the action of each button. > Could any one help me; please. > Thank you in advance. > > Abdelkhalek Bakkari > Ph.D candidate in Computer Science > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fisidoro at ethz.ch Mon Aug 10 10:32:24 2015 From: fisidoro at ethz.ch (D'Isidoro Fabio) Date: Mon, 10 Aug 2015 14:32:24 +0000 Subject: [ITK-users] general info ICP implementation Message-ID: <50B858FB5F53124F9E32314E5C1B40943511F43B@MBX214.d.ethz.ch> I am trying to figure out how ICP is implemented in ITK. The general approach consists in iterating two steps: first compute the correspondences and then find the best transform with the current correspondences by using a close formula. However in the ITK implementation I can't see this approach, plus LevenbergMarquardt alrgorithm is used instead of close formula to determine the transform. I know a special version of LevenbergMarquardt-ICP algorithm has been proposed in the following paper, however I can't see how the ITK implementation follows this proposed method (the ITK implementation seems to me very generic like any other optimization problem). Where should I look for? Paper: "Robust registration of 2D and 3D point sets" Fitzgibbon 2003. Thank you very much. Fabio -------------- next part -------------- An HTML attachment was scrubbed... URL: From kolin9105 at gmail.com Tue Aug 11 11:30:13 2015 From: kolin9105 at gmail.com (meikolin saimara) Date: Tue, 11 Aug 2015 22:30:13 +0700 Subject: [ITK-users] (no subject) Message-ID: hi every one I need your help how to show a number of pixel from image threshold ?? -------------- next part -------------- An HTML attachment was scrubbed... URL: From christophe.vandijck at kuleuven.be Wed Aug 12 09:27:34 2015 From: christophe.vandijck at kuleuven.be (christophevd) Date: Wed, 12 Aug 2015 06:27:34 -0700 (MST) Subject: [ITK-users] Multi-threading in pointsettopointsetmetric Message-ID: <1439386054435-35985.post@n7.nabble.com> Hi all, To my knowledge, there is no multi-thread support for pointsettopointsetmetric classes such as the euclideandistancepointmetric. Will this become available in upcoming releases? Regards, Christophe -- View this message in context: http://itk-users.7.n7.nabble.com/Multi-threading-in-pointsettopointsetmetric-tp35985.html Sent from the ITK - Users mailing list archive at Nabble.com. From ntustison at gmail.com Wed Aug 12 10:35:52 2015 From: ntustison at gmail.com (Nicholas Tustison) Date: Wed, 12 Aug 2015 07:35:52 -0700 Subject: [ITK-users] Multi-threading in pointsettopointsetmetric In-Reply-To: <1439386054435-35985.post@n7.nabble.com> References: <1439386054435-35985.post@n7.nabble.com> Message-ID: <38C7F2DA-EBE7-4A10-9C0F-5F0F5E75450F@gmail.com> Have you looked at the v4 versions? e.g., http://www.itk.org/Doxygen/html/classitk_1_1PointSetToPointSetMetricv4.html > On Aug 12, 2015, at 6:27 AM, christophevd wrote: > > Hi all, > > To my knowledge, there is no multi-thread support for > pointsettopointsetmetric classes such as the euclideandistancepointmetric. > > Will this become available in upcoming releases? > > Regards, > > Christophe > > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/Multi-threading-in-pointsettopointsetmetric-tp35985.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From Christophe.VanDijck at kuleuven.be Wed Aug 12 10:42:57 2015 From: Christophe.VanDijck at kuleuven.be (Christophe Van Dijck) Date: Wed, 12 Aug 2015 16:42:57 +0200 Subject: [ITK-users] Multi-threading in pointsettopointsetmetric In-Reply-To: <38C7F2DA-EBE7-4A10-9C0F-5F0F5E75450F@gmail.com> References: <1439386054435-35985.post@n7.nabble.com> <38C7F2DA-EBE7-4A10-9C0F-5F0F5E75450F@gmail.com> Message-ID: <001101d0d50d$2e317a30$8a946e90$@kuleuven.be> Hi Nicholas, Thanks for the quick reply. I did had a look at them. The thing is that I want to use those metrics in the pointsettopointsetregistrationmethod. Correct me if I'm wrong, but this registration method assumes the old pointsettopointsetmetrics and a multivalued optimizer. A v4 version of this registration method is maybe still in development, I don't know... Regards, Christione -----Original Message----- From: Nicholas Tustison [mailto:ntustison at gmail.com] Sent: woensdag 12 augustus 2015 16:36 To: christophevd Cc: insight-users at itk.org Subject: Re: [ITK-users] Multi-threading in pointsettopointsetmetric Have you looked at the v4 versions? e.g., http://www.itk.org/Doxygen/html/classitk_1_1PointSetToPointSetMetricv4.html > On Aug 12, 2015, at 6:27 AM, christophevd wrote: > > Hi all, > > To my knowledge, there is no multi-thread support for > pointsettopointsetmetric classes such as the euclideandistancepointmetric. > > Will this become available in upcoming releases? > > Regards, > > Christophe > > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/Multi-threading-in-pointsettopointset > metric-tp35985.html Sent from the ITK - Users mailing list archive at > Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From ntustison at gmail.com Wed Aug 12 12:01:57 2015 From: ntustison at gmail.com (Nicholas Tustison) Date: Wed, 12 Aug 2015 09:01:57 -0700 Subject: [ITK-users] Multi-threading in pointsettopointsetmetric In-Reply-To: <001101d0d50d$2e317a30$8a946e90$@kuleuven.be> References: <1439386054435-35985.post@n7.nabble.com> <38C7F2DA-EBE7-4A10-9C0F-5F0F5E75450F@gmail.com> <001101d0d50d$2e317a30$8a946e90$@kuleuven.be> Message-ID: <9103909A-6192-4F07-8C35-DB2354408742@gmail.com> There isn?t a point-set only registration method for the v4 classes. However, the ImageRegistrationMethodv4 class http://www.itk.org/Doxygen/html/classitk_1_1ImageRegistrationMethodv4.html will accommodate 1) images only, 2) point sets only, or 3) images and point sets. Nick > On Aug 12, 2015, at 7:42 AM, Christophe Van Dijck wrote: > > Hi Nicholas, > > Thanks for the quick reply. I did had a look at them. The thing is that I > want to use those metrics in the pointsettopointsetregistrationmethod. > Correct me if I'm wrong, but this registration method assumes the old > pointsettopointsetmetrics and a multivalued optimizer. A v4 version of this > registration method is maybe still in development, I don't know... > > Regards, > Christione > > -----Original Message----- > From: Nicholas Tustison [mailto:ntustison at gmail.com] > Sent: woensdag 12 augustus 2015 16:36 > To: christophevd > Cc: insight-users at itk.org > Subject: Re: [ITK-users] Multi-threading in pointsettopointsetmetric > > Have you looked at the v4 versions? e.g., > > http://www.itk.org/Doxygen/html/classitk_1_1PointSetToPointSetMetricv4.html > >> On Aug 12, 2015, at 6:27 AM, christophevd > wrote: >> >> Hi all, >> >> To my knowledge, there is no multi-thread support for >> pointsettopointsetmetric classes such as the euclideandistancepointmetric. >> >> Will this become available in upcoming releases? >> >> Regards, >> >> Christophe >> >> >> >> >> -- >> View this message in context: >> http://itk-users.7.n7.nabble.com/Multi-threading-in-pointsettopointset >> metric-tp35985.html Sent from the ITK - Users mailing list archive at >> Nabble.com. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Wed Aug 12 17:36:24 2015 From: fotosentido at gmail.com (Marcos) Date: Wed, 12 Aug 2015 23:36:24 +0200 Subject: [ITK-users] Unresolved external symbol Message-ID: Hi, I compiled and installed successfully ITK 4.8 and VTK, with Visual Studio 2013 and Qt5. Now I'm trying to compile a simple Hello World (with the ITK headers and include dirs in the .pro file in Qt Creator) and I'm getting: itkgdcmMSFF-4.8.lib(gdcmJPEGLSCodec.obj):-1: error: LNK2019: unresolved external symbol _JpegLsEncode referenced in function "private: bool __thiscall gdcm::JPEGLSCodec::CodeFrameIntoBuffer(char *,unsigned int,unsigned int &,char const *,unsigned int)" (?CodeFrameIntoBuffer at JPEGLSCodec@gdcm@@AAE_NPADIAAIPBDI at Z) and similar errores relating all of them itkgdcmMSFF-4.8.lib. Sometimes it specifies gdcmJPEGLSCodec.obj, sometimes gdcmJPEG2000Codec.obj. I didn't check Module_ITKOpenJPEG in Cmake configure, but everything was fine with compilation and installing. If I omit adding itkgdcmMSFF-4.8.lib, it shows the same errors with ITKIOGDCM-4.8.lib I don't understand why is so hard to start using this library. I spend more time configuring than developing. Any ideas? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Aug 12 17:39:16 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 12 Aug 2015 17:39:16 -0400 Subject: [ITK-users] Unresolved external symbol In-Reply-To: References: Message-ID: Hello, It is recommended to use CMake CMakeLists.txt instead of Qt .pro files to build your project. You will have much less difficulty. Note that QtCreator also supports CMake, and CMake has very good support for working with Qt. HTH, Matt On Wed, Aug 12, 2015 at 5:36 PM, Marcos wrote: > Hi, > > I compiled and installed successfully ITK 4.8 and VTK, with Visual Studio > 2013 and Qt5. > > Now I'm trying to compile a simple Hello World (with the ITK headers and > include dirs in the .pro file in Qt Creator) and I'm getting: > > itkgdcmMSFF-4.8.lib(gdcmJPEGLSCodec.obj):-1: error: LNK2019: unresolved > external symbol _JpegLsEncode referenced in function "private: bool > __thiscall gdcm::JPEGLSCodec::CodeFrameIntoBuffer(char *,unsigned > int,unsigned int &,char const *,unsigned int)" > (?CodeFrameIntoBuffer at JPEGLSCodec@gdcm@@AAE_NPADIAAIPBDI at Z) > > and similar errores relating all of them itkgdcmMSFF-4.8.lib. > > Sometimes it specifies gdcmJPEGLSCodec.obj, sometimes gdcmJPEG2000Codec.obj. > > I didn't check Module_ITKOpenJPEG in Cmake configure, but everything was > fine with compilation and installing. > > If I omit adding itkgdcmMSFF-4.8.lib, it shows the same errors with > ITKIOGDCM-4.8.lib > > I don't understand why is so hard to start using this library. I spend more > time configuring than developing. > > Any ideas? > > 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 siavashk at ece.ubc.ca Wed Aug 12 17:10:31 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Wed, 12 Aug 2015 14:10:31 -0700 (MST) Subject: [ITK-users] Unresolved external symbol In-Reply-To: References: Message-ID: <1439413831608-35991.post@n7.nabble.com> Hi Marcos, Could you please provide us with your CMakeLists.txt file? It could be that you forgot to add TARGET_LINK_LIBRARIES(ProjectName ${ITK_LIBRARIES}) to your CMakeLists.txt. Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Unresolved-external-symbol-tp35989p35991.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Wed Aug 12 18:18:09 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 12 Aug 2015 18:18:09 -0400 Subject: [ITK-users] Unresolved external symbol In-Reply-To: References: Message-ID: Hi Marcos, CMake also has a Visual Studio generator. Use CMake to generate the Visual Studio project file. A good place to start is the Configuring and Building ITK section of The ITK Software Guide [1]. Hope this helps, Matt [1] http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1.html On Wed, Aug 12, 2015 at 5:47 PM, Marcos wrote: > Thank you for your answer, I just couln't find a clear and direct tutorial > for getting started an ITK/VTK project with a CMakeLists.txt example. A lot > of generic Cmake tutorials or installing guides (I did that already). I > looked into ITK wiki too. > > Any practical example to just start? > > With Qt5, the configuration for this file has changed, so some Qt4 examples > are confusing. > > I'm spending too much before starting coding, it's . > And I'm going to need debugging. I was trying to code in Visual Studio > (thanks to the Qt plugin), but with that error I can't even start in Qt > Creator. > > Thank you. > > 2015-08-12 23:39 GMT+02:00 Matt McCormick : >> >> Hello, >> >> It is recommended to use CMake CMakeLists.txt instead of Qt .pro files >> to build your project. You will have much less difficulty. Note that >> QtCreator also supports CMake, and CMake has very good support for >> working with Qt. >> >> HTH, >> Matt >> >> On Wed, Aug 12, 2015 at 5:36 PM, Marcos wrote: >> > Hi, >> > >> > I compiled and installed successfully ITK 4.8 and VTK, with Visual >> > Studio >> > 2013 and Qt5. >> > >> > Now I'm trying to compile a simple Hello World (with the ITK headers and >> > include dirs in the .pro file in Qt Creator) and I'm getting: >> > >> > itkgdcmMSFF-4.8.lib(gdcmJPEGLSCodec.obj):-1: error: LNK2019: unresolved >> > external symbol _JpegLsEncode referenced in function "private: bool >> > __thiscall gdcm::JPEGLSCodec::CodeFrameIntoBuffer(char *,unsigned >> > int,unsigned int &,char const *,unsigned int)" >> > (?CodeFrameIntoBuffer at JPEGLSCodec@gdcm@@AAE_NPADIAAIPBDI at Z) >> > >> > and similar errores relating all of them itkgdcmMSFF-4.8.lib. >> > >> > Sometimes it specifies gdcmJPEGLSCodec.obj, sometimes >> > gdcmJPEG2000Codec.obj. >> > >> > I didn't check Module_ITKOpenJPEG in Cmake configure, but everything was >> > fine with compilation and installing. >> > >> > If I omit adding itkgdcmMSFF-4.8.lib, it shows the same errors with >> > ITKIOGDCM-4.8.lib >> > >> > I don't understand why is so hard to start using this library. I spend >> > more >> > time configuring than developing. >> > >> > Any ideas? >> > >> > 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 fisidoro at ethz.ch Thu Aug 13 04:06:10 2015 From: fisidoro at ethz.ch (D'Isidoro Fabio) Date: Thu, 13 Aug 2015 08:06:10 +0000 Subject: [ITK-users] IterativeClosestPoint2 example: how to get better results Message-ID: <50B858FB5F53124F9E32314E5C1B409435126779@MBX114.d.ethz.ch> I am trying to use the IterativeClosestPoint2 example on the fixed and moving point sets in attachment (called "src" and "dest" point sets). The ground truth is "properly ordered dest = Transform(src)", where: Euler angles: (0.349065850398866, 0.349065850398866, 0.349065850398866) Translations: (4.1335200571234, 5.90820985238168, 7.04748773837622) (the dest_point set in attachment is randomly reshuffled) >>> If I use srx = fixed, dest = moving, the registration results is: Euler angles: (-0.327201, -0.36953, -0.47291) Translations: (-6.28471, -2.64212, -1.50835) >>> If I use dest = fixed, src = moving, the registration results is: Euler angles: (0.44595, 0.20655, 0.36423) Translations: (6.28471, 2.64212, 1.50835) Question 1): Given that "properly ordered dest = Transform(src)", according to the guide src should be the fixed point set. Am I wrong? Question 2): I am not happy with the results, given that there is no additional noise (the underlined values refer to error angles of up to 8 degrees and 3 mm errors). I am surprised because there is no additional noise to the data, so I would expect an accurate registration. Are my results normal? How could I improve the results? Should I change the optimizer, or the transform? Please help, thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sample_src_3deuler.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sample_dest_3deuler.txt URL: From Olivier.Commowick at inria.fr Thu Aug 13 09:35:19 2015 From: Olivier.Commowick at inria.fr (Olivier Commowick) Date: Thu, 13 Aug 2015 15:35:19 +0200 Subject: [ITK-users] Symmetric eigen analysis discrepancy Message-ID: Hello all, I have been experiencing a problem when using the itk SymmetricEigenAnalysis class in ITK. When using this class, it sometimes produces NaN eigenvalues/vectors. On the contrary, the vnl_symmetric_eigensystem doesn?t seem to have a problem (and neither does matlab). Looking at the documentation, it seems both use QL decomposition but not implemented in the same place. In addition, the vnl one is said to be not thread safe, although it?s the one working for me. In fact, I have isolated one 3x3 matrix for which I always have the problem. A = [7.503107128706855667859804009212206062302e-53 1.870107888834986371214720644344813262375e-52 -8.662047753682068190087788895125120421821e-27; 1.870107888834986371214720644344813262375e-52 4.661140319458029838073740773908360767728e-52 -2.15896741973055935210319454393408888029e-26; -8.662047753682068190087788895125120421821e-27 -2.15896741973055935210319454393408888029e-26 1] It?s a weird one I know, but again vnl (and matlab) works great on it. Would there be anyone who knows the QL decomposition code enough to help me understand and possibly correct the ITK class so that it does the same as the VNL one ? Thanks a lot in advance. --- Olivier Commowick, Ph.D. Research Scientist INRIA Rennes - Bretagne Atlantique, VISAGES Team Campus de Beaulieu 35042 Rennes FRANCE Phone: +33 2 99 84 25 92 Email: Olivier.Commowick at inria.fr Web: http://olivier.commowick.org/ From davis.vigneault at gmail.com Thu Aug 13 13:55:04 2015 From: davis.vigneault at gmail.com (DVigneault) Date: Thu, 13 Aug 2015 10:55:04 -0700 (MST) Subject: [ITK-users] Do any of the mesh file formats store CellData? Message-ID: <1439488504178-7587666.post@n2.nabble.com> All-- Do any of the mesh file formats supported by ITK store CellData information? I've done a test where I've (a) created a mesh, (b) associated a value with each cell, (c) written it to file, (d) read it back in, and (e) attempted to read the associated value. I did this for each file format. When I ask for the cell's data, .vtk and .gii formats return uninitialized data, whereas .obj, .byu, .fcv, .fsa, .fsb, and .off segfault. I looked through itk::MeshFileWriter to see whether there were an option (such as WriteCellDataOn()), and there is a method WriteCellData() [1], but it is protected. Looking at the header files of some of the individual writer objects (itkVTKPolyDataMeshIO, itkOBJMeshIO, etc), it looks like the WriteCellData(void *buffer) method is abstract. [1] http://www.itk.org/Doxygen/html/classitk_1_1MeshFileWriter.html#a1819df60ed20493f64a84c1728ddf26b I've pasted below the test program, in case the problem is due to a mistake I've made there. Best, and thanks! --Davis #include "itkMesh.h" #include "itkMeshFileReader.h" #include "itkMeshFileWriter.h" #include "itkRegularSphereMeshSource.h" const unsigned int Dimension = 3; typedef float TCoordinate; typedef itk::Mesh< TCoordinate, Dimension > TMesh; typedef itk::RegularSphereMeshSource< TMesh > TSphere; typedef itk::MeshFileReader< TMesh > TMeshReader; typedef itk::MeshFileWriter< TMesh > TMeshWriter; int main( int argc, char* argv[] ) { auto sphere = TSphere::New(); sphere->Update(); auto mesh = sphere->GetOutput(); double value = 10; for (unsigned int i = 0; i < mesh->GetNumberOfCells(); ++i) mesh->SetCellData( i, value); std::cout << mesh->GetCellData()->ElementAt(0) << std::endl; // 10 auto meshWriter = TMeshWriter::New(); meshWriter->SetFileName( argv[1] ); meshWriter->SetInput( mesh ); meshWriter->Update(); auto reader = TMeshReader::New(); reader->SetFileName( argv[1] ); reader->ReadPointData(); reader->Update(); float value2; auto mesh2 = reader->GetOutput(); mesh2->SetCellData(0, value2); mesh2->GetCellData()->ElementAt(0); std::cout << value2 << std::endl; // Segfault or uninitialized return EXIT_SUCCESS; } -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Do-any-of-the-mesh-file-formats-store-CellData-tp7587666.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Thu Aug 13 16:59:17 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 13 Aug 2015 16:59:17 -0400 Subject: [ITK-users] Symmetric eigen analysis discrepancy In-Reply-To: References: Message-ID: Hi Olivier, Those are some pretty small numbers ;-). Thanks for sharing your experiences. It may be necessary to build both ITK and vnl/netlib instances with debugging symbols and walk through them in a debugger to see where the deviation occurs. As always, patches are welcome :-) Thanks, Matt On Thu, Aug 13, 2015 at 9:35 AM, Olivier Commowick wrote: > Hello all, > > I have been experiencing a problem when using the itk SymmetricEigenAnalysis class in ITK. When using this class, it sometimes produces NaN eigenvalues/vectors. On the contrary, the vnl_symmetric_eigensystem doesn?t seem to have a problem (and neither does matlab). Looking at the documentation, it seems both use QL decomposition but not implemented in the same place. In addition, the vnl one is said to be not thread safe, although it?s the one working for me. > > In fact, I have isolated one 3x3 matrix for which I always have the problem. > > A = > [7.503107128706855667859804009212206062302e-53 1.870107888834986371214720644344813262375e-52 -8.662047753682068190087788895125120421821e-27; > 1.870107888834986371214720644344813262375e-52 4.661140319458029838073740773908360767728e-52 -2.15896741973055935210319454393408888029e-26; > -8.662047753682068190087788895125120421821e-27 -2.15896741973055935210319454393408888029e-26 1] > > It?s a weird one I know, but again vnl (and matlab) works great on it. Would there be anyone who knows the QL decomposition code enough to help me understand and possibly correct the ITK class so that it does the same as the VNL one ? > > Thanks a lot in advance. > > --- > > Olivier Commowick, Ph.D. > Research Scientist > INRIA Rennes - Bretagne Atlantique, VISAGES Team > Campus de Beaulieu > 35042 Rennes > FRANCE > > Phone: +33 2 99 84 25 92 > Email: Olivier.Commowick at inria.fr > Web: http://olivier.commowick.org/ > > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Aug 13 18:08:38 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 13 Aug 2015 18:08:38 -0400 Subject: [ITK-users] IterativeClosestPoint2 example: how to get better results In-Reply-To: <50B858FB5F53124F9E32314E5C1B409435126779@MBX114.d.ethz.ch> References: <50B858FB5F53124F9E32314E5C1B409435126779@MBX114.d.ethz.ch> Message-ID: Hello, On Thu, Aug 13, 2015 at 4:06 AM, D'Isidoro Fabio wrote: > I am trying to use the IterativeClosestPoint2 example on the fixed and > moving point sets in attachment (called ?src? and ?dest? point sets). > > > > The ground truth is ?properly ordered dest = Transform(src)?, where: > > > > Euler angles: (0.349065850398866, 0.349065850398866, 0.349065850398866) > > Translations: (4.1335200571234, 5.90820985238168, 7.04748773837622) > > > > (the dest_point set in attachment is randomly reshuffled) > > > >>>> If I use srx = fixed, dest = moving, the registration results is: > > > > Euler angles: (-0.327201, -0.36953, -0.47291) > > Translations: (-6.28471, -2.64212, -1.50835) > > > >>>> If I use dest = fixed, src = moving, the registration results is: > > > > Euler angles: (0.44595, 0.20655, 0.36423) > > Translations: (6.28471, 2.64212, 1.50835) > > > > > > > > Question 1): > > > > Given that ?properly ordered dest = Transform(src)?, according to the guide > src should be the fixed point set. Am I wrong? > This is a bit confusing because it is different from transforms with images, but the src should be the moving point set. See: http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx;h=af1b04e91ed9126777134db3dfca6ef05810fc60;hb=HEAD#l87 > Question 2): > > > > I am not happy with the results, given that there is no additional noise > (the underlined values refer to error angles of up to 8 degrees and 3 mm > errors). I am surprised because there is no additional noise to the data, so > I would expect an accurate registration. Are my results normal? How could I > improve the results? Should I change the optimizer, or the transform? Could the code be shared that generated the inputs? Thanks, Matt From siavashk at ece.ubc.ca Thu Aug 13 17:46:40 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Thu, 13 Aug 2015 14:46:40 -0700 (MST) Subject: [ITK-users] IterativeClosestPoint2 example: how to get better results In-Reply-To: References: <50B858FB5F53124F9E32314E5C1B409435126779@MBX114.d.ethz.ch> Message-ID: <1439502400763-35998.post@n7.nabble.com> ICP is notorious for its small capture range and suesceptibility to noise/local minima. This is why soft correspondence schemes to point cloud registration have been developed that generally have a larger capture range (e.g. see CPD and GMM-FEM ). It could be that the code is fine, but ICP fails to converge to the true solution. Siavash D'Isidoro Fabio wrote >> I am not happy with the results, given that there is no additional noise >> (the underlined values refer to error angles of up to 8 degrees and 3 mm >> errors). I am surprised because there is no additional noise to the data, >> so >> I would expect an accurate registration. Are my results normal? How could >> I >> improve the results? Should I change the optimizer, or the transform? -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-IterativeClosestPoint2-example-how-to-get-better-results-tp35993p35998.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Thu Aug 13 18:21:44 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 13 Aug 2015 18:21:44 -0400 Subject: [ITK-users] general info ICP implementation In-Reply-To: <50B858FB5F53124F9E32314E5C1B40943511F43B@MBX214.d.ethz.ch> References: <50B858FB5F53124F9E32314E5C1B40943511F43B@MBX214.d.ethz.ch> Message-ID: Hello, ITK uses the Levenberg-Marquardt non-linear least squares optimizer in the ICP examples. This has an advantage of the closed formula updates in that it can work with an arbitrary transform. But, a different type of ICP using closed form updates could possibly be created by utilizing the LandmarkBasedTransformInitializer class [1], which provides correspondences for a number of transforms. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1LandmarkBasedTransformInitializer.html On Mon, Aug 10, 2015 at 10:32 AM, D'Isidoro Fabio wrote: > I am trying to figure out how ICP is implemented in ITK. The general > approach consists in iterating two steps: first compute the correspondences > and then find the best transform with the current correspondences by using a > close formula. > > > > However in the ITK implementation I can?t see this approach, plus > LevenbergMarquardt alrgorithm is used instead of close formula to determine > the transform. I know a special version of LevenbergMarquardt-ICP algorithm > has been proposed in the following paper, however I can?t see how the ITK > implementation follows this proposed method (the ITK implementation seems to > me very generic like any other optimization problem). Where should I look > for? > > > > Paper: ?Robust registration of 2D and 3D point sets? Fitzgibbon 2003. > > > > Thank you very much. > > Fabio > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 eryanvtk at yahoo.com Thu Aug 13 20:00:05 2015 From: eryanvtk at yahoo.com (Emma Ryan) Date: Fri, 14 Aug 2015 00:00:05 +0000 (UTC) Subject: [ITK-users] Binary Erosion failed Message-ID: <1613398309.4524159.1439510405840.JavaMail.yahoo@mail.yahoo.com> Hi, ?I am attempting a simple erosion on a binary input image which is pretty much a white box on a black background. ?The following is my code snippet. Not sure why it fails to erode the image. Am I missing something ? typedef itk::FlatStructuringElement<2 >??? StructuralElementType; StructuralElementType::RadiusType radius; radius.Fill(7 ); StructuralElementType structural_element =?? StructuralElementType::Box( radius ); ??? ??? typedef itk::BinaryErodeImageFilter ??? BinaryErodeImageFilterType; ??? BinaryErodeImageFilterType::Pointer erodeFilter??? = BinaryErodeImageFilterType::New(); ??? erodeFilter->SetInput(my_binary_image); ??? erodeFilter->SetKernel(structural_element); ??? try ??? { ??? ??? erodeFilter->Update(); ??? } catch(...){????cout<<"Failure"; } UCharImageType::Pointer new_image = erodeFilter->GetOutput(); thanks,Emma -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Thu Aug 13 20:18:04 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 13 Aug 2015 20:18:04 -0400 Subject: [ITK-users] Binary Erosion failed In-Reply-To: <1613398309.4524159.1439510405840.JavaMail.yahoo@mail.yahoo.com> References: <1613398309.4524159.1439510405840.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hello, The problem likely relates to defining the "white" box on a "back" background in terms of a binary image. You should set the "BackgroundValue"[1] and the "ForegroundValue"[2] in the filter to you "white" pixel intensity value, and "black" pixel intensity value. Those methods a little tricky to find since they are in the parent class. Be careful to note if there are pixels of other values in the image. HTH, Brad [1] SetBackgroundValue [2] SetForegroundValue On Aug 13, 2015, at 8:00 PM, Emma Ryan via Insight-users wrote: > Hi, > > I am attempting a simple erosion on a binary input image which is pretty much a white box on a black background. > > The following is my code snippet. Not sure why it fails to erode the image. Am I missing something ? > > typedef itk::FlatStructuringElement<2 > StructuralElementType; > StructuralElementType::RadiusType radius; > radius.Fill(7 ); > StructuralElementType structural_element = StructuralElementType::Box( radius ); > > > typedef itk::BinaryErodeImageFilter BinaryErodeImageFilterType; > BinaryErodeImageFilterType::Pointer erodeFilter = BinaryErodeImageFilterType::New(); > erodeFilter->SetInput(my_binary_image); > erodeFilter->SetKernel(structural_element); > try > { > erodeFilter->Update(); > } > catch(...) > { > cout<<"Failure"; > } > > UCharImageType::Pointer new_image = erodeFilter->GetOutput(); > > thanks, > Emma > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From eryanvtk at yahoo.com Fri Aug 14 01:15:14 2015 From: eryanvtk at yahoo.com (Emma Ryan) Date: Fri, 14 Aug 2015 05:15:14 +0000 (UTC) Subject: [ITK-users] Binary Erosion failed In-Reply-To: References: Message-ID: <1769245575.4617240.1439529314307.JavaMail.yahoo@mail.yahoo.com> Hi Brad, Thanks for your reply.? Unfortunately, this does not seem to be the case.? I think by default, the foreground is considered to be the highest value in the input image. Nonetheless, I did try to set both the values, but the filter still fails to erode the image. thanks,Emma On Thursday, August 13, 2015 5:18 PM, Bradley Lowekamp wrote: Hello, The problem likely relates to defining the "white" box ?on a "back" background in terms of a binary image. You should set the "BackgroundValue"[1] and the "ForegroundValue"[2] in the filter to you "white" pixel intensity value, and "black" pixel intensity value. Those methods a little tricky to find since they are in the parent class. Be careful to note if there are pixels of other values in the image. HTH,Brad [1]?SetBackgroundValue[2]?SetForegroundValue On Aug 13, 2015, at 8:00 PM, Emma Ryan via Insight-users wrote: Hi, ?I am attempting a simple erosion on a binary input image which is pretty much a white box on a black background. ?The following is my code snippet. Not sure why it fails to erode the image. Am I missing something ? typedef itk::FlatStructuringElement<2 >??? StructuralElementType; StructuralElementType::RadiusType radius; radius.Fill(7 ); StructuralElementType structural_element =?? StructuralElementType::Box( radius ); ??? ??? typedef itk::BinaryErodeImageFilter ??? BinaryErodeImageFilterType; ??? BinaryErodeImageFilterType::Pointer erodeFilter??? = BinaryErodeImageFilterType::New(); ??? erodeFilter->SetInput(my_binary_image); ??? erodeFilter->SetKernel(structural_element); ??? try ??? { ??? ??? erodeFilter->Update(); ??? } catch(...){????cout<<"Failure"; } UCharImageType::Pointer new_image = erodeFilter->GetOutput(); thanks,Emma _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnaudgelas at gmail.com Fri Aug 14 02:54:20 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Fri, 14 Aug 2015 08:54:20 +0200 Subject: [ITK-users] Do any of the mesh file formats store CellData? In-Reply-To: <1439488504178-7587666.post@n2.nabble.com> References: <1439488504178-7587666.post@n2.nabble.com> Message-ID: Hi Davis, First of all, you do not need to call ReadPointData, especially if you want to read cell data... Anyway, even if you make the change, it is not required... Then, if you look carefully at your code, it is normal that it segfault: float value2; auto mesh2 = reader->GetOutput(); mesh2->SetCellData(0, value2); mesh2->GetCellData()->ElementAt(0); std::cout << value2 << std::endl; // Segfault or uninitialized Right after reading the file, you set the data of the cell 0 to an uninitialized value, then you get that value back but you do not store in any variable. Finally, you print the uninitialzed value... Best, Arnaud On Thu, Aug 13, 2015 at 7:55 PM, DVigneault wrote: > All-- > > Do any of the mesh file formats supported by ITK store CellData > information? > I've done a test where I've (a) created a mesh, (b) associated a value with > each cell, (c) written it to file, (d) read it back in, and (e) attempted > to > read the associated value. I did this for each file format. When I ask > for > the cell's data, .vtk and .gii formats return uninitialized data, whereas > .obj, .byu, .fcv, .fsa, .fsb, and .off segfault. > > I looked through itk::MeshFileWriter to see whether there were an option > (such as WriteCellDataOn()), and there is a method WriteCellData() [1], but > it is protected. Looking at the header files of some of the individual > writer objects (itkVTKPolyDataMeshIO, itkOBJMeshIO, etc), it looks like the > WriteCellData(void *buffer) method is abstract. > > [1] > > http://www.itk.org/Doxygen/html/classitk_1_1MeshFileWriter.html#a1819df60ed20493f64a84c1728ddf26b > > I've pasted below the test program, in case the problem is due to a mistake > I've made there. > > Best, and thanks! > > --Davis > > #include "itkMesh.h" > #include "itkMeshFileReader.h" > #include "itkMeshFileWriter.h" > #include "itkRegularSphereMeshSource.h" > > const unsigned int Dimension = 3; > typedef float TCoordinate; > > typedef itk::Mesh< TCoordinate, Dimension > TMesh; > typedef itk::RegularSphereMeshSource< TMesh > TSphere; > typedef itk::MeshFileReader< TMesh > TMeshReader; > typedef itk::MeshFileWriter< TMesh > TMeshWriter; > > int main( int argc, char* argv[] ) > { > > auto sphere = TSphere::New(); > sphere->Update(); > > auto mesh = sphere->GetOutput(); > double value = 10; > for (unsigned int i = 0; i < mesh->GetNumberOfCells(); ++i) > mesh->SetCellData( i, value); > std::cout << mesh->GetCellData()->ElementAt(0) << std::endl; // 10 > > auto meshWriter = TMeshWriter::New(); > meshWriter->SetFileName( argv[1] ); > meshWriter->SetInput( mesh ); > meshWriter->Update(); > > auto reader = TMeshReader::New(); > reader->SetFileName( argv[1] ); > reader->ReadPointData(); > reader->Update(); > > float value2; > auto mesh2 = reader->GetOutput(); > mesh2->SetCellData(0, value2); > mesh2->GetCellData()->ElementAt(0); > std::cout << value2 << std::endl; // Segfault or uninitialized > > return EXIT_SUCCESS; > > } > > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Do-any-of-the-mesh-file-formats-store-CellData-tp7587666.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From davis.vigneault at gmail.com Fri Aug 14 08:53:11 2015 From: davis.vigneault at gmail.com (DVigneault) Date: Fri, 14 Aug 2015 05:53:11 -0700 (MST) Subject: [ITK-users] Do any of the mesh file formats store CellData? In-Reply-To: References: <1439488504178-7587666.post@n2.nabble.com> Message-ID: <1439556791786-7587675.post@n2.nabble.com> Thanks very much for the help, Arnaud--sometimes I think I shouldn't be allowed to post after 5pm. :-) However, unless I'm making another silly mistake, that doesn't appear to be the only problem. If I open the mesh.vtk file, I don't see where any CellData has been written. Moreover, if I std::cout the size of CellData *before* writing to disk I get 128, whereas immediately after I get 0. I tried stepping through the itk::MeshFileWriter::Write() method in gdb (itkMeshFileWriter.hxx:80), and found that p input->GetCellData()->Size() returns 128 until nonConstInput->Update() is called (b itkMeshFileWriter.hxx:148), after which p input->GetCellData()->Size() returns 0. As a result, the condition if (input->GetCells() && input->GetNumberOfCells() ) fails, and the CellData appears not to be written. Unfortunately I built ITK in release mode so I can't step into Update() at the minute, but I'll rebuild and see if I can get more information. Thanks again Arnaud et al for your help (and your patience)! --Davis //// //// Here's what I'm seeing in GDB: //// $ gdb ./dv-mesh-test (gdb) b itkMeshFileWriter.hxx:148 (gdb) b itkMeshFileWriter.hxx:207 // Never triggered (gdb) b itkMeshFileWriter.hxx:240 // Never triggered (gdb) r (gdb) p input->GetCellData() // 0x91b3a0 (gdb) p input->GetCellData()->Size() // 128 (gdb) n (gdb) p input->GetCellData() // 0x91b3f0 (different pointer) (gdb) p input->GetCellData()->Size() // 0 (gdb) c // Exits normally, but the size of the mesh's CellData container is now 0 //// //// And here's the new test file: //// #include "itkMesh.h" #include "itkRegularSphereMeshSource.h" #include "itkMeshFileWriter.h" const unsigned int Dimension = 3; typedef float TCoordinate; typedef itk::Mesh< TCoordinate, Dimension > TMesh; typedef itk::RegularSphereMeshSource< TMesh > TSphere; typedef itk::MeshFileWriter< TMesh > TMeshWriter; int main() { auto sphere = TSphere::New(); sphere->Update(); auto mesh = sphere->GetOutput(); double value = 10; // mesh->GetCellData()->Reserve(mesh->GetNumberOfCells()); // No change // mesh->SetRequestedRegionToLargestPossibleRegion(); // No change for (unsigned int i = 0; i < mesh->GetNumberOfCells(); ++i) mesh->SetCellData( i, value); std::cout << mesh->GetNumberOfCells() << std::endl; // 128 std::cout << mesh->GetCellData() << std::endl; // 0x1be13a0 std::cout << mesh->GetCellData()->Size() << std::endl << std::endl; // 128 auto meshWriter = TMeshWriter::New(); meshWriter->SetFileName( "mesh.vtk" ); meshWriter->SetInput( mesh ); meshWriter->Update(); std::cout << mesh->GetNumberOfCells() << std::endl; // 128 std::cout << mesh->GetCellData() << std::endl; // 0x1be13a0 std::cout << mesh->GetCellData()->Size() << std::endl << std::endl; // 0 return EXIT_SUCCESS; } -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Do-any-of-the-mesh-file-formats-store-CellData-tp7587666p7587675.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From fotosentido at gmail.com Fri Aug 14 11:57:45 2015 From: fotosentido at gmail.com (Marcos) Date: Fri, 14 Aug 2015 17:57:45 +0200 Subject: [ITK-users] Brand new project with itk sentence with QtCreator, Qt5 and Cmake crashes Message-ID: Hi, I'm just trying to make a Cmake project compile and debug. Nothing else. I've spent hours trying different things. It's just a first try to start coding, but it doesn't work. I explain everything in detail, that's why this post is so long, but I just want to remark I'm just trying to setup ITK. Nothing else. I've tried with the .pro configuration. It compiles, until I use some itk object, then it returns: unresolved external symbol...: itksys-4.8.lib (it's included in the .pro file) So I'm trying with Cmake. Everbody recommends it, but I didn't see a straight tutorial to set up a simple project with QtCreator and Qt5. So I'm trying it myself. I'm using Windows 7, compiling and installing with Visual Studio 2013. I've compiled and installed successfully VTK first and then ITK (checking ITVVTKGlue). I have built them in: C:\VTK-6.2.0-build C:\ITK-4.8.0-build I have them installed in: C:\VTK-6.2.0-installed C:\ITK-4.8.0-installed (Each one has the subdirectories \bin, \include, \lib and \share) So, I created a QT5 Widgets project from QtCreator, then I added a CMakeLists.txt containing: CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) > > > PROJECT (UtilityDICOM) > > > SET(CMAKE_INCLUDE_CURRENT_DIR ON) > > SET(CMAKE_AUTOMOC ON) > > > FIND_PACKAGE(Qt5Widgets REQUIRED) > > > # VTK > > #SET(VTK_DIR "C:\\VTK-6.2.0-build\\") > > > # ITK > > #SET(ITK_DIR "C:\\ITK-4.8.0-build\\") > > FIND_PACKAGE(ITK REQUIRED) > > INCLUDE(${ITK_USE_FILE}) > > > IF (ItkVtkGlue_LOADED) > > FIND_PACKAGE(VTK REQUIRED) > > INCLUDE(${VTK_USE_FILE}) > > ENDIF() > > > > ADD_EXECUTABLE(UtilityDICOM WIN32 main.cpp mainwindow.cpp) > > > TARGET_LINK_LIBRARIES(UtilityDICOM Qt5::Widgets ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) > > It returns the error: CMake Error at CMakeLists.txt:15 (FIND_PACKAGE): By not providing "FindITK.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "ITK", but CMake did not find one. Could not find a package configuration file provided by "ITK" with any of the following names: ITKConfig.cmake itk-config.cmake Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set "ITK_DIR" to a directory containing one of the above files. If "ITK" provides a separate development package or SDK, be sure it has been installed. Ok, so I uncommented the lines you see. Why do I added the build folders and not the installed folders? Because I got the same error with the installed dirs. After doing that, it compiled, but I got another error when launching: C:\Users\M\Documents\REPOSITORIO\trunk\UtilidadDICOM\mainwindow.cpp:2: error: C1083: Cannot open include file: 'ui_mainwindow.h': No such file or directory Searching for an answer, I found something here: https://chan20kaur.wordpress.com/tag/qt-and-cmake/ I changed my CMakeLists.txt to: CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) > > > PROJECT (UtilityDICOM) > > > FIND_PACKAGE(Qt5Widgets REQUIRED) > > > SET(CMAKE_INCLUDE_CURRENT_DIR ON) > > SET(CMAKE_AUTOMOC ON) > > > QT5_WRAP_UI(Cmake_form_hdr mainwindow.ui) > > add_library(mainwindow mainwindow.cpp ${Cmake_form_hdr}) > > qt5_use_modules(mainwindow Widgets) > > > # VTK > > SET(VTK_DIR "C:\\VTK-6.2.0-build\\") > > > # ITK > > SET(ITK_DIR "C:\\ITK-4.8.0-build\\") > > FIND_PACKAGE(ITK REQUIRED) > > INCLUDE(${ITK_USE_FILE}) > > > IF (ItkVtkGlue_LOADED) > > FIND_PACKAGE(VTK REQUIRED) > > INCLUDE(${VTK_USE_FILE}) > > ENDIF() > > > > ADD_EXECUTABLE(UtilityDICOM WIN32 main.cpp) > > TARGET_LINK_LIBRARIES(UtilityDICOM mainwindow ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) > > QT5_USE_MODULES(UtilityDICOM Core Gui Widgets) > > With this, I compile. And I can launch the executable. So I added a ITK line. In main.cpp, I added in main method: itk::Object::GlobalWarningDisplayOff(); > including #include > Just that. By the way, the editor autocompletes this include. And I got: Starting > C:\Users\M\Documents\REPOSITORIO\trunk\UtilidadDICOM-build\UtilityDICOM.exe... The program has unexpectedly finished. Ok, what now? I just added ONE LINE. I don't have any clues. I tought maybe it could be that method. So I changed my modification to: typedef itk::Image< double, 2 > ImageType; typedef itk::ImageFileReader ReaderType; ReaderType::Pointer reader = ReaderType::New(); with #include Same result. I don't know what to do, really. I read blogs, wiki entries,... I spent days trying to use this, what am I doing wrong? Am I missing something? I will keep trying, but it's so frustating not being able to even start coding. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Fri Aug 14 12:04:40 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 14 Aug 2015 12:04:40 -0400 Subject: [ITK-users] Brand new project with itk sentence with QtCreator, Qt5 and Cmake crashes In-Reply-To: References: Message-ID: Hi Marcos, On Fri, Aug 14, 2015 at 11:57 AM, Marcos wrote: > Hi, > > I'm just trying to make a Cmake project compile and debug. > > I have them installed in: > > C:\VTK-6.2.0-installed > C:\ITK-4.8.0-installed > (Each one has the subdirectories \bin, \include, \lib and \share) > > So, I created a QT5 Widgets project from QtCreator, then I added a > CMakeLists.txt containing: > >> CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) >> >> >> PROJECT (UtilityDICOM) >> >> >> SET(CMAKE_INCLUDE_CURRENT_DIR ON) >> >> SET(CMAKE_AUTOMOC ON) >> >> >> FIND_PACKAGE(Qt5Widgets REQUIRED) >> >> >> # VTK >> >> #SET(VTK_DIR "C:\\VTK-6.2.0-build\\") >> >> >> # ITK >> >> #SET(ITK_DIR "C:\\ITK-4.8.0-build\\") >> >> FIND_PACKAGE(ITK REQUIRED) >> >> INCLUDE(${ITK_USE_FILE}) >> >> >> IF (ItkVtkGlue_LOADED) >> >> FIND_PACKAGE(VTK REQUIRED) >> >> INCLUDE(${VTK_USE_FILE}) >> >> ENDIF() >> >> >> >> ADD_EXECUTABLE(UtilityDICOM WIN32 main.cpp mainwindow.cpp) >> >> >> TARGET_LINK_LIBRARIES(UtilityDICOM Qt5::Widgets ${Glue} ${VTK_LIBRARIES} >> ${ITK_LIBRARIES}) > > > > > It returns the error: > >> CMake Error at CMakeLists.txt:15 (FIND_PACKAGE): > > By not providing "FindITK.cmake" in CMAKE_MODULE_PATH this project has > > asked CMake to find a package configuration file provided by "ITK", but > > CMake did not find one. > > > Could not find a package configuration file provided by "ITK" with any of > > the following names: > > > ITKConfig.cmake > > itk-config.cmake > > > Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set "ITK_DIR" > > to a directory containing one of the above files. If "ITK" provides a > > separate development package or SDK, be sure it has been installed. This means that in your CMake configuration, set ITK_DIR to C:\ITK-4.8.0-installed. For more details, see the Configuring and Building ITK section of the ITK Software Guide: http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1.html "Both the terminal-based and GUI versions of CMake will require you to specify the directory where ITK was built in the CMake variable ITK_DIR. The ITK binary directory will contain a file named ITKConfig.cmake generated during ITK configuration process with CMake. >From this file, CMake will recover all information required to configure your new ITK project." Hope this helps, Matt From fotosentido at gmail.com Fri Aug 14 12:20:06 2015 From: fotosentido at gmail.com (Marcos) Date: Fri, 14 Aug 2015 18:20:06 +0200 Subject: [ITK-users] Brand new project with itk sentence with QtCreator, Qt5 and Cmake crashes In-Reply-To: References: Message-ID: As I said, I did that, I set the ITK_DIR to the directory where I installed. In fact, there is a ITKConfig.cmake in C:\ITK-4.8.0-installed\lib\cmake\ITK-4.8 and my CMakeLists.txt has a line like this: SET(ITK_DIR "C:\\ITK-4.8.0-installed\\") but that way it doesn't find it. I didn't have problems building ITK, the problem is trying to use it. Maybe it's not installed correctly, but Visual Studio did it without problems. Thank you. 2015-08-14 18:04 GMT+02:00 Matt McCormick : > Hi Marcos, > > On Fri, Aug 14, 2015 at 11:57 AM, Marcos wrote: > > Hi, > > > > I'm just trying to make a Cmake project compile and debug. > > > > > I have them installed in: > > > > C:\VTK-6.2.0-installed > > C:\ITK-4.8.0-installed > > (Each one has the subdirectories \bin, \include, \lib and \share) > > > > So, I created a QT5 Widgets project from QtCreator, then I added a > > CMakeLists.txt containing: > > > >> CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) > >> > >> > >> PROJECT (UtilityDICOM) > >> > >> > >> SET(CMAKE_INCLUDE_CURRENT_DIR ON) > >> > >> SET(CMAKE_AUTOMOC ON) > >> > >> > >> FIND_PACKAGE(Qt5Widgets REQUIRED) > >> > >> > >> # VTK > >> > >> #SET(VTK_DIR "C:\\VTK-6.2.0-build\\") > >> > >> > >> # ITK > >> > >> #SET(ITK_DIR "C:\\ITK-4.8.0-build\\") > >> > >> FIND_PACKAGE(ITK REQUIRED) > >> > >> INCLUDE(${ITK_USE_FILE}) > >> > >> > >> IF (ItkVtkGlue_LOADED) > >> > >> FIND_PACKAGE(VTK REQUIRED) > >> > >> INCLUDE(${VTK_USE_FILE}) > >> > >> ENDIF() > >> > >> > >> > >> ADD_EXECUTABLE(UtilityDICOM WIN32 main.cpp mainwindow.cpp) > >> > >> > >> TARGET_LINK_LIBRARIES(UtilityDICOM Qt5::Widgets ${Glue} ${VTK_LIBRARIES} > >> ${ITK_LIBRARIES}) > > > > > > > > > > It returns the error: > > > >> CMake Error at CMakeLists.txt:15 (FIND_PACKAGE): > > > > By not providing "FindITK.cmake" in CMAKE_MODULE_PATH this project has > > > > asked CMake to find a package configuration file provided by "ITK", but > > > > CMake did not find one. > > > > > > Could not find a package configuration file provided by "ITK" with any of > > > > the following names: > > > > > > ITKConfig.cmake > > > > itk-config.cmake > > > > > > Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set > "ITK_DIR" > > > > to a directory containing one of the above files. If "ITK" provides a > > > > separate development package or SDK, be sure it has been installed. > > > This means that in your CMake configuration, set ITK_DIR to > C:\ITK-4.8.0-installed. > > > For more details, see the Configuring and Building ITK section of the > ITK Software Guide: > > http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1.html > > "Both the terminal-based and GUI versions of CMake will require you to > specify the directory where ITK was built in the CMake variable > ITK_DIR. The ITK binary directory will contain a file named > ITKConfig.cmake generated during ITK configuration process with CMake. > From this file, CMake will recover all information required to > configure your new ITK project." > > > Hope this helps, > Matt > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Fri Aug 14 14:12:02 2015 From: fotosentido at gmail.com (Marcos) Date: Fri, 14 Aug 2015 20:12:02 +0200 Subject: [ITK-users] Brand new project with itk sentence with QtCreator, Qt5 and Cmake crashes In-Reply-To: References: Message-ID: Well, I got something. Reading the example http://itk.org/Wiki/ITK/Examples/IO/ImageFileReader I saw "If ITK is not installed but compiled on your system, you will need to specify *the path to your ITK build*: " Well, I installed (or Visual Studio put it in a directory after I clicked on the INSTALL project). So it compiled. But the .exe crashed, and QtCreator didn't explain why. So I clicked the executable and I got messages about QT dlls missing. So I copied the missing dlls one by one, after finally I saw the window. I still don't know why it thinks it wasn't installed. And maybe I'll never know, it's annoying all this quest just to get a simple working .exe. 2015-08-14 18:20 GMT+02:00 Marcos : > As I said, I did that, I set the ITK_DIR to the directory where I > installed. > > In fact, there is a ITKConfig.cmake in > C:\ITK-4.8.0-installed\lib\cmake\ITK-4.8 > > and my CMakeLists.txt has a line like this: > SET(ITK_DIR "C:\\ITK-4.8.0-installed\\") > > but that way it doesn't find it. > > > I didn't have problems building ITK, the problem is trying to use it. > > Maybe it's not installed correctly, but Visual Studio did it without > problems. > > Thank you. > > > > 2015-08-14 18:04 GMT+02:00 Matt McCormick : > >> Hi Marcos, >> >> On Fri, Aug 14, 2015 at 11:57 AM, Marcos wrote: >> > Hi, >> > >> > I'm just trying to make a Cmake project compile and debug. >> >> > >> > I have them installed in: >> > >> > C:\VTK-6.2.0-installed >> > C:\ITK-4.8.0-installed >> > (Each one has the subdirectories \bin, \include, \lib and \share) >> > >> > So, I created a QT5 Widgets project from QtCreator, then I added a >> > CMakeLists.txt containing: >> > >> >> CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) >> >> >> >> >> >> PROJECT (UtilityDICOM) >> >> >> >> >> >> SET(CMAKE_INCLUDE_CURRENT_DIR ON) >> >> >> >> SET(CMAKE_AUTOMOC ON) >> >> >> >> >> >> FIND_PACKAGE(Qt5Widgets REQUIRED) >> >> >> >> >> >> # VTK >> >> >> >> #SET(VTK_DIR "C:\\VTK-6.2.0-build\\") >> >> >> >> >> >> # ITK >> >> >> >> #SET(ITK_DIR "C:\\ITK-4.8.0-build\\") >> >> >> >> FIND_PACKAGE(ITK REQUIRED) >> >> >> >> INCLUDE(${ITK_USE_FILE}) >> >> >> >> >> >> IF (ItkVtkGlue_LOADED) >> >> >> >> FIND_PACKAGE(VTK REQUIRED) >> >> >> >> INCLUDE(${VTK_USE_FILE}) >> >> >> >> ENDIF() >> >> >> >> >> >> >> >> ADD_EXECUTABLE(UtilityDICOM WIN32 main.cpp mainwindow.cpp) >> >> >> >> >> >> TARGET_LINK_LIBRARIES(UtilityDICOM Qt5::Widgets ${Glue} >> ${VTK_LIBRARIES} >> >> ${ITK_LIBRARIES}) >> > >> > >> > >> > >> > It returns the error: >> > >> >> CMake Error at CMakeLists.txt:15 (FIND_PACKAGE): >> > >> > By not providing "FindITK.cmake" in CMAKE_MODULE_PATH this project has >> > >> > asked CMake to find a package configuration file provided by "ITK", but >> > >> > CMake did not find one. >> > >> > >> > Could not find a package configuration file provided by "ITK" with any >> of >> > >> > the following names: >> > >> > >> > ITKConfig.cmake >> > >> > itk-config.cmake >> > >> > >> > Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set >> "ITK_DIR" >> > >> > to a directory containing one of the above files. If "ITK" provides a >> > >> > separate development package or SDK, be sure it has been installed. >> >> >> This means that in your CMake configuration, set ITK_DIR to >> C:\ITK-4.8.0-installed. >> >> >> For more details, see the Configuring and Building ITK section of the >> ITK Software Guide: >> >> http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1.html >> >> "Both the terminal-based and GUI versions of CMake will require you to >> specify the directory where ITK was built in the CMake variable >> ITK_DIR. The ITK binary directory will contain a file named >> ITKConfig.cmake generated during ITK configuration process with CMake. >> From this file, CMake will recover all information required to >> configure your new ITK project." >> >> >> Hope this helps, >> Matt >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From siavashk at ece.ubc.ca Fri Aug 14 14:08:23 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Fri, 14 Aug 2015 11:08:23 -0700 (MST) Subject: [ITK-users] Brand new project with itk sentence with QtCreator, Qt5 and Cmake crashes In-Reply-To: References: Message-ID: <1439575703025-36009.post@n7.nabble.com> Marcos, if you add the location of your dlls to the PATH environment variable, QtCreator will automatically find them for you. Installing ITK /should/ take care of that for you though. Did you try rebooting your PC before running Qt? Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Brand-new-project-with-itk-sentence-with-QtCreator-Qt5-and-Cmake-crashes-tp36005p36009.html Sent from the ITK - Users mailing list archive at Nabble.com. From alex.judisch at gmail.com Fri Aug 14 15:04:28 2015 From: alex.judisch at gmail.com (Alex Judisch) Date: Fri, 14 Aug 2015 15:04:28 -0400 Subject: [ITK-users] Job Opportunity Message-ID: Our lab is looking for a programmer with experience in image processing. We use Fiji, ITK, and a variety of other methods. The link for the job flyer is: *http://www.ocularbiomechanics.com/PostDocAdImaging *. Also, please check out the rest of website (http://ocularbiomechanics.com). We have several interesting projects in progress using such imaging modalities as Optical Coherence Tomography and MRI. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Fri Aug 14 15:29:08 2015 From: fotosentido at gmail.com (Marcos) Date: Fri, 14 Aug 2015 21:29:08 +0200 Subject: [ITK-users] Brand new project with itk sentence with QtCreator, Qt5 and Cmake crashes In-Reply-To: <1439575703025-36009.post@n7.nabble.com> References: <1439575703025-36009.post@n7.nabble.com> Message-ID: I tried so many things, and now I think it works... without setting ITK_DIR in CMakeLists... I added the ITK and VTK dlls to the PATH... I think I didn't reboot after that. I compared the ImageFileReader CMakeLists.txt example, and restored some lines (about VTKITKGlue) I deleted. If it helps to someone, my working CMakeLists.txt is now: CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) PROJECT (UtilityDICOM) FIND_PACKAGE(Qt5Widgets REQUIRED) SET(CMAKE_INCLUDE_CURRENT_DIR ON) SET(CMAKE_AUTOMOC ON) QT5_WRAP_UI(Cmake_form_hdr mainwindow.ui) add_library(mainwindow mainwindow.cpp ${Cmake_form_hdr}) qt5_use_modules(mainwindow Widgets) # ITK FIND_PACKAGE(ITK REQUIRED) INCLUDE(${ITK_USE_FILE}) if (ITKVtkGlue_LOADED) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) else() find_package(ItkVtkGlue REQUIRED) include(${ItkVtkGlue_USE_FILE}) set(Glue ItkVtkGlue) endif() ADD_EXECUTABLE(UtilityDICOM WIN32 main.cpp) TARGET_LINK_LIBRARIES(UtilityDICOM mainwindow ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) QT5_USE_MODULES(UtilityDICOM Core Gui Widgets) Now I can access even to VTK libraries... Finally I can start to develop something. I'm not sure what was happening, maybe the dlls in PATH and not rebooting after adding them. Thanks for your time. I appreciate it. 2015-08-14 20:08 GMT+02:00 Siavash Khallaghi : > Marcos, if you add > < > http://typecastexception.com/post/2014/12/07/Adding-and-Editing-PATH-Environment-Variables-in-Windows.aspx > > > the location of your dlls to the PATH environment variable, QtCreator will > automatically find them for you. Installing ITK /should/ take care of that > for you though. Did you try rebooting your PC before running Qt? > > Siavash > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-Brand-new-project-with-itk-sentence-with-QtCreator-Qt5-and-Cmake-crashes-tp36005p36009.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Sat Aug 15 14:20:16 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 15 Aug 2015 14:20:16 -0400 Subject: [ITK-users] Brand new project with itk sentence with QtCreator, Qt5 and Cmake crashes In-Reply-To: References: Message-ID: Hi, On Fri, Aug 14, 2015 at 12:20 PM, Marcos wrote: > As I said, I did that, I set the ITK_DIR to the directory where I installed. > > In fact, there is a ITKConfig.cmake in > C:\ITK-4.8.0-installed\lib\cmake\ITK-4.8 In this case, set ITK_DIR to C:\ITK-4.8.0-installed\lib\cmake\ITK-4.8. > and my CMakeLists.txt has a line like this: > SET(ITK_DIR "C:\\ITK-4.8.0-installed\\") > > but that way it doesn't find it. Usually, the ITK_DIR is not hard coded in a CMakeLists.txt. It is set by the user when they do the CMake configuration so it adjusts to the situation on any given build machine. HTH, Matt > > > I didn't have problems building ITK, the problem is trying to use it. > > Maybe it's not installed correctly, but Visual Studio did it without > problems. > > Thank you. > > > > 2015-08-14 18:04 GMT+02:00 Matt McCormick : >> >> Hi Marcos, >> >> On Fri, Aug 14, 2015 at 11:57 AM, Marcos wrote: >> > Hi, >> > >> > I'm just trying to make a Cmake project compile and debug. >> >> > >> > I have them installed in: >> > >> > C:\VTK-6.2.0-installed >> > C:\ITK-4.8.0-installed >> > (Each one has the subdirectories \bin, \include, \lib and \share) >> > >> > So, I created a QT5 Widgets project from QtCreator, then I added a >> > CMakeLists.txt containing: >> > >> >> CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) >> >> >> >> >> >> PROJECT (UtilityDICOM) >> >> >> >> >> >> SET(CMAKE_INCLUDE_CURRENT_DIR ON) >> >> >> >> SET(CMAKE_AUTOMOC ON) >> >> >> >> >> >> FIND_PACKAGE(Qt5Widgets REQUIRED) >> >> >> >> >> >> # VTK >> >> >> >> #SET(VTK_DIR "C:\\VTK-6.2.0-build\\") >> >> >> >> >> >> # ITK >> >> >> >> #SET(ITK_DIR "C:\\ITK-4.8.0-build\\") >> >> >> >> FIND_PACKAGE(ITK REQUIRED) >> >> >> >> INCLUDE(${ITK_USE_FILE}) >> >> >> >> >> >> IF (ItkVtkGlue_LOADED) >> >> >> >> FIND_PACKAGE(VTK REQUIRED) >> >> >> >> INCLUDE(${VTK_USE_FILE}) >> >> >> >> ENDIF() >> >> >> >> >> >> >> >> ADD_EXECUTABLE(UtilityDICOM WIN32 main.cpp mainwindow.cpp) >> >> >> >> >> >> TARGET_LINK_LIBRARIES(UtilityDICOM Qt5::Widgets ${Glue} >> >> ${VTK_LIBRARIES} >> >> ${ITK_LIBRARIES}) >> > >> > >> > >> > >> > It returns the error: >> > >> >> CMake Error at CMakeLists.txt:15 (FIND_PACKAGE): >> > >> > By not providing "FindITK.cmake" in CMAKE_MODULE_PATH this project has >> > >> > asked CMake to find a package configuration file provided by "ITK", but >> > >> > CMake did not find one. >> > >> > >> > Could not find a package configuration file provided by "ITK" with any >> > of >> > >> > the following names: >> > >> > >> > ITKConfig.cmake >> > >> > itk-config.cmake >> > >> > >> > Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set >> > "ITK_DIR" >> > >> > to a directory containing one of the above files. If "ITK" provides a >> > >> > separate development package or SDK, be sure it has been installed. >> >> >> This means that in your CMake configuration, set ITK_DIR to >> C:\ITK-4.8.0-installed. >> >> >> For more details, see the Configuring and Building ITK section of the >> ITK Software Guide: >> >> http://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1.html >> >> "Both the terminal-based and GUI versions of CMake will require you to >> specify the directory where ITK was built in the CMake variable >> ITK_DIR. The ITK binary directory will contain a file named >> ITKConfig.cmake generated during ITK configuration process with CMake. >> From this file, CMake will recover all information required to >> configure your new ITK project." >> >> >> Hope this helps, >> Matt > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Sat Aug 15 14:24:01 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 15 Aug 2015 14:24:01 -0400 Subject: [ITK-users] IterativeClosestPoint2 example: how to get better results In-Reply-To: <50B858FB5F53124F9E32314E5C1B40943512CAEF@MBX214.d.ethz.ch> References: <50B858FB5F53124F9E32314E5C1B409435126779@MBX114.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B40943512CAEF@MBX214.d.ethz.ch> Message-ID: Hi Fabio, That is great to hear! Please review this patch: http://review.source.kitware.com/#/c/20082/ This adds more status information that can lend insight into the registration convergence. Thanks, Matt On Fri, Aug 14, 2015 at 1:44 AM, D'Isidoro Fabio wrote: > Hello Matt, > > I went through the source code of 3DEuler transform in itk, and I realized that the default Euler sequence ZXY. If I generate my data according to this sequence I get perfect results, as it should be! > > > -----Original Message----- > From: Matt McCormick [mailto:matt.mccormick at kitware.com] > Sent: Freitag, 14. August 2015 00:09 > To: D'Isidoro Fabio > Cc: insight-users at itk.org > Subject: Re: [ITK-users] IterativeClosestPoint2 example: how to get better results > > Hello, > > On Thu, Aug 13, 2015 at 4:06 AM, D'Isidoro Fabio wrote: >> I am trying to use the IterativeClosestPoint2 example on the fixed and >> moving point sets in attachment (called ?src? and ?dest? point sets). >> >> >> >> The ground truth is ?properly ordered dest = Transform(src)?, where: >> >> >> >> Euler angles: (0.349065850398866, 0.349065850398866, >> 0.349065850398866) >> >> Translations: (4.1335200571234, 5.90820985238168, 7.04748773837622) >> >> >> >> (the dest_point set in attachment is randomly reshuffled) >> >> >> >>>>> If I use srx = fixed, dest = moving, the registration results is: >> >> >> >> Euler angles: (-0.327201, -0.36953, -0.47291) >> >> Translations: (-6.28471, -2.64212, -1.50835) >> >> >> >>>>> If I use dest = fixed, src = moving, the registration results is: >> >> >> >> Euler angles: (0.44595, 0.20655, 0.36423) >> >> Translations: (6.28471, 2.64212, 1.50835) >> >> >> >> >> >> >> >> Question 1): >> >> >> >> Given that ?properly ordered dest = Transform(src)?, according to the >> guide src should be the fixed point set. Am I wrong? >> > > This is a bit confusing because it is different from transforms with images, but the src should be the moving point set. See: > > http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx;h=af1b04e91ed9126777134db3dfca6ef05810fc60;hb=HEAD#l87 > > >> Question 2): >> >> >> >> I am not happy with the results, given that there is no additional >> noise (the underlined values refer to error angles of up to 8 degrees >> and 3 mm errors). I am surprised because there is no additional noise >> to the data, so I would expect an accurate registration. Are my >> results normal? How could I improve the results? Should I change the optimizer, or the transform? > > Could the code be shared that generated the inputs? > > Thanks, > Matt From Olivier.Commowick at inria.fr Mon Aug 17 04:10:34 2015 From: Olivier.Commowick at inria.fr (Olivier Commowick) Date: Mon, 17 Aug 2015 10:10:34 +0200 Subject: [ITK-users] Symmetric eigen analysis discrepancy In-Reply-To: References: Message-ID: <87AF4E28-B7B4-49E5-9BFD-73F1B966BA3B@inria.fr> Hi Matt, Yes, those are very small numbers indeed :) After digging in the code, I found two discrepancies with respect to the vnl symmetric eigensystem, so I took the vnl code as the reference and did the corrections. I am submitting the two patches on gerrit (I didn?t know they would be separated for review, I can merge them if necessary): - http://review.source.kitware.com/#/c/20092/ - http://review.source.kitware.com/#/c/20093/ That being said, when digging in the code, it is not clear to me why SymmetricEigenAnalysis is not just a wrapper on vnl_symmetric_eigensystem. This would avoid duplicated code, and I do not see any place in the eigensystem code that wouldn?t be thread safe. But again, I am not an expert of that code and so I may be wrong. In any case, may be something to think of for future work :) Thanks for the help, Olivier > On 13 Aug 2015, at 22:59, Matt McCormick wrote: > > Hi Olivier, > > Those are some pretty small numbers ;-). Thanks for sharing your experiences. > > It may be necessary to build both ITK and vnl/netlib instances with > debugging symbols and walk through them in a debugger to see where the > deviation occurs. > > As always, patches are welcome :-) > > Thanks, > Matt > > On Thu, Aug 13, 2015 at 9:35 AM, Olivier Commowick > wrote: >> Hello all, >> >> I have been experiencing a problem when using the itk SymmetricEigenAnalysis class in ITK. When using this class, it sometimes produces NaN eigenvalues/vectors. On the contrary, the vnl_symmetric_eigensystem doesn?t seem to have a problem (and neither does matlab). Looking at the documentation, it seems both use QL decomposition but not implemented in the same place. In addition, the vnl one is said to be not thread safe, although it?s the one working for me. >> >> In fact, I have isolated one 3x3 matrix for which I always have the problem. >> >> A = >> [7.503107128706855667859804009212206062302e-53 1.870107888834986371214720644344813262375e-52 -8.662047753682068190087788895125120421821e-27; >> 1.870107888834986371214720644344813262375e-52 4.661140319458029838073740773908360767728e-52 -2.15896741973055935210319454393408888029e-26; >> -8.662047753682068190087788895125120421821e-27 -2.15896741973055935210319454393408888029e-26 1] >> >> It?s a weird one I know, but again vnl (and matlab) works great on it. Would there be anyone who knows the QL decomposition code enough to help me understand and possibly correct the ITK class so that it does the same as the VNL one ? >> >> Thanks a lot in advance. >> >> --- >> >> Olivier Commowick, Ph.D. >> Research Scientist >> INRIA Rennes - Bretagne Atlantique, VISAGES Team >> Campus de Beaulieu >> 35042 Rennes >> FRANCE >> >> Phone: +33 2 99 84 25 92 >> Email: Olivier.Commowick at inria.fr >> Web: http://olivier.commowick.org/ >> >> >> >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users --- Olivier Commowick, Ph.D. Research Scientist INRIA Rennes - Bretagne Atlantique, VISAGES Team Campus de Beaulieu 35042 Rennes FRANCE Phone: +33 2 99 84 25 92 Email: Olivier.Commowick at inria.fr Web: http://olivier.commowick.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Charles.GARRAUD at b-com.com Mon Aug 17 04:18:16 2015 From: Charles.GARRAUD at b-com.com (Charles GARRAUD) Date: Mon, 17 Aug 2015 08:18:16 +0000 Subject: [ITK-users] 3D/2D registration with itkRayCastInterpolateImageFunction In-Reply-To: <1438725226436-35973.post@n7.nabble.com> References: <1438725226436-35973.post@n7.nabble.com> Message-ID: <0e2998cae63c4786a150d6cfb6599dec@vprd-opci0018.b-com.local> Thanks for your answer. Metric is increasing (is it normal behavior as in the example setMaximized is on?). And we are using same sample data as used in ITKApp example... As we generate DRR data with itkRayCastInterpolateImageFunction and then try to register data with same method, it should be a perfect match? Thanks for your help and sorry for the late answer (summer break). Regards, Charles -----Message d'origine----- De?: Insight-users [mailto:insight-users-bounces at itk.org] De la part de Siavash Khallaghi Envoy??: mardi 4 ao?t 2015 23:54 ??: insight-users at itk.org Objet?: Re: [ITK-users] 3D/2D registration with itkRayCastInterpolateImageFunction Is the metric decreasing? (i.e. similarity value) It could be that everything is correct, it is just that you have an ill-posed problem. If the metric is decreasing, it could be that you are converging to a local minimum. Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-3D-2D-registration-with-itkRayCastInterpolateImageFunction-tp35970p35973.html Sent from the ITK - Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From davis.vigneault at gmail.com Mon Aug 17 06:57:13 2015 From: davis.vigneault at gmail.com (DVigneault) Date: Mon, 17 Aug 2015 03:57:13 -0700 (MST) Subject: [ITK-users] Do any of the mesh file formats store CellData? In-Reply-To: <1439488504178-7587666.post@n2.nabble.com> References: <1439488504178-7587666.post@n2.nabble.com> Message-ID: <1439809033823-7587689.post@n2.nabble.com> All-- I've rebuilt in debug mode and stepped through with gdb. It looks like the CellData is being deallocated at the following line in itkProcessObject.cxx. The comment suggests that this result is expected? 1684 /** 1685 * Prepare all the outputs. This may deallocate previous bulk data. 1686 */ 1687 this->PrepareOutputs(); By putting a breakpoint at itkProcessObject.cxx:1687, we can see where the pointer is being reset: $ gdb ./dv-mesh-test (gdb) b itkProcessObject.cxx:1687 (gdb) r (gdb) c # First time is due to sphere source (gdb) select-frame 3 # Brings us back into itk::MeshFileWriter::Write (gdb) p input->GetCellData() # A valid pointer (gdb) n # Step over this (gdb) p input->GetCellData() # A null pointer Here's the backtrace at that point: #0 itk::ProcessObject::UpdateOutputData (this=0x936a30) at /local/pemb3433/Developer/ITK/src/Modules/Core/Common/src/itkProcessObject.cxx:1695 #1 0x000000000052f9fd in itk::DataObject::UpdateOutputData (this=0x93b290) at /local/pemb3433/Developer/ITK/src/Modules/Core/Common/src/itkDataObject.cxx:416 #2 0x000000000052f6af in itk::DataObject::Update (this=0x93b290) at /local/pemb3433/Developer/ITK/src/Modules/Core/Common/src/itkDataObject.cxx:341 #3 0x00000000004fb544 in itk::MeshFileWriter > >::Write (this=0x93ca40) at /local/pemb3433/Developer/ITK/src/Modules/IO/Mesh/include/itkMeshFileWriter.hxx:148 #4 0x00000000004f9bf1 in itk::MeshFileWriter > >::Update (this=0x93ca40) at /local/pemb3433/Developer/ITK/src/Modules/IO/Mesh/include/itkMeshFileWriter.h:145 #5 0x00000000004f8185 in main () at /local/pemb3433/Developer/Bitbucket/oxford/Stebbing_Method/MeshTest/src/dv-mesh-test.cxx:32 I'm stretching my knowledge both of ITK and gdb here, so please do let me know if I'm misinterpreting the output--but it seems to me that the CellData is being deallocated when itkProcessObject.cxx:1687 is called, and therefore it (a) isn't being written to file and (b) isn't available after the mesh is written. Is this a bug in my code? A bug in ITK? A feature I don't understand? Thanks very much in advance for your help! Best, --Davis -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Do-any-of-the-mesh-file-formats-store-CellData-tp7587666p7587689.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From arnaudgelas at gmail.com Mon Aug 17 08:49:47 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Mon, 17 Aug 2015 14:49:47 +0200 Subject: [ITK-users] Do any of the mesh file formats store CellData? In-Reply-To: <1439809033823-7587689.post@n2.nabble.com> References: <1439488504178-7587666.post@n2.nabble.com> <1439809033823-7587689.post@n2.nabble.com> Message-ID: Davis, Can you write a c++ example (please not a c++-11 one) along with corresponding cmakelists.txt either on itk wiki examples [1], either on ITKExamples [2] (see [3] for contributing), please? Thanks, Arnaud [1] http://itk.org/Wiki/ITK/Examples [2] http://itk.org/ITKExamples/index.html [3] http://itk.org/ITKExamples/Documentation/Contribute/index.html On Mon, Aug 17, 2015 at 12:57 PM, DVigneault wrote: > All-- > > I've rebuilt in debug mode and stepped through with gdb. It looks like the > CellData is being deallocated at the following line in > itkProcessObject.cxx. > The comment suggests that this result is expected? > > 1684 /** > 1685 * Prepare all the outputs. This may deallocate previous bulk > data. > 1686 */ > 1687 this->PrepareOutputs(); > > By putting a breakpoint at itkProcessObject.cxx:1687, we can see where the > pointer is being reset: > > $ gdb ./dv-mesh-test > (gdb) b itkProcessObject.cxx:1687 > (gdb) r > (gdb) c # First time is due to sphere source > (gdb) select-frame 3 # Brings us back into itk::MeshFileWriter::Write > (gdb) p input->GetCellData() # A valid pointer > (gdb) n # Step over this > (gdb) p input->GetCellData() # A null pointer > > Here's the backtrace at that point: > > #0 itk::ProcessObject::UpdateOutputData (this=0x936a30) at > > /local/pemb3433/Developer/ITK/src/Modules/Core/Common/src/itkProcessObject.cxx:1695 > #1 0x000000000052f9fd in itk::DataObject::UpdateOutputData (this=0x93b290) > at > > /local/pemb3433/Developer/ITK/src/Modules/Core/Common/src/itkDataObject.cxx:416 > #2 0x000000000052f6af in itk::DataObject::Update (this=0x93b290) at > > /local/pemb3433/Developer/ITK/src/Modules/Core/Common/src/itkDataObject.cxx:341 > #3 0x00000000004fb544 in itk::MeshFileWriter itk::DefaultStaticMeshTraits<float, 3u, 3u, float, float, float> > > >::Write (this=0x93ca40) > at > > /local/pemb3433/Developer/ITK/src/Modules/IO/Mesh/include/itkMeshFileWriter.hxx:148 > #4 0x00000000004f9bf1 in itk::MeshFileWriter itk::DefaultStaticMeshTraits<float, 3u, 3u, float, float, float> > > >::Update (this=0x93ca40) > at > > /local/pemb3433/Developer/ITK/src/Modules/IO/Mesh/include/itkMeshFileWriter.h:145 > #5 0x00000000004f8185 in main () at > > /local/pemb3433/Developer/Bitbucket/oxford/Stebbing_Method/MeshTest/src/dv-mesh-test.cxx:32 > > I'm stretching my knowledge both of ITK and gdb here, so please do let me > know if I'm misinterpreting the output--but it seems to me that the > CellData > is being deallocated when itkProcessObject.cxx:1687 is called, and > therefore > it (a) isn't being written to file and (b) isn't available after the mesh > is > written. > > Is this a bug in my code? A bug in ITK? A feature I don't understand? > Thanks very much in advance for your help! > > Best, > > --Davis > > > > -- > View this message in context: > http://itk-insight-users.2283740.n2.nabble.com/Do-any-of-the-mesh-file-formats-store-CellData-tp7587666p7587689.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From davis.vigneault at gmail.com Mon Aug 17 09:22:44 2015 From: davis.vigneault at gmail.com (DVigneault) Date: Mon, 17 Aug 2015 06:22:44 -0700 (MST) Subject: [ITK-users] Do any of the mesh file formats store CellData? In-Reply-To: <1439488504178-7587666.post@n2.nabble.com> References: <1439488504178-7587666.post@n2.nabble.com> Message-ID: <1439817764524-7587691.post@n2.nabble.com> Thanks very much for the reply, Arnaud! I've put up the example on the Wiki [1]. I removed auto, but I should state that I'm still compiling with c++11--I don't have a non-c++11 build of ITK to test against at the moment. And, in case it's helpful, I'm on Ubuntu 14.04, compiling with g++ 4.8.4. Best, and thanks, --Davis [1] http://itk.org/Wiki/ITK/Examples/Meshes/PointAndCellData -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Do-any-of-the-mesh-file-formats-store-CellData-tp7587666p7587691.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From siavashk at ece.ubc.ca Mon Aug 17 15:51:12 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Mon, 17 Aug 2015 12:51:12 -0700 (MST) Subject: [ITK-users] 3D/2D registration with itkRayCastInterpolateImageFunction In-Reply-To: <0e2998cae63c4786a150d6cfb6599dec@vprd-opci0018.b-com.local> References: <1438725226436-35973.post@n7.nabble.com> <0e2998cae63c4786a150d6cfb6599dec@vprd-opci0018.b-com.local> Message-ID: <1439841072404-36020.post@n7.nabble.com> Hi Charles, For the record, I do not think that you have a software bug per say. I think your problem is a bit more fundamental, i.e. the combination of optimizer/metric might not have sufficient capture range to guide the registration to the true solution. In order to investigate this, I would suggest trying the following: 1. If you generate your projection from identity (which I assume is the true solution), and start your registration from identity, would the registration converge to identity as well? This tells you how stable your metric is. 2. At this point, I would definitely start plotting the metric value against transformation parameters. See /Section 3.10.1 Mean Squares Metric: Exploring a Metric/ of the Software Guide . Since your registration does not converge to the correct solution for rotations, I suspect that it is getting stuck in a local minima for these parameters. Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-3D-2D-registration-with-itkRayCastInterpolateImageFunction-tp35970p36020.html Sent from the ITK - Users mailing list archive at Nabble.com. From christophe.vandijck at kuleuven.be Tue Aug 18 02:14:25 2015 From: christophe.vandijck at kuleuven.be (christophevd) Date: Mon, 17 Aug 2015 23:14:25 -0700 (MST) Subject: [ITK-users] Multi-threading in pointsettopointsetmetric In-Reply-To: <9103909A-6192-4F07-8C35-DB2354408742@gmail.com> References: <1439386054435-35985.post@n7.nabble.com> <38C7F2DA-EBE7-4A10-9C0F-5F0F5E75450F@gmail.com> <001101d0d50d$2e317a30$8a946e90$@kuleuven.be> <9103909A-6192-4F07-8C35-DB2354408742@gmail.com> Message-ID: <1439878465576-36021.post@n7.nabble.com> Thanks, I've looked at it, but when I try to set-up the pipeline for pointset to pointset registrations, I have errors concerning an unset virtual domain. When I try a dummy image to image registration, this does not seem to occur. Are there any examples available, eg ICP registration, that use the new imageregistrationmethodv4 framework? Regards, Christophe -- View this message in context: http://itk-users.7.n7.nabble.com/Multi-threading-in-pointsettopointsetmetric-tp35985p36021.html Sent from the ITK - Users mailing list archive at Nabble.com. From matt.mccormick at kitware.com Tue Aug 18 22:33:19 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 18 Aug 2015 22:33:19 -0400 Subject: [ITK-users] Symmetric eigen analysis discrepancy In-Reply-To: <87AF4E28-B7B4-49E5-9BFD-73F1B966BA3B@inria.fr> References: <87AF4E28-B7B4-49E5-9BFD-73F1B966BA3B@inria.fr> Message-ID: Hi Olivier, Thanks for digging down and submitting the patches! The split is fine -- it is nice to have one topic per commit. I have rebased them on the release branch before merging to help get them into the next bugfix release. Yes, we should re-use code as much as possible! I am not sure about source of the thread-safe warning, be it can be attacked another time :-). Thank you for your contribution, Matt On Mon, Aug 17, 2015 at 4:10 AM, Olivier Commowick wrote: > Hi Matt, > > Yes, those are very small numbers indeed :) After digging in the code, I > found two discrepancies with respect to the vnl symmetric eigensystem, so I > took the vnl code as the reference and did the corrections. I am submitting > the two patches on gerrit (I didn?t know they would be separated for review, > I can merge them if necessary): > > - http://review.source.kitware.com/#/c/20092/ > - http://review.source.kitware.com/#/c/20093/ > > That being said, when digging in the code, it is not clear to me why > SymmetricEigenAnalysis is not just a wrapper on vnl_symmetric_eigensystem. > This would avoid duplicated code, and I do not see any place in the > eigensystem code that wouldn?t be thread safe. But again, I am not an expert > of that code and so I may be wrong. In any case, may be something to think > of for future work :) > > Thanks for the help, > Olivier > > On 13 Aug 2015, at 22:59, Matt McCormick wrote: > > Hi Olivier, > > Those are some pretty small numbers ;-). Thanks for sharing your > experiences. > > It may be necessary to build both ITK and vnl/netlib instances with > debugging symbols and walk through them in a debugger to see where the > deviation occurs. > > As always, patches are welcome :-) > > Thanks, > Matt > > On Thu, Aug 13, 2015 at 9:35 AM, Olivier Commowick > wrote: > > Hello all, > > I have been experiencing a problem when using the itk SymmetricEigenAnalysis > class in ITK. When using this class, it sometimes produces NaN > eigenvalues/vectors. On the contrary, the vnl_symmetric_eigensystem doesn?t > seem to have a problem (and neither does matlab). Looking at the > documentation, it seems both use QL decomposition but not implemented in the > same place. In addition, the vnl one is said to be not thread safe, although > it?s the one working for me. > > In fact, I have isolated one 3x3 matrix for which I always have the problem. > > A = > [7.503107128706855667859804009212206062302e-53 > 1.870107888834986371214720644344813262375e-52 > -8.662047753682068190087788895125120421821e-27; > 1.870107888834986371214720644344813262375e-52 > 4.661140319458029838073740773908360767728e-52 > -2.15896741973055935210319454393408888029e-26; > -8.662047753682068190087788895125120421821e-27 > -2.15896741973055935210319454393408888029e-26 1] > > It?s a weird one I know, but again vnl (and matlab) works great on it. Would > there be anyone who knows the QL decomposition code enough to help me > understand and possibly correct the ITK class so that it does the same as > the VNL one ? > > Thanks a lot in advance. > > --- > > Olivier Commowick, Ph.D. > Research Scientist > INRIA Rennes - Bretagne Atlantique, VISAGES Team > Campus de Beaulieu > 35042 Rennes > FRANCE > > Phone: +33 2 99 84 25 92 > Email: Olivier.Commowick at inria.fr > Web: http://olivier.commowick.org/ > > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > > --- > > Olivier Commowick, Ph.D. > Research Scientist > INRIA Rennes - Bretagne Atlantique, VISAGES Team > Campus de Beaulieu > 35042 Rennes > FRANCE > > Phone: +33 2 99 84 25 92 > Email: Olivier.Commowick at inria.fr > Web: http://olivier.commowick.org/ > > > > > From matt.mccormick at kitware.com Tue Aug 18 22:36:05 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 18 Aug 2015 22:36:05 -0400 Subject: [ITK-users] Multi-threading in pointsettopointsetmetric In-Reply-To: <1439878465576-36021.post@n7.nabble.com> References: <1439386054435-35985.post@n7.nabble.com> <38C7F2DA-EBE7-4A10-9C0F-5F0F5E75450F@gmail.com> <001101d0d50d$2e317a30$8a946e90$@kuleuven.be> <9103909A-6192-4F07-8C35-DB2354408742@gmail.com> <1439878465576-36021.post@n7.nabble.com> Message-ID: Hello Christophe, Currently, the unit tests can be used as a reference. New example code is welcome. I will also be contributing some point set v4 registration examples. Thanks, Matt On Tue, Aug 18, 2015 at 2:14 AM, christophevd wrote: > Thanks, > > I've looked at it, but when I try to set-up the pipeline for pointset to > pointset registrations, I have errors concerning an unset virtual domain. > When I try a dummy image to image registration, this does not seem to occur. > > Are there any examples available, eg ICP registration, that use the new > imageregistrationmethodv4 framework? > > Regards, > Christophe > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/Multi-threading-in-pointsettopointsetmetric-tp35985p36021.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From davis.vigneault at gmail.com Wed Aug 19 12:33:45 2015 From: davis.vigneault at gmail.com (DVigneault) Date: Wed, 19 Aug 2015 09:33:45 -0700 (MST) Subject: [ITK-users] Do any of the mesh file formats store CellData? In-Reply-To: <1439817764524-7587691.post@n2.nabble.com> References: <1439488504178-7587666.post@n2.nabble.com> <1439817764524-7587691.post@n2.nabble.com> Message-ID: <1440002025391-7587696.post@n2.nabble.com> All-- After a few more iterations, I realized that I only had the problem when I used itk::RegularSphereMeshSource, and not when I created the mesh procedurally. A bit more googling lead to an old ITK thread [1] which mentioned DisconnectPipeline(). Calling this method on the mesh before writing to file prevented the point and cell data from being deallocated, and solved the problem. I've updated the ITK Wiki example [2] to be a generic (hopefully useful) example demonstrating how to use point and cell data containers and write to file. Thanks again, and apologies for any trouble, --Davis [1] http://public.kitware.com/pipermail/insight-users/2002-October/001368.html [2] http://itk.org/Wiki/ITK/Examples/Meshes/PointAndCellData -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Do-any-of-the-mesh-file-formats-store-CellData-tp7587666p7587696.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From Charles.GARRAUD at b-com.com Fri Aug 21 12:01:32 2015 From: Charles.GARRAUD at b-com.com (Charles GARRAUD) Date: Fri, 21 Aug 2015 16:01:32 +0000 Subject: [ITK-users] 3D/2D registration with itkRayCastInterpolateImageFunction Message-ID: Hi, Thanks for your answer. My coworker tried a few experiments and here are the results. 1- Identity test We first generated a DRR with no motion (./GenerateProjection -t -0 0 0 /data/BrainWeb/brainweb165a10f17.mha projection.mhd). Then we tested the registration script against the generated projection (./IntensityBased2D3DRegistration -t 0 0 0 /data/BrainWeb/brainweb165a10f17.mha projection.mhd). Final transform is not Identity... Iteration: 0 Similarity: 131072 Position: [2.153758987711231, -2.2185832563517227, 0.13470062489014054, -0.66118 02734569167, -2.4462025457148213, -0.0002246616408056843] Iteration: 1 Similarity: 122450 Position: [2.4187300917467964, -3.773162111555794, -0.9755229703094714, -2.07458 8877483574, -0.537315819701732, -2.5768321309606987] Iteration: 2 Similarity: 119478 Position: [2.470584982717309, -5.832612304775175, -2.348307788159638, -4.0557547 39210535, 1.4910774048756184, -1.2233031986406182] Iteration: 3 Similarity: 89670.6 Position: [0.5294851105555496, -7.488726388306614, -4.4764177747675395, -5.03037 4241557845, 3.3801762897017995, -0.5584817620767086] Iteration: 4 Similarity: 117654 Position: [0.8070122506477464, -6.806625924939558, -4.184289615511856, -5.001986 557143484, 3.568233605537047, 1.2680470135769937] Iteration: 5 Similarity: 120137 Position: [0.8986014091035406, -7.370639324747829, -4.600946472732313, -4.991937 760754552, 4.252209504897678, 1.4468579892082352] Iteration: 6 Similarity: 121092 Position: [1.0389929549096333, -7.269481426616463, -4.5893416922553545, -4.80836 5473207177, 4.620462234241913, 2.341628219578606] Result = Translation X = 1.03899 Translation Y = -7.26948 Translation Z = -4.58934 Rotation X = -4.80837 Rotation Y = 4.62046 Rotation Z = 2.34163 Iterations = 8 Metric value = 122604 2- Metric test Since the registration pipeline involved an Euler3DTransform transformation but our results were not converging even for translations only, I made a simple test case : First of all, I have generated a DRR projection with a (-100, -100, -100) translation with this command line : ./GenerateProjection -t -100 -100 -100 brainweb165a10f17.mha projection.mhd After that, I have generated translated DRR projections, from 5 to 20 with a step of 5 along the X axis and the Y axis one at a time. The aim was to check if, by plotting the metric value for a range of displacements all around the translated projection, the best similarity value would be obtained for the exact displacement we used to generate this translated projection. For instance, for the translated projection obtained by this command line : ./GenerateProjection -t -105 -100 -100 brainweb165a10f17.mha projectionx5.mhd The best similarity value between projection.mhd and projectionx5.mhd would be obtained for a (5, 0) displacement. The result of this experiment can be observed on the following table : x0 y0 x5 y0 x10 y0 x15 y0 x20 y0 x0 y5 x0 y10 x0 y15 x0 y20 Best (x, y) (0, 0) (9, 0) (18, 0) (26, 0) (34, 0) (0, 9) (0, 17) (0, 26) (0, 34) Similarity 131072 112939 100953 94482 90848 113021 101068 95829 92632 We can observe that, even for translations only, our results do not converge to the right value, which can lead us to imagine that the metric is not appropriate for the purpose of registrating the example data... Is this test case relevant ? It seems to indicate that, even for simple cases, the registration is not reliable and could be the source of the wrong results I have. Thanks for your help! Charles Garraud {P} Software Engineer E-health {T} +33?(0)?2 56 35 88 25 {W} www.b-com.com -----Message d'origine----- De?: Insight-users [mailto:insight-users-bounces at itk.org] De la part de Siavash Khallaghi Envoy??: lundi 17 ao?t 2015 21:51 ??: insight-users at itk.org Objet?: Re: [ITK-users] 3D/2D registration with itkRayCastInterpolateImageFunction Hi Charles, For the record, I do not think that you have a software bug per say. I think your problem is a bit more fundamental, i.e. the combination of optimizer/metric might not have sufficient capture range to guide the registration to the true solution. In order to investigate this, I would suggest trying the following: 1. If you generate your projection from identity (which I assume is the true solution), and start your registration from identity, would the registration converge to identity as well? This tells you how stable your metric is. 2. At this point, I would definitely start plotting the metric value against transformation parameters. See /Section 3.10.1 Mean Squares Metric: Exploring a Metric/ of the Software Guide . Since your registration does not converge to the correct solution for rotations, I suspect that it is getting stuck in a local minima for these parameters. Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-3D-2D-registration-with-itkRayCastInterpolateImageFunction-tp35970p36020.html Sent from the ITK - Users mailing list archive at Nabble.com. _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users From siavashk at ece.ubc.ca Fri Aug 21 14:04:27 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Fri, 21 Aug 2015 11:04:27 -0700 (MST) Subject: [ITK-users] 3D/2D registration with itkRayCastInterpolateImageFunction In-Reply-To: References: Message-ID: <1440180267538-36026.post@n7.nabble.com> Hi Charles, Your results /suggest/ that the optimizer does not converge to the solution. Based on your results, I cannot conclusively say why this happens. This is why I asked you to plot the metric. The identity test and metric test basically tell you this: "If you start the registration from these initial parameters, you will converge to some final parameters." The final parameters being /Best (x, y)/ in your notation. However, this experiment does not tell you /why/ you converge to these parameters. To make it more clear, I will make you an analogy. Think of the registration as a sledge that takes you from one point on the mountain (A) to the lowest point in the valley (B). The goal is to arrive at the lowest valley. During your trip from A to B, you only see glimpses of your position through your goggles (observer values). After some iterations you arrive at B (final parameters). If you did not have a map of what the curvature of the mountain looks like, you have no idea why you ended up at B. You also have no idea if you are indeed at the lowest valley (global minima). This is your problem. What I would like to ask you to do, is to plot the metric for a range of values around the true solution. For example, if the solution is at x-translation = 0.0 mm an you start at x = 6.0 mm, you should plot the metric between [-10.0, +10.0] mm (+4 mm for padding). Do this for other transformation parameters as well. Keep the projection constant during this experiment. For example, if your metric looks like the attached image, we can safely say that the registration gets stuck at a local minima around 8.0 mm. If that is the case, you have to: 1) make your metric more convex; and/or 2) start closer to the solution. There are solutions to both of these problems. Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-3D-2D-registration-with-itkRayCastInterpolateImageFunction-tp35970p36026.html Sent from the ITK - Users mailing list archive at Nabble.com. From prashanth.dumpuri at gmail.com Fri Aug 21 17:22:23 2015 From: prashanth.dumpuri at gmail.com (Prashanth) Date: Fri, 21 Aug 2015 21:22:23 +0000 Subject: [ITK-users] speed function for itkSpeedToPathFilter Message-ID: All, I'm working on finding the shortest path between two points in a vessel tree. itkSpeedToPathFilter seems to be working well for me as long as I select the right speed function. Digging through Insight Journal, I found a link to Deschamp's Ph.D. thesis ( https://tel.archives-ouvertes.fr/file/index/docid/45537/filename/index.html) which outlines one method to select a speed function: 1. Approximate centerline based on the input image 2. Segmentation using the approximate centerline 3. Use the segmented image and approximate centerline to create an image with signed distances to the approximate centerline 4. Use the above image as the input speed function for itkSpeedToPathFilter The above steps seem to work (I say 'seem to work' because I tested it just three 2D images so far), but are there other methods to select the speed function? My input images are contrast enhanced CT images and the vessels are easy to identify and segment. Any help on how to select the correct speed function will be appreciated. Thanks Prashanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From fisidoro at ethz.ch Sat Aug 22 03:02:28 2015 From: fisidoro at ethz.ch (D'Isidoro Fabio) Date: Sat, 22 Aug 2015 07:02:28 +0000 Subject: [ITK-users] ITK Python wrapping Message-ID: <50B858FB5F53124F9E32314E5C1B409435ACEA2D@MBX212.d.ethz.ch> I am a newbie, trying to use ITK with Python wrapping on Windows 7. Using the short ITKSoftwareGuide, but could not find a comprehensive guide to use Python wrappers for dummies. My problem is: I can't make the Python wrapping work. I can import itk with no errors when running Python in the new virtual environment configured inside my ITK build directory. But: - As in this example (http://www.vtk.org/Wiki/ITK/Release_4/Wrapping/Examples) , I get no error for "PixelType = itk.UC" but when trying "ImageType = itk.Image[ImageType, 2]" I get the error1 in attachment (no module named _ITKPyBasePython ... something related to SWIG, that I don't have). Do I need to install Swig? (In a similar question in the iTK Wiki page the answer was: you will need the ITKv4 wrapping to use this example ... ?) - Seemingly, in the new virtual env I try to run "python ImageRegistration3.py BrainProtonDensitySliceBorder20.png BrainProtonDensitySliceShifted13x17y.png output_image" in attachment (modified from the Examples folder with proper inputs), which starts with "import itk ; fixedImageReader = itkImageFileReaderF2_New()" I get the error "name itkImageFileReaderF2_New is not defined". Lacking of a guide, I actually have no clue about how to use Python wrappers in general. Is there any guide that I could follow? Useful info: I have successfully built ITK with Cmake with the ITK-WRAP-PYTHON option. The build had some failures related to the CastXML tool... could this be a problem? I configured a new Python virtual environment within my ITK build directory. I copied/pasted the file /path/to/myITK_wrapped/Wrapping/Generators/Python/Debug/WrapITK.pth into wrap_itk_venv/Lib/site-packages. Is that correct to generate a symbolic link in Windows? I also added path/to/myITK_wrapped, path/to/myITK_wrapped/bin and path/to/myITK_wrapped/bin/Debug in my user env variable PATH Thank you for your help. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: error1.png Type: image/png Size: 31551 bytes Desc: error1.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BrainProtonDensitySliceBorder20.png Type: image/png Size: 17925 bytes Desc: BrainProtonDensitySliceBorder20.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BrainProtonDensitySliceShifted13x17y.png Type: image/png Size: 17887 bytes Desc: BrainProtonDensitySliceShifted13x17y.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ImageRegistration3.py Type: application/octet-stream Size: 4069 bytes Desc: ImageRegistration3.py URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: output_image.png Type: image/png Size: 24164 bytes Desc: output_image.png URL: From dan.muel at gmail.com Sun Aug 23 05:49:18 2015 From: dan.muel at gmail.com (Dan Mueller) Date: Sun, 23 Aug 2015 19:19:18 +0930 Subject: [ITK-users] speed function for itkSpeedToPathFilter In-Reply-To: References: Message-ID: Hi Prashanth, Essentially you want your speed function to be white (1.0) in the vessels and black (0.0) outside of the vessels ? any way you can achieve this is fine. The method you have outline is very general, and the issue is step (1) i.e. finding an approximate centreline. Some have suggested achieving this by applying multiscale Hessian line filtering (aka vessel enhancement filtering) such as Sato/Frangi method ? while this can achieve good results, personally I find this method very slow. In my own work, I have found morphological top-hat by opening (aka white top-hat or WTH) produces good results at a fraction of the computation expense, especially using the box structuring element with acceleration (e.g. see [1]). Good luck. Cheers, Dan [1] ?Direct volume illustration for cardiac applications,? chapter 4, page 83?109, http://eprints.qut.edu.au/17028/1/Daniel_Mueller_Thesis.pdf On 22 August 2015 at 06:52, Prashanth wrote: > All, > > I'm working on finding the shortest path between two points in a vessel > tree. itkSpeedToPathFilter seems to be working well for me as long as I > select the right speed function. Digging through Insight Journal, I found a > link to Deschamp's Ph.D. thesis > (https://tel.archives-ouvertes.fr/file/index/docid/45537/filename/index.html) > which outlines one method to select a speed function: > > 1. Approximate centerline based on the input image > 2. Segmentation using the approximate centerline > 3. Use the segmented image and approximate centerline to create an image > with signed distances to the approximate centerline > 4. Use the above image as the input speed function for itkSpeedToPathFilter > > The above steps seem to work (I say 'seem to work' because I tested it just > three 2D images so far), but are there other methods to select the speed > function? My input images are contrast enhanced CT images and the vessels > are easy to identify and segment. Any help on how to select the correct > speed function will be appreciated. > > Thanks > Prashanth > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Sun Aug 23 16:53:27 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 23 Aug 2015 16:53:27 -0400 Subject: [ITK-users] ITK Python wrapping In-Reply-To: <50B858FB5F53124F9E32314E5C1B409435ACEA2D@MBX212.d.ethz.ch> References: <50B858FB5F53124F9E32314E5C1B409435ACEA2D@MBX212.d.ethz.ch> Message-ID: Hi Fabio, There is information in The ITK Software Guide, but we could improve it based on your experiences. In the ITK "lib" directory, or one of its subdirectories, there should be a _ITKPyBasePython.pyd. This is the file that the error message indicates it cannot find. First, check that it exists. Next, check that the folder it lives in is listed in the WrapITK.pth file and that the WrapITK.pth file was added to the Libs/site-packages directory of your virtualenv. Some more information regarding the other questions: - Swig is automatically downloaded when building ITK Python wrapping, but it is no longer needed after the wrappers are built. - There should not be CastXML errors, and if there were, that may be a problem. What are the errors? - Windows cannot create symbolic links -- files must be copied instead. We can simplify the documentation to state that the WrapITK.pth file should be copied on all platforms. Where was the instruction to create a symbolic link? Please let us know how it goes, Matt On Sat, Aug 22, 2015 at 3:02 AM, D'Isidoro Fabio wrote: > I am a newbie, trying to use ITK with Python wrapping on Windows 7. Using > the short ITKSoftwareGuide, but could not find a comprehensive guide to use > Python wrappers for dummies. > > > > My problem is: I can?t make the Python wrapping work. I can import itk with > no errors when running Python in the new virtual environment configured > inside my ITK build directory. But: > > > > - As in this example > (http://www.vtk.org/Wiki/ITK/Release_4/Wrapping/Examples) , I get no error > for ?PixelType = itk.UC? but when trying ?ImageType = itk.Image[ImageType, > 2]? I get the error1 in attachment (no module named _ITKPyBasePython ? > something related to SWIG, that I don?t have). Do I need to install Swig? > (In a similar question in the iTK Wiki page the answer was: you will need > the ITKv4 wrapping to use this example ? ?) > > > > - Seemingly, in the new virtual env I try to run ?python > ImageRegistration3.py BrainProtonDensitySliceBorder20.png > BrainProtonDensitySliceShifted13x17y.png output_image? in attachment > (modified from the Examples folder with proper inputs), which starts with > ?import itk ; fixedImageReader = itkImageFileReaderF2_New()? I get the > error ?name itkImageFileReaderF2_New is not defined?. > > > > Lacking of a guide, I actually have no clue about how to use Python wrappers > in general. Is there any guide that I could follow? > > > > Useful info: > > > > I have successfully built ITK with Cmake with the ITK-WRAP-PYTHON option. > The build had some failures related to the CastXML tool? could this be a > problem? > > > > I configured a new Python virtual environment within my ITK build directory. > > > > I copied/pasted the file > /path/to/myITK_wrapped/Wrapping/Generators/Python/Debug/WrapITK.pth into > wrap_itk_venv/Lib/site-packages. Is that correct to generate a symbolic link > in Windows? > > > > I also added path/to/myITK_wrapped, path/to/myITK_wrapped/bin and > path/to/myITK_wrapped/bin/Debug in my user env variable PATH > > > > Thank you for your help. > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Aug 24 11:08:22 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 24 Aug 2015 11:08:22 -0400 Subject: [ITK-users] ITK Python wrapping In-Reply-To: <50B858FB5F53124F9E32314E5C1B409435ACEB17@MBX212.d.ethz.ch> References: <50B858FB5F53124F9E32314E5C1B409435ACEA2D@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACEB17@MBX212.d.ethz.ch> Message-ID: Hi Fabio, > - Well, I have a ITKPyBasePython.pyc file in the ITK lib (and the things you told me to check are allright). So the difference is that the name has no underscore _ITKPyBasePython (as reported in the error) and the extension is pyc rather than pyd (although I have read it should not make the difference). Are those things relevant? If yes, how to correct for them? Maybe the dlls were not properly compiled so the underscore is missing? Both the .pyc and the .pyd files are required. > Depending on your reply to this email, I will then try to build ITK with Python wrapping again so that I can report the compilation failures I got regarding CastXML. Great, thank you. A Release build instead of a Debug build is recommended -- build size and runtime performance are greatly improved. There is on going work to substantially decrease the wrapping build time in ITK Git master, but it is currently unstable. The 4.8.0 release is recommended until that is resolved. > About the symbolic link, I just read on the guide "ln -s /path/to/ITK-Wrapped/Wrapping/Generators/Python/WrapITK.pth" and went to find out what ln -s was ... but you are right, the guide says to copy the file, so I guess you don't have improve this part. Maybe just specifiy that there is no need to download Swig. Thanks for the feedback. We will improve the wrapping process description. > Thank you, I have spent 5 long days already with no success on this issue (which seems to me a very common issue for users willing to use the Python wrapping, from my extensive google search). Yes, wrapping has been difficult in the past, but things are changing. With your help, it will improve even quicker :-). Thanks, Matt From marina.bendersky at gmail.com Mon Aug 24 15:37:05 2015 From: marina.bendersky at gmail.com (Marina Bendersky) Date: Mon, 24 Aug 2015 12:37:05 -0700 Subject: [ITK-users] How can I convert a versor into the three rotation angles? Message-ID: New to image registration and ITK, I?m following the ITK software guide and trying to understand the different outputs. I?m focusing on the example ImageRegistration8.cxx: a rigid transform in 3D, and the example is detailed in the Software guide Book2, section 3.6.4. The manual explains that the versor (page 211) ? Versor=(?6.03744e?05,5.91487e?06,?0.0871932) is equivalent to a rotation of 9.98 degrees around the Z axis. I understand a versor is a unit quarterion, and have been trying to convert this versor to the ~10 degrees angle (in the z direction) using the equations in wikipedia. I read the slides on Quarterions found at http://www.itk.org/CourseWare/Training/QuaternionsI.pdf, among other sources, but I still cannot resolve my question. I appreciate any help and advice. Thank you! Marina -------------- next part -------------- An HTML attachment was scrubbed... URL: From siavashk at ece.ubc.ca Mon Aug 24 15:15:15 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Mon, 24 Aug 2015 12:15:15 -0700 (MST) Subject: [ITK-users] How can I convert a versor into the three rotation angles? In-Reply-To: References: Message-ID: <1440443715241-36033.post@n7.nabble.com> Hi Marina, https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles should be helpful for you. Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-How-can-I-convert-a-versor-into-the-three-rotation-angles-tp36032p36033.html Sent from the ITK - Users mailing list archive at Nabble.com. From pablo.hernandez.cerdan at outlook.com Mon Aug 24 22:52:59 2015 From: pablo.hernandez.cerdan at outlook.com (=?iso-8859-1?B?UGFibG8gSGVybuFuZGV6?=) Date: Tue, 25 Aug 2015 04:52:59 +0200 Subject: [ITK-users] Contour detector: Pb algorithm in itk? Message-ID: Hello, is there any external module using ITK, that has implemented the Pb family of algorithms? http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/resources.html Thanks, Pablo -------------- next part -------------- An HTML attachment was scrubbed... URL: From lassi.paavolainen at jyu.fi Tue Aug 25 08:54:47 2015 From: lassi.paavolainen at jyu.fi (Paavolainen, Lassi) Date: Tue, 25 Aug 2015 12:54:47 +0000 Subject: [ITK-users] Building ITK 4.8.0 with Python wrapping in Visual Studio 2015 Message-ID: I'm trying to build ITK 4.8.0 with Python wrapping using Visual Studio 2015. Have anyone been successful in this? I know that with CastXML the Python wrapping issues were solved in ITK 4.8.0 so the issues might be related to Visual Studio 2015 instead of Python wrapping. Here are some error messages I get. First in CMake I get Debug Assertion Failed! ...\src\itkhdf5\CMake\CMakeFiles\CMakeTmp\Debug\cmTC_07479.exe File: minkernel\crts\ucrt\inc\corecrt_internal_stdio_output.h Expression: ("Invalid integer length modifier",0) and Checking for appropriate format for 64 bit long: CMake: Width with l64 failed with result: FAILED_TO_RUN same happens with a few other types as well. Maybe this already indicate coming issues. Anyway I went to build the solution which fails with Error C2664 'void llvm::BitstreamWriter::EmitRecordWithBlob(unsigned int,llvm::SmallVectorImpl &,llvm::StringRef)': cannot convert argument 3 from 'unsigned int *' to 'llvm::StringRef' [C:\ITK-4.8.0\Wrapping\Generators\CastXML\clang-prefix\src\clang-build\lib\Serialization\clangSerialization.vcxproj] clang C:\ITK-4.8.0\Wrapping\Generators\CastXML\cfe-3.6.0\lib\Serialization\ASTWriter.cpp 1517 and with similar errors. Any ideas how to fix it? I haven't yet tried building ITK without Python wrapping but could do it now. Lassi From matt.mccormick at kitware.com Tue Aug 25 10:31:06 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 25 Aug 2015 10:31:06 -0400 Subject: [ITK-users] FW: ITK Python wrapping In-Reply-To: <50B858FB5F53124F9E32314E5C1B409435ACECAC@MBX212.d.ethz.ch> References: <50B858FB5F53124F9E32314E5C1B409435ACEA2D@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACEB17@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACECAC@MBX212.d.ethz.ch> Message-ID: Hi Fabio, Thanks for the updates. The apparent errors are not actual errors. These result when CMake configuration runs (indicated by the preceding "--"), and CMake tests the availability of compiler features with try_compiles [1]. If an error occurs, then that feature is not used in the build. It is good to see that the *.pyd files are there and your Python path. There should still be *.dll files whose folder needs to be added to the PATH system environmental variable. These are usually in the "bin" instead of "lib" directory. Search for a file "ITKCommon-4.8.dll" if you built ITK 4.8. Hope this helps, Matt PS. Please reply-to-all so conversations remain on the mailing lists. [1] http://www.cmake.org/cmake/help/v3.3/command/try_compile.html On Tue, Aug 25, 2015 at 3:02 AM, D'Isidoro Fabio wrote: > Sorry forgot the attachments > > -----Original Message----- > From: D'Isidoro Fabio > Sent: Dienstag, 25. August 2015 09:01 > To: 'Matt McCormick' > Subject: RE: [ITK-users] ITK Python wrapping > > One more thing: in the guide it's written to add to the PATH the directories containing the .dll files, suggesting ITKbuild, ITKbuild/bin and ITKbuild/bin/Release. > > However as you can see from the attachments the suggested directory has only executables, while the .lib files (I don't have .dll files) are in the ITKbuild/lib/Release (second attachment)... > > Anyway I tried to add the the ITKbuild/lib/Release directory to the PATH but it did not work either. > > > -----Original Message----- > From: Matt McCormick [mailto:matt.mccormick at kitware.com] > Sent: Montag, 24. August 2015 17:08 > To: D'Isidoro Fabio > Cc: insight-users at itk.org > Subject: Re: [ITK-users] ITK Python wrapping > > Hi Fabio, > >> - Well, I have a ITKPyBasePython.pyc file in the ITK lib (and the things you told me to check are allright). So the difference is that the name has no underscore _ITKPyBasePython (as reported in the error) and the extension is pyc rather than pyd (although I have read it should not make the difference). Are those things relevant? If yes, how to correct for them? Maybe the dlls were not properly compiled so the underscore is missing? > > Both the .pyc and the .pyd files are required. > > >> Depending on your reply to this email, I will then try to build ITK with Python wrapping again so that I can report the compilation failures I got regarding CastXML. > > Great, thank you. A Release build instead of a Debug build is recommended -- build size and runtime performance are greatly improved. There is on going work to substantially decrease the wrapping build time in ITK Git master, but it is currently unstable. > The 4.8.0 release is recommended until that is resolved. > > >> About the symbolic link, I just read on the guide "ln -s /path/to/ITK-Wrapped/Wrapping/Generators/Python/WrapITK.pth" and went to find out what ln -s was ... but you are right, the guide says to copy the file, so I guess you don't have improve this part. Maybe just specifiy that there is no need to download Swig. > > Thanks for the feedback. We will improve the wrapping process description. > > >> Thank you, I have spent 5 long days already with no success on this issue (which seems to me a very common issue for users willing to use the Python wrapping, from my extensive google search). > > Yes, wrapping has been difficult in the past, but things are changing. > With your help, it will improve even quicker :-). > > > Thanks, > Matt From fisidoro at ethz.ch Tue Aug 25 11:25:48 2015 From: fisidoro at ethz.ch (D'Isidoro Fabio) Date: Tue, 25 Aug 2015 15:25:48 +0000 Subject: [ITK-users] FW: ITK Python wrapping In-Reply-To: References: <50B858FB5F53124F9E32314E5C1B409435ACEA2D@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACEB17@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACECAC@MBX212.d.ethz.ch> Message-ID: <50B858FB5F53124F9E32314E5C1B409435ACED36@MBX212.d.ethz.ch> Hi Matt, Thank you. Actually I have the .dll in the bin/release. Shortly, I (redundantly) added then ITKbuild/bin, ITKbuild/bin/release, ITKbuild/lib, ITKbuild/lib/release to BOTH my PATH environmental variable and the WrapITK.pth. Still not working, however I have a new error (see attachment 'error'). Therefore I went to check the ITKTransformPython module but it's not there in lib/Release where all other .lib files relative to the other modules are. I went in the directory shown in attachment 'directory' (it's in the Wrapping/Module/.. directory) and found a log file (attachment): the build of this module failed (I check other modules and there build there did not fail). Could you please read the log? Why did just this module fail? Thank you again! -----Original Message----- From: Matt McCormick [mailto:matt.mccormick at kitware.com] Sent: Dienstag, 25. August 2015 16:31 To: D'Isidoro Fabio; insight-users at itk.org Subject: Re: FW: [ITK-users] ITK Python wrapping Hi Fabio, Thanks for the updates. The apparent errors are not actual errors. These result when CMake configuration runs (indicated by the preceding "--"), and CMake tests the availability of compiler features with try_compiles [1]. If an error occurs, then that feature is not used in the build. It is good to see that the *.pyd files are there and your Python path. There should still be *.dll files whose folder needs to be added to the PATH system environmental variable. These are usually in the "bin" instead of "lib" directory. Search for a file "ITKCommon-4.8.dll" if you built ITK 4.8. Hope this helps, Matt PS. Please reply-to-all so conversations remain on the mailing lists. [1] http://www.cmake.org/cmake/help/v3.3/command/try_compile.html On Tue, Aug 25, 2015 at 3:02 AM, D'Isidoro Fabio wrote: > Sorry forgot the attachments > > -----Original Message----- > From: D'Isidoro Fabio > Sent: Dienstag, 25. August 2015 09:01 > To: 'Matt McCormick' > Subject: RE: [ITK-users] ITK Python wrapping > > One more thing: in the guide it's written to add to the PATH the directories containing the .dll files, suggesting ITKbuild, ITKbuild/bin and ITKbuild/bin/Release. > > However as you can see from the attachments the suggested directory has only executables, while the .lib files (I don't have .dll files) are in the ITKbuild/lib/Release (second attachment)... > > Anyway I tried to add the the ITKbuild/lib/Release directory to the PATH but it did not work either. > > > -----Original Message----- > From: Matt McCormick [mailto:matt.mccormick at kitware.com] > Sent: Montag, 24. August 2015 17:08 > To: D'Isidoro Fabio > Cc: insight-users at itk.org > Subject: Re: [ITK-users] ITK Python wrapping > > Hi Fabio, > >> - Well, I have a ITKPyBasePython.pyc file in the ITK lib (and the things you told me to check are allright). So the difference is that the name has no underscore _ITKPyBasePython (as reported in the error) and the extension is pyc rather than pyd (although I have read it should not make the difference). Are those things relevant? If yes, how to correct for them? Maybe the dlls were not properly compiled so the underscore is missing? > > Both the .pyc and the .pyd files are required. > > >> Depending on your reply to this email, I will then try to build ITK with Python wrapping again so that I can report the compilation failures I got regarding CastXML. > > Great, thank you. A Release build instead of a Debug build is recommended -- build size and runtime performance are greatly improved. There is on going work to substantially decrease the wrapping build time in ITK Git master, but it is currently unstable. > The 4.8.0 release is recommended until that is resolved. > > >> About the symbolic link, I just read on the guide "ln -s /path/to/ITK-Wrapped/Wrapping/Generators/Python/WrapITK.pth" and went to find out what ln -s was ... but you are right, the guide says to copy the file, so I guess you don't have improve this part. Maybe just specifiy that there is no need to download Swig. > > Thanks for the feedback. We will improve the wrapping process description. > > >> Thank you, I have spent 5 long days already with no success on this issue (which seems to me a very common issue for users willing to use the Python wrapping, from my extensive google search). > > Yes, wrapping has been difficult in the past, but things are changing. > With your help, it will improve even quicker :-). > > > Thanks, > Matt -------------- next part -------------- A non-text attachment was scrubbed... Name: error_ITKTransformPython.png Type: image/png Size: 52209 bytes Desc: error_ITKTransformPython.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: directory_ITKTransformPython.png Type: image/png Size: 98834 bytes Desc: directory_ITKTransformPython.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ITKTransformPython.log Type: application/octet-stream Size: 6680 bytes Desc: ITKTransformPython.log URL: From matt.mccormick at kitware.com Tue Aug 25 12:37:59 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 25 Aug 2015 12:37:59 -0400 Subject: [ITK-users] FW: ITK Python wrapping In-Reply-To: <50B858FB5F53124F9E32314E5C1B409435ACED36@MBX212.d.ethz.ch> References: <50B858FB5F53124F9E32314E5C1B409435ACEA2D@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACEB17@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACECAC@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACED36@MBX212.d.ethz.ch> Message-ID: Hi Fabio, We are making good progress :-). The build log indicates that the build did not complete correctly: Traceback (most recent call last): File "C:/Users/difabio/ITK/InsightToolkit-4.8.0/Wrapping/Generators/SwigInterface/igenerator.py", line 923, in with open(options.typedef_output, "w") as f: IOError: [Errno 13] Permission denied: 'E:/ITK/ITK_bin_Win64_Python_Wrap/Wrapping/Typedefs/itkAffineTransformSwigInterface.h' 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code 1. 1>Done Building Project "E:\ITK\ITK_bin_Win64_Python_Wrap\Wrapping\Modules\ITKTransform\ITKTransformPython.vcxproj" (Build target(s)) -- FAILED. Please make sure the directory is writable, and run the build again. Sometimes, for example, anti-virus software can interfere with a build, and it should be disabled on a build directory. Hope this helps, Matt On Tue, Aug 25, 2015 at 11:25 AM, D'Isidoro Fabio wrote: > Hi Matt, > > Thank you. Actually I have the .dll in the bin/release. > > Shortly, I (redundantly) added then ITKbuild/bin, ITKbuild/bin/release, ITKbuild/lib, ITKbuild/lib/release to BOTH my PATH environmental variable and the WrapITK.pth. Still not working, however I have a new error (see attachment 'error'). > > Therefore I went to check the ITKTransformPython module but it's not there in lib/Release where all other .lib files relative to the other modules are. I went in the directory shown in attachment 'directory' (it's in the Wrapping/Module/.. directory) and found a log file (attachment): the build of this module failed (I check other modules and there build there did not fail). Could you please read the log? Why did just this module fail? > > Thank you again! > > -----Original Message----- > From: Matt McCormick [mailto:matt.mccormick at kitware.com] > Sent: Dienstag, 25. August 2015 16:31 > To: D'Isidoro Fabio; insight-users at itk.org > Subject: Re: FW: [ITK-users] ITK Python wrapping > > Hi Fabio, > > Thanks for the updates. > > The apparent errors are not actual errors. These result when CMake configuration runs (indicated by the preceding "--"), and CMake tests the availability of compiler features with try_compiles [1]. If an error occurs, then that feature is not used in the build. > > It is good to see that the *.pyd files are there and your Python path. > There should still be *.dll files whose folder needs to be added to the PATH system environmental variable. These are usually in the "bin" instead of "lib" directory. Search for a file "ITKCommon-4.8.dll" if you built ITK 4.8. > > Hope this helps, > Matt > > PS. Please reply-to-all so conversations remain on the mailing lists. > > [1] http://www.cmake.org/cmake/help/v3.3/command/try_compile.html > > On Tue, Aug 25, 2015 at 3:02 AM, D'Isidoro Fabio wrote: >> Sorry forgot the attachments >> >> -----Original Message----- >> From: D'Isidoro Fabio >> Sent: Dienstag, 25. August 2015 09:01 >> To: 'Matt McCormick' >> Subject: RE: [ITK-users] ITK Python wrapping >> >> One more thing: in the guide it's written to add to the PATH the directories containing the .dll files, suggesting ITKbuild, ITKbuild/bin and ITKbuild/bin/Release. >> >> However as you can see from the attachments the suggested directory has only executables, while the .lib files (I don't have .dll files) are in the ITKbuild/lib/Release (second attachment)... >> >> Anyway I tried to add the the ITKbuild/lib/Release directory to the PATH but it did not work either. >> >> >> -----Original Message----- >> From: Matt McCormick [mailto:matt.mccormick at kitware.com] >> Sent: Montag, 24. August 2015 17:08 >> To: D'Isidoro Fabio >> Cc: insight-users at itk.org >> Subject: Re: [ITK-users] ITK Python wrapping >> >> Hi Fabio, >> >>> - Well, I have a ITKPyBasePython.pyc file in the ITK lib (and the things you told me to check are allright). So the difference is that the name has no underscore _ITKPyBasePython (as reported in the error) and the extension is pyc rather than pyd (although I have read it should not make the difference). Are those things relevant? If yes, how to correct for them? Maybe the dlls were not properly compiled so the underscore is missing? >> >> Both the .pyc and the .pyd files are required. >> >> >>> Depending on your reply to this email, I will then try to build ITK with Python wrapping again so that I can report the compilation failures I got regarding CastXML. >> >> Great, thank you. A Release build instead of a Debug build is recommended -- build size and runtime performance are greatly improved. There is on going work to substantially decrease the wrapping build time in ITK Git master, but it is currently unstable. >> The 4.8.0 release is recommended until that is resolved. >> >> >>> About the symbolic link, I just read on the guide "ln -s /path/to/ITK-Wrapped/Wrapping/Generators/Python/WrapITK.pth" and went to find out what ln -s was ... but you are right, the guide says to copy the file, so I guess you don't have improve this part. Maybe just specifiy that there is no need to download Swig. >> >> Thanks for the feedback. We will improve the wrapping process description. >> >> >>> Thank you, I have spent 5 long days already with no success on this issue (which seems to me a very common issue for users willing to use the Python wrapping, from my extensive google search). >> >> Yes, wrapping has been difficult in the past, but things are changing. >> With your help, it will improve even quicker :-). >> >> >> Thanks, >> Matt From matt.mccormick at kitware.com Tue Aug 25 13:52:43 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 25 Aug 2015 13:52:43 -0400 Subject: [ITK-users] speed function for itkSpeedToPathFilter In-Reply-To: References: Message-ID: Hi Prashanth, Classes within TubeTK [1] specialize in creating input images that would work well as an input to the itk::SpeedToPathFilter. Hope this helps, Matt [1] https://github.com/KitwareMedical/TubeTK On Sun, Aug 23, 2015 at 5:49 AM, Dan Mueller wrote: > Hi Prashanth, > > Essentially you want your speed function to be white (1.0) in the > vessels and black (0.0) outside of the vessels ? any way you can > achieve this is fine. The method you have outline is very general, and > the issue is step (1) i.e. finding an approximate centreline. Some > have suggested achieving this by applying multiscale Hessian line > filtering (aka vessel enhancement filtering) such as Sato/Frangi > method ? while this can achieve good results, personally I find this > method very slow. In my own work, I have found morphological top-hat > by opening (aka white top-hat or WTH) produces good results at a > fraction of the computation expense, especially using the box > structuring element with acceleration (e.g. see [1]). > > Good luck. > > Cheers, Dan > > [1] ?Direct volume illustration for cardiac applications,? chapter 4, > page 83?109, http://eprints.qut.edu.au/17028/1/Daniel_Mueller_Thesis.pdf > > On 22 August 2015 at 06:52, Prashanth wrote: >> All, >> >> I'm working on finding the shortest path between two points in a vessel >> tree. itkSpeedToPathFilter seems to be working well for me as long as I >> select the right speed function. Digging through Insight Journal, I found a >> link to Deschamp's Ph.D. thesis >> (https://tel.archives-ouvertes.fr/file/index/docid/45537/filename/index.html) >> which outlines one method to select a speed function: >> >> 1. Approximate centerline based on the input image >> 2. Segmentation using the approximate centerline >> 3. Use the segmented image and approximate centerline to create an image >> with signed distances to the approximate centerline >> 4. Use the above image as the input speed function for itkSpeedToPathFilter >> >> The above steps seem to work (I say 'seem to work' because I tested it just >> three 2D images so far), but are there other methods to select the speed >> function? My input images are contrast enhanced CT images and the vessels >> are easy to identify and segment. Any help on how to select the correct >> speed function will be appreciated. >> >> Thanks >> Prashanth >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 Aug 25 13:59:49 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 25 Aug 2015 13:59:49 -0400 Subject: [ITK-users] Building ITK 4.8.0 with Python wrapping in Visual Studio 2015 In-Reply-To: References: Message-ID: Hi Lassi, ITK 4.8.0 was released with CastXML based on LLVM 3.6, which likely does not support Visual Studio 2015. However, support for this will be added soon. Thanks, Matt On Tue, Aug 25, 2015 at 8:54 AM, Paavolainen, Lassi wrote: > I'm trying to build ITK 4.8.0 with Python wrapping using Visual Studio 2015. Have anyone been successful in this? I know that with CastXML the Python wrapping issues were solved in ITK 4.8.0 so the issues might be related to Visual Studio 2015 instead of Python wrapping. > > Here are some error messages I get. First in CMake I get > Debug Assertion Failed! > ...\src\itkhdf5\CMake\CMakeFiles\CMakeTmp\Debug\cmTC_07479.exe > File: minkernel\crts\ucrt\inc\corecrt_internal_stdio_output.h > Expression: ("Invalid integer length modifier",0) > and > Checking for appropriate format for 64 bit long: > CMake: Width with l64 failed with result: FAILED_TO_RUN > > same happens with a few other types as well. Maybe this already indicate coming issues. Anyway I went to build the solution which fails with > Error C2664 'void llvm::BitstreamWriter::EmitRecordWithBlob(unsigned int,llvm::SmallVectorImpl &,llvm::StringRef)': cannot convert argument 3 from 'unsigned int *' to 'llvm::StringRef' [C:\ITK-4.8.0\Wrapping\Generators\CastXML\clang-prefix\src\clang-build\lib\Serialization\clangSerialization.vcxproj] clang C:\ITK-4.8.0\Wrapping\Generators\CastXML\cfe-3.6.0\lib\Serialization\ASTWriter.cpp 1517 > and with similar errors. > > Any ideas how to fix it? I haven't yet tried building ITK without Python wrapping but could do it now. > > Lassi > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 prashanth.dumpuri at gmail.com Tue Aug 25 14:15:49 2015 From: prashanth.dumpuri at gmail.com (Prashanth) Date: Tue, 25 Aug 2015 18:15:49 +0000 Subject: [ITK-users] speed function for itkSpeedToPathFilter In-Reply-To: References: Message-ID: Matt and Dan - Thank you so much for getting back to me. Dan - If I understood your email correctly then a binary image (with 1 inside the vessels and 0 outside) should work as a speed function. And if that is the case then a binary mask did not work for me. I get no points in the output of SpeedToPath filter if I use a binary mask. I'm looking into White top hat filtering and vesselness currently. Like you pointed out (and as mentioned in your thesis), vesselness is slower but so far it seems to be working better than white top hat. Matt - I will look into TubeTk as well and post an update to the mailing list. Thanks again Prashanth On Tue, Aug 25, 2015 at 10:52 AM Matt McCormick wrote: > Hi Prashanth, > > Classes within TubeTK [1] specialize in creating input images that > would work well as an input to the itk::SpeedToPathFilter. > > Hope this helps, > Matt > > [1] https://github.com/KitwareMedical/TubeTK > > On Sun, Aug 23, 2015 at 5:49 AM, Dan Mueller wrote: > > Hi Prashanth, > > > > Essentially you want your speed function to be white (1.0) in the > > vessels and black (0.0) outside of the vessels ? any way you can > > achieve this is fine. The method you have outline is very general, and > > the issue is step (1) i.e. finding an approximate centreline. Some > > have suggested achieving this by applying multiscale Hessian line > > filtering (aka vessel enhancement filtering) such as Sato/Frangi > > method ? while this can achieve good results, personally I find this > > method very slow. In my own work, I have found morphological top-hat > > by opening (aka white top-hat or WTH) produces good results at a > > fraction of the computation expense, especially using the box > > structuring element with acceleration (e.g. see [1]). > > > > Good luck. > > > > Cheers, Dan > > > > [1] ?Direct volume illustration for cardiac applications,? chapter 4, > > page 83?109, http://eprints.qut.edu.au/17028/1/Daniel_Mueller_Thesis.pdf > > > > On 22 August 2015 at 06:52, Prashanth > wrote: > >> All, > >> > >> I'm working on finding the shortest path between two points in a vessel > >> tree. itkSpeedToPathFilter seems to be working well for me as long as I > >> select the right speed function. Digging through Insight Journal, I > found a > >> link to Deschamp's Ph.D. thesis > >> ( > https://tel.archives-ouvertes.fr/file/index/docid/45537/filename/index.html > ) > >> which outlines one method to select a speed function: > >> > >> 1. Approximate centerline based on the input image > >> 2. Segmentation using the approximate centerline > >> 3. Use the segmented image and approximate centerline to create an image > >> with signed distances to the approximate centerline > >> 4. Use the above image as the input speed function for > itkSpeedToPathFilter > >> > >> The above steps seem to work (I say 'seem to work' because I tested it > just > >> three 2D images so far), but are there other methods to select the speed > >> function? My input images are contrast enhanced CT images and the > vessels > >> are easy to identify and segment. Any help on how to select the correct > >> speed function will be appreciated. > >> > >> Thanks > >> Prashanth > >> > >> _____________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Kitware offers ITK Training Courses, for more information visit: > >> http://www.kitware.com/products/protraining.php > >> > >> Please keep messages on-topic and check the ITK FAQ at: > >> http://www.itk.org/Wiki/ITK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/insight-users > >> > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Wed Aug 26 08:36:39 2015 From: blowekamp at mail.nih.gov (Lowekamp, Bradley (NIH/NLM/LHC) [C]) Date: Wed, 26 Aug 2015 12:36:39 +0000 Subject: [ITK-users] NLM RFP: ITK Algorithms, Extensibility, Integration, & Outreach for SimpleITK 2015 Message-ID: The National Institutes of Health (NIH), National Library of Medicine (NLM) is solicitation proposals for improvements to SimpleITK/ITK. The FedBizOpps has complete information: https://www.fbo.gov/spg/HHS/NIH/OAM/RFP_NIHLM2015597KB/listing.html The response date is Sep 08, 2015 12:00pm Eastern. Bradley Lowekamp MSC Contractor NIH/NLM/LHC/OHPCC From fisidoro at ethz.ch Wed Aug 26 10:41:59 2015 From: fisidoro at ethz.ch (D'Isidoro Fabio) Date: Wed, 26 Aug 2015 14:41:59 +0000 Subject: [ITK-users] FW: ITK Python wrapping In-Reply-To: References: <50B858FB5F53124F9E32314E5C1B409435ACEA2D@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACEB17@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACECAC@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACED36@MBX212.d.ethz.ch> Message-ID: <50B858FB5F53124F9E32314E5C1B409435ACEE97@MBX212.d.ethz.ch> Hi Matt, I did the build again and this time everything is working properly :) As a summary of my issue: the key factor is that building ITK with Python Wrapping on Visual Studio on DEBUG mode did not produced the required *.pyd files. So in the guide you may want to remind an unexperienced Windows user that the build should be performed on RELEADE mode. My second problem was that the build did not work the first time for one of the modules. Just to figure out how to write in python with itk: I was trying to be lucky and to run an example similar to the example ImageRegistration3.py in the Examples folder of InsightToolkit-4.8.0 (in attachment). I start the code with 'import itk'. However fixedImageReader = itk.ImageFileReaderF2.New()' returns an error. Is this an old version and should I just write ' fixedImageReader = itk.ImageFileReader[ImageType].New()' instead? Which guide should I look for figuring these things out? Thank you for your valuable support. -----Original Message----- From: Matt McCormick [mailto:matt.mccormick at kitware.com] Sent: Dienstag, 25. August 2015 18:38 To: D'Isidoro Fabio Cc: insight-users at itk.org Subject: Re: FW: [ITK-users] ITK Python wrapping Hi Fabio, We are making good progress :-). The build log indicates that the build did not complete correctly: Traceback (most recent call last): File "C:/Users/difabio/ITK/InsightToolkit-4.8.0/Wrapping/Generators/SwigInterface/igenerator.py", line 923, in with open(options.typedef_output, "w") as f: IOError: [Errno 13] Permission denied: 'E:/ITK/ITK_bin_Win64_Python_Wrap/Wrapping/Typedefs/itkAffineTransformSwigInterface.h' 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code 1. 1>Done Building Project "E:\ITK\ITK_bin_Win64_Python_Wrap\Wrapping\Modules\ITKTransform\ITKTransformPython.vcxproj" (Build target(s)) -- FAILED. Please make sure the directory is writable, and run the build again. Sometimes, for example, anti-virus software can interfere with a build, and it should be disabled on a build directory. Hope this helps, Matt On Tue, Aug 25, 2015 at 11:25 AM, D'Isidoro Fabio wrote: > Hi Matt, > > Thank you. Actually I have the .dll in the bin/release. > > Shortly, I (redundantly) added then ITKbuild/bin, ITKbuild/bin/release, ITKbuild/lib, ITKbuild/lib/release to BOTH my PATH environmental variable and the WrapITK.pth. Still not working, however I have a new error (see attachment 'error'). > > Therefore I went to check the ITKTransformPython module but it's not there in lib/Release where all other .lib files relative to the other modules are. I went in the directory shown in attachment 'directory' (it's in the Wrapping/Module/.. directory) and found a log file (attachment): the build of this module failed (I check other modules and there build there did not fail). Could you please read the log? Why did just this module fail? > > Thank you again! > > -----Original Message----- > From: Matt McCormick [mailto:matt.mccormick at kitware.com] > Sent: Dienstag, 25. August 2015 16:31 > To: D'Isidoro Fabio; insight-users at itk.org > Subject: Re: FW: [ITK-users] ITK Python wrapping > > Hi Fabio, > > Thanks for the updates. > > The apparent errors are not actual errors. These result when CMake configuration runs (indicated by the preceding "--"), and CMake tests the availability of compiler features with try_compiles [1]. If an error occurs, then that feature is not used in the build. > > It is good to see that the *.pyd files are there and your Python path. > There should still be *.dll files whose folder needs to be added to the PATH system environmental variable. These are usually in the "bin" instead of "lib" directory. Search for a file "ITKCommon-4.8.dll" if you built ITK 4.8. > > Hope this helps, > Matt > > PS. Please reply-to-all so conversations remain on the mailing lists. > > [1] http://www.cmake.org/cmake/help/v3.3/command/try_compile.html > > On Tue, Aug 25, 2015 at 3:02 AM, D'Isidoro Fabio wrote: >> Sorry forgot the attachments >> >> -----Original Message----- >> From: D'Isidoro Fabio >> Sent: Dienstag, 25. August 2015 09:01 >> To: 'Matt McCormick' >> Subject: RE: [ITK-users] ITK Python wrapping >> >> One more thing: in the guide it's written to add to the PATH the directories containing the .dll files, suggesting ITKbuild, ITKbuild/bin and ITKbuild/bin/Release. >> >> However as you can see from the attachments the suggested directory has only executables, while the .lib files (I don't have .dll files) are in the ITKbuild/lib/Release (second attachment)... >> >> Anyway I tried to add the the ITKbuild/lib/Release directory to the PATH but it did not work either. >> >> >> -----Original Message----- >> From: Matt McCormick [mailto:matt.mccormick at kitware.com] >> Sent: Montag, 24. August 2015 17:08 >> To: D'Isidoro Fabio >> Cc: insight-users at itk.org >> Subject: Re: [ITK-users] ITK Python wrapping >> >> Hi Fabio, >> >>> - Well, I have a ITKPyBasePython.pyc file in the ITK lib (and the things you told me to check are allright). So the difference is that the name has no underscore _ITKPyBasePython (as reported in the error) and the extension is pyc rather than pyd (although I have read it should not make the difference). Are those things relevant? If yes, how to correct for them? Maybe the dlls were not properly compiled so the underscore is missing? >> >> Both the .pyc and the .pyd files are required. >> >> >>> Depending on your reply to this email, I will then try to build ITK with Python wrapping again so that I can report the compilation failures I got regarding CastXML. >> >> Great, thank you. A Release build instead of a Debug build is recommended -- build size and runtime performance are greatly improved. There is on going work to substantially decrease the wrapping build time in ITK Git master, but it is currently unstable. >> The 4.8.0 release is recommended until that is resolved. >> >> >>> About the symbolic link, I just read on the guide "ln -s /path/to/ITK-Wrapped/Wrapping/Generators/Python/WrapITK.pth" and went to find out what ln -s was ... but you are right, the guide says to copy the file, so I guess you don't have improve this part. Maybe just specifiy that there is no need to download Swig. >> >> Thanks for the feedback. We will improve the wrapping process description. >> >> >>> Thank you, I have spent 5 long days already with no success on this issue (which seems to me a very common issue for users willing to use the Python wrapping, from my extensive google search). >> >> Yes, wrapping has been difficult in the past, but things are changing. >> With your help, it will improve even quicker :-). >> >> >> Thanks, >> Matt -------------- next part -------------- A non-text attachment was scrubbed... Name: ImageRegistration3.py Type: application/octet-stream Size: 4069 bytes Desc: ImageRegistration3.py URL: From alii.ghayoor at gmail.com Wed Aug 26 12:47:01 2015 From: alii.ghayoor at gmail.com (Ali Ghayoor) Date: Wed, 26 Aug 2015 11:47:01 -0500 Subject: [ITK-users] Iterating through images in SimpleITK In-Reply-To: References: <8E996EF4-D71D-4832-BA01-99D76AB7E667@mail.nih.gov> Message-ID: Hello ITK users, Here is my conversation with 'Bradley Lowekamp' about the ways to iterate through an image in SimpleITK, since ITK image iterators are not included in SimpleITK interface. We were thinking that the question and answers may be helpful to entire community of ITK users. Regards, Ali From: Bradley Lowekamp Date: Tuesday, August 25, 2015 at 12:02 PM To: Ali Ghayoor Subject: Re: Iterating through images in SimpleITK This is numpy boadcasting: http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html Very similar to how to use matlab efficiently. >From this notebook [1], look at this: def marschner_lobb(size=40, alpha=0.25, f_M=6.0): img = sitk.PhysicalPointSource( sitk.sitkVectorFloat32, [size]*3, [-1]*3, [2.0/size]*3) imgx = sitk.VectorIndexSelectionCast(img, 0) imgy = sitk.VectorIndexSelectionCast(img, 1) imgz = sitk.VectorIndexSelectionCast(img, 2) del img r = sitk.Sqrt(imgx**2 + imgy**2) del imgx, imgy pr = sitk.Cos((2.0*math.pi*f_M)*sitk.Cos((math.pi/2.0)*r)) return (1.0 - sitk.Sin((math.pi/2.0)*imgz) + alpha*(1.0+pr))/(2.0*(1.0+alpha)) This simple computation of a function, could be implemented as a function of XYX. But it's implemented using operations on the whole images. Many algorithms can be structured this way where you might first thing you need the index. I don't know what you are trying to do so I can't be more specific. Brad [1] http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/20_Expand_Wit h_Interpolators.html On Aug 25, 2015, at 12:36 PM, Ghayoor, Ali wrote: > Brad, > > Thank you for your response. I think iterating using the python interface > is the easiest way if you do not need to check the index that you are > operating on at each iteration. In my case, I need to know the index > information at each iteration. > > Also, I am curious about your suggested fastest way, but I did not quite > understand that. Could you please explain that with a little more details? > > Thank you, > Ali > > > On 8/24/15, 10:09 PM, "Bradley Lowekamp" wrote: > >> Hello Ali, >> >> As for iterating on SimpleITK image, there is the totally Python >> interface to make the Image class iterable [1]. This is as slow as the 3 >> nested for loop, which is about as slow as iterating on a numpy array. >> This is the easiest and most Pythonic way. >> >> The fastest way is to reconsider your algorithm to operating on the whole >> image/array by using broadcasts and multiplying by 0s and 1s for >> conditionals. >> >> HTH, >> Brad >> >> p.s. This kind of question should be directed to the ITK mailing list so >> that the entire community can benefit. >> >> >> [1] >> https://github.com/SimpleITK/SimpleITK/blob/6acfc05c01c946316cac9bd8803d62 >> a4e0cda5b9/Wrapping/Python.i#L289-L310 >> >> On Aug 24, 2015, at 10:45 PM, Ghayoor, Ali wrote: >> >>> Hello Brad, >>> >>> I noticed that image iterators are not included in SimpleITK interface, so I >>> needed your >>> suggestion about the best way to iterate through an image while using >>> SimpleITK in Ipython notebook. I'm not sure that using three nested >>> 'for' loops is the most efficient way to do that and was thinking maybe >>> there is a better method. >>> >>> Thank you for your help, >>> Ali >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alii.ghayoor at gmail.com Wed Aug 26 13:51:49 2015 From: alii.ghayoor at gmail.com (Ali Ghayoor) Date: Wed, 26 Aug 2015 12:51:49 -0500 Subject: [ITK-users] Evaluate an image at a continues index or at a physical point in SimpleITK Message-ID: Hello, I need to evaluate an image at a continues index or at a physical point in SimpleITK. However, as I noticed in SimpleITK, interpolators are created as non-callable binary objects to be passed to other filters like ResampleImageFilter() or ImageRegistrationMethod(). It would be great if interpolators were provided as filters as well, so we could easily pass them an input image and evaluate that image in continues indices. Now, based on the current infrastructure, is there any way to get the value of an image at non-integer indices in SimpleITK? Thank you, Ali -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Aug 27 00:56:40 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 27 Aug 2015 00:56:40 -0400 Subject: [ITK-users] FW: ITK Python wrapping In-Reply-To: <50B858FB5F53124F9E32314E5C1B409435ACEE97@MBX212.d.ethz.ch> References: <50B858FB5F53124F9E32314E5C1B409435ACEA2D@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACEB17@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACECAC@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACED36@MBX212.d.ethz.ch> <50B858FB5F53124F9E32314E5C1B409435ACEE97@MBX212.d.ethz.ch> Message-ID: Hi Fabio, > I did the build again and this time everything is working properly :) Fantastic!! > As a summary of my issue: the key factor is that building ITK with Python Wrapping on Visual Studio on DEBUG mode did not produced the required *.pyd files. So in the guide you may want to remind an unexperienced Windows user that the build should be performed on RELEADE mode. My second problem was that the build did not work the first time for one of the modules. Thanks for the feedback. Please review this patch, which improves the documentation correspondingly: http://review.source.kitware.com/#/c/20143/ > Just to figure out how to write in python with itk: I was trying to be lucky and to run an example similar to the example ImageRegistration3.py in the Examples folder of InsightToolkit-4.8.0 (in attachment). I start the code with 'import itk'. However fixedImageReader = itk.ImageFileReaderF2.New()' returns an error. Is this an old version and should I just write ' fixedImageReader = itk.ImageFileReader[ImageType].New()' instead? > > Which guide should I look for figuring these things out? These examples are in a need of a major update. I have created an issue in the tracker to keep track of progress: https://issues.itk.org/jira/browse/ITK-3376 You can find some current Python examples in the ITK Sphinx Examples: http://itk.org/ITKExamples/src/Filtering/LabelMap/RemoveHolesNotConnectedToImageBoundaries/Documentation.html There are also some SimpleITK IPython notebooks on image registration here: https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks Thanks, Matt From sami.koho at gmail.com Thu Aug 27 02:14:20 2015 From: sami.koho at gmail.com (Sami Koho) Date: Thu, 27 Aug 2015 09:14:20 +0300 Subject: [ITK-users] CenteredTransformInitializer Python Wrapping Message-ID: Hello, I tried to convert a registration method that I have to use the CenteredSimilarity2DTransform instead of the CenteredRigid2DTransform in Python. There seems to be a problem however, as the CenteredTransformInitializer in Python only seems to work with the rigid transforms now. The wrapping file looks like this: itk_wrap_include("itkVersorRigid3DTransform.h") itk_wrap_include("itkCenteredRigid2DTransform.h") itk_wrap_class("itk::CenteredTransformInitializer" POINTER) itk_wrap_filter_dims(d 3) if(d) foreach(t ${WRAP_ITK_SCALAR}) itk_wrap_template("VR3DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::VersorRigid3DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") endforeach() endif(d) itk_wrap_filter_dims(d 2) if(d) foreach(t ${WRAP_ITK_SCALAR}) itk_wrap_template("CR2DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::CenteredRigid2DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") endforeach() endif(d) itk_end_wrap_class() How would I go about fixing this? Should I just add a new line, like: itk_wrap_template("CS2DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::CenteredSimilarity2DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") inside the if(d)...endif(d) for the 2D images? I could of course just try, but I thought to ask, as compilation always takes a while with the Python wrapping :-) Best, Sami -------------- next part -------------- An HTML attachment was scrubbed... URL: From sami.koho at gmail.com Thu Aug 27 05:38:45 2015 From: sami.koho at gmail.com (Sami Koho) Date: Thu, 27 Aug 2015 12:38:45 +0300 Subject: [ITK-users] CenteredTransformInitializer Python Wrapping In-Reply-To: References: Message-ID: <09279851-32AB-4125-8ED9-9E47A8BA9425@gmail.com> Hello again, I fixed the wrapping issue. I thought that I might submit a patch to ITK, but I have a question. I am using the ITK version 4.8.0, which I obtained with a checkout from the GIT repository. Is it totally fine that I create the Patch for the 4.8.0 release, or should I switch to the main branch? Best, Sami > On 27 Aug 2015, at 09:14, Sami Koho wrote: > > Hello, > > I tried to convert a registration method that I have to use the CenteredSimilarity2DTransform instead of the CenteredRigid2DTransform in Python. There seems to be a problem however, as the CenteredTransformInitializer in Python only seems to work with the rigid transforms now. The wrapping file looks like this: > > itk_wrap_include("itkVersorRigid3DTransform.h") > itk_wrap_include("itkCenteredRigid2DTransform.h") > itk_wrap_class("itk::CenteredTransformInitializer" POINTER) > itk_wrap_filter_dims(d 3) > if(d) > foreach(t ${WRAP_ITK_SCALAR}) > itk_wrap_template("VR3DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::VersorRigid3DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") > endforeach() > endif(d) > > itk_wrap_filter_dims(d 2) > if(d) > foreach(t ${WRAP_ITK_SCALAR}) > itk_wrap_template("CR2DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::CenteredRigid2DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") > endforeach() > endif(d) > itk_end_wrap_class() > > How would I go about fixing this? Should I just add a new line, like: > > itk_wrap_template("CS2DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::CenteredSimilarity2DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") > > inside the if(d)...endif(d) for the 2D images? I could of course just try, but I thought to ask, as compilation always takes a while with the Python wrapping :-) > > Best, > > Sami From blowekamp at mail.nih.gov Thu Aug 27 08:19:18 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 27 Aug 2015 08:19:18 -0400 Subject: [ITK-users] CenteredTransformInitializer Python Wrapping In-Reply-To: <09279851-32AB-4125-8ED9-9E47A8BA9425@gmail.com> References: <09279851-32AB-4125-8ED9-9E47A8BA9425@gmail.com> Message-ID: Hello, I would recommend using the "MatrixOffsetTransformBase" class for the template parameters. This enables the class to be used with any derived type. This is they way I did it in SimpleITK [1]. Brad [1] https://github.com/SimpleITK/SimpleITK/blob/master/Code/BasicFilters/src/sitkCenteredTransformInitializerFilter.cxx#L125-L126 On Aug 27, 2015, at 5:38 AM, Sami Koho wrote: > Hello again, > > I fixed the wrapping issue. I thought that I might submit a patch to ITK, but I have a question. I am using the ITK version 4.8.0, which I obtained with a checkout from the GIT repository. Is it totally fine that I create the Patch for the 4.8.0 release, or should I switch to the main branch? > > Best, > > Sami > > >> On 27 Aug 2015, at 09:14, Sami Koho wrote: >> >> Hello, >> >> I tried to convert a registration method that I have to use the CenteredSimilarity2DTransform instead of the CenteredRigid2DTransform in Python. There seems to be a problem however, as the CenteredTransformInitializer in Python only seems to work with the rigid transforms now. The wrapping file looks like this: >> >> itk_wrap_include("itkVersorRigid3DTransform.h") >> itk_wrap_include("itkCenteredRigid2DTransform.h") >> itk_wrap_class("itk::CenteredTransformInitializer" POINTER) >> itk_wrap_filter_dims(d 3) >> if(d) >> foreach(t ${WRAP_ITK_SCALAR}) >> itk_wrap_template("VR3DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::VersorRigid3DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") >> endforeach() >> endif(d) >> >> itk_wrap_filter_dims(d 2) >> if(d) >> foreach(t ${WRAP_ITK_SCALAR}) >> itk_wrap_template("CR2DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::CenteredRigid2DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") >> endforeach() >> endif(d) >> itk_end_wrap_class() >> >> How would I go about fixing this? Should I just add a new line, like: >> >> itk_wrap_template("CS2DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::CenteredSimilarity2DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") >> >> inside the if(d)...endif(d) for the 2D images? I could of course just try, but I thought to ask, as compilation always takes a while with the Python wrapping :-) >> >> 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 From bhathaw1 at nycap.rr.com Thu Aug 27 11:12:43 2015 From: bhathaw1 at nycap.rr.com (Barry Hathaway) Date: Thu, 27 Aug 2015 11:12:43 -0400 Subject: [ITK-users] Installing ITK into Eclipse/PyDev Message-ID: <55DF28EB.3030707@nycap.rr.com> I'm trying to get the ITK Python wrapping to work in my Eclipse/PyDev environment which references a Python virtual environment. I have copied WrapITK.pth into the virtual environment's Lib/site-packages and have verified that I can call various methods. The problem is that within the Eclipse editor all the ITK references appear in red as errors because it cannot find the methods. Also the method hints/autocompletion does not work. Any ideas? Thanks in advance. Barry Hathaway From matt.mccormick at kitware.com Thu Aug 27 11:41:12 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 27 Aug 2015 11:41:12 -0400 Subject: [ITK-users] CenteredTransformInitializer Python Wrapping In-Reply-To: References: <09279851-32AB-4125-8ED9-9E47A8BA9425@gmail.com> Message-ID: Hi Sami, Any patches are welcome and appreciated! Please see here [1] for Git contribution instructions. The patch can be based off the release branch. Including "release" in the topic name will help us know that is a possible patch to include in the release branch. Thanks, Matt [1] http://www.itk.org/Wiki/ITK/Git/Develop On Thu, Aug 27, 2015 at 8:19 AM, Bradley Lowekamp wrote: > Hello, > > I would recommend using the "MatrixOffsetTransformBase" class for the template parameters. This enables the class to be used with any derived type. > > This is they way I did it in SimpleITK [1]. > > > Brad > > [1] https://github.com/SimpleITK/SimpleITK/blob/master/Code/BasicFilters/src/sitkCenteredTransformInitializerFilter.cxx#L125-L126 > > On Aug 27, 2015, at 5:38 AM, Sami Koho wrote: > >> Hello again, >> >> I fixed the wrapping issue. I thought that I might submit a patch to ITK, but I have a question. I am using the ITK version 4.8.0, which I obtained with a checkout from the GIT repository. Is it totally fine that I create the Patch for the 4.8.0 release, or should I switch to the main branch? >> >> Best, >> >> Sami >> >> >>> On 27 Aug 2015, at 09:14, Sami Koho wrote: >>> >>> Hello, >>> >>> I tried to convert a registration method that I have to use the CenteredSimilarity2DTransform instead of the CenteredRigid2DTransform in Python. There seems to be a problem however, as the CenteredTransformInitializer in Python only seems to work with the rigid transforms now. The wrapping file looks like this: >>> >>> itk_wrap_include("itkVersorRigid3DTransform.h") >>> itk_wrap_include("itkCenteredRigid2DTransform.h") >>> itk_wrap_class("itk::CenteredTransformInitializer" POINTER) >>> itk_wrap_filter_dims(d 3) >>> if(d) >>> foreach(t ${WRAP_ITK_SCALAR}) >>> itk_wrap_template("VR3DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::VersorRigid3DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") >>> endforeach() >>> endif(d) >>> >>> itk_wrap_filter_dims(d 2) >>> if(d) >>> foreach(t ${WRAP_ITK_SCALAR}) >>> itk_wrap_template("CR2DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::CenteredRigid2DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") >>> endforeach() >>> endif(d) >>> itk_end_wrap_class() >>> >>> How would I go about fixing this? Should I just add a new line, like: >>> >>> itk_wrap_template("CS2DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}" "itk::CenteredSimilarity2DTransform< ${ITKT_D} >,${ITKT_I${t}${d}},${ITKT_I${t}${d}}") >>> >>> inside the if(d)...endif(d) for the 2D images? I could of course just try, but I thought to ask, as compilation always takes a while with the Python wrapping :-) >>> >>> 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 prashanth.dumpuri at gmail.com Thu Aug 27 13:03:54 2015 From: prashanth.dumpuri at gmail.com (Prashanth) Date: Thu, 27 Aug 2015 17:03:54 +0000 Subject: [ITK-users] rescaling output of vesselness filter 0 and 1 Message-ID: All, What is the best way/filter to rescale the output of Vesselness filters (like MultiScaleHessianBasedMeasureImageFilter) to lie between 0 and 1 without losing any of the information from the vesselness image? I'm using the data type of my input image as the data type for the vesselness image. So, if my input image is an int, then my vesselness image is an int image as well. I have tried itk's RescaleIntensityImageFilter and ShiftScaleImageFilter with no luck. Thanks Prashanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Aug 27 13:51:52 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 27 Aug 2015 13:51:52 -0400 Subject: [ITK-users] Installing ITK into Eclipse/PyDev In-Reply-To: <55DF28EB.3030707@nycap.rr.com> References: <55DF28EB.3030707@nycap.rr.com> Message-ID: Hi Barry, ITK uses lazy loading of its modules so that 'import itk' does not cause all of the modules to be loaded. This improves start time, but it may interfere with Eclipse/PyDev's inspection. Maybe if the IDE's Python initialization code called something like: def load_itk(): try import itk: from itk import * except ImportError: pass load_itk() the references it is seeking will be found. HTH, Matt On Thu, Aug 27, 2015 at 11:12 AM, Barry Hathaway wrote: > I'm trying to get the ITK Python wrapping to work in my Eclipse/PyDev > environment which > references a Python virtual environment. I have copied WrapITK.pth into the > virtual environment's > Lib/site-packages and have verified that I can call various methods. The > problem is that > within the Eclipse editor all the ITK references appear in red as errors > because it cannot > find the methods. Also the method hints/autocompletion does not work. Any > ideas? > Thanks in advance. > > Barry Hathaway > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Thu Aug 27 15:42:36 2015 From: matimontg at gmail.com (Matias Montroull) Date: Thu, 27 Aug 2015 19:42:36 +0000 Subject: [ITK-users] ActiViz Compile Errors Message-ID: Hi, I've downloaded Activiz 6.2 and was trying to compile (Using VS2008) and I get 151 errors. I was able to compile gccxml and mummy (with some errors) and now ActiViz throws errors like these (I only list some) Error 3658 fatal error LNK1104: cannot open file 'vtkRenderingFreeTypeOpenGL.lib' Kitware.VTK.vtkImagingCore.Unmanaged Error 3675 fatal error C1083: Cannot open source file: '.\export-layer\vtkGeoAlignedImageRepresentationEL.cxx': No such file or directory c1xx Error 3684 fatal error C1083: Cannot open source file: '.\export-layer\vtkGeoSourceEL.cxx': No such file or directory c1xx Error 3765 error PRJ0019: A tool returned an error code from "Building C# library 'Kitware.VTK'..." Kitware.VTK Error 3761 error PRJ0019: A tool returned an error code from "Generating bin/Debug/vtkzlib-6.2.dll" Kitware.VTK.CopyDLLs Error 3323 error: 'vtkViewUpdater' does not name a type C:/Users/montroul/Downloads/Programacion/ActiViz/activizdotnet_build/xml/vtkViewUpdater_gccxml.cxx:12 Any clues what could be causing these type of errors? May it be related to Mummy? Thank you, Matias. -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjklein at gmail.com Thu Aug 27 15:42:58 2015 From: tjklein at gmail.com (Tassilo Klein) Date: Thu, 27 Aug 2015 15:42:58 -0400 Subject: [ITK-users] SimpleITK Anaconda Issue Message-ID: Hi, I have issues getting my SimpleITK running on a Linux machine. I used to get errors: http://public.kitware.com/pipermail/community/2015-May/009117.html ImportError: libpng15.so.15: cannot open shared object file: No such Then I took an earlier version of libpng as mentioned here: http://public.kitware.com/pipermail/community/2015-May/009120.html conda install libpng=1.5.13 But then I get the following error: /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/colorbar.py in () 32 import matplotlib.artist as martist 33 import matplotlib.cbook as cbook---> 34 import matplotlib.collections as collections 35 import matplotlib.colors as colors 36 import matplotlib.contour as contour /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/collections.py in () 25 import matplotlib.artist as artist 26 from matplotlib.artist import allow_rasterization---> 27 import matplotlib.backend_bases as backend_bases 28 import matplotlib.path as mpath 29 from matplotlib import _path /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/backend_bases.py in () 54 55 import matplotlib.tight_bbox as tight_bbox---> 56 import matplotlib.textpath as textpath 57 from matplotlib.path import Path 58 from matplotlib.cbook import mplDeprecation /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/textpath.py in () 17 from matplotlib.path import Path 18 from matplotlib import rcParams---> 19 import matplotlib.font_manager as font_manager 20 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING 21 from matplotlib.ft2font import LOAD_TARGET_LIGHT /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_like ImportError: libpng16.so.16: cannot open shared object file: No such file or directory Any idea? Best, Tassilo -------------- next part -------------- An HTML attachment was scrubbed... URL: From zivrafael.yaniv at nih.gov Thu Aug 27 15:55:04 2015 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Thu, 27 Aug 2015 19:55:04 +0000 Subject: [ITK-users] SimpleITK Anaconda Issue In-Reply-To: References: Message-ID: Hello Tassilo, Please follow the instructions found in our FAQ 'I am using the binary distribution of SimpleITK for Anaconda, why do I get an error about libpng?' found here: http://www.itk.org/Wiki/SimpleITK/FAQ We are working on a more permanent solution for our next release. regards Ziv ________________________________ From: Tassilo Klein [tjklein at gmail.com] Sent: Thursday, August 27, 2015 3:42 PM To: insight-users at itk.org Subject: [ITK-users] SimpleITK Anaconda Issue Hi, I have issues getting my SimpleITK running on a Linux machine. I used to get errors: http://public.kitware.com/pipermail/community/2015-May/009117.html ImportError: libpng15.so.15: cannot open shared object file: No such Then I took an earlier version of libpng as mentioned here: http://public.kitware.com/pipermail/community/2015-May/009120.html conda install libpng=1.5.13 But then I get the following error: /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/colorbar.py in () 32 import matplotlib.artist as martist 33 import matplotlib.cbook as cbook ---> 34 import matplotlib.collections as collections 35 import matplotlib.colors as colors 36 import matplotlib.contour as contour /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/collections.py in () 25 import matplotlib.artist as artist 26 from matplotlib.artist import allow_rasterization ---> 27 import matplotlib.backend_bases as backend_bases 28 import matplotlib.path as mpath 29 from matplotlib import _path /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/backend_bases.py in () 54 55 import matplotlib.tight_bbox as tight_bbox ---> 56 import matplotlib.textpath as textpath 57 from matplotlib.path import Path 58 from matplotlib.cbook import mplDeprecation /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/textpath.py in () 17 from matplotlib.path import Path 18 from matplotlib import rcParams ---> 19 import matplotlib.font_manager as font_manager 20 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING 21 from matplotlib.ft2font import LOAD_TARGET_LIGHT /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm ---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_like ImportError: libpng16.so.16: cannot open shared object file: No such file or directory Any idea? Best, Tassilo -------------- next part -------------- An HTML attachment was scrubbed... URL: From bhathaw1 at nycap.rr.com Thu Aug 27 14:09:26 2015 From: bhathaw1 at nycap.rr.com (Barry Hathaway) Date: Thu, 27 Aug 2015 14:09:26 -0400 Subject: [ITK-users] Installing ITK into Eclipse/PyDev In-Reply-To: References: <55DF28EB.3030707@nycap.rr.com> Message-ID: <55DF5256.6040608@nycap.rr.com> I have also tried setting LazyLoading=False in itkConfig.py, but that did not seem to help in PyDev. On 8/27/2015 1:51 PM, Matt McCormick wrote: > Hi Barry, > > ITK uses lazy loading of its modules so that 'import itk' does not > cause all of the modules to be loaded. This improves start time, but > it may interfere with Eclipse/PyDev's inspection. Maybe if the IDE's > Python initialization code called something like: > > def load_itk(): > try import itk: > from itk import * > except ImportError: > pass > > load_itk() > > the references it is seeking will be found. > > HTH, > Matt > > > On Thu, Aug 27, 2015 at 11:12 AM, Barry Hathaway wrote: >> I'm trying to get the ITK Python wrapping to work in my Eclipse/PyDev >> environment which >> references a Python virtual environment. I have copied WrapITK.pth into the >> virtual environment's >> Lib/site-packages and have verified that I can call various methods. The >> problem is that >> within the Eclipse editor all the ITK references appear in red as errors >> because it cannot >> find the methods. Also the method hints/autocompletion does not work. Any >> ideas? >> Thanks in advance. >> >> Barry Hathaway >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the 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 tjklein at gmail.com Thu Aug 27 16:56:26 2015 From: tjklein at gmail.com (Tassilo Klein) Date: Thu, 27 Aug 2015 16:56:26 -0400 Subject: [ITK-users] SimpleITK Anaconda Issue In-Reply-To: References: Message-ID: Hi Ziv, thanks. yes, that's what I did but then I get these errors: /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_like ImportError: libpng16.so.16: cannot open shared object file: No such file or directory On Thu, Aug 27, 2015 at 3:55 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] < zivrafael.yaniv at nih.gov> wrote: > Hello Tassilo, > > Please follow the instructions found in our FAQ 'I am using the binary > distribution of SimpleITK for Anaconda, why do I get an error about > libpng?' found here: http://www.itk.org/Wiki/SimpleITK/FAQ > > We are working on a more permanent solution for our next release. > > regards > Ziv > > ------------------------------ > *From:* Tassilo Klein [tjklein at gmail.com] > *Sent:* Thursday, August 27, 2015 3:42 PM > *To:* insight-users at itk.org > *Subject:* [ITK-users] SimpleITK Anaconda Issue > > Hi, > > I have issues getting my SimpleITK running on a Linux machine. > > I used to get errors: > > http://public.kitware.com/pipermail/community/2015-May/009117.html > > ImportError: libpng15.so.15: cannot open shared object file: No such > > > > Then I took an earlier version of libpng as mentioned here: > > http://public.kitware.com/pipermail/community/2015-May/009120.html > > conda install libpng=1.5.13 > > > > But then I get the following error: > > /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/colorbar.py in () 32 import matplotlib.artist as martist 33 import matplotlib.cbook as cbook---> 34 import matplotlib.collections as collections 35 import matplotlib.colors as colors 36 import matplotlib.contour as contour > /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/collections.py in () 25 import matplotlib.artist as artist 26 from matplotlib.artist import allow_rasterization---> 27 import matplotlib.backend_bases as backend_bases 28 import matplotlib.path as mpath 29 from matplotlib import _path > /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/backend_bases.py in () 54 55 import matplotlib.tight_bbox as tight_bbox---> 56 import matplotlib.textpath as textpath 57 from matplotlib.path import Path 58 from matplotlib.cbook import mplDeprecation > /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/textpath.py in () 17 from matplotlib.path import Path 18 from matplotlib import rcParams---> 19 import matplotlib.font_manager as font_manager 20 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING 21 from matplotlib.ft2font import LOAD_TARGET_LIGHT > /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_like > ImportError: libpng16.so.16: cannot open shared object file: No such file or directory > > > > Any idea? > > Best, > Tassilo > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zivrafael.yaniv at nih.gov Thu Aug 27 17:10:43 2015 From: zivrafael.yaniv at nih.gov (Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]) Date: Thu, 27 Aug 2015 21:10:43 +0000 Subject: [ITK-users] SimpleITK Anaconda Issue In-Reply-To: References: , Message-ID: Hi Tassilo, Did you downgrade to libpng1.5 after creating the virtual environment? This is what I suggested in the thread you cited and was the solution at the time. It no longer works because anaconda upgraded additional packages. When you create the virtual environment with libpng set to 1.5 (conda create -n sitkpy anaconda libpng=1.5) all of the dependent packages are downgraded to work with this version of libpng and then you will not have this issue. The three steps are given in the FAQ that I pointed you to - I am assuming here you did not follow that solution, it is pasted below for your convenience: conda create -n sitkpy anaconda libpng=1.5 conda install -c https://conda.binstar.org/simpleitk/channel/main SimpleITK conda install libpng=1.5 If you followed this set of instructions and it doesn't work, let us know and we will try to recreate the problem and find a solution. regards Ziv ________________________________ From: Tassilo Klein [tjklein at gmail.com] Sent: Thursday, August 27, 2015 4:56 PM To: Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] Cc: insight-users at itk.org Subject: Re: [ITK-users] SimpleITK Anaconda Issue Hi Ziv, thanks. yes, that's what I did but then I get these errors: /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm ---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_like ImportError: libpng16.so.16: cannot open shared object file: No such file or directory On Thu, Aug 27, 2015 at 3:55 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] > wrote: Hello Tassilo, Please follow the instructions found in our FAQ 'I am using the binary distribution of SimpleITK for Anaconda, why do I get an error about libpng?' found here: http://www.itk.org/Wiki/SimpleITK/FAQ We are working on a more permanent solution for our next release. regards Ziv ________________________________ From: Tassilo Klein [tjklein at gmail.com] Sent: Thursday, August 27, 2015 3:42 PM To: insight-users at itk.org Subject: [ITK-users] SimpleITK Anaconda Issue Hi, I have issues getting my SimpleITK running on a Linux machine. I used to get errors: http://public.kitware.com/pipermail/community/2015-May/009117.html ImportError: libpng15.so.15: cannot open shared object file: No such Then I took an earlier version of libpng as mentioned here: http://public.kitware.com/pipermail/community/2015-May/009120.html conda install libpng=1.5.13 But then I get the following error: /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/colorbar.py in () 32 import matplotlib.artist as martist 33 import matplotlib.cbook as cbook ---> 34 import matplotlib.collections as collections 35 import matplotlib.colors as colors 36 import matplotlib.contour as contour /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/collections.py in () 25 import matplotlib.artist as artist 26 from matplotlib.artist import allow_rasterization ---> 27 import matplotlib.backend_bases as backend_bases 28 import matplotlib.path as mpath 29 from matplotlib import _path /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/backend_bases.py in () 54 55 import matplotlib.tight_bbox as tight_bbox ---> 56 import matplotlib.textpath as textpath 57 from matplotlib.path import Path 58 from matplotlib.cbook import mplDeprecation /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/textpath.py in () 17 from matplotlib.path import Path 18 from matplotlib import rcParams ---> 19 import matplotlib.font_manager as font_manager 20 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING 21 from matplotlib.ft2font import LOAD_TARGET_LIGHT /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm ---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_like ImportError: libpng16.so.16: cannot open shared object file: No such file or directory Any idea? Best, Tassilo -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Fri Aug 28 05:26:20 2015 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Fri, 28 Aug 2015 11:26:20 +0200 (CEST) Subject: [ITK-users] [ITK] rescaling output of vesselness filter 0 and 1 In-Reply-To: References: Message-ID: <710919340.97742408.1440753980328.JavaMail.zimbra@enst.fr> Hello Prashanth, What's the problem with the RescaleIntensityImageFilter ? If you set the output min / max to 0 and 1 with corresponding functions it should works. Don't forget to switch to float (or double) for the Rescaler filter output also, otherwise it's obvious you will lose information. Tim ----- Mail original ----- De: "Prashanth" ?: "itk" Envoy?: Jeudi 27 Ao?t 2015 19:03:54 Objet: [ITK] [ITK-users] rescaling output of vesselness filter 0 and 1 All, What is the best way/filter to rescale the output of Vesselness filters (like MultiScaleHessianBasedMeasureImageFilter) to lie between 0 and 1 without losing any of the information from the vesselness image? I'm using the data type of my input image as the data type for the vesselness image. So, if my input image is an int, then my vesselness image is an int image as well. I have tried itk's RescaleIntensityImageFilter and ShiftScaleImageFilter with no luck. Thanks Prashanth _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community From bhathaw1 at nycap.rr.com Fri Aug 28 08:39:20 2015 From: bhathaw1 at nycap.rr.com (Barry Hathaway) Date: Fri, 28 Aug 2015 08:39:20 -0400 Subject: [ITK-users] Building PyBuffer (itk 4.8.0/Win7/VS2012) In-Reply-To: References: <55DF28EB.3030707@nycap.rr.com> Message-ID: <55E05678.7000702@nycap.rr.com> I'm having problems building PyBuffer (itk 4.8.0) under Windows 7 64-bit using Visual Studio 2012. Numpy is 1.9.2. I get the following errors when building the BridgeNumPyPython project: Warning 1 warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION c:\python27\virtualenv\cmcenv\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h 12 1 BridgeNumPyPython Error 2 error C2057: expected constant expression c:\insighttoolkit-4.8.0\modules\remote\bridgenumpy\include\itkPyBuffer.hxx 61 1 BridgeNumPyPython Error 3 error C2466: cannot allocate an array of constant size 0 c:\insighttoolkit-4.8.0\modules\remote\bridgenumpy\include\itkPyBuffer.hxx 61 1 BridgeNumPyPython Error 4 error C2133: 'dimensions' : unknown size c:\insighttoolkit-4.8.0\modules\remote\bridgenumpy\include\itkPyBuffer.hxx 61 1 BridgeNumPyPython Error 5 error C2057: expected constant expression c:\insighttoolkit-4.8.0\modules\remote\bridgenumpy\include\itkPyBuffer.hxx 79 1 BridgeNumPyPython Error 6 error C2466: cannot allocate an array of constant size 0 c:\insighttoolkit-4.8.0\modules\remote\bridgenumpy\include\itkPyBuffer.hxx 79 1 BridgeNumPyPython Error 7 error C2133: 'reverseDimensions' : unknown size c:\insighttoolkit-4.8.0\modules\remote\bridgenumpy\include\itkPyBuffer.hxx 79 1 BridgeNumPyPython Any ideas? Thanks in advance. Barry Hathaway From blowekamp at mail.nih.gov Fri Aug 28 09:21:28 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 28 Aug 2015 09:21:28 -0400 Subject: [ITK-users] Building PyBuffer (itk 4.8.0/Win7/VS2012) In-Reply-To: <55E05678.7000702@nycap.rr.com> References: <55DF28EB.3030707@nycap.rr.com> <55E05678.7000702@nycap.rr.com> Message-ID: Hello, There were some recent updates to this module [1] that were remote module merged into the release branch. Try getting the ITK git repository [2], and checking out the release branch. HTH, Brad [1] http://review.source.kitware.com/#/c/20108/ [2] http://www.itk.org/Wiki/ITK/Git On Aug 28, 2015, at 8:39 AM, Barry Hathaway wrote: > I'm having problems building PyBuffer (itk 4.8.0) under Windows 7 64-bit using Visual Studio 2012. Numpy is 1.9.2. > I get the following errors when building the BridgeNumPyPython project: > > Warning 1 warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION c:\python27\virtualenv\cmcenv\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h 12 1 BridgeNumPyPython > > Error 2 error C2057: expected constant expression c:\insighttoolkit-4.8.0\modules\remote\bridgenumpy\include\itkPyBuffer.hxx 61 1 BridgeNumPyPython > > Error 3 error C2466: cannot allocate an array of constant size 0 c:\insighttoolkit-4.8.0\modules\remote\bridgenumpy\include\itkPyBuffer.hxx 61 1 BridgeNumPyPython > > Error 4 error C2133: 'dimensions' : unknown size c:\insighttoolkit-4.8.0\modules\remote\bridgenumpy\include\itkPyBuffer.hxx 61 1 BridgeNumPyPython > > Error 5 error C2057: expected constant expression c:\insighttoolkit-4.8.0\modules\remote\bridgenumpy\include\itkPyBuffer.hxx 79 1 BridgeNumPyPython > > Error 6 error C2466: cannot allocate an array of constant size 0 c:\insighttoolkit-4.8.0\modules\remote\bridgenumpy\include\itkPyBuffer.hxx 79 1 BridgeNumPyPython > > Error 7 error C2133: 'reverseDimensions' : unknown size c:\insighttoolkit-4.8.0\modules\remote\bridgenumpy\include\itkPyBuffer.hxx 79 1 BridgeNumPyPython > > Any ideas? > Thanks in advance. > > Barry Hathaway > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 emily-hammond at uiowa.edu Fri Aug 28 10:22:10 2015 From: emily-hammond at uiowa.edu (Hammond, Emily M) Date: Fri, 28 Aug 2015 14:22:10 +0000 Subject: [ITK-users] import Slicer defined ROI into ITK Message-ID: <2609C492EC89AB4CAAD3647B8D1A43CC2FB99252@ITSNT437.iowa.uiowa.edu> Hello, I have defined regions of interest created with Slicer (the 3D box region not a label mask) and I want to import that as a defined region into ITK so I can use it to crop an image in my pipeline. Does anyone have any insight into how I can do this? Thanks Emily H -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Aug 28 10:37:27 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 28 Aug 2015 10:37:27 -0400 Subject: [ITK-users] [ITK] import Slicer defined ROI into ITK In-Reply-To: <2609C492EC89AB4CAAD3647B8D1A43CC2FB99252@ITSNT437.iowa.uiowa.edu> References: <2609C492EC89AB4CAAD3647B8D1A43CC2FB99252@ITSNT437.iowa.uiowa.edu> Message-ID: Hello Emilly, You didn't say if this was for a CLI, or python. Here is how I didn't it for a CLI: https://github.com/blowekamp/Slicer-IASEM/blob/346a71558368117b61c9b2b26e40568597c23423/IASEMImport/IASEMImport.cxx#L73-L125 HTH, Brad On Aug 28, 2015, at 10:22 AM, Hammond, Emily M wrote: > Hello, > > I have defined regions of interest created with Slicer (the 3D box region not a label mask) and I want to import that as a defined region into ITK so I can use it to crop an image in my pipeline. Does anyone have any insight into how I can do this? > > Thanks > Emily H > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > _______________________________________________ > Community mailing list > Community at itk.org > http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From emily-hammond at uiowa.edu Fri Aug 28 13:13:31 2015 From: emily-hammond at uiowa.edu (Hammond, Emily M) Date: Fri, 28 Aug 2015 17:13:31 +0000 Subject: [ITK-users] [ITK] import Slicer defined ROI into ITK In-Reply-To: References: <2609C492EC89AB4CAAD3647B8D1A43CC2FB99252@ITSNT437.iowa.uiowa.edu>, Message-ID: <2609C492EC89AB4CAAD3647B8D1A43CC2FB992AB@ITSNT437.iowa.uiowa.edu> That makes sense! Thanks much!! ________________________________ From: Bradley Lowekamp [blowekamp at mail.nih.gov] Sent: Friday, August 28, 2015 9:37 AM To: Hammond, Emily M Cc: insight users Subject: Re: [ITK] [ITK-users] import Slicer defined ROI into ITK Hello Emilly, You didn't say if this was for a CLI, or python. Here is how I didn't it for a CLI: https://github.com/blowekamp/Slicer-IASEM/blob/346a71558368117b61c9b2b26e40568597c23423/IASEMImport/IASEMImport.cxx#L73-L125 HTH, Brad On Aug 28, 2015, at 10:22 AM, Hammond, Emily M > wrote: Hello, I have defined regions of interest created with Slicer (the 3D box region not a label mask) and I want to import that as a defined region into ITK so I can use it to crop an image in my pipeline. Does anyone have any insight into how I can do this? Thanks Emily H _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-users _______________________________________________ Community mailing list Community at itk.org http://public.kitware.com/mailman/listinfo/community -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Fri Aug 28 14:52:49 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 28 Aug 2015 14:52:49 -0400 Subject: [ITK-users] ActiViz Compile Errors In-Reply-To: References: Message-ID: Hi Matias, The vtk-users may be more helpful with this. Matt On Thu, Aug 27, 2015 at 3:42 PM, Matias Montroull wrote: > Hi, > > I've downloaded Activiz 6.2 and was trying to compile (Using VS2008) and I > get 151 errors. > > I was able to compile gccxml and mummy (with some errors) and now ActiViz > throws errors like these (I only list some) > > Error 3658 fatal error LNK1104: cannot open file > 'vtkRenderingFreeTypeOpenGL.lib' Kitware.VTK.vtkImagingCore.Unmanaged > Error 3675 fatal error C1083: Cannot open source file: > '.\export-layer\vtkGeoAlignedImageRepresentationEL.cxx': No such file or > directory c1xx > Error 3684 fatal error C1083: Cannot open source file: > '.\export-layer\vtkGeoSourceEL.cxx': No such file or directory c1xx > > > Error 3765 error PRJ0019: A tool returned an error code from "Building C# > library 'Kitware.VTK'..." Kitware.VTK > > Error 3761 error PRJ0019: A tool returned an error code from "Generating > bin/Debug/vtkzlib-6.2.dll" Kitware.VTK.CopyDLLs > > Error 3323 error: 'vtkViewUpdater' does not name a type > C:/Users/montroul/Downloads/Programacion/ActiViz/activizdotnet_build/xml/vtkViewUpdater_gccxml.cxx:12 > > > Any clues what could be causing these type of errors? May it be related to > Mummy? > > Thank you, > > Matias. > -- > Matias > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From tjklein at gmail.com Fri Aug 28 18:52:54 2015 From: tjklein at gmail.com (Tassilo Klein) Date: Fri, 28 Aug 2015 18:52:54 -0400 Subject: [ITK-users] SimpleITK Anaconda Issue In-Reply-To: References: Message-ID: Thanks Ziv, I forgot to activate the environment before. After following the steps, now I get a different error when trying to load an image, which worked some time before: /home/tjklein/anaconda/envs/sitkpy3/lib/python2.7/site-packages/SimpleITK/SimpleITK.py in ReadImage(*args) 7726 7727 """-> 7728 return _SimpleITK.ReadImage(*args) 7729 class HashImageFilter(ProcessObject): 7730 """ RuntimeError: Exception thrown in SimpleITK ReadImage: /home/blowekamp/anaconda/conda-bld/work/Code/IO/src/sitkImageSeriesReader.cxx:143: sitk::ERROR: The file in the series have unsupported 3 dimensions. On Thu, Aug 27, 2015 at 5:10 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] < zivrafael.yaniv at nih.gov> wrote: > Hi Tassilo, > > Did you downgrade to libpng1.5 after creating the virtual environment? > This is what I suggested in the thread you cited and was the solution at > the time. It no longer works because anaconda upgraded additional packages. > > When you create the virtual environment with libpng set to 1.5 (conda > create -n sitkpy anaconda libpng=1.5) all of the dependent packages are > downgraded to work with this version of libpng and then you will not have > this issue. The three steps are given in the FAQ that I pointed you to - I > am assuming here you did not follow that solution, it is pasted below for > your convenience: > > conda create -n sitkpy anaconda libpng=1.5 > conda install -c https://conda.binstar.org/simpleitk/channel/main > SimpleITK > conda install libpng=1.5 > > If you followed this set of instructions and it doesn't work, let us know > and we will try to recreate the problem and find a solution. > > regards > Ziv > > ------------------------------ > *From:* Tassilo Klein [tjklein at gmail.com] > *Sent:* Thursday, August 27, 2015 4:56 PM > *To:* Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] > *Cc:* insight-users at itk.org > *Subject:* Re: [ITK-users] SimpleITK Anaconda Issue > > Hi Ziv, > > thanks. yes, that's what I did but then I get these errors: > > /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_like > ImportError: libpng16.so.16: cannot open shared object file: No such file or directory > > > On Thu, Aug 27, 2015 at 3:55 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] < > zivrafael.yaniv at nih.gov> wrote: > >> Hello Tassilo, >> >> Please follow the instructions found in our FAQ 'I am using the binary >> distribution of SimpleITK for Anaconda, why do I get an error about >> libpng?' found here: http://www.itk.org/Wiki/SimpleITK/FAQ >> >> We are working on a more permanent solution for our next release. >> >> regards >> Ziv >> >> ------------------------------ >> *From:* Tassilo Klein [tjklein at gmail.com] >> *Sent:* Thursday, August 27, 2015 3:42 PM >> *To:* insight-users at itk.org >> *Subject:* [ITK-users] SimpleITK Anaconda Issue >> >> Hi, >> >> I have issues getting my SimpleITK running on a Linux machine. >> >> I used to get errors: >> >> http://public.kitware.com/pipermail/community/2015-May/009117.html >> >> ImportError: libpng15.so.15: cannot open shared object file: No such >> >> >> >> Then I took an earlier version of libpng as mentioned here: >> >> http://public.kitware.com/pipermail/community/2015-May/009120.html >> >> conda install libpng=1.5.13 >> >> >> >> But then I get the following error: >> >> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/colorbar.py in () 32 import matplotlib.artist as martist 33 import matplotlib.cbook as cbook---> 34 import matplotlib.collections as collections 35 import matplotlib.colors as colors 36 import matplotlib.contour as contour >> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/collections.py in () 25 import matplotlib.artist as artist 26 from matplotlib.artist import allow_rasterization---> 27 import matplotlib.backend_bases as backend_bases 28 import matplotlib.path as mpath 29 from matplotlib import _path >> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/backend_bases.py in () 54 55 import matplotlib.tight_bbox as tight_bbox---> 56 import matplotlib.textpath as textpath 57 from matplotlib.path import Path 58 from matplotlib.cbook import mplDeprecation >> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/textpath.py in () 17 from matplotlib.path import Path 18 from matplotlib import rcParams---> 19 import matplotlib.font_manager as font_manager 20 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING 21 from matplotlib.ft2font import LOAD_TARGET_LIGHT >> /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () 56 import matplotlib 57 from matplotlib import afm---> 58 from matplotlib import ft2font 59 from matplotlib import rcParams, get_cachedir 60 from matplotlib.cbook import is_string_like >> ImportError: libpng16.so.16: cannot open shared object file: No such file or directory >> >> >> >> Any idea? >> >> Best, >> Tassilo >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Fri Aug 28 19:37:02 2015 From: fotosentido at gmail.com (Marcos) Date: Sat, 29 Aug 2015 01:37:02 +0200 Subject: [ITK-users] Connecting multiframe dicom file to VTK Message-ID: Hi, I'm using itk::ImageToVTKImageFilter to connect itk::ImageFileReader with vtkImageViewer2. I can visualize my image in QVTKWidget. I don't know if I'm reading correctly with ITK to pass that to VTK: I'd like to access every frame, but vtkImageViewer2::getMaxSlice() is returning 0 every time. I'm connecting the pipeline with: imageData->DeepCopy(connector->GetOutput()); imageViewer->SetInputData(imageData); Any ideas? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Fri Aug 28 19:52:49 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 28 Aug 2015 19:52:49 -0400 Subject: [ITK-users] Connecting multiframe dicom file to VTK In-Reply-To: References: Message-ID: Hi Marcos, Are you calling ->Update() on connector? Matt On Fri, Aug 28, 2015 at 7:37 PM, Marcos wrote: > Hi, > > I'm using itk::ImageToVTKImageFilter to connect itk::ImageFileReader with > vtkImageViewer2. > > I can visualize my image in QVTKWidget. > > I don't know if I'm reading correctly with ITK to pass that to VTK: > > I'd like to access every frame, but vtkImageViewer2::getMaxSlice() is > returning 0 every time. > > I'm connecting the pipeline with: > > imageData->DeepCopy(connector->GetOutput()); > > imageViewer->SetInputData(imageData); > > > > Any ideas? > > Thanks. > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From fotosentido at gmail.com Fri Aug 28 20:04:35 2015 From: fotosentido at gmail.com (Marcos) Date: Sat, 29 Aug 2015 02:04:35 +0200 Subject: [ITK-users] Connecting multiframe dicom file to VTK In-Reply-To: References: Message-ID: Hi Matt, yes, otherwise I guess I couldn't see anything: con->SetInput(itkImage); con->Update(); imageData->DeepCopy(con->GetOutput()); imageViewer->SetInputData(imageData); imageViewer->GetRenderer()->ResetCamera(); // some renderwindow and interactor settings for the widget widget->update() I'd like to change frames, but I guess I'm sending just one frame. Also, I can't find an example from ITK to access each frame. If I can't set a pipeline so I can do it from VTK, maybe I can read a slice in ITK when I need it and pass that frame through the connector and update. Maybe I shouldn't use an itk::ImageFileReader, I don't know. 2015-08-29 1:52 GMT+02:00 Matt McCormick : > Hi Marcos, > > Are you calling ->Update() on connector? > > Matt > > On Fri, Aug 28, 2015 at 7:37 PM, Marcos wrote: > > Hi, > > > > I'm using itk::ImageToVTKImageFilter to connect itk::ImageFileReader with > > vtkImageViewer2. > > > > I can visualize my image in QVTKWidget. > > > > I don't know if I'm reading correctly with ITK to pass that to VTK: > > > > I'd like to access every frame, but vtkImageViewer2::getMaxSlice() is > > returning 0 every time. > > > > I'm connecting the pipeline with: > > > > imageData->DeepCopy(connector->GetOutput()); > > > > imageViewer->SetInputData(imageData); > > > > > > > > Any ideas? > > > > Thanks. > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From siavashk at ece.ubc.ca Fri Aug 28 19:36:58 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Fri, 28 Aug 2015 16:36:58 -0700 (MST) Subject: [ITK-users] Connecting multiframe dicom file to VTK In-Reply-To: References: Message-ID: <1440805018163-36071.post@n7.nabble.com> Marcos, isn't vtkImageViewer2 only suitable for 2D images? If that is the case, it most likely ignores data along the z-axis. Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Connecting-multiframe-dicom-file-to-VTK-tp36068p36071.html Sent from the ITK - Users mailing list archive at Nabble.com. From fotosentido at gmail.com Fri Aug 28 20:28:25 2015 From: fotosentido at gmail.com (Marcos) Date: Sat, 29 Aug 2015 02:28:25 +0200 Subject: [ITK-users] Connecting multiframe dicom file to VTK In-Reply-To: <1440805018163-36071.post@n7.nabble.com> References: <1440805018163-36071.post@n7.nabble.com> Message-ID: Wow, that's the idea!! When I readed your answer, I tought: "maybe I should try ImageSeriesReader with my file" But then I remembered my itk::Image was of 2 dimensions ( I visualize 2D images ). So I set it to 3 and voil?: my vtkImageReader object told me my file has 11 frames, and I can iterate from that object. So vtkImageViewer2 is suitable for multiframe images as long as you specify your itk Image has 3 dimensions. Thank you so much. 2015-08-29 1:36 GMT+02:00 Siavash Khallaghi : > Marcos, isn't vtkImageViewer2 only suitable for 2D images? If that is the > case, it most likely ignores data along the z-axis. > > Siavash > > > > -- > View this message in context: > http://itk-users.7.n7.nabble.com/ITK-users-Connecting-multiframe-dicom-file-to-VTK-tp36068p36071.html > Sent from the ITK - Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bakkari.abdelkhalek at hotmail.fr Sat Aug 29 03:53:45 2015 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Sat, 29 Aug 2015 08:53:45 +0100 Subject: [ITK-users] ITK MAC WATERSHED Message-ID: Hello! Please, How can I build the Watershed algorithm with ITK in MAC ? Regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Sat Aug 29 11:12:35 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Sat, 29 Aug 2015 11:12:35 -0400 Subject: [ITK-users] SimpleITK Anaconda Issue In-Reply-To: References: Message-ID: <8E140389-E26E-4949-9000-52A3958666E0@mail.nih.gov> Hello, That is great you got SimpleITK up and running by following those updated instructions for Anaconda. Could you describe what you are trying to do and have a snippet of code? Brad On Aug 28, 2015, at 6:52 PM, Tassilo Klein wrote: > Thanks Ziv, > > I forgot to activate the environment before. > > After following the steps, now I get a different error when trying to load an image, which worked some time before: > > /home/tjklein/anaconda/envs/sitkpy3/lib/python2.7/site-packages/SimpleITK/SimpleITK.py in ReadImage(*args) > 7726 > 7727 """ > -> 7728 return _SimpleITK.ReadImage(*args) > 7729 class HashImageFilter(ProcessObject): > 7730 """ > > RuntimeError: Exception thrown in SimpleITK ReadImage: /home/blowekamp/anaconda/conda-bld/work/Code/IO/src/sitkImageSeriesReader.cxx:143: > sitk::ERROR: The file in the series have unsupported 3 dimensions. > > > On Thu, Aug 27, 2015 at 5:10 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] wrote: > Hi Tassilo, > > Did you downgrade to libpng1.5 after creating the virtual environment? This is what I suggested in the thread you cited and was the solution at the time. It no longer works because anaconda upgraded additional packages. > > When you create the virtual environment with libpng set to 1.5 (conda create -n sitkpy anaconda libpng=1.5) all of the dependent packages are downgraded to work with this version of libpng and then you will not have this issue. The three steps are given in the FAQ that I pointed you to - I am assuming here you did not follow that solution, it is pasted below for your convenience: > > conda create -n sitkpy anaconda libpng=1.5 > conda install -c https://conda.binstar.org/simpleitk/channel/main SimpleITK > conda install libpng=1.5 > > If you followed this set of instructions and it doesn't work, let us know and we will try to recreate the problem and find a solution. > > regards > Ziv > > From: Tassilo Klein [tjklein at gmail.com] > Sent: Thursday, August 27, 2015 4:56 PM > To: Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] > Cc: insight-users at itk.org > Subject: Re: [ITK-users] SimpleITK Anaconda Issue > > Hi Ziv, > > thanks. yes, that's what I did but then I get these errors: > > /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () > 56 import matplotlib > 57 from matplotlib import afm > ---> 58 from matplotlib import ft2font > 59 from matplotlib import rcParams, get_cachedir > 60 from matplotlib.cbook import is_string_like > > ImportError: libpng16.so.16: cannot open shared object file: No such file or directory > > On Thu, Aug 27, 2015 at 3:55 PM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] wrote: > Hello Tassilo, > > Please follow the instructions found in our FAQ 'I am using the binary distribution of SimpleITK for Anaconda, why do I get an error about libpng?' found here: http://www.itk.org/Wiki/SimpleITK/FAQ > > We are working on a more permanent solution for our next release. > > regards > Ziv > > From: Tassilo Klein [tjklein at gmail.com] > Sent: Thursday, August 27, 2015 3:42 PM > To: insight-users at itk.org > Subject: [ITK-users] SimpleITK Anaconda Issue > > Hi, > > I have issues getting my SimpleITK running on a Linux machine. > > I used to get errors: > > http://public.kitware.com/pipermail/community/2015-May/009117.html > > ImportError: libpng15.so.15: cannot open shared object file: No such > > > Then I took an earlier version of libpng as mentioned here: > > http://public.kitware.com/pipermail/community/2015-May/009120.html > conda install libpng=1.5.13 > > > But then I get the following error: > > /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/colorbar.py in () > 32 import matplotlib.artist as martist > 33 import matplotlib.cbook as cbook > ---> 34 import matplotlib.collections as collections > 35 import matplotlib.colors as colors > 36 import matplotlib.contour as contour > > /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/collections.py in () > 25 import matplotlib.artist as artist > 26 from matplotlib.artist import allow_rasterization > ---> 27 import matplotlib.backend_bases as backend_bases > 28 import matplotlib.path as mpath > 29 from matplotlib import _path > > /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/backend_bases.py in () > 54 > 55 import matplotlib.tight_bbox as tight_bbox > ---> 56 import matplotlib.textpath as textpath > 57 from matplotlib.path import Path > 58 from matplotlib.cbook import mplDeprecation > > /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/textpath.py in () > 17 from matplotlib.path import Path > 18 from matplotlib import rcParams > ---> 19 import matplotlib.font_manager as font_manager > 20 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING > 21 from matplotlib.ft2font import LOAD_TARGET_LIGHT > > /home/tjklein/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py in () > 56 import matplotlib > 57 from matplotlib import afm > ---> 58 from matplotlib import ft2font > 59 from matplotlib import rcParams, get_cachedir > 60 from matplotlib.cbook import is_string_like > > ImportError: libpng16.so.16: cannot open shared object file: No such file or directory > > > Any idea? > > Best, > Tassilo > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Sat Aug 29 16:51:37 2015 From: fotosentido at gmail.com (Marcos) Date: Sat, 29 Aug 2015 22:51:37 +0200 Subject: [ITK-users] Can't iterate over MetadataDictionary from GDCMImageIO Message-ID: Hi, I'm using this example: http://www.itk.org/Doxygen/html/Examples_2IO_2DicomSeriesReadPrintTags_8cxx-example.html to try to get metadata info, but it never gets into the while: typedef itk::MetaDataDictionary DictionaryType; itk::GDCMImageIO::Pointer dicomIO = itk::GDCMImageIO::New(); const DictionaryType &dic = dicomIO->GetMetaDataDictionary(); typedef itk::MetaDataObject MetadataStringType; DictionaryType::ConstIterator itr = dic.Begin(); DictionaryType::ConstIterator end = dic.End(); while (itr != end) { ... } It doesn't depend on the file, I'm using it inside that while. But I never get into. The two iterators are the same? Why? I'm using ITK 4.8.0. The code is fine, right? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Sat Aug 29 17:44:51 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 29 Aug 2015 17:44:51 -0400 Subject: [ITK-users] Can't iterate over MetadataDictionary from GDCMImageIO In-Reply-To: References: Message-ID: Hi Marcos, If BUILD_EXAMPLES and BUILD_TESTING is turned on in your ITK CMake configuration, and the ITKData target has been built, the example and testing data are available in the build tree. Run ./bin/DicomSeriesReadPrintTag ./ExternalData/Testing/Data/Input/DicomSeries and the tags will be printed out. Hope this helps, Matt On Sat, Aug 29, 2015 at 4:51 PM, Marcos wrote: > Hi, > > I'm using this example: > http://www.itk.org/Doxygen/html/Examples_2IO_2DicomSeriesReadPrintTags_8cxx-example.html > > to try to get metadata info, but it never gets into the while: > > typedef itk::MetaDataDictionary DictionaryType; > > itk::GDCMImageIO::Pointer dicomIO = itk::GDCMImageIO::New(); > > const DictionaryType &dic = dicomIO->GetMetaDataDictionary(); > > > typedef itk::MetaDataObject MetadataStringType; > > DictionaryType::ConstIterator itr = dic.Begin(); > > DictionaryType::ConstIterator end = dic.End(); > > > while (itr != end) > > { > > ... > > } > > > > It doesn't depend on the file, I'm using it inside that while. But I never > get into. The two iterators are the same? Why? > > > I'm using ITK 4.8.0. > > > The code is fine, right? > > > Thanks. > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From fotosentido at gmail.com Sat Aug 29 18:40:46 2015 From: fotosentido at gmail.com (Marcos) Date: Sun, 30 Aug 2015 00:40:46 +0200 Subject: [ITK-users] Can't iterate over MetadataDictionary from GDCMImageIO In-Reply-To: References: Message-ID: Hi, I did that, but it gives me the error: itk::ExceptionObject <...> Location: "void __thiscall itk::ImageSeriesReader::GenerateOutputInformation(void)" File ...ImageSeriesReader.hxx: Line 122 At least one filename is required. Instead of ./ExternalData/Testing/Data/Input/DicomSeries (which is a directory), I've tried a dcm file, for example. The error is the same. I'm on Windows, so I did on cmd: C:\ITK-4.8.0-build> bin\Debug\DicomSeriesReadPrintTags.exe /ExternalData/Testing/Data/Input/DicomSeries And also: C:\ITK-4.8.0-build> bin\Debug\DicomSeriesReadPrintTags.exe C:\myfile.dcm 2015-08-29 23:44 GMT+02:00 Matt McCormick : > Hi Marcos, > > If BUILD_EXAMPLES and BUILD_TESTING is turned on in your ITK CMake > configuration, and the ITKData target has been built, the example and > testing data are available in the build tree. Run > > ./bin/DicomSeriesReadPrintTag > ./ExternalData/Testing/Data/Input/DicomSeries > > and the tags will be printed out. > > Hope this helps, > Matt > > > > On Sat, Aug 29, 2015 at 4:51 PM, Marcos wrote: > > Hi, > > > > I'm using this example: > > > http://www.itk.org/Doxygen/html/Examples_2IO_2DicomSeriesReadPrintTags_8cxx-example.html > > > > to try to get metadata info, but it never gets into the while: > > > > typedef itk::MetaDataDictionary DictionaryType; > > > > itk::GDCMImageIO::Pointer dicomIO = itk::GDCMImageIO::New(); > > > > const DictionaryType &dic = dicomIO->GetMetaDataDictionary(); > > > > > > typedef itk::MetaDataObject MetadataStringType; > > > > DictionaryType::ConstIterator itr = dic.Begin(); > > > > DictionaryType::ConstIterator end = dic.End(); > > > > > > while (itr != end) > > > > { > > > > ... > > > > } > > > > > > > > It doesn't depend on the file, I'm using it inside that while. But I > never > > get into. The two iterators are the same? Why? > > > > > > I'm using ITK 4.8.0. > > > > > > The code is fine, right? > > > > > > Thanks. > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Sat Aug 29 20:28:02 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 29 Aug 2015 20:28:02 -0400 Subject: [ITK-users] Can't iterate over MetadataDictionary from GDCMImageIO In-Reply-To: References: Message-ID: On Sat, Aug 29, 2015 at 6:40 PM, Marcos wrote: > Hi, > > I did that, but it gives me the error: > > itk::ExceptionObject <...> > Location: "void __thiscall itk::ImageSeriesReader itk::Image::GenerateOutputInformation(void)" > File ...ImageSeriesReader.hxx: Line 122 > At least one filename is required. > > Instead of ./ExternalData/Testing/Data/Input/DicomSeries (which is a > directory), I've tried a dcm file, for example. The error is the same. > > I'm on Windows, so I did on cmd: > > > C:\ITK-4.8.0-build> bin\Debug\DicomSeriesReadPrintTags.exe > /ExternalData/Testing/Data/Input/DicomSeries It needs to be ./ExternalData instead of /ExternalData. Check that the files are there with the "dir" command. HTH, Matt From fotosentido at gmail.com Sun Aug 30 05:42:51 2015 From: fotosentido at gmail.com (Marcos) Date: Sun, 30 Aug 2015 11:42:51 +0200 Subject: [ITK-users] Can't iterate over MetadataDictionary from GDCMImageIO In-Reply-To: References: Message-ID: You're right, these were only .md5 files I built it again and now I have dcm files. And yes, I can see tags. So I don't understand why I can't get into that while loop. It's just a few lines of code, it compiles... It's not really a big thing. I guess I'm missing something. 2015-08-30 2:28 GMT+02:00 Matt McCormick : > On Sat, Aug 29, 2015 at 6:40 PM, Marcos wrote: > > Hi, > > > > I did that, but it gives me the error: > > > > itk::ExceptionObject <...> > > Location: "void __thiscall itk::ImageSeriesReader > itk::Image::GenerateOutputInformation(void)" > > File ...ImageSeriesReader.hxx: Line 122 > > At least one filename is required. > > > > Instead of ./ExternalData/Testing/Data/Input/DicomSeries (which is a > > directory), I've tried a dcm file, for example. The error is the same. > > > > I'm on Windows, so I did on cmd: > > > > > > C:\ITK-4.8.0-build> bin\Debug\DicomSeriesReadPrintTags.exe > > /ExternalData/Testing/Data/Input/DicomSeries > > It needs to be ./ExternalData instead of /ExternalData. > > Check that the files are there with the "dir" command. > > HTH, > Matt > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Sun Aug 30 06:04:53 2015 From: fotosentido at gmail.com (Marcos) Date: Sun, 30 Aug 2015 12:04:53 +0200 Subject: [ITK-users] Can't iterate over MetadataDictionary from GDCMImageIO In-Reply-To: References: Message-ID: I got it: I created a new GDCMImageIO::Pointer (inside another method), instead of using the one that let me read the file. That was the reason. Sorry for not seeing it before. Thanks, as always, for your time. 2015-08-30 11:42 GMT+02:00 Marcos : > You're right, these were only .md5 files > > I built it again and now I have dcm files. > > And yes, I can see tags. > > So I don't understand why I can't get into that while loop. It's just a > few lines of code, it compiles... It's not really a big thing. > > I guess I'm missing something. > > 2015-08-30 2:28 GMT+02:00 Matt McCormick : > >> On Sat, Aug 29, 2015 at 6:40 PM, Marcos wrote: >> > Hi, >> > >> > I did that, but it gives me the error: >> > >> > itk::ExceptionObject <...> >> > Location: "void __thiscall itk::ImageSeriesReader> > itk::Image::GenerateOutputInformation(void)" >> > File ...ImageSeriesReader.hxx: Line 122 >> > At least one filename is required. >> > >> > Instead of ./ExternalData/Testing/Data/Input/DicomSeries (which is a >> > directory), I've tried a dcm file, for example. The error is the same. >> > >> > I'm on Windows, so I did on cmd: >> > >> > >> > C:\ITK-4.8.0-build> bin\Debug\DicomSeriesReadPrintTags.exe >> > /ExternalData/Testing/Data/Input/DicomSeries >> >> It needs to be ./ExternalData instead of /ExternalData. >> >> Check that the files are there with the "dir" command. >> >> HTH, >> Matt >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Mon Aug 31 15:54:58 2015 From: fotosentido at gmail.com (Marcos) Date: Mon, 31 Aug 2015 21:54:58 +0200 Subject: [ITK-users] Export specific frame/slice of multiframe dicom file: ExtractSliceImageFilter? Message-ID: Hi, I have an itk:Image so I can see the different slices/frames on an QVTKWidget. I can export the frame I'm viewing to an JPG with vtkJPEGWriter() but it uses the windowrenderer and the output depends on the size of the widget. So I think it would be better to export the original. I'm using itk:ImageFileWriter, but I can't find how to specify the frame I want, so it gives an error saying my image has 3 dimensions and it can't export to 2D dimensions. I found itk::ExtractSliceImageFilter, but I can't find examples. I don't understand how to apply it to this case, can't find how to tell it "your output is the n frame". Is that the class I need? Any hints using it? -------------- next part -------------- An HTML attachment was scrubbed... URL: From prashanth.dumpuri at gmail.com Mon Aug 31 16:14:17 2015 From: prashanth.dumpuri at gmail.com (Prashanth) Date: Mon, 31 Aug 2015 20:14:17 +0000 Subject: [ITK-users] speed function for itkSpeedToPathFilter In-Reply-To: References: Message-ID: Matt - I did not have success building TubeTk. First I got errors related to Boost (even though the build instructions said it was optional) and then I got errors related to KW Widgets. So, I abandoned building TubeTk. Dan - Thanks again for the link but WhiteHatTopImageFilter did not work for me. Again, if I read your email correctly then you said that a binary image (1 inside vessel, 0 outside) should work as input for itkSpeedFunctionToPathFilter. Binary images did not work for me either - I ended up with zero points in my shortest path. In case someone else stumbles across this post here's what worked for me: (Defining the problem again) My goal is to find the shortest path between two points that lie on a vessel's centerline. What worked for me: (assumes that input image and all other intermediate outputs are double images. if not, cast your image). 1. Crop the input image (to speed up computations) 2. Select seeds on cropped image and use itkConfidenceConnectedmageFilter to segment vessel 3. Fill the holes in the segmented binary image 4. Multiply the above image (hole filled binary segmented image) with cropped image 5. Use image from step 4 as input for itkMultiScaleHessianBasedMeasureImageFilter. I used itkHessianToObjectnessMeasureImageFilter as my hessian measure filter input. Note that I had to set SetScaleObjectnessMeasure to TRUE for itkHessianToObjectnessMeasureImageFilter to work. 6. Rescale itkMultiScaleHessianBasedMeasureImageFilter to lie between 0 and 1 7. Select start and end point and run itkSpeedFunctionToPathFilter Thanks again to Matt and Dan for responding and helping me out. Prashanth On Tue, Aug 25, 2015 at 11:16 AM Prashanth wrote: > Matt and Dan - Thank you so much for getting back to me. > > Dan - If I understood your email correctly then a binary image (with 1 > inside the vessels and 0 outside) should work as a speed function. And if > that is the case then a binary mask did not work for me. I get no points in > the output of SpeedToPath filter if I use a binary mask. I'm looking into > White top hat filtering and vesselness currently. Like you pointed out (and > as mentioned in your thesis), vesselness is slower but so far it seems to > be working better than white top hat. > > Matt - I will look into TubeTk as well and post an update to the mailing > list. > > Thanks again > Prashanth > > On Tue, Aug 25, 2015 at 10:52 AM Matt McCormick < > matt.mccormick at kitware.com> wrote: > >> Hi Prashanth, >> >> Classes within TubeTK [1] specialize in creating input images that >> would work well as an input to the itk::SpeedToPathFilter. >> >> Hope this helps, >> Matt >> >> [1] https://github.com/KitwareMedical/TubeTK >> >> On Sun, Aug 23, 2015 at 5:49 AM, Dan Mueller wrote: >> > Hi Prashanth, >> > >> > Essentially you want your speed function to be white (1.0) in the >> > vessels and black (0.0) outside of the vessels ? any way you can >> > achieve this is fine. The method you have outline is very general, and >> > the issue is step (1) i.e. finding an approximate centreline. Some >> > have suggested achieving this by applying multiscale Hessian line >> > filtering (aka vessel enhancement filtering) such as Sato/Frangi >> > method ? while this can achieve good results, personally I find this >> > method very slow. In my own work, I have found morphological top-hat >> > by opening (aka white top-hat or WTH) produces good results at a >> > fraction of the computation expense, especially using the box >> > structuring element with acceleration (e.g. see [1]). >> > >> > Good luck. >> > >> > Cheers, Dan >> > >> > [1] ?Direct volume illustration for cardiac applications,? chapter 4, >> > page 83?109, >> http://eprints.qut.edu.au/17028/1/Daniel_Mueller_Thesis.pdf >> > >> > On 22 August 2015 at 06:52, Prashanth >> wrote: >> >> All, >> >> >> >> I'm working on finding the shortest path between two points in a vessel >> >> tree. itkSpeedToPathFilter seems to be working well for me as long as I >> >> select the right speed function. Digging through Insight Journal, I >> found a >> >> link to Deschamp's Ph.D. thesis >> >> ( >> https://tel.archives-ouvertes.fr/file/index/docid/45537/filename/index.html >> ) >> >> which outlines one method to select a speed function: >> >> >> >> 1. Approximate centerline based on the input image >> >> 2. Segmentation using the approximate centerline >> >> 3. Use the segmented image and approximate centerline to create an >> image >> >> with signed distances to the approximate centerline >> >> 4. Use the above image as the input speed function for >> itkSpeedToPathFilter >> >> >> >> The above steps seem to work (I say 'seem to work' because I tested it >> just >> >> three 2D images so far), but are there other methods to select the >> speed >> >> function? My input images are contrast enhanced CT images and the >> vessels >> >> are easy to identify and segment. Any help on how to select the correct >> >> speed function will be appreciated. >> >> >> >> Thanks >> >> Prashanth >> >> >> >> _____________________________________ >> >> Powered by www.kitware.com >> >> >> >> Visit other Kitware open-source projects at >> >> http://www.kitware.com/opensource/opensource.html >> >> >> >> Kitware offers ITK Training Courses, for more information visit: >> >> http://www.kitware.com/products/protraining.php >> >> >> >> Please keep messages on-topic and check the ITK FAQ at: >> >> http://www.itk.org/Wiki/ITK_FAQ >> >> >> >> Follow this link to subscribe/unsubscribe: >> >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.hoffman at kitware.com Mon Aug 31 17:10:32 2015 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Mon, 31 Aug 2015 17:10:32 -0400 Subject: [ITK-users] Happy Birthday CMake! Message-ID: <55E4C2C8.1040501@kitware.com> Today is the 15th birthday of CMake: http://www.kitware.com/blog/home/post/959 Thanks to everyone that has used and contributed to CMake over the years! -Bill From siavashk at ece.ubc.ca Mon Aug 31 19:16:36 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Mon, 31 Aug 2015 16:16:36 -0700 (MST) Subject: [ITK-users] Export specific frame/slice of multiframe dicom file: ExtractSliceImageFilter? In-Reply-To: References: Message-ID: <1441062996943-36084.post@n7.nabble.com> Hi Marcos, How do you set the input of your vtkJPEGWriter? Siavash -- View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Export-specific-frame-slice-of-multiframe-dicom-file-ExtractSliceImageFilter-tp36081p36084.html Sent from the ITK - Users mailing list archive at Nabble.com.