Christopher Wyatt | 1 Feb 13:39 2012
Picon

Re: SimpleITK and Python

Brad,

I tried again using the latest git repo (instead of the Sourceforge 0.3.0 release)
and added the --recursive to get the data, and all is fine now. 

Sorry for the noise.

-- chris.

On Jan 31, 2012, at 1:32 PM, Bradley Lowekamp wrote:

> Hello Chirs,
> 
> The VM for the tutorial was keep as small as possible, so the VM did not contain the testing data submodule.
This issue is addressed ing the FAQ here:
> 
> http://www.vtk.org/Wiki/ITK_Release_4/SimpleITK/FAQ#Why_are_so_many_tests_failing.3F
> 
> Unfortunately, the error you are reporting is not as simple as above. Can you please tell us about your
system: OS, python version, and compiler. Also please tell us how you have configured SimpleITK, and are
you using the super build as described here:
> 
> http://www.vtk.org/Wiki/ITK_Release_4/SimpleITK/GettingStarted#Build_It_Yourself
> 
> Brad
> 
> On Jan 31, 2012, at 9:51 AM, Christopher Wyatt wrote:
> 
>> 
>> I have been trying to build SimpleITK and use the Python bindings but have had some issues
(Continue reading)

Hui Tang | 1 Feb 14:32 2012
Picon

Levelset embedding function

Dear itk users,

 I outputed my intermediate embedding function every n iterations (I got it inside one of the levelset terms), but  I compare that with the one  that I got after evolution  (level_set->GetLabelMap()->GetPixel(idx) ), they are pretty much different.

Should itk embedding image in the last iteration be the same as the output embedding image?

Looking forward to your reply.

Best, Hui


_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.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
Arnaud Gelas | 1 Feb 14:41 2012
Picon

Re: Levelset embedding function

Hi Hui,

It's not clear to me what you actually mean by "embedding function" / "embedding image" ?
This function / image are embedded with respect to which class?
What kind of level-set representation are you using?

Thanks,
Arnaud

On 02/01/2012 08:32 AM, Hui Tang wrote:
Dear itk users,

 I outputed my intermediate embedding function every n iterations (I got it inside one of the levelset terms), but  I compare that with the one  that I got after evolution  (level_set->GetLabelMap()->GetPixel(idx) ), they are pretty much different.

Should itk embedding image in the last iteration be the same as the output embedding image?

Looking forward to your reply.

Best, Hui




_____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.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

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.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
Arnaud Gelas | 1 Feb 14:57 2012
Picon

Re: Levelset embedding function

Hui,

With all level set discrete representations (dense, sparse Whitaker, sparse Shi or sparse Malcolm), the level set function at the last iteration (after the evolution) should be the same as the output.

Did you use an observer and a command to save these images? or did you modify some piece of code?

Do you save your image at the end of one iteration (after the evolution gets done) ?
How do you evaluate the level set function?

Arnaud

On 02/01/2012 08:50 AM, Hui Tang wrote:
ha Arnaud, thank you for reply.

I am using ITK4.....embedding image is the signed distance image whose zero value shows the current surface.
I runned a program that combines several itk levelset terms.
I would like to monitor the surface evolution, so I saved the signed distance image in every n  iteration.
but I expect the last signed distance image should be the same as the final segmentation, i.e. that one that I got outside ITK classes using the code from ITK example.

Best,

HUi
On Wed, Feb 1, 2012 at 2:41 PM, Arnaud Gelas <arnaudgelas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi Hui,

It's not clear to me what you actually mean by "embedding function" / "embedding image" ?
This function / image are embedded with respect to which class?
What kind of level-set representation are you using?

Thanks,
Arnaud


On 02/01/2012 08:32 AM, Hui Tang wrote:
Dear itk users,

 I outputed my intermediate embedding function every n iterations (I got it inside one of the levelset terms), but  I compare that with the one  that I got after evolution  (level_set->GetLabelMap()->GetPixel(idx) ), they are pretty much different.

