[vtkusers] Writing a file

Darshan Pai darshanpai at gmail.com
Wed Mar 28 16:23:02 EDT 2012


Bill,

Found the error . Wrong include for the Filtering folder in the project,
was still pointing to the old include source . Should have been more
careful .
It works now . Thanks for your time .

Regards
Darshan

On Wed, Mar 28, 2012 at 3:05 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> Does the file contain anything other than triangles? STLWriter only
> handles triangles.
>
> On Wed, Mar 28, 2012 at 12:03 PM, Darshan Pai <darshanpai at gmail.com>
> wrote:
> > Yes it is a Polydata .
> > Regards
> > Darshan
> >
> >
> > On Wed, Mar 28, 2012 at 2:59 PM, Bill Lorensen <bill.lorensen at gmail.com>
> > wrote:
> >>
> >> There were no changes in the .vtk file format. However, the .vtk
> >> format can contain several types of vtk data. Does your contain
> >> PolyData?
> >>
> >> On Wed, Mar 28, 2012 at 11:49 AM, Darshan Pai <darshanpai at gmail.com>
> >> wrote:
> >> > Yes it is a vtk File . I hope there were no changes to the vtk file
> >> > format ?
> >> > Because this vtk file was generated from VTK 4.4 . Since we are moving
> >> > everything to a newer version of VTK , I want to make sure older files
> >> > do
> >> > not need to be reworked on
> >> >
> >> > Regards
> >> > Darshan
> >> >
> >> >
> >> > On Wed, Mar 28, 2012 at 2:44 PM, Bill Lorensen <
> bill.lorensen at gmail.com>
> >> > wrote:
> >> >>
> >> >> In VTK6, SetInput is gone! You did the right thing by changing it to
> >> >> SetInputConnection. (BTW, SetInputConnection works in VTK5 also).
> >> >>
> >> >> Try removing your VTK build tree and rebuilding vtk. Something
> strange
> >> >> is going on, perhaps elsewhere in your code. I assume that the input
> >> >> file is a vtk polydata file?
> >> >>
> >> >> On Wed, Mar 28, 2012 at 11:39 AM, Darshan Pai <darshanpai at gmail.com>
> >> >> wrote:
> >> >> > This version of vtk was the nightly build from yesterday . The
> >> >> > following
> >> >> > code was working before without problems .
> >> >> >
> >> >> > char *buffer;
> >> >> > buffer = _getcwd(NULL,0);
> >> >> > QString path(buffer);
> >> >> > QString filename = QFileDialog::getOpenFileName(this,"LoadVTk
> >> >> > Files",path,
> >> >> > "Txt (*.vtk)");
> >> >> >     vtkPolyDataReader *slcreader = vtkPolyDataReader::New();
> >> >> >        slcreader->SetFileName(filename.toStdString().c_str());
> >> >> >
> >> >> >   std::string wq = "image.stl";
> >> >> >  // wq.replace(wq.size()-3,3,"stl");
> >> >> >  // cout << wq << endl;
> >> >> >
> >> >> >   vtkSTLWriter *stlwriter = vtkSTLWriter::New();
> >> >> >   stlwriter->SetFileName(wq.c_str());
> >> >> >   stlwriter->SetInputConnection(slcreader->GetOutputPort());
> >> >> >   stlwriter->Update();
> >> >> >
> >> >> > That is all i have in the app . I changed the stlwriter->SetInput
> to
> >> >> > stlwriter->SetInputConnection() because the former function does
> not
> >> >> > link .
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Wed, Mar 28, 2012 at 2:21 PM, Bill Lorensen
> >> >> > <bill.lorensen at gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> What version of vtk? Also can you post a small, compilable example
> >> >> >> that illustrates the error? Looks like a programming bug on your
> >> >> >> part.
> >> >> >>
> >> >> >> On Wed, Mar 28, 2012 at 11:18 AM, Darshan Pai <
> darshanpai at gmail.com>
> >> >> >> wrote:
> >> >> >> > I am reading a VTK file and saving it as an STL file .
> >> >> >> > My issue is that I am getting this strange error :
> >> >> >> > ERROR: In
> >> >> >> >
> >> >> >> >
> O:\qt-everywhere-opensource-src-4.8.0\VTK\Filtering\vtkExecutive.cxx,
> >> >> >> > line
> >> >> >> > 377
> >> >> >> > vtkStreamingDemandDrivenPipeline (00AC0C00): Attempt to get
> input
> >> >> >> > information vector from input port index 11252952 for algorithm
> >> >> >> > vtkSTLWriter(00ACCB50), which has 1 input ports.
> >> >> >> >
> >> >> >> >
> >> >> >> > This was working fine before . The only change I did from before
> >> >> >> > was
> >> >> >> > I
> >> >> >> > compiled VTK with Shared_libs option On.
> >> >> >> > Since making dlls. the vtkSTLWriter does not recognize
> SetInput()
> >> >> >> > either
> >> >> >> > .
> >> >> >> >
> >> >> >> > Regards
> >> >> >> > Darshan
> >> >> >> >
> >> >> >> > _______________________________________________
> >> >> >> > 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 VTK FAQ at:
> >> >> >> > http://www.vtk.org/Wiki/VTK_FAQ
> >> >> >> >
> >> >> >> > Follow this link to subscribe/unsubscribe:
> >> >> >> > http://www.vtk.org/mailman/listinfo/vtkusers
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Unpaid intern in BillsBasement at noware dot com
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Unpaid intern in BillsBasement at noware dot com
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Unpaid intern in BillsBasement at noware dot com
> >
> >
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120328/e760a35d/attachment.htm>


More information about the vtkusers mailing list