[Insight-users] itkImageToVTKImageFilter doesn't release it's data.

Michal Postrozny sandarak at wp.pl
Wed Jun 15 12:42:37 EDT 2005


Hello!

Could somebody tell me how can I release data from
itkImageToVTKImageFilter? I've tried using
ReleaseDataFlagOn method but it doesn't seem to change anything.

For example when I set a small pipeline:

  ImageFileReader -> RegionOfInterestImageFilter
  -> RescaleIntensityImageFilter -> ImageToVTKImageFilter
  -> vtkImageShiftScale

And set ReleaseDataFlagOn for all filters, after updating
vtkImageShiftScale, the data from ITK2VTK filter is not released.
(I can see that in windows task manager - memory usage increases after
calling vtkImageShiftScale->Update(), while it should remain almost
the same)

I'm enclosing example which incorporates this behaviour.


Thanks in advance

Michal Postrozny
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itkImageToVTKImageFilter.h
Type: application/octet-stream
Size: 3413 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20050615/c73be485/itkImageToVTKImageFilter.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itkImageToVTKImageFilter.txx
Type: application/octet-stream
Size: 3239 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20050615/c73be485/itkImageToVTKImageFilter-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: release.cxx
Type: application/octet-stream
Size: 2743 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20050615/c73be485/release.obj
-------------- next part --------------
PROJECT( ReleaseTest )


  FIND_PACKAGE(ITK)
  IF(ITK_FOUND)
    INCLUDE(${ITK_USE_FILE})
  ELSE(ITK_FOUND)
    MESSAGE(FATAL_ERROR
            "Cannot build InsightApplications without ITK.  Please set ITK_DIR.")
  ENDIF(ITK_FOUND)


  FIND_PACKAGE(VTK)
  IF (VTK_FOUND)
      INCLUDE (${VTK_USE_FILE})
  ENDIF (VTK_FOUND)

ADD_EXECUTABLE(release release.cxx)

TARGET_LINK_LIBRARIES(release 
	ITKAlgorithms ITKBasicFilters ITKCommon ITKIO ITKNumerics ITKIO 
              vtkRendering
	)

# vtkGraphics vtkHybrid vtkImaging  vtkFiltering vtkRendering vtkIO vtkCommon


More information about the Insight-users mailing list