[vtkusers] Fwd: copy vtk image
John Drescher
drescherjm at gmail.com
Sat Sep 22 13:34:10 EDT 2012
---------- Forwarded message ----------
From: shirani kannangara <mangalika673 at gmail.com>
Date: Sat, Sep 22, 2012 at 1:32 PM
Subject: Re: [vtkusers] copy vtk image
To: drescherjm at gmail.com
Hi
Thanks a lot for your help.I have read visible human data
set(VHPabdoen.mhd) using itk and saved(wrote) .vtk format.I could be
able to open rgb image using ITKsnap.Now I want to copy the image.Can
You pl help me to copy that.I tried with deep copy but failed.
regards
Shirani
On Sat, Sep 22, 2012 at 9:31 PM, John Drescher <drescherjm at gmail.com> wrote:
>
> > Thanks for your reply.First of all I would like to explain my problem.I have
> > written .mhd rgb file in .vtk format using itk. I'm now able to open rgb
> > image.Now I want get a copy of it.I used deep copy. My codes are as follows.
> >
> > #include <vtkPolyData.h>
> > #include <vtkSmartPointer.h>
> > int main(unsigned int argc, char *argv[])
> > {
> >
> > vtkSmartPointer<vtkPolyData> polyData = vtkSmartPointer<vtkPolyData>::New();
> > vtkSmartPointer<vtkPolyData> polyDataCopy =
> > vtkSmartPointer<vtkPolyData>::New();
> > polyDataCopy->DeepCopy ( "D:\\rgbabdomen\\Debug\\output.vtk" );
> >
> > return 0;
> > }
> > My program is built with zero errors.But unable to open it.Do I have to
> > include visualization par.I am very much thankful to you if you can help me.
> >
>
> Deep copy does not copy a file it copies a vtk image in memory. What
> exactly are you trying to do? To me it looks like you want to open a
> vtk file in one format and save it in a different format. There should
> be examples in the wiki that do that. Also ITK has examples that do
> that.
>
> John
--
John M. Drescher
More information about the vtkusers
mailing list