[Insight-users] Still having problems with Refactoring Statistic classes !!

Ricardo Ferrari rjf.araraquara at gmail.com
Tue Jan 5 11:52:52 EST 2010


Hi itk-users,

Previously (Digest Vol 68, Issue 109), I reported a problem I was having
with the itk::Statistics::CovarianceSampleFilter. Although, I have not got
any feedback on that issue and I could not figure it out by myself, I have
overcome the problem by writing my own function to compute the covariance
matrix.

Now, I have faced another issue when using the
itk::Statistics::GaussianMixtureModelComponent  and the
itk::Statistics::ExpectationMaximizationMixtureModelEstimator

Attached I am sending a minimal code to illustrate the problem. For testing
the code, I have downloaded two minc images (t1 and a t2 contrasts) from the
brainweb projects and converted them to dicom.

The program call and the result are presented bellow

ferrari at ferrari-workstation:~/Desktop/Test$ bin/test
t1_icbm_normal_1mm_pn3_rf20.dcm t2_icbm_normal_1mm_pn3_rf20.dcm
1
1a
1b
Segmentation fault
ferrari at ferrari-workstation:~/Desktop/Test$


Again, I really appreciate any help on clarifying these issues.  Am I using
the itk::Statistics::ImageToListSampleAdaptor class appropriately ?


Thank you very much,
Ricardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100105/206f0d23/attachment-0001.htm>
-------------- next part --------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.7)

SET( ProgramName "test" )

PROJECT( ${ProgramName} )

FIND_PACKAGE (ITK REQUIRED)
IF (ITK_FOUND)
       INCLUDE( ${USE_ITK_FILE} )
       SET(ITK_LIBRARIES ITKCommon ITKBasicFilters ITKIO ITKMetaIO ITKNumerics ITKStatistics itkvnl)
ENDIF(ITK_FOUND)

FIND_PACKAGE (VTK REQUIRED)
IF (VTK_FOUND)
       INCLUDE( ${USE_VTK_FILE} )
       SET(VTK_LIBRARIES vtkRendering vtkGraphics vtkWidgets vtkHybrid vtkImaging vtkIO vtkFiltering vtkCommon)
ENDIF( VTK_FOUND)

INCLUDE_DIRECTORIES(
       ${CMAKE_CURRENT_SOURCE_DIR}
)

SET( SRCS
)

ADD_EXECUTABLE( ${ProgramName}
	main.cpp
	${SRCS}
)

TARGET_LINK_LIBRARIES( ${ProgramName}
	${VTK_LIBRARIES}
	${ITK_LIBRARIES}
)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 3539 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100105/206f0d23/attachment-0001.cpp>


More information about the Insight-users mailing list