Luis Ibanez | 1 Apr 2009 01:42
Favicon
Gravatar

Re: ITK and netlab

Hi Kaveh,

Your first two questions will be better addressed if you post them to
the VXL users list.

(it is a kind way to say that : we don't really know....)    :-)

--

In the context of ITK, we use VXL mainly for providing the following
functionalities

    A) Linear algebra solutions
    B) Optimization

most of the methods for (A) and (B) will be provided by vnl throught
the vnl_matrix
and vnl_vector classes. You will find the most used method under the directory

                                Insight/Utilities/vxl/core/vnl/algo

Some of these algorithms are implemented in VXL by making calls to functions
provided by blas, while others are provided by lapack.

When we make use of vxl, we rarely expose the internal implementations of the
methods. That is, we never call  the blas or lapack routines directly.
Instead we
do this through the C++ API defined by VXL.

What specific functionalities do you have in mind ?
(Continue reading)

Luis Ibanez | 1 Apr 2009 01:51
Favicon
Gravatar

Re: histogram of an image

Hi Raquel,

ITK doesn't provide visualization tools at all.

What you can do is to generate the histogram values
using ITK classes, then write the histogram values out
into a file, and then plot them by using standard software
such as:

* Open Office Spreadshet
* GNUPlot
* Excel

For examples on how to generate a Histogram,
please look at:

/Insight/Examples/Statistics
ImageHistogram1.cxx
ImageHistogram2.cxx
ImageHistogram3.cxx
ImageHistogram4.cxx

---

If you are generating a joint histogram, then
you may want to use the HistogramToImage filter,
and then visualize the image that contains the
histogram.

Note also that some of the applications in
(Continue reading)

Luis Ibanez | 1 Apr 2009 01:58
Favicon
Gravatar

Re: Problems with the InverseDeformationFieldImageFilter

Hi Marta,

It looks like you omitted to define many of the parameters of the filter.

For an example of how to use this filter, please look at:

                 Insight/Testing/Code/BasicFilters/
                    itkInverseDeformationFieldImageFilterTest.cxx

In particular, you are missing lines like:

  filter->SetOutputSpacing( spacing );
  filter->SetOutputOrigin( origin );
  filter->SetSize( size );
  filter->SetSubsamplingFactor( 16 );

In practice, these parameters define the grid of the image
representing the inverse deformation field.   It is a problem
similar to what the ResampleImageFilter must do in order
to fully define its output.

   Regards,

         Luis

------------------------------------------------
On Fri, Mar 27, 2009 at 12:34 PM, Marta Schmidt <t_s_80@...> wrote:
> Hello,
>
> I have some trouble using the itkInverseDeformationFieldImageFilter. I'm
(Continue reading)

Luis Ibanez | 1 Apr 2009 02:10
Favicon
Gravatar

Re: Read DICOM series and write DICOM series

Hi Raffaele,

                                  Congratulations !

You just found a bug in ITK.   :-)

Please add a bug report to the MANTIS bug tracker:

            http://public.kitware.com/Bug/my_view_page.php

We will take care of the bug....

In the meantime,
you can avoid the problem by editing the file

         Insight/Code/Common/itkImageBase.txx

and in the lines:  188-191:

  if (vnl_determinant(this->m_Direction.GetVnlMatrix()) == 0.0)
    {
    itkExceptionMacro(<< "Bad direction, determinant is 0. Direction
is " << this->m_Direction);
    }

Comment out the line with the itkExceptionMacro.

Then recompile...
(it will take a while, since this class is used almost everywhere).

(Continue reading)

Luis Ibanez | 1 Apr 2009 02:14
Favicon
Gravatar

Re: possible bug in imageserieswriter

Hi Karl,

Thanks a lot for pointing this out.

This is indeed a bug in ITK.

Please look at the message that we just send to Raffaele:
http://www.itk.org/pipermail/insight-users/2009-March/029767.html

This is the same bug, so you two may want to coordinate logging
a bug entry in MANTIS.

Also, please follow in the meantime the same work around,
that is suggested in that email.

    Let us know if you still find any problems with it.

         Thanks

             Luis

----------------------------------------------------------------------------------------------
On Tue, Mar 31, 2009 at 11:37 AM, Karl <bulkmailaddress@...> wrote:
> Hi,
>
> I would like to report a likely bug.  I don’t regularly use ITK and follow
> its development, so if the bug has already been reported or fixed, I
> apologize.
>
>
(Continue reading)

Kaveh Kohan | 1 Apr 2009 02:23
Picon
Favicon

Re: ITK and netlab

Hi Luis,

Thank you for the answer.

I am looking for linear algebra functionally because part of my algorithm has massive iterative matrix-matrix product and I am looking for an efficient way of performing matrix-matrix product.

I did not find VNL sparse matrix strong enough thus I ended up using gmm++. I thought (also they mentioned in their website) that gmm++ is an interface to blas/lapck/atlas but unfortunately I see a huge gap between effciency of matrix-matrix prodcut between MATLAB and gmm (for matrix size I have: 17sec  vs. 0.5sec). Hence, I am tryig to close the gap by using various libraries in cluding vnl (only for dense matrix-matrix operation). I do not expect to be as fast as MATLAB but I feel that I am doing something wrong since the gap is too big.

Any help or idea is highly appreciated.

Regards,
Kaveh

From: Luis Ibanez <luis.ibanez-5opLkZggLXlBDgjK7y7TUQ@public.gmane.org>
To: Kaveh Kohan <kaveh.kohan-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
Cc: insight-users-RyaoCGfWeh4@public.gmane.org
Sent: Tuesday, March 31, 2009 7:42:58 PM
Subject: Re: [Insight-users] ITK and netlab

Hi Kaveh,


Your first two questions will be better addressed if you post them to
the VXL users list.

(it is a kind way to say that : we don't really know....)    :-)

--

In the context of ITK, we use VXL mainly for providing the following
functionalities

    A) Linear algebra solutions
    B) Optimization

