From jianming.tom at gmail.com Mon Feb 2 02:08:26 2015 From: jianming.tom at gmail.com (Jianming) Date: Mon, 2 Feb 2015 15:08:26 +0800 Subject: [ITK-users] [ITK-dev] Probelm building project with VTK 6.1 + ITK 4.7 Message-ID: Hi, I have the previous working fine code when I used VTK 5.6.1+ITK 3.20.1, but I got lots of problem when I wanted to reuse the code while upgrading to the new VTK/ITK version. My environment, Ubuntu 12.04, CMake 2.8.12.2, VTK 6.1, ITK 4.7. ItkVtkGlue is turned ON. The CMakeLists.txt is as the following, I checked the example, cmake_minimum_required(VERSION 2.8) PROJECT(BackProjection) 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(ReadPLY MACOSX_BUNDLE ReadPLY.cxx) target_link_libraries(ReadPLY ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) ### When I build with make, the error is, [100%] Building CXX object CMakeFiles/ReadPLY.dir/ReadPLY.cxx.o Linking CXX executable ReadPLY CMakeFiles/ReadPLY.dir/ReadPLY.cxx.o: In function `vtkSmartPointer::New()': ReadPLY.cxx:(.text._ZN15vtkSmartPointerI12vtkPLYReaderE3NewEv[_ZN15vtkSmartPointerI12vtkPLYReaderE3NewEv]+0xd): undefined reference to `vtkPLYReader::New()' collect2: error: ld returned 1 exit status make[2]: *** [ReadPLY] Error 1 make[1]: *** [CMakeFiles/ReadPLY.dir/all] Error 2 make: *** [all] Error 2 Interestingly, when I fully remove anything about ITK in my CMakeLists.txt, it doesn't show any error. So I suspect it is the ITK's build macro which is breaking my VTK code compiling. The working CMakeLists.txt is like, cmake_minimum_required(VERSION 2.8) PROJECT(ReadPLY) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(ReadPLY MACOSX_BUNDLE ReadPLY.cxx) if(VTK_LIBRARIES) target_link_libraries(ReadPLY ${VTK_LIBRARIES}) else() target_link_libraries(ReadPLY vtkHybrid vtkWidgets) endif() #### And the ReadPLY.cxx source code is, it is actually a VTK example, doesn't contain any ITK code. But I have the other source code file has ITK code, presenting this example just to show the problem. #include #include #include #include #include #include #include #include int main ( int argc, char *argv[] ) { if(argc != 2) { std::cout << "Usage: " << argv[0] << " Filename(.ply)" << std::endl; return EXIT_FAILURE; } std::string inputFilename = argv[1]; vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName ( inputFilename.c_str() ); // Visualize vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(reader->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderer->AddActor(actor); renderer->SetBackground(0.1804,0.5451,0.3412); // Sea green renderWindow->Render(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } #### -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Mon Feb 2 05:41:41 2015 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Mon, 02 Feb 2015 11:41:41 +0100 Subject: [ITK-users] [Paraview] compile itk (VTKGlue ON) with vtk from paraview In-Reply-To: References: <54C0CF2E.3060106@mh-hannover.de> <54C2125D.7090801@mh-hannover.de> <54C6029C.4040600@mh-hannover.de> <54C8CFC2.4000305@mh-hannover.de> Message-ID: <54CF5465.9050009@mh-hannover.de> Hi Matt, On 31/01/15 17:25, Matt McCormick wrote: >>> I would recommend creating build instructions to build against a >>> ParaView build tree. I have just verified that ITK builds with the >>> ITKVtkGlue module ON when pointing VTK_DIR to the /VTK >>> directory. >> >> Did You use BUILD_SHARED_LIBS ON for both ITK and ParaView? ITK also >> compiles fine without any errors for me if I use BUILD_SHARED_LIBS OFF, >> however the problems then arise when compiling the plugin. > > I was using BUILD_SHARED_LIBS for both. What issue were you seeing? If I configure ITK with: BUILD_SHARED_LIBS ON Module_ITKVtkGlue ON VTK_DIR /opt/compilation/paraview-git_build/VTK/ cmake is happy but I get linker errors at the end of the compilation of ITK when the VTKGlue is due. After switching off all PV plugin builds leaves: Linking CXX shared library ../../../../lib/libITKVtkGlue-4.6.so /usr/bin/ld: cannot find -lvtkPVPythonCatalyst /usr/bin/ld: cannot find -lvtkUtilitiesPythonInitializer Both libraries seem to be missing entries in /opt/compilation/paraview-git_build/VTK/VTKTargets.cmake I guess that's why the linker cannot find these libraries which are there but with the ending *-pv4.3.so. So a cd /opt/compilation/paraview-git_build/lib/ for i in *-pv*.so; do ln -s $i ${i%-pv*}.so; done did the trick but I guess that's not the way it ought to be done. My guess is that either some lines need to be added to VTKTargets.cmake or that the ITK-build needs to be told that there is no need to link against these libraries for the ITKVtkGlue (if that is true). > Again, I think the best approach is to build VTK separately, then > build both ParaView and ITK against that version. OK, I tried that with vtk-git of today but then paraview cmake complains: cmake -DUSE_EXTERNAL_VTK:BOOL=ON ../paraview-git/ -- Determined Source Version : 4.3.1-18-g04df19f -- Using External VTK from "/opt/vtk-git_150202/lib/cmake/vtk-6.2" CMake Error at CMake/ParaViewModuleTop.cmake:61 (include): include could not find load file: vtkGroups Call Stack (most recent call first): CMakeLists.txt:605 (include) CMake Error at CMake/ParaViewModuleTop.cmake:184 (include): include could not find load file: TopologicalSort Call Stack (most recent call first): CMakeLists.txt:605 (include) CMake Error at CMake/ParaViewModuleTop.cmake:185 (topological_sort): Unknown CMake command "topological_sort". Call Stack (most recent call first): CMakeLists.txt:605 (include) -- Configuring incomplete, errors occurred! I also tried a VTK-6.1 but that just yielded other errors. How do I figure out what VTK-version ParaView needs? Otherwise I think this is not a suitable instruction to give in the publication as the VTK-Version needed is likely to change in future ParaView releases. Therefore I prefer instructions that use the VTK bundled with ParaView. What could be the reason that You did not have the linker problems when ITKVtkGlue was compiled? Again, many thanks for looking into this. Roman >> On 26/01/15 17:54, Matt McCormick wrote: >>> >>> Hi Roman, >>> >>> Thanks for the update. Great to hear about the Midas Journal article! >>> >>> I do not think the Midas Journal will be able to build your plugin. >>> >>> I would recommend creating build instructions to build against a >>> ParaView build tree. I have just verified that ITK builds with the >>> ITKVtkGlue module ON when pointing VTK_DIR to the /VTK >>> directory. >>> >>> I don't see the install tree VTKTargets.cmake file in my ParaView >>> build, either. In the long term, the ParaView CMake configuration >>> should be corrected. >>> >>> HTH, >>> Matt >>> >>> On Mon, Jan 26, 2015 at 4:02 AM, Dr. Roman Grothausmann >>> wrote: >>>> >>>> Hi Matt, >>>> >>>> >>>> Thank You very much for Your reply. >>>> I can only find one VTKTargets.cmake in >>>> /opt/compilation/paraview-git_build/VTK/ >>>> It seems though that it is lacking the relevant entries for the libraries >>>> that troubled me, e.g. vtkPVPythonCatalyst and >>>> vtkUtilitiesPythonInitializer. >>>> >>>> I'm about to publish the ITK-VTK PV plugin in the Midas Journal, what >>>> installation instructions should I give there? >>>> Will the testing environment be able to compile this plugin and its tests >>>> or >>>> should I disable automatic testing for this contribution? >>>> >>>> Many thanks for looking into this. >>>> Roman >>>> >>>> >>>> On 23/01/15 18:15, Matt McCormick wrote: >>>>> >>>>> >>>>> Hi Roman, >>>>> >>>>> Thanks for looking into the issue and reporting it to the mailing list. >>>>> >>>>> Paraview should be installing VTKTargets.cmake, which tells the build >>>>> system where to find the libraries. Note that there might be two >>>>> VTKTargets.cmake files that are generated -- one for the build tree >>>>> and one for the install tree. >>>>> >>>>> HTH, >>>>> Matt >>>>> >>>>> On Fri, Jan 23, 2015 at 4:20 AM, Dr. Roman Grothausmann >>>>> wrote: >>>>>> >>>>>> >>>>>> >>>>>> On 22/01/15 11:21, Dr. Roman Grothausmann wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> Adding the abs. file locations to the build command does not help nor >>>>>>> does >>>>>>> -L/opt/paraview-4.3.1_git/lib/paraview-4.3/ >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> I figured that the vtk dynamic libraries of PV have the ending >>>>>> *-pv4.3.so >>>>>> which seems to be the reason why the linker does not find them. If I >>>>>> create >>>>>> symbolic links to these files without the extension: >>>>>> >>>>>> cd /opt/compilation/paraview-git_build/lib/ >>>>>> for i in *-pv*.so; do ln -s $i ${i%-pv*}.so; done >>>>>> >>>>>> and adding -L/opt/compilation/paraview-git_build/lib/ to >>>>>> CMAKE_CXX_FLAGS >>>>>> the compilation of ITK succeeds. >>>>>> >>>>>> I wonder, is that the way it's meant to be done? >>>>>> >>>>>> >>>>>> >>>>>>> What am I missing in my configuration of PV and ITK? >>>>>>> >>>>>>> When and where should I specify: >>>>>>> CMAKE_CXX_FLAGS -fPIC >>>>>>> BUILD_SHARED_LIBS ON/OFF >>>>>>> >>>>>>> Is this the right VTK_DIR specification for ITK: >>>>>>> /opt/compilation/ParaView-v4.3.1/build/VTK >>>>>>> or >>>>>>> /opt/paraview-4.3.1_git/lib/cmake/paraview-4.3 >>>>>>> >>>>>>> >>>>>>> >>>>>>> Many thanks for any help or hints. >>>>>>> Roman >>>>>>> >>>>>>> >>>>>> >>>>>> -- >>>>>> Dr. Roman Grothausmann >>>>>> >>>>>> Tomographie und Digitale Bildverarbeitung >>>>>> Tomography and Digital Image Analysis >>>>>> >>>>>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>>>>> Medizinische Hochschule Hannover >>>>>> Carl-Neuberg-Str. 1 >>>>>> D-30625 Hannover >>>>>> >>>>>> Tel. +49 511 532-9574 >>>>>> _____________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>> http://www.kitware.com/products/protraining.php >>>>>> >>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>>> >>>> >>>> -- >>>> Dr. Roman Grothausmann >>>> >>>> Tomographie und Digitale Bildverarbeitung >>>> Tomography and Digital Image Analysis >>>> >>>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>>> Medizinische Hochschule Hannover >>>> Carl-Neuberg-Str. 1 >>>> D-30625 Hannover >>>> >>>> Tel. +49 511 532-9574 >> >> >> -- >> Dr. Roman Grothausmann >> >> Tomographie und Digitale Bildverarbeitung >> Tomography and Digital Image Analysis >> >> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >> Medizinische Hochschule Hannover >> Carl-Neuberg-Str. 1 >> D-30625 Hannover >> >> Tel. +49 511 532-9574 -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 From bill.lorensen at gmail.com Mon Feb 2 08:34:50 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 2 Feb 2015 08:34:50 -0500 Subject: [ITK-users] [ITK-dev] Probelm building project with VTK 6.1 + ITK 4.7 In-Reply-To: References: Message-ID: What you have should work. I just built this example: http://itk.org/Wiki/ITK/Examples/Smoothing/MedianImageFilter no problems. Can you try the same example? On Mon, Feb 2, 2015 at 2:08 AM, Jianming wrote: > > > > > Hi, > > I have the previous working fine code when I used VTK 5.6.1+ITK 3.20.1, but > I got lots of problem when I wanted to reuse the code while upgrading to the > new VTK/ITK version. > > My environment, Ubuntu 12.04, CMake 2.8.12.2, VTK 6.1, ITK 4.7. ItkVtkGlue > is turned ON. > > The CMakeLists.txt is as the following, I checked the example, > > cmake_minimum_required(VERSION 2.8) > > PROJECT(BackProjection) > > 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(ReadPLY MACOSX_BUNDLE ReadPLY.cxx) > target_link_libraries(ReadPLY ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) > > ### > > When I build with make, the error is, > > [100%] Building CXX object CMakeFiles/ReadPLY.dir/ReadPLY.cxx.o > Linking CXX executable ReadPLY > CMakeFiles/ReadPLY.dir/ReadPLY.cxx.o: In function > `vtkSmartPointer::New()': > ReadPLY.cxx:(.text._ZN15vtkSmartPointerI12vtkPLYReaderE3NewEv[_ZN15vtkSmartPointerI12vtkPLYReaderE3NewEv]+0xd): > undefined reference to `vtkPLYReader::New()' > collect2: error: ld returned 1 exit status > make[2]: *** [ReadPLY] Error 1 > make[1]: *** [CMakeFiles/ReadPLY.dir/all] Error 2 > make: *** [all] Error 2 > > Interestingly, when I fully remove anything about ITK in my CMakeLists.txt, > it doesn't show any error. So I suspect it is the ITK's build macro which is > breaking my VTK code compiling. > The working CMakeLists.txt is like, > > cmake_minimum_required(VERSION 2.8) > > PROJECT(ReadPLY) > > find_package(VTK REQUIRED) > include(${VTK_USE_FILE}) > > add_executable(ReadPLY MACOSX_BUNDLE ReadPLY.cxx) > > if(VTK_LIBRARIES) > target_link_libraries(ReadPLY ${VTK_LIBRARIES}) > else() > target_link_libraries(ReadPLY vtkHybrid vtkWidgets) > endif() > > > #### > > And the ReadPLY.cxx source code is, it is actually a VTK example, doesn't > contain any ITK code. But I have the other source code file has ITK code, > presenting this example just to show the problem. > > #include > #include > #include > #include > #include > #include > #include > #include > > int main ( int argc, char *argv[] ) > { > if(argc != 2) > { > std::cout << "Usage: " << argv[0] << " Filename(.ply)" << std::endl; > return EXIT_FAILURE; > } > > std::string inputFilename = argv[1]; > > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileName ( inputFilename.c_str() ); > > // Visualize > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(reader->GetOutputPort()); > > vtkSmartPointer actor = > vtkSmartPointer::New(); > actor->SetMapper(mapper); > > vtkSmartPointer renderer = > vtkSmartPointer::New(); > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > renderer->AddActor(actor); > renderer->SetBackground(0.1804,0.5451,0.3412); // Sea green > > renderWindow->Render(); > renderWindowInteractor->Start(); > > return EXIT_SUCCESS; > } > > #### > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -- Unpaid intern in BillsBasement at noware dot com From matt.mccormick at kitware.com Mon Feb 2 08:48:03 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 2 Feb 2015 08:48:03 -0500 Subject: [ITK-users] [ITK-dev] Probelm building project with VTK 6.1 + ITK 4.7 In-Reply-To: References: Message-ID: Hi Jianming, Could you please also try VTK Git master and report your results? Thanks, Matt On Mon, Feb 2, 2015 at 8:34 AM, Bill Lorensen wrote: > What you have should work. I just built this example: > http://itk.org/Wiki/ITK/Examples/Smoothing/MedianImageFilter > > no problems. Can you try the same example? > > On Mon, Feb 2, 2015 at 2:08 AM, Jianming wrote: >> >> >> >> >> Hi, >> >> I have the previous working fine code when I used VTK 5.6.1+ITK 3.20.1, but >> I got lots of problem when I wanted to reuse the code while upgrading to the >> new VTK/ITK version. >> >> My environment, Ubuntu 12.04, CMake 2.8.12.2, VTK 6.1, ITK 4.7. ItkVtkGlue >> is turned ON. >> >> The CMakeLists.txt is as the following, I checked the example, >> >> cmake_minimum_required(VERSION 2.8) >> >> PROJECT(BackProjection) >> >> 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(ReadPLY MACOSX_BUNDLE ReadPLY.cxx) >> target_link_libraries(ReadPLY ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) >> >> ### >> >> When I build with make, the error is, >> >> [100%] Building CXX object CMakeFiles/ReadPLY.dir/ReadPLY.cxx.o >> Linking CXX executable ReadPLY >> CMakeFiles/ReadPLY.dir/ReadPLY.cxx.o: In function >> `vtkSmartPointer::New()': >> ReadPLY.cxx:(.text._ZN15vtkSmartPointerI12vtkPLYReaderE3NewEv[_ZN15vtkSmartPointerI12vtkPLYReaderE3NewEv]+0xd): >> undefined reference to `vtkPLYReader::New()' >> collect2: error: ld returned 1 exit status >> make[2]: *** [ReadPLY] Error 1 >> make[1]: *** [CMakeFiles/ReadPLY.dir/all] Error 2 >> make: *** [all] Error 2 >> >> Interestingly, when I fully remove anything about ITK in my CMakeLists.txt, >> it doesn't show any error. So I suspect it is the ITK's build macro which is >> breaking my VTK code compiling. >> The working CMakeLists.txt is like, >> >> cmake_minimum_required(VERSION 2.8) >> >> PROJECT(ReadPLY) >> >> find_package(VTK REQUIRED) >> include(${VTK_USE_FILE}) >> >> add_executable(ReadPLY MACOSX_BUNDLE ReadPLY.cxx) >> >> if(VTK_LIBRARIES) >> target_link_libraries(ReadPLY ${VTK_LIBRARIES}) >> else() >> target_link_libraries(ReadPLY vtkHybrid vtkWidgets) >> endif() >> >> >> #### >> >> And the ReadPLY.cxx source code is, it is actually a VTK example, doesn't >> contain any ITK code. But I have the other source code file has ITK code, >> presenting this example just to show the problem. >> >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> >> int main ( int argc, char *argv[] ) >> { >> if(argc != 2) >> { >> std::cout << "Usage: " << argv[0] << " Filename(.ply)" << std::endl; >> return EXIT_FAILURE; >> } >> >> std::string inputFilename = argv[1]; >> >> vtkSmartPointer reader = >> vtkSmartPointer::New(); >> reader->SetFileName ( inputFilename.c_str() ); >> >> // Visualize >> vtkSmartPointer mapper = >> vtkSmartPointer::New(); >> mapper->SetInputConnection(reader->GetOutputPort()); >> >> vtkSmartPointer actor = >> vtkSmartPointer::New(); >> actor->SetMapper(mapper); >> >> vtkSmartPointer renderer = >> vtkSmartPointer::New(); >> vtkSmartPointer renderWindow = >> vtkSmartPointer::New(); >> renderWindow->AddRenderer(renderer); >> vtkSmartPointer renderWindowInteractor = >> vtkSmartPointer::New(); >> renderWindowInteractor->SetRenderWindow(renderWindow); >> >> renderer->AddActor(actor); >> renderer->SetBackground(0.1804,0.5451,0.3412); // Sea green >> >> renderWindow->Render(); >> renderWindowInteractor->Start(); >> >> return EXIT_SUCCESS; >> } >> >> #### >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> > > > > -- > Unpaid intern in BillsBasement at noware dot com > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From emily-hammond at uiowa.edu Mon Feb 2 15:53:54 2015 From: emily-hammond at uiowa.edu (Hammond, Emily M) Date: Mon, 2 Feb 2015 20:53:54 +0000 Subject: [ITK-users] applying transform to point Message-ID: <2609C492EC89AB4CAAD3647B8D1A43CC2F186914@ITSNT437.iowa.uiowa.edu> Hello all, Here is the flow of my program. 1. read in fiducial points noted with Slicer (to my understanding to get from Slicer to ITK, invert the first two coordinates) 2. read in transform from files with TransformFileReaderTemplate class. This reads in the transforms as a list and I can add multiple transforms to the list. 3. apply the transforms in the list (in order) to the fiducials using the TransformPoint method for each transform. Here is the code I am using to apply the transforms. // create iterator to parse through the transform list TransformListType::const_iterator itTrans = this->m_TransformList.begin(); for(; itTrans != this->m_TransformList.end(); itTrans++ ) { // determine what type of transform it is if( !strcmp( (*itTrans)->GetNameOfClass(), "AffineTransform" ) ) { // extract transform AffineTransformType::Pointer affineTrans = static_cast< AffineTransformType * >( (*itTrans).GetPointer() ); // apply to landmarks LandmarksType::const_iterator itLM = this->m_TransformedMovingLandmarks.begin(); for(; itLM != this->m_TransformedMovingLandmarks.end(); itLM++ ) { this->m_TransformedMovingLandmarks[ itLM->first ] = affineTrans->TransformPoint( itLM->second ); } } else if( !strcmp( (*itTrans)->GetNameOfClass(), "BSplineTransform" ) ) { // extract transforms BSplineTransformType::Pointer bsplineTrans = static_cast< BSplineTransformType * >( (*itTrans).GetPointer() ); // apply to landmarks LandmarksType::const_iterator itLM = this->m_TransformedMovingLandmarks.begin(); for(; itLM != this->m_TransformedMovingLandmarks.end(); itLM++ ) { this->m_TransformedMovingLandmarks[ itLM->first ] = bsplineTrans->TransformPoint( itLM->second ); } } else { std::cerr << "TransformType is not recognized." << std::endl; } } NOTE: m_TransformedMovingList is initialized to the original read in fiducial list 4. read out the transform fiducials (invert first two coordinates for observation in Slicer purposes) 5. Compare the results using Slicer Problem: This method works just fine with scaling and translation transforms (given the last coordinate is inverted instead of the first two -> first question), however, once rotation (and shearing) is applied the result is wrong. Can anyone give some insight? I'm assuming there is some coordinate system conversion that needs to take place on the transform. Thanks! Emily Hammond -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Mon Feb 2 17:22:21 2015 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 2 Feb 2015 22:22:21 +0000 Subject: [ITK-users] [ITK] applying transform to point In-Reply-To: <2609C492EC89AB4CAAD3647B8D1A43CC2F186914@ITSNT437.iowa.uiowa.edu> References: <2609C492EC89AB4CAAD3647B8D1A43CC2F186914@ITSNT437.iowa.uiowa.edu> Message-ID: RAS/LPS conversion is more complex than just inverting the sign of the first two coordinates of a point. There may be also modeling/resampling transform mismatch. See detailed explanation and sample conversion code in the Transform files section of this page: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Transforms Andras ________________________________ From: Hammond, Emily M Sent: ?2015-?02-?02 15:59 To: insight users Subject: [ITK] [ITK-users] applying transform to point Hello all, Here is the flow of my program. 1. read in fiducial points noted with Slicer (to my understanding to get from Slicer to ITK, invert the first two coordinates) 2. read in transform from files with TransformFileReaderTemplate class. This reads in the transforms as a list and I can add multiple transforms to the list. 3. apply the transforms in the list (in order) to the fiducials using the TransformPoint method for each transform. Here is the code I am using to apply the transforms. // create iterator to parse through the transform list TransformListType::const_iterator itTrans = this->m_TransformList.begin(); for(; itTrans != this->m_TransformList.end(); itTrans++ ) { // determine what type of transform it is if( !strcmp( (*itTrans)->GetNameOfClass(), "AffineTransform" ) ) { // extract transform AffineTransformType::Pointer affineTrans = static_cast< AffineTransformType * >( (*itTrans).GetPointer() ); // apply to landmarks LandmarksType::const_iterator itLM = this->m_TransformedMovingLandmarks.begin(); for(; itLM != this->m_TransformedMovingLandmarks.end(); itLM++ ) { this->m_TransformedMovingLandmarks[ itLM->first ] = affineTrans->TransformPoint( itLM->second ); } } else if( !strcmp( (*itTrans)->GetNameOfClass(), "BSplineTransform" ) ) { // extract transforms BSplineTransformType::Pointer bsplineTrans = static_cast< BSplineTransformType * >( (*itTrans).GetPointer() ); // apply to landmarks LandmarksType::const_iterator itLM = this->m_TransformedMovingLandmarks.begin(); for(; itLM != this->m_TransformedMovingLandmarks.end(); itLM++ ) { this->m_TransformedMovingLandmarks[ itLM->first ] = bsplineTrans->TransformPoint( itLM->second ); } } else { std::cerr << "TransformType is not recognized." << std::endl; } } NOTE: m_TransformedMovingList is initialized to the original read in fiducial list 4. read out the transform fiducials (invert first two coordinates for observation in Slicer purposes) 5. Compare the results using Slicer Problem: This method works just fine with scaling and translation transforms (given the last coordinate is inverted instead of the first two -> first question), however, once rotation (and shearing) is applied the result is wrong. Can anyone give some insight? I'm assuming there is some coordinate system conversion that needs to take place on the transform. Thanks! Emily Hammond -------------- next part -------------- An HTML attachment was scrubbed... URL: From jianming.tom at gmail.com Mon Feb 2 21:15:40 2015 From: jianming.tom at gmail.com (Jianming) Date: Tue, 3 Feb 2015 10:15:40 +0800 Subject: [ITK-users] [ITK-dev] Probelm building project with VTK 6.1 + ITK 4.7 In-Reply-To: References: Message-ID: @Bill, the compiling of the the normal ITK examples are fine for me here. It just when it links the ITK and VTK together problem happens. @Matt, I will test it once I have the time. I kind of did a workaround, since I just need the VXL in ITK code, so I gave up linking ITK, but used the following CMakeLists.txt cmake_minimum_required(VERSION 2.8) PROJECT(BackProjection) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) FIND_PACKAGE( OpenCV REQUIRED ) INCLUDE_DIRECTORIES(${OPENCV_INCLUDE_DIR}) FIND_PACKAGE(VXL REQUIRED) INCLUDE(${VXL_CMAKE_DIR}/UseVXL.cmake) SET(CMAKE_CXX_FLAGS "-g -O2 -fopenmp") add_executable(BackProjection MACOSX_BUNDLE BackProjection) add_executable(deviation MACOSX_BUNDLE deviation) add_executable(imageviewer MACOSX_BUNDLE imageviewer) add_executable(deviation_autopipeline MACOSX_BUNDLE deviation_autopipeline) add_executable(ReadPLY MACOSX_BUNDLE ReadPLY.cxx) target_link_libraries(ReadPLY ${VTK_LIBRARIES} ) target_link_libraries(BackProjection vnl vnl_algo ${VTK_LIBRARIES} ${OpenCV_LIBS}) target_link_libraries(deviation ${OpenCV_LIBS}) target_link_libraries(imageviewer ${OpenCV_LIBS}) target_link_libraries(deviation_autopipeline ${OpenCV_LIBS}) On 2 February 2015 at 21:48, Matt McCormick wrote: > Hi Jianming, > > Could you please also try VTK Git master and report your results? > > Thanks, > Matt > > On Mon, Feb 2, 2015 at 8:34 AM, Bill Lorensen > wrote: > > What you have should work. I just built this example: > > http://itk.org/Wiki/ITK/Examples/Smoothing/MedianImageFilter > > > > no problems. Can you try the same example? > > > > On Mon, Feb 2, 2015 at 2:08 AM, Jianming wrote: > >> > >> > >> > >> > >> Hi, > >> > >> I have the previous working fine code when I used VTK 5.6.1+ITK 3.20.1, > but > >> I got lots of problem when I wanted to reuse the code while upgrading > to the > >> new VTK/ITK version. > >> > >> My environment, Ubuntu 12.04, CMake 2.8.12.2, VTK 6.1, ITK 4.7. > ItkVtkGlue > >> is turned ON. > >> > >> The CMakeLists.txt is as the following, I checked the example, > >> > >> cmake_minimum_required(VERSION 2.8) > >> > >> PROJECT(BackProjection) > >> > >> 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(ReadPLY MACOSX_BUNDLE ReadPLY.cxx) > >> target_link_libraries(ReadPLY ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) > >> > >> ### > >> > >> When I build with make, the error is, > >> > >> [100%] Building CXX object CMakeFiles/ReadPLY.dir/ReadPLY.cxx.o > >> Linking CXX executable ReadPLY > >> CMakeFiles/ReadPLY.dir/ReadPLY.cxx.o: In function > >> `vtkSmartPointer::New()': > >> > ReadPLY.cxx:(.text._ZN15vtkSmartPointerI12vtkPLYReaderE3NewEv[_ZN15vtkSmartPointerI12vtkPLYReaderE3NewEv]+0xd): > >> undefined reference to `vtkPLYReader::New()' > >> collect2: error: ld returned 1 exit status > >> make[2]: *** [ReadPLY] Error 1 > >> make[1]: *** [CMakeFiles/ReadPLY.dir/all] Error 2 > >> make: *** [all] Error 2 > >> > >> Interestingly, when I fully remove anything about ITK in my > CMakeLists.txt, > >> it doesn't show any error. So I suspect it is the ITK's build macro > which is > >> breaking my VTK code compiling. > >> The working CMakeLists.txt is like, > >> > >> cmake_minimum_required(VERSION 2.8) > >> > >> PROJECT(ReadPLY) > >> > >> find_package(VTK REQUIRED) > >> include(${VTK_USE_FILE}) > >> > >> add_executable(ReadPLY MACOSX_BUNDLE ReadPLY.cxx) > >> > >> if(VTK_LIBRARIES) > >> target_link_libraries(ReadPLY ${VTK_LIBRARIES}) > >> else() > >> target_link_libraries(ReadPLY vtkHybrid vtkWidgets) > >> endif() > >> > >> > >> #### > >> > >> And the ReadPLY.cxx source code is, it is actually a VTK example, > doesn't > >> contain any ITK code. But I have the other source code file has ITK > code, > >> presenting this example just to show the problem. > >> > >> #include > >> #include > >> #include > >> #include > >> #include > >> #include > >> #include > >> #include > >> > >> int main ( int argc, char *argv[] ) > >> { > >> if(argc != 2) > >> { > >> std::cout << "Usage: " << argv[0] << " Filename(.ply)" << > std::endl; > >> return EXIT_FAILURE; > >> } > >> > >> std::string inputFilename = argv[1]; > >> > >> vtkSmartPointer reader = > >> vtkSmartPointer::New(); > >> reader->SetFileName ( inputFilename.c_str() ); > >> > >> // Visualize > >> vtkSmartPointer mapper = > >> vtkSmartPointer::New(); > >> mapper->SetInputConnection(reader->GetOutputPort()); > >> > >> vtkSmartPointer actor = > >> vtkSmartPointer::New(); > >> actor->SetMapper(mapper); > >> > >> vtkSmartPointer renderer = > >> vtkSmartPointer::New(); > >> vtkSmartPointer renderWindow = > >> vtkSmartPointer::New(); > >> renderWindow->AddRenderer(renderer); > >> vtkSmartPointer renderWindowInteractor = > >> vtkSmartPointer::New(); > >> renderWindowInteractor->SetRenderWindow(renderWindow); > >> > >> renderer->AddActor(actor); > >> renderer->SetBackground(0.1804,0.5451,0.3412); // Sea green > >> > >> renderWindow->Render(); > >> renderWindowInteractor->Start(); > >> > >> return EXIT_SUCCESS; > >> } > >> > >> #### > >> > >> > >> _____________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Kitware offers ITK Training Courses, for more information visit: > >> http://www.kitware.com/products/protraining.php > >> > >> Please keep messages on-topic and check the ITK FAQ at: > >> http://www.itk.org/Wiki/ITK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/insight-users > >> > > > > > > > > -- > > Unpaid intern in BillsBasement at noware dot com > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Mon Feb 2 21:47:12 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 2 Feb 2015 21:47:12 -0500 Subject: [ITK-users] [ITK-dev] Probelm building project with VTK 6.1 + ITK 4.7 In-Reply-To: References: Message-ID: Hi, I thought this patch [1] had been merged, but after re-checking it is not yet in VTK master. If you test against this branch, you may be able to verify that it fixes your issue. Thanks, Matt [1] http://review.source.kitware.com/#/t/5170/ On Mon, Feb 2, 2015 at 9:15 PM, Jianming wrote: > @Bill, the compiling of the the normal ITK examples are fine for me here. It > just when it links the ITK and VTK together problem happens. > > @Matt, I will test it once I have the time. > > I kind of did a workaround, since I just need the VXL in ITK code, so I gave > up linking ITK, but used the following CMakeLists.txt > > cmake_minimum_required(VERSION 2.8) > > PROJECT(BackProjection) > > find_package(VTK REQUIRED) > include(${VTK_USE_FILE}) > > FIND_PACKAGE( OpenCV REQUIRED ) > INCLUDE_DIRECTORIES(${OPENCV_INCLUDE_DIR}) > > FIND_PACKAGE(VXL REQUIRED) > INCLUDE(${VXL_CMAKE_DIR}/UseVXL.cmake) > > SET(CMAKE_CXX_FLAGS "-g -O2 -fopenmp") > > add_executable(BackProjection MACOSX_BUNDLE BackProjection) > add_executable(deviation MACOSX_BUNDLE deviation) > add_executable(imageviewer MACOSX_BUNDLE imageviewer) > add_executable(deviation_autopipeline MACOSX_BUNDLE deviation_autopipeline) > add_executable(ReadPLY MACOSX_BUNDLE ReadPLY.cxx) > > target_link_libraries(ReadPLY ${VTK_LIBRARIES} ) > target_link_libraries(BackProjection vnl vnl_algo ${VTK_LIBRARIES} > ${OpenCV_LIBS}) > target_link_libraries(deviation ${OpenCV_LIBS}) > target_link_libraries(imageviewer ${OpenCV_LIBS}) > target_link_libraries(deviation_autopipeline ${OpenCV_LIBS}) > > On 2 February 2015 at 21:48, Matt McCormick > wrote: >> >> Hi Jianming, >> >> Could you please also try VTK Git master and report your results? >> >> Thanks, >> Matt >> >> On Mon, Feb 2, 2015 at 8:34 AM, Bill Lorensen >> wrote: >> > What you have should work. I just built this example: >> > http://itk.org/Wiki/ITK/Examples/Smoothing/MedianImageFilter >> > >> > no problems. Can you try the same example? >> > >> > On Mon, Feb 2, 2015 at 2:08 AM, Jianming wrote: >> >> >> >> >> >> >> >> >> >> Hi, >> >> >> >> I have the previous working fine code when I used VTK 5.6.1+ITK 3.20.1, >> >> but >> >> I got lots of problem when I wanted to reuse the code while upgrading >> >> to the >> >> new VTK/ITK version. >> >> >> >> My environment, Ubuntu 12.04, CMake 2.8.12.2, VTK 6.1, ITK 4.7. >> >> ItkVtkGlue >> >> is turned ON. >> >> >> >> The CMakeLists.txt is as the following, I checked the example, >> >> >> >> cmake_minimum_required(VERSION 2.8) >> >> >> >> PROJECT(BackProjection) >> >> >> >> 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(ReadPLY MACOSX_BUNDLE ReadPLY.cxx) >> >> target_link_libraries(ReadPLY ${Glue} ${VTK_LIBRARIES} >> >> ${ITK_LIBRARIES}) >> >> >> >> ### >> >> >> >> When I build with make, the error is, >> >> >> >> [100%] Building CXX object CMakeFiles/ReadPLY.dir/ReadPLY.cxx.o >> >> Linking CXX executable ReadPLY >> >> CMakeFiles/ReadPLY.dir/ReadPLY.cxx.o: In function >> >> `vtkSmartPointer::New()': >> >> >> >> ReadPLY.cxx:(.text._ZN15vtkSmartPointerI12vtkPLYReaderE3NewEv[_ZN15vtkSmartPointerI12vtkPLYReaderE3NewEv]+0xd): >> >> undefined reference to `vtkPLYReader::New()' >> >> collect2: error: ld returned 1 exit status >> >> make[2]: *** [ReadPLY] Error 1 >> >> make[1]: *** [CMakeFiles/ReadPLY.dir/all] Error 2 >> >> make: *** [all] Error 2 >> >> >> >> Interestingly, when I fully remove anything about ITK in my >> >> CMakeLists.txt, >> >> it doesn't show any error. So I suspect it is the ITK's build macro >> >> which is >> >> breaking my VTK code compiling. >> >> The working CMakeLists.txt is like, >> >> >> >> cmake_minimum_required(VERSION 2.8) >> >> >> >> PROJECT(ReadPLY) >> >> >> >> find_package(VTK REQUIRED) >> >> include(${VTK_USE_FILE}) >> >> >> >> add_executable(ReadPLY MACOSX_BUNDLE ReadPLY.cxx) >> >> >> >> if(VTK_LIBRARIES) >> >> target_link_libraries(ReadPLY ${VTK_LIBRARIES}) >> >> else() >> >> target_link_libraries(ReadPLY vtkHybrid vtkWidgets) >> >> endif() >> >> >> >> >> >> #### >> >> >> >> And the ReadPLY.cxx source code is, it is actually a VTK example, >> >> doesn't >> >> contain any ITK code. But I have the other source code file has ITK >> >> code, >> >> presenting this example just to show the problem. >> >> >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> >> >> int main ( int argc, char *argv[] ) >> >> { >> >> if(argc != 2) >> >> { >> >> std::cout << "Usage: " << argv[0] << " Filename(.ply)" << >> >> std::endl; >> >> return EXIT_FAILURE; >> >> } >> >> >> >> std::string inputFilename = argv[1]; >> >> >> >> vtkSmartPointer reader = >> >> vtkSmartPointer::New(); >> >> reader->SetFileName ( inputFilename.c_str() ); >> >> >> >> // Visualize >> >> vtkSmartPointer mapper = >> >> vtkSmartPointer::New(); >> >> mapper->SetInputConnection(reader->GetOutputPort()); >> >> >> >> vtkSmartPointer actor = >> >> vtkSmartPointer::New(); >> >> actor->SetMapper(mapper); >> >> >> >> vtkSmartPointer renderer = >> >> vtkSmartPointer::New(); >> >> vtkSmartPointer renderWindow = >> >> vtkSmartPointer::New(); >> >> renderWindow->AddRenderer(renderer); >> >> vtkSmartPointer renderWindowInteractor = >> >> vtkSmartPointer::New(); >> >> renderWindowInteractor->SetRenderWindow(renderWindow); >> >> >> >> renderer->AddActor(actor); >> >> renderer->SetBackground(0.1804,0.5451,0.3412); // Sea green >> >> >> >> renderWindow->Render(); >> >> renderWindowInteractor->Start(); >> >> >> >> return EXIT_SUCCESS; >> >> } >> >> >> >> #### >> >> >> >> >> >> _____________________________________ >> >> Powered by www.kitware.com >> >> >> >> Visit other Kitware open-source projects at >> >> http://www.kitware.com/opensource/opensource.html >> >> >> >> Kitware offers ITK Training Courses, for more information visit: >> >> http://www.kitware.com/products/protraining.php >> >> >> >> Please keep messages on-topic and check the ITK FAQ at: >> >> http://www.itk.org/Wiki/ITK_FAQ >> >> >> >> Follow this link to subscribe/unsubscribe: >> >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> > >> > >> > >> > -- >> > Unpaid intern in BillsBasement at noware dot com >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users > > From gunjan.gemini29 at gmail.com Tue Feb 3 02:16:38 2015 From: gunjan.gemini29 at gmail.com (Gunjan Gautam) Date: Tue, 3 Feb 2015 12:46:38 +0530 Subject: [ITK-users] Query regarding LAPACK and ITK Message-ID: Hi All, I need CMake, ITK 3.14 or higher and LAPACK 3.2.1 for my work. I got installed CMake and ITK 4.7.0 in my system. Does ITK 3.2.1 come with LAPACK routines or I should get it seperately. Please guide me in this regard as I've less knowledge about this. Thanks in advance. Gunjan -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Wed Feb 4 08:40:47 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Wed, 4 Feb 2015 14:40:47 +0100 Subject: [ITK-users] Calculation of 3D Convex Hull Message-ID: Hi everybody. I've got an image in NIFTI format containing a 3D object and I need to retrieve its 3D convex hull. I've seen that VTK provides several ways to do it, but I'd like to know if it is possible in ITK. Thanks a lot. Best regards. /Francisco -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Wed Feb 4 09:42:54 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 4 Feb 2015 09:42:54 -0500 Subject: [ITK-users] [ITK-dev] [ANNOUNCE] SimpleITK 0.8.1 Release In-Reply-To: <96262E2C-0CF1-4C15-B17C-5D063F830B45@mail.nih.gov> References: <96262E2C-0CF1-4C15-B17C-5D063F830B45@mail.nih.gov> Message-ID: <41D67579-08C8-4365-8CF8-0BE762D41221@mail.nih.gov> Hello, I just wanted to follow up that we now have Window binaries on Binstar for the Anaconda Python distribution. Specifically for 32-bit and 64-bit OS as well as Python version 2.7 and 3.4. More information can be found on the wiki: http://www.itk.org/Wiki/SimpleITK/GettingStarted#Anaconda_Distribution Brad On Dec 23, 2014, at 11:34 AM, Bradley Lowekamp wrote: > We are pleased to announce the SimpleITK 0.8.1 Release. > > SimpleITK is a simplified layer built on top of ITK, intended to facilitate its use in rapid prototyping, education and interpreted languages. SimpleITK provides binaries for several wrapped languages to enable users to rapidly get started using ITK. > > Information on how to get started and download the binaries: http://www.itk.org/Wiki/SimpleITK/GettingStarted#Binaries > > > This patch release updates the ITK version to the newly released 4.7.0. Additionally, this patch contains improved support for CMake 3.0, fixes for compilation issues, the addition of the LabelOverlapMeasures filter, and a fix for the ClampCast filter. > > > Also, we are now compiling for Python 3.4, and have stopped compiling for Python 3.2. Lastly, we are providing some binaries for the Anaconda Python distribution on Binstar. > > > Binary distributions for many platforms and languages are available for downloading: https://sourceforge.net/projects/simpleitk/files/SimpleITK/0.8.1/ > > Release Doxygen Documentation: http://www.itk.org/SimpleITKDoxygen08/html/index.html > > Additional Release Notes: http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#SimpleITK_-_Version_0.8.1_Release > > Enjoy, > Brad > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers From samah.bouzidi at gmail.com Wed Feb 4 13:59:46 2015 From: samah.bouzidi at gmail.com (samah bouzidi) Date: Wed, 4 Feb 2015 19:59:46 +0100 Subject: [ITK-users] problem with 3d region growing Message-ID: hello itk users, I am a beginner ITK users. I am trying to segment a volume using region growing algorithm. I am able to do it in a 2D image (dicom) but not for a volume. 1) I saw that for 3D region growing the seed point have 3 coordinates (x, y, z). In my case, z is the slice number (i am using .img format). Can I use an (x,y) seed point? 2) I have another idea, reading an image series and applied the filter for each image and then writing them in volume. Are there any examples ( applied a filter in image series) that one could help me? regards Samah. My source code is as follows ================================ #include "itkConnectedThresholdImageFilter.h" #include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" int main( int argc, char *argv[]) { typedef signed short InternalPixelType; typedef unsigned char OutputPixelType; const unsigned int Dimension = 3; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::ImageFileReader< InternalImageType > ReaderType; typedef itk::ImageFileWriter< OutputImageType > WriterType; ReaderType::Pointer reader = ReaderType::New(); WriterType::Pointer writer = WriterType::New(); reader->SetFileName( "/home/doctorant/T?l?chargements/Images/in.img" ); writer->SetFileName( "/home/doctorant/T?l?chargements/Images/out.img"); typedef itk::ConnectedThresholdImageFilter< InternalImageType, OutputImageType > ConnectedFilterType; ConnectedFilterType::Pointer connectedThreshold = ConnectedFilterType::New(); connectedThreshold->SetInput( reader->GetOutput() ); writer->SetInput( connectedThreshold->GetOutput() ); const InternalPixelType lowerThreshold = -1050 ; const InternalPixelType upperThreshold = -600; connectedThreshold->SetLower( lowerThreshold ); connectedThreshold->SetUpper( upperThreshold ); connectedThreshold->SetReplaceValue( 255 ); InternalImageType::IndexType index; index[0] = 250; index[1] = 239; connectedThreshold->SetSeed( index ); try { writer->Update(); } catch( itk::ExceptionObject & excep ) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; } return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From taylor at braun-jones.org Wed Feb 4 14:22:21 2015 From: taylor at braun-jones.org (Taylor Braun-Jones) Date: Wed, 4 Feb 2015 14:22:21 -0500 Subject: [ITK-users] bug in EuclideanDistancePointMetric Message-ID: Marcel Schenderlein writes: > > it seems to me as if there is a bug in itk::EuclideanDistancePointMetric > or at least a misconception. Correct me if I am wrong. I do not have the > full Insight into ITK yet > > I came across this when I wanted to use this metric together with an > itk::Rigid3DPerspectiveTransform and the > itk::PointSetToPointSetRegistrationMethod to do 3D-2D point > registration. The bug will not be noticed when two point sets of the > same dimensionality would be used. > > BUG: > ------- > In the itk::EuclideanDistancePointMetric class there is a single > iterator type used for both FixedPointSet and MovingPointSet (typedef > typename Superclass::PointIterator PointIterator) in the method > GetValue(...) at lines 76,77 > > > PointIterator pointItr = movingPointSet->GetPoints()->Begin(); > > PointIterator pointEnd = movingPointSet->GetPoints()->End(); > > and lines 118,119 > > > PointIterator pointItr2 = fixedPointSet->GetPoints()->Begin(); > > PointIterator pointEnd2 = fixedPointSet->GetPoints()->End(); > > in itkEuclideanDistancePointMetric.txx. The problem that arises is that > if I use this metric with an itk::PointSet< double, 2 > as > FixedPointSetType and and itk::PointSet< double, 3 > as the > MovingPointSetType (as I would do for 3D-2D registration) then the > compiler complains about the lines 76,77 because PointIterator is > actually a FixedPointSetType::PointsContainer::ConstIterator (from > itk::PointSetToPointSetMetric). Note that the lines 118,119 work > perfectly but the naming of the iterator does not point to the type used. > I did the following to fix this: > > FIX: > -------------------------------- > I introduced two new iterators (itkEuclideanDistancePointMetric.h): > > > typedef typename FixedPointSetType::PointsContainer::ConstIterator > FixedPointIterator; > > typedef typename MovingPointSetType::PointsContainer::ConstIterator > MovingPointIterator; > > The iterator PointIterator is obsolete then. > > I also had to change the distance map part of the template > declaration(?) (itkEuclideanDistancePointMetric.h). The dimension of the > distance map has to be of type TFixedPointSet instead of > TMovingPointSet, since the moving points are transformed (into the > FixedPointType) and then compared to the fixed points. So it is now: > > > template < class TFixedPointSet, class TMovingPointSet, > > class TDistanceMap = ::itk::Image > ::itk::GetPointSetDimension::PointDimension> > > > class ITK_EXPORT EuclideanDistancePointMetric : > > In the definition of GetValue(...) (itkEuclideanDistancePointMetric.txx) > I changed the lines 76,77 to > > > MovingPointIterator pointItr = movingPointSet->GetPoints()->Begin(); > > MovingPointIterator pointEnd = movingPointSet->GetPoints()->End(); > > and lines 118,119 to > > > FixedPointIterator pointItr2 = fixedPointSet->GetPoints()->Begin(); > > FixedPointIterator pointEnd2 = fixedPointSet->GetPoints()->End(); > > After that it compiles well and the registration seems to work. I have > not testet the fix with point sets of the same dimensionality but > looking at the code I see no reason why it should not still work this way. I'm looking at a current ITK master and see the same problem. Marcel's patch seems to work for me. Is it agreed that this is a bug and that Marcel's solution is the correct one? Thanks, Taylor -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Feb 4 14:32:41 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 4 Feb 2015 14:32:41 -0500 Subject: [ITK-users] bug in EuclideanDistancePointMetric In-Reply-To: References: Message-ID: Hi Taylor, Marcel, Yes this sounds like a bug, and the proposed solution looks good. Please consider submitting a patch [1] that includes a new test that does 3D-2D point set registration. Thanks, Matt [1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html On Wed, Feb 4, 2015 at 2:22 PM, Taylor Braun-Jones wrote: > Marcel Schenderlein writes: >> >> it seems to me as if there is a bug in itk::EuclideanDistancePointMetric >> or at least a misconception. Correct me if I am wrong. I do not have the >> full Insight into ITK yet >> >> I came across this when I wanted to use this metric together with an >> itk::Rigid3DPerspectiveTransform and the >> itk::PointSetToPointSetRegistrationMethod to do 3D-2D point >> registration. The bug will not be noticed when two point sets of the >> same dimensionality would be used. >> >> BUG: >> ------- >> In the itk::EuclideanDistancePointMetric class there is a single >> iterator type used for both FixedPointSet and MovingPointSet (typedef >> typename Superclass::PointIterator PointIterator) in the method >> GetValue(...) at lines 76,77 >> >> > PointIterator pointItr = movingPointSet->GetPoints()->Begin(); >> > PointIterator pointEnd = movingPointSet->GetPoints()->End(); >> >> and lines 118,119 >> >> > PointIterator pointItr2 = fixedPointSet->GetPoints()->Begin(); >> > PointIterator pointEnd2 = fixedPointSet->GetPoints()->End(); >> >> in itkEuclideanDistancePointMetric.txx. The problem that arises is that >> if I use this metric with an itk::PointSet< double, 2 > as >> FixedPointSetType and and itk::PointSet< double, 3 > as the >> MovingPointSetType (as I would do for 3D-2D registration) then the >> compiler complains about the lines 76,77 because PointIterator is >> actually a FixedPointSetType::PointsContainer::ConstIterator (from >> itk::PointSetToPointSetMetric). Note that the lines 118,119 work >> perfectly but the naming of the iterator does not point to the type used. >> I did the following to fix this: >> >> FIX: >> -------------------------------- >> I introduced two new iterators (itkEuclideanDistancePointMetric.h): >> >> > typedef typename FixedPointSetType::PointsContainer::ConstIterator >> FixedPointIterator; >> > typedef typename MovingPointSetType::PointsContainer::ConstIterator >> MovingPointIterator; >> >> The iterator PointIterator is obsolete then. >> >> I also had to change the distance map part of the template >> declaration(?) (itkEuclideanDistancePointMetric.h). The dimension of the >> distance map has to be of type TFixedPointSet instead of >> TMovingPointSet, since the moving points are transformed (into the >> FixedPointType) and then compared to the fixed points. So it is now: >> >> > template < class TFixedPointSet, class TMovingPointSet, >> > class TDistanceMap = ::itk::Image> > ::itk::GetPointSetDimension::PointDimension> > >> > class ITK_EXPORT EuclideanDistancePointMetric : >> >> In the definition of GetValue(...) (itkEuclideanDistancePointMetric.txx) >> I changed the lines 76,77 to >> >> > MovingPointIterator pointItr = movingPointSet->GetPoints()->Begin(); >> > MovingPointIterator pointEnd = movingPointSet->GetPoints()->End(); >> >> and lines 118,119 to >> >> > FixedPointIterator pointItr2 = fixedPointSet->GetPoints()->Begin(); >> > FixedPointIterator pointEnd2 = fixedPointSet->GetPoints()->End(); >> >> After that it compiles well and the registration seems to work. I have >> not testet the fix with point sets of the same dimensionality but >> looking at the code I see no reason why it should not still work this way. > > > I'm looking at a current ITK master and see the same problem. Marcel's patch > seems to work for me. Is it agreed that this is a bug and that Marcel's > solution is the correct one? > > Thanks, > Taylor > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Wed Feb 4 14:36:32 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 4 Feb 2015 14:36:32 -0500 Subject: [ITK-users] problem with 3d region growing In-Reply-To: References: Message-ID: Hi Samah, Welcome to ITK! For a 3D image, the third index of the seed does need to be defined. To apply a filter on each slice independently, use the SliceBySliceImageFilter [1]. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1SliceBySliceImageFilter.html On Wed, Feb 4, 2015 at 1:59 PM, samah bouzidi wrote: > hello itk users, > > I am a beginner ITK users. I am trying to segment a volume using region > growing algorithm. I am able to do it in a 2D image (dicom) but not for a > volume. > 1) I saw that for 3D region growing the seed point have 3 coordinates (x, y, > z). In my case, z is the slice number (i am using .img format). Can I use an > (x,y) seed point? > 2) I have another idea, reading an image series and applied the filter for > each image and then writing them in volume. Are there any examples ( applied > a filter in image series) that one could help me? > > regards > Samah. > > My source code is as follows > ================================ > #include "itkConnectedThresholdImageFilter.h" > #include "itkImage.h" > #include "itkImageFileReader.h" > #include "itkImageFileWriter.h" > > int main( int argc, char *argv[]) > { > typedef signed short InternalPixelType; > typedef unsigned char OutputPixelType; > const unsigned int Dimension = 3; > typedef itk::Image< InternalPixelType, Dimension > InternalImageType; > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > typedef itk::ImageFileReader< InternalImageType > ReaderType; > typedef itk::ImageFileWriter< OutputImageType > WriterType; > > ReaderType::Pointer reader = ReaderType::New(); > WriterType::Pointer writer = WriterType::New(); > > reader->SetFileName( "/home/doctorant/T?l?chargements/Images/in.img" ); > writer->SetFileName( "/home/doctorant/T?l?chargements/Images/out.img"); > > > typedef itk::ConnectedThresholdImageFilter< InternalImageType, > OutputImageType > ConnectedFilterType; > > ConnectedFilterType::Pointer connectedThreshold = > ConnectedFilterType::New(); > > connectedThreshold->SetInput( reader->GetOutput() ); > writer->SetInput( connectedThreshold->GetOutput() ); > > > const InternalPixelType lowerThreshold = -1050 ; > const InternalPixelType upperThreshold = -600; > > connectedThreshold->SetLower( lowerThreshold ); > connectedThreshold->SetUpper( upperThreshold ); > > connectedThreshold->SetReplaceValue( 255 ); > > > > > InternalImageType::IndexType index; > index[0] = 250; > index[1] = 239; > > connectedThreshold->SetSeed( index ); > > > try > { > writer->Update(); > } > catch( itk::ExceptionObject & excep ) > { > std::cerr << "Exception caught !" << std::endl; > std::cerr << excep << std::endl; > } > > return 0; > } > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From samah.bouzidi at gmail.com Wed Feb 4 15:14:38 2015 From: samah.bouzidi at gmail.com (samah bouzidi) Date: Wed, 4 Feb 2015 21:14:38 +0100 Subject: [ITK-users] problem with 3d region growing In-Reply-To: References: Message-ID: hi Matt, thank you for replying. I can't find the error in my code (a black volume result) can you please look at my code. Regards Samah 2015-02-04 20:36 GMT+01:00 Matt McCormick : > Hi Samah, > > Welcome to ITK! > > For a 3D image, the third index of the seed does need to be defined. > > To apply a filter on each slice independently, use the > SliceBySliceImageFilter [1]. > > HTH, > Matt > > [1] > http://www.itk.org/Doxygen/html/classitk_1_1SliceBySliceImageFilter.html > > On Wed, Feb 4, 2015 at 1:59 PM, samah bouzidi > wrote: > > hello itk users, > > > > I am a beginner ITK users. I am trying to segment a volume using region > > growing algorithm. I am able to do it in a 2D image (dicom) but not for a > > volume. > > 1) I saw that for 3D region growing the seed point have 3 coordinates > (x, y, > > z). In my case, z is the slice number (i am using .img format). Can I > use an > > (x,y) seed point? > > 2) I have another idea, reading an image series and applied the filter > for > > each image and then writing them in volume. Are there any examples ( > applied > > a filter in image series) that one could help me? > > > > regards > > Samah. > > > > My source code is as follows > > ================================ > > #include "itkConnectedThresholdImageFilter.h" > > #include "itkImage.h" > > #include "itkImageFileReader.h" > > #include "itkImageFileWriter.h" > > > > int main( int argc, char *argv[]) > > { > > typedef signed short InternalPixelType; > > typedef unsigned char OutputPixelType; > > const unsigned int Dimension = 3; > > typedef itk::Image< InternalPixelType, Dimension > InternalImageType; > > > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > > > > typedef itk::ImageFileReader< InternalImageType > ReaderType; > > typedef itk::ImageFileWriter< OutputImageType > WriterType; > > > > ReaderType::Pointer reader = ReaderType::New(); > > WriterType::Pointer writer = WriterType::New(); > > > > reader->SetFileName( "/home/doctorant/T?l?chargements/Images/in.img" > ); > > writer->SetFileName( > "/home/doctorant/T?l?chargements/Images/out.img"); > > > > > > typedef itk::ConnectedThresholdImageFilter< InternalImageType, > > OutputImageType > ConnectedFilterType; > > > > ConnectedFilterType::Pointer connectedThreshold = > > ConnectedFilterType::New(); > > > > connectedThreshold->SetInput( reader->GetOutput() ); > > writer->SetInput( connectedThreshold->GetOutput() ); > > > > > > const InternalPixelType lowerThreshold = -1050 ; > > const InternalPixelType upperThreshold = -600; > > > > connectedThreshold->SetLower( lowerThreshold ); > > connectedThreshold->SetUpper( upperThreshold ); > > > > connectedThreshold->SetReplaceValue( 255 ); > > > > > > > > > > InternalImageType::IndexType index; > > index[0] = 250; > > index[1] = 239; > > > > connectedThreshold->SetSeed( index ); > > > > > > try > > { > > writer->Update(); > > } > > catch( itk::ExceptionObject & excep ) > > { > > std::cerr << "Exception caught !" << std::endl; > > std::cerr << excep << std::endl; > > } > > > > return 0; > > } > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopher.mullins at kitware.com Wed Feb 4 15:24:07 2015 From: christopher.mullins at kitware.com (Christopher Mullins) Date: Wed, 4 Feb 2015 15:24:07 -0500 Subject: [ITK-users] problem with 3d region growing In-Reply-To: References: Message-ID: The ConnectedThresholdImageFilter example [1] might be of use. [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/Segmentation/ConnectedThresholdImageFilter.cxx On Wed, Feb 4, 2015 at 3:14 PM, samah bouzidi wrote: > hi Matt, > > thank you for replying. > > I can't find the error in my code (a black volume result) > > can you please look at my code. > > > > Regards > Samah > > > > 2015-02-04 20:36 GMT+01:00 Matt McCormick : > >> Hi Samah, >> >> Welcome to ITK! >> >> For a 3D image, the third index of the seed does need to be defined. >> >> To apply a filter on each slice independently, use the >> SliceBySliceImageFilter [1]. >> >> HTH, >> Matt >> >> [1] >> http://www.itk.org/Doxygen/html/classitk_1_1SliceBySliceImageFilter.html >> >> On Wed, Feb 4, 2015 at 1:59 PM, samah bouzidi >> wrote: >> > hello itk users, >> > >> > I am a beginner ITK users. I am trying to segment a volume using region >> > growing algorithm. I am able to do it in a 2D image (dicom) but not for >> a >> > volume. >> > 1) I saw that for 3D region growing the seed point have 3 coordinates >> (x, y, >> > z). In my case, z is the slice number (i am using .img format). Can I >> use an >> > (x,y) seed point? >> > 2) I have another idea, reading an image series and applied the >> filter for >> > each image and then writing them in volume. Are there any examples ( >> applied >> > a filter in image series) that one could help me? >> > >> > regards >> > Samah. >> > >> > My source code is as follows >> > ================================ >> > #include "itkConnectedThresholdImageFilter.h" >> > #include "itkImage.h" >> > #include "itkImageFileReader.h" >> > #include "itkImageFileWriter.h" >> > >> > int main( int argc, char *argv[]) >> > { >> > typedef signed short InternalPixelType; >> > typedef unsigned char OutputPixelType; >> > const unsigned int Dimension = 3; >> > typedef itk::Image< InternalPixelType, Dimension > InternalImageType; >> > >> > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >> > >> > typedef itk::ImageFileReader< InternalImageType > ReaderType; >> > typedef itk::ImageFileWriter< OutputImageType > WriterType; >> > >> > ReaderType::Pointer reader = ReaderType::New(); >> > WriterType::Pointer writer = WriterType::New(); >> > >> > reader->SetFileName( >> "/home/doctorant/T?l?chargements/Images/in.img" ); >> > writer->SetFileName( >> "/home/doctorant/T?l?chargements/Images/out.img"); >> > >> > >> > typedef itk::ConnectedThresholdImageFilter< InternalImageType, >> > OutputImageType > ConnectedFilterType; >> > >> > ConnectedFilterType::Pointer connectedThreshold = >> > ConnectedFilterType::New(); >> > >> > connectedThreshold->SetInput( reader->GetOutput() ); >> > writer->SetInput( connectedThreshold->GetOutput() ); >> > >> > >> > const InternalPixelType lowerThreshold = -1050 ; >> > const InternalPixelType upperThreshold = -600; >> > >> > connectedThreshold->SetLower( lowerThreshold ); >> > connectedThreshold->SetUpper( upperThreshold ); >> > >> > connectedThreshold->SetReplaceValue( 255 ); >> > >> > >> > >> > >> > InternalImageType::IndexType index; >> > index[0] = 250; >> > index[1] = 239; >> > >> > connectedThreshold->SetSeed( index ); >> > >> > >> > try >> > { >> > writer->Update(); >> > } >> > catch( itk::ExceptionObject & excep ) >> > { >> > std::cerr << "Exception caught !" << std::endl; >> > std::cerr << excep << std::endl; >> > } >> > >> > return 0; >> > } >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the ITK FAQ at: >> > http://www.itk.org/Wiki/ITK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/insight-users >> > >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -- Christopher Mullins R&D Engineer Kitware Inc., 919.869.8871 -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Thu Feb 5 11:51:32 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Thu, 5 Feb 2015 17:51:32 +0100 Subject: [ITK-users] Connectivity in BinaryToShapeLabelMapFilter? Message-ID: Hi. Does anyone know which type of connecticity this filter uses? I mean, in 2D 4 or 8 connectivity, in 3D 26-connectivity. For instance, in Matlab you must specify the connectivity in the bwlabel function in order to separate the different blobs in the image. Thank you very much. Kind regards. /Francisco -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Thu Feb 5 12:00:01 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 5 Feb 2015 12:00:01 -0500 Subject: [ITK-users] [ITK] Connectivity in BinaryToShapeLabelMapFilter? In-Reply-To: References: Message-ID: <388D5D49-F6CA-4E38-B4DF-CD8E4B617F4E@mail.nih.gov> Hello, There is a boolean member variable called "FullyConnected" which controls this behavior: http://itk.org/Insight/Doxygen/html/classitk_1_1BinaryImageToShapeLabelMapFilter.html#a7448c70c44ba3ef5d10984e06722ef47 Brad On Feb 5, 2015, at 11:51 AM, Francisco Lopez de la Franca wrote: > Hi. > Does anyone know which type of connecticity this filter uses? > I mean, in 2D 4 or 8 connectivity, in 3D 26-connectivity. > For instance, in Matlab you must specify the connectivity in the bwlabel function in order to separate the different blobs in the image. > Thank you very much. > Kind regards. > /Francisco > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 matimontg at gmail.com Fri Feb 6 09:47:23 2015 From: matimontg at gmail.com (Matias Montroull) Date: Fri, 6 Feb 2015 11:47:23 -0300 Subject: [ITK-users] What is StepLenght? Message-ID: Hi, I'm new to registration and I'm trying to understand what StepLenght is. I can play with the values but I'm not really sure what it is. Can someone explain? Thank you, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bharath.Shivapuram at LntTechservices.com Fri Feb 6 05:22:55 2015 From: Bharath.Shivapuram at LntTechservices.com (Bharath Shivapuram) Date: Fri, 6 Feb 2015 10:22:55 +0000 Subject: [ITK-users] Error in Fast Marching Filter : Discriminat of quadratic equation is negative Message-ID: Hi ITK users, I am facing this peculiar issue in fast marching filter. Tried searching about it, but dint have much of help. Fast Marching filter throws an "Discriminant of quadratic equation is negative" I tried to dig into the code and found that the exception is defined in the line 492 of itkFastMarchingImageFilter.cxx. Any info about what why this exception would be thrown or what should be changed would be of great help. Thanks a lot in advance. Thanks and Regards Bharath.S.D Software Engineer L&T Technology Services limited KIADB Industrial Area | Hebbal | Hootagalli Mysore - 570 018 | INDIA L&T Technology Services Ltd www.LntTechservices.com This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. -------------- next part -------------- An HTML attachment was scrubbed... URL: From yagodiezdonoso at gmail.com Fri Feb 6 14:32:47 2015 From: yagodiezdonoso at gmail.com (Yago Diez) Date: Fri, 6 Feb 2015 20:32:47 +0100 Subject: [ITK-users] cannot acces virtual void itk::Rigid3DTransform< TScalar >::SetMatrix (const MatrixType & matrix, double tolerance ) from the Rigid3D transform class. Message-ID: Hi all, I want to store a 3D rotation matrix that I have computed in some format that itk can understand (and use to transform points and images, not to as the starting point of any optimization process). The problem is that the matrix is not "as orthogonal as it should be" due to numerical problems: So far I am using the Rigid3DTransform which looks the best way to go (but am willing to change if this is wrong). The numerical problems express like this: 1) if I use the "MatrixIsOrthogonal(,)" function I get a "yes" for a 1e-5 tolerance but not for the default "1e-10" tolerance. 2) Consequently, if I use the SetMatrix() function I get an exception. I am pretty confident that I can get away with what I need to do if I convince the class to just swallow the "not very orthogonal" matrix (by using a less restrictive tolerance). I have seen that there exists a function to do just that but I am having problems using it. Specifically, I cannot seem to access the itk::Rigid3DTransform< TScalar >::SetMatrix (const MatrixType & matrix, double tolerance ) function >From the Rigid3D transform class. Consequently, the following code returns a compilation error : error: no matching function for call to > ?itk::Rigid3DTransform::SetMatrix(smallMatrixType&, double)? > XXXXXXXXXXXX: note: candidate is: > PATH/Code/Common/itkRigid3DTransform.txx:93:1: note: void > itk::Rigid3DTransform::SetMatrix(const MatrixType&) [with > TScalarType = double, itk::Rigid3DTransform::MatrixType = > itk::Matrix] > PATH/Code/Common/itkRigid3DTransform.txx:93:1: note: candidate expects 1 > argument, 2 provided > I have checked that the itkRigid3DTransform.txx file has indeed only the definition of the setmatrix method with one parameter. I assume I am looking for the setmatrix function with two parameters "in the wrong place", but have not yet managed to find the right one, any ideas? Here is the detailed code typedef itk::Matrix smallMatrixType; > smallMatrixType auxMatrix; > > // matrix initialization, matrix M1 is orthogonal but I have numerical problems auxMatrix[0][0]=M1[0][0]; auxMatrix[0][1]=M1[0][1]; auxMatrix[0][2]=M1[0][2]; auxMatrix[1][0]=M1[1][0]; auxMatrix[1][1]=M1[1][1]; auxMatrix[1][2]=M1[1][2]; auxMatrix[2][0]=M1[2][0]; auxMatrix[2][1]=M1[2][1]; auxMatrix[2][2]=M1[2][2]; typedef itk::Rigid3DTransform TransformType; TransformType::Pointer rotation = TransformType::New(); // rotation->MatrixIsOrthogonal(auxMatrix,1e-10) outputs 0, but rotation->MatrixIsOrthogonal(auxMatrix,1e-5) outputs 1 rotation->SetMatrix(auxMatrix,1e-5); // this produces a compilation error //rotation->SetMatrix(auxMatrix); // THIS RESULTS IN AN EXCEPTION: itk::ERROR: Rigid3DTransform(0x1dec800): Attempting to set a non-orthogonal rotation matrix Thanks you very much for any help that you can provide. Yago Diez Donoso (PhD) Computer Vision and Robotics Group http://vicorob.udg.es/ E-mail: yago at eia.udg.es; yagodiezdonoso at gmail.com Phone: (int. code) 34 972418013 University of Girona -------------- next part -------------- An HTML attachment was scrubbed... URL: From samah.bouzidi at gmail.com Fri Feb 6 15:59:18 2015 From: samah.bouzidi at gmail.com (samah bouzidi) Date: Fri, 6 Feb 2015 21:59:18 +0100 Subject: [ITK-users] problem with 3d region growing In-Reply-To: References: Message-ID: hi, sincerely, I fail to understand the response of this filter, the algorithm succeeds to segment the region .however, in 3D, the first slice is the same used to check the segmentation in 2D, I am not getting at least for the first slice the region obtained in 2D. ps: the modified code takes into account the third dimension : InternalImageType::IndexType index; index[0] = 250; index[1] = 239; index[2]= 1; connectedThreshold->SetSeed( index ); any help will be appreciated. thanks in advance. 2015-02-04 21:24 GMT+01:00 Christopher Mullins < christopher.mullins at kitware.com>: > The ConnectedThresholdImageFilter example [1] might be of use. > > [1] > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/Segmentation/ConnectedThresholdImageFilter.cxx > > On Wed, Feb 4, 2015 at 3:14 PM, samah bouzidi > wrote: > >> hi Matt, >> >> thank you for replying. >> >> I can't find the error in my code (a black volume result) >> >> can you please look at my code. >> >> >> >> Regards >> Samah >> >> >> >> 2015-02-04 20:36 GMT+01:00 Matt McCormick : >> >>> Hi Samah, >>> >>> Welcome to ITK! >>> >>> For a 3D image, the third index of the seed does need to be defined. >>> >>> To apply a filter on each slice independently, use the >>> SliceBySliceImageFilter [1]. >>> >>> HTH, >>> Matt >>> >>> [1] >>> http://www.itk.org/Doxygen/html/classitk_1_1SliceBySliceImageFilter.html >>> >>> On Wed, Feb 4, 2015 at 1:59 PM, samah bouzidi >>> wrote: >>> > hello itk users, >>> > >>> > I am a beginner ITK users. I am trying to segment a volume using region >>> > growing algorithm. I am able to do it in a 2D image (dicom) but not >>> for a >>> > volume. >>> > 1) I saw that for 3D region growing the seed point have 3 coordinates >>> (x, y, >>> > z). In my case, z is the slice number (i am using .img format). Can I >>> use an >>> > (x,y) seed point? >>> > 2) I have another idea, reading an image series and applied the >>> filter for >>> > each image and then writing them in volume. Are there any examples ( >>> applied >>> > a filter in image series) that one could help me? >>> > >>> > regards >>> > Samah. >>> > >>> > My source code is as follows >>> > ================================ >>> > #include "itkConnectedThresholdImageFilter.h" >>> > #include "itkImage.h" >>> > #include "itkImageFileReader.h" >>> > #include "itkImageFileWriter.h" >>> > >>> > int main( int argc, char *argv[]) >>> > { >>> > typedef signed short InternalPixelType; >>> > typedef unsigned char OutputPixelType; >>> > const unsigned int Dimension = 3; >>> > typedef itk::Image< InternalPixelType, Dimension > InternalImageType; >>> > >>> > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>> > >>> > typedef itk::ImageFileReader< InternalImageType > ReaderType; >>> > typedef itk::ImageFileWriter< OutputImageType > WriterType; >>> > >>> > ReaderType::Pointer reader = ReaderType::New(); >>> > WriterType::Pointer writer = WriterType::New(); >>> > >>> > reader->SetFileName( >>> "/home/doctorant/T?l?chargements/Images/in.img" ); >>> > writer->SetFileName( >>> "/home/doctorant/T?l?chargements/Images/out.img"); >>> > >>> > >>> > typedef itk::ConnectedThresholdImageFilter< InternalImageType, >>> > OutputImageType > ConnectedFilterType; >>> > >>> > ConnectedFilterType::Pointer connectedThreshold = >>> > ConnectedFilterType::New(); >>> > >>> > connectedThreshold->SetInput( reader->GetOutput() ); >>> > writer->SetInput( connectedThreshold->GetOutput() ); >>> > >>> > >>> > const InternalPixelType lowerThreshold = -1050 ; >>> > const InternalPixelType upperThreshold = -600; >>> > >>> > connectedThreshold->SetLower( lowerThreshold ); >>> > connectedThreshold->SetUpper( upperThreshold ); >>> > >>> > connectedThreshold->SetReplaceValue( 255 ); >>> > >>> > >>> > >>> > >>> > InternalImageType::IndexType index; >>> > index[0] = 250; >>> > index[1] = 239; >>> > >>> > connectedThreshold->SetSeed( index ); >>> > >>> > >>> > try >>> > { >>> > writer->Update(); >>> > } >>> > catch( itk::ExceptionObject & excep ) >>> > { >>> > std::cerr << "Exception caught !" << std::endl; >>> > std::cerr << excep << std::endl; >>> > } >>> > >>> > return 0; >>> > } >>> > >>> > _____________________________________ >>> > Powered by www.kitware.com >>> > >>> > Visit other Kitware open-source projects at >>> > http://www.kitware.com/opensource/opensource.html >>> > >>> > Kitware offers ITK Training Courses, for more information visit: >>> > http://www.kitware.com/products/protraining.php >>> > >>> > Please keep messages on-topic and check the ITK FAQ at: >>> > http://www.itk.org/Wiki/ITK_FAQ >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/insight-users >>> > >>> >> >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> > > > -- > Christopher Mullins > R&D Engineer > Kitware Inc., > 919.869.8871 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From samah.bouzidi at gmail.com Sun Feb 8 07:07:44 2015 From: samah.bouzidi at gmail.com (samah bouzidi) Date: Sun, 8 Feb 2015 13:07:44 +0100 Subject: [ITK-users] problem with 3d region growing In-Reply-To: References: Message-ID: hi, I finished the slice by slice region growing version of code. unfortunately I have these errors: 1) no matching function for call to 'itk :: ConnectedThresholdImageFilter < itk :: Image , itk :: Image > :: SetSeed ( itk :: Image :: INDEXTYPE &) ' connectedThreshold-> SetSeed (index) 2) /home/doctorant/src/InsightToolkit-4.7.0/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx:53:1: note: no known conversion for argument 1 from ?itk::Image::IndexType {aka itk::Index<3u>}? to ?const IndexType& {aka const itk::Index<2u>&}? here is my code : #include "itkConnectedThresholdImageFilter.h" #include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "itkSliceBySliceImageFilter.h" #include "iostream" int main( int argc, char *argv[]) { typedef signed short InternalPixelType; typedef unsigned char OutputPixelType; const unsigned int Dimension = 3; const int sliceDim =2; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; // input typedef itk::Image< OutputPixelType, Dimension > OutputImageType; //output typedef itk::ImageFileReader< InternalImageType > ReaderType; typedef itk::ImageFileWriter< OutputImageType > WriterType; ReaderType::Pointer reader = ReaderType::New(); WriterType::Pointer writer = WriterType::New(); reader->SetFileName( "/home/doctorant/T?l?chargements/Images/in.img" ); writer->SetFileName( "/home/doctorant/T?l?chargements/Images/out.img"); typedef itk::SliceBySliceImageFilter< InternalImageType,OutputImageType> SliceBySliceFilterType; SliceBySliceFilterType::Pointer sliceBySliceFilter = SliceBySliceFilterType::New(); typedef itk::ConnectedThresholdImageFilter< SliceBySliceFilterType::InternalInputImageType, SliceBySliceFilterType::InternalOutputImageType > ConnectedFilterType; ConnectedFilterType::Pointer connectedThreshold =ConnectedFilterType::New(); const InternalPixelType lowerThreshold = -3700 ; const InternalPixelType upperThreshold = -600; connectedThreshold->SetLower( lowerThreshold ); // error here connectedThreshold->SetUpper( upperThreshold ); //error here connectedThreshold->SetReplaceValue( 255 ); // error here InternalImageType::IndexType index; index[0] = 257; index[1] = 449; connectedThreshold->SetSeed(index); // error here sliceBySliceFilter -> SetInput(reader->GetOutput()); sliceBySliceFilter->SetFilter(connectedThreshold); writer->SetInput( sliceBySliceFilter->GetOutput()); try { writer->Update(); } catch( itk::ExceptionObject & excep ) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; } return 0; } 2015-02-06 21:59 GMT+01:00 samah bouzidi : > hi, > > sincerely, I fail to understand the response of this filter, the > algorithm succeeds to segment the region .however, in 3D, the first slice is > the same used to check the segmentation in 2D, I am not getting at least for > the first slice the region obtained in 2D. > ps: the modified code takes into account the third dimension : > > > InternalImageType::IndexType index; > index[0] = 250; > index[1] = 239; > index[2]= 1; > > connectedThreshold->SetSeed( index ); > > > any help will be appreciated. > thanks in advance. > > > > 2015-02-04 21:24 GMT+01:00 Christopher Mullins < > christopher.mullins at kitware.com>: > >> The ConnectedThresholdImageFilter example [1] might be of use. >> >> [1] >> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/Segmentation/ConnectedThresholdImageFilter.cxx >> >> On Wed, Feb 4, 2015 at 3:14 PM, samah bouzidi >> wrote: >> >>> hi Matt, >>> >>> thank you for replying. >>> >>> I can't find the error in my code (a black volume result) >>> >>> can you please look at my code. >>> >>> >>> >>> Regards >>> Samah >>> >>> >>> >>> 2015-02-04 20:36 GMT+01:00 Matt McCormick : >>> >>>> Hi Samah, >>>> >>>> Welcome to ITK! >>>> >>>> For a 3D image, the third index of the seed does need to be defined. >>>> >>>> To apply a filter on each slice independently, use the >>>> SliceBySliceImageFilter [1]. >>>> >>>> HTH, >>>> Matt >>>> >>>> [1] >>>> http://www.itk.org/Doxygen/html/classitk_1_1SliceBySliceImageFilter.html >>>> >>>> On Wed, Feb 4, 2015 at 1:59 PM, samah bouzidi >>>> wrote: >>>> > hello itk users, >>>> > >>>> > I am a beginner ITK users. I am trying to segment a volume using >>>> region >>>> > growing algorithm. I am able to do it in a 2D image (dicom) but not >>>> for a >>>> > volume. >>>> > 1) I saw that for 3D region growing the seed point have 3 coordinates >>>> (x, y, >>>> > z). In my case, z is the slice number (i am using .img format). Can I >>>> use an >>>> > (x,y) seed point? >>>> > 2) I have another idea, reading an image series and applied the >>>> filter for >>>> > each image and then writing them in volume. Are there any examples ( >>>> applied >>>> > a filter in image series) that one could help me? >>>> > >>>> > regards >>>> > Samah. >>>> > >>>> > My source code is as follows >>>> > ================================ >>>> > #include "itkConnectedThresholdImageFilter.h" >>>> > #include "itkImage.h" >>>> > #include "itkImageFileReader.h" >>>> > #include "itkImageFileWriter.h" >>>> > >>>> > int main( int argc, char *argv[]) >>>> > { >>>> > typedef signed short InternalPixelType; >>>> > typedef unsigned char OutputPixelType; >>>> > const unsigned int Dimension = 3; >>>> > typedef itk::Image< InternalPixelType, Dimension > >>>> InternalImageType; >>>> > >>>> > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>> > >>>> > typedef itk::ImageFileReader< InternalImageType > ReaderType; >>>> > typedef itk::ImageFileWriter< OutputImageType > WriterType; >>>> > >>>> > ReaderType::Pointer reader = ReaderType::New(); >>>> > WriterType::Pointer writer = WriterType::New(); >>>> > >>>> > reader->SetFileName( >>>> "/home/doctorant/T?l?chargements/Images/in.img" ); >>>> > writer->SetFileName( >>>> "/home/doctorant/T?l?chargements/Images/out.img"); >>>> > >>>> > >>>> > typedef itk::ConnectedThresholdImageFilter< InternalImageType, >>>> > OutputImageType > ConnectedFilterType; >>>> > >>>> > ConnectedFilterType::Pointer connectedThreshold = >>>> > ConnectedFilterType::New(); >>>> > >>>> > connectedThreshold->SetInput( reader->GetOutput() ); >>>> > writer->SetInput( connectedThreshold->GetOutput() ); >>>> > >>>> > >>>> > const InternalPixelType lowerThreshold = -1050 ; >>>> > const InternalPixelType upperThreshold = -600; >>>> > >>>> > connectedThreshold->SetLower( lowerThreshold ); >>>> > connectedThreshold->SetUpper( upperThreshold ); >>>> > >>>> > connectedThreshold->SetReplaceValue( 255 ); >>>> > >>>> > >>>> > >>>> > >>>> > InternalImageType::IndexType index; >>>> > index[0] = 250; >>>> > index[1] = 239; >>>> > >>>> > connectedThreshold->SetSeed( index ); >>>> > >>>> > >>>> > try >>>> > { >>>> > writer->Update(); >>>> > } >>>> > catch( itk::ExceptionObject & excep ) >>>> > { >>>> > std::cerr << "Exception caught !" << std::endl; >>>> > std::cerr << excep << std::endl; >>>> > } >>>> > >>>> > return 0; >>>> > } >>>> > >>>> > _____________________________________ >>>> > Powered by www.kitware.com >>>> > >>>> > Visit other Kitware open-source projects at >>>> > http://www.kitware.com/opensource/opensource.html >>>> > >>>> > Kitware offers ITK Training Courses, for more information visit: >>>> > http://www.kitware.com/products/protraining.php >>>> > >>>> > Please keep messages on-topic and check the ITK FAQ at: >>>> > http://www.itk.org/Wiki/ITK_FAQ >>>> > >>>> > Follow this link to subscribe/unsubscribe: >>>> > http://public.kitware.com/mailman/listinfo/insight-users >>>> > >>>> >>> >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >> >> >> -- >> Christopher Mullins >> R&D Engineer >> Kitware Inc., >> 919.869.8871 >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Sun Feb 8 15:27:17 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 8 Feb 2015 15:27:17 -0500 Subject: [ITK-users] cannot acces virtual void itk::Rigid3DTransform< TScalar >::SetMatrix (const MatrixType & matrix, double tolerance ) from the Rigid3D transform class. In-Reply-To: References: Message-ID: Hi Yago, The tolerance parameter was added in a very recent version of ITK. Make sure you are using the latest version of ITK. HTH, Matt On Fri, Feb 6, 2015 at 2:32 PM, Yago Diez wrote: > > > Hi all, > > I want to store a 3D rotation matrix that I have computed in some format > that itk can understand (and use to transform points and images, not to as > the starting point of any optimization process). The problem is that the > matrix is not "as orthogonal as it should be" due to numerical problems: > > > So far I am using the Rigid3DTransform which looks the best way to go (but > am willing to change if this is wrong). The numerical problems express like > this: > > 1) if I use the "MatrixIsOrthogonal(,)" function I get a "yes" for a 1e-5 > tolerance but not for the default "1e-10" tolerance. > 2) Consequently, if I use the SetMatrix() function I get an exception. > > I am pretty confident that I can get away with what I need to do if I > convince the class to just swallow the "not very orthogonal" matrix (by > using a less restrictive tolerance). I have seen that there exists a > function to do just that but I am having problems using it. > > Specifically, I cannot seem to access the > > itk::Rigid3DTransform< TScalar >::SetMatrix (const MatrixType & > matrix, double tolerance ) function > > From the Rigid3D transform class. > > Consequently, the following code returns a compilation error : > >> error: no matching function for call to >> ?itk::Rigid3DTransform::SetMatrix(smallMatrixType&, double)? >> XXXXXXXXXXXX: note: candidate is: >> PATH/Code/Common/itkRigid3DTransform.txx:93:1: note: void >> itk::Rigid3DTransform::SetMatrix(const MatrixType&) [with >> TScalarType = double, itk::Rigid3DTransform::MatrixType = >> itk::Matrix] >> PATH/Code/Common/itkRigid3DTransform.txx:93:1: note: candidate expects 1 >> argument, 2 provided > > > I have checked that the itkRigid3DTransform.txx file has indeed only the > definition of the setmatrix method with one parameter. > > I assume I am looking for the setmatrix function with two parameters "in the > wrong place", but have not yet managed to find the right one, any ideas? > > > Here is the detailed code > > >> typedef itk::Matrix smallMatrixType; >> smallMatrixType auxMatrix; >> > // matrix initialization, matrix M1 is orthogonal but I have numerical > problems > > auxMatrix[0][0]=M1[0][0]; > auxMatrix[0][1]=M1[0][1]; > auxMatrix[0][2]=M1[0][2]; > auxMatrix[1][0]=M1[1][0]; > auxMatrix[1][1]=M1[1][1]; > auxMatrix[1][2]=M1[1][2]; > auxMatrix[2][0]=M1[2][0]; > auxMatrix[2][1]=M1[2][1]; > auxMatrix[2][2]=M1[2][2]; > > > typedef itk::Rigid3DTransform TransformType; > TransformType::Pointer rotation = TransformType::New(); > > // rotation->MatrixIsOrthogonal(auxMatrix,1e-10) outputs 0, but > rotation->MatrixIsOrthogonal(auxMatrix,1e-5) outputs 1 > > rotation->SetMatrix(auxMatrix,1e-5); // this produces a compilation error > > > //rotation->SetMatrix(auxMatrix); // THIS RESULTS IN AN EXCEPTION: > itk::ERROR: Rigid3DTransform(0x1dec800): Attempting to set a non-orthogonal > rotation matrix > > > Thanks you very much for any help that you can provide. > > > > Yago Diez Donoso (PhD) > Computer Vision and Robotics Group http://vicorob.udg.es/ > E-mail: yago at eia.udg.es; yagodiezdonoso at gmail.com > Phone: (int. code) 34 972418013 > University of Girona > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 Feb 8 15:52:56 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 8 Feb 2015 15:52:56 -0500 Subject: [ITK-users] What is StepLenght? In-Reply-To: References: Message-ID: Hi Matias, The follow examples from the ITK Software Guide may be helpful: http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ImageRegistration1_8cxx-example.html http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ImageRegistration4_8cxx-example.html http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ImageRegistration5_8cxx-example.html http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ImageRegistration9_8cxx-example.html HTH, Matt On Fri, Feb 6, 2015 at 9:47 AM, Matias Montroull wrote: > Hi, > > I'm new to registration and I'm trying to understand what StepLenght is. I > can play with the values but I'm not really sure what it is. > > Can someone explain? > > Thank you, > > 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 matt.mccormick at kitware.com Sun Feb 8 15:58:10 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sun, 8 Feb 2015 15:58:10 -0500 Subject: [ITK-users] problem with 3d region growing In-Reply-To: References: Message-ID: Hi, These errors suggest that a 2D IndexType must be passed. HTH, Matt On Sun, Feb 8, 2015 at 7:07 AM, samah bouzidi wrote: > hi, > > I finished the slice by slice region growing version of code. unfortunately > I have these errors: > > 1) no matching function for call to 'itk :: ConnectedThresholdImageFilter > , itk :: Image > :: SetSeed > (itk :: Image :: INDEXTYPE &) ' > connectedThreshold-> SetSeed (index) > > 2) > /home/doctorant/src/InsightToolkit-4.7.0/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx:53:1: > note: no known conversion for argument 1 from ?itk::Image 3u>::IndexType {aka itk::Index<3u>}? to ?const IndexType& {aka const > itk::Index<2u>&}? > > > here is my code : > > #include "itkConnectedThresholdImageFilter.h" > #include "itkImage.h" > #include "itkImageFileReader.h" > #include "itkImageFileWriter.h" > #include "itkSliceBySliceImageFilter.h" > #include "iostream" > > int main( int argc, char *argv[]) > { > typedef signed short InternalPixelType; > typedef unsigned char OutputPixelType; > const unsigned int Dimension = 3; > const int sliceDim =2; > typedef itk::Image< InternalPixelType, Dimension > InternalImageType; // > input > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; //output > > typedef itk::ImageFileReader< InternalImageType > ReaderType; > typedef itk::ImageFileWriter< OutputImageType > WriterType; > > ReaderType::Pointer reader = ReaderType::New(); > WriterType::Pointer writer = WriterType::New(); > > reader->SetFileName( "/home/doctorant/T?l?chargements/Images/in.img" ); > writer->SetFileName( "/home/doctorant/T?l?chargements/Images/out.img"); > > > typedef itk::SliceBySliceImageFilter< InternalImageType,OutputImageType> > SliceBySliceFilterType; > > SliceBySliceFilterType::Pointer sliceBySliceFilter = > SliceBySliceFilterType::New(); > > typedef itk::ConnectedThresholdImageFilter< > SliceBySliceFilterType::InternalInputImageType, > SliceBySliceFilterType::InternalOutputImageType > > ConnectedFilterType; > ConnectedFilterType::Pointer connectedThreshold > =ConnectedFilterType::New(); > > const InternalPixelType lowerThreshold = -3700 ; > const InternalPixelType upperThreshold = -600; > > connectedThreshold->SetLower( lowerThreshold ); // error here > connectedThreshold->SetUpper( upperThreshold ); //error here > connectedThreshold->SetReplaceValue( 255 ); // error here > > InternalImageType::IndexType index; > index[0] = 257; > index[1] = 449; > connectedThreshold->SetSeed(index); // error here > > sliceBySliceFilter -> SetInput(reader->GetOutput()); > sliceBySliceFilter->SetFilter(connectedThreshold); > writer->SetInput( sliceBySliceFilter->GetOutput()); > try > { > writer->Update(); > } > catch( itk::ExceptionObject & excep ) > { > std::cerr << "Exception caught !" << std::endl; > std::cerr << excep << std::endl; > } > > return 0; > } > > 2015-02-06 21:59 GMT+01:00 samah bouzidi : >> >> hi, >> >> sincerely, I fail to understand the response of this filter, the algorithm >> succeeds to segment the region .however, in 3D, the first slice is the same >> used to check the segmentation in 2D, I am not getting at least for the >> first slice the region obtained in 2D. >> ps: the modified code takes into account the third dimension : >> >> >> InternalImageType::IndexType index; >> index[0] = 250; >> index[1] = 239; >> index[2]= 1; >> >> connectedThreshold->SetSeed( index ); >> >> >> any help will be appreciated. >> thanks in advance. >> >> >> >> 2015-02-04 21:24 GMT+01:00 Christopher Mullins >> : >>> >>> The ConnectedThresholdImageFilter example [1] might be of use. >>> >>> [1] >>> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/Segmentation/ConnectedThresholdImageFilter.cxx >>> >>> On Wed, Feb 4, 2015 at 3:14 PM, samah bouzidi >>> wrote: >>>> >>>> hi Matt, >>>> >>>> thank you for replying. >>>> >>>> I can't find the error in my code (a black volume result) >>>> >>>> can you please look at my code. >>>> >>>> >>>> >>>> Regards >>>> Samah >>>> >>>> >>>> >>>> 2015-02-04 20:36 GMT+01:00 Matt McCormick : >>>>> >>>>> Hi Samah, >>>>> >>>>> Welcome to ITK! >>>>> >>>>> For a 3D image, the third index of the seed does need to be defined. >>>>> >>>>> To apply a filter on each slice independently, use the >>>>> SliceBySliceImageFilter [1]. >>>>> >>>>> HTH, >>>>> Matt >>>>> >>>>> [1] >>>>> http://www.itk.org/Doxygen/html/classitk_1_1SliceBySliceImageFilter.html >>>>> >>>>> On Wed, Feb 4, 2015 at 1:59 PM, samah bouzidi >>>>> wrote: >>>>> > hello itk users, >>>>> > >>>>> > I am a beginner ITK users. I am trying to segment a volume using >>>>> > region >>>>> > growing algorithm. I am able to do it in a 2D image (dicom) but not >>>>> > for a >>>>> > volume. >>>>> > 1) I saw that for 3D region growing the seed point have 3 coordinates >>>>> > (x, y, >>>>> > z). In my case, z is the slice number (i am using .img format). Can I >>>>> > use an >>>>> > (x,y) seed point? >>>>> > 2) I have another idea, reading an image series and applied the >>>>> > filter for >>>>> > each image and then writing them in volume. Are there any examples ( >>>>> > applied >>>>> > a filter in image series) that one could help me? >>>>> > >>>>> > regards >>>>> > Samah. >>>>> > >>>>> > My source code is as follows >>>>> > ================================ >>>>> > #include "itkConnectedThresholdImageFilter.h" >>>>> > #include "itkImage.h" >>>>> > #include "itkImageFileReader.h" >>>>> > #include "itkImageFileWriter.h" >>>>> > >>>>> > int main( int argc, char *argv[]) >>>>> > { >>>>> > typedef signed short InternalPixelType; >>>>> > typedef unsigned char OutputPixelType; >>>>> > const unsigned int Dimension = 3; >>>>> > typedef itk::Image< InternalPixelType, Dimension > >>>>> > InternalImageType; >>>>> > >>>>> > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; >>>>> > >>>>> > typedef itk::ImageFileReader< InternalImageType > ReaderType; >>>>> > typedef itk::ImageFileWriter< OutputImageType > WriterType; >>>>> > >>>>> > ReaderType::Pointer reader = ReaderType::New(); >>>>> > WriterType::Pointer writer = WriterType::New(); >>>>> > >>>>> > reader->SetFileName( >>>>> > "/home/doctorant/T?l?chargements/Images/in.img" ); >>>>> > writer->SetFileName( >>>>> > "/home/doctorant/T?l?chargements/Images/out.img"); >>>>> > >>>>> > >>>>> > typedef itk::ConnectedThresholdImageFilter< InternalImageType, >>>>> > OutputImageType > ConnectedFilterType; >>>>> > >>>>> > ConnectedFilterType::Pointer connectedThreshold = >>>>> > ConnectedFilterType::New(); >>>>> > >>>>> > connectedThreshold->SetInput( reader->GetOutput() ); >>>>> > writer->SetInput( connectedThreshold->GetOutput() ); >>>>> > >>>>> > >>>>> > const InternalPixelType lowerThreshold = -1050 ; >>>>> > const InternalPixelType upperThreshold = -600; >>>>> > >>>>> > connectedThreshold->SetLower( lowerThreshold ); >>>>> > connectedThreshold->SetUpper( upperThreshold ); >>>>> > >>>>> > connectedThreshold->SetReplaceValue( 255 ); >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > InternalImageType::IndexType index; >>>>> > index[0] = 250; >>>>> > index[1] = 239; >>>>> > >>>>> > connectedThreshold->SetSeed( index ); >>>>> > >>>>> > >>>>> > try >>>>> > { >>>>> > writer->Update(); >>>>> > } >>>>> > catch( itk::ExceptionObject & excep ) >>>>> > { >>>>> > std::cerr << "Exception caught !" << std::endl; >>>>> > std::cerr << excep << std::endl; >>>>> > } >>>>> > >>>>> > return 0; >>>>> > } >>>>> > >>>>> > _____________________________________ >>>>> > Powered by www.kitware.com >>>>> > >>>>> > Visit other Kitware open-source projects at >>>>> > http://www.kitware.com/opensource/opensource.html >>>>> > >>>>> > Kitware offers ITK Training Courses, for more information visit: >>>>> > http://www.kitware.com/products/protraining.php >>>>> > >>>>> > Please keep messages on-topic and check the ITK FAQ at: >>>>> > http://www.itk.org/Wiki/ITK_FAQ >>>>> > >>>>> > Follow this link to subscribe/unsubscribe: >>>>> > http://public.kitware.com/mailman/listinfo/insight-users >>>>> > >>>> >>>> >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>> >>> >>> >>> -- >>> Christopher Mullins >>> R&D Engineer >>> Kitware Inc., >>> 919.869.8871 >> >> > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 samah.bouzidi at gmail.com Sun Feb 8 16:59:45 2015 From: samah.bouzidi at gmail.com (samah bouzidi) Date: Sun, 8 Feb 2015 22:59:45 +0100 Subject: [ITK-users] problem with 3d region growing In-Reply-To: References: Message-ID: hi, thank you Matt McCormick for your reply. I* finally fixed "The Problem"*. // the code #include "itkConnectedThresholdImageFilter.h" #include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "itkSliceBySliceImageFilter.h" int main( int argc, char *argv[]) { typedef signed short InternalPixelType; typedef unsigned char OutputPixelType; const unsigned int Dimension = 3; const unsigned int sliceDim =2; typedef itk::Image< InternalPixelType, Dimension > InternalImageType; // input typedef itk::Image< InternalPixelType, sliceDim > sliceType; // input typedef itk::Image< OutputPixelType, Dimension > OutputImageType; //output typedef itk::ImageFileReader< InternalImageType > ReaderType; typedef itk::ImageFileWriter< OutputImageType > WriterType; ReaderType::Pointer reader = ReaderType::New(); WriterType::Pointer writer = WriterType::New(); reader->SetFileName( "/home/doctorant/T?l?chargements/Images/in.img" ); writer->SetFileName( "/home/doctorant/T?l?chargements/Images/out.img"); typedef itk::SliceBySliceImageFilter< InternalImageType,OutputImageType> SliceBySliceFilterType; SliceBySliceFilterType::Pointer sliceBySliceFilter = SliceBySliceFilterType::New(); typedef itk::ConnectedThresholdImageFilter< SliceBySliceFilterType::InternalInputImageType, SliceBySliceFilterType::InternalOutputImageType > ConnectedFilterType; ConnectedFilterType::Pointer connectedThreshold =ConnectedFilterType::New(); SliceBySliceFilterType::InternalInputImageType::InternalPixelType lowerThreshold = -1100; SliceBySliceFilterType::InternalInputImageType::InternalPixelType upperThreshold = -600; SliceBySliceFilterType::InternalOutputImageType::InternalPixelType x = 255; connectedThreshold->SetLower(lowerThreshold); connectedThreshold->SetUpper( upperThreshold ); connectedThreshold->SetReplaceValue( x ); // 250, 239 SliceBySliceFilterType::InternalInputImageType::IndexType index; index[0] = 252; index[1] = 275; connectedThreshold->SetSeed(index); sliceBySliceFilter -> SetInput(reader->GetOutput()); sliceBySliceFilter->SetFilter(connectedThreshold); writer->SetInput( sliceBySliceFilter->GetOutput()); try { writer->Update(); } catch( itk::ExceptionObject & excep ) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; } return 0; } 2015-02-08 21:58 GMT+01:00 Matt McCormick : > Hi, > > These errors suggest that a 2D IndexType must be passed. > > HTH, > Matt > > On Sun, Feb 8, 2015 at 7:07 AM, samah bouzidi > wrote: > > hi, > > > > I finished the slice by slice region growing version of code. > unfortunately > > I have these errors: > > > > 1) no matching function for call to 'itk :: ConnectedThresholdImageFilter > > , itk :: Image > :: > SetSeed > > (itk :: Image :: INDEXTYPE &) ' > > connectedThreshold-> SetSeed (index) > > > > 2) > > > /home/doctorant/src/InsightToolkit-4.7.0/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx:53:1: > > note: no known conversion for argument 1 from ?itk::Image > 3u>::IndexType {aka itk::Index<3u>}? to ?const IndexType& {aka const > > itk::Index<2u>&}? > > > > > > here is my code : > > > > #include "itkConnectedThresholdImageFilter.h" > > #include "itkImage.h" > > #include "itkImageFileReader.h" > > #include "itkImageFileWriter.h" > > #include "itkSliceBySliceImageFilter.h" > > #include "iostream" > > > > int main( int argc, char *argv[]) > > { > > typedef signed short InternalPixelType; > > typedef unsigned char OutputPixelType; > > const unsigned int Dimension = 3; > > const int sliceDim =2; > > typedef itk::Image< InternalPixelType, Dimension > InternalImageType; > // > > input > > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > //output > > > > typedef itk::ImageFileReader< InternalImageType > ReaderType; > > typedef itk::ImageFileWriter< OutputImageType > WriterType; > > > > ReaderType::Pointer reader = ReaderType::New(); > > WriterType::Pointer writer = WriterType::New(); > > > > reader->SetFileName( "/home/doctorant/T?l?chargements/Images/in.img" ); > > writer->SetFileName( "/home/doctorant/T?l?chargements/Images/out.img"); > > > > > > typedef itk::SliceBySliceImageFilter< > InternalImageType,OutputImageType> > > SliceBySliceFilterType; > > > > SliceBySliceFilterType::Pointer sliceBySliceFilter = > > SliceBySliceFilterType::New(); > > > > typedef itk::ConnectedThresholdImageFilter< > > SliceBySliceFilterType::InternalInputImageType, > > SliceBySliceFilterType::InternalOutputImageType > > > ConnectedFilterType; > > ConnectedFilterType::Pointer connectedThreshold > > =ConnectedFilterType::New(); > > > > const InternalPixelType lowerThreshold = -3700 ; > > const InternalPixelType upperThreshold = -600; > > > > connectedThreshold->SetLower( lowerThreshold ); // error here > > connectedThreshold->SetUpper( upperThreshold ); //error here > > connectedThreshold->SetReplaceValue( 255 ); // error here > > > > InternalImageType::IndexType index; > > index[0] = 257; > > index[1] = 449; > > connectedThreshold->SetSeed(index); // error here > > > > sliceBySliceFilter -> SetInput(reader->GetOutput()); > > sliceBySliceFilter->SetFilter(connectedThreshold); > > writer->SetInput( sliceBySliceFilter->GetOutput()); > > try > > { > > writer->Update(); > > } > > catch( itk::ExceptionObject & excep ) > > { > > std::cerr << "Exception caught !" << std::endl; > > std::cerr << excep << std::endl; > > } > > > > return 0; > > } > > > > 2015-02-06 21:59 GMT+01:00 samah bouzidi : > >> > >> hi, > >> > >> sincerely, I fail to understand the response of this filter, the > algorithm > >> succeeds to segment the region .however, in 3D, the first slice is the > same > >> used to check the segmentation in 2D, I am not getting at least for the > >> first slice the region obtained in 2D. > >> ps: the modified code takes into account the third dimension : > >> > >> > >> InternalImageType::IndexType index; > >> index[0] = 250; > >> index[1] = 239; > >> index[2]= 1; > >> > >> connectedThreshold->SetSeed( index ); > >> > >> > >> any help will be appreciated. > >> thanks in advance. > >> > >> > >> > >> 2015-02-04 21:24 GMT+01:00 Christopher Mullins > >> : > >>> > >>> The ConnectedThresholdImageFilter example [1] might be of use. > >>> > >>> [1] > >>> > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/Segmentation/ConnectedThresholdImageFilter.cxx > >>> > >>> On Wed, Feb 4, 2015 at 3:14 PM, samah bouzidi > > >>> wrote: > >>>> > >>>> hi Matt, > >>>> > >>>> thank you for replying. > >>>> > >>>> I can't find the error in my code (a black volume result) > >>>> > >>>> can you please look at my code. > >>>> > >>>> > >>>> > >>>> Regards > >>>> Samah > >>>> > >>>> > >>>> > >>>> 2015-02-04 20:36 GMT+01:00 Matt McCormick >: > >>>>> > >>>>> Hi Samah, > >>>>> > >>>>> Welcome to ITK! > >>>>> > >>>>> For a 3D image, the third index of the seed does need to be defined. > >>>>> > >>>>> To apply a filter on each slice independently, use the > >>>>> SliceBySliceImageFilter [1]. > >>>>> > >>>>> HTH, > >>>>> Matt > >>>>> > >>>>> [1] > >>>>> > http://www.itk.org/Doxygen/html/classitk_1_1SliceBySliceImageFilter.html > >>>>> > >>>>> On Wed, Feb 4, 2015 at 1:59 PM, samah bouzidi < > samah.bouzidi at gmail.com> > >>>>> wrote: > >>>>> > hello itk users, > >>>>> > > >>>>> > I am a beginner ITK users. I am trying to segment a volume using > >>>>> > region > >>>>> > growing algorithm. I am able to do it in a 2D image (dicom) but not > >>>>> > for a > >>>>> > volume. > >>>>> > 1) I saw that for 3D region growing the seed point have 3 > coordinates > >>>>> > (x, y, > >>>>> > z). In my case, z is the slice number (i am using .img format). > Can I > >>>>> > use an > >>>>> > (x,y) seed point? > >>>>> > 2) I have another idea, reading an image series and applied the > >>>>> > filter for > >>>>> > each image and then writing them in volume. Are there any examples > ( > >>>>> > applied > >>>>> > a filter in image series) that one could help me? > >>>>> > > >>>>> > regards > >>>>> > Samah. > >>>>> > > >>>>> > My source code is as follows > >>>>> > ================================ > >>>>> > #include "itkConnectedThresholdImageFilter.h" > >>>>> > #include "itkImage.h" > >>>>> > #include "itkImageFileReader.h" > >>>>> > #include "itkImageFileWriter.h" > >>>>> > > >>>>> > int main( int argc, char *argv[]) > >>>>> > { > >>>>> > typedef signed short InternalPixelType; > >>>>> > typedef unsigned char OutputPixelType; > >>>>> > const unsigned int Dimension = 3; > >>>>> > typedef itk::Image< InternalPixelType, Dimension > > >>>>> > InternalImageType; > >>>>> > > >>>>> > typedef itk::Image< OutputPixelType, Dimension > OutputImageType; > >>>>> > > >>>>> > typedef itk::ImageFileReader< InternalImageType > ReaderType; > >>>>> > typedef itk::ImageFileWriter< OutputImageType > WriterType; > >>>>> > > >>>>> > ReaderType::Pointer reader = ReaderType::New(); > >>>>> > WriterType::Pointer writer = WriterType::New(); > >>>>> > > >>>>> > reader->SetFileName( > >>>>> > "/home/doctorant/T?l?chargements/Images/in.img" ); > >>>>> > writer->SetFileName( > >>>>> > "/home/doctorant/T?l?chargements/Images/out.img"); > >>>>> > > >>>>> > > >>>>> > typedef itk::ConnectedThresholdImageFilter< InternalImageType, > >>>>> > OutputImageType > ConnectedFilterType; > >>>>> > > >>>>> > ConnectedFilterType::Pointer connectedThreshold = > >>>>> > ConnectedFilterType::New(); > >>>>> > > >>>>> > connectedThreshold->SetInput( reader->GetOutput() ); > >>>>> > writer->SetInput( connectedThreshold->GetOutput() ); > >>>>> > > >>>>> > > >>>>> > const InternalPixelType lowerThreshold = -1050 ; > >>>>> > const InternalPixelType upperThreshold = -600; > >>>>> > > >>>>> > connectedThreshold->SetLower( lowerThreshold ); > >>>>> > connectedThreshold->SetUpper( upperThreshold ); > >>>>> > > >>>>> > connectedThreshold->SetReplaceValue( 255 ); > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > InternalImageType::IndexType index; > >>>>> > index[0] = 250; > >>>>> > index[1] = 239; > >>>>> > > >>>>> > connectedThreshold->SetSeed( index ); > >>>>> > > >>>>> > > >>>>> > try > >>>>> > { > >>>>> > writer->Update(); > >>>>> > } > >>>>> > catch( itk::ExceptionObject & excep ) > >>>>> > { > >>>>> > std::cerr << "Exception caught !" << std::endl; > >>>>> > std::cerr << excep << std::endl; > >>>>> > } > >>>>> > > >>>>> > return 0; > >>>>> > } > >>>>> > > >>>>> > _____________________________________ > >>>>> > Powered by www.kitware.com > >>>>> > > >>>>> > Visit other Kitware open-source projects at > >>>>> > http://www.kitware.com/opensource/opensource.html > >>>>> > > >>>>> > Kitware offers ITK Training Courses, for more information visit: > >>>>> > http://www.kitware.com/products/protraining.php > >>>>> > > >>>>> > Please keep messages on-topic and check the ITK FAQ at: > >>>>> > http://www.itk.org/Wiki/ITK_FAQ > >>>>> > > >>>>> > Follow this link to subscribe/unsubscribe: > >>>>> > http://public.kitware.com/mailman/listinfo/insight-users > >>>>> > > >>>> > >>>> > >>>> > >>>> _____________________________________ > >>>> Powered by www.kitware.com > >>>> > >>>> Visit other Kitware open-source projects at > >>>> http://www.kitware.com/opensource/opensource.html > >>>> > >>>> Kitware offers ITK Training Courses, for more information visit: > >>>> http://www.kitware.com/products/protraining.php > >>>> > >>>> Please keep messages on-topic and check the ITK FAQ at: > >>>> http://www.itk.org/Wiki/ITK_FAQ > >>>> > >>>> Follow this link to subscribe/unsubscribe: > >>>> http://public.kitware.com/mailman/listinfo/insight-users > >>>> > >>> > >>> > >>> > >>> -- > >>> Christopher Mullins > >>> R&D Engineer > >>> Kitware Inc., > >>> 919.869.8871 > >> > >> > > > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the 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 yagodiezdonoso at gmail.com Mon Feb 9 06:13:51 2015 From: yagodiezdonoso at gmail.com (yagoDiez) Date: Mon, 9 Feb 2015 04:13:51 -0700 (MST) Subject: [ITK-users] Rigid3DTransform make error In-Reply-To: References: <799E43A7-6B72-4C7E-90A2-0E0604C15CDB@u.washington.edu> <917C757C-D5BC-45C0-A0F6-ED12E79A1877@gmail.com> Message-ID: <1423480431340-7586887.post@n2.nabble.com> Some more information on this: The details mentioned by Nicholas Tustison are here: http://mitk.org/wiki/ITK_v4_Migration_Guide I encountered a similar problem to the one originating the thread (just migrated to itk 4.7). I solved it by using the itkv3 rigid transformation class. http://www.itk.org/Doxygen43/html/classitkv3_1_1Rigid3DTransform.html So, all you would need to do is change the typedef to typedef itkv3::Rigid3DTransform TransformType; and include the following file. #include Probably just using the itk 3 compatibility flag would also work. In my case, I used this solution because I needed to use the setmatrix (with orthogonality tolerance) function with a previously computed rotation matrix. I don't feel too happy about it but I did not see a direct way to use the versor3D class (which I do use for my "normal" rigid registrations and encourage others to use). Will post again if I get a better solution. -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Rigid3DTransform-make-error-tp7160305p7586887.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From yagodiezdonoso at gmail.com Mon Feb 9 06:44:26 2015 From: yagodiezdonoso at gmail.com (yagoDiez) Date: Mon, 9 Feb 2015 04:44:26 -0700 (MST) Subject: [ITK-users] cannot acces virtual void itk::Rigid3DTransform< TScalar >::SetMatrix (const MatrixType & matrix, double tolerance ) from the Rigid3D transform class. In-Reply-To: References: Message-ID: <1423482266729-7586888.post@n2.nabble.com> Hi Matt, Thanks for pointing this out, I migrated to the latest (4.7) version and it works now. While migrating I encountered a new problem (rigid3D translation is sort of deprecated now). More information here: http://itk-insight-users.2283740.n2.nabble.com/Rigid3DTransform-make-error-td7160305.html#a7586887 I had to resort to using an "intermediate itkv3 rigid transformation class". It does work but I am not sure it is a "lasting" solution. Does anybody know which class is better for my original problem: - I have a previously computed rotation matrix which I want to store in a format that itk can use. - Consequently, I am pretty sure that I want to use the setMatrix method (ideally with the possibility to specify a tolerance). Thanks! Yago -- View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-cannot-acces-virtual-void-itk-Rigid3DTransform-TScalar-SetMatrix-const-MatrixType-matrix-d-tp7586880p7586888.html Sent from the ITK Insight Users mailing list archive at Nabble.com. From matimontg at gmail.com Mon Feb 9 10:20:05 2015 From: matimontg at gmail.com (Matias Montroull) Date: Mon, 9 Feb 2015 12:20:05 -0300 Subject: [ITK-users] What is StepLenght? In-Reply-To: References: Message-ID: Thanks, I'll take a look. Also, what learning rate is? On Sun, Feb 8, 2015 at 5:52 PM, Matt McCormick wrote: > Hi Matias, > > The follow examples from the ITK Software Guide may be helpful: > > > http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ImageRegistration1_8cxx-example.html > > > http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ImageRegistration4_8cxx-example.html > > > http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ImageRegistration5_8cxx-example.html > > > http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ImageRegistration9_8cxx-example.html > > HTH, > Matt > > > > On Fri, Feb 6, 2015 at 9:47 AM, Matias Montroull > wrote: > > Hi, > > > > I'm new to registration and I'm trying to understand what StepLenght is. > I > > can play with the values but I'm not really sure what it is. > > > > Can someone explain? > > > > Thank you, > > > > Matias. > > > > _____________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://www.kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Param.Rajpura at LntTechservices.com Tue Feb 10 07:27:21 2015 From: Param.Rajpura at LntTechservices.com (Param Rajpura) Date: Tue, 10 Feb 2015 12:27:21 +0000 Subject: [ITK-users] Chan and Vese Segmentation for 3D data Message-ID: <8BF3D5D84855AD42BA4EE916729347C2763127@POCITMSEXMB05.LntUniverse.com> Hi all, I am using ITK for segmentation from 3D MR Images data. Initially applying ChanandVeseFilter on 2D images I could segment successfully but 3D data generates a problem. I am using the same code provided in the example: "Single Phase Chan and Vese" the only difference is I am loading fast marching output instead of generating here. I am unable to catch any exceptions here, but while debugging my code, first chance exception is thrown at: 1. Inside levelSetFilter->Update(); 2. In ImportImageContainer.hxx 3. Line 181, data = new TElement[size]; Below is my code. typedef itk::ImageFileReader< MainType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName("E:\\Intermediate Results\\Sample001_MRI.mhd"); try { reader->Update(); } catch (itk::ExceptionObject & excep) { std::cerr << "Exception caught in read !" << std::endl; std::cerr << excep << std::endl; return -1; } typedef itk::CastImageFilter FloatConversionFilter; FloatConversionFilter::Pointer ImgTypeConverter = FloatConversionFilter::New(); ImgTypeConverter->SetInput(reader->GetOutput()); ImgTypeConverter->Update(); typedef itk::ImageFileWriter< InternalImageType > WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetFileName("E:\\Intermediate Results\\Out.mhd"); typedef itk::ImageFileReader< InternalImageType > ReaderType1; ReaderType1::Pointer reader1 = ReaderType1::New(); reader1->SetFileName("E:\\Intermediate Results\\FastMarching.mhd"); reader1->Update(); InternalImageType::Pointer Image = InternalImageType::New(); Image = ImgTypeConverter->GetOutput(); Image->Print(std::cout); typedef itk::ChangeInformationImageFilter ChangeFilter; ChangeFilter::Pointer change = ChangeFilter::New(); change->ChangeAll(); change->UseReferenceImageOn(); change->SetReferenceImage(Image); change->SetInput(reader1->GetOutput()); try { change->Update(); } catch (itk::ExceptionObject & excep) { std::cerr << "Exception caught in change !" << std::endl; std::cerr << excep << std::endl; return -1; } Image = change->GetOutput(); Image->Print(std::cout); unsigned int nb_iteration = 1; double rms = 0.; double epsilon = 2.; double curvature_weight = 0.; double area_weight = 0.; double reinitialization_weight = 0.; double volume_weight = 0.5; double volume = 0.5; double l1 = 1.; double l2 = 1.; double overlap_weight = 100.0; // // We now define the image type using a particular pixel type and // dimension. In this case the \code{float} type is used for the pixels // due to the requirements of the smoothing filter. // const unsigned int Dimension = 3; typedef float ScalarPixelType; typedef itk::Image< ScalarPixelType, Dimension > InternalImageType; typedef itk::Image< unsigned short, Dimension > MainType; typedef itk::ScalarChanAndVeseLevelSetFunctionData< InternalImageType, InternalImageType > DataHelperType; typedef itk::ConstrainedRegionBasedLevelSetFunctionSharedData< InternalImageType, InternalImageType, DataHelperType > SharedDataHelperType; typedef itk::ScalarChanAndVeseLevelSetFunction< InternalImageType, InternalImageType, SharedDataHelperType > LevelSetFunctionType; // We declare now the type of the numerically discretized Step and Delta functions that // will be used in the level-set computations for foreground and background regions // typedef itk::AtanRegularizedHeavisideStepFunction< ScalarPixelType, ScalarPixelType > DomainFunctionType; DomainFunctionType::Pointer domainFunction = DomainFunctionType::New(); domainFunction->SetEpsilon(epsilon); typedef itk::ScalarChanAndVeseSparseLevelSetImageFilter< InternalImageType, InternalImageType, InternalImageType, LevelSetFunctionType, SharedDataHelperType > MultiLevelSetType; MultiLevelSetType::Pointer levelSetFilter = MultiLevelSetType::New(); // We set the function count to 1 since a single level-set is being evolved. // levelSetFilter->SetFunctionCount(1); // Set the feature image and initial level-set image as output of the // fast marching image filter. // levelSetFilter->SetFeatureImage(ImgTypeConverter->GetOutput()); levelSetFilter->SetLevelSet(0, change->GetOutput()); //levelSetFilter->SetLevelSet(1, fastMarching1->GetOutput()); // Once activiated the level set evolution will stop if the convergence // criteria or if the maximum number of iterations is reached. The // convergence criteria is defined in terms of the root mean squared (RMS) // change in the level set function. The evolution is said to have // converged if the RMS change is below a user specified threshold. In a // real application is desirable to couple the evolution of the zero set // to a visualization module allowing the user to follow the evolution of // the zero set. With this feedback, the user may decide when to stop the // algorithm before the zero set leaks through the regions of low gradient // in the contour of the anatomical structure to be segmented. // levelSetFilter->SetNumberOfIterations(nb_iteration); levelSetFilter->SetMaximumRMSError(rms); // Often, in real applications, images have different pixel resolutions. In such // cases, it is best to use the native spacings to compute derivatives etc rather // than sampling the images. // //levelSetFilter->SetUseImageSpacing(1); // For large images, we may want to compute the level-set over the initial supplied // level-set image. This saves a lot of memory. // levelSetFilter->SetInPlace(false); // For the level set with phase 0, set different parameters and weights. This may // to be set in a loop for the case of multiple level-sets evolving simultaneously. // for (unsigned int i = 0; i < 1; i++) { levelSetFilter->GetDifferenceFunction(i)->SetDomainFunction(domainFunction); levelSetFilter->GetDifferenceFunction(i)->SetCurvatureWeight(curvature_weight); levelSetFilter->GetDifferenceFunction(i)->SetAreaWeight(area_weight); //levelSetFilter->GetDifferenceFunction(i)->SetOverlapPenaltyWeight(overlap_weight); levelSetFilter->GetDifferenceFunction(i)->SetVolumeMatchingWeight(volume_weight); levelSetFilter->GetDifferenceFunction(i)->SetVolume(volume); levelSetFilter->GetDifferenceFunction(i)->SetLambda1(l1); levelSetFilter->GetDifferenceFunction(i)->SetLambda2(l2); } try { levelSetFilter->Update(); } catch (itk::ExceptionObject & excep) { std::cerr << "Exception caught !" << std::endl; std::cerr << excep << std::endl; return -1; } catch (...) { std::cerr << "Exception Caught!!!!!" << std::endl; return -1; } Image = levelSetFilter->GetOutput(); Image->Print(std::cout); writer->SetInput(levelSetFilter->GetOutput()); writer->Update(); return EXIT_SUCCESS; } Also I would like to know what difference it makes when I use 3D data for fast marching. By looking at the distance map it doesn't look like a shere centered at the given seed point in 3D. And what data should ideally be passed to ChanVese from FastMarching for 3D dataset. Pls help! Param L&T Technology Services Ltd www.LntTechservices.com This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gunjan.gemini29 at gmail.com Tue Feb 10 08:21:09 2015 From: gunjan.gemini29 at gmail.com (Gunjan Gautam) Date: Tue, 10 Feb 2015 18:51:09 +0530 Subject: [ITK-users] Problem in installing ITK Message-ID: Hi All, While installing ITK-4.7.0 as per the instructions from *http://www.itk.org/Wiki/ITK_Configuring_and_Building_for_Ubuntu_Linux * I am stuck at the below command $ sudo ccmake -DITK_USE_REVIEW=ON .. Terminal must show the below option: BUILD_DOXYGEN *OFF BUILD_EXAMPLES *ON BUILD_SHARED_LIBS *ON BUILD_TESTING *ON CMAKE_BACKWARDS_COMPATIBILITY *2.4 CMAKE_BUILD_TYPE *Release CMAKE_INSTALL_PREFIX */usr/local ITK_USE_KWSTYLE *OFF But my terminal is showing the options as mentioned below and I don't know how to set the values including path and all. BUILD_EXAMPLES *ON BUILD_SHARED_LIBS *OFF BUILD_TESTING *ON CMAKE_BUILD_TYPE *Release ITKV3_COMPATIBILITY *OFF ITK_BUILD_DEFAULT_MODULES *ON ITK_WRAP_PYTHON *OFF Please help !! -- Best Regards, Gunjan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhlegarreta at vicomtech.org Tue Feb 10 09:02:46 2015 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Tue, 10 Feb 2015 15:02:46 +0100 Subject: [ITK-users] Problem in installing ITK In-Reply-To: References: Message-ID: Hi Gunjan, the order of the flags is not an important issue; it is their value which matters. As for some of the ones you are posting, BUILD_SHARED_LIBS: you may want to use static libraries (OFF) instead of dynamic libraries. BUILD_TESTING: turning the testing OFF will create a lighter project and may have great impact in saving compilation time, you may want to turn BUILD_EXAMPLES: turning the examples ON may be useful if you are a newbie. But turning them off does not hurt. ITKV3_COMPATIBILITY: depending on your purposes, you may need to turn it on. ITK_USE_REVIEW: this is an interesting option if you want to use filters that are still under review process/published in the IJ [1], and not yet integrated into the Modules. BUILD_DOXYGEN: it is just about generating doxygen documentation files. ITK is well documented in the Web [2], so it's not necessary. Although, I'm not an expert in building ITK in a Unix OS, in theory, once you set your binary directory (there where your makefiles will be generated), you shouldn't need to set any other path. You may not be seeing all flags if you don't turn the Advanced flag to ON (CMake GUI at least). HTH, JON HAITZ [1] http://www.insight-journal.org/ [2] http://www.itk.org/Doxygen/html/classes.html On 10 February 2015 at 14:21, Gunjan Gautam wrote: > Hi All, > > While installing ITK-4.7.0 as per the instructions from *http://www.itk.org/Wiki/ITK_Configuring_and_Building_for_Ubuntu_Linux > * > I am stuck at the below command > > $ sudo ccmake -DITK_USE_REVIEW=ON .. > > Terminal must show the below option: > > BUILD_DOXYGEN *OFF > BUILD_EXAMPLES *ON > BUILD_SHARED_LIBS *ON > BUILD_TESTING *ON > CMAKE_BACKWARDS_COMPATIBILITY *2.4 > CMAKE_BUILD_TYPE *Release > CMAKE_INSTALL_PREFIX */usr/local > ITK_USE_KWSTYLE *OFF > > > But my terminal is showing the options as mentioned below and I don't know > how to set the values including path and all. > > BUILD_EXAMPLES > *ON > BUILD_SHARED_LIBS > *OFF > BUILD_TESTING > *ON > CMAKE_BUILD_TYPE > *Release > ITKV3_COMPATIBILITY > *OFF > ITK_BUILD_DEFAULT_MODULES > *ON > ITK_WRAP_PYTHON > *OFF > > > Please help !! > > > -- > Best Regards, > Gunjan > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 matimontg at gmail.com Wed Feb 11 08:50:47 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 11 Feb 2015 10:50:47 -0300 Subject: [ITK-users] MultiResImageRegistration3 | Joint PDF summed to Zero Message-ID: Hi, I'm trying to do 3D Registration using TranslationTransform as transformtype. I've downloaded MultiResImageRegistration3.cxx and when I run it I get this error: *Description: itk::ERROR: MattesMutualInformationImageToImageMetric(04067A40): Joint PDF summed to zero* Is this due to the initial parameters? Thanks, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Wed Feb 11 09:01:19 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 11 Feb 2015 09:01:19 -0500 Subject: [ITK-users] MultiResImageRegistration3 | Joint PDF summed to Zero In-Reply-To: References: Message-ID: <6095C926-2A02-4D63-B295-34ADA2B53F01@mail.nih.gov> Hello, This message occurs when the images don't overlap. If this error message occurs at the first iteration, its due to the initial parameters. If not then the optimizer is not setup correctly and is miss behaving due to scale, minimizing/maximizing, gradient noise etc.. Typically the CenterTransformInitializer[1] can be used to get reasonable initial parameters for many cases. Also you are using the older ITKv3 registration framework. I would recommend using the v4 version of the example[2], I believe it give a clearer error message for this case. Brad [1] http://www.itk.org/Doxygen/html/classitk_1_1CenteredTransformInitializer.html [2] http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2MultiResImageRegistration1_8cxx-example.html On Feb 11, 2015, at 8:50 AM, Matias Montroull wrote: > Hi, > > I'm trying to do 3D Registration using TranslationTransform as transformtype. I've downloaded MultiResImageRegistration3.cxx and when I run it I get this error: > > Description: itk::ERROR: MattesMutualInformationImageToImageMetric(04067A40): Joint PDF summed to zero > > Is this due to the initial parameters? > > Thanks, > > Matias. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Wed Feb 11 09:18:42 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 11 Feb 2015 11:18:42 -0300 Subject: [ITK-users] MultiResImageRegistration3 | Joint PDF summed to Zero In-Reply-To: <6095C926-2A02-4D63-B295-34ADA2B53F01@mail.nih.gov> References: <6095C926-2A02-4D63-B295-34ADA2B53F01@mail.nih.gov> Message-ID: Thanks Btradley, I'm using ITV4 with compatibility set to V3, not sure if that would be an issue. I tried adding the Centeredtransforminitializer to my example but it seems I need to change the transformtype to CenterRigidTransform rather than TranslationTransform, is that true? (I'm getting compilation erros).. The example you point is 2D, I don't think there has been a 3D version of the MultiResImageRegistration1 with V4.. I'll try though to see if I can convert to 3D, it was pretty simple with the V3 version example. Thanks again. Matias. On Wed, Feb 11, 2015 at 11:01 AM, Bradley Lowekamp wrote: > Hello, > > This message occurs when the images don't overlap. > > If this error message occurs at the first iteration, its due to the > initial parameters. If not then the optimizer is not setup correctly and is > miss behaving due to scale, minimizing/maximizing, gradient noise etc.. > > Typically the CenterTransformInitializer[1] can be used to get reasonable > initial parameters for many cases. > > Also you are using the older ITKv3 registration framework. I would > recommend using the v4 version of the example[2], I believe it give a > clearer error message for this case. > > Brad > > > [1] > http://www.itk.org/Doxygen/html/classitk_1_1CenteredTransformInitializer.html > [2] > http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2MultiResImageRegistration1_8cxx-example.html > On Feb 11, 2015, at 8:50 AM, Matias Montroull wrote: > > Hi, > > I'm trying to do 3D Registration using TranslationTransform as > transformtype. I've downloaded MultiResImageRegistration3.cxx and when I > run it I get this error: > > *Description: itk::ERROR: > MattesMutualInformationImageToImageMetric(04067A40): Joint PDF summed to > zero* > > Is this due to the initial parameters? > > Thanks, > > Matias. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Wed Feb 11 09:28:48 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 11 Feb 2015 11:28:48 -0300 Subject: [ITK-users] 'GetCurrentStepLength' : is not a member of 'itk::RegularStepGradientDescentOptimizerv4' Message-ID: Hi, I'm trying to run this example: http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2MultiResImageRegistration1_8cxx-example.html and I get the following compilation error: 'GetCurrentStepLength' : is not a member of 'itk::RegularStepGradientDescentOptimizerv4' Any clues what I have missed? I compiled ITK with the V3 compatibility set to ON. Thank you, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Wed Feb 11 09:34:38 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 11 Feb 2015 09:34:38 -0500 Subject: [ITK-users] MultiResImageRegistration3 | Joint PDF summed to Zero In-Reply-To: References: <6095C926-2A02-4D63-B295-34ADA2B53F01@mail.nih.gov> Message-ID: <7DC4D83B-241C-43E4-890C-27612B2B82E5@mail.nih.gov> Hello, If this is the example you are using[1], while its in the RegistrationITKv4 directory it is using the ITKv3 version of the framework. If you compare it to the MultiResImageRegistration1.cxx example, its significantly more complicated. With the ITKv4 framework its an intrinsic part of the registration method. I would encourage you to base your registration program on example 1 and modify it for 3D. You are right about the TranslationTransform not working with that Initializer. But it does work with any transform derived from the MatrixOffsetBase. Brad [1] http://itk.org/Insight/Doxygen/html/Examples_2RegistrationITKv4_2MultiResImageRegistration3_8cxx-example.html On Feb 11, 2015, at 9:18 AM, Matias Montroull wrote: > Thanks Btradley, > > I'm using ITV4 with compatibility set to V3, not sure if that would be an issue. > > I tried adding the Centeredtransforminitializer to my example but it seems I need to change the transformtype to CenterRigidTransform rather than TranslationTransform, is that true? (I'm getting compilation erros).. > > The example you point is 2D, I don't think there has been a 3D version of the MultiResImageRegistration1 with V4.. I'll try though to see if I can convert to 3D, it was pretty simple with the V3 version example. > > Thanks again. > > Matias. > > On Wed, Feb 11, 2015 at 11:01 AM, Bradley Lowekamp wrote: > Hello, > > This message occurs when the images don't overlap. > > If this error message occurs at the first iteration, its due to the initial parameters. If not then the optimizer is not setup correctly and is miss behaving due to scale, minimizing/maximizing, gradient noise etc.. > > Typically the CenterTransformInitializer[1] can be used to get reasonable initial parameters for many cases. > > Also you are using the older ITKv3 registration framework. I would recommend using the v4 version of the example[2], I believe it give a clearer error message for this case. > > Brad > > > [1] http://www.itk.org/Doxygen/html/classitk_1_1CenteredTransformInitializer.html > [2] http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2MultiResImageRegistration1_8cxx-example.html > On Feb 11, 2015, at 8:50 AM, Matias Montroull wrote: > >> Hi, >> >> I'm trying to do 3D Registration using TranslationTransform as transformtype. I've downloaded MultiResImageRegistration3.cxx and when I run it I get this error: >> >> Description: itk::ERROR: MattesMutualInformationImageToImageMetric(04067A40): Joint PDF summed to zero >> >> Is this due to the initial parameters? >> >> Thanks, >> >> Matias. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhlegarreta at vicomtech.org Wed Feb 11 09:48:13 2015 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Wed, 11 Feb 2015 15:48:13 +0100 Subject: [ITK-users] 'GetCurrentStepLength' : is not a member of 'itk::RegularStepGradientDescentOptimizerv4' In-Reply-To: References: Message-ID: Hi Matias, are you sure this filter needs the VTK COMPATIBILITY flag to ON? On the other hand, according to the nightly doxygen (ITK 4.8.0), the filter does have that member, so you may want to check the ITK version you are actually using. HTH, JON HAITZ On 11 February 2015 at 15:28, Matias Montroull wrote: > Hi, > > I'm trying to run this example: > > http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2MultiResImageRegistration1_8cxx-example.html > > and I get the following compilation error: > > 'GetCurrentStepLength' : is not a member of > 'itk::RegularStepGradientDescentOptimizerv4' > > Any clues what I have missed? I compiled ITK with the V3 compatibility set > to ON. > > Thank you, > > Matias. > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Wed Feb 11 10:08:50 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 11 Feb 2015 12:08:50 -0300 Subject: [ITK-users] 'GetCurrentStepLength' : is not a member of 'itk::RegularStepGradientDescentOptimizerv4' In-Reply-To: References: Message-ID: Thanks for the answer Jon, I actually set the flag to ON to run some ITK Apps I downloaded but I can go back and set it to OFF if that's causing an issue. Is there an easy way to check which version of ITK I'm using? Thanks, Matias. On Wed, Feb 11, 2015 at 11:48 AM, Jon Haitz Legarreta < jhlegarreta at vicomtech.org> wrote: > Hi Matias, > are you sure this filter needs the VTK COMPATIBILITY flag to ON? > > On the other hand, according to the nightly doxygen (ITK 4.8.0), the > filter does have that member, so you may want to check the ITK version you > are actually using. > > HTH, > JON HAITZ > > > On 11 February 2015 at 15:28, Matias Montroull > wrote: > >> Hi, >> >> I'm trying to run this example: >> >> http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2MultiResImageRegistration1_8cxx-example.html >> >> and I get the following compilation error: >> >> 'GetCurrentStepLength' : is not a member of >> 'itk::RegularStepGradientDescentOptimizerv4' >> >> Any clues what I have missed? I compiled ITK with the V3 compatibility >> set to ON. >> >> Thank you, >> >> Matias. >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhlegarreta at vicomtech.org Wed Feb 11 10:16:08 2015 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Wed, 11 Feb 2015 16:16:08 +0100 Subject: [ITK-users] 'GetCurrentStepLength' : is not a member of 'itk::RegularStepGradientDescentOptimizerv4' In-Reply-To: References: Message-ID: Hi Mat?as, I don't think it's causing the issue. You've at least one possibility: to check in your ITKConfig.cmake file (built in your binary folder) which is the value of the ITK_VERSION_MAJOR, ITK_VERSION_MINOR, and ITK_VERSION_PATCH variables (look for those strings). JON HAITZ On 11 February 2015 at 16:08, Matias Montroull wrote: > Thanks for the answer Jon, > > I actually set the flag to ON to run some ITK Apps I downloaded but I can > go back and set it to OFF if that's causing an issue. > > Is there an easy way to check which version of ITK I'm using? > > Thanks, > > Matias. > > On Wed, Feb 11, 2015 at 11:48 AM, Jon Haitz Legarreta < > jhlegarreta at vicomtech.org> wrote: > >> Hi Matias, >> are you sure this filter needs the VTK COMPATIBILITY flag to ON? >> >> On the other hand, according to the nightly doxygen (ITK 4.8.0), the >> filter does have that member, so you may want to check the ITK version you >> are actually using. >> >> HTH, >> JON HAITZ >> >> >> On 11 February 2015 at 15:28, Matias Montroull >> wrote: >> >>> Hi, >>> >>> I'm trying to run this example: >>> >>> http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2MultiResImageRegistration1_8cxx-example.html >>> >>> and I get the following compilation error: >>> >>> 'GetCurrentStepLength' : is not a member of >>> 'itk::RegularStepGradientDescentOptimizerv4' >>> >>> Any clues what I have missed? I compiled ITK with the V3 compatibility >>> set to ON. >>> >>> Thank you, >>> >>> Matias. >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Wed Feb 11 10:40:01 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 11 Feb 2015 12:40:01 -0300 Subject: [ITK-users] 'GetCurrentStepLength' : is not a member of 'itk::RegularStepGradientDescentOptimizerv4' In-Reply-To: References: Message-ID: Thanks, this is what I see in the ITKConfig.cmake: set(ITK_VERSION_MAJOR "4") set(ITK_VERSION_MINOR "6") set(ITK_VERSION_PATCH "1") On Wed, Feb 11, 2015 at 12:16 PM, Jon Haitz Legarreta < jhlegarreta at vicomtech.org> wrote: > Hi Mat?as, > I don't think it's causing the issue. > > You've at least one possibility: to check in your ITKConfig.cmake file > (built in your binary folder) which is the value of the ITK_VERSION_MAJOR, > ITK_VERSION_MINOR, and ITK_VERSION_PATCH variables (look for those strings). > > JON HAITZ > > > > > On 11 February 2015 at 16:08, Matias Montroull > wrote: > >> Thanks for the answer Jon, >> >> I actually set the flag to ON to run some ITK Apps I downloaded but I can >> go back and set it to OFF if that's causing an issue. >> >> Is there an easy way to check which version of ITK I'm using? >> >> Thanks, >> >> Matias. >> >> On Wed, Feb 11, 2015 at 11:48 AM, Jon Haitz Legarreta < >> jhlegarreta at vicomtech.org> wrote: >> >>> Hi Matias, >>> are you sure this filter needs the VTK COMPATIBILITY flag to ON? >>> >>> On the other hand, according to the nightly doxygen (ITK 4.8.0), the >>> filter does have that member, so you may want to check the ITK version you >>> are actually using. >>> >>> HTH, >>> JON HAITZ >>> >>> >>> On 11 February 2015 at 15:28, Matias Montroull >>> wrote: >>> >>>> Hi, >>>> >>>> I'm trying to run this example: >>>> >>>> http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2MultiResImageRegistration1_8cxx-example.html >>>> >>>> and I get the following compilation error: >>>> >>>> 'GetCurrentStepLength' : is not a member of >>>> 'itk::RegularStepGradientDescentOptimizerv4' >>>> >>>> Any clues what I have missed? I compiled ITK with the V3 compatibility >>>> set to ON. >>>> >>>> Thank you, >>>> >>>> Matias. >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the ITK FAQ at: >>>> http://www.itk.org/Wiki/ITK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/insight-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhlegarreta at vicomtech.org Wed Feb 11 11:08:20 2015 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Wed, 11 Feb 2015 17:08:20 +0100 Subject: [ITK-users] 'GetCurrentStepLength' : is not a member of 'itk::RegularStepGradientDescentOptimizerv4' In-Reply-To: References: Message-ID: Well, then it's ITK 4.6.1. Find whether that version of ITK has that member for that filter, and if yes, then the problem lies somewhere else. Try to debug and reach that file otherwise. JON HAITZ On 11 February 2015 at 16:40, Matias Montroull wrote: > Thanks, this is what I see in the ITKConfig.cmake: > > set(ITK_VERSION_MAJOR "4") > set(ITK_VERSION_MINOR "6") > set(ITK_VERSION_PATCH "1") > > On Wed, Feb 11, 2015 at 12:16 PM, Jon Haitz Legarreta < > jhlegarreta at vicomtech.org> wrote: > >> Hi Mat?as, >> I don't think it's causing the issue. >> >> You've at least one possibility: to check in your ITKConfig.cmake file >> (built in your binary folder) which is the value of the ITK_VERSION_MAJOR, >> ITK_VERSION_MINOR, and ITK_VERSION_PATCH variables (look for those strings). >> >> JON HAITZ >> >> >> >> >> On 11 February 2015 at 16:08, Matias Montroull >> wrote: >> >>> Thanks for the answer Jon, >>> >>> I actually set the flag to ON to run some ITK Apps I downloaded but I >>> can go back and set it to OFF if that's causing an issue. >>> >>> Is there an easy way to check which version of ITK I'm using? >>> >>> Thanks, >>> >>> Matias. >>> >>> On Wed, Feb 11, 2015 at 11:48 AM, Jon Haitz Legarreta < >>> jhlegarreta at vicomtech.org> wrote: >>> >>>> Hi Matias, >>>> are you sure this filter needs the VTK COMPATIBILITY flag to ON? >>>> >>>> On the other hand, according to the nightly doxygen (ITK 4.8.0), the >>>> filter does have that member, so you may want to check the ITK version you >>>> are actually using. >>>> >>>> HTH, >>>> JON HAITZ >>>> >>>> >>>> On 11 February 2015 at 15:28, Matias Montroull >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> I'm trying to run this example: >>>>> >>>>> http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2MultiResImageRegistration1_8cxx-example.html >>>>> >>>>> and I get the following compilation error: >>>>> >>>>> 'GetCurrentStepLength' : is not a member of >>>>> 'itk::RegularStepGradientDescentOptimizerv4' >>>>> >>>>> Any clues what I have missed? I compiled ITK with the V3 compatibility >>>>> set to ON. >>>>> >>>>> Thank you, >>>>> >>>>> Matias. >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Wed Feb 11 14:34:58 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 11 Feb 2015 16:34:58 -0300 Subject: [ITK-users] 'GetCurrentStepLength' : is not a member of 'itk::RegularStepGradientDescentOptimizerv4' In-Reply-To: References: Message-ID: Thanks Jon, I solved it by replacing the line of code which had the error with this: optimizer->SetMaximumStepLength( optimizer->GetMaximumStepLength() / 4.0 ); On Wed, Feb 11, 2015 at 1:08 PM, Jon Haitz Legarreta < jhlegarreta at vicomtech.org> wrote: > Well, then it's ITK 4.6.1. Find whether that version of ITK has that > member for that filter, and if yes, then the problem lies somewhere else. > > Try to debug and reach that file otherwise. > > JON HAITZ > > > > On 11 February 2015 at 16:40, Matias Montroull > wrote: > >> Thanks, this is what I see in the ITKConfig.cmake: >> >> set(ITK_VERSION_MAJOR "4") >> set(ITK_VERSION_MINOR "6") >> set(ITK_VERSION_PATCH "1") >> >> On Wed, Feb 11, 2015 at 12:16 PM, Jon Haitz Legarreta < >> jhlegarreta at vicomtech.org> wrote: >> >>> Hi Mat?as, >>> I don't think it's causing the issue. >>> >>> You've at least one possibility: to check in your ITKConfig.cmake file >>> (built in your binary folder) which is the value of the ITK_VERSION_MAJOR, >>> ITK_VERSION_MINOR, and ITK_VERSION_PATCH variables (look for those strings). >>> >>> JON HAITZ >>> >>> >>> >>> >>> On 11 February 2015 at 16:08, Matias Montroull >>> wrote: >>> >>>> Thanks for the answer Jon, >>>> >>>> I actually set the flag to ON to run some ITK Apps I downloaded but I >>>> can go back and set it to OFF if that's causing an issue. >>>> >>>> Is there an easy way to check which version of ITK I'm using? >>>> >>>> Thanks, >>>> >>>> Matias. >>>> >>>> On Wed, Feb 11, 2015 at 11:48 AM, Jon Haitz Legarreta < >>>> jhlegarreta at vicomtech.org> wrote: >>>> >>>>> Hi Matias, >>>>> are you sure this filter needs the VTK COMPATIBILITY flag to ON? >>>>> >>>>> On the other hand, according to the nightly doxygen (ITK 4.8.0), the >>>>> filter does have that member, so you may want to check the ITK version you >>>>> are actually using. >>>>> >>>>> HTH, >>>>> JON HAITZ >>>>> >>>>> >>>>> On 11 February 2015 at 15:28, Matias Montroull >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I'm trying to run this example: >>>>>> >>>>>> http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2MultiResImageRegistration1_8cxx-example.html >>>>>> >>>>>> and I get the following compilation error: >>>>>> >>>>>> 'GetCurrentStepLength' : is not a member of >>>>>> 'itk::RegularStepGradientDescentOptimizerv4' >>>>>> >>>>>> Any clues what I have missed? I compiled ITK with the V3 >>>>>> compatibility set to ON. >>>>>> >>>>>> Thank you, >>>>>> >>>>>> Matias. >>>>>> >>>>>> _____________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Kitware offers ITK Training Courses, for more information visit: >>>>>> http://www.kitware.com/products/protraining.php >>>>>> >>>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Thu Feb 12 00:14:46 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 12 Feb 2015 00:14:46 -0500 Subject: [ITK-users] Opportunities to share, discuss, design, and learn with other ITK community members Message-ID: There are a couple of upcoming opportunities to share, discuss, design, and learn with your fellow ITK community members. On Thursday (tomorrow), 1:00 PM Eastern USA time, there will be a Google+ Hangout where we will be doing code reviews: https://plus.google.com/events/chnqhe892r77l7q7qdf53os2ldg On Friday, 11:00 AM Eastern USA time, an ITK development conference, https://plus.google.com/events/ckcqudctda6cpclqclbchonlft8 For those that cannot join via Hangout, telephone call-in is also possible. Dial: 585-632-6296 Enter pin: 31423 To get regular invites to these events, join the ITK Bar Camp G+ Community: https://plus.google.com/u/0/communities/111375098792764998322 All are welcome. Hope to talk to you then! From matt.mccormick at kitware.com Thu Feb 12 11:52:43 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 12 Feb 2015 11:52:43 -0500 Subject: [ITK-users] What is StepLenght? In-Reply-To: References: Message-ID: Hi Matias, The class descriptions found here [1] and here [2] explain the learning rate. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1RegularStepGradientDescentOptimizerv4.html [2] http://www.itk.org/Doxygen/html/classitk_1_1GradientDescentOptimizerv4Template.html On Mon, Feb 9, 2015 at 10:20 AM, Matias Montroull wrote: > Thanks, I'll take a look. > Also, what learning rate is? > > On Sun, Feb 8, 2015 at 5:52 PM, Matt McCormick > wrote: >> >> Hi Matias, >> >> The follow examples from the ITK Software Guide may be helpful: >> >> >> http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ImageRegistration1_8cxx-example.html >> >> >> http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ImageRegistration4_8cxx-example.html >> >> >> http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ImageRegistration5_8cxx-example.html >> >> >> http://www.itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ImageRegistration9_8cxx-example.html >> >> HTH, >> Matt >> >> >> >> On Fri, Feb 6, 2015 at 9:47 AM, Matias Montroull >> wrote: >> > Hi, >> > >> > I'm new to registration and I'm trying to understand what StepLenght is. >> > I >> > can play with the values but I'm not really sure what it is. >> > >> > Can someone explain? >> > >> > Thank you, >> > >> > 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 matt.mccormick at kitware.com Thu Feb 12 11:55:41 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Thu, 12 Feb 2015 11:55:41 -0500 Subject: [ITK-users] cannot acces virtual void itk::Rigid3DTransform< TScalar >::SetMatrix (const MatrixType & matrix, double tolerance ) from the Rigid3D transform class. In-Reply-To: <1423482266729-7586888.post@n2.nabble.com> References: <1423482266729-7586888.post@n2.nabble.com> Message-ID: Hi Yago, The VersorRigid3DTransform [1] may work. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1VersorRigid3DTransform.html On Mon, Feb 9, 2015 at 6:44 AM, yagoDiez wrote: > Hi Matt, > > Thanks for pointing this out, I migrated to the latest (4.7) version and it > works now. > > While migrating I encountered a new problem (rigid3D translation is sort of > deprecated now). More information here: > > http://itk-insight-users.2283740.n2.nabble.com/Rigid3DTransform-make-error-td7160305.html#a7586887 > > I had to resort to using an "intermediate itkv3 rigid transformation class". > It does work but I am not sure it is a "lasting" solution. > > Does anybody know which class is better for my original problem: > > - I have a previously computed rotation matrix which I want to store in a > format that itk can use. > - Consequently, I am pretty sure that I want to use the setMatrix method > (ideally with the possibility to specify a tolerance). > > Thanks! > Yago > > > > > > -- > View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-users-cannot-acces-virtual-void-itk-Rigid3DTransform-TScalar-SetMatrix-const-MatrixType-matrix-d-tp7586880p7586888.html > Sent from the ITK Insight Users mailing list archive at Nabble.com. > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From davis.vigneault at gmail.com Fri Feb 13 07:14:17 2015 From: davis.vigneault at gmail.com (DVigneault) Date: Fri, 13 Feb 2015 05:14:17 -0700 (MST) Subject: [ITK-users] How to compile a new module inside the ITK build tree? Message-ID: <1423829657975-35242.post@n7.nabble.com> All-- Two related questions concerning development of an external module. 1. How can I compile a single (external) module, rather than all of ITK? The module template for insight submission [1] states "[n]ow you could compile the new module inside your ITK build tree," which suggests to me that this is possible, but I'm not sure how to go about it. 2. It is possible to build tests for one module only? The closest thread I was able to find [2] is useful for running individual tests after they are built, and the wiki page on Modularization [3] didn't specifically discuss testing. Thanks in advance, --Davis [1] https://github.com/InsightSoftwareConsortium/InsightJournalTemplate/tree/ModularTemplate/Source [2] http://itk-users.7.n7.nabble.com/run-test-manually-td32868.html [3] http://www.itk.org/Wiki/ITK/Release_4/Modularization/Configure_and_build_ITK -- View this message in context: http://itk-users.7.n7.nabble.com/How-to-compile-a-new-module-inside-the-ITK-build-tree-tp35242.html Sent from the ITK - Users mailing list archive at Nabble.com. From matimontg at gmail.com Fri Feb 13 07:33:53 2015 From: matimontg at gmail.com (Matias Montroull) Date: Fri, 13 Feb 2015 09:33:53 -0300 Subject: [ITK-users] Evaluate results of registration Message-ID: Hi, I'm using a check-board output (CheckerBoardImageFilter) to evaluate the results of a CT/RM registration, now I would like to write something where I could change the WL WC of the 2 images independently to really make sure the registration is right; I guess is not possible with ITK itself and I need to write some code for visualizing the CT and the RM and then change window levels independently, am I right? Thank you, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Fri Feb 13 07:34:16 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Fri, 13 Feb 2015 07:34:16 -0500 Subject: [ITK-users] How to compile a new module inside the ITK build tree? In-Reply-To: <1423829657975-35242.post@n7.nabble.com> References: <1423829657975-35242.post@n7.nabble.com> Message-ID: <078030B2-B445-47C5-BABC-FE9E8B7D2675@mail.nih.gov> Hello Davis, 1. Currently you must build a module inside of ITK, it can't be build separately. This is a feature on my wish list too. However, most of the ITK modules I have written don't actually have a compiled library. So use the module in other projects I have added the ITK module as a git submodule and just included the include directory. While this doesn't build testing it does work OK for using the classes from the ITK module in another project. 2. I assume you are using make. Type running "make help"; this will list all the target in the make file. There should be one call "YourModule-all" this will build the module and tests. Brad On Feb 13, 2015, at 7:14 AM, DVigneault wrote: > All-- > > Two related questions concerning development of an external module. > > 1. How can I compile a single (external) module, rather than all of ITK? > The module template for insight submission [1] states "[n]ow you could > compile the new module inside your ITK build tree," which suggests to me > that this is possible, but I'm not sure how to go about it. > 2. It is possible to build tests for one module only? The closest thread I > was able to find [2] is useful for running individual tests after they are > built, and the wiki page on Modularization [3] didn't specifically discuss > testing. > > Thanks in advance, > > --Davis > > [1] > https://github.com/InsightSoftwareConsortium/InsightJournalTemplate/tree/ModularTemplate/Source > [2] http://itk-users.7.n7.nabble.com/run-test-manually-td32868.html > [3] > http://www.itk.org/Wiki/ITK/Release_4/Modularization/Configure_and_build_ITK > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/How-to-compile-a-new-module-inside-the-ITK-build-tree-tp35242.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 matt.mccormick at kitware.com Fri Feb 13 15:26:11 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 13 Feb 2015 15:26:11 -0500 Subject: [ITK-users] Gerrit to GitHub/OAuth email update instructions Message-ID: Hi, We will be soon be updating our Gerrit instance [1] to support GitHub / OAuth authentication instead of the OpenID based authentication, which is no longer supported. Account migration will occur by matching your currently registered Gerrit email with an email registered on your GitHub account. However, if you have multiple Gerrit accounts that match GitHub emails, ambiguity occurs. Only one of the Gerrit accounts can use GitHub / OAuth authentication. Please log into Gerrit [1] and ensure that the email address associated with your GitHub account is registered, and is only registered, with your desired Gerrit account. Login -> Settings -> Identities Select any email addresses that need to be deleted with the checkbox, and hit the ?Delete? button. Once deleted, the checkbox will no longer be available. Thanks, Matt [1] http://review.source.kitware.com From matt.mccormick at kitware.com Fri Feb 13 15:31:22 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 13 Feb 2015 15:31:22 -0500 Subject: [ITK-users] Evaluate results of registration In-Reply-To: References: Message-ID: Hi Matias, Yes, it is possible to get the intensities on similar scales with the RescaleIntensityImageFilter [1] or the IntensityWindowingImageFilter [2] before passing into the CheckerBoardImageFilter. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1RescaleIntensityImageFilter.html [2] http://www.itk.org/Doxygen316/html/classitk_1_1RescaleIntensityImageFilter.htmlhttp://www.itk.org/Doxygen316/html/classitk_1_1RescaleIntensityImageFilter.html On Fri, Feb 13, 2015 at 7:33 AM, Matias Montroull wrote: > Hi, > > I'm using a check-board output (CheckerBoardImageFilter) to evaluate the > results of a CT/RM registration, now I would like to write something where I > could change the WL WC of the 2 images independently to really make sure the > registration is right; I guess is not possible with ITK itself and I need to > write some code for visualizing the CT and the RM and then change window > levels independently, am I right? > > Thank you, > > 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 matt.mccormick at kitware.com Fri Feb 13 15:37:48 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 13 Feb 2015 15:37:48 -0500 Subject: [ITK-users] How to compile a new module inside the ITK build tree? In-Reply-To: <078030B2-B445-47C5-BABC-FE9E8B7D2675@mail.nih.gov> References: <1423829657975-35242.post@n7.nabble.com> <078030B2-B445-47C5-BABC-FE9E8B7D2675@mail.nih.gov> Message-ID: Hi, While it is true that a module can't be built out of ITK (there are some features from VTK modularization that could be ported here), it is possible to build just a module and its dependencies. Clone or symlink the module repository in the Modules/External directory. Enable the module in your CMake configuration -- it should be a boolean variable name Module_. This will build the given module and all its dependencies. To not build all the other modules, turn BUILD_DEFAULT_MODULES to OFF. There are some more tips on module enablement in the ITK Software Guide. HTH, Matt On Fri, Feb 13, 2015 at 7:34 AM, Bradley Lowekamp wrote: > Hello Davis, > > 1. Currently you must build a module inside of ITK, it can't be build separately. This is a feature on my wish list too. However, most of the ITK modules I have written don't actually have a compiled library. So use the module in other projects I have added the ITK module as a git submodule and just included the include directory. While this doesn't build testing it does work OK for using the classes from the ITK module in another project. > 2. I assume you are using make. Type running "make help"; this will list all the target in the make file. There should be one call "YourModule-all" this will build the module and tests. > > Brad > > On Feb 13, 2015, at 7:14 AM, DVigneault wrote: > >> All-- >> >> Two related questions concerning development of an external module. >> >> 1. How can I compile a single (external) module, rather than all of ITK? >> The module template for insight submission [1] states "[n]ow you could >> compile the new module inside your ITK build tree," which suggests to me >> that this is possible, but I'm not sure how to go about it. >> 2. It is possible to build tests for one module only? The closest thread I >> was able to find [2] is useful for running individual tests after they are >> built, and the wiki page on Modularization [3] didn't specifically discuss >> testing. >> >> Thanks in advance, >> >> --Davis >> >> [1] >> https://github.com/InsightSoftwareConsortium/InsightJournalTemplate/tree/ModularTemplate/Source >> [2] http://itk-users.7.n7.nabble.com/run-test-manually-td32868.html >> [3] >> http://www.itk.org/Wiki/ITK/Release_4/Modularization/Configure_and_build_ITK >> >> >> >> -- >> View this message in context: http://itk-users.7.n7.nabble.com/How-to-compile-a-new-module-inside-the-ITK-build-tree-tp35242.html >> Sent from the ITK - Users mailing list archive at Nabble.com. >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From lasso at queensu.ca Fri Feb 13 16:41:08 2015 From: lasso at queensu.ca (Andras Lasso) Date: Fri, 13 Feb 2015 21:41:08 +0000 Subject: [ITK-users] [ITK] Evaluate results of registration In-Reply-To: References: Message-ID: Hi Matias, Checkerboard pattern image is easy to generate but conveys very limited information while taking up a lot of space. The main issue is that you can only see displacement (residual registration error) along gridlines, but only at those points where a linear image feature (for example, an organ contour) crosses a gridline. So, in an entire image you can estimate the displacement only at a couple of relevant points. Using a more dense grid does not help much, because it makes image features harder to recognize. I would suggest the following representation instead: 1. Show only the fixed image with the following information overlaid (in one or more images) - contours segmented on the moving image with/without registration: this allows evaluation of displacement along the entire segmented contour, not just at a few points; the segmentation can be also used for quantitative evaluation (e.g., Hausdorff distance) - vector field of the registration transform (shown as arrows, distorted grid, etc.): this is important because very often registration at the contours look perfect but in areas where the image gradients are smaller the registration transform may become very irregular 2. Visualize the vector field of the transformation (with arrows or distorted grid) in 3D: this allows the evaluation of how realistic the computed displacements are These visual representations have not been very easy to generate in the past but since we added full support of real-time visualization of non-linear transforms to 3D Slicer, this should not be a problem anymore. Slicer can read ITK transforms (even composite transforms), concatenate them, invert them, and apply them to any 3D volume, surface mesh, point cloud, etc. and visualize them in 2D and 3D. See some example visualizations here: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Transforms. Andras -----Original Message----- From: Community [mailto:community-bounces at itk.org] On Behalf Of Matt McCormick Sent: Friday, February 13, 2015 3:31 PM To: Matias Montroull Cc: insight-users at itk.org Users Subject: Re: [ITK] [ITK-users] Evaluate results of registration Hi Matias, Yes, it is possible to get the intensities on similar scales with the RescaleIntensityImageFilter [1] or the IntensityWindowingImageFilter [2] before passing into the CheckerBoardImageFilter. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1RescaleIntensityImageFilter.html [2] http://www.itk.org/Doxygen316/html/classitk_1_1RescaleIntensityImageFilter.htmlhttp://www.itk.org/Doxygen316/html/classitk_1_1RescaleIntensityImageFilter.html On Fri, Feb 13, 2015 at 7:33 AM, Matias Montroull wrote: > Hi, > > I'm using a check-board output (CheckerBoardImageFilter) to evaluate > the results of a CT/RM registration, now I would like to write > something where I could change the WL WC of the 2 images independently > to really make sure the registration is right; I guess is not possible > with ITK itself and I need to write some code for visualizing the CT > and the RM and then change window levels independently, am I right? > > Thank you, > > 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 > _____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.php Please keep messages on-topic and check the 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 matimontg at gmail.com Sat Feb 14 08:27:00 2015 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 14 Feb 2015 10:27:00 -0300 Subject: [ITK-users] [ITK] Evaluate results of registration In-Reply-To: References: Message-ID: Thanks all for your answers, much appreciated, I will follow your suggestions and learn in the process, thanks again. Matias. On Fri, Feb 13, 2015 at 6:41 PM, Andras Lasso wrote: > Hi Matias, > > Checkerboard pattern image is easy to generate but conveys very limited > information while taking up a lot of space. The main issue is that you can > only see displacement (residual registration error) along gridlines, but > only at those points where a linear image feature (for example, an organ > contour) crosses a gridline. So, in an entire image you can estimate the > displacement only at a couple of relevant points. Using a more dense grid > does not help much, because it makes image features harder to recognize. > > I would suggest the following representation instead: > > 1. Show only the fixed image with the following information overlaid (in > one or more images) > - contours segmented on the moving image with/without registration: this > allows evaluation of displacement along the entire segmented contour, not > just at a few points; the segmentation can be also used for quantitative > evaluation (e.g., Hausdorff distance) > - vector field of the registration transform (shown as arrows, distorted > grid, etc.): this is important because very often registration at the > contours look perfect but in areas where the image gradients are smaller > the registration transform may become very irregular > > 2. Visualize the vector field of the transformation (with arrows or > distorted grid) in 3D: this allows the evaluation of how realistic the > computed displacements are > > These visual representations have not been very easy to generate in the > past but since we added full support of real-time visualization of > non-linear transforms to 3D Slicer, this should not be a problem anymore. > Slicer can read ITK transforms (even composite transforms), concatenate > them, invert them, and apply them to any 3D volume, surface mesh, point > cloud, etc. and visualize them in 2D and 3D. See some example > visualizations here: > http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Transforms > . > > Andras > > -----Original Message----- > From: Community [mailto:community-bounces at itk.org] On Behalf Of Matt > McCormick > Sent: Friday, February 13, 2015 3:31 PM > To: Matias Montroull > Cc: insight-users at itk.org Users > Subject: Re: [ITK] [ITK-users] Evaluate results of registration > > Hi Matias, > > Yes, it is possible to get the intensities on similar scales with the > RescaleIntensityImageFilter [1] or the IntensityWindowingImageFilter [2] > before passing into the CheckerBoardImageFilter. > > HTH, > Matt > > [1] > http://www.itk.org/Doxygen/html/classitk_1_1RescaleIntensityImageFilter.html > > [2] > http://www.itk.org/Doxygen316/html/classitk_1_1RescaleIntensityImageFilter.htmlhttp://www.itk.org/Doxygen316/html/classitk_1_1RescaleIntensityImageFilter.html > > On Fri, Feb 13, 2015 at 7:33 AM, Matias Montroull > wrote: > > Hi, > > > > I'm using a check-board output (CheckerBoardImageFilter) to evaluate > > the results of a CT/RM registration, now I would like to write > > something where I could change the WL WC of the 2 images independently > > to really make sure the registration is right; I guess is not possible > > with ITK itself and I need to write some code for visualizing the CT > > and the RM and then change window levels independently, am I right? > > > > Thank you, > > > > 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 > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 grothausmann.roman at mh-hannover.de Mon Feb 16 04:28:14 2015 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Mon, 16 Feb 2015 10:28:14 +0100 Subject: [ITK-users] [ITK] How to make ITK-binaries NOT ignore kernel out of memory messages? In-Reply-To: <53C678BD.2040908@mh-hannover.de> References: <53917A66.2060402@mh-hannover.de> <53A80327.9050701@mh-hannover.de> <53C678BD.2040908@mh-hannover.de> Message-ID: <54E1B82E.7030908@mh-hannover.de> Dear mailing list members, After much trial and error I now found a solution or workaround for the afore mentioned problem. On our imaging server with a Debian7, 12*2 cores (two Intel Xeon CPU E5-2630L), 256GB RAM, no SWAP loaded and the default Debian7-kernel, it seems that the oom-killer heuristics select the wrong processes for the oom-killer to end. Concluded, because setting: echo 0 > /proc/sys/vm/oom_kill_allocating_task #choose process by heuristics, the default makes test programs such as: loop-calloc #from http://www.linuxdevcenter.com/pub/a/linux/2006/11/30/linux-out-of-memory.html to crash our server, likely due to thrashing. Setting: echo 1 > /proc/sys/vm/oom_kill_allocating_task #kill process causing oom yields the expected behaviour that the kernel kills (running) process seemingly at random, BUT at least finally kills the "rogue memory-hogging task" which was not the case (even after days) when the heuristic was used on our server. As the heuristic works fine on e.g. a simple desktop PC (same Debian7, AMD FX-4100 Quad-Core, 8GB RAM, no SWAP loaded and the default Debian7-kernel) I suspect that either the many CPUs or the much RAM cause the problem, possibly the heuristic picks the kswapd (even turning up in top although no swap was loaded and echo 0 > /proc/sys/vm/swappiness) to be killed causing a new kswapd to be started by the kernel an so on. I did not test what is the critical # of CPUs or # of RAM (or perhaps hyper-threading) that causes the problem. Possibly, this would involve removing CPUs or RAM boards (or disabling hyperthreading in EFI) from our server, or would there be an easier way using e.g. kernel parameters? Disabling overcommiting echo 2 > /proc/sys/vm/overcommit_memory prevented thrashing too, but is not needed with vm.oom_kill_allocating_task= 1 Our server now configured with: echo "vm.oom_kill_allocating_task = 1" >> /etc/sysctl.conf Has not crashed since then, not even when running any of the test programs that used to crash it. By the way, Luis' test program posted before did not crash the server even before the reconfiguration and always work as expected on both the server and the desktop PC. Possibly it was allocating bigger chunks of memory such that kswapd was not running as hard as with smaller chunks and therefore was not picked by the oom-killer heuristics. Any comments or other explanations welcome. Regards, Roman On 16/07/14 15:06, Dr. Roman Grothausmann wrote: > Hi Matt, > > > Many thanks for Your reply. I'll check if ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1 > prevents the problems. Although I'd be astonished if it does because > BinaryMask3DMeshSource seems to use only one core anyway. > > Thanks again for Your help > Roman > > On 15/07/14 02:55, Matt McCormick wrote: >> Hi Roman, >> >> The CMake configuration variable: >> >> ITK_COMPUTER_MEMORY_SIZE >> >> is only used to choose which unit tests to run, and has no effect on >> your program. >> >> >> It may be worth a try to run >> >> export ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1 >> >> before starting your program on the server to see the effect. It is >> possible that too many threads or being spawned or that the amount of >> memory consumed is scaling (poorly) with the number of threads used. >> >> Hope this helps, >> Matt >> >> On Mon, Jun 23, 2014 at 6:36 AM, Dr. Roman Grothausmann >> wrote: >>> Dear Luis, >>> >>> >>> Many thanks for Your reply. It took me some time to reproduce the problem, >>> because Your test program works as expected on our server: >>> >>> ~$ ~/itk/simple/build_itk-4.5.1/memtest_01 1000 >>> ITK Hello World ! >>> >>> ~$ ~/itk/simple/build_itk-4.5.1/memtest_01 10000 >>> /opt/itk-4.5.1/include/ITK-4.5/itkImportImageContainer.hxx:192: >>> >>> Failed to allocate memory for image. >>> >>> One program of mine for which the problem exists is below. The problem >>> occurs when BinaryMask3DMeshSource acquires more memory after running for >>> some minutes. The very strange thing to me is, that the program is killed by >>> the kernel as expected on my desktop PC: >>> >>> ~/itk/simple/build_itk4_pc3G48243/euler-characteristic_01 13-511_EAA_ot.mha >>> 255 >>> component type is: unsigned_char >>> numDimensions: 3 >>> component size: 1 >>> pixel type (string): scalar >>> pixel type: 1 >>> _________________________ >>> >>> Executing ImageFileReader done. Took 2.78 seconds. >>> Executing BinaryMask3DMeshSource Killed >>> >>> >>> The header of 13-511_EAA_ot.mha: >>> >>> ObjectType = Image >>> NDims = 3 >>> BinaryData = True >>> BinaryDataByteOrderMSB = False >>> CompressedData = True >>> CompressedDataSize = 20474538 >>> TransformMatrix = 1 0 0 0 1 0 0 0 1 >>> Offset = 0 0 0 >>> CenterOfRotation = 0 0 0 >>> AnatomicalOrientation = RAI >>> ElementSpacing = 1 1 1 >>> DimSize = 998 998 1034 >>> ElementType = MET_UCHAR >>> ElementDataFile = LOCAL >>> >>> >>> However on the server it is not terminated when the RAM runs out, instead >>> many processes go nuts that had been mostly sleeping and finally the system >>> does not respond any more at all and a cold start is necessary. The >>> itk-4.5.1 is configured on the server with (see attached >>> CMakeCache_itk-4.5.1.txt): >>> >>> ITK_COMPUTER_MEMORY_SIZE 190 >>> >>> The server has 256GB of RAM an no Swap enabled: >>> >>> free >>> total used free shared buffers cached >>> Mem: 264498496 1341020 263157476 0 285760 289120 >>> -/+ buffers/cache: 766140 263732356 >>> Swap: 0 0 0 >>> >>> >>> Has 12x2 Intel(R) Xeon(R) CPUs: >>> >>> cat /proc/cpuinfo >>> processor : 0 >>> vendor_id : GenuineIntel >>> cpu family : 6 >>> model : 45 >>> model name : Intel(R) Xeon(R) CPU E5-2630L 0 @ 2.00GHz >>> stepping : 7 >>> microcode : 0x710 >>> cpu MHz : 1200.000 >>> cache size : 15360 KB >>> physical id : 0 >>> siblings : 12 >>> core id : 0 >>> cpu cores : 6 >>> apicid : 0 >>> initial apicid : 0 >>> fpu : yes >>> fpu_exception : yes >>> cpuid level : 13 >>> wp : yes >>> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca >>> cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx >>> pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology >>> nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 >>> ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer >>> aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi >>> flexpriority ept vpid >>> bogomips : 4000.56 >>> clflush size : 64 >>> cache_alignment : 64 >>> address sizes : 46 bits physical, 48 bits virtual >>> power management: >>> . >>> . >>> . >>> >>> >>> The server runs a Debian Wheezy (7.2): >>> uname -a >>> Linux img1-serv 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u2 x86_64 GNU/Linux >>> >>> My desktop PC has the same Debian (also same update state): >>> uname -a >>> Linux pc3G48243 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u2 x86_64 GNU/Linux >>> >>> free >>> total used free shared buffers cached >>> Mem: 8180356 1185364 6994992 0 23348 216084 >>> -/+ buffers/cache: 945932 7234424 >>> Swap: 0 0 0 >>> >>> >>> and 4 AMD FX(tm)-4100 Quad-Core Processors: >>> >>> cat /proc/cpuinfo >>> processor : 0 >>> vendor_id : AuthenticAMD >>> cpu family : 21 >>> model : 1 >>> model name : AMD FX(tm)-4100 Quad-Core Processor >>> stepping : 2 >>> microcode : 0x6000626 >>> cpu MHz : 1400.000 >>> cache size : 2048 KB >>> physical id : 0 >>> siblings : 4 >>> core id : 0 >>> cpu cores : 2 >>> apicid : 16 >>> initial apicid : 0 >>> fpu : yes >>> fpu_exception : yes >>> cpuid level : 13 >>> wp : yes >>> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca >>> cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt >>> pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid >>> aperfmperf pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave >>> avx lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse >>> 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 nodeid_msr topoext >>> perfctr_core arat cpb hw_pstate npt lbrv svm_lock nrip_save tsc_scale >>> vmcb_clean flushbyasid decodeassists pausefilter pfthreshold >>> bogomips : 7233.41 >>> TLB size : 1536 4K pages >>> clflush size : 64 >>> cache_alignment : 64 >>> address sizes : 48 bits physical, 48 bits virtual >>> power management: ts ttp tm 100mhzsteps hwpstate [9] >>> >>> >>> Knowing now, that itk checks for available RAM, the only sources for this >>> problem I can think of would be an odd configuration of ITK itself or its >>> use in programs compiled on the server, or some configuration differences in >>> the (Debian) system, or some hardware problem. >>> >>> Do You have any idea what it could be? >>> Or do You have any suggestions how I should go on searching for the cause? >>> >>> >>> Any help or hints are very much appriciated. >>> Many thanks for Your help again! >>> >>> Roman >>> >>> >>> _____________________________________________ >>> >>> >>> >>> ////program to calculate the Euler characteristic of a binary image >>> converted to itkQuadEdgeMesh >>> ////THEREFORE does NOT take filled regions into account only covering >>> surfaces! >>> ////if fillings should be accounted use instead a vtk program taking 3D >>> cells into account >>> >>> >>> >>> #include >>> //#include >>> #include //itk marching cubes (mc) very slow >>> and resource hungry :-( >>> #include >>> #include >>> >>> >>> >>> #include "itkFilterWatcher2.h" >>> >>> >>> >>> >>> void dispatch_cT(itk::ImageIOBase::IOPixelType, >>> itk::ImageIOBase::IOComponentType, size_t, int, char **); >>> >>> template >>> void dispatch_pT(itk::ImageIOBase::IOPixelType pixelType, size_t, int, char >>> **); >>> >>> template >>> void dispatch_D(size_t, int, char **); >>> >>> template>> Dimension> >>> int DoIt(int, char *argv[]); >>> >>> >>> >>> >>> >>> template>> Dimension> >>> int DoIt(int argc, char *argv[]){ >>> >>> typedef InputPixelType OutputPixelType; >>> >>> typedef itk::Image InputImageType; >>> typedef itk::Image OutputImageType; >>> >>> >>> typedef itk::ImageFileReader ReaderType; >>> typename ReaderType::Pointer reader = ReaderType::New(); >>> >>> reader->SetFileName(argv[1]); >>> FilterWatcher watcherI(reader, "reading"); >>> watcherI.QuietOn(); >>> watcherI.ReportTimeOn(); >>> try >>> { >>> reader->Update(); >>> } >>> catch (itk::ExceptionObject &ex) >>> { >>> if (!strcmp(ex.GetDescription(), "Filter does not have progress.")){ >>> std::cerr << ex.GetDescription() << std::endl; >>> return EXIT_FAILURE; >>> } >>> } >>> >>> >>> typedef double CoordType; >>> >>> //typedef itk::Mesh MeshType; >>> typedef itk::QuadEdgeMesh InputMeshType; >>> >>> const InputPixelType isoValue= static_cast(atof(argv[2])); >>> >>> typedef itk::BinaryMask3DMeshSource >>> MeshSourceType; >>> typename MeshSourceType::Pointer meshSource = MeshSourceType::New(); >>> >>> meshSource->SetInput(reader->GetOutput()); >>> meshSource->SetObjectValue(isoValue); >>> >>> FilterWatcher watcher(meshSource, "BinaryMask3DMeshSource"); >>> watcher.QuietOn(); >>> watcher.ReportTimeOn(); >>> try >>> { >>> meshSource->Update(); >>> } >>> catch (itk::ExceptionObject &ex) >>> { >>> if (!strcmp(ex.GetDescription(), "Filter does not have progress.")){ >>> std::cerr << ex.GetDescription() << std::endl; >>> return EXIT_FAILURE; >>> } >>> } >>> >>> >>> std::cout << "Nodes = " << meshSource->GetNumberOfNodes() << std::endl; >>> std::cout << "Cells = " << meshSource->GetNumberOfCells() << std::endl; >>> >>> typename InputMeshType::Pointer mesh= meshSource->GetOutput(); >>> >>> //// check if meshSource can be represented as an itkQuadEdgeMesh >>> //// if BinaryMask3DMeshSource caps boundary surfaces this check is not >>> necessary! >>> >>> typedef itk::QuadEdgeMeshTopologyChecker TQEchecker; >>> typename TQEchecker::Pointer QEchecker = TQEchecker::New(); >>> QEchecker->SetMesh(mesh); >>> std::cerr << "Executing >>> QuadEdgeMeshTopologyChecker->ValidateEulerCharacteristic()"; >>> if(!QEchecker->ValidateEulerCharacteristic()){ >>> std::cerr << "Not a valid QuadEdgeMesh! Aborting." << std::endl; >>> return EXIT_FAILURE; >>> } >>> std::cerr << " done." << std::endl; >>> >>> //// calc Euler characteristics \xi >>> //// For closed smooth manifolds, the Euler characteristic coincides with >>> the Euler number: >>> http://en.wikipedia.org/wiki/Euler_characteristic#Relations_to_other_invariants >>> //// general formula see: >>> http://en.wikipedia.org/wiki/Genus_%28mathematics%29#Orientable_surface >>> //// >>> //// >>> //// >>> //// good QuadEdge explanation: >>> http://www.cs.cmu.edu/afs/andrew/scs/cs/15-463/2001/pub/src/a2/quadedge.html >>> /// from itkQuadEdgeMeshTopologyChecker.hxx >>> >>> typedef itk::QuadEdgeMeshBoundaryEdgesMeshFunction >>> BoundaryEdges; >>> >>> typename BoundaryEdges::Pointer boundaryEdges = BoundaryEdges::New(); >>> >>> // Number of USED points >>> typedef typename InputMeshType::PointIdentifier >>> PointIdentifier; >>> std::cerr << "ComputeNumberOfPoints"; >>> PointIdentifier numPoints = mesh->ComputeNumberOfPoints(); >>> std::cerr << " done." << std::endl; >>> // Number of USED edges >>> typedef typename InputMeshType::CellIdentifier >>> CellIdentifier; >>> std::cerr << "ComputeNumberOfEdges"; >>> CellIdentifier numEdges = mesh->ComputeNumberOfEdges(); >>> std::cerr << " done." << std::endl; >>> // Number of USED faces >>> std::cerr << "ComputeNumberOfFaces"; >>> CellIdentifier numFaces = mesh->ComputeNumberOfFaces(); >>> std::cerr << " done." << std::endl; >>> // Number of Boundaries >>> std::cerr << "ComputeNumberOfBoundaryEdges"; >>> typename BoundaryEdges::OutputType >>> listOfBoundaries = boundaryEdges->Evaluate((*mesh)); >>> std::cerr << " done." << std::endl; >>> CellIdentifier numBounds = listOfBoundaries->size(); >>> delete listOfBoundaries; >>> >>> /** >>> * Number of points >>> * >>> * There are two methods to get the number of points. >>> * 1. itk::QuadEdgeMesh::ComputeNumberOfPoints() >>> * 2. itk::Mesh::GetNumberOfPoints() >>> * >>> * As an itk::QuadEdgeMesh is an itk::Mesh by inheritance, the user >>> * can use both. 1. will returned the number of points actually >>> * used by at least one edge, while 2. will give you the number >>> * of points in the container. Number of unused points can be found >>> * by making the difference between the two values. >>> */ >>> if(mesh->GetNumberOfPoints() != numPoints){ >>> std::cerr << "There are isolated vertices! Aborting." << std::endl; >>> return EXIT_FAILURE; >>> } >>> >>> // The euler formula states: >>> // numFaces - numEdges + numPoints == 2 - 2 * genus - numBounds == \xi >>> // hence 2 * genus= 2 - numBounds - numFaces + numEdges - numPoints must >>> be an oddeven number. >>> >>> typedef ::itk::OffsetValueType OffsetValueType; >>> >>> OffsetValueType xi= >>> + OffsetValueType(numFaces) >>> - OffsetValueType(numEdges) >>> + OffsetValueType(numPoints); >>> >>> std::cout << "The Euler characteristic Xi is: " << xi << std::endl; >>> >>> OffsetValueType twiceGenus= >>> + OffsetValueType(2) - OffsetValueType(numBounds) >>> - xi; >>> >>> std::cout << "The genus is: " << twiceGenus/OffsetValueType(2) << >>> std::endl; >>> >>> return EXIT_SUCCESS; >>> >>> } >>> >>> >>> void dispatch_cT(itk::ImageIOBase::IOComponentType componentType, >>> itk::ImageIOBase::IOPixelType pixelType, size_t dimensionType, int argc, >>> char *argv[]){ >>> >>> >>> //http://www.itk.org/Doxygen45/html/classitk_1_1ImageIOBase.html#a8dc783055a0af6f0a5a26cb080feb178 >>> >>> //http://www.itk.org/Doxygen45/html/itkImageIOBase_8h_source.html#l00107 >>> //IOComponentType: UNKNOWNCOMPONENTTYPE, UCHAR, CHAR, USHORT, SHORT, UINT, >>> INT, ULONG, LONG, FLOAT, DOUBLE >>> >>> switch (componentType){ >>> case itk::ImageIOBase::UCHAR:{ >>> typedef unsigned char InputComponentType; >>> dispatch_pT(pixelType, dimensionType, argc, argv); >>> } >>> break; >>> case itk::ImageIOBase::CHAR:{ >>> typedef char InputComponentType; >>> dispatch_pT(pixelType, dimensionType, argc, argv); >>> } >>> break; >>> case itk::ImageIOBase::USHORT:{ >>> typedef unsigned short InputComponentType; >>> dispatch_pT(pixelType, dimensionType, argc, argv); >>> } >>> break; >>> case itk::ImageIOBase::SHORT:{ >>> typedef short InputComponentType; >>> dispatch_pT(pixelType, dimensionType, argc, argv); >>> } >>> break; >>> case itk::ImageIOBase::UINT:{ >>> typedef unsigned int InputComponentType; >>> dispatch_pT(pixelType, dimensionType, argc, argv); >>> } >>> break; >>> case itk::ImageIOBase::INT:{ >>> typedef int InputComponentType; >>> dispatch_pT(pixelType, dimensionType, argc, argv); >>> } >>> break; >>> // case itk::ImageIOBase::ULONG:{ >>> // typedef unsigned long InputComponentType; >>> // dispatch_pT(pixelType, dimensionType, argc, >>> argv); >>> // } >>> // break; >>> // case itk::ImageIOBase::LONG:{ >>> // typedef long InputComponentType; >>> // dispatch_pT(pixelType, dimensionType, argc, >>> argv); >>> // } >>> // break; >>> // case itk::ImageIOBase::FLOAT:{ >>> // typedef float InputComponentType; >>> // dispatch_pT(pixelType, dimensionType, argc, >>> argv); >>> // } >>> // break; >>> // case itk::ImageIOBase::DOUBLE:{ >>> // typedef double InputComponentType; >>> // dispatch_pT(pixelType, dimensionType, argc, >>> argv); >>> // } >>> // break; >>> case itk::ImageIOBase::UNKNOWNCOMPONENTTYPE: >>> default: >>> std::cout << "unknown component type" << std::endl; >>> break; >>> }//switch >>> } >>> >>> template >>> void dispatch_pT(itk::ImageIOBase::IOPixelType pixelType, size_t >>> dimensionType, int argc, char *argv[]){ >>> >>> >>> //http://www.itk.org/Doxygen45/html/classitk_1_1ImageIOBase.html#abd189f096c2a1b3ea559bc3e4849f658 >>> >>> //http://www.itk.org/Doxygen45/html/itkImageIOBase_8h_source.html#l00099 >>> //IOPixelType:: UNKNOWNPIXELTYPE, SCALAR, RGB, RGBA, OFFSET, VECTOR, >>> POINT, COVARIANTVECTOR, SYMMETRICSECONDRANKTENSOR, DIFFUSIONTENSOR3D, >>> COMPLEX, FIXEDARRAY, MATRIX >>> >>> switch (pixelType){ >>> case itk::ImageIOBase::SCALAR:{ >>> typedef InputComponentType InputPixelType; >>> //typedef itk::SCALARPixel InputPixelType; >>> dispatch_D(dimensionType, argc, >>> argv); >>> } >>> break; >>> // case itk::ImageIOBase::RGB:{ >>> // typedef itk::RGBPixel InputPixelType; >>> // dispatch_D(dimensionType, argc, >>> argv); >>> // } >>> // break; >>> // case itk::ImageIOBase::RGBA:{ >>> // typedef itk::RGBAPixel InputPixelType; >>> // dispatch_D(dimensionType, argc, >>> argv); >>> // } >>> // break; >>> // case itk::ImageIOBase::VECTOR:{ >>> // //typedef itk::VECTORPixel InputPixelType; //does >>> not work! >>> // typedef itk::VariableLengthVector InputPixelType; >>> // dispatch_D(dimensionType, argc, >>> argv); >>> // } >>> // break; >>> case itk::ImageIOBase::UNKNOWNPIXELTYPE: >>> default: >>> std::cout << "unknown pixel type" << std::endl; >>> break; >>> }//switch >>> } >>> >>> >>> template >>> void dispatch_D(size_t dimensionType, int argc, char *argv[]){ >>> switch (dimensionType){ >>> // case 1: >>> // DoIt(argc, argv); >>> // break; >>> // case 2: >>> // DoIt(argc, argv); >>> // break; >>> case 3: >>> DoIt(argc, argv); >>> break; >>> case 4: >>> DoIt(argc, argv); >>> break; >>> case 5: >>> DoIt(argc, argv); >>> break; >>> default: >>> std::cout << "Images of dimension " << dimensionType << " are not >>> supported!" << std::endl; >>> break; >>> } >>> } >>> >>> >>> >>> ////from >>> http://itk-users.7.n7.nabble.com/Pad-image-with-0-but-keep-its-type-what-ever-it-is-td27442.html >>> >>> //namespace itk{ >>> // Description: >>> // Get the PixelType and ComponentType from fileName >>> >>> void GetImageType (std::string fileName, >>> itk::ImageIOBase::IOPixelType &pixelType, >>> itk::ImageIOBase::IOComponentType &componentType, >>> size_t &dimensionType >>> //ImageIOBase::IODimensionType &dimensionType >>> ){ >>> typedef itk::Image ImageType; >>> itk::ImageFileReader::Pointer imageReader= >>> itk::ImageFileReader::New(); >>> imageReader->SetFileName(fileName.c_str()); >>> imageReader->UpdateOutputInformation(); >>> >>> pixelType = imageReader->GetImageIO()->GetPixelType(); >>> componentType = imageReader->GetImageIO()->GetComponentType(); >>> dimensionType= imageReader->GetImageIO()->GetNumberOfDimensions(); >>> >>> //std::cerr << "Pixel Type is " << >>> imageReader->GetImageIO()->GetComponentTypeAsString(pixelType) << std::endl; >>> std::cerr << "component type is: " << >>> imageReader->GetImageIO()->GetComponentTypeAsString(componentType) << >>> std::endl; >>> std::cerr << "numDimensions: " << dimensionType << std::endl; >>> std::cerr << "component size: " << >>> imageReader->GetImageIO()->GetComponentSize() << std::endl; >>> std::cerr << "pixel type (string): " << >>> imageReader->GetImageIO()->GetPixelTypeAsString(imageReader->GetImageIO()->GetPixelType()) >>> >>> << std::endl; >>> std::cerr << "pixel type: " << pixelType << std::endl << >>> "_________________________" << std::endl << std::endl; >>> >>> >>> } >>> >>> >>> >>> int main(int argc, char *argv[]){ >>> if ( argc != 3 ) >>> { >>> std::cerr << "Missing Parameters: " >>> << argv[0] >>> << " Input_Image" >>> << " isoValue" >>> << std::endl; >>> >>> return EXIT_FAILURE; >>> } >>> >>> std::string ifn = argv[1]; >>> // std::string ofn = argv[2]; >>> // int compress= atoi(argv[3]); >>> >>> itk::ImageIOBase::IOPixelType pixelType; >>> typename itk::ImageIOBase::IOComponentType componentType; >>> //itk::ImageIOBase::IOComponentType componentType1; >>> //itk::ImageIOBase::IODimensionType dimensionType1; >>> size_t dimensionType; >>> >>> >>> try >>> { >>> GetImageType(argv[1], pixelType, componentType, dimensionType); >>> >>> dispatch_cT(componentType, pixelType, dimensionType, argc, argv); >>> }//try >>> catch( itk::ExceptionObject &excep) >>> { >>> std::cerr << argv[0] << ": exception caught !" << std::endl; >>> std::cerr << excep << std::endl; >>> return EXIT_FAILURE; >>> } >>> >>> return EXIT_SUCCESS; >>> >>> } >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On 08/06/14 15:51, Luis Ibanez wrote: >>>> >>>> >>>> Roman, >>>> >>>> >>>> Could you please share with the list an example >>>> of a program where you are observing this behavior ? >>>> >>>> In particular, we would like to see if this is occurring with >>>> Image filters, or rather with other types of ITK objects. >>>> >>>> >>>> >>>> The itk::Image does listen to the (potential) memory allocation messages >>>> (that is, the bad_alloc exception). >>>> >>>> >>>> >>>> The itk::Image class uses a helper class to store the pixel data. >>>> >>>> >>>> >>>> This helper is the: >>>> >>>> itk::ImportImageContainer >>>> >>>> >>>> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkImportImageContainer.h >>>> >>>> >>>> >>>> >>>> >>>> and its memory allocation is typically done in the AllocateElements() >>>> function >>>> in line: >>>> >>>> >>>> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkImportImageContainer.hxx#L173 >>>> >>>> >>>> the code looks like >>>> >>>> TElement *data; >>>> >>>> try >>>> { >>>> if ( UseDefaultConstructor ) >>>> { >>>> data = new TElement[size](); //POD types initialized to 0, others >>>> use >>>> default constructor. >>>> } >>>> else >>>> { >>>> data = new TElement[size]; //Faster but uninitialized >>>> } >>>> } >>>> catch ( ... ) >>>> { >>>> data = ITK_NULLPTR; >>>> } >>>> if ( !data ) >>>> { >>>> // We cannot construct an error string here because we may be out >>>> // of memory. Do not use the exception macro. >>>> throw MemoryAllocationError(__FILE__, __LINE__, >>>> "Failed to allocate memory for image.", >>>> ITK_LOCATION); >>>> } >>>> return data; >>>> >>>> >>>> >>>> As you can see, the case of exceptions is managed in that function. >>>> >>>> >>>> Here is an example of a test program demonstrating that ITK image >>>> will throw exceptions when allocating memory beyond limits. >>>> >>>> >>>> #include "itkImage.h" >>>> #include >>>> >>>> int main(int argc, char * argv[] ) >>>> { >>>> if( argc < 2 ) >>>> { >>>> std::cerr << "Missing arguments" << std::endl; >>>> return 1; >>>> } >>>> >>>> typedef itk::Image< unsigned short, 3 > ImageType; >>>> >>>> ImageType::Pointer image = ImageType::New(); >>>> >>>> ImageType::RegionType region; >>>> ImageType::SizeType size; >>>> >>>> size_t side = atoi( argv[1] ); >>>> >>>> size[0] = side; >>>> size[1] = side; >>>> size[2] = side; >>>> >>>> region.SetSize( size ); >>>> >>>> image->SetRegions( region ); >>>> >>>> try >>>> { >>>> image->Allocate(); >>>> } >>>> catch( std::exception & excp ) >>>> { >>>> std::cerr << excp.what() << std::endl; >>>> return 1; >>>> } >>>> >>>> std::cout << "ITK Hello World !" << std::endl; >>>> >>>> return 0; >>>> } >>>> >>>> >>>> and what happens when executing in an Ubuntu Linux machine with 32GB or >>>> RAM >>>> >>>> >>>> $ ./HelloWorld 1000 >>>> ITK Hello World ! >>>> >>>> >>>> $ ./HelloWorld 1000000 >>>> >>>> /home/ibanez/src/ITK/Modules/Core/Common/include/itkImportImageContainer.hxx:199: >>>> >>>> Failed to allocate memory for image. >>>> >>>> >>>> >>>> >>>> Please share with the list a minimal example of the problem you are >>>> observing, >>>> and in this way we will be able to help track the issue. >>>> >>>> >>>> Thanks >>>> >>>> >>>> Luis >>>> >>>> >>> >>> -- >>> Dr. Roman Grothausmann >>> >>> Tomographie und Digitale Bildverarbeitung >>> Tomography and Digital Image Analysis >>> >>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>> Medizinische Hochschule Hannover >>> Carl-Neuberg-Str. 1 >>> D-30625 Hannover >>> >>> Tel. +49 511 532-9574 >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 From l.onofri at outlook.com Tue Feb 17 06:38:19 2015 From: l.onofri at outlook.com (Leonardo Onofri) Date: Tue, 17 Feb 2015 12:38:19 +0100 Subject: [ITK-users] ICB BSpline Message-ID: Dear users, I would like to use ICP registration with BSpline transform. The problem is that I cannot use the LBFGS optimizer since I get this error: 'void itk::PointSetToPointSetRegistrationMethod::SetOptimizer(itk::PointSetToPointSetRegistrationMethod::OptimizerType *)' : cannot convert argument 1 from 'itk::LBFGSOptimizer::Pointer' to 'itk::PointSetToPointSetRegistrationMethod::OptimizerType *' Regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Tue Feb 17 11:16:46 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 17 Feb 2015 11:16:46 -0500 Subject: [ITK-users] ICB BSpline In-Reply-To: References: Message-ID: Hi Leonardo, When investigating the PointSetToPointSetRegistrationMethod [1], doxygen or the source code shows that OptimizerType MultipleValuedNonLinearOptimizer [2], and LBFGS does not inherit from MultipleValuedNonLinearOptimizer [3] (click the Inheritance diagram tab). HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1PointSetToPointSetRegistrationMethod.html [2] http://www.itk.org/Doxygen/html/classitk_1_1MultipleValuedNonLinearOptimizer.html [3] http://www.itk.org/Doxygen/html/classitk_1_1LBFGSOptimizer.html On Tue, Feb 17, 2015 at 6:38 AM, Leonardo Onofri wrote: > Dear users, > > > > I would like to use ICP registration with BSpline transform. > > > > The problem is that I cannot use the LBFGS optimizer since I get this error: > > > > 'void > itk::PointSetToPointSetRegistrationMethod::SetOptimizer(itk::PointSetToPointSetRegistrationMethod::OptimizerType > *)' : cannot convert argument 1 from 'itk::LBFGSOptimizer::Pointer' to > 'itk::PointSetToPointSetRegistrationMethod::OptimizerType > *' > > > > Regards, > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 franciscolopezdelafranca at gmail.com Wed Feb 18 06:17:28 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Wed, 18 Feb 2015 12:17:28 +0100 Subject: [ITK-users] Integration ITK with Qt Creator Message-ID: Hi. I've been using recently ITK but with no IDE, and I've been recommended to use Qt platform. I've downloaded Qt Creator but I don?t find the documentation and the way to integrate ITK with it. That's why I post this message, in order to know if anyone has any reference or guide explaining how to do it. Thank you very much in advance. Kind regards, /Francisco -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhlegarreta at vicomtech.org Wed Feb 18 06:40:04 2015 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Wed, 18 Feb 2015 12:40:04 +0100 Subject: [ITK-users] Integration ITK with Qt Creator In-Reply-To: References: Message-ID: Dear Francisco, I assume you mean "with no GUI" when you say "with no IDE". Note that Qt Creator is just a tool of Qt to facilitate the task of creating GUIs, but in order to actually have a GUI for your application, you will need to download Qt itself [1]. You can download the binaries, and thus you can avoid any complication derived from building the sources. Assuming you are using CMake to generate your project, in order to build your application with Qt as the GUI library, you should include Qt among the libraries to look for and link with in your CMakeLists [2]. HTH, JON HAITZ [1] https://qt-project.org/ [2] http://www.cmake.org/Wiki/CMake/Tutorials/Qt On 18 February 2015 at 12:17, Francisco Lopez de la Franca < franciscolopezdelafranca at gmail.com> wrote: > Hi. > I've been using recently ITK but with no IDE, and I've been recommended to > use Qt platform. > I've downloaded Qt Creator but I don?t find the documentation and the way > to integrate ITK with it. > > That's why I post this message, in order to know if anyone has any > reference or guide explaining how to do it. > > Thank you very much in advance. > > Kind regards, > /Francisco > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Feb 18 10:38:20 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 18 Feb 2015 10:38:20 -0500 Subject: [ITK-users] ICB BSpline In-Reply-To: References: Message-ID: Hi Leonardo, Yes, this means you cannot use the LBFGS optimizer. Examing the doxygen inheritance diagram from the MultipleValuedNonLinearOptimizer class, it shows that the LevenbergMarquardtOptimizer or the CumulativeGaussianOptimizer. HTH, Matt On Wed, Feb 18, 2015 at 5:20 AM, Leonardo Onofri wrote: > Hi Matt, > > Thank you for your answer. > > This means that I cannot use the LBFGS optimizer, right? > > If so, which are good alternatives? > > Regards, > Leonardo > >> Date: Tue, 17 Feb 2015 11:16:46 -0500 >> Subject: Re: [ITK-users] ICB BSpline >> From: matt.mccormick at kitware.com >> To: l.onofri at outlook.com >> CC: insight-users at itk.org > >> >> Hi Leonardo, >> >> When investigating the PointSetToPointSetRegistrationMethod [1], >> doxygen or the source code shows that OptimizerType >> MultipleValuedNonLinearOptimizer [2], and LBFGS does not inherit from >> MultipleValuedNonLinearOptimizer [3] (click the Inheritance diagram >> tab). >> >> HTH, >> Matt >> >> [1] >> http://www.itk.org/Doxygen/html/classitk_1_1PointSetToPointSetRegistrationMethod.html >> >> [2] >> http://www.itk.org/Doxygen/html/classitk_1_1MultipleValuedNonLinearOptimizer.html >> >> [3] http://www.itk.org/Doxygen/html/classitk_1_1LBFGSOptimizer.html >> >> On Tue, Feb 17, 2015 at 6:38 AM, Leonardo Onofri >> wrote: >> > Dear users, >> > >> > >> > >> > I would like to use ICP registration with BSpline transform. >> > >> > >> > >> > The problem is that I cannot use the LBFGS optimizer since I get this >> > error: >> > >> > >> > >> > 'void >> > >> > itk::PointSetToPointSetRegistrationMethod::SetOptimizer(itk::PointSetToPointSetRegistrationMethod::OptimizerType >> > *)' : cannot convert argument 1 from 'itk::LBFGSOptimizer::Pointer' to >> > >> > 'itk::PointSetToPointSetRegistrationMethod::OptimizerType >> > *' >> > >> > >> > >> > Regards, >> > >> > >> > _____________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Kitware offers ITK Training Courses, for more information visit: >> > http://www.kitware.com/products/protraining.php >> > >> > Please keep messages on-topic and check the 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 franciscolopezdelafranca at gmail.com Wed Feb 18 12:03:05 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Wed, 18 Feb 2015 18:03:05 +0100 Subject: [ITK-users] Integration ITK with Qt Creator In-Reply-To: References: Message-ID: Hi. I went to the Qt project web page. Then to the Download link and downloaded the Qt Community release that includes Qt Creator and, I think, Qt libraries as well because Qt Creator detects automatically the Qt 5.4.0 MinGw 32-bit KIT. In fact, if I run "qmake -version ", then I get: C:\Qt\5.4\mingw491_32\bin>qmake -version QMake version 3.0 Using Qt version 5.4.0 in C:/Qt/5.4/mingw491_32/lib By an IDE I meant an environment with an Editor, Compiler, Debugger, etc. And so far, I've been working with a simple text editor, compiling from a DOS prompt and not debugging but tracing with "cout" commands. That's why I needed to find a real IDE like Eclipse or something like that, and try to work with ITK in the best comfortable way, like I do when programming in Java. So, is it possible to program with ITK within an IDE and not to worry about CMake configuration and shells/DOS prompts to compile and, besides, to have a debugger? Thanks a lot. Best regards, /Francisco 2015-02-18 12:40 GMT+01:00 Jon Haitz Legarreta : > Dear Francisco, > I assume you mean "with no GUI" when you say "with no IDE". > > Note that Qt Creator is just a tool of Qt to facilitate the task of > creating GUIs, but in order to actually have a GUI for your application, > you will need to download Qt itself [1]. You can download the binaries, and > thus you can avoid any complication derived from building the sources. > > Assuming you are using CMake to generate your project, in order to build > your application with Qt as the GUI library, you should include Qt among > the libraries to look for and link with in your CMakeLists [2]. > > HTH, > JON HAITZ > > > [1] https://qt-project.org/ > [2] http://www.cmake.org/Wiki/CMake/Tutorials/Qt > > > > On 18 February 2015 at 12:17, Francisco Lopez de la Franca < > franciscolopezdelafranca at gmail.com> wrote: > >> Hi. >> I've been using recently ITK but with no IDE, and I've been recommended >> to use Qt platform. >> I've downloaded Qt Creator but I don?t find the documentation and the way >> to integrate ITK with it. >> >> That's why I post this message, in order to know if anyone has any >> reference or guide explaining how to do it. >> >> Thank you very much in advance. >> >> Kind regards, >> /Francisco >> >> _____________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Feb 18 12:07:18 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 18 Feb 2015 12:07:18 -0500 Subject: [ITK-users] Integration ITK with Qt Creator In-Reply-To: References: Message-ID: Hi Francisco, You will want to use QtCreator with CMake. QtCreator has support for CMake. See, for example: http://doc.qt.digia.com/qtcreator-2.2/creator-project-cmake.html HTH, Matt On Wed, Feb 18, 2015 at 12:03 PM, Francisco Lopez de la Franca < franciscolopezdelafranca at gmail.com> wrote: > Hi. > I went to the Qt project web page. Then to the Download link and > downloaded the Qt Community release that includes Qt Creator and, I think, > Qt libraries as well because Qt Creator detects automatically the Qt 5.4.0 > MinGw 32-bit KIT. > In fact, if I run "qmake -version ", then I get: > > C:\Qt\5.4\mingw491_32\bin>qmake -version > > QMake version 3.0 > Using Qt version 5.4.0 in C:/Qt/5.4/mingw491_32/lib > > > By an IDE I meant an environment with an Editor, Compiler, Debugger, etc. > And so far, I've been working with a simple text editor, compiling from a > DOS prompt and not debugging but tracing with "cout" commands. That's why I > needed to find a real IDE like Eclipse or something like that, and try to > work with ITK in the best comfortable way, like I do when programming in > Java. > > So, is it possible to program with ITK within an IDE and not to worry > about CMake configuration and shells/DOS prompts to compile and, besides, > to have a debugger? > > Thanks a lot. > Best regards, > /Francisco > > 2015-02-18 12:40 GMT+01:00 Jon Haitz Legarreta > : > >> Dear Francisco, >> I assume you mean "with no GUI" when you say "with no IDE". >> >> Note that Qt Creator is just a tool of Qt to facilitate the task of >> creating GUIs, but in order to actually have a GUI for your application, >> you will need to download Qt itself [1]. You can download the binaries, and >> thus you can avoid any complication derived from building the sources. >> >> Assuming you are using CMake to generate your project, in order to build >> your application with Qt as the GUI library, you should include Qt among >> the libraries to look for and link with in your CMakeLists [2]. >> >> HTH, >> JON HAITZ >> >> >> [1] https://qt-project.org/ >> [2] http://www.cmake.org/Wiki/CMake/Tutorials/Qt >> >> >> >> On 18 February 2015 at 12:17, Francisco Lopez de la Franca < >> franciscolopezdelafranca at gmail.com> wrote: >> >>> Hi. >>> I've been using recently ITK but with no IDE, and I've been recommended >>> to use Qt platform. >>> I've downloaded Qt Creator but I don?t find the documentation and the >>> way to integrate ITK with it. >>> >>> That's why I post this message, in order to know if anyone has any >>> reference or guide explaining how to do it. >>> >>> Thank you very much in advance. >>> >>> Kind regards, >>> /Francisco >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the 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 jhlegarreta at vicomtech.org Wed Feb 18 12:24:37 2015 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Wed, 18 Feb 2015 18:24:37 +0100 Subject: [ITK-users] Integration ITK with Qt Creator In-Reply-To: References: Message-ID: Dear Francisco, additionally to what Matt has posted, ITK does not rely on any particular IDE; you can use virtually any IDE of your choice. QtCreator may be one of them. If you work in Windows, as apparently you do, a popular choice would be Microsoft's Visual Studio [1]. You can download the Express edition. If you work in OS X, Xcode [2] is a good option. I'm not an expert in IDEs for Linux systems, but a quick search gives the following options (don't whether they would all be valid for a particular distribution): NetBeans [3] Code::Blocks [4], CodeLite [5] or KDevelop [6]. BTW, using CMake will save you a lot of time and headaches. HTH, JON HAITZ [1] http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx [2] https://developer.apple.com/xcode/ [3] https://netbeans.org/features/cpp/ [4] http://www.codeblocks.org/ [5] http://codelite.org/ [6] https://www.kdevelop.org/ On 18 February 2015 at 18:07, Matt McCormick wrote: > Hi Francisco, > > You will want to use QtCreator with CMake. QtCreator has support for > CMake. See, for example: > > http://doc.qt.digia.com/qtcreator-2.2/creator-project-cmake.html > > HTH, > Matt > > On Wed, Feb 18, 2015 at 12:03 PM, Francisco Lopez de la Franca < > franciscolopezdelafranca at gmail.com> wrote: > >> Hi. >> I went to the Qt project web page. Then to the Download link and >> downloaded the Qt Community release that includes Qt Creator and, I think, >> Qt libraries as well because Qt Creator detects automatically the Qt 5.4.0 >> MinGw 32-bit KIT. >> In fact, if I run "qmake -version ", then I get: >> >> C:\Qt\5.4\mingw491_32\bin>qmake -version >> >> QMake version 3.0 >> Using Qt version 5.4.0 in C:/Qt/5.4/mingw491_32/lib >> >> >> By an IDE I meant an environment with an Editor, Compiler, Debugger, etc. >> And so far, I've been working with a simple text editor, compiling from a >> DOS prompt and not debugging but tracing with "cout" commands. That's why I >> needed to find a real IDE like Eclipse or something like that, and try to >> work with ITK in the best comfortable way, like I do when programming in >> Java. >> >> So, is it possible to program with ITK within an IDE and not to worry >> about CMake configuration and shells/DOS prompts to compile and, besides, >> to have a debugger? >> >> Thanks a lot. >> Best regards, >> /Francisco >> >> 2015-02-18 12:40 GMT+01:00 Jon Haitz Legarreta > >: >> >>> Dear Francisco, >>> I assume you mean "with no GUI" when you say "with no IDE". >>> >>> Note that Qt Creator is just a tool of Qt to facilitate the task of >>> creating GUIs, but in order to actually have a GUI for your application, >>> you will need to download Qt itself [1]. You can download the binaries, and >>> thus you can avoid any complication derived from building the sources. >>> >>> Assuming you are using CMake to generate your project, in order to build >>> your application with Qt as the GUI library, you should include Qt among >>> the libraries to look for and link with in your CMakeLists [2]. >>> >>> HTH, >>> JON HAITZ >>> >>> >>> [1] https://qt-project.org/ >>> [2] http://www.cmake.org/Wiki/CMake/Tutorials/Qt >>> >>> >>> >>> On 18 February 2015 at 12:17, Francisco Lopez de la Franca < >>> franciscolopezdelafranca at gmail.com> wrote: >>> >>>> Hi. >>>> I've been using recently ITK but with no IDE, and I've been recommended >>>> to use Qt platform. >>>> I've downloaded Qt Creator but I don?t find the documentation and the >>>> way to integrate ITK with it. >>>> >>>> That's why I post this message, in order to know if anyone has any >>>> reference or guide explaining how to do it. >>>> >>>> Thank you very much in advance. >>>> >>>> Kind regards, >>>> /Francisco >>>> >>>> _____________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Kitware offers ITK Training Courses, for more information visit: >>>> http://www.kitware.com/products/protraining.php >>>> >>>> Please keep messages on-topic and check the 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 dr.tim.allman at gmail.com Wed Feb 18 12:51:04 2015 From: dr.tim.allman at gmail.com (Tim Allman) Date: Wed, 18 Feb 2015 12:51:04 -0500 Subject: [ITK-users] Integration ITK with Qt Creator In-Reply-To: References: Message-ID: <4B895794-61FC-4617-A214-EF699F99D217@gmail.com> I have done a fair amount of development with Eclipse and NetBeans in a Linux environment. My impression of Eclipse is that it is happiest when coding in Java and less so with C/C++. I don?t know about integrating QtCreator and CMake but I expect both are possible. NetBeans does support CMake and Qt and much work has been done to integrate C++. Both of these are available on Windows. And, I have found that there is a bit of a steep and long learning curve in using these products but it?s worth the effort. -------------------------- Tim Allman Ph.D. 35 Margaret St., Guelph Ont., N1E 5R6 Canada 519-837-0276 On Feb 18, 2015, at 12:24 PM, Jon Haitz Legarreta wrote: > Dear Francisco, > additionally to what Matt has posted, ITK does not rely on any particular IDE; you can use virtually any IDE of your choice. > > QtCreator may be one of them. > > If you work in Windows, as apparently you do, a popular choice would be Microsoft's Visual Studio [1]. You can download the Express edition. > > If you work in OS X, Xcode [2] is a good option. > > I'm not an expert in IDEs for Linux systems, but a quick search gives the following options (don't whether they would all be valid for a particular distribution): NetBeans [3] Code::Blocks [4], CodeLite [5] or KDevelop [6]. > > BTW, using CMake will save you a lot of time and headaches. > > HTH, > JON HAITZ > > [1] http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx > [2] https://developer.apple.com/xcode/ > [3] https://netbeans.org/features/cpp/ > [4] http://www.codeblocks.org/ > [5] http://codelite.org/ > [6] https://www.kdevelop.org/ > > > > On 18 February 2015 at 18:07, Matt McCormick wrote: > Hi Francisco, > > You will want to use QtCreator with CMake. QtCreator has support for CMake. See, for example: > > http://doc.qt.digia.com/qtcreator-2.2/creator-project-cmake.html > > HTH, > Matt > > On Wed, Feb 18, 2015 at 12:03 PM, Francisco Lopez de la Franca wrote: > Hi. > I went to the Qt project web page. Then to the Download link and downloaded the Qt Community release that includes Qt Creator and, I think, Qt libraries as well because Qt Creator detects automatically the Qt 5.4.0 MinGw 32-bit KIT. > In fact, if I run "qmake -version ", then I get: > > C:\Qt\5.4\mingw491_32\bin>qmake -version > > QMake version 3.0 > Using Qt version 5.4.0 in C:/Qt/5.4/mingw491_32/lib > > > By an IDE I meant an environment with an Editor, Compiler, Debugger, etc. And so far, I've been working with a simple text editor, compiling from a DOS prompt and not debugging but tracing with "cout" commands. That's why I needed to find a real IDE like Eclipse or something like that, and try to work with ITK in the best comfortable way, like I do when programming in Java. > > So, is it possible to program with ITK within an IDE and not to worry about CMake configuration and shells/DOS prompts to compile and, besides, to have a debugger? > > Thanks a lot. > Best regards, > /Francisco > > 2015-02-18 12:40 GMT+01:00 Jon Haitz Legarreta : > Dear Francisco, > I assume you mean "with no GUI" when you say "with no IDE". > > Note that Qt Creator is just a tool of Qt to facilitate the task of creating GUIs, but in order to actually have a GUI for your application, you will need to download Qt itself [1]. You can download the binaries, and thus you can avoid any complication derived from building the sources. > > Assuming you are using CMake to generate your project, in order to build your application with Qt as the GUI library, you should include Qt among the libraries to look for and link with in your CMakeLists [2]. > > HTH, > JON HAITZ > > > [1] https://qt-project.org/ > [2] http://www.cmake.org/Wiki/CMake/Tutorials/Qt > > > > On 18 February 2015 at 12:17, Francisco Lopez de la Franca wrote: > Hi. > I've been using recently ITK but with no IDE, and I've been recommended to use Qt platform. > I've downloaded Qt Creator but I don?t find the documentation and the way to integrate ITK with it. > > That's why I post this message, in order to know if anyone has any reference or guide explaining how to do it. > > Thank you very much in advance. > > Kind regards, > /Francisco > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Wed Feb 18 15:17:42 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Wed, 18 Feb 2015 15:17:42 -0500 Subject: [ITK-users] [ANNOUNCE] ITK 4.7.1 has been released! Message-ID: On behalf of the Insight Toolkit Community, we are happy to announce the release of ITK 4.7.1! This is a patch release that addresses critical issues, regressions, important documentation, and compiler support. The 4.7.1 release fixes improves Visual Studio support, addresses Python wrapping runtime warnings, includes fixes for the ITK Software Guide, and addresses a few miscellaneous bugs. Changes were added to improve support for Visual Studio 2013, the ITKVtkGlue module with Visual Studio, and for the upcoming Visual Studio 2015 release. Visual Studio 2013 (Professional and Community Editions) generated faulty code when compiled for Intel Win64 with SSE2 instructions in Release mode and/or when ITK_USE_64BITS_IDS was ON (Microsoft Visual Studio Bug ID 1060166 and 1093610 ). Workarounds were made to ITK?s code and the issues were reported to upstream Visual Studio, who have addressed the bugs in Visual Studio 2015. Common WrapITK Python runtime warnings have all been addressed. Fixes and style changes were made for the hardcopy of the The ITK Software Guide, which is now available at: http://www.itk.org/ITK/help/book.html Congratulations and thanks to everyone who contributed to this release. Questions and comments are welcome on the ITK mailing lists. Release files can be downloaded from: http://itk.org/ITK/resources/software.html The next feature release of 4.8.0 is scheduled for June. Enjoy ITK! Changes from v4.7.0 to v4.7.1: Brad King (1): COMP: Fix variable reference in ITKVtkGlue module files Bradley Lowekamp (8): BUG: Enable setting all zeroes for fixed parameters for displacement COMP: Fix unsafe usage of sprintf BUG: Fix incorrectly ordering of template parameters COMP: check for search.h in libtiff BUG: restore the center point fixed parameters for scale transforms COMP: Use _timezone for Visual Studio BUG: Restore IO support for BSplineDeformableTransform BUG: Enable VectorImage to work with the ImageSeriesWriter Christopher Mullins (2): BUG: Return a correct voronoi partition in Danielsson filter example. STYLE: Fix Latex blocks in documentation to include newlines. D?enan Zuki? (2): COMP: VS 2012+ compile fixes and CMake warnings COMP: fixing quote matching in vtkGlue-related .cmake file Julien Jomier (1): BUG: Output pointer origin is not set causing a memory access error. Marius Staring, Niels Dekker, Floris Berendsen (2): BUG: workaround for 64bit VS2013 Release segfaults (Visual Studio Bug ID 1060166 ) COMP: workaround for 64bit VS2013 Release ICE (Visual Studio Bug ID 1093610 ) Matthew McCormick (9): ENH: Add wrapping for ITKImageNoise module. ENH: Bump release branch version to 4.7.1. BUG: Clear TransformIO's list of transforms in TransformFileReader. COMP: Fix wrapping runtime warning on unknown itk::Matrix. COMP: Add missing types for MeshTraits wrapping. COMP: Do not wrap the Container types for CellInterface * types. COMP: Add wrapping for CellTraitsInfo. COMP: Wrap missing Mesh templates. -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Thu Feb 19 11:08:22 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 19 Feb 2015 11:08:22 -0500 Subject: [ITK-users] [ANNOUNCE] SimpleITK 0.9 REGISTRATION beta 1 release Message-ID: We are pleased to announce the SimpleITK 0.9 beta 1! NOW WITH REGISTRATION We encourage the community to use and test this registration interface and to provide feedback on the design and features. This beta features the ImageRegistrationMethod which brings a SimpleITK style interface to the modular ITKv4 registration framework. This adds support for a variety of transforms including affine, b-spline, and deformation fields. The metrics supported include correlation, means squares, ANTS neighborhood correlation, and mutual information. A variety of optimizers are available along with scales estimators for the optimized transformation parameters and built in multi-scale registration support. http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ImageRegistrationMethod.html Additionally, a number of registration filters have been added: DemonsRegistrationFilter, DiffeomorphicDemonsRegistrationFilter, FastSymmetricForcesDemonsRegistrationFilter, LevelSetMotionRegistrationFilter and SymmetricForcesDemonsRegistrationFilter. Several examples can be found in the examples directory to help you get started. These examples include Affine registration, BSpline, Demons and Displacement fields. http://www.itk.org/SimpleITKDoxygen/html/examples.html We have also added the following filters: AdditiveGaussianNoiseImageFilter, AggregateLabelMapFilter, BinaryImageToLabelMapFilter, ChangeLabelLabelMapFilter, CollidingFrontsImageFilter, DisplacementFieldJacobianDeterminantFilter, FastMarchingBaseImageFilter, FastMarchingUpwindGradientImageFilter, InverseDisplacementFieldImageFilter, InvertDisplacementFieldImageFilter, LabelImageToLabelMapFilter, LabelShapeStatisticsImageFilter, LabelStatisticsImageFilter, LabelUniqueLabelMapFilter, MergeLabelMapFilter, RelabelLabelMapFilter, SaltAndPepperNoiseImageFilter, ShotNoiseImageFilter, SpeckleNoiseImageFilter and TransformToDisplacementFieldFilter Note: We have run into a limitation with Visual Studio that prevents successful building and packaging for Windows 64. This will be addressed before the final release. Please try the 32-bit Windows version for smaller images. Before the final release we will work on improving testing, adding more examples and documentation, and fixing bugs. We believe the beta is feature complete for doing registration work, but are open to critical features reported from the community. You will need to manually download the beta binaries, then explicitly install the downloaded beta file. Information on how to get started and download the binaries: http://www.itk.org/Wiki/SimpleITK/GettingStarted#Binaries Binary distributions for many platforms and languages are available for downloading: https://sourceforge.net/projects/simpleitk/files/SimpleITK/0.9b01/ Nightly Doxygen Documentation: http://www.itk.org/SimpleITKDoxygen/html/index.html Additional Release Notes: http://www.itk.org/Wiki/SimpleITK/ReleaseNotes#Beta_1_Announcement Enjoy! From alfonso.castro at udc.es Thu Feb 19 12:44:36 2015 From: alfonso.castro at udc.es (Alfonso Castro) Date: Thu, 19 Feb 2015 18:44:36 +0100 Subject: [ITK-users] Problem compiling HelloWorld.cxx with ITK 4.7.1 Message-ID: <74975975.Iyg6Sylb1S@hinata> Hi. I downladed and install ITK 4.7.1 version on OpenSuSE 13.2 x86-64. I activated the different modules and the use of CUDA with shared libs off. The compile was without problem and I installed in directory: /opt/mia/itk. I fixed ITK_DIR=/opt/mia/itk/lib/cmake/ITK-4.7. Then I created a HelloWord project to check all work correctly using the CMakelist.txt included in Software Guide. However, when I run make, the system shows the next error: /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: no se puede encontrar -lSmoothingRecursiveYvvGaussianFilter collect2: error: ld returned 1 exit status CMakeFiles/hola.dir/build.make:337: recipe for target 'hola' failed make[2]: *** [hola] Error 1 CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/hola.dir/all' failed make[1]: *** [CMakeFiles/hola.dir/all] Error 2 Makefile:76: recipe for target 'all' failed make: *** [all] Error 2 I tried to find the reason of the error but I am not able. What is the reason of the error? How I can resolve it? Thanks in advance. Alfonso Castro Mart?nez Facullty of Computer Science University of A Coruna Spain -------------- next part -------------- An HTML attachment was scrubbed... URL: From franciscolopezdelafranca at gmail.com Thu Feb 19 14:35:45 2015 From: franciscolopezdelafranca at gmail.com (Francisco Lopez de la Franca) Date: Thu, 19 Feb 2015 20:35:45 +0100 Subject: [ITK-users] Integration ITK with Qt Creator In-Reply-To: <4B895794-61FC-4617-A214-EF699F99D217@gmail.com> References: <4B895794-61FC-4617-A214-EF699F99D217@gmail.com> Message-ID: Hi again. After re-installing Qt 5.4.0 several times, it always throws the following error just when launched for the CMakeProjectManager: Cannot load plugin because dependency failed to load: Designer(3.3.0) Reason: Could not resolve dependency 'ResourceEditor(3.3.0)' I know this is not the right forum because it is a Qt issue, but I ask the question in case someone has found with the same error and know how to solve it. Sincerely, thank you very much. Best regards. /Francisco 2015-02-18 18:51 GMT+01:00 Tim Allman : > I have done a fair amount of development with Eclipse and NetBeans in a > Linux environment. My impression of Eclipse is that it is happiest when > coding in Java and less so with C/C++. I don?t know about integrating > QtCreator and CMake but I expect both are possible. > > NetBeans does support CMake and Qt and much work has been done to > integrate C++. > > Both of these are available on Windows. > > And, I have found that there is a bit of a steep and long learning curve > in using these products but it?s worth the effort. > > -------------------------- > Tim Allman Ph.D. > 35 Margaret St., > Guelph Ont., > N1E 5R6 > Canada > > 519-837-0276 > > > > > On Feb 18, 2015, at 12:24 PM, Jon Haitz Legarreta < > jhlegarreta at vicomtech.org> wrote: > > Dear Francisco, > additionally to what Matt has posted, ITK does not rely on any particular > IDE; you can use virtually any IDE of your choice. > > QtCreator may be one of them. > > If you work in Windows, as apparently you do, a popular choice would be > Microsoft's Visual Studio [1]. You can download the Express edition. > > If you work in OS X, Xcode [2] is a good option. > > I'm not an expert in IDEs for Linux systems, but a quick search gives the > following options (don't whether they would all be valid for a particular > distribution): NetBeans [3] Code::Blocks [4], CodeLite [5] or KDevelop [6]. > > BTW, using CMake will save you a lot of time and headaches. > > HTH, > JON HAITZ > > [1] > http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx > [2] https://developer.apple.com/xcode/ > [3] https://netbeans.org/features/cpp/ > [4] http://www.codeblocks.org/ > [5] http://codelite.org/ > [6] https://www.kdevelop.org/ > > > > On 18 February 2015 at 18:07, Matt McCormick > wrote: > >> Hi Francisco, >> >> You will want to use QtCreator with CMake. QtCreator has support for >> CMake. See, for example: >> >> http://doc.qt.digia.com/qtcreator-2.2/creator-project-cmake.html >> >> HTH, >> Matt >> >> On Wed, Feb 18, 2015 at 12:03 PM, Francisco Lopez de la Franca < >> franciscolopezdelafranca at gmail.com> wrote: >> >>> Hi. >>> I went to the Qt project web page. Then to the Download link and >>> downloaded the Qt Community release that includes Qt Creator and, I think, >>> Qt libraries as well because Qt Creator detects automatically the Qt 5.4.0 >>> MinGw 32-bit KIT. >>> In fact, if I run "qmake -version ", then I get: >>> >>> C:\Qt\5.4\mingw491_32\bin>qmake -version >>> >>> QMake version 3.0 >>> Using Qt version 5.4.0 in C:/Qt/5.4/mingw491_32/lib >>> >>> >>> By an IDE I meant an environment with an Editor, Compiler, Debugger, >>> etc. And so far, I've been working with a simple text editor, compiling >>> from a DOS prompt and not debugging but tracing with "cout" commands. >>> That's why I needed to find a real IDE like Eclipse or something like that, >>> and try to work with ITK in the best comfortable way, like I do when >>> programming in Java. >>> >>> So, is it possible to program with ITK within an IDE and not to worry >>> about CMake configuration and shells/DOS prompts to compile and, besides, >>> to have a debugger? >>> >>> Thanks a lot. >>> Best regards, >>> /Francisco >>> >>> 2015-02-18 12:40 GMT+01:00 Jon Haitz Legarreta < >>> jhlegarreta at vicomtech.org>: >>> >>>> Dear Francisco, >>>> I assume you mean "with no GUI" when you say "with no IDE". >>>> >>>> Note that Qt Creator is just a tool of Qt to facilitate the task of >>>> creating GUIs, but in order to actually have a GUI for your application, >>>> you will need to download Qt itself [1]. You can download the binaries, and >>>> thus you can avoid any complication derived from building the sources. >>>> >>>> Assuming you are using CMake to generate your project, in order to >>>> build your application with Qt as the GUI library, you should include Qt >>>> among the libraries to look for and link with in your CMakeLists [2]. >>>> >>>> HTH, >>>> JON HAITZ >>>> >>>> >>>> [1] https://qt-project.org/ >>>> [2] http://www.cmake.org/Wiki/CMake/Tutorials/Qt >>>> >>>> >>>> >>>> On 18 February 2015 at 12:17, Francisco Lopez de la Franca < >>>> franciscolopezdelafranca at gmail.com> wrote: >>>> >>>>> Hi. >>>>> I've been using recently ITK but with no IDE, and I've been >>>>> recommended to use Qt platform. >>>>> I've downloaded Qt Creator but I don?t find the documentation and the >>>>> way to integrate ITK with it. >>>>> >>>>> That's why I post this message, in order to know if anyone has any >>>>> reference or guide explaining how to do it. >>>>> >>>>> Thank you very much in advance. >>>>> >>>>> Kind regards, >>>>> /Francisco >>>>> >>>>> _____________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Kitware offers ITK Training Courses, for more information visit: >>>>> http://www.kitware.com/products/protraining.php >>>>> >>>>> Please keep messages on-topic and check the ITK FAQ at: >>>>> http://www.itk.org/Wiki/ITK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/insight-users >>>>> >>>>> >>>> >>> >>> _____________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Kitware offers ITK Training Courses, for more information visit: >>> http://www.kitware.com/products/protraining.php >>> >>> Please keep messages on-topic and check the ITK FAQ at: >>> http://www.itk.org/Wiki/ITK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/insight-users >>> >>> >> > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ds_prakash at rediffmail.com Thu Feb 19 23:11:36 2015 From: ds_prakash at rediffmail.com (Surya Prakash) Date: 20 Feb 2015 04:11:36 -0000 Subject: [ITK-users] =?utf-8?q?output_of_connected_threshold?= Message-ID: <20150220041136.8277.qmail@f4mail-235-214.rediffmail.com> Hello, I am making an interactive region growing application using connectedThreshold. Seed point etc I want to collect interactively. After collecting the inputs, I will execute something like this. smoothing->SetInput( reader->GetOutput() ); connectedThreshold->SetInput( smoothing->GetOutput() ); I want to access the output by calling connectedThreshold->GetOutput() How I can access the output (In memory), so that I can render it on the original image. I am making MFC application. Thanks & regards Prakash -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Fri Feb 20 02:03:26 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 20 Feb 2015 02:03:26 -0500 Subject: [ITK-users] Problem compiling HelloWorld.cxx with ITK 4.7.1 In-Reply-To: <74975975.Iyg6Sylb1S@hinata> References: <74975975.Iyg6Sylb1S@hinata> Message-ID: Hi Alfonso, Welcome to ITK! You have uncovered a bug in the SmoothingRecursiveYvvGaussianFilter module. I have created a patch [1], but until the patch is integrated, please try using ITK without that module. Thanks, Matt [1] https://github.com/thewtex/SmoothingRecursiveYvvGaussianFilter/commit/785139ccedac9ee513be84b79a674775fc38f442 On Thu, Feb 19, 2015 at 12:44 PM, Alfonso Castro wrote: > Hi. > > > > I downladed and install ITK 4.7.1 version on OpenSuSE 13.2 x86-64. I > activated the different modules and the use of CUDA with shared libs off. > > > > The compile was without problem and I installed in directory: /opt/mia/itk. > I fixed ITK_DIR=/opt/mia/itk/lib/cmake/ITK-4.7. > > > > Then I created a HelloWord project to check all work correctly using the > CMakelist.txt included in Software Guide. > > However, when I run make, the system shows the next error: > > > > /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: > no se puede encontrar -lSmoothingRecursiveYvvGaussianFilter > > collect2: error: ld returned 1 exit status > > CMakeFiles/hola.dir/build.make:337: recipe for target 'hola' failed > > make[2]: *** [hola] Error 1 > > CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/hola.dir/all' failed > > make[1]: *** [CMakeFiles/hola.dir/all] Error 2 > > Makefile:76: recipe for target 'all' failed > > make: *** [all] Error 2 > > > > I tried to find the reason of the error but I am not able. > > > > What is the reason of the error? How I can resolve it? > > > > Thanks in advance. > > Alfonso Castro Mart?nez > > Facullty of Computer Science > > University of A Coruna > > Spain > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > From matt.mccormick at kitware.com Fri Feb 20 02:08:12 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Fri, 20 Feb 2015 02:08:12 -0500 Subject: [ITK-users] output of connected threshold In-Reply-To: <20150220041136.8277.qmail@f4mail-235-214.rediffmail.com> References: <20150220041136.8277.qmail@f4mail-235-214.rediffmail.com> Message-ID: Hi Prakash, The GetBufferPointer() [1] on an itk::Image's ImportImageContainer has a pointer to the pixel data. HTH, Matt http://www.itk.org/Doxygen/html/classitk_1_1ImportImageContainer.html#afc6357f6772ca6c3c4410e7a6c4a3285 On Thu, Feb 19, 2015 at 11:11 PM, Surya Prakash wrote: > Hello, > I am making an interactive region growing application using > connectedThreshold. Seed point etc I want to collect interactively. After > collecting the inputs, I will execute something like this. > > smoothing->SetInput( reader->GetOutput() ); > connectedThreshold->SetInput( smoothing->GetOutput() ); > > I want to access the output by calling connectedThreshold->GetOutput() > > How I can access the output (In memory), so that I can render it on the > original image. I am making MFC application. > > Thanks & regards > Prakash > > > > Get your own *FREE* website, *FREE* domain & *FREE* mobile app with > Company email. > *Know More >* > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 alfonso.castro at udc.es Fri Feb 20 03:58:39 2015 From: alfonso.castro at udc.es (Alfonso Castro =?utf-8?Q?Mart=C3=ADnez?=) Date: Fri, 20 Feb 2015 09:58:39 +0100 (CET) Subject: [ITK-users] Problem compiling HelloWorld.cxx with ITK 4.7.1 In-Reply-To: References: <74975975.Iyg6Sylb1S@hinata> Message-ID: <1653838465.32219028.1424422719339.JavaMail.zimbra@udc.es> Many thanks. Alfonso Castro Mart?nez Facullty of Computer Science University of A Coruna Spain ----- Mensaje original ----- De: "Matt McCormick" Para: "Alfonso Castro" CC: insight-users at itk.org Enviados: Viernes, 20 de Febrero 2015 8:03:26 Asunto: Re: [ITK-users] Problem compiling HelloWorld.cxx with ITK 4.7.1 Hi Alfonso, Welcome to ITK! You have uncovered a bug in the SmoothingRecursiveYvvGaussianFilter module. I have created a patch [1], but until the patch is integrated, please try using ITK without that module. Thanks, Matt [1] https://github.com/thewtex/SmoothingRecursiveYvvGaussianFilter/commit/785139ccedac9ee513be84b79a674775fc38f442 On Thu, Feb 19, 2015 at 12:44 PM, Alfonso Castro wrote: > Hi. > > > > I downladed and install ITK 4.7.1 version on OpenSuSE 13.2 x86-64. I > activated the different modules and the use of CUDA with shared libs off. > > > > The compile was without problem and I installed in directory: /opt/mia/itk. > I fixed ITK_DIR=/opt/mia/itk/lib/cmake/ITK-4.7. > > > > Then I created a HelloWord project to check all work correctly using the > CMakelist.txt included in Software Guide. > > However, when I run make, the system shows the next error: > > > > /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: > no se puede encontrar -lSmoothingRecursiveYvvGaussianFilter > > collect2: error: ld returned 1 exit status > > CMakeFiles/hola.dir/build.make:337: recipe for target 'hola' failed > > make[2]: *** [hola] Error 1 > > CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/hola.dir/all' failed > > make[1]: *** [CMakeFiles/hola.dir/all] Error 2 > > Makefile:76: recipe for target 'all' failed > > make: *** [all] Error 2 > > > > I tried to find the reason of the error but I am not able. > > > > What is the reason of the error? How I can resolve it? > > > > Thanks in advance. > > Alfonso Castro Mart?nez > > Facullty of Computer Science > > University of A Coruna > > Spain > > > > > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 stephen.aylward at kitware.com Sat Feb 21 11:56:57 2015 From: stephen.aylward at kitware.com (Stephen Aylward) Date: Sat, 21 Feb 2015 11:56:57 -0500 Subject: [ITK-users] Let the NLM know that ITK is important to you and your research Message-ID: The NLM is requesting input on the value and future needs of its programs, including the Insight Toolkit (ITK). Please use the link below to share your thoughts and experiences with ITK. Let the NLM know that impact that ITK is having! Some thoughts on ITK: ITK was originated at the NLM in 1999, and now ITK is used in thousands of academic and commercial applications. It has become the foundation for the exchange of algorithms and ideas in medical image analysis. It has accelerated the pace of research by reducing duplication and enabling new research to build upon and to be compared with the state of the art. It has propelled academic research into commercial reality and patient care through its open-source licensing and high software standards. It has served as an educational tool for thousands of students in engineering and science. The continued support and expansion of ITK should be given top priority at the NLM. For more information on the NLM's request-for-information regarding the impact and future of its projects and programs, go to http://grants.nih.gov/grants/guide/notice-files/NOT-OD-15-067.html To submit a response using the NLM's online form, go to http://grants.nih.gov/grants/rfi/rfi.cfm?ID=41 Deadline for comments is March 13, 2015. -- ==================================================== Stephen R. Aylward, Ph.D. Senior Director of Operations, North Carolina, Kitware, Inc. http://www.kitware.com and http://www.aylward.org (919) 969-6990 x300 ==================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.noebauer at imp.ac.at Mon Feb 23 13:00:27 2015 From: tobias.noebauer at imp.ac.at (=?iso-8859-1?Q?N=F6bauer=2CTobias?=) Date: Mon, 23 Feb 2015 18:00:27 +0000 Subject: [ITK-users] Registration: Fix transform parameter? Message-ID: Hi all, is there a simple/generic way to exclude a transform parameter from getting optimized during a registration process, i.e. just hold it at its initial value? I would for example like to allow for rotations around x, but not y, in a VersorRigid3DTransform, because I know the latter can't happen. Would it make sense to set the corresponding optimizer scale value to an extremely high value? -- This would not really disable this DOF, but just make larg values unlikely, correct? I'm using the current alpha version of SimpleITK 0.9 (Python wrapped), so it would be even greater if a solution existed within SimpleITK... Thanks a lot (also, for the great software), Tobias From matt.mccormick at kitware.com Mon Feb 23 13:24:39 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Mon, 23 Feb 2015 13:24:39 -0500 Subject: [ITK-users] Registration: Fix transform parameter? In-Reply-To: References: Message-ID: Hi Tobias, Welcome to ITK! Yes, SetWeights can be used to fix a parameter. See the class documentation here [1]. HTH, Matt [1] http://www.itk.org/Doxygen/html/classitk_1_1ObjectToObjectOptimizerBaseTemplate.html On Mon, Feb 23, 2015 at 1:00 PM, N?bauer,Tobias wrote: > Hi all, > > is there a simple/generic way to exclude a transform parameter from getting optimized during a registration process, i.e. just hold it at its initial value? I would for example like to allow for rotations around x, but not y, in a VersorRigid3DTransform, because I know the latter can't happen. Would it make sense to set the corresponding optimizer scale value to an extremely high value? -- This would not really disable this DOF, but just make larg values unlikely, correct? > > I'm using the current alpha version of SimpleITK 0.9 (Python wrapped), so it would be even greater if a solution existed within SimpleITK... > > Thanks a lot (also, for the great software), > Tobias > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users From blowekamp at mail.nih.gov Mon Feb 23 13:17:32 2015 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Mon, 23 Feb 2015 13:17:32 -0500 Subject: [ITK-users] Registration: Fix transform parameter? In-Reply-To: References: Message-ID: <699396B2-4831-40AF-A77E-F8688C218791@mail.nih.gov> Hello Tobias, You are correct that it is generally recommended to explicitly set the optimizer scale to an extremely high value to disable the optimization in that space. However, please keep in mind that the VersorRigid3DTransform parameters are not X,Y,Z rotations they are the components of a versor. You can look into the Euler3DTransform which is paramerterized with the angles. The alternative to this would be to write your own transform class. Brad On Feb 23, 2015, at 1:00 PM, N?bauer,Tobias wrote: > Hi all, > > is there a simple/generic way to exclude a transform parameter from getting optimized during a registration process, i.e. just hold it at its initial value? I would for example like to allow for rotations around x, but not y, in a VersorRigid3DTransform, because I know the latter can't happen. Would it make sense to set the corresponding optimizer scale value to an extremely high value? -- This would not really disable this DOF, but just make larg values unlikely, correct? > > I'm using the current alpha version of SimpleITK 0.9 (Python wrapped), so it would be even greater if a solution existed within SimpleITK... > > Thanks a lot (also, for the great software), > Tobias > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the 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 samah.bouzidi at gmail.com Tue Feb 24 16:56:21 2015 From: samah.bouzidi at gmail.com (Sunshine) Date: Tue, 24 Feb 2015 14:56:21 -0700 (MST) Subject: [ITK-users] region growing with adaptative Threshold Message-ID: <1424814981495-35272.post@n7.nabble.com> HI, I'm trying to segment the airways from 3D Ct image using this algorithm 1- determine the seed point and the intial threshold 2- calculte the average intensity of voxels already classified to the region (A) 3- if the intensity of the voxel and all closest (connected) neighbours = (+/-) 0,05 A(step 2). voxel is classified to the region. As explained, the threshold depends on the processed data, is their any example in which the threshold is not defined as a constante like in the region growing examples? Best regards SAmah -- View this message in context: http://itk-users.7.n7.nabble.com/region-growing-with-adaptative-Threshold-tp35272.html Sent from the ITK - Users mailing list archive at Nabble.com. From matimontg at gmail.com Wed Feb 25 06:29:08 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 25 Feb 2015 08:29:08 -0300 Subject: [ITK-users] [vtkusers] vtkDICOMImageReader does not support to read all Dicom image format In-Reply-To: References: Message-ID: Oh you are right. I uncompress the images before passing to VTK. It would be nice to add this feature in future releases of VTK. Matias. On Feb 25, 2015 1:44 AM, "Ravi HM" wrote: > Hi Matias, > > > > vtkDicomImageReader supports to read only uncompressed Dicom image. > > > > When any Dicom image is compressed (Compressed in any format) > vtkDicomImageReader doesn?t support. > > > > Regards, > > Ravi > > > > *From:* Matias Montroull [mailto:matimontg at gmail.com] > *Sent:* Tuesday, February 24, 2015 7:54 PM > *To:* Ravi HM > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] vtkDICOMImageReader does not support to read > all Dicom image format > > > > Hi Ravi, which DICOM formats / Pixel Type does not support? > > > > On Tue, Feb 24, 2015 at 2:29 AM, Ravi HM > wrote: > > Hi All, > > > > Why vtkDICOMImageReader does not support to read all Dicom image format. > > > > Regards, > > Ravi > > > > *L&T Technology Services Ltd* > > www.LntTechservices.com > > This Email may contain confidential or privileged information for the > intended recipient (s). If you are not the intended recipient, please do > not use or disseminate the information, notify the sender and delete it > from your system. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > *L&T Technology Services Ltd* > > www.LntTechservices.com > > This Email may contain confidential or privileged information for the > intended recipient (s). If you are not the intended recipient, please do > not use or disseminate the information, notify the sender and delete it > from your system. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Feb 25 08:46:56 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 25 Feb 2015 08:46:56 -0500 Subject: [ITK-users] region growing with adaptative Threshold In-Reply-To: <1424814981495-35272.post@n7.nabble.com> References: <1424814981495-35272.post@n7.nabble.com> Message-ID: Take a look at the ConfidenceConnectedImageFilter http://itk.org/Wiki/ITK/Examples/ImageSegmentation/ConfidenceConnectedImageFilter On Tue, Feb 24, 2015 at 4:56 PM, Sunshine wrote: > HI, > > I'm trying to segment the airways from 3D Ct image using this algorithm > 1- determine the seed point and the intial threshold > 2- calculte the average intensity of voxels already classified to the > region (A) > 3- if the intensity of the voxel and all closest (connected) neighbours > = (+/-) 0,05 A(step 2). voxel is classified to the region. > > As explained, the threshold depends on the processed data, is their any > example in which the threshold is not defined as a constante like in the > region growing examples? > > Best regards > SAmah > > > > > > -- > View this message in context: http://itk-users.7.n7.nabble.com/region-growing-with-adaptative-Threshold-tp35272.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 -- Unpaid intern in BillsBasement at noware dot com From matimontg at gmail.com Thu Feb 26 06:08:47 2015 From: matimontg at gmail.com (Matias Montroull) Date: Thu, 26 Feb 2015 08:08:47 -0300 Subject: [ITK-users] [vtkusers] vtkDICOMImageReader does not support to read all Dicom image format In-Reply-To: References: Message-ID: Hi Ravi, yes itbis called SimpleITK.. On Feb 26, 2015 3:04 AM, "Ravi HM" wrote: > > > Hi Matias, > > > > Do I get *ITK* package like *VTK (Kitware.Activiz.NET > )* package for visual studio C# application > > > > Regards, > > Ravi > > > > *From:* Matias Montroull [mailto:matimontg at gmail.com] > *Sent:* Wednesday, February 25, 2015 6:01 PM > *To:* Ravi HM; vtkusers at vtk.org > *Subject:* Re: [vtkusers] vtkDICOMImageReader does not support to read > all Dicom image format > > > > You can use command line tool to dump this type of information, eg > gdcminfo: > > $ gdcminfo 012345.002.050.dcm > > MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage] > > TransferSyntax is 1.2.840.10008.1.2.4.70 [JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression] > > ... > > Pay attention that for the case of JPEG 2000 and JPEG-LS the transfer > syntax itself is not sufficient to indicate whether or not the Pixel Data > stream has been lossy or lossless compressed. This could be important for > your organisation as lossy compression could impact professional > interpretation. > > Ref: http://gdcm.sourceforge.net/html/gdcminfo.html > > > > On Wed, Feb 25, 2015 at 8:59 AM, Ravi HM > wrote: > > Hi Matias, > > > > Thank you for your kind support. > > > > Regards, > > Ravi > > > > *From:* Matias Montroull [mailto:matimontg at gmail.com] > *Sent:* Wednesday, February 25, 2015 5:21 PM > *To:* Ravi HM > *Cc:* vtkusers at vtk.org > > *Subject:* RE: [vtkusers] vtkDICOMImageReader does not support to read > all Dicom image format > > > > There is a way to identify compressed images yes I will have to look. I > use Fo-Dicom not gdcm but I know there are methods to determine when an > image is compressed. > > On Feb 25, 2015 8:46 AM, "Ravi HM" wrote: > > Hi Matias, > > > > Yep, it would be nice if this feature is added. > > > > Is there any Dicom TAG to identify uncompressed Dicom image using GDCM or > RZDCX > > > > Regards, > > Ravi > > > > *From:* Matias Montroull [mailto:matimontg at gmail.com] > *Sent:* Wednesday, February 25, 2015 4:59 PM > *To:* Ravi HM > *Cc:* insight-users at itk.org Users > *Subject:* RE: [vtkusers] vtkDICOMImageReader does not support to read > all Dicom image format > > > > Oh you are right. > I uncompress the images before passing to VTK. > It would be nice to add this feature in future releases of VTK. > Matias. > > On Feb 25, 2015 1:44 AM, "Ravi HM" wrote: > > Hi Matias, > > > > vtkDicomImageReader supports to read only uncompressed Dicom image. > > > > When any Dicom image is compressed (Compressed in any format) > vtkDicomImageReader doesn?t support. > > > > Regards, > > Ravi > > > > *From:* Matias Montroull [mailto:matimontg at gmail.com] > *Sent:* Tuesday, February 24, 2015 7:54 PM > *To:* Ravi HM > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] vtkDICOMImageReader does not support to read > all Dicom image format > > > > Hi Ravi, which DICOM formats / Pixel Type does not support? > > > > On Tue, Feb 24, 2015 at 2:29 AM, Ravi HM > wrote: > > Hi All, > > > > Why vtkDICOMImageReader does not support to read all Dicom image format. > > > > Regards, > > Ravi > > > > *L&T Technology Services Ltd* > > www.LntTechservices.com > > This Email may contain confidential or privileged information for the > intended recipient (s). If you are not the intended recipient, please do > not use or disseminate the information, notify the sender and delete it > from your system. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > *L&T Technology Services Ltd* > > www.LntTechservices.com > > This Email may contain confidential or privileged information for the > intended recipient (s). If you are not the intended recipient, please do > not use or disseminate the information, notify the sender and delete it > from your system. > > *L&T Technology Services Ltd* > > www.LntTechservices.com > > This Email may contain confidential or privileged information for the > intended recipient (s). If you are not the intended recipient, please do > not use or disseminate the information, notify the sender and delete it > from your system. > > *L&T Technology Services Ltd* > > www.LntTechservices.com > > This Email may contain confidential or privileged information for the > intended recipient (s). If you are not the intended recipient, please do > not use or disseminate the information, notify the sender and delete it > from your system. > > > > *L&T Technology Services Ltd* > > www.LntTechservices.com > > This Email may contain confidential or privileged information for the > intended recipient (s). If you are not the intended recipient, please do > not use or disseminate the information, notify the sender and delete it > from your system. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.bloomfield at camhpet.ca Thu Feb 26 09:59:54 2015 From: peter.bloomfield at camhpet.ca (PmB) Date: Thu, 26 Feb 2015 09:59:54 -0500 Subject: [ITK-users] Itk, python and pyinstaller Message-ID: <54EF34EA.5070305@camhpet.ca> Hi, I have tried this to the pyinstaller list, and it was suggested I tried here. I am working on a linux box using ITK V4.7.1 within a python script, which executes without error. However, when I build an executable with pyinstaller, on execution I get the following error Information Filename : junk.img Traceback (most recent call last): File "Segment_Image.py", line 97, in image_type = itk.Image[itk.F, 3] NameError: name 'itk' is not defined I tried python pyinstaller.py --hidden-import=itk Segment_Image.py but during the build I get the message 52820 INFO: Hidden import 'itk' has been found otherwise Can anyone point me in the direction to resolve this. Thanks Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From ds_prakash at rediffmail.com Thu Feb 19 04:47:54 2015 From: ds_prakash at rediffmail.com (Surya Prakash) Date: 19 Feb 2015 09:47:54 -0000 Subject: [ITK-users] =?utf-8?q?output_of_connected_threshold?= Message-ID: <20150219094754.15737.qmail@f4mail-235-189.rediffmail.com> Hello, I am making an interactive region growing application using connectedThreshold. Seed point etc I want to collect interactively. After collecting the inputs, I will execute something like this. smoothing->SetInput( reader->GetOutput() ); connectedThreshold->SetInput( smoothing->GetOutput() ); I want to access the output by calling connectedThreshold->GetOutput() How I can access the output (In memory), so that I can render it on the original image. I am making MFC application. Thanks & regards Prakash -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Thu Feb 26 16:26:39 2015 From: michkapopoff at gmail.com (michkapopoff at gmail.com) Date: Thu, 26 Feb 2015 22:26:39 +0100 Subject: [ITK-users] Itk, python and pyinstaller In-Reply-To: <54EF34EA.5070305@camhpet.ca> References: <54EF34EA.5070305@camhpet.ca> Message-ID: Hi I tried to use pyinstaller 1 or 2 years ago to install ITK with one of my apps, but it never worked. Pyinstaller has a hook system to add dependencies, so you can update the itk hook to make it work. Still, I did not find enough documentation or examples to make it work and did not invest more time to read pyinstaller?s source code. It?s maybe complicated because it implies moving libs and stuff around ? But it would be very nice if it worked. Maybe somebody here could give a try. Michka > On 26 Feb 2015, at 15:59, PmB wrote: > > Hi, > > I have tried this to the pyinstaller list, and it was suggested I tried here. > > I am working on a linux box using ITK V4.7.1 within a python script, which executes without error. > However, when I build an executable with pyinstaller, on execution I get the following error > > Information > Filename : junk.img > Traceback (most recent call last): > File "Segment_Image.py", line 97, in > image_type = itk.Image[itk.F, 3] > NameError: name 'itk' is not defined > > I tried > python pyinstaller.py --hidden-import=itk Segment_Image.py > but during the build I get the message > 52820 INFO: Hidden import 'itk' has been found otherwise > > Can anyone point me in the direction to resolve this. > > Thanks > > Peter > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users -------------- next part -------------- An HTML attachment was scrubbed... URL: