[vtkusers] vtkFloatArray to double[] in java or C++?

S Nundy nundys at neuro.duke.edu
Tue Oct 1 00:12:23 EDT 2002


Hello,
	I would like to access the data contained in a vtkFloatArray from 
java (or C++).  So far, I have been able to access each Tuple 
individually in a loop, which for large datasets is exceedingly slow.  
Is there some way in which I can access the whole array fast?

Thanks,
Surajit Nundy

On Friday, October 18, 2002, at 06:38 AM, vtkusers-
request at public.kitware.com wrote:

> Send vtkusers mailing list submissions to
> 	vtkusers at public.kitware.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://public.kitware.com/mailman/listinfo/vtkusers
> or, via email, send a message with subject or body 'help' to
> 	vtkusers-request at public.kitware.com
>
> You can reach the person managing the list at
> 	vtkusers-admin at public.kitware.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of vtkusers digest..."
>
>
> Today's Topics:
>
>    1. Does vtk StructuredPointsReader support 16-bit Binary Data? 
> (Toshio Akiyama)
>    2. Re: window/level concept (anast.jm at pg.com)
>    3. Installation Guide on Unix (Thomas Deschamps)
>    4. Manipulating 4D data (anast.jm at pg.com)
>    5. Re: minor bug in vtKDataReader ... (Prabhu Ramachandran)
>    6. appending polydata (Stefan Ulbrich)
>    7. compile problems on VC++ (Joshua Cates)
>    8. vtkBMPReader (Priti Laxman)
>    9. Getting vtkProgrammableGlyphFilter to work with C++ (Nathan Smith)
>   10. vtk***Instantiator ??? (=?gb2312?q?Steven=20Wu?=)
>   11. how to build vtk vtkRenderingPythonTkWidgets.dll (Dharmendra)
>
> --__--__--
>
> Message: 1
> Date: Fri, 18 Oct 2002 02:42:08 +0900
> From: Toshio Akiyama <akiyama at rao.co.jp>
> To: vtkusers at public.kitware.com
> Subject: [vtkusers] Does vtk StructuredPointsReader support 16-bit 
> Binary Data?
>
> Hello.
>
> I need some help.
>
> I'm trying Volume Rendering from 16-bit 3D data.
> I use vtkStructuredPointsReader() function.
> Does this function support 16-bit Binary Data?
>                                   ^^^^^^
> It doesn't seem that this funcition can set data length.
>
>
> When the 3D data format is Binary, vtkStructuredPointsReader() can't
> read that 16-bit data correctly.
>
> But when the format is ASCII, the funcion works good even if the data
> range is from 0 to 32767.(16-bit)
>
>
> The header of binary version is like this.
>
>
> # vtk DataFile Version 2.0
> vtk test
> BINARY
> DATASET STRUCTURED_POINTS
> DIMENSIONS 136 150 50
> SPACING 1.000000 1.000000 0.500000
> ORIGIN 0 0 0
> POINT_DATA 1020000
> SCALARS volume_scalars unsigned_short 1
> LOOKUP_TABLE default
>
>
> Please tell me how to read 16-bit binary data.
>
> --
> RAO, Inc. Toshio Akiyama <akiyama at rao.co.jp>
>
>
> --__--__--
>
> Message: 2
> Subject: Re: [vtkusers] window/level concept
> To: vtkusers at public.kitware.com
> From: anast.jm at pg.com
> Date: Thu, 17 Oct 2002 14:09:02 -0400
>
>
> Yes, of course you are correct, level is the center of the range not the
> beginning as I stated....not enough caffeine that night apparently. 
> Sorry for
> the confusion...john
>
>
>
>  Internet Mail Message
>  Received from host:      public.kitware.com
>  [24.97.130.19]
>
>
>
> From: Edward Bachta <ebachta at ncsa.uiuc.edu>@public.kitware.com on 
> 10/17/2002
> 12:05 PM
>
>       Edward Bachta <ebachta at ncsa.uiuc.edu>           To:   John 
> Anast-JM/PGI at PGI
>                         @public.kitware.com           Cc:   
> vtkusers at public.kitware.com
>                                               Subject:      Re: 
> [vtkusers] window/level concept
>
>                                    Sent by:
>           vtkusers-admin at public.kitware.com
>                         10/17/2002 01:05 PM
>
>
>
>
>
>
>
> That's odd, because in the VTK User's Guide v4.0 on page 127 the
> window/level scheme is described differently. There is a diagram:
>
>              ____________
>             /
>            /
> __________/
>          | ^ |
>            L
>          <-W->
>
> This is my understanding:
>
> Level (L) designates the center of the range of values mapped to
> grayscale. Window designates the extent of the range to either side of 
> the
> level. Thus, the range mapped is (level-window/2) to (level+window/2). 
> For
> a positive window value, regions less than (level-window/2) are clamped 
> to
> black and regions greater than (level+window/2) are clamped to white.
> Regions at (level) are 50% gray. With a negative window value you get 
> the
> inverse image.
>
> Based on what I have observed in my implementations using 
> vtkImageViewer,
> this is correct. (VTK CVS version circa Sept 24th)
>
> --
> Ed Bachta
> ebachta at ncsa.uiuc.edu
>
> On Wed, 16 Oct 2002 anast.jm at pg.com wrote:
>
>>
>> Steffen,
>>
>> If you think of the image histogram, the window is the range of values 
>> that
> will
>> be mapped to your display, the level is where in the histogram this 
>> range
>> begins. For example if you have a 4096 bin histogram, a window of 250 
>> and a
>> level of 1000, this would map bins 1000-1250 full scale onto your 
>> display, all
>> other values would be clipped. The Window/Level concept is also know in
>> photographic circles as contrast/bightness and for cameras 
>> gain/offset....john
>>
>>
>>
>>
>>
>>  Internet Mail Message
>>  Received from host:      public.kitware.com
>>  [24.97.130.19]
>>
>>
>>
>> From: Steffen Oeltze <Steffen.Oeltze at Student.Uni-Magdeburg.DE>
>> @public.kitware.com on 10/16/2002 10:00 AM ZE2
>>
>>      Steffen Oeltze <Steffen.Oeltze at Student.Uni-
>> Magdeburg.DE>           To:
> VTK users
>>                                           @public.kitware.com
> <vtkusers at public.kitware.com>
>>                                                                        
>>  Cc:
> (bcc: John Anast-JM/PGI)
>>                                                                 
>> Subject:
> [vtkusers] window/level concept
>>                   Sent by:  vtkusers-admin at public.kitware.com
>>                                           10/16/2002 04:00 AM
>>
>>
>>
>>
>>
>>
>> Dear VTK-users,
>>
>> I'm not familiar with the window/level concept of the vtkImageMapper. 
>> Could
>> anybody give me some insight please ?
>>
>> Thanks,
>> Steffen
>>
>> _______________________________________________
>> 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
>>
>
> _______________________________________________
> 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
>
>
>
>
> --__--__--
>
> Message: 3
> Date: Thu, 17 Oct 2002 11:33:23 -0700
> From: Thomas Deschamps <tdeschamps at lbl.gov>
> To: VTK users list <vtkusers at public.kitware.com>
> Subject: [vtkusers] Installation Guide on Unix
>
> Hi vtkusers,
>
> By looking in the previous posts I found that Adele P. Peskin peskin at
> boulder . nist . gov on Thu, 25 Jul 2002 08:48:38 -0600
> proposed a "Howto" documents for  both the installation and running of
> CMake and VTK.
>
> I would like to know if someone still have it and can send it to me.
> I am currently enduring tremendous problems making work vtk on a Unix
> platform, and linking its libraries with my code, while it was so easy
> on my nice linux box.
> Thank you
>
> Thomas
> TDeschamps at lbl.gov
>
>
> --__--__--
>
> Message: 4
> To: vtkusers at public.kitware.com
> From: anast.jm at pg.com
> Date: Thu, 17 Oct 2002 15:01:03 -0400
> Subject: [vtkusers] Manipulating 4D data
>
>
> I have a set of time steps from an FEA simulation that we would like to 
> be able
> to interact with in pseudo real time, that is be able to view the time 
> sequence
> but also interact in 3D with the model (to take a better look at whats 
> happening
> at each step). The time steps come in as a discrete series of vrml 
> scenes which
> I have imported into vtk as a list of ActorCollections, one 
> ActorCollection per
> scene. My initial thought was to assign a slider to select a specific
> ActorCollection and set the rest of the actors opacity to zero. By 
> running the
> slider I could see the time progress but still be able to interact with 
> each
> step in 3D. This is the first time I've tried to deal with 4D data so 
> I'm
> wondering if folks can suggest a better way to do this. Thanks for any
> ideas/pointer....john
>
>
> --__--__--
>
> Message: 5
> From: Prabhu Ramachandran <prabhu at aero.iitm.ernet.in>
> Date: Thu, 17 Oct 2002 23:53:02 +0530
> To: "Malcolm Drummond" <malcolm at geovision.co.za>
> Cc: "vtkusers" <vtkusers at public.kitware.com>
> Subject: Re: [vtkusers] minor bug in vtKDataReader ...
>
>>>>>> "MD" == Malcolm Drummond <malcolm at geovision.co.za> writes:
>
>     MD> ... or maybe just a nuisance. I'm using VTK32, so not sure
>     MD> about 4.x. Sorry if it's been fixed already - couldn't find
>     MD> anything in the archives.  If you characterize a file, ie use
>     MD> GetNumberOfScalars and GetScalarsNameInFile, the stored
>     MD> filenames have been converted to lowercase (because CheckFor
>     MD> converts the whole line to lowercase). However ReadScalarData
>     MD> is comparing against the original name in the file (not
>     MD> necessarily lowercase), hence the possible problem.
>
> Works fine on 4.x CVS.
>
> cheers,
> prabhu
>
>
> --__--__--
>
> Message: 6
> Date: Thu, 17 Oct 2002 23:50:37 +0200
> From: Stefan Ulbrich <stevie157 at gmx.net>
> To: vtkusers at public.kitware.com
> Subject: [vtkusers] appending polydata
>
> hi,
>
> i used the appendpolydata-filter to append several polydata-objects and
> to write them to disk in one vtk file. does anyone know how I can give
> the ojects a different color or transparency, perhaps even a texture,
> before i append them?
>
> thanks
>
> stef
>
>
> --__--__--
>
> Message: 7
> Date: Thu, 17 Oct 2002 16:13:27 -0600 (MDT)
> From: Joshua Cates <cates at sci.utah.edu>
> To: VTK Mailist <vtkusers at public.kitware.com>
> Subject: [vtkusers] compile problems on VC++
>
> Hi,
>
> I'm attempting to compile using VC++ 6.0 service pack 5 on windows 2000
> with Tcl wrapping enabled.  See the experimental dashboard for Thu
> 10/17/02 "AJI  WinNT-cl-JoshsLaptop-VC++SP5" for the errors.
>
> Any suggestions as to what I'm doing wrong?  CMakeCache.txt is available
> at
>
> http://www.sci.utah.edu:/~cates/CMakeCache.txt
>
>
> Thanks,
>
> Josh.
>
> ______________________________
>  Josh Cates			
>  School of Computer Science	
>  University of Utah
>  Email: cates at sci.utah.edu
>  Phone: (801) 587-7697
>  URL:   www.cs.utk.edu/~cates
>
>
>
> --__--__--
>
> Message: 8
> Date: Thu, 17 Oct 2002 19:21:37 -0700 (PDT)
> From: Priti Laxman <blpriti at yahoo.com>
> To: vtkusers at public.kitware.com
> Subject: [vtkusers] vtkBMPReader
>
> Hi,
>
> I am a novice in vtk. Can you please please send me
> the code for opening a BMP image in MS VC++??
>
> I don't need the volume rendering one. I need to open
> only one image.. a 2-d image.
>
> thanks a lot in advance.
> bye
> priti
>
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
> --__--__--
>
> Message: 9
> Date: Fri, 18 Oct 2002 00:05:23 -0400 (EDT)
> From: Nathan Smith <nsmith5 at gl.umbc.edu>
> To: vtkusers at public.kitware.com
> Subject: [vtkusers] Getting vtkProgrammableGlyphFilter to work with C++
>
> Hello,
>
> I'm trying to get the SetGlypherMethod to work with c++-style function
> pointers, although it requires a c-style function pointer. Has anyone
> found a workaround for this? The first solution I thought of was to 
> create
> a c wrapper for the c++ call, but is there any way to get back to the
> correct c++ object through information in the void * argument? I'm not
> sure if anything useful is passed in it (documentation for it is really
> bad). Anyway, here is the standard compiler error for this type of
> problem:
>
> ....:77: no matching function for call to
> 'vtkProgrammableGlyphFilter::SetGlyphMethod (void *
> (vtkIVTKGlypher::*)(void *))'
> .....:87: candidates are: void
> vtkProgrammableGlyphFilter::SetGlyphMethod(void (*)(void *), void*)
>
> Any help on this would be greatly appreciated. Thanks
>
> Nate
>
>
>
>
> --__--__--
>
> Message: 10
> Date: Fri, 18 Oct 2002 17:27:26 +0800 (CST)
> From: =?gb2312?q?Steven=20Wu?= <wzllist at yahoo.com.cn>
> To: vtkusers at public.kitware.com
> Subject: [vtkusers] vtk***Instantiator ???
>
> I've newly download the nightly package. I find new
> object creators added to the source. They are classes
> with names as vtk***Instantiator  . Within these class
> implemented static functions for objects creation. I
> do't know what future features related to these class
> will be added by VTK group. Will VTK group advise
> users to create objects in this way at last?
>
> _________________________________________________________
> Do You Yahoo!?
> –¬œ µΩµ◊,”È¿÷µΩº“ - —≈ª¢Õ∆≥ˆ√‚∑—”È¿÷µÁ◊”÷‹±®!
> http://cn.ent.yahoo.com/newsletter/index.html
>
> --__--__--
>
> Message: 11
> Date: Fri, 18 Oct 2002 15:49:01 +0530
> To: vtkusers at public.kitware.com
> From: Dharmendra <dharmendra at strandgenomics.com>
> Subject: [vtkusers] how to build vtk vtkRenderingPythonTkWidgets.dll
>
> Hello All,
>    can some please let me know how to build 
> vtkRenderingPythonTkWidgets.dll.
> building vtk does'nt seem to create this dll.
>
> thanka in advance,
> dharmendra
>
>
>
> --__--__--
>
> _______________________________________________
> vtkusers mailing list
> vtkusers at public.kitware.com
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
> End of vtkusers Digest
>




More information about the vtkusers mailing list