most of the methods for (A) and (B) will be provided by vnl throught
the vnl_matrix
and vnl_vector classes. You will find the most used method under the directory

                                Insight/Utilities/vxl/core/vnl/algo


Some of these algorithms are implemented in VXL by making calls to function s
provided by blas, while others are provided by lapack.


When we make use of vxl, we rarely expose the internal implementations of the
methods. That is, we never call  the blas or lapack routines directly.
Instead we
do this through the C++ API defined by VXL.


What specific functionalities do you have in mind ?

Are you looking for Linear Algebra ? or for Optimizations  ? or something else ?


  Please let us know,


        Thanks


--------------------------------------------------------------------------------------------------------
On Tue, Mar 31, 2009 at 10:56 AM, Kaveh Kohan <kaveh.kohan-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:
> Dear All,
>
> I have a question about using and linking ITK programs to the netlib
> libraries already available in the foll owing folder inside of the ITK
> directory tree:
>
> $ITKDIR/Utilities/vxl/v3p/netlib/blas
> $ITKDIR/Utilities/vxl/v3p/netlib/lapack
> $ITKDIR/Utilities/vxl/v3p/netlib/linpack
> $ITKDIR/Utilities/vxl/v3p/netlib/sparse
> $ITKDIR/Utilities/vxl/v3p/netlib/libf2c
> ...
>
> Here is my question and I would be thankful if you can help:
>
> 1) Does VXL by default uses blas for its operations or one needs to activate
> special flag to activate it? If yes, does anybody know how I can activate
> using blas, lapck?
>
> 2) When one calls VNL class, does it use lapack, blas or one needs to set a
> flag for it?
>
> 3) Is there any example about using blas, lack inside of itk programs?
>
> Thanks,
> Kaveh
>
>
>
> _____________________________________
> 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 ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>

_____________________________________
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 ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
Luis Ibanez | 1 Apr 2009 02:26
Favicon
Gravatar

Re: is it limitation in itkMRFImageFilter class?

Hi Baoyun,

There is an important difference between:

           A) Density functions, and
           B) Distance functions

in particular,
Typically density functions decrease in value as you move away from the origin,
(or wherever they are centered), while distance functions increase when you
move away.

You seem to be confusing the use of a GaussianDensityFunction, with the
one of a MahalanobisDistance.

That is:

      1) Gaussian    exp( - ( x / sigma )^2 )

      2) Mahalanobis distance =    sqrt(   X . E . X^t   )
           where E is the covariance matrix of the distribution
          and X is an N-dimensional array with coordinates  in this space.

You may want to take a look at:

* http://en.wikipedia.org/wiki/Normal_distribution
* http://en.wikipedia.org/wiki/Mahalanobis_distance

In multivariate statistics it will be common to express a
Gaussian density function as:

                     exp( - mahalanobisDistance ^ 2 )

BTW: If you are planning on making a serious use of
  the ITK statistics framework, you may want to look
  at the refactored version described in:

http://www.itk.org/Wiki/Proposals:Refactoring_Statistics_Framework_2007

       Regards,

             Luis

