According to the well-written article here, there are several possible scenarios which would lead to memory leaks.
1) You started a timer but forgot to destroy it (remove)
2) You created an event listener, but forgot to destroy it (remove)
3) You created loader objects, but forgot to destroy it (remove)
4) You created variables (references), but forgot to destroy it (null, empty array)
5) You created an annoymous handler, and you cannot destroy it ( #sigh )
Medical Imaging, Image Processing, Computer Vision, Pattern Recognition, Research, Medical & Health Informatics
Thursday, September 1, 2011
The Flow for making JPIP streaming possible from a DCM4CHEE (manually)
This documents my way to get the DCMs to output to a JPIP Stream
You will need:
1) A remote archive( preferably, if not try local) DICOM archive (supports dicom queries)
2) DCM4CHEE (unzipped)
3) Kakadu JPIP Server and Client (you can sub this in with others)
4) DCMTK
Pseudo-Steps:
1) Retrieve Images from a remote archive
a) set up a dcmrcv
> dcmrcv AE_TITLE@11112 -dest H:\Folder
b) cmove from a remote archive to dcmrcv
> dcmqr -L AE_TITLE@LOCALMACHINE AE_TITLE@REMOTEMACHINE:PORT -cmove AE_TITLE -qPatientID=1234567 -cstoredest /tmp
2) Convert 'cmove'ed images to a kakadu encoder-compatible format
a) this step is a bit important if your remote archive tends to store everything to a jpeg-ls or jpeg lossless format with different process tables). Step a) is to ensure it will be converted to explicit big endian (which dcmtk knows what it is.
>DCM4CHEE\DCM2DCM "H:\Folder\abc.dcm" "H:\Folder\convertedabc.dcm"
b) Convert to PGM with DCMTK
> DCMTK\DCMP2PGM "H:\Folder\convertedabc.dcm" "H:\Folder\convertedabc.pgm"
c) Convert to JP2 with Kakadu
> Kakadu\kdu_compress -i "H:\Folder\convertedabc.dcm" -o "H:\Folder\convertedabc.jp2" -rate 1.0
3) Start JPIP Server
*assuming you have moved convertedabc.jp2 to a place where the server knows where to read from
> kdu_server -address localhost -port 8080
4) Start JPIP Client
Just make sure your JPIP Url is correct and the target file is convertedabc.jp2 (in this example).
There, that'd do it. If not, email me or leave me a comment for me to analyze your situation. Thanks!!
You will need:
1) A remote archive( preferably, if not try local) DICOM archive (supports dicom queries)
2) DCM4CHEE (unzipped)
3) Kakadu JPIP Server and Client (you can sub this in with others)
4) DCMTK
Pseudo-Steps:
1) Retrieve Images from a remote archive
a) set up a dcmrcv
> dcmrcv AE_TITLE@11112 -dest H:\Folder
b) cmove from a remote archive to dcmrcv
> dcmqr -L AE_TITLE@LOCALMACHINE AE_TITLE@REMOTEMACHINE:PORT -cmove AE_TITLE -qPatientID=1234567 -cstoredest /tmp
2) Convert 'cmove'ed images to a kakadu encoder-compatible format
a) this step is a bit important if your remote archive tends to store everything to a jpeg-ls or jpeg lossless format with different process tables). Step a) is to ensure it will be converted to explicit big endian (which dcmtk knows what it is.
>DCM4CHEE\DCM2DCM "H:\Folder\abc.dcm" "H:\Folder\convertedabc.dcm"
b) Convert to PGM with DCMTK
> DCMTK\DCMP2PGM "H:\Folder\convertedabc.dcm" "H:\Folder\convertedabc.pgm"
c) Convert to JP2 with Kakadu
> Kakadu\kdu_compress -i "H:\Folder\convertedabc.dcm" -o "H:\Folder\convertedabc.jp2" -rate 1.0
3) Start JPIP Server
*assuming you have moved convertedabc.jp2 to a place where the server knows where to read from
> kdu_server -address localhost -port 8080
4) Start JPIP Client
Just make sure your JPIP Url is correct and the target file is convertedabc.jp2 (in this example).
There, that'd do it. If not, email me or leave me a comment for me to analyze your situation. Thanks!!
Security Issues of Web Apps
Your web app is likely to be constantly under attack!
Just take a look at the following list!
Common Concerns
Secure Messaging
Protection of Resources
Negotiation of Contracts
Trust Management
Common Attacks against Web Services
Reconnaissance Attacks
Dictionary Attack
Forceful Browsing Attack
Directory Traversal Attack
WSDL Scanning
Sniffing
Privilege Escalation Attempts
Format String Attacks
Exploiting Unprotected Administrator Interfaces
Attacks on Confidentiality
Registry Disclosure Attacks
Attacks on Integrity
Parameter Tampering
Coercive Parsing
Schema Poisoning
Spoofing of UDDI/ebXML messages
Principal Spoofing
Routing Detours
External Entity Attack
Cannoicalization
Intelligent Tamparing
Impersonation
DOS attacks
Flooding attacks
Recursive Payloads sent to XML Parsers
Buffer overflow exploits
Race Conditions
Symlink Attacks
Memory Leak Exploitation
Command Injection
SQL Injection
XML injection
Malicious Code Attacks
URL String Attacks
Parameter Tampering
Cross-site Scripting
Session Hijacking
Malformed Content
Logic Bombs Trapdoors/Backdoors
Reference:
Sangwan S. and Sangwan YS. (2010) "Designing a Frame Work for Web Application Information Security Architecture". International Journal of Electronics Engineering 2(2):337-380
Wednesday, August 31, 2011
DICOM Transfer Syntax UID
1.2.840.10008 is reserved for DICOM Transfer Syntaxes
Below is the set of UIDs for a number of Transfer Syntaxes
I have put together a table like this for my future reference.
Below is the set of UIDs for a number of Transfer Syntaxes
| Implicit VR Little Endian | 1.2.840.10008.1.2 |
| Explicit VR Little Endian Transfer Syntax | 1.2.840.10008.1.2.1 |
| Explicit VR Big Endian Transfer Syntax | 1.2.840.10008.1.2.2 |
| RLE Compression | 1.2.840.10008.1.2.5 |
| Deflated Explicit VR Little Endian | 1.2.840.10008.1.2.1.99 |
| JPEG Baseline (JPEG Coding Process 1) | 1.2.840.10008.1.2.4.50 |
| JPEG Extended (JPEG Coding Process 2)(8-bit) (JPEG Coding Process 4)(12-bit) | 1.2.840.10008.1.2.4.51 |
| JPEG(lossless, non-hierarchical) (JPEG Coding Process 14) | 1.2.840.10008.1.2.4.57 |
| JPEG (lossless, non-hierarchical, first-order prediction) (JPEG Coding Process 14) | 1.2.840.10008.1.2.4.70 |
| JPEG-LS (Lossless Mode) | 1.2.840.10008.1.2.4.80 |
| JPEG-LS (Near Lossless Mode) | 1.2.840.10008.1.2.4.81 |
| JPEG 2000 Part 1(Lossless) | 1.2.840.10008.1.2.4.90 |
| JPEG 2000 Part 1(Lossless or Lossy) | 1.2.840.10008.1.2.4.91 |
| JPEG 2000 Part 2(Lossless) | 1.2.840.10008.1.2.4.92 |
| JPEG 2000 Part 2(Lossless or Lossy) | 1.2.840.10008.1.2.4.93 |
| JPIP | 1.2.840.10008.1.2.4.94 |
| JPIP (Referenced Deflate) | 1.2.840.10008.1.2.4.95 |
| MPEG2 MP@ML | 1.2.840.10008.1.2.4.100 |
| MEPG2 MP@HL | 1.2.840.10008.1.2.4.101 |
| MPEG4 AVC/H.264 | 1.2.840.10008.1.2.4.102 |
| MPEG4 AVC/H.264 BD | 1.2.840.10008.1.2.4.103 |
I have put together a table like this for my future reference.
Sunday, August 28, 2011
Deploying Flex Apps to iOS Devices
This entry documents what i did to deploy my flex apps to iOS Devices.
Pre-requisites:
A.1) Flash Builder 4.5(preferably with Flex SDK 4.5.1)
A.2) Air 2.6+
A.3) A registered Apple Developer's Account
You will then need:
B.1) A certificate from your Developer's Account (in iOS Provisioning Portal > Certificates)
* if your certificate has expired, you will then need to revoke your certificate, and renew all provisioning profiles*
B.2) A provisioning profile (in iOS Provisioning Portal > Provisioning)
Steps to build and deploy Flex Apps to iOS Devices
1) New Flex Mobile Project (check those that are needed, check iOS of course).
2)
a) to run in simulator, you just have to select 'On Desktop'
b) to run in device, you will need to select 'On Device' (and then select the appropriate packaging method)
Where it says "Certificate", input what you derive from B.1. Where it says Provisioning File, input what you derive from B.2.
3) Click Apply and click Run.
4) You will the be prompted to enter the password that has been paired up with your certificate.
5) After that, it will start packaging and it can take several or a very, very long time (if you select the Standard Packaging Method).
6) It will then tell you that it has packaged to an output directory.
7) Right click on the .ipa file and open in iTunes
8) Note that if you have a copy of the app in your iOS device, make sure you have it uninstalled
9) in the App tab of your device in iTunes, make sure your app is checked and then sync the device
10) Run your app in your iOS Device and DONE!
Pre-requisites:
A.1) Flash Builder 4.5(preferably with Flex SDK 4.5.1)
A.2) Air 2.6+
A.3) A registered Apple Developer's Account
You will then need:
B.1) A certificate from your Developer's Account (in iOS Provisioning Portal > Certificates)
* if your certificate has expired, you will then need to revoke your certificate, and renew all provisioning profiles*
B.2) A provisioning profile (in iOS Provisioning Portal > Provisioning)
Steps to build and deploy Flex Apps to iOS Devices
1) New Flex Mobile Project (check those that are needed, check iOS of course).
2)
a) to run in simulator, you just have to select 'On Desktop'
b) to run in device, you will need to select 'On Device' (and then select the appropriate packaging method)
If you intend to run in the device, you will need to configure the package settings.
3) Click Apply and click Run.
4) You will the be prompted to enter the password that has been paired up with your certificate.
5) After that, it will start packaging and it can take several or a very, very long time (if you select the Standard Packaging Method).
6) It will then tell you that it has packaged to an output directory.
7) Right click on the .ipa file and open in iTunes
8) Note that if you have a copy of the app in your iOS device, make sure you have it uninstalled
9) in the App tab of your device in iTunes, make sure your app is checked and then sync the device
10) Run your app in your iOS Device and DONE!
Tuesday, August 16, 2011
HIGH FIBRE DIET
Everyone of us, as it is recommended, needs to intake 30g of fibres every single day.
Here is a list i dup-ed. Meat and eggs do not have fibers.
HIGH FIBER FOODS LIST with TOTAL FIBER GRAMS (g)
Almost all of the foods i dislike have good amount of fibres.
Basically, more veggie, and some more fruits and some more beans! Less meat and egg.
In hk, theres a list of prepackaged snacks compiled by HKNA
http://www.hkna.org.hk/en/Snack_DB_2011_Food_Items_EN_21.2.2011.pdf
Here is a list i dup-ed. Meat and eggs do not have fibers.
HIGH FIBER FOODS LIST with TOTAL FIBER GRAMS (g)
| Fresh & Dried Fruit | Serving Size | Fiber (g) |
| Apples with skin | 1 medium | 5.0 |
| Apricot | 3 medium | 1.0 |
| Apricots, dried | 4 pieces | 2.9 |
| Banana | 1 medium | 3.9 |
| Blueberries | 1 cup | 4.2 |
| Cantaloupe, cubes | 1 cup | 1.3 |
| Figs, dried | 2 medium | 3.7 |
| Grapefruit | 1/2 medium | 3.1 |
| Orange, navel | 1 medium | 3.4 |
| Peach | 1 medium | 2.0 |
| Peaches, dried | 3 pieces | 3.2 |
| Pear | 1 medium | 5.1 |
| Plum | 1 medium | 1.1 |
| Raisins | 1.5 oz box | 1.6 |
| Raspberries | 1 cup | 6.4 |
| Strawberries | 1 cup | 4.4 |
| Grains, Beans, Nuts & Seeds | Serving Size | Fiber (g) |
| Almonds | 1 oz | 4.2 |
| Black beans, cooked | 1 cup | 13.9 |
| Bran cereal | 1 cup | 19.9 |
| Bread, whole wheat | 1 slice | 2.0 |
| Brown rice, dry | 1 cup | 7.9 |
| Cashews | 1 oz | 1.0 |
| Flax seeds | 3 Tbsp. | 6.9 |
| Garbanzo beans, cooked | 1 cup | 5.8 |
| Kidney beans, cooked | 1 cup | 11.6 |
| Lentils, red cooked | 1 cup | 13.6 |
| Lima beans, cooked | 1 cup | 8.6 |
| Oats, rolled dry | 1 cup | 12.0 |
| Quinoa (seeds) dry | 1/4 cup | 6.2 |
| Quinoa, cooked | 1 cup | 8.4 |
| Pasta, whole wheat | 1 cup | 6.3 |
| Peanuts | 1 oz | 2.3 |
| Pistachio nuts | 1 oz | 3.1 |
| Pumpkin seeds | 1/4 cup | 4.1 |
| Soybeans, cooked | 1 cup | 8.6 |
| Sunflower seeds | 1/4 cup | 3.0 |
| Walnuts | 1 oz | 3.1 |
| Vegetables | Serving Size | Fiber (g) |
| Avocado (fruit) | 1 medium | 11.8 |
| Beets, cooked | 1 cup | 2.8 |
| Beet greens | 1 cup | 4.2 |
| Bok choy, cooked | 1 cup | 2.8 |
| Broccoli, cooked | 1 cup | 4.5 |
| Brussels sprouts, cooked | 1 cup | 3.6 |
| Cabbage, cooked | 1 cup | 4.2 |
| Carrot | 1 medium | 2.6 |
| Carrot, cooked | 1 cup | 5.2 |
| Cauliflower, cooked | 1 cup | 3.4 |
| Cole slaw | 1 cup | 4.0 |
| Collard greens, cooked | 1 cup | 2.6 |
| Corn, sweet | 1 cup | 4.6 |
| Green beans | 1 cup | 4.0 |
| Celery | 1 stalk | 1.1 |
| Kale, cooked | 1 cup | 7.2 |
| Onions, raw | 1 cup | 2.9 |
| Peas, cooked | 1 cup | 8.8 |
| Peppers, sweet | 1 cup | 2.6 |
| Pop corn, air-popped | 3 cups | 3.6 |
| Potato, baked w/ skin | 1 medium | 4.8 |
| Spinach, cooked | 1 cup | 4.3 |
| Summer squash, cooked | 1 cup | 2.5 |
| Sweet potato, cooked | 1 medium | 4.9 |
| Swiss chard, cooked | 1 cup | 3.7 |
| Tomato | 1 medium | 1.0 |
| Winter squash, cooked | 1 cup | 6.2 |
| Zucchini, cooked | 1 cup | 2.6 |
Almost all of the foods i dislike have good amount of fibres.
Basically, more veggie, and some more fruits and some more beans! Less meat and egg.
In hk, theres a list of prepackaged snacks compiled by HKNA
http://www.hkna.org.hk/en/Snack_DB_2011_Food_Items_EN_21.2.2011.pdf
Subscribe to:
Posts (Atom)