Should itk embedding image in the last iteration be the same as the output embedding image?

Looking forward to your reply.

Best, Hui




_____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.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

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.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
Arnaud Gelas | 1 Feb 16:04 2012
Picon

Re: Levelset embedding function

If you save an image in some term class, it is most likely normal you'd see a difference between the resulting level set and the one you save.
Indeed term classes are accessed before the evolution, whereas the output is the outcome of the iteration.

If your goal is to visualize or save the level set function throughout the evolution, there are existing classes for this purpose. These classes are in the Module LevelSetsv4Visualization (part of the Segmentation group).
Else, I would need some more information to help...


On 02/01/2012 09:53 AM, Hui Tang wrote:
Ha Arnaud
Thak you for your reply.

I used sparse Whitaker
I wrote a piece of code inside itkLevelsetXXTerm
I did it via       
      const LevelSetOutputRealType value =static_cast< LevelSetOutputRealType >( this->m_CurrentLevelSetPointer->Evaluate( it.GetIndex()  ) );
        //LevelSetPointer levelSet = this->m_LevelSetContainer->GetLevelSet( this->m_CurrentLevelSetId );
        const LevelSetOutputRealType d_val1 = this->m_Heaviside->Evaluate( -value );

I have an iterator "it" loop over an image "m_CurreneLevelSet" which is initialized.

I did save these images........

Best,

Hui

On Wed, Feb 1, 2012 at 2:57 PM, Arnaud Gelas <arnaudgelas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hui,

With all level set discrete representations (dense, sparse Whitaker, sparse Shi or sparse Malcolm), the level set function at the last iteration (after the evolution) should be the same as the output.

Did you use an observer and a command to save these images? or did you modify some piece of code?

Do you save your image at the end of one iteration (after the evolution gets done) ?
How do you evaluate the level set function?

Arnaud


On 02/01/2012 08:50 AM, Hui Tang wrote:
ha Arnaud, thank you for reply.

I am using ITK4.....embedding image is the signed distance image whose zero value shows the current surface.
I runned a program that combines several itk levelset terms.
I would like to monitor the surface evolution, so I saved the signed distance image in every n  iteration.
but I expect the last signed distance image should be the same as the final segmentation, i.e. that one that I got outside ITK classes using the code from ITK example.

Best,

HUi
On Wed, Feb 1, 2012 at 2:41 PM, Arnaud Gelas <arnaudgelas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi Hui,

It's not clear to me what you actually mean by "embedding function" / "embedding image" ?
This function / image are embedded with respect to which class?
What kind of level-set representation are you using?

Thanks,
Arnaud


On 02/01/2012 08:32 AM, Hui Tang wrote:
Dear itk users,

 I outputed my intermediate embedding function every n iterations (I got it inside one of the levelset terms), but  I compare that with the one  that I got after evolution  (level_set->GetLabelMap()->GetPixel(idx) ), they are pretty much different.

Should itk embedding image in the last iteration be the same as the output embedding image?

Looking forward to your reply.

Best, Hui




_____________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://www.kitware.com/products/protraining.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

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.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
Joël Schaerer | 1 Feb 19:36 2012
Picon

Bug in itkMRFImageFilter.hxx

Hello all,

The MRFImageFilter takes a smoothing parameter to set the desired 
balance between spatial smoothness and data fidelity. This parameter is 
supposed to be set using the SetSmoothingFactor() method.

Unfortunately, this parameter is not actually used in the computation. 
The reason is that it is used only in the 
SetDefaultMRFNeighborhoodWeight() method, which is private (why?) and 
called in the constructor, before the user has a chance to set the 
smoothing factor. Of course, if the user sets his own weights, the 
factor is also ignored.

I would suggest using the m_SmoothingFactor in DoNeighborhoodOperation 
instead, independently of the weights, as follows:

