[vtkusers] Tcl and vtkLocal

Stephen Reilly stephen.reilly at ntlworld.com
Thu Nov 28 16:18:34 EST 2002


I had wondered about the "info commands" part before, so had completely left
out the statement and used the following (quite unsafe) code:

#vtkLocal.tcl start
package require vtk

::vtk::load_component vtkLocalTCL
package provide vtkLocal 4.0
#Finish

I know it would be quite bad to use this in the real world, but I had been
trying to see why the library wasn't loading. This, however, also gives rise
to the message (as does changing the "vtkAnyImageFilter" to
"vtkImageColouration"):
::vtk::load_component: vtkLocalTCL could not be found.

I know that the library builds correctly as, if I add it to the vtkPatented
build, I can use it. I think that for the time being this hack will have to
be enough for me.

Thanks for taking the time to help me out with this. I know it is a fiddly
question, and the answer is probably staring me right in the face.

Thanks again,
Stephen


----- Original Message -----
From: "John Biddiscombe" <jbiddiscombe at skippingmouse.co.uk>
To: "VTK-Users" <vtkusers at public.kitware.com>
Sent: Wednesday, November 27, 2002 12:50 AM
Subject: Re: [vtkusers] Tcl and vtkLocal


> I quickly looked at the tcl files you sent (Haven't eeven finished reading
> yor email).
> I noticed that you've used
>
> if {[info commands vtkAnyImageFilter] != "" ||
>     [::vtk::load_component vtkLocalTCL] == ""} {
>     package provide vtkLocal 4.0
> }
>
> Tut. Tut. What is this bit of code doing?
> If the information returned by the command vtkAnyImageFilter is non Null,
> then we must have already loaded vtkLocalTcl. But hold on.
vtkAnyImageFilter
> is one that exists in my vtkCustom dll. You should replace this with the
one
> of the filters used in your vtkLocal dll. NB. Always use a non-abstract
> filter (I won't go into details, but it's to do with the wrapping
process -
> you can't test one with no "New" command).
>
> Why is this code here? To stop you loading the same dll multiple times.
This
> shouldn't actually stop you loading it once, but I have noticed that this
> sentry code can cause trouble if it's munged, and yours is. Replace
> vtkAnyImageFilter with something in your dll like
> vtkStephensFavouriteFilter!!!
>
> I'll read the rest of your email now [pause[. OK, Can't see anything else
> wrong...
>
> JB
>
> ----- Original Message -----
> From: "Stephen Reilly" <stephen.reilly at ntlworld.com>
> To: "VTK-Users" <vtkusers at public.kitware.com>
> Sent: Wednesday, November 27, 2002 12:02 AM
> Subject: Re: [vtkusers] Tcl and vtkLocal
>
>
> > Sorry to keep bothering you all with this, but I seem completely unable
to
> > see this new library.
> >
> > Here is everything.
> > PATH = "C:\vtk\bin" - the library containing directory (as well as the
> > standard pile of windows semi-colon seperated nonsense)
> > TCLLIBPATH="C:/Program Files/vtk40/source/VTK/Wrapping/Tcl"
> > (this is the source directory from which I built C:\vtk\bin, and seems
to
> > contain all the vtk*.tcl files for the other libraries).
> >
> > I added the following line to C:\Program
> > Files\vtk40\source\VTK\Wrapping\Tcl\MakePackages.tcl:
> > pkg_mkIndex -direct -verbose vtkLocal
> > which when run gives the output:
> > .......
> > successful sourcing of vtkLocal.tcl
> > commands provided were
> > packages provided were {vtkLocal 4.0}
> > processed vtkLocal.tcl
> >
> > Please find attached my vtkLocal.tcl as requested, though I have it
under
> > C:/Program Files/vtk40/source/VTK/Wrapping/Tcl/vtkLocal/vtkLocal.tcl.
> >
> > I have also attached the file I am using to test this (in case I am
doing
> > something wrong there - it is only 5 lines though!). When run it gives
the
> > output:
> > ::vtk::load_component: vtkLocalTCL could not be found.
> >
> > I have also built everything as libs instead of dlls. Is this incorrect?
I
> > didn't think it would have mattered as the other libraries are found,
and
> > only mention it as it is a difference from the below reply.
> >
> > If I have left anything out please feel free to contact me. I am
> completely
> > at my wit's end (which, as you can imagine, isn't really that far away
:)
> >
> > Many thanks,
> > Stephen
> >
> >
> >
> > ----- Original Message -----
> > From: "Sebastien BARRE" <sebastien.barre at kitware.com>
> > To: "Stephen Reilly" <stephen.reilly at ntlworld.com>
> > Cc: "John Biddiscombe" <jbiddiscombe at skippingmouse.co.uk>; "VTK-Users"
> > <vtkusers at public.kitware.com>
> > Sent: Tuesday, November 26, 2002 1:31 AM
> > Subject: Re: [vtkusers] Tcl and vtkLocal
> >
> >
> > > Hi Stephen
> > >
> > > At 11/25/2002 08:21 PM, Stephen Reilly wrote:
> > > >John,
> > > >
> > > >Thanks for getting back to me with those files.
> > > >
> > > >The Tcl window no longer pops up stating that Tcl can not find the
> > package,
> > > >however, I receive the message:
> > > >::vtk::load_component: vtkLocalTCL could not be found.
> > >
> > > a) as John said, make sure your vtkLocalTCL.dll file is in your PATH.
> > > b) post your Wrapping/Tcl/vtklocal.tcl file so that we can check it,
> > > c) make sure you ran Wrapping/Tcl/MakePackages.tcl
> > >
> > >
> > > --
> > > Sebastien Barre
> > >
> > >
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at:
> > <http://public.kitware.com/cgi-bin/vtkfaq>
> > > Follow this link to subscribe/unsubscribe:
> > > http://public.kitware.com/mailman/listinfo/vtkusers
> >
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers




More information about the vtkusers mailing list