----------------------------------------
On Wed, Mar 25, 2009 at 4:01 PM, Baoyun Li <baoyun_li123@...> wrote:
> Dear Luis and All:
>
> I am woring on EM and MRF for image segmentation. I made the EM clustering
> working, and then using the segmenation result to perfrom MRF for refinment.
>
> I followed the styles in ITK example ScalarImageMarkovRandomField1.cxx  .
>
> If I use the DistancCentroid as membershim function of the classifier, I can
> get the segmetation improved after MRF filter.
>
> Since I using EM GaussianMixture model to intial segmentation, I think using
> itkGaussianDensityFunction as membership function of classifier may give
> better result.
>
> When I changed the membership function, the result is totally wrong, then I
> checked the code for itkMRFImageFilter..cxx, I figure out why.
>
> //////////////////////////////////////////////////////////////////////////////////
>
> 00625   const std::vector<double> & pixelMembershipValue =
> 00626     m_ClassifierPtr->GetPixelMembershipValue( *inputPixelVec );
> 00648   //Add the prior probability to the pixel probability
> 00649   for( index = 0; index < m_NumberOfClasses; index++ )
> 00650     {
> 00651     m_MahalanobisDistance[index] = m_NeighborInfluence[index] -
> 00652       pixelMembershipValue[index] ;
> 00653     }
> ////////////////////////////////////////////////////////////////////////////////
>
> In line 651, when calculating the MahaanoistDistance,
> m_MahalanobisDistance[index] = m_NeighborInfluence[index] -
> pixelMembershipValue[index] ;
> assuming my weight are all zeros, then class with maximum pdf will give the
> lowest Distance. As a result, the segmentation is fully wrong.
>
> My question is why the filter was designed in the way, is MRFImageFilter not
> designed to apply GassianDensityFuncion as membershipfunction.
>
> Can I still use GaussianDensityFunction in this case? Would if work if I
>  change the sign of code 651 to +?
>
> Please give me some guide.
>
> Baoyun
>
>
_____________________________________
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 ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

Luis Ibanez | 1 Apr 2009 02:31
Favicon
Gravatar

Re: Help-ERROR: VTKImageImport

Hi Firat,

The image that you are reading is "double", so you need
to use an appropriate image type for it.

As the error message is pointing out:

      "Input scalar type is double but should be float"

you should be able to fix this by replacing the current;

       typedef itk::Image< float, 2 > InputImageType;

with

       typedef itk::Image< double, 2 > InputImageType;

   Regards,

          Luis

----------------------------------------------------------------------------------
On Wed, Mar 25, 2009 at 8:54 AM,  <firat.sarialtun@...> wrote:
>
>
> Hi. I am a new user and I have been trying to implement
> GeodesicActiveContourLevelSetImageFilter in
> ITK for the purpose of Liver Segmentation. I modified the code in order to take
> a VTK image as input, convert it into ITK image, process it with the filter,
> then reconvert the segmented image into VTK image again. But i have faced with
> the problem below. by the way I use the type float for all input variables.
>
>
> [frat <at> orion build]$ ./liver
> /home/frat/Desktop/liverdata/liverDicom/GE-ser002img?00150?.dcm 1 56
> /home/frat/Desktop/outtt.jpg 650 300 5.0 1.0 -0.5 3.0 2.0 250 500
>
> terminate called after throwing an instance of 'itk::ExceptionObject'
>  what():  /usr/local/ITK/ITK/Code/BasicFilters/itkVTKImageImport.txx:251:
> itk::ERROR: VTKImageImport(0xa4206f0): Input scalar type is double but should be
> float
> Aborted
>
>
> my Code is :
>
>
>
_____________________________________
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 ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

x0_y0_0 | 1 Apr 2009 03:39
Favicon

VoronoiPartioningImageFilterTest



Hi,users,
 
     I used the example --itkVoronoiPartioningImageFilterTest.cxx ,and I can get the result like VoronoiPartioningImageFilterTest1.1.png.How can i change the color to white like VoronoiPartioningImageFilterTest1.4.png?  Thanks first.
 
regards,
 
                                                                              mexiao


网易邮箱,中国第一大电子邮件服务商
_____________________________________
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 ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
x0_y0_0 | 1 Apr 2009 04:16
Favicon

Re: VoronoiPartioningImageFilterTest

I get the result using BinaryThresholdImageFilter.cxx.


在2009-04-01 09:39:36,x0_y0_0 <x0_y0_0-KN7UnAbNpbg@public.gmane.org> 写道:


Hi,users,
 
     I used the example --itkVoronoiPartioningImageFilterTest.cxx ,and I can get the result like VoronoiPartioningImageFilterTest1.1.png.How can i change the color to white like VoronoiPartioningImageFilterTest1.4.png?  Thanks first.
 
regards,
 
                                                                              mexiao


网易邮箱,中国第一大电子邮件服务商


网易邮箱,中国第一大电子邮件服务商
_____________________________________
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 ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users

Gmane