(line 637)
- m_NeighborInfluence[index] += m_MRFNeighborhoodWeight[i];
+ m_NeighborInfluence[index] += m_MRFNeighborhoodWeight[i] * 
m_SmoothingFactor;

and removing all the occurrences in SetDefaultMRFNeighborhoodWeight().

Joel

PS: I am aware the project has a bug tracker, but since most of my 
previous bug reports were ignored for years before "expiring", I am 
hoping posting on the mailing list will gather more attention.
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.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

Karl Diedrich | 1 Feb 19:53 2012

Convert VTK image to ITK image

Hello,

I am trying to use itk::VTKImageToImageFilter to to convert a VTK image to an ITK image.
The call vtkImageToImageFilter->Update(); never returns but there is no error message and program simply stops.

vtkImageData* vtkInput;


        typedef itk::Image<float, 3> ImageType;

        typedef itk::VTKImageToImageFilter<ImageType> VTKImageToImageType;

        typename VTKImageToImageType::Pointer vtkImageToImageFilter = VTKImageToImageType::New();
        QLOG_DEBUG() << "Prepared Filter";
        vtkImageToImageFilter->SetInput(vtkInput);
        QLOG_DEBUG() << "Set input to filter";
        vtkImageToImageFilter->Update();
        QLOG_DEBUG() << "Updated filter";
        typename ImageType::ConstPointer itkOutput = vtkImageToImageFilter->GetOutput();
        QLOG_DEBUG() << "Got output";
       



--
Karl Diedrich, Ph.D.
Principal Engineer
----------------------------------------
AZE Research and Development
1 Broadway, 14th floor
Cambridge, MA 02142
Tel: +1 (617) 475-1502
Cell: +1 (801) 350-1251
www.azeofamerica.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.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
Félix C. Morency | 1 Feb 20:34 2012
Picon

Re: Convert VTK image to ITK image

Karl,

Try double instead of float in your image type.

Also, could you tell me what version of ITK you are using?

Thanks,
-Félix

On Wed, Feb 1, 2012 at 1:53 PM, Karl Diedrich
<karl.diedrich <at> azeresearch.com> wrote:
> Hello,
>
> I am trying to use itk::VTKImageToImageFilter to to convert a VTK image to
> an ITK image.
> The call vtkImageToImageFilter->Update(); never returns but there is no
> error message and program simply stops.
>
> vtkImageData* vtkInput;
>
>
>         typedef itk::Image<float, 3> ImageType;
>
>         typedef itk::VTKImageToImageFilter<ImageType> VTKImageToImageType;
>
>         typename VTKImageToImageType::Pointer vtkImageToImageFilter =
> VTKImageToImageType::New();
>         QLOG_DEBUG() << "Prepared Filter";
>         vtkImageToImageFilter->SetInput(vtkInput);
>         QLOG_DEBUG() << "Set input to filter";
>         vtkImageToImageFilter->Update();
>         QLOG_DEBUG() << "Updated filter";
>         typename ImageType::ConstPointer itkOutput =
> vtkImageToImageFilter->GetOutput();
>         QLOG_DEBUG() << "Got output";
>
>
>
>
> --
> Karl Diedrich, Ph.D.
> Principal Engineer
> ----------------------------------------
> AZE Research and Development
> 1 Broadway, 14th floor
> Cambridge, MA 02142
> Tel: +1 (617) 475-1502
> Cell: +1 (801) 350-1251
> www.azeofamerica.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.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
>

-- 
--
Félix C. Morency, M.Sc.
Plateforme d’analyse et de visualisation d’images
Centre Hospitalier Universitaire de Sherbrooke
Centre de recherche clinique Étienne-Le Bel
Local Z5-3031 | 819.346.1110 ext 16634
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.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
Karl Diedrich | 1 Feb 21:08 2012

Re: Convert VTK image to ITK image

Hi Felix,

I am using ITK 3.20.0 and itk::VTKImageToImageFilter was from the latest Slicer 4.0 source code.

