Questions tagged [xtk]

The X Toolkit (XTK) is a WebGL framework for Scientific Visualization.

Filter by
Sorted by
Tagged with
1
vote
0answers
20 views

How to add crosshair cursor in 2D and 3D rendering?

In the 2D renders, such as in Lesson 13 (http://lessons.goxtk.com/13/), is it possible to add a crosshair cursor indicating the position of orthogonal slices, like this sample? Furthermore, is it ...
0
votes
1answer
34 views

Loading failed for VTK files hosted on server

I'm trying to host my vtk files on a server, like this demo file http://x.babymri.org/?pits.vtk, so that I can: p.file = 'http://x.babymri.org/?pits.vtk'; r.add(p); However, when using my own file ...
0
votes
1answer
73 views

XTK lesson 13 (ami example) - Removing the boundary lines in slices obtained from 2D volume rendering

I've implemented XTK lesson 13 from the AMI examples (this - https://fnndsc.github.io/ami/#xtk_lesson13) by passing a set of DICOM images. In the slices obtained, there are these colored dotted lines ...
1
vote
0answers
24 views

Can the volume rendering display colorfully?

In the xtk:lesson 11(http://lessons.goxtk.com/11/), after volume rendering displays none colors. Can I change some code to make it display colorfully after volume rendering?
-1
votes
1answer
370 views

display image by using uint16array data

I am doing a DICOM project using XTK library. Now I need to create a list of thumbnails from input DICOM files (output images could be PNG or JPG). During the rendering process, XTK provides an array ...
1
vote
1answer
225 views

React throwing an error saying that setTimeout is not a function?

Im trying to use the XTK library in react and keeps telling me that the setTimeout function is not a function. My code seems to be pretty clean and it functions well if I just use it directly with the ...
0
votes
0answers
65 views

Is this a valid way to use componentDidMount?

Im trying to use the xtk visualization library with react. Im running into a type error that says that default.a.renderer3D is not a constructor. Can anyone tell me why this is happening, this is my ...
1
vote
1answer
454 views

Combining AMI.js with XTK's volume rendering

I am currently working on my Bachelor thesis about displaying 3D medical data in the browser. Therefore I am writing an application that can display DICOM images and meshes. As far as I can see, the ...
-1
votes
1answer
65 views

How to use XTK read arrayBuffer data

I would like to know how to read arrayBuffer data (DICOM arrayBuffer) by using XTK library. I have already tried lots methods, but do not work.
1
vote
0answers
41 views

Render volume from arrayBuffer with XTK library

I would like to render volume (DICOM) with arrayBuffer data. How can I realize this?
1
vote
0answers
34 views

receive data from arrayBuffer by using XTK

I'm trying to use XTK to load DICOM files, by using the following code: var _dicom = ['1','2','3'] volume.file = _dicom.sort().map(function(v) { return 'data/path/' + v + '.DCM'; }); The Output: ...
0
votes
1answer
143 views

Using XTK or AMI.js to display Freesurfer while/pial objects on T1.mgz

I'd like to recreate a web version of FreeSurfer pial/white surfaces overlaid on T1.mgz similar to the first freeview image at https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/PialEdits_freeview. ...
0
votes
1answer
65 views

Transfer Functions in xtk

How would I go about plugging in a transfer function to determine coloring and opacity in xtk based on pixel scalar intensity and / or gradient magnitude. This may be a separable 1d transfer Functions ...
0
votes
1answer
270 views

--AMI JS— Creating segmentation LUT

I have a question regarding the use of segmentation LUTs in AMI JS (not XTK but there is no ami js tag yet!). Particularly what I want to do is to load a segmentation / labelmap layer and display it ...
0
votes
1answer
79 views

xtk renderer3D's pick() produce errors in webgl2 enabled browsers

Has anyone used xtk with webgl2 to do the pick() call? specifically renderer3d's. Error: WebGL: drawArrays: Feedback loop detected...renderer3D.js:1977:7 Error: WebGL: readPixels: Out-of-bounds ...
10
votes
1answer
256 views

Reading ASCII VTK with XTK

I'm trying to use XTK to display 3D CFD data on my webpage. I can generate ASCII VTK files containing my data (mesh points, velocity, pressure) following the format guide here and I can visualize it ...
0
votes
1answer
734 views

XTK : How to render compressed dicom files(.dcm) in 3D & 2D

I am able to render '.dcm file' using X.renderer3D() and X.renderer2D(). But the issue is, the image is not displayed completely. When I manually uncompress and test, it is working fine. We can try ...
0
votes
0answers
107 views

“Invalid Object Id” from THREE.js WebGL framework

Sorry for my bad english. I use a loader to load OBJ file with MTL file. Everything seems to work, but when I try to add my mesh to the scene, I get this error: "xtk.js:260 Uncaught Error: Invalid ...
0
votes
1answer
82 views

XTK - Toolkit.. the cube moves by should only rotating

Im a newbie in 3D computer graphics and seen an odd thing. I used the XTK-Toolkit, witch is great with DICOM. I add a cube in the scene and translated it far from the center (http://jsfiddle.net/...
0
votes
0answers
104 views

Loading NRRD file in Javascript using XTK

My question is if it is possible to load a NRRD file in JavaScript using XTK library. When I tried to use X.loader() I get an error that it does not exist. I would like to just load a file not render ...
7
votes
1answer
462 views

File format of the VTK file to be used as input for XTK

I have a .vtk file at remote server. I am accessing it via http (I verified that the url of the file is correct, in fact I can download it from the browser). I've also tried to remove the blank spaces ...
1
vote
2answers
154 views

Error while running depswriter.py from google closure library

I am trying to build XTK following this link on Linux running on Oracle VirtualBox to get non-minified xtk.js. I am getting following error when I tried to generate the xtk-deps.js on running deps.py ...
1
vote
0answers
142 views

Get image coordinates by click on renderer in XTK

I am looking at the example in XTK. There are one renderer3D and three renderer2D instances. How can I determine image coordinates by mouse click event (either on 3d renderer or on one of the 2d ...
1
vote
0answers
66 views

generate canvas display on other viewers based on the draw on one viewer

I am currently writing a web Interface purely javascript based. I use xtk to display medical image from dicom format. I display 3 viewers : Z, X and Y. I use a canevas to draw on the Z orientation ( ...
1
vote
1answer
114 views

Why XTK volume object holds nearly 4 times the total memory of DICOM files

I modified XTK's lesson 13 to load DICOM images from my desktop and do volume rendering. Although it is working fine, I noticed that the X.volume object is holding nearly 4 times the total size of ...
2
votes
0answers
145 views

Convert volume to STL file?

I pulled the rep from XTK/K. Now I am able to load my created NII files into the slicer with the thresholding method. Now I am able to threshold my pixel data within the volume object. Is it possible ...
0
votes
1answer
126 views

How to clip a 3D image in XTK

We have a 3D image composed of a nii volume and several obj meshes. We want to clip it to expose partial image. The viewpoint option at http://www.usc.edu/programs/face/3Dmodel/C57BL6-E185.html is ...
0
votes
2answers
58 views

Does xtk.js supports IE-8,9,10?

I have started learning xtk.js. I am playing with sample available on https://github.com/xtk/X .When i run those sample in firefox, chrome it works fine but when i run same samples in IE-8,9,10 it ...
2
votes
1answer
146 views

windowing for DICOM should use rescaleSlope and rescaleIntercept

How do I do DICOM windowing in XTK? Just converting window width and center to WindowHigh and WindowLow doesn't produce the correct image. Shouldn't the code use the rescale slope and rescale ...
0
votes
1answer
302 views

How to change a pixel value in XTK

I would like to know how to change a pixel value for the label map. This is my initial approach. Unfortunately, the changes are not reflected in the canvas. X.volume.prototype.SetPixelLabelMap =...
0
votes
1answer
68 views

Accesing javascript array gives unexpeted results

I'm trying to display 3D images (volumes) using Javascript and XTK. I can view the volumes fine, but I am having problems trying to access the volume dimensions. //Create a new volume volume = new X....
1
vote
0answers
109 views

Display 4D (3D + time) in XTK

I am trying to show a medical image known as SWI in XTK. Single volume (timepoint) SWI for displays well. However, we now acquire these images at multiple timepoints ending up with 4D images. Would ...
3
votes
1answer
212 views

Changing the color of a pixel in a XTK Renderer2D

Currently, I display a .dcm file using XTK in a Renderer2D. Is it possible to change the color of some pixels in this renderer ? Thank you in advance :)
1
vote
1answer
136 views

Trouble with simple X.transform.rotate (rotation center offset)

I’m very confused right now: the basic X.transform.rotate() function gives unexpected result for me, even with very simple scenes! The angles of the rotations are OK, as you can see here: http://...
0
votes
1answer
266 views

How to propagate file load error?

I'm attempting to program a browser-based medical image viewer and am using the XTK library to do the heavy lifting. When a file does not load properly (for any number of reasons) I want to let the ...
1
vote
0answers
77 views

xtoolkit - how to move or reposition the progress bar and how to customize it?

[xtk] xtoolkit - how to move or reposition the progress bar and how to customize it ? i want to move the progress bar that shows up when loading or rendering ,,, and also i want to customize it ( ...
0
votes
1answer
148 views

Othographic Projection in XTK

So I am using XTK to develop a app that will allow users to view multiple 3D meshes in one renderer. The problem is that it uses a perspective camera instead of a orthographic, which causes panning to ...
1
vote
0answers
62 views

How to Scale Fibers's object use XTK API

There is a problem, the Fibers object can not automatic alignment with Volume and Mesh. Those files are come from the same source (one subject's DICOM file) so it should can be match together in ...
0
votes
2answers
190 views

Can I use a local file with X.mesh?

I'm adapting Lesson 5 from here, which takes a skull vtk object and displays it rotating in a circle. I want to change it so instead of accessing the .vtk object at http://x.babymri.org/?skull.vtk, ...
2
votes
1answer
637 views

Xtk : Can't display label map

I slightly changed demo #11 to load my images instead of the demo's. I can load my MRI image just fine, see Demo. It also works if I load my label map as the main volume. window.onload = function() {...
4
votes
1answer
868 views

Can I output a mayavi plot as .vtk file to embed in a web app?

Okay, a little background here. I made a script that plots a dataset as 3d line plots using mlab.plot3d(), multiple times in Mayavi, after reading it from an xlsx file. Now, I am trying to make a web ...
0
votes
2answers
258 views

XTK - rendering volume in multiple renderers without .onShowtime()?

I'm wondering if someone can explain to me why I can't render the same volume in a 4 panel setup (3D, X, Y, Z) just like in XTK Tutorial 13, without the .onShowtime function. I tried altering the code ...
0
votes
1answer
149 views

How to automatic alignment Fibers, Volume and Mesh use XTK

I think it is a simple question, but it really confuse me... In the case which I try to show three object together, like Fibers, Volume and Mesh, just as you can see in this demo web. Demo Web: http:...
1
vote
1answer
3k views

Converting .stl or .vtk file to JSON

I've been looking for ways how to convert vtk or stl files to json. I'm asking because I want to load my 3d models to web browser using https://github.com/xtk/X XTK library. But the vtk/stl files are ...
1
vote
0answers
101 views

NRRD volume offset in 2D renderer

I'm just looking into a project of making a scan viewer much like Slice:Drop from the Xtk examples. I'm very new to XTK and web programming in general. I'm using an example file of a brain, but in ...
0
votes
1answer
106 views

Difference between two volume files

I want to render volume(X.volume()) and cube(X.cube()) on one scene. For testing I use your volume files from lessons. Case 1: var r = new X.renderer3D(); r.init(); var volume = new X.volume()...
0
votes
1answer
638 views

VTK 3D model displayed in web browser via XTK - how to test and analyze

I'm going to load a 3d model of a knee (saved as .vtk file, created in VTK ) into web browser by XTK library. I have to prepare small assesment of this and analyze the results... I'm wondering which ...
0
votes
1answer
90 views

xtoolkit - volume.range is undefined

volume.range is undefined here is a part from the code : var sliceXController = volumegui.add(volume, 'indexX', 0, volume.range[0] - 1); var sliceYController = volumegui.add(volume, '...
0
votes
1answer
2k views

ReferenceError: goog is not defined

I am new on XTK with its things. I am following the X:DevelopersHeadsUp to try to run the demo html. 1) I clone the repository and run ./deps.py . Now the xtk-deps.js generated . 2) I invoke the ...
1
vote
0answers
105 views

X toolkit, How to access rendered canvas data in Chromium

With the http://lessons.goxtk.com/00/ and I am trying to get the data as an image ( toDataURL('image/webp') ) from the canvas in Chromium 31.0.1650.63 (debian). After loading the page, I typed at the ...