Does anyone know how to download the Three.js converted file using Autodesk View and Data API? - viewer

I am trying to use the WEBGL(three.js) file translated through REST api using Autodesk view and Data API.
But, I am not able to download the streaming JSON file, does any one knows about this?

If you need only a specific mesh, you may try as described here: http://adndevblog.typepad.com/cloud_and_mobile/2015/05/viewer-api-search-dwg-solids-by-layer.html and check the following line (that gets the three.js mesh)
var mesh = viewer.impl.getRenderProxy(viewer, fragIdsArray[0]);
And you check this sample for a full download: http://extract.autodesk.io/

Related

How to redact texts in a pdf file in NodeJs

I am struggling to apply text redaction in a PDF file in a aws lambda function written in NodeJs. Here is a list of libraries that I have tried with no success:
pdf-lib: This library almost fulfils all the requirements except that it doesn't redact the text permanently as part of its limitations https://github.com/Hopding/pdf-lib/issues/827
PDF.js: To overcome the above limitation, tried to covert the pdf to an image, so the redaction black boxes are applied permanently. Example code here: https://github.com/mozilla/pdf.js/blob/master/examples/node/pdf2png/pdf2png.js However, this lib is not reliable as this cannot extract contents from most pdfs during the process.
Finally, Pdf2Pic: This library helps to overcome the limitation of the first library (pdf-lib) by the converting the pdf into images. But this library internally uses two non node based libraries (graphicsmagick and ghostscript) which I am trying to avoid.
Is there a nodejs based solution that can be used to apply redaction permanently on a pdf file or any solution that can be used to covert a pdf to images to overcome limitation of pdf-lib.

The pictures (JPEG file) in BIM model are not shown in Forge Viewer

I create BIM model and place the pictures (JPEG file) on the model's wall using 'place decal' function and change the graphic display option to 'realistic'. The result is as picture 1.
After that, I upload model to Forge viewer. However the pictures are not shown.
My questions are:
1) Why are the pictures in my revit model not shown in Forge viewer? How can I fix this?
2) If I can fix and the pictures are shown, can I change or replace the pictures in Forge Viewer later?
Please help, thank you.
Re 1: it's possible that decals in Revit models are currently not supported by the Forge Model Derivative service. I will talk to the engineering team and update this answer when I hear back from them. In the meantime, double check whether the decal image is embedded in the Revit file or referenced externally. If the image is referenced, you would have to include it with the *.rvt file in a zip archive when uploading & translating it in Forge.
Re 2: modifying textures of existing objects in Forge Viewer is possible but more involved. It would be easier to create new geometry (for example, using SceneBuilder), and overlay the existing decals.

OFFIS DICOM scope toolkit Structured report link to image

Does anybody knows how to create a structured report using dicom scope toolkit via console (ubuntu 16.04) with a link to a related image?
The thing is that I have an image of some kind of trauma and I have to connect with a report which is in a text file. The last file should be in .dcm format which contains annotation and a link to an image. I have to use dicom scope program.
Maybe others refrain from answering because your question needs a very long answer. I cannot provide step-by-step instructions, a few hints, though.
The way I would go is to:
(assuming that your image is available in DICOM format):
obtain a sample structured report. I think that the "simple" Basic Text SR is what you want to go for. You can find some samples here.
convert the SR to an XML file using dsr2xml
edit the contents in XML. Do not forget to include your image reference in (0040,a730) Content Sequence -> (0008,1199) Referenced SOP Sequence
convert the XML back to DICOM SR using xml2dsr
By the way: From your question, I did not really understand why you want to use a structured report, as you wrote that your report is plain text. Instead of digging into the complex structure of SR, you may want to consider exporting the report to an Encapsulated PDF document which can reference images as well.

how to encode and decode pdf files using base64encode/decode ( windows app store )in c#

solution with sample using c#,
scenario:
Download encoded pdf file of base64Encode and decode(base64Decode) and store in ApplicationData.Current.LocalFolder;
you can use File.ReadAllBytes to load the PDF file into your program and then u can convert the loaded pdf file using Convert.ToBase64String(bytes) method
You might want to prefer this link
https://social.msdn.microsoft.com/forums/vstudio/en-US/e5965e02-0bbb-4f8d-9e5f-8611aa902457/how-to-convert-pdf-file-to-base64binary
Well, I am not going to write a solution with a complete sample for you, but I will point you to what may be the most exhaustive base42 discussion in Windows Runtime.
http://blog.jerrynixon.com/2014/11/reading-and-writing-base64-in-windows.html
It's a crazy coincidence that I just wrote this a few weeks ago. You'll notice that it is in the context of an image, but you should be able to translate it simple enough.
Remember to post your solution here!
Best of luck!

KML visualize data file

I am trying to visualize a large amount of weather data with GE(the data may change time to time). Ideally, the user could input the data file with locations and weather data. I was wondering how could I create the KML dynamically?
Based on your comment above you will have KML data available from one of two sources: See my answer to this question: Import KML in Maps API V2 (I would ignore the solution by the author here):
If you have the KML accessable at a publically available URL, follow this part of the API: https://developers.google.com/kml/documentation/mapsSupport.
If you want to load locally stored KML files (i.e. you are getting a .txt file on your server) you will need to parse them yourself. There are libraries for doing this in every language. For Javascript as an example: http://code.google.com/p/geoxml3/
If you do end up doing this with the API (your kml/kmz is available as a URL) your JavaScript code is as simple as:
The API Call to load KML from a URL in the JavaScript API where the map var is your google.maps.Map object.
var geoLayer = new google.maps.KmlLayer('URL');
geoLayer.setMap(map);
UPDATE
Note that this thread is relevant to your question as well, and you do have additional options to loading your KML if using the GE Plugin. Unable to load a local KMZ file into a browser with the google earth plugin using fetchkml function

Resources