I was just able to convert a VTK image to ITK with this template function without using the  itk::VTKImageToImageFilter .

IMAGEDATATYPE = short and DIMENSIONS = 3

typename itk::Image<IMAGEDATATYPE, DIMENSIONS>::Pointer convertVtkToItk(vtkImageData* vtkInput)
    {
        typedef itk::Image<IMAGEDATATYPE, DIMENSIONS> InputImageType;
        typedef itk::VTKImageImport<InputImageType> InputImageImportType;
        vtkSmartPointer<vtkImageExport> inputImageExporter = vtkImageExport::New();
        inputImageExporter->SetInput(vtkInput);
        typename InputImageImportType::Pointer inputImageImporter = InputImageImportType::New();
        ConnectPipelines(inputImageExporter.GetPointer(), inputImageImporter);
        typename InputImageType::Pointer outputImage = const_cast<InputImageType*>(inputImageImporter->GetOutput());
        outputImage->Update();
        if(outputImage.IsNull())
        {
            QLOG_WARN() << "ITK image is invalid.";
        }
        return outputImage;
    }

Cheers,



On Wed, Feb 1, 2012 at 2:34 PM, Félix C. Morency <felix.morency-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Karl,

Try double instead of float in your image type.

Also, could you tell me what version of ITK you are using?

Thanks,
-Félix

On Wed, Feb 1, 2012 at 1:53 PM, Karl Diedrich
<karl.diedrich <at> azeresearch.com> wrote:
> Hello,
>
> I am trying to use itk::VTKImageToImageFilter to to convert a VTK image to
> an ITK image.
> The call vtkImageToImageFilter->Update(); never returns but there is no
> error message and program simply stops.
>
> vtkImageData* vtkInput;
>
>
>         typedef itk::Image<float, 3> ImageType;
>
>         typedef itk::VTKImageToImageFilter<ImageType> VTKImageToImageType;
>
>         typename VTKImageToImageType::Pointer vtkImageToImageFilter =
> VTKImageToImageType::New();
>         QLOG_DEBUG() << "Prepared Filter";
>         vtkImageToImageFilter->SetInput(vtkInput);
>         QLOG_DEBUG() << "Set input to filter";
>         vtkImageToImageFilter->Update();
>         QLOG_DEBUG() << "Updated filter";
>         typename ImageType::ConstPointer itkOutput =
> vtkImageToImageFilter->GetOutput();
>         QLOG_DEBUG() << "Got output";
>
>
>
>
> --
> Karl Diedrich, Ph.D.
> Principal Engineer
> ----------------------------------------
> AZE Research and Development
> 1 Broadway, 14th floor
> Cambridge, MA 02142
> Tel: +1 (617) 475-1502
> Cell: +1 (801) 350-1251
> www.azeofamerica.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.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
>



--
--
Félix C. Morency, M.Sc.
Plateforme d’analyse et de visualisation d’images
Centre Hospitalier Universitaire de Sherbrooke
Centre de recherche clinique Étienne-Le Bel
Local Z5-3031 | 819.346.1110 ext 16634



--
Karl Diedrich, Ph.D.
Principal Engineer
----------------------------------------
AZE Research and Development
1 Broadway, 14th floor
Cambridge, MA 02142
Tel: +1 (617) 475-1502
Cell: +1 (801) 350-1251
www.azeofamerica.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.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
Pushpitha Atapattu | 2 Feb 00:43 2012

Create dll

Hello,
 
I am trying to use DeformableRegistration15.cxx example given in InsightToolkit-3.20.1 in a IDL project. What I am trying to do is to create a .dll for source code DeformableRegistration15.cxx. I am using Visual Studio 2008. Even though there is onle one source code, there are many header files linking to this source code. Therefore, I am just wondering a easy way to import all the header files into one project and build the .dll file? Can someone please give me some instructions on how to achieve above.
 
Many Thanks,
Pushpitha